home *** CD-ROM | disk | FTP | other *** search
- #ifndef _ARCHIVEDESCRIPTION_H_
- #define _ARCHIVEDESCRIPTION_H_
-
- #define TYPENAME_IDX 0
- #define EXTENSION_IDX 1
- #define ARCHIVER_IDX 2
- #define LISTCMD_IDX 3
- #define START_IDX 4
- #define END_IDX 5
- #define FORMAT_IDX 6
- #define EXTRACT_IDX 14
- #define EXTRACT_WITH_PATH_IDX 15
- #define TEST_IDX 16
- #define DELETE_IDX 17
- #define ADD_IDX 18
- #define MOVE_IDX 19
- #define INPUT_IDX 20
-
- #define STRINGS_COUNT 21
-
- class CArchiveDescription
- {
- int m_iIDPos;
- //int m_iListErrorlevel;
- BOOL m_bIgnoreErrors;
- LPBYTE m_lpID;
- int m_iIDSize;
- BOOL m_bDebug;
- BOOL m_bIDAtEnd;
- BOOL m_bUnixPath;
- BOOL m_bSkipEmpty;
- bool m_bSkipDirsInFileList;
- BOOL m_bBatchUnpack;
- BOOL m_bSearchForUglyDirs;
-
- LPSTR m_alpStrings[STRINGS_COUNT];
-
- void ReleaseContents();
- LPSTR GetString(char *szKeyName,int iStrIdx,char *szIniPath);
-
- public:
- int FormatHeight(){ return m_iFormatHeight; }
-
- CArchiveDescription();
- ~CArchiveDescription(){ ReleaseContents(); }
-
- int IDPos() const {return m_iIDPos;};
- // int ListErrorlevel() const {return m_iListErrorlevel;};
- BOOL IgnoreErrors() const {return m_bIgnoreErrors;}
- BOOL Debug()const {return m_bDebug;}
- int IDSize() const {return m_iIDSize;}
- LPBYTE GetID() const {return m_lpID;}
- BOOL IDAtEnd() const {return m_bIDAtEnd;}
- BOOL ConverFromUnixPath()const {return m_bUnixPath;}
- bool SkipDirsInFileList()const{return m_bSkipDirsInFileList;}
- BOOL SkipEmpty()const {return m_bSkipEmpty;}
- BOOL BatchUnpack();// {return m_bBatchUnpack;}
- BOOL SearchForUglyDirs() const {return m_bSearchForUglyDirs;}
-
- LPCSTR String(int idx) {return m_alpStrings[idx];}
- //void UserWarned(bool b){m_bUserWarned};
-
- BOOL Load(char *szSectionName,char *szIniFileName);
- void DebugOutput(LPCSTR szCommand, LPCSTR lpOutput,int errorlevel=0,LPCSTR lpCurDir=NULL);
-
- static int LoadArchiveDescriptions(CArchiveDescription **ppad, char *szIniName);
- static void ReleaseArchiveDescriptions(CArchiveDescription *pad, int iCount);
- private:
- bool m_bUserWarned;
- char m_szDebugOutputPath[MAX_PATH];
- int m_iFormatHeight;
- };
- #endif //_ARCHIVEDESCRIPTION_H_