From ba310e8b58d686ee9897b26a7edab5b778a8d96f Mon Sep 17 00:00:00 2001 From: jnj Date: Thu, 13 Nov 2008 18:59:12 +0000 Subject: Add remaining plugins git-svn-id: https://blacktree-elements-public.googlecode.com/svn/trunk@41 57e2f9b5-c12c-0410-8e95-a1ee7272c91a --- .../A/PrivateHeaders/NSURL+NDCarbonUtilities.h | 174 +++++++++++++++++++++ 1 file changed, 174 insertions(+) create mode 100644 QSFoundation.framework/Versions/A/PrivateHeaders/NSURL+NDCarbonUtilities.h (limited to 'QSFoundation.framework/Versions/A/PrivateHeaders/NSURL+NDCarbonUtilities.h') diff --git a/QSFoundation.framework/Versions/A/PrivateHeaders/NSURL+NDCarbonUtilities.h b/QSFoundation.framework/Versions/A/PrivateHeaders/NSURL+NDCarbonUtilities.h new file mode 100644 index 0000000..0ec090a --- /dev/null +++ b/QSFoundation.framework/Versions/A/PrivateHeaders/NSURL+NDCarbonUtilities.h @@ -0,0 +1,174 @@ +/*! + @header NSURL+NDCarbonUtilities.h + @abstract Provides method for interacting with Carbon APIs. + @discussion The methods in NSURL(NDCarbonUtilities) are simply wrappers for functions that can bew found within the carbon API. + + Created by nathan on Wed Dec 05 2001. + Copyright © 2001 Nathan Day. All rights reserved. + */ + +#import +#import + +/*! + @category NSURL(NDCarbonUtilities) + @abstract Provides method for interacting with Carbon APIs. + @discussion Methods for dealing with FSRef’s, FSSpec and other useful carbon stuff. + */ +@interface NSURL (NDCarbonUtilities) + +/*! + @method URLWithFSRef: + @abstract Alloc and intialize a NSURL. + @discussion Returns a file url for the file refered to by a FSRef. + @param fsRef A pointer to a FSRef. + @result A NSURL containing a file url. + */ ++ (NSURL *)URLWithFSRef:(const FSRef *)fsRef; + + /*! +@method URLWithFileSystemPathHFSStyle: + @abstract Alloc and intialize a NSURL. + @discussion Returns a file url for the file refered to by a HFS style path. + @param hfsString A NSString containing a HFS style path. + @result A NSURL containing a file url. + */ ++ (NSURL *)URLWithFileSystemPathHFSStyle:(NSString *)hfsString; + /*! + @method getFSRef: + @abstract Get a FSRef. + @discussion Obtain a FSRef for a file url. + @param fsRef A pointer to a FSRef struct, to be filled by the method. + @result Returns YES if successful, if the method returns NO then fsRef contains garbage. + */ +- (BOOL)getFSRef:(FSRef *)fsRef; + +/*! + @method getFSSpec: + @abstract Get a FSSpec. + @discussion Obtain a FSSpec for a file url. + @param fsSpec A pointer to a FSSpec struct, to be filled by the method. + @result Returns YES if successful, if the method returns NO then fsSpec contains garbage. + */ +- (BOOL)getFSSpec:(FSSpec *)fsSpec; + +/*! + @method URLByDeletingLastPathComponent + @abstract Delete last component of a url. + @discussion Returns a new NSURL equivelent to the receiver with the last component removed. + @result A new NSURL + */ +- (NSURL *)URLByDeletingLastPathComponent; + +/*! + @method fileSystemPathHFSStyle + @abstract Returns a HFS style path. + @discussion Returns a NSString containg a HFS style path (e.g. Macitosh HD:Users:) useful for display purposes. + @result A new NSString containing a HFS style path for the same file or directory as the receiver. + */ +- (NSString *)fileSystemPathHFSStyle; + +/*! + @method resolveAliasFile + @abstract Resolve an alias file. + @discussion Returns an file url NSURL refered to by the receveive if the receveive refers to an alias file. If it does not refer to an alias file the a url identical to the receveive is returned. + @result An file url NSURL. + */ +- (NSURL *)resolveAliasFile; + +/*! + @method finderInfoFlags:type:creator: + @abstract Get finder info flags creator and type. + @discussion The bits of the finder info flag are +
+ + + + + + + + + + + + + +
NameDescription
kIsOnDeskFiles and folders (System 6)
kColorFiles and folders
kIsSharedFiles only (Applications only)
+ If clear, the application needs to write to its resource fork, and therefore cannot be shared on a server
kHasNoINITsFiles only (Extensions/Control Panels only)
+ This file contains no INIT resource
kHasBeenInitedFiles only
+ Clear if the file contains desktop database resources ('BNDL', 'FREF', 'open', 'kind'...) that have not been added yet. Set only by the Finder
kHasCustomIconFiles and folders
kIsStationeryFiles only
kNameLockedFiles and folders
kHasBundleFiles only
kIsInvisibleFiles and folders
kIsAliasFiles only.
+
+ @param flags Contains finder flags on return. + @param type Contains finder type on return. + @param creator Contains creator on return. + @result Return YES if successful, otherwise NO and the returned values are invalid. + */ +- (BOOL)finderInfoFlags:(UInt16*)flags type:(OSType*)type creator:(OSType*)creator; + +/*! + @method finderLocation + @abstract Return a finder items location. + @discussion Returns a finder items location within its parent window. + @result A NSPoint + */ +- (NSPoint)finderLocation; + +/*! + @method setFinderInfoFlags:mask:type:creator: + @abstract Set finder info flags, creator and type. + @discussion The bits of the finder info flag are +
+ + + + + + + + + + + + + +
NameDescription
kIsOnDeskFiles and folders (System 6)
kColorFiles and folders
kIsSharedFiles only (Applications only)
+ If clear, the application needs to write to its resource fork, and therefore cannot be shared on a server
kHasNoINITsFiles only (Extensions/Control Panels only)
+ This file contains no INIT resource
kHasBeenInitedFiles only
+ Clear if the file contains desktop database resources ('BNDL', 'FREF', 'open', 'kind'...) that have not been added yet. Set only by the Finder
kHasCustomIconFiles and folders
kIsStationeryFiles only
kNameLockedFiles and folders
kHasBundleFiles only
kIsInvisibleFiles and folders
kIsAliasFiles only.
+
+ @param flags Finder flags. + @param aMask Mask for Finder flags + @param type The Finder file type + @param creator The application creator code + @result Returns YES if successful. + */ +- (BOOL)setFinderInfoFlags:(UInt16)flags mask:(UInt16)aMask type:(OSType)type creator:(OSType)creator; + +/*! + @method setFinderLocation: + @abstract Sets the location a finder item. + @discussion Set the location of a finder item within in container. + @param location The location + @result Returns YES if successful. + */ +- (BOOL)setFinderLocation:(NSPoint)location; + + +@end + +/*! + @category NSURL(NDCarbonUtilitiesInfoFlags) + @abstract Adds methods to NSURL + @discussion Adds methods to simplify testing of the flags returned from finderInfoFlags:type:creator: + */ +@interface NSURL (NDCarbonUtilitiesInfoFlags) +/*! + @method hasCustomIcon + @abstract Test if a file has a custom icon. + @discussion Test to see if the file refered to by the receiver has a custom icon. The is equivelent to testing for the kHasCustomIcon flag + @result Returns YES if the file has a custom icon. + */ +- (BOOL)hasCustomIcon; + +@end -- cgit