Logo Search packages:      
Sourcecode: harbour version File versions  Download package

void CZipArchive::SetCallback ( CZipActionCallback pCallback = NULL,
int  iWhich = cbAll 
)

Set callback functors for the following operations on the zip archive: adding, extracting, testing or deleting files. See sectCallb information on how to use functors.

Parameters:
pCallback the address of the functional object which class is derived from CZipActionCallback (you need to override member function CZipCallback::Callback in the derived class) Set it to NULL to clear callback for the selected actions.
iWhich can be one or more (use logical OR) CallbackType values.
See also:
CZipActionCallback

GetCallback

Definition at line 444 of file ziparchive.cpp.

References cbAdd, cbAddStore, cbAddTmp, cbDelete, cbDeleteCnt, cbExtract, cbGetFromArchive, cbRename, cbReplace, cbSave, cbTest, m_callbacks, and CZipArchive::CZipClbckStrg::Set().

Referenced by AddNewFile().

{
      CallbackType cbs[] = {cbAdd, cbAddTmp, cbAddStore,cbExtract,cbDeleteCnt,cbDelete,cbTest,cbSave, cbGetFromArchive, cbRename, cbReplace};
      int iCount = sizeof(cbs)/sizeof(CallbackType);
      for (int i = 0; i < iCount; i++)
      {
            CallbackType iCallback = cbs[i];
            if (iWhich & iCallback)
                  m_callbacks.Set(pCallback, iCallback);
      }
}


Generated by  Doxygen 1.6.0   Back to index