Public Member Functions | Public Attributes | List of all members
CZipCallback Struct Referenceabstract

#include <ZipCallback.h>

Inheritance diagram for CZipCallback:
Inheritance graph

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:

See Also
Segmented Archives: Splitting and Spanning
Progress Notifications: Using Callback Objects
CZipSegmCallback
CZipActionCallback

Definition at line 58 of file ZipCallback.h.

Member Function Documentation

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

The method called as a callback.

Return false from inside of this 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):

  • extracting
  • testing
  • saving the central directory in a not segmented archive
  • counting bytes before deleting files (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
uProgressThe value depends on the type of the operation.
Returns
false to abort the current operation; true to continue it.
Note
Override this method in a derived class. If you define this method inside the class declaration, consider inlining it to make an action progress faster.
See Also
CZipSegmCallback

Member Data Documentation

CZipString CZipCallback::m_szExternalFile

The filename of an external file, if an action (adding, extracting or segmentation) uses such a file. You can set its value, to change the currently used path.

Definition at line 96 of file ZipCallback.h.


The documentation for this struct was generated from the following file:

The ZipArchive Library Copyright © 2000 - 2022 Artpol Software - Tadeusz Dracz. Generated at Sat Dec 17 2022 19:57:04.