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::{CFTypeID, CFAllocatorRef}; 13 use url::CFURLRef; 14 use dictionary::CFDictionaryRef; 15 use string::CFStringRef; 16 17 #[repr(C)] 18 pub struct __CFBundle(c_void); 19 20 pub type CFBundleRef = *mut __CFBundle; 21 22 extern { 23 /* 24 * CFBundle.h 25 */ CFBundleCreate(allocator: CFAllocatorRef, bundleURL: CFURLRef) -> CFBundleRef26 pub fn CFBundleCreate(allocator: CFAllocatorRef, bundleURL: CFURLRef) -> CFBundleRef; 27 CFBundleGetBundleWithIdentifier(bundleID: CFStringRef) -> CFBundleRef28 pub fn CFBundleGetBundleWithIdentifier(bundleID: CFStringRef) -> CFBundleRef; CFBundleGetFunctionPointerForName(bundle: CFBundleRef, function_name: CFStringRef) -> *const c_void29 pub fn CFBundleGetFunctionPointerForName(bundle: CFBundleRef, function_name: CFStringRef) -> *const c_void; CFBundleGetMainBundle() -> CFBundleRef30 pub fn CFBundleGetMainBundle() -> CFBundleRef; CFBundleGetInfoDictionary(bundle: CFBundleRef) -> CFDictionaryRef31 pub fn CFBundleGetInfoDictionary(bundle: CFBundleRef) -> CFDictionaryRef; 32 CFBundleGetTypeID() -> CFTypeID33 pub fn CFBundleGetTypeID() -> CFTypeID; CFBundleCopyExecutableURL(bundle: CFBundleRef) -> CFURLRef34 pub fn CFBundleCopyExecutableURL(bundle: CFBundleRef) -> CFURLRef; CFBundleCopyPrivateFrameworksURL(bundle: CFBundleRef) -> CFURLRef35 pub fn CFBundleCopyPrivateFrameworksURL(bundle: CFBundleRef) -> CFURLRef; CFBundleCopySharedSupportURL(bundle: CFBundleRef) -> CFURLRef36 pub fn CFBundleCopySharedSupportURL(bundle: CFBundleRef) -> CFURLRef; CFBundleCopyBundleURL(bundle: CFBundleRef) -> CFURLRef37 pub fn CFBundleCopyBundleURL(bundle: CFBundleRef) -> CFURLRef; 38 } 39