ReactOS  0.4.15-dev-448-gd6c4411
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  /* 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;
44  bool Verbose;
45 };
46 
47 extern CCABManager CABMgr;
48 
49 /* EOF */
PCABINET_NAME CabinetName
Definition: dfp.h:122
static int argc
Definition: ServiceArgs.c:12
bool Run()
Definition: main.cxx:558
virtual void OnDiskChange(char *CabinetName, char *DiskLabel)
Definition: main.cxx:627
CCABManager CABMgr
Definition: main.cxx:658
bool IsVerbose()
Definition: cabman.h:28
bool ParseCmdline(int argc, char *argv[])
Definition: main.cxx:223
#define argv
Definition: mplay32.c:18
bool ProcessAll
Definition: cabman.h:40
bool ExtractFromCabinet()
Definition: main.cxx:496
bool PromptOnOverwrite
Definition: cabman.h:42
virtual void OnAdd(PCFFILE Entry, char *FileName)
Definition: main.cxx:643
ULONG Mode
Definition: cabman.h:41
void Usage()
Definition: main.cxx:188
CCABManager()
Definition: main.cxx:167
bool DisplayCabinet()
Definition: main.cxx:427
virtual void OnExtract(PCFFILE File, char *FileName)
Definition: main.cxx:610
#define PATH_MAX
Definition: types.h:280
virtual bool OnOverwrite(PCFFILE File, char *FileName)
Definition: main.cxx:591
bool CreateCabinet()
Definition: main.cxx:408
virtual ~CCABManager()
Definition: main.cxx:180
unsigned int ULONG
Definition: retypes.h:1
bool Verbose
Definition: cabman.h:44
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