home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 June / Chip_2002-06_cd1.bin / zkuste / wincom / download / mltwcx.1.0.0.8-src.cab / mltwcx-src / ArchiveDescription.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-12-16  |  2.1 KB  |  73 lines

  1. #ifndef _ARCHIVEDESCRIPTION_H_
  2.     #define _ARCHIVEDESCRIPTION_H_
  3.  
  4. #define    TYPENAME_IDX        0
  5. #define EXTENSION_IDX        1
  6. #define ARCHIVER_IDX        2
  7. #define LISTCMD_IDX            3
  8. #define START_IDX            4
  9. #define END_IDX                5
  10. #define FORMAT_IDX            6
  11. #define EXTRACT_IDX            14
  12. #define EXTRACT_WITH_PATH_IDX            15
  13. #define TEST_IDX            16
  14. #define DELETE_IDX            17
  15. #define ADD_IDX                18
  16. #define MOVE_IDX            19
  17. #define INPUT_IDX            20
  18.  
  19. #define STRINGS_COUNT        21
  20.  
  21. class CArchiveDescription
  22. {
  23.     int        m_iIDPos;
  24.     //int        m_iListErrorlevel;
  25.     BOOL    m_bIgnoreErrors;
  26.     LPBYTE    m_lpID;
  27.     int        m_iIDSize;
  28.     BOOL    m_bDebug;
  29.     BOOL    m_bIDAtEnd;
  30.     BOOL    m_bUnixPath;
  31.     BOOL    m_bSkipEmpty;
  32.     bool    m_bSkipDirsInFileList;
  33.     BOOL    m_bBatchUnpack;
  34.      BOOL m_bSearchForUglyDirs;
  35.  
  36.     LPSTR    m_alpStrings[STRINGS_COUNT];
  37.  
  38.     void ReleaseContents();
  39.     LPSTR GetString(char *szKeyName,int iStrIdx,char *szIniPath);
  40.  
  41. public:
  42.     int FormatHeight(){    return m_iFormatHeight; }
  43.  
  44.     CArchiveDescription();
  45.     ~CArchiveDescription(){ ReleaseContents(); }
  46.  
  47.     int        IDPos() const {return m_iIDPos;};
  48. //    int        ListErrorlevel() const {return m_iListErrorlevel;};
  49.     BOOL    IgnoreErrors() const {return m_bIgnoreErrors;}
  50.     BOOL    Debug()const {return m_bDebug;}
  51.     int        IDSize() const {return m_iIDSize;}    
  52.     LPBYTE    GetID() const {return m_lpID;}
  53.     BOOL    IDAtEnd() const {return m_bIDAtEnd;}
  54.     BOOL    ConverFromUnixPath()const {return m_bUnixPath;}
  55.     bool    SkipDirsInFileList()const{return m_bSkipDirsInFileList;}
  56.     BOOL    SkipEmpty()const {return m_bSkipEmpty;}
  57.     BOOL    BatchUnpack();// {return m_bBatchUnpack;}
  58.   BOOL SearchForUglyDirs() const {return m_bSearchForUglyDirs;}
  59.  
  60.     LPCSTR    String(int idx) {return m_alpStrings[idx];}
  61.   //void UserWarned(bool b){m_bUserWarned};
  62.  
  63.     BOOL Load(char *szSectionName,char *szIniFileName);
  64.     void DebugOutput(LPCSTR szCommand, LPCSTR lpOutput,int errorlevel=0,LPCSTR lpCurDir=NULL);
  65.  
  66.     static int LoadArchiveDescriptions(CArchiveDescription **ppad, char *szIniName);
  67.     static void ReleaseArchiveDescriptions(CArchiveDescription *pad, int iCount);
  68. private:
  69.   bool m_bUserWarned;
  70.     char m_szDebugOutputPath[MAX_PATH];
  71.     int m_iFormatHeight;
  72. };
  73. #endif //_ARCHIVEDESCRIPTION_H_