ReactOS 0.4.15-dev-8191-gbc6c731
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
21class CCABManager : public CDFParser
22{
23public:
25 virtual ~CCABManager();
26 bool ParseCmdline(int argc, char* argv[]);
27 bool Run();
28 bool IsVerbose() { return Verbose; }
29private:
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 */
47 bool Verbose;
48};
49
50
51/* EOF */
static int argc
Definition: ServiceArgs.c:12
#define PATH_MAX
Definition: types.h:280
bool ProcessAll
Definition: cabman.h:43
void Usage()
Definition: cabman.cxx:188
bool Verbose
Definition: cabman.h:47
bool IsVerbose()
Definition: cabman.h:28
virtual ~CCABManager()
Definition: cabman.cxx:180
virtual void OnVerboseMessage(const char *Message) override
Definition: cabman.cxx:673
bool PromptOnOverwrite
Definition: cabman.h:45
virtual void OnExtract(PCFFILE File, const char *FileName) override
Definition: cabman.cxx:625
virtual bool OnOverwrite(PCFFILE File, const char *FileName) override
Definition: cabman.cxx:606
bool ExtractFromCabinet()
Definition: cabman.cxx:511
virtual void OnDiskChange(const char *CabinetName, const char *DiskLabel) override
Definition: cabman.cxx:642
bool Run()
Definition: cabman.cxx:573
bool ParseCmdline(int argc, char *argv[])
Definition: cabman.cxx:224
ULONG Mode
Definition: cabman.h:44
virtual void OnAdd(PCFFILE Entry, const char *FileName) override
Definition: cabman.cxx:658
bool CreateCabinet()
Definition: cabman.cxx:423
bool DisplayCabinet()
Definition: cabman.cxx:442
Definition: dfp.h:63
PCABINET_NAME DiskLabel
Definition: dfp.h:129
PCABINET_NAME CabinetName
Definition: dfp.h:122
Definition: File.h:16
static const WCHAR Message[]
Definition: register.c:74
#define argv
Definition: mplay32.c:18
base of all file and directory entries
Definition: entries.h:83
uint32_t ULONG
Definition: typedefs.h:59