1 /* 2 * COPYRIGHT: See COPYING in the top level directory 3 * PROJECT: ReactOS cabinet manager 4 * FILE: tools/cabman/cabman.h 5 * PURPOSE: Cabinet manager header 6 */ 7 8 #pragma once 9 10 #include "cabinet.h" 11 #include "dfp.h" 12 13 /* Cabinet manager modes */ 14 #define CM_MODE_CREATE 0 15 #define CM_MODE_DISPLAY 1 16 #define CM_MODE_EXTRACT 2 17 #define CM_MODE_CREATE_SIMPLE 3 18 19 /* Classes */ 20 21 class CCABManager : public CDFParser 22 { 23 public: 24 CCABManager(); 25 virtual ~CCABManager(); 26 bool ParseCmdline(int argc, char* argv[]); 27 bool Run(); 28 bool IsVerbose() { return Verbose; } 29 private: 30 void Usage(); 31 bool CreateCabinet(); 32 bool DisplayCabinet(); 33 bool ExtractFromCabinet(); 34 /* Event handlers */ 35 virtual bool OnOverwrite(PCFFILE File, char* FileName); 36 virtual void OnExtract(PCFFILE File, char* FileName); 37 virtual void OnDiskChange(char* CabinetName, char* DiskLabel); 38 virtual void OnAdd(PCFFILE Entry, char* FileName); 39 /* Configuration */ 40 bool ProcessAll; 41 ULONG Mode; 42 bool PromptOnOverwrite; 43 char FileName[PATH_MAX]; 44 bool Verbose; 45 }; 46 47 extern CCABManager CABMgr; 48 49 /* EOF */ 50