1 // Copyright 2013-2015 The Servo Project Developers. See the COPYRIGHT 2 // file at the top-level directory of this distribution. 3 // 4 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or 5 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license 6 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your 7 // option. This file may not be copied, modified, or distributed 8 // except according to those terms. 9 10 use std::os::raw::c_void; 11 12 use base::{CFAllocatorRef, CFTypeID}; 13 14 #[repr(C)] 15 pub struct __CFUUID(c_void); 16 17 pub type CFUUIDRef = *const __CFUUID; 18 19 #[repr(C)] 20 #[derive(Clone, Copy, Default)] 21 pub struct CFUUIDBytes { 22 pub byte0: u8, 23 pub byte1: u8, 24 pub byte2: u8, 25 pub byte3: u8, 26 pub byte4: u8, 27 pub byte5: u8, 28 pub byte6: u8, 29 pub byte7: u8, 30 pub byte8: u8, 31 pub byte9: u8, 32 pub byte10: u8, 33 pub byte11: u8, 34 pub byte12: u8, 35 pub byte13: u8, 36 pub byte14: u8, 37 pub byte15: u8 38 } 39 40 extern { 41 /* 42 * CFUUID.h 43 */ CFUUIDCreate(allocator: CFAllocatorRef) -> CFUUIDRef44 pub fn CFUUIDCreate(allocator: CFAllocatorRef) -> CFUUIDRef; CFUUIDCreateFromUUIDBytes(allocator: CFAllocatorRef, bytes: CFUUIDBytes) -> CFUUIDRef45 pub fn CFUUIDCreateFromUUIDBytes(allocator: CFAllocatorRef, bytes: CFUUIDBytes) -> CFUUIDRef; CFUUIDGetUUIDBytes(uuid: CFUUIDRef) -> CFUUIDBytes46 pub fn CFUUIDGetUUIDBytes(uuid: CFUUIDRef) -> CFUUIDBytes; 47 CFUUIDGetTypeID() -> CFTypeID48 pub fn CFUUIDGetTypeID() -> CFTypeID; 49 } 50