Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose CFURL accessor functions #94

Merged
merged 1 commit into from Jan 25, 2017
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Expose CFURL accessor functions

  • Loading branch information
jrmuizel committed Jan 25, 2017
commit 303ab74e1c1f6e8abce247c8b7e25084ac04e588
@@ -7,7 +7,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use libc::{c_uint, c_long, c_ulong, c_void};
use libc::{c_uint, c_long, c_ulong, c_void, c_int};

pub type Boolean = u8;
pub type CFIndex = c_long;
@@ -19,6 +19,7 @@ pub type CFTypeID = c_ulong;
pub type CFTypeRef = *const c_void;
pub type CFOptionFlags = u32;
pub type OSStatus = i32;
pub type SInt32 = c_int;

#[repr(C)]
#[derive(Clone, Copy)]
@@ -8,7 +8,7 @@
// except according to those terms.
use libc::c_void;

use base::{CFOptionFlags, CFIndex, CFAllocatorRef, Boolean, CFTypeID};
use base::{CFOptionFlags, CFIndex, CFAllocatorRef, Boolean, CFTypeID, SInt32};
use string::CFStringRef;

#[repr(C)]
@@ -100,23 +100,23 @@ extern {
// baseURL: CFURLRef) -> CFURLRef;

/* Accessing the Parts of a URL */
//fn CFURLCanBeDecomposed
//fn CFURLCopyFileSystemPath
//fn CFURLCopyFragment
//fn CFURLCopyHostName
//fn CFURLCopyLastPathComponent
//fn CFURLCopyNetLocation
//fn CFURLCopyParameterString
//fn CFURLCopyPassword
//fn CFURLCopyPath
//fn CFURLCopyPathExtension
//fn CFURLCopyQueryString
//fn CFURLCopyResourceSpecifier
//fn CFURLCopyScheme
//fn CFURLCopyStrictPath
//fn CFURLCopyUserName
//fn CFURLGetPortNumber
//fn CFURLHasDirectoryPath
pub fn CFURLCanBeDecomposed(anURL: CFURLRef) -> Boolean;
pub fn CFURLCopyFileSystemPath(anURL: CFURLRef, pathStyle: CFURLPathStyle) -> CFStringRef;
pub fn CFURLCopyFragment(anURL: CFURLRef, charactersToLeaveEscaped: CFStringRef) -> CFStringRef;
pub fn CFURLCopyHostName(anURL: CFURLRef) -> CFStringRef;
pub fn CFURLCopyLastPathComponent(anURL: CFURLRef) -> CFStringRef;
pub fn CFURLCopyNetLocation(anURL: CFURLRef) -> CFStringRef;
pub fn CFURLCopyParameterString(anURL: CFURLRef, charactersToLeaveEscaped: CFStringRef) -> CFStringRef;
pub fn CFURLCopyPassword(anURL: CFURLRef) -> CFStringRef;
pub fn CFURLCopyPath(anURL: CFURLRef) -> CFStringRef;
pub fn CFURLCopyPathExtension(anURL: CFURLRef) -> CFStringRef;
pub fn CFURLCopyQueryString(anURL: CFURLRef, charactersToLeaveEscaped: CFStringRef) -> CFStringRef;
pub fn CFURLCopyResourceSpecifier(anURL: CFURLRef) -> CFStringRef;
pub fn CFURLCopyScheme(anURL: CFURLRef) -> CFStringRef;
pub fn CFURLCopyStrictPath(anURL: CFURLRef, isAbsolute: *mut Boolean) -> CFStringRef;
pub fn CFURLCopyUserName(anURL: CFURLRef) -> CFStringRef;
pub fn CFURLGetPortNumber(anURL: CFURLRef) -> SInt32;
pub fn CFURLHasDirectoryPath(anURL: CFURLRef) -> Boolean;

/* Converting URLs to Other Representations */
//fn CFURLCreateData(allocator: CFAllocatorRef, url: CFURLRef,
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.