diff --git a/core-foundation-sys/src/lib.rs b/core-foundation-sys/src/lib.rs index 96c0b1e..932c353 100644 --- a/core-foundation-sys/src/lib.rs +++ b/core-foundation-sys/src/lib.rs @@ -26,3 +26,4 @@ pub mod runloop; pub mod set; pub mod string; pub mod url; +pub mod uuid; diff --git a/core-foundation-sys/src/uuid.rs b/core-foundation-sys/src/uuid.rs new file mode 100644 index 0000000..21e8c89 --- /dev/null +++ b/core-foundation-sys/src/uuid.rs @@ -0,0 +1,43 @@ +// Copyright 2013-2015 The Servo Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. +use libc::c_void; + +use base::CFAllocatorRef; + +#[repr(C)] +pub struct __CFUUID(c_void); + +pub type CFUUIDRef = *const __CFUUID; + +#[repr(C)] +pub struct CFUUIDBytes { + byte0: u8, + byte1: u8, + byte2: u8, + byte3: u8, + byte4: u8, + byte5: u8, + byte6: u8, + byte7: u8, + byte8: u8, + byte9: u8, + byte10: u8, + byte11: u8, + byte12: u8, + byte13: u8, + byte14: u8, + byte15: u8 +} + +extern { + /* + * CFUUID.h + */ + pub fn CFUUIDCreateFromUUIDBytes(allocator: CFAllocatorRef, bytes: CFUUIDBytes) -> CFUUIDRef; +}