Skip Navigation Links
Skip Navigation LinksHome > ZipArchive > How to Use > API Documentation

CZipCallback Struct Reference

#include <ZipCallback.h>

Inheritance diagram for CZipCallback:

List of all members.


Public Member Functions

virtual bool Callback (ZIP_SIZE_TYPE uProgress)=0

Public Attributes

CZipString m_szExternalFile

Detailed Description

A base class for callback objects that are notified when various actions take place. You need to derive your own class and overload the Callback method to use it. Do not derive from CZipCallback directly but derive from:
  • CZipSegmCallback, when you create a segmented archive - you will be notified when there the next volume is processed in a segmented archive.
  • CZipActionCallback, for other notifications.
See also:
Segmented Archives: Splitting and Spanning

Progress Notifications: Using Callback Objects

CZipSegmCallback

CZipActionCallback


Member Function Documentation

virtual bool CZipCallback::Callback ( ZIP_SIZE_TYPE  uProgress  )  [pure virtual]

The method called as a callback.

Return false from inside the method to abort the current operation. If it is a segmented archive callback object, a CZipException with CZipException::aborted code will be thrown, otherwise the code will be CZipException::abortedAction or CZipException::abortedSafely. The following actions can be safely aborted (without corrupting the archive):

  • counting bytes before deleting files
  • testing
  • saving the central directory in a not segmented archive (saved data is removed in case of break and you can save it again).

If the archive is segmented and if saving is aborted, the archive will not be damaged, but saved part of the central directory will be not removed and the new central directory will have to be saved after it.

Parameters:
uProgress The value depends on the type of the operation.
Returns:
false to abort the current operation; true to continue it.
Note:
Override this method in the derived class. If you define this method inside the class declaration, consider inlining it to make the action progress faster.
See also:
CZipSegmCallback


Member Data Documentation

Stored the filename of an external file, if the action (adding, extracting or segmentation) uses such a file.


The documentation for this struct was generated from the following file:
Back To Top Up