#include <ZipCallback.h>
|
virtual bool | Callback (ZIP_SIZE_TYPE uProgress)=0 |
|
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 a 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
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
-
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 a derived class. If you define this method inside the class declaration, consider inlining it to make an action progress faster.
- See Also
- CZipSegmCallback
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.
The documentation for this struct was generated from the following file: