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, CFIndex, CFRange}; 13 14 #[repr(C)] 15 pub struct __CFData(c_void); 16 17 pub type CFDataRef = *const __CFData; 18 19 extern { 20 /* 21 * CFData.h 22 */ 23 CFDataCreate(allocator: CFAllocatorRef, bytes: *const u8, length: CFIndex) -> CFDataRef24 pub fn CFDataCreate(allocator: CFAllocatorRef, 25 bytes: *const u8, length: CFIndex) -> CFDataRef; 26 //fn CFDataFind CFDataGetBytePtr(theData: CFDataRef) -> *const u827 pub fn CFDataGetBytePtr(theData: CFDataRef) -> *const u8; CFDataGetBytes(theData: CFDataRef, range: CFRange, buffer: *mut u8)28 pub fn CFDataGetBytes(theData: CFDataRef, range: CFRange, buffer: *mut u8); CFDataGetLength(theData: CFDataRef) -> CFIndex29 pub fn CFDataGetLength(theData: CFDataRef) -> CFIndex; 30 CFDataGetTypeID() -> CFTypeID31 pub fn CFDataGetTypeID() -> CFTypeID; 32 } 33