1 // Copyright 2016 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::{CFTypeID, CFIndex}; 13 use string::CFStringRef; 14 15 #[repr(C)] 16 pub struct __CFError(c_void); 17 18 pub type CFErrorRef = *mut __CFError; 19 20 extern "C" { CFErrorGetTypeID() -> CFTypeID21 pub fn CFErrorGetTypeID() -> CFTypeID; 22 23 pub static kCFErrorDomainPOSIX: CFStringRef; 24 pub static kCFErrorDomainOSStatus: CFStringRef; 25 pub static kCFErrorDomainMach: CFStringRef; 26 pub static kCFErrorDomainCocoa: CFStringRef; 27 CFErrorGetDomain(err: CFErrorRef) -> CFStringRef28 pub fn CFErrorGetDomain(err: CFErrorRef) -> CFStringRef; CFErrorGetCode(err: CFErrorRef) -> CFIndex29 pub fn CFErrorGetCode(err: CFErrorRef) -> CFIndex; 30 CFErrorCopyDescription(err: CFErrorRef) -> CFStringRef31 pub fn CFErrorCopyDescription(err: CFErrorRef) -> CFStringRef; 32 } 33