NSObject (MPQArchiveDelegate)


Discussion

The MPQArchiveDelegate delegate is used to report on the activity and status of an MPQ archive and provide access management features to clients pertaining to all the framework operations, such as adding, deleting, opening, etc.

Methods

archiveShouldSave:
This method is called immediately before saving an archive.
archiveShouldSave
This method is called immediately before saving an archive.
archiveWillSave:
This method is called immediately before saving an archive but after archiveShouldSave: if it is implemented by the delegate.
archiveWillSave
This method is called immediately before saving an archive but after archiveShouldSave: if it is implemented by the delegate.
archiveDidSave:
This method is called immediately after saving an archive.
archiveDidSave
This method is called immediately after saving an archive.
archive:shouldAddFile:
This method is called immediately before adding a file to an archive.
archive
This method is called immediately before adding a file to an archive.
archive:willAddFile:
This method is called immediately before the framework starts compressing a file into an archive.
archive
This method is called immediately before the framework starts compressing a file into an archive.
archive:didAddFile:
This method is called immediately after the framework compressed a file into an archive.
archive
This method is called immediately after the framework compressed a file into an archive.
archive:shouldDeleteFile:
This method is called immediately before deleting a file from an archive.
archive
This method is called immediately before deleting a file from an archive.
archive:willDeleteFile:
This method is called immediately before the framework deletes a file from an archive.
archive
This method is called immediately before the framework deletes a file from an archive.
archive:didDeleteFile:
This method is called immediately after the framework deleted a file from an archive.
archive
This method is called immediately after the framework deleted a file from an archive.
archive:shouldRenameFile:as:
This method is called immediately before renaming a file of an archive.
archive
This method is called immediately before renaming a file of an archive.
archive:willRenameFile:as:
This method is called immediately before the framework starts renaming a file of an archive.
archive
This method is called immediately before the framework starts renaming a file of an archive.
archive:didRenameFile:as:
This method is called immediately after the framework renamed a file of an archive.
archive
This method is called immediately after the framework renamed a file of an archive.
archive:shouldOpenFile:
This method is called immediately before opening a file of the archive.
archive
This method is called immediately before opening a file of the archive.
archive:willOpenFile:
This method is called immediately before opening a file of the archive.
archive
This method is called immediately before opening a file of the archive.
archive:didOpenFile:
This method is called immediately after the framework opened a file from an archive.
archive
This method is called immediately after the framework opened a file from an archive.

archive


This method is called immediately before adding a file to an archive.
See Also:
archive:shouldAddFile:
( BOOL ) archive:
(MPQArchive *) archive shouldAddFile :
(NSString *) file;

This method is invoked when adding a file to the archive but prior to that file being actually compressed and written in the MPQ archive file. Return YES to permit the addition or NO to cancel it. Note that the new file will be accessible right after the addition method returns (if it was sucessfull). However, the data of the file will be read from the original file on disk until the archive is saved, at which time the delegate will be notified that the file is being compressed (if compression was specified) and added to the MPQ archive file.


archive


This method is called immediately before the framework starts compressing a file into an archive.
See Also:
archive:willAddFile:
( void ) archive:
(MPQArchive *) archive willAddFile :
(NSString *) file;

This method is called for each file pending for addition in the archive being saved. This method is invoked after archiveWillSave: but prior to archiveDidSave:.


archive


This method is called immediately after the framework compressed a file into an archive.
See Also:
archive:didAddFile:
( void ) archive:
(MPQArchive *) archive didAddFile :
(NSString *) file;

This message is sent regardless if the file was compressed or not, encrypted or not.


archive


This method is called immediately before deleting a file from an archive.
See Also:
archive:shouldDeleteFile:
( BOOL ) archive:
(MPQArchive *) archive shouldDeleteFile :
(NSString *) file;

Return YES to permit the addition or NO to cancel it.


archive


This method is called immediately before the framework deletes a file from an archive.
See Also:
archive:willDeleteFile:
( void ) archive:
(MPQArchive *) archive willDeleteFile :
(NSString *) file;

This method is invoked after archive:shouldDeleteFile:. Note that unlike file addition and renaming, archive:willDeleteFile: and archive:didDeleteFile: are not invoked when the archive is saved, but rather immediately before and after the delete file method is invoked respectively. This is because no extra operation is performed at save time for deletion, unlike addition and renaming. Note however that deletion is undoable until the archive is saved.


archive


This method is called immediately after the framework deleted a file from an archive.
See Also:
archive:didDeleteFile:
( void ) archive:
(MPQArchive *) archive didDeleteFile :
(NSString *) file;

Note that unlike file addition and renaming, archive:willDeleteFile: and archive:didDeleteFile: are not invoked when the archive is saved, but rather immediately before and after the delete file method is invoked respectively. This is because no extra operation is performed at save time for deletion, unlike addition and renaming. Note however that deletion is undoable until the archive is saved.


archive


This method is called immediately before renaming a file of an archive.
See Also:
archive:shouldRenameFile:as:
( BOOL ) archive:
(MPQArchive *) archive shouldRenameFile :
(NSString *) file as :
(NSString *) newFile;

This method is invoked when renaming a file of the archive but prior to that file being actually re-encrypted and re-written in the MPQ archive file. Return YES to permit the rename or NO to cancel it. Note that the file will be accessible right after the rename method returns (if it was sucessfull) as the new name. The delegate will be notified that the file is being re-processed at save time.


archive


This method is called immediately before the framework starts renaming a file of an archive.
See Also:
archive:willRenameFile:as:
( void ) archive:
(MPQArchive *) archive willRenameFile :
(NSString *) file as :
(NSString *) newFile;

This method is called for each file pending for renaming in the archive being saved. This method is invoked after archiveWillSave: but prior to archiveDidSave:.


archive


This method is called immediately after the framework renamed a file of an archive.
See Also:
archive:didRenameFile:as:
( void ) archive:
(MPQArchive *) archive didRenameFile :
(NSString *) file as :
(NSString *) newFile;

It is safe to use the new name as soon as this message is sent.


archive


This method is called immediately before opening a file of the archive.
See Also:
archive:shouldOpenFile:
( BOOL ) archive:
(MPQArchive *) archive shouldOpenFile :
(NSString *) file;

Return YES to permit the file to be opened or NO to prevent it.


archive


This method is called immediately before opening a file of the archive.
See Also:
archive:willOpenFile:
( void ) archive:
(MPQArchive *) archive willOpenFile :
(NSString *) file;

This method is invoked after archive:shouldOpenFile:.


archive


This method is called immediately after the framework opened a file from an archive.
See Also:
archive:didOpenFile:
( void ) archive:
(MPQArchive *) archive didOpenFile :
(NSString *) file;

Will not be called if file opening is cancelled or failed.


archive:didAddFile:


This method is called immediately after the framework compressed a file into an archive.
See Also:
archive
( void ) archive:
(MPQArchive *) archive didAddFile :
(NSString *) file;

This message is sent regardless if the file was compressed or not, encrypted or not.

Parameter Descriptions
archive
The archive in which the file was added.
file
The MPQ path of the file that was added.

archive:didDeleteFile:


This method is called immediately after the framework deleted a file from an archive.
See Also:
archive
( void ) archive:
(MPQArchive *) archive didDeleteFile :
(NSString *) file;

Note that unlike file addition and renaming, archive:willDeleteFile: and archive:didDeleteFile: are not invoked when the archive is saved, but rather immediately before and after the delete file method is invoked respectively. This is because no extra operation is performed at save time for deletion, unlike addition and renaming. Note however that deletion is undoable until the archive is saved.

Parameter Descriptions
archive
The archive from which file was deleted.
file
The MPQ path of the file that was deleted.

archive:didOpenFile:


This method is called immediately after the framework opened a file from an archive.
See Also:
archive
( void ) archive:
(MPQArchive *) archive didOpenFile :
(NSString *) file;

Will not be called if file opening is cancelled or failed.

Parameter Descriptions
archive
The archive from which file was deleted.
file
The MPQ path of the file that was deleted.

archive:didRenameFile:as:


This method is called immediately after the framework renamed a file of an archive.
See Also:
archive
( void ) archive:
(MPQArchive *) archive didRenameFile :
(NSString *) file as :
(NSString *) newFile;

It is safe to use the new name as soon as this message is sent.

Parameter Descriptions
archive
The archive in which the renamed file is stored.
file
The MPQ path of the file that was renamed.
newFile
The new MPQ path of the file that was renamed.

archive:shouldAddFile:


This method is called immediately before adding a file to an archive.
See Also:
archive
( BOOL ) archive:
(MPQArchive *) archive shouldAddFile :
(NSString *) file;

This method is invoked when adding a file to the archive but prior to that file being actually compressed and written in the MPQ archive file. Return YES to permit the addition or NO to cancel it. Note that the new file will be accessible right after the addition method returns (if it was sucessfull). However, the data of the file will be read from the original file on disk until the archive is saved, at which time the delegate will be notified that the file is being compressed (if compression was specified) and added to the MPQ archive file.

Parameter Descriptions
archive
The archive in which the file will be added.
file
The MPQ path of the file that is about to be added.
method result
A response from the delegate.

archive:shouldDeleteFile:


This method is called immediately before deleting a file from an archive.
See Also:
archive
( BOOL ) archive:
(MPQArchive *) archive shouldDeleteFile :
(NSString *) file;

Return YES to permit the addition or NO to cancel it.

Parameter Descriptions
archive
The archive in which file will be deleted.
file
The MPQ path of the file that is about to be deleted.
method result
A response from the delegate.

archive:shouldOpenFile:


This method is called immediately before opening a file of the archive.
See Also:
archive
( BOOL ) archive:
(MPQArchive *) archive shouldOpenFile :
(NSString *) file;

Return YES to permit the file to be opened or NO to prevent it.

Parameter Descriptions
archive
The archive containing the file that is about to be opened.
file
The MPQ path of the file that is about to be opened.
method result
A response from the delegate.

archive:shouldRenameFile:as:


This method is called immediately before renaming a file of an archive.
See Also:
archive
( BOOL ) archive:
(MPQArchive *) archive shouldRenameFile :
(NSString *) file as :
(NSString *) newFile;

This method is invoked when renaming a file of the archive but prior to that file being actually re-encrypted and re-written in the MPQ archive file. Return YES to permit the rename or NO to cancel it. Note that the file will be accessible right after the rename method returns (if it was sucessfull) as the new name. The delegate will be notified that the file is being re-processed at save time.

Parameter Descriptions
archive
The archive in which the file to be renamed is stored.
file
The MPQ path of the file that is about to be renamed.
newFile
The new MPQ path of the file that is about to be renamed.
method result
A response from the delegate.

archive:willAddFile:


This method is called immediately before the framework starts compressing a file into an archive.
See Also:
archive
( void ) archive:
(MPQArchive *) archive willAddFile :
(NSString *) file;

This method is called for each file pending for addition in the archive being saved. This method is invoked after archiveWillSave: but prior to archiveDidSave:.

Parameter Descriptions
archive
The archive in which the file will be added.
file
The MPQ path of the file that is about to be added.

archive:willDeleteFile:


This method is called immediately before the framework deletes a file from an archive.
See Also:
archive
( void ) archive:
(MPQArchive *) archive willDeleteFile :
(NSString *) file;

This method is invoked after archive:shouldDeleteFile:. Note that unlike file addition and renaming, archive:willDeleteFile: and archive:didDeleteFile: are not invoked when the archive is saved, but rather immediately before and after the delete file method is invoked respectively. This is because no extra operation is performed at save time for deletion, unlike addition and renaming. Note however that deletion is undoable until the archive is saved.

Parameter Descriptions
archive
The archive from which file will be deleted.
file
The MPQ path of the file that is about to be deleted.

archive:willOpenFile:


This method is called immediately before opening a file of the archive.
See Also:
archive
( void ) archive:
(MPQArchive *) archive willOpenFile :
(NSString *) file;

This method is invoked after archive:shouldOpenFile:.

Parameter Descriptions
archive
The archive containing the file that is about to be opened.
file
The MPQ path of the file that is about to be opened.

archive:willRenameFile:as:


This method is called immediately before the framework starts renaming a file of an archive.
See Also:
archive
( void ) archive:
(MPQArchive *) archive willRenameFile :
(NSString *) file as :
(NSString *) newFile;

This method is called for each file pending for renaming in the archive being saved. This method is invoked after archiveWillSave: but prior to archiveDidSave:.

Parameter Descriptions
archive
The archive in which the file to be renamed is stored.
file
The MPQ path of the file that is about to be renamed.
newFile
The new MPQ path of the file that is about to be renamed.

archiveDidSave


This method is called immediately after saving an archive.
See Also:
archiveDidSave:
( void ) archiveDidSave:
(MPQArchive *) archive;

archiveDidSave: will not be sent to the delegate if the save operation failed.


archiveDidSave:


This method is called immediately after saving an archive.
See Also:
archiveDidSave
( void ) archiveDidSave:
(MPQArchive *) archive;

archiveDidSave: will not be sent to the delegate if the save operation failed.

Parameter Descriptions
archive
The archive that did save.

archiveShouldSave


This method is called immediately before saving an archive.
See Also:
archiveShouldSave:
( BOOL ) archiveShouldSave:
(MPQArchive *) archive;

Return YES in this delegate to perform the save operation, or NO to cancel the save operation.


archiveShouldSave:


This method is called immediately before saving an archive.
See Also:
archiveShouldSave
( BOOL ) archiveShouldSave:
(MPQArchive *) archive;

Return YES in this delegate to perform the save operation, or NO to cancel the save operation.

Parameter Descriptions
archive
The archive that is about to be saved.
method result
A response from the delegate.

archiveWillSave


This method is called immediately before saving an archive but after archiveShouldSave: if it is implemented by the delegate.
See Also:
archiveWillSave:
( void ) archiveWillSave:
(MPQArchive *) archive;

This message is always sent if the delegate implements it.


archiveWillSave:


This method is called immediately before saving an archive but after archiveShouldSave: if it is implemented by the delegate.
See Also:
archiveWillSave
( void ) archiveWillSave:
(MPQArchive *) archive;

This message is always sent if the delegate implements it.

Parameter Descriptions
archive
The archive that is about to be saved.

(Last Updated 5/8/2004)