1 // Copyright 2013-2015 The Servo Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution.
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.
10 use std
::os
::raw
::c_void
;
12 use base
::{CFAllocatorRef, CFTypeID, CFIndex, CFRange}
;
15 pub struct __CFData(c_void
);
17 pub type CFDataRef
= *const __CFData
;
24 pub fn CFDataCreate(allocator
: CFAllocatorRef
,
25 bytes
: *const u8, length
: CFIndex
) -> CFDataRef
;
27 pub fn CFDataGetBytePtr(theData
: CFDataRef
) -> *const u8;
28 pub fn CFDataGetBytes(theData
: CFDataRef
, range
: CFRange
, buffer
: *mut u8);
29 pub fn CFDataGetLength(theData
: CFDataRef
) -> CFIndex
;
30 pub fn CFDataCreateWithBytesNoCopy(
31 allocator
: CFAllocatorRef
,
34 allocator
: CFAllocatorRef
,
37 pub fn CFDataGetTypeID() -> CFTypeID
;