ReactOS  0.4.15-dev-4614-ga5a6101
cabman.h
Go to the documentation of this file.
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;
47  bool Verbose;
48 };
49 
50 
51 /* EOF */
PCABINET_NAME CabinetName
Definition: dfp.h:122
static int argc
Definition: ServiceArgs.c:12
bool Run()
Definition: cabman.cxx:573
virtual void OnDiskChange(const char *CabinetName, const char *DiskLabel) override
Definition: cabman.cxx:642
virtual void OnExtract(PCFFILE File, const char *FileName) override
Definition: cabman.cxx:625
bool IsVerbose()
Definition: cabman.h:28
bool ParseCmdline(int argc, char *argv[])
Definition: cabman.cxx:224
virtual void OnVerboseMessage(const char *Message) override
Definition: cabman.cxx:673
#define argv
Definition: mplay32.c:18
bool ProcessAll
Definition: cabman.h:43
bool ExtractFromCabinet()
Definition: cabman.cxx:511
bool PromptOnOverwrite
Definition: cabman.h:45
ULONG Mode
Definition: cabman.h:44
void Usage()
Definition: cabman.cxx:188
bool DisplayCabinet()
Definition: cabman.cxx:442
virtual bool OnOverwrite(PCFFILE File, const char *FileName) override
Definition: cabman.cxx:606
virtual void OnAdd(PCFFILE Entry, const char *FileName) override
Definition: cabman.cxx:658
#define PATH_MAX
Definition: types.h:280
CHAR Message[80]
Definition: alive.c:5
bool CreateCabinet()
Definition: cabman.cxx:423
virtual ~CCABManager()
Definition: cabman.cxx:180
unsigned int ULONG
Definition: retypes.h:1
bool Verbose
Definition: cabman.h:47
Definition: File.h:15
Definition: dfp.h:62
base of all file and directory entries
Definition: entries.h:82
PCABINET_NAME DiskLabel
Definition: dfp.h:129