2003-08-24 10:36:07 +00:00
|
|
|
/*
|
|
|
|
* COPYRIGHT: See COPYING in the top level directory
|
|
|
|
* PROJECT: ReactOS cabinet manager
|
|
|
|
* FILE: tools/cabman/cabman.h
|
|
|
|
* PURPOSE: Cabinet manager header
|
|
|
|
*/
|
2010-02-26 11:43:19 +00:00
|
|
|
|
|
|
|
#pragma once
|
2003-08-24 10:36:07 +00:00
|
|
|
|
|
|
|
#include "cabinet.h"
|
|
|
|
#include "dfp.h"
|
|
|
|
|
|
|
|
/* Cabinet manager modes */
|
|
|
|
#define CM_MODE_CREATE 0
|
|
|
|
#define CM_MODE_DISPLAY 1
|
|
|
|
#define CM_MODE_EXTRACT 2
|
2003-09-01 15:43:25 +00:00
|
|
|
#define CM_MODE_CREATE_SIMPLE 3
|
2003-08-24 10:36:07 +00:00
|
|
|
|
|
|
|
/* Classes */
|
|
|
|
|
2015-01-07 19:26:49 +00:00
|
|
|
class CCABManager : public CDFParser
|
|
|
|
{
|
2003-08-24 10:36:07 +00:00
|
|
|
public:
|
2008-02-02 11:57:16 +00:00
|
|
|
CCABManager();
|
|
|
|
virtual ~CCABManager();
|
|
|
|
bool ParseCmdline(int argc, char* argv[]);
|
|
|
|
bool Run();
|
2013-09-29 14:48:37 +00:00
|
|
|
bool IsVerbose() { return Verbose; }
|
2003-08-24 10:36:07 +00:00
|
|
|
private:
|
2008-02-02 11:57:16 +00:00
|
|
|
void Usage();
|
|
|
|
bool CreateCabinet();
|
|
|
|
bool DisplayCabinet();
|
|
|
|
bool ExtractFromCabinet();
|
2020-08-30 13:31:04 +00:00
|
|
|
|
2008-02-02 11:57:16 +00:00
|
|
|
/* Event handlers */
|
2020-08-30 13:31:04 +00:00
|
|
|
virtual bool OnOverwrite(PCFFILE File, const char* FileName) override;
|
|
|
|
virtual void OnExtract(PCFFILE File, const char* FileName) override;
|
|
|
|
virtual void OnDiskChange(const char* CabinetName, const char* DiskLabel) override;
|
|
|
|
virtual void OnAdd(PCFFILE Entry, const char* FileName) override;
|
|
|
|
virtual void OnVerboseMessage(const char* Message) override;
|
|
|
|
|
2008-02-02 11:57:16 +00:00
|
|
|
/* Configuration */
|
|
|
|
bool ProcessAll;
|
|
|
|
ULONG Mode;
|
|
|
|
bool PromptOnOverwrite;
|
2012-02-16 17:21:10 +00:00
|
|
|
char FileName[PATH_MAX];
|
2013-09-29 14:48:37 +00:00
|
|
|
bool Verbose;
|
2003-08-24 10:36:07 +00:00
|
|
|
};
|
|
|
|
|
2013-09-29 14:48:37 +00:00
|
|
|
|
2003-08-24 10:36:07 +00:00
|
|
|
/* EOF */
|