Archive-Unzip-Burst

 view release on metacpan or  search on metacpan

unzip-6.0/wince/intrface.h  view on Meta::CPAN


#ifdef POCKET_UNZIP
//******************************************************************************
//***** Types and Structures
//******************************************************************************

typedef enum _OVERWRITE_MODE {
   OM_PROMPT = 0,
   OM_NEWER,
   OM_ALWAYS,
   OM_NEVER
} OVERWRITE_MODE, *LPOVERWRITE_MODE;

typedef struct _EXTRACT_INFO {
   zusz_t          uzByteCount;   // Total bytes to extract/test
   DWORD           dwFileCount;   // Number of files to extract/test.
   LPSTR          *szFileList;    // ARGV list of files, NULL for all files.
   LPSTR           szMappedPath;  // Used to store mapped name. May be NULL.
   OVERWRITE_MODE  overwriteMode; // How to handle file overwrites.
   BOOL            fExtract;      // TRUE for extract, FALSE for test
   BOOL            fRestorePaths; // TRUE to restore paths, FALSE to junk them.
   BOOL            fAbort;        // Set during operation by UI to abort.
   int             result;        // Result code from extraction/test.

   // Window handles for the various controls in our progress dialogs.
   HWND            hWndEditFile;
   HWND            hWndProgFile;
   HWND            hWndProgTotal;
   HWND            hWndPercentage;
   HWND            hWndFilesProcessed;
   HWND            hWndBytesProcessed;

   // Values used to keep track of our progress.
   zusz_t          uzBytesTotalThisFile;
   zusz_t          uzBytesWrittenThisFile;
   zusz_t          uzBytesWrittenPreviousFiles;
   zusz_t          uzFileOffset;
   DWORD           dwFile;
   LPCSTR          szFile;
   BOOL            fNewLineOfText;

} EXTRACT_INFO, *LPEXTRACT_INFO;

typedef struct _DECRYPT_INFO {
   int    retry;
   LPSTR  szPassword;
   DWORD  nSize;
   LPCSTR szFile;
} DECRYPT_INFO, *LPDECRYPT_INFO;

//******************************************************************************
//***** Function Prototypes
//******************************************************************************

// Our exposed interface functions to the Info-ZIP core.
int  DoListFiles(LPCSTR szZipFile);
BOOL DoExtractOrTestFiles(LPCSTR szZipFile, EXTRACT_INFO *pei);
int  DoGetComment(LPCSTR szZipFile);
BOOL SetExtractToDirectory(LPTSTR szDirectory);

// "Internal" callbacks from Info-ZIP code.
// (The "official" callback functions are declared in the UnZip DLL headers,
// see "unzip.h".)
void WINAPI Wiz_NoPrinting(int f);
int  win_fprintf(zvoid *pG, FILE *file, unsigned int dwCount, char far *buffer);


//******************************************************************************
//***** Global Variables
//******************************************************************************

#ifdef GLOBAL_DECLARE
#undef GLOBAL_DECLARE
#undef GLOBAL_INIT
#endif

#ifdef __INTRFACE_CPP__
   #define GLOBAL_DECLARE
   #define GLOBAL_INIT(value) =value
#else
   #define GLOBAL_DECLARE extern
   #define GLOBAL_INIT(value)
#endif

GLOBAL_DECLARE jmp_buf         dll_error_return;
GLOBAL_DECLARE LPDCL           lpDCL           GLOBAL_INIT(NULL);
GLOBAL_DECLARE LPUSERFUNCTIONS lpUserFunctions GLOBAL_INIT(NULL);

#endif // POCKET_UNZIP

#ifdef __cplusplus
} // extern "C"
#endif

#endif // __INTRFACE_H__



( run in 0.257 second using v1.01-cache-2.11-cpan-aadc1410aed )