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 --- .../Versions/A/PrivateHeaders/NDAlias.h | 190 +++++++++++++++++++++ 1 file changed, 190 insertions(+) create mode 100644 QSFoundation.framework/Versions/A/PrivateHeaders/NDAlias.h (limited to 'QSFoundation.framework/Versions/A/PrivateHeaders/NDAlias.h') diff --git a/QSFoundation.framework/Versions/A/PrivateHeaders/NDAlias.h b/QSFoundation.framework/Versions/A/PrivateHeaders/NDAlias.h new file mode 100644 index 0000000..ac92090 --- /dev/null +++ b/QSFoundation.framework/Versions/A/PrivateHeaders/NDAlias.h @@ -0,0 +1,190 @@ +/* + * NDAlias.h + * NDAliasProject + * + * Created by Nathan Day on Thu Feb 07 2002. + * Copyright (c) 2002 Nathan Day. All rights reserved. + */ + +#import + +/*! + @header NDAliasProject + Declare the interface for the class NDAlias. + */ + +/*! + @class NDAlias + @abstract A class to access the Alias Manager from Cocoa + @discussion Your application can use a NDAlias to refere to file system objects (that is, files, directories, and volumes) in a way that does expect the file system objects path to be maintained. The user then can move or rename the file system object with out your program lossing track of it. This behaviour is not always desirable, for intance with library resources. But for file system objects like documents of user folders, it is what Mac OS users have come to expect + */ +@interface NDAlias : NSObject +{ + AliasHandle aliasHandle; + Boolean changed; +} + +/*! + @method aliasWithURL: + @abstract Creates and initalises a NDAlias. + @discussion The method aliasWithURL: creates an NDAlias that contains only the minimum information necessary to describe the target: the target name, the parent directory ID, the volume name and creation date, and the volume mounting information. The aliasWithURL: method uses the standard alias record data structure, but it fills in only parts of the record. +

The methods url and path never update a minimal alias record.

+ @param aURL the file url for the target of the alias. + @result A NDAlias instance, returns nil if NDAlias creation fails. + */ ++ (id)aliasWithURL:(NSURL *)aURL; +/*! + @method aliasWithURL:fromURL: + @abstract Creates and initalises a NDAlias. + @discussion The method aliasWithURL:fromURL: creates a NDAlias that describes the specified target. aliasWithURL:fromURL: always records the name and file or directory ID of the target, its creation date, the parent directory name and ID, and the volume name and creation date. It also records the full pathname of the target and a collection of other information relevant to locating the target, verifying the target, and mounting the target's volume, if necessary. aliasWithURL:fromURL: also stores relative path information as well by supplying a starting point for a relative path. + @param aURL the file url for the target of the alias. + @param aFromURL The starting point for a relative path, to be used later in a relative search. The two file or directory url's, aFromURL and aURL, must reside on the same volume. + @result A NDAlias instance, returns nil if NDAlias creation fails. + */ ++ (id)aliasWithURL:(NSURL *)aURL fromURL:(NSURL *)aFromURL; +/*! + @method aliasWithPath: + @abstract Creates and initalises a NDAlias. + @discussion The method aliasWithPath: creates an NDAlias that contains only the minimum information necessary to describe the target: the target name, the parent directory ID, the volume name and creation date, and the volume mounting information. The aliasWithPath: method uses the standard alias record data structure, but it fills in only parts of the record. +

The methods url and path never update a minimal alias record.

+ @param aPath the path for the target of the alias. + @result A NDAlias instance, returns nil if NDAlias creation fails. + */ ++ (id)aliasWithPath:(NSString *)aPath; +/*! + @method aliasWithPath:fromPath: + @abstract Creates and initalises a NDAlias. + @discussion The method aliasWithPath:fromPath: creates a NDAlias that describes the specified target. aliasWithPath:fromPath: always records the name and file or directory ID of the target, its creation date, the parent directory name and ID, and the volume name and creation date. It also records the full pathname of the target and a collection of other information relevant to locating the target, verifying the target, and mounting the target's volume, if necessary. aliasWithPath:fromPath: also stores relative path information as well by supplying a starting point for a relative path. + @param aURL the file url for the target of the alias. + @param aFromPath The starting point for a relative path, to be used later in a relative search. The two file or directory url's, aFromPath and aURL, must reside on the same volume. + @result A NDAlias instance, returns nil if NDAlias creation fails. + */ ++ (id)aliasWithPath:(NSString *)aPath fromPath:(NSString *)aFromPath; + +/*! + @method aliasWithData: + @abstract Creates and initalises a NDAlias. + @discussion The method aliasWithData: creates a NDAlias that describes the specified target. aliasWithData: creates the NDAlias from the data that was returned from the method data + @param aData The NSData instaqnces that contains the data returned previously from the method data. + @result A NDAlias instance, returns nil if NDAlias creation fails. + */ ++ (id)aliasWithData:(NSData *)aData; + +/*! + @method initWithURL: + @abstract Initalises a NDAlias. + @discussion The method initWithURL: initalises an NDAlias that contains only the minimum information necessary to describe the target: the target name, the parent directory ID, the volume name and creation date, and the volume mounting information. The initWithURL: method uses the standard alias record data structure, but it fills in only parts of the record. +

The methods url and path never update a minimal alias record.

+ @param aURL the file url for the target of the alias. + @result A NDAlias instance, returns nil if NDAlias creation fails. + */ +- (id)initWithURL:(NSURL *)aURL; +/*! + @method initWithPath:fromURL: + @abstract Initalises a NDAlias. + @discussion The method initWithPath:fromURL: initalises a NDAlias that describes the specified target. initWithPath:fromURL: always records the name and file or directory ID of the target, its creation date, the parent directory name and ID, and the volume name and creation date. It also records the full pathname of the target and a collection of other information relevant to locating the target, verifying the target, and mounting the target's volume, if necessary. initWithPath:fromURL: also stores relative path information as well by supplying a starting point for a relative path. + @param aURL the file url for the target of the alias. + @param aFromURL The starting point for a relative path, to be used later in a relative search. The two file or directory url's, aFromURL and aURL, must reside on the same volume. + @result An initalises NDAlias, returns nil if initalises fails. + */ +- (id)initWithURL:(NSURL *)aURL fromURL:(NSURL *)aFromURL; +/*! + @method initWithPath: + @abstract Initalises a NDAlias. + @discussion The method initWithPath: initalises an NDAlias that contains only the minimum information necessary to describe the target: the target name, the parent directory ID, the volume name and creation date, and the volume mounting information. The initWithPath: method uses the standard alias record data structure, but it fills in only parts of the record. +

The methods url and path never update a minimal alias record.

+ @param aPath the path for the target of the alias. + @result An initalises NDAlias, returns nil if initalises fails. + */ +- (id)initWithPath:(NSString *)aPath; +/*! + @method initWithPath:fromPath: + @abstract Initalises a NDAlias. + @discussion The method initWithPath:fromPath: initalises a NDAlias that describes the specified target. initWithPath:fromPath: always records the name and file or directory ID of the target, its creation date, the parent directory name and ID, and the volume name and creation date. It also records the full pathname of the target and a collection of other information relevant to locating the target, verifying the target, and mounting the target's volume, if necessary. initWithPath:fromPath: also stores relative path information as well by supplying a starting point for a relative path. + @param aPath the file url for the target of the alias. + @param aFromPath The starting point for a relative path, to be used later in a relative search. The two file or directory url's, aFromPath and aPath, must reside on the same volume. + @result An initalises NDAlias, returns nil if initalises fails. + */ +- (id)initWithPath:(NSString *)aPath fromPath:(NSString *)aFromPath; + + /*! + @method initWithData: + @abstract Initalises a NDAlias. + @discussion The method initWithData: initalises a NDAlias that describes the specified target. initWithData: creates the NDAlias from the data that was returned from the method data + @param aData The NSData instaqnces that contains the data returned previously from the method data. + @result An initalises NDAlias, returns nil if initalises fails. + */ +- (id)initWithData:(NSData *)aData; + +/*! + @method url + @abstract Returns the single most likely target for the receiver. + @discussion The url method performs a fast search for the target of the receiver. If the resolution is successful, url returns a file NSURL for the target file system object, updates the receiver if necessary, and reports (through the method changed) whether the receiver was updated. If the target is on an unmounted AppleShare volume, url automatically mounts the volume. If the target is on an unmounted ejectable volume, url asks the user to insert the volume. +

After it identifies a target, url compares some key information about the target with the information in the receiver. If the information differs, url updates the receiver to match the target.

+

The url method displays the standard dialog boxes when it needs input from the user, such as a name and password for mounting a remote volume. The user can cancel the resolution through these dialog boxes.

+ @result A file NSURL to the target of the receiver. nil is returned if no target could be found. + */ +- (NSURL *)url; +/*! + @method path + @abstract Returns the single most likely target for the receiver. + @discussion The method path performs a fast search for the target of the receiver. If the resolution is successful, path returns a path NSString for the target file system object, updates the receiver if necessary, and reports (through the method changed) whether the receiver was updated. If the target is on an unmounted AppleShare volume, path automatically mounts the volume. If the target is on an unmounted ejectable volume, path asks the user to insert the volume. +

After it identifies a target, path compares some key information about the target with the information in the receiver. If the information differs, path updates the receiver to match the target.

+

The path method displays the standard dialog boxes when it needs input from the user, such as a name and password for mounting a remote volume. The user can cancel the resolution through these dialog boxes.

+ @result A path NSString to the target of the receiver. nil is returned if no target could be found. + */ +- (NSString *)path; +/*! + @method changed + @abstract Reports whether the receiver was updated. + @discussion The method changed indicates whether the receiver was updated because it contained some outdated information about the target. If it the receiver is updated, YES is returned. Otherwise, it return NO. (url and path never update a NDAlias that was created with no relative path.) + @result YES if the receiver was updated, NO if it was not updated. + */ +- (BOOL)changed; + +/*! + @method setURL: + @abstract Updates an the reciever with a new target. + @discussion The method setURL: rebuilds the entire recievers alias record . + @param aURL the file url for the target of the alias. + @result Returns YES if setting the target succeeded, otherwise returns NO. + */ +- (BOOL)setURL:(NSURL *)aURL; +/*! + @method setURL:fromURL: + @abstract Updates an the reciever with a new target. + @discussion The method setURL:fromURL: rebuilds the entire recievers alias record . +

The setURL:fromURL: function always creates a complete alias record. When you use setURL:fromURL: to update a minimal alias record, you convert the minimal record to a complete record.

+ @param aURL the file url for the target of the reciever. + @param aFromURL The starting point for a relative path, to be used later in a relative search. The two file or directory url's, aFromURL and aURL, must reside on the same volume. + @result Returns YES if setting the target succeeded, otherwise returns NO. + */ +- (BOOL)setURL:(NSURL *)aURL fromURL:(NSURL *)aFromURL; +/*! + @method setPath: + @abstract Updates an the reciever with a new target. + @discussion The method setPath: rebuilds the entire recievers alias record . + @param aPath the path for the target of the reciever. + @result Returns YES if setting the target succeeded, otherwise returns NO. + */ +- (BOOL)setPath:(NSString *)aPath; +/*! + @method setURL:fromURL: + @abstract Updates an the reciever with a new target. + @discussion The method setURL:fromURL: rebuilds the entire recievers alias record . +

The setURL:fromURL: function always creates a complete alias record. When you use setURL:fromURL: to update a minimal alias record, you convert the minimal record to a complete record.

+ @param aPath the path for the target of the reciever. + @param aFromPath The starting point for a relative path, to be used later in a relative search. The two file or directory paths, aFromPath and aPath, must reside on the same volume. + @result Returns YES if setting the target succeeded, otherwise returns NO. + */ +- (BOOL)setPath:(NSString *)aPath fromPath:(NSString *)aFromPath; + +/*! + @method data + @abstract Returns a NSData instance for the reciever. + @discussion The method data returns the contents of the recievers as an NSData, this can be used for archiving perposes though NDAlias does implement the NSCoding protocol. + @result Returns an NSData instance. + */ +- (NSData *)data; + +@end -- cgit