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 35 /* Event handlers */ 36 virtual bool OnOverwrite(PCFFILE File, const char* FileName) override; 37 virtual void OnExtract(PCFFILE File, const char* FileName) override; 38 virtual void OnDiskChange(const char* CabinetName, const char* DiskLabel) override; 39 virtual void OnAdd(PCFFILE Entry, const char* FileName) override; 40 virtual void OnVerboseMessage(const char* Message) override; 41 42 /* Configuration */ 43 bool ProcessAll; 44 ULONG Mode; 45 bool PromptOnOverwrite; 46 char FileName[PATH_MAX]; 47 bool Verbose; 48 }; 49 50 51 /* EOF */ 52