• メインページ
  • モジュール
  • データ構造
  • ファイル
  • ファイル一覧
  • グローバル

plugin.h

説明を見る。
00001 
00009 /*******************************************************************************
00010   TPI - flexible but useless plug-in framework.
00011   Copyright (C) 2002-2009 Silky
00012 
00013   This library is free software; you can redistribute it and/or modify it under
00014   the terms of the GNU Lesser General Public License as published by the Free
00015   Software Foundation; either version 2.1 of the License, or (at your option)
00016   any later version.
00017 
00018   This library is distributed in the hope that it will be useful, but WITHOUT
00019   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
00020   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
00021   for more details.
00022 
00023   You should have received a copy of the GNU Lesser General Public License along
00024   with this library; if not, write to the Free Software Foundation, Inc.,
00025   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00026 *******************************************************************************/
00027 
00031 #define wxUSE_UNICODE       1
00032 
00035 #include <wx/wx.h>
00036 #include <wx/filename.h>
00037 
00038 #ifndef __TPI_API_SPEC
00039 #define __TPI_API_SPEC
00040 
00041 #ifdef __GNUC__
00042 #define __stdcall __attribute__((__stdcall__))
00043 #endif
00044 
00045 // *****************************************************************************
00048 // *****************************************************************************
00049 
00061 #define TPI_ERROR_SUCCESS           1000
00062 #define TPI_ERROR_S_ENDOFDATA       TPI_ERROR_SUCCESS + 1 
00071 #define TPI_ERROR_UNDEFINED         2000
00072 #define TPI_ERROR_U_LOAD_LIBRARY    TPI_ERROR_UNDEFINED + 1 
00073 #define TPI_ERROR_U_USE_LIBRARY     TPI_ERROR_UNDEFINED + 2 
00074 #define TPI_ERROR_U_FREE_LIBRARY    TPI_ERROR_UNDEFINED + 3 
00083 #define TPI_ERROR_DEFINED           3000
00084 #define TPI_ERROR_D_PARAMETER       TPI_ERROR_DEFINED + 1   
00085 #define TPI_ERROR_D_UNSUPPORTED     TPI_ERROR_DEFINED + 2   
00086 #define TPI_ERROR_D_SKIPPED         TPI_ERROR_DEFINED + 3   
00087 #define TPI_ERROR_D_OUTOFMEMORY     TPI_ERROR_DEFINED + 4   
00088 #define TPI_ERROR_D_USEMEMORY       TPI_ERROR_DEFINED + 5   
00098 #define TPI_ERROR_T_IO_MISC         0                           
00099 #define TPI_ERROR_T_IO_ARCHIVE      TPI_ERROR_T_IO_MISC + 100   
00100 #define TPI_ERROR_T_IO_FILE         TPI_ERROR_T_IO_MISC + 200   
00101 #define TPI_ERROR_T_IO_WORKING      TPI_ERROR_T_IO_MISC + 300   
00102 #define TPI_ERROR_T_IO_DIRECTORY    TPI_ERROR_T_IO_MISC + 400   
00105 #define TPI_ERROR_IO_MISC           4000                    
00106 #define TPI_ERROR_IO_NOTFOUND       TPI_ERROR_IO_MISC + 1   
00107 #define TPI_ERROR_IO_ACCESS         TPI_ERROR_IO_MISC + 2   
00108 #define TPI_ERROR_IO_OPEN           TPI_ERROR_IO_MISC + 3   
00109 #define TPI_ERROR_IO_CLOSE          TPI_ERROR_IO_MISC + 4   
00110 #define TPI_ERROR_IO_READ           TPI_ERROR_IO_MISC + 5   
00111 #define TPI_ERROR_IO_WRITE          TPI_ERROR_IO_MISC + 6   
00112 #define TPI_ERROR_IO_GETINFO        TPI_ERROR_IO_MISC + 7   
00113 #define TPI_ERROR_IO_POINT          TPI_ERROR_IO_MISC + 8   
00114 #define TPI_ERROR_IO_COPY           TPI_ERROR_IO_MISC + 9   
00115 #define TPI_ERROR_IO_MOVE           TPI_ERROR_IO_MISC + 10  
00116 #define TPI_ERROR_IO_DELETE         TPI_ERROR_IO_MISC + 11  
00117 #define TPI_ERROR_IO_SETINFO        TPI_ERROR_IO_MISC + 12  
00119 #define TPI_ERROR_ARC_MISC          TPI_ERROR_IO_MISC + TPI_ERROR_T_IO_ARCHIVE + 20 
00120 #define TPI_ERROR_ARC_UNSUPPORTED   TPI_ERROR_ARC_MISC + 1 
00121 #define TPI_ERROR_ARC_ENCRYPTED     TPI_ERROR_ARC_MISC + 2 
00122 #define TPI_ERROR_ARC_DANGER        TPI_ERROR_ARC_MISC + 3 
00123 #define TPI_ERROR_ARC_BROKEN_MISC   TPI_ERROR_IO_MISC + TPI_ERROR_T_IO_ARCHIVE + 30 
00124 #define TPI_ERROR_ARC_BROKEN_SUM    TPI_ERROR_ARC_BROKEN_MISC + 1  
00125 #define TPI_ERROR_ARC_BROKEN_SIZE   TPI_ERROR_ARC_BROKEN_MISC + 2  
00126 #define TPI_ERROR_ARC_BROKEN_HEADER TPI_ERROR_ARC_BROKEN_MISC + 3  
00136 #define TPI_INFO_VERSION_MAJOR      0x0001  
00137 #define TPI_INFO_VERSION_MINOR      0x0002  
00138 #define TPI_INFO_VERSION_API        0x0003  
00146 #define TPI_COMMAND_CREATE          0x0001  
00147 #define TPI_COMMAND_ADD             0x0002  
00148 #define TPI_COMMAND_EXTRACT         0x0004  
00149 #define TPI_COMMAND_DELETE          0x0008  
00150 #define TPI_COMMAND_UPDATE          0x0010  
00151 #define TPI_COMMAND_TEST            0x0020  
00152 #define TPI_COMMAND_REPAIR          0x0040  
00153 #define TPI_COMMAND_MOVE            0x0080  
00154 #define TPI_COMMAND_SFX             0x0100  
00155 #define TPI_COMMAND_UNSFX           0x0200  
00166 #define TPI_NOTIFY_COMMON           0x0001
00167 #define TPI_NOTIFY_SETPARAM         0x0002  
00180 #define TPI_MESSAGE_STATUS          0x0001
00181 
00183 #define TPI_MESSAGE_ASK             0x0002
00184 
00186 #define TPI_MESSAGE_ERROR           0x1000
00187 #define TPI_MESSAGE_WARNING         0x1001  
00197 #define TPI_STATUS_OPENARCHIVE      0x0001  
00198 #define TPI_STATUS_CLOSEARCHIVE     0x0002  
00199 #define TPI_STATUS_SEEKFILE         0x0003  
00200 #define TPI_STATUS_BEGINPROCESS     0x0004  
00201 #define TPI_STATUS_INPROCESS        0x0005  
00202 #define TPI_STATUS_ENDPROCESS       0x0006  
00203 #define TPI_STATUS_TESTARCHIVE      0x0007  
00204 #define TPI_STATUS_COPYARCHIVE      0x0008  
00214 #define TPI_PARAM_PASSWORD          0x0001  
00215 #define TPI_PARAM_NEXTVOLUME        0x0002  
00216 #define TPI_PARAM_DEST              0x0003  
00225 #define TPI_CALLBACK_CONTINUE       TRUE    
00226 #define TPI_CALLBACK_CANCEL         0x1000  
00227 #define TPI_CALLBACK_SKIP           0x1001  
00228 #define TPI_CALLBACK_UNSUPPORTED    0x1002  
00237 #define TPI_ATTRIBUTE_READONLY          0x00000001 
00238 #define TPI_ATTRIBUTE_HIDDEN            0x00000002 
00239 #define TPI_ATTRIBUTE_SYSTEM            0x00000004 
00240 #define TPI_ATTRIBUTE_DIRECTORY         0x00000010 
00241 #define TPI_ATTRIBUTE_ARCHIVE           0x00000020 
00242 #define TPI_ATTRIBUTE_ENCRYPTED         0x00004000 
00244 
00245 
00246 // *****************************************************************************
00249 // *****************************************************************************
00250 
00251 #pragma pack(1)
00252 
00253 typedef struct _TPI_tagFORMATINFO
00254 {
00255     bool            fArchive;               
00256     bool            fComment;               
00257     bool            fCompressHeader;        
00258     bool            fEncryptKeyFile;        
00259     bool            fEncryptPassword;       
00260     bool            fEncryptHeader;         
00261     bool            fMMOptimize;            
00262     bool            fMultiVolume;           
00263     bool            fSFX;                   
00264     bool            fSolid;                 
00265     unsigned short  nCompressLevelMin;      
00266     unsigned short  nCompressLevelMax;      
00267     unsigned short  nRecoveryRecordMin;     
00268     unsigned short  nRecoveryRecordMax;     
00269     wxULongLong_t   nTypeId;                
00270     wxULongLong_t   eSupportedCommand;      
00271     wxString        szTypeName;             
00272     wxString        szSuffix;               
00273     wxString        szEngineName;           
00274     wxString        szTPIName;              
00275     void *          pCustomInfo;            
00276 }   TPI_FORMATINFO;
00277 
00279 typedef struct _TPI_tagFILEINFO
00280 {
00281     unsigned short  eDanger;                
00282     unsigned short  eOSType;                
00283     unsigned short  wCompressRatio;         
00286     unsigned long   dwAttribute;
00287     unsigned long   dwCRC32;                
00288     wxULongLong_t   nPackedSize;            
00289     wxULongLong_t   nUnpackedSize;          
00290     wxULongLong_t   nFileId;                
00291     wxDateTime      tmAccess;               
00292     wxDateTime      tmCreate;               
00293     wxDateTime      tmModified;             
00294     wxFileName      fnFileName;             
00295     wxString        szStoredName;           
00296     wxString        szMethod;               
00297     wxString        szComment;              
00298     void *          pCustomInfo;            
00299 }   TPI_FILEINFO;
00300 
00302 typedef struct _TPI_tagARCHIVEINFO
00303 {
00304     bool            fSFX;                   
00305     bool            fSolid;                 
00306     bool            fMMOptimize;            
00307     bool            fEncryptData;           
00308     bool            fEncryptHeader;         
00309     bool            fCompressHeader;        
00310     unsigned short  eOSType;                
00311     unsigned short  nCompressLevel;         
00312     unsigned short  nRecoveryRecord;        
00313     unsigned short  wCompressRatio;         
00314     wxULongLong_t   nFileSize;              
00315     wxULongLong_t   nPackedSize;            
00316     wxULongLong_t   nReadSize;              
00317     wxULongLong_t   nUnpackedSize;          
00318     wxULongLong_t   nSplitSize;             
00319     wxDateTime      tmAccess;               
00320     wxDateTime      tmCreate;               
00321     wxDateTime      tmModified;             
00322     wxFileName      fnArchive;              
00323     wxString        szComment;              
00324     TPI_FORMATINFO  fiInfo;                 
00325     void *          pCustomInfo;            
00326 }   TPI_ARCHIVEINFO;
00327 
00329 typedef struct _TPI_tagSWITCHES
00330 {
00331     bool            fStoreDirectoryPathes;  
00332     bool            fMakeSFX;               
00333     bool            fSolid;                 
00334     bool            fMMOptimize;            
00335     bool            fEncryptHeader;         
00336     bool            fCompressHeader;        
00337     unsigned short  nCompressLevel;         
00338     unsigned short  nRecoveryRecord;        
00339     wxULongLong_t   nArchiveType;           
00340     wxULongLong_t   nSplitSize;             
00341     wxFileName      fnDestinationDirectory; 
00342     wxString        szPassword;             
00343     wxString        szKeyFile;              
00344     wxString        szComment;              
00345     void *          pCustomSwitches;        
00346 }   TPI_SWITCHES;
00347 
00349 typedef struct _TPI_tagPROCESSINFO
00350 {
00353     unsigned int    eMessage;
00356     unsigned int    eStatus;
00357     TPI_FILEINFO    fiInfo;                 
00358     wxULongLong_t   nProcessedSize;         
00359     wxFileName      fnDestination;          
00360     wxString        szParam;                
00361     void *          pCustomInfo;            
00362 }   TPI_PROCESSINFO;
00363 
00365 
00366 // *****************************************************************************
00369 // *****************************************************************************
00370 
00378 typedef int(__stdcall * TPI_PROC)(unsigned int _eMsg, void * _pInfo);
00379 
00381 
00382 #pragma pack()
00383 
00384 // *****************************************************************************
00387 // *****************************************************************************
00388 
00389 #ifdef __cplusplus
00390 extern "C"
00391 {
00392 #endif
00393 
00401 int __stdcall GetPluginInformation
00402 (
00403     unsigned int _eInfoId,
00404     wxULongLong_t _nSubOption,
00405     void * _pPtr
00406 );
00407 
00414 int __stdcall GetFormatInformation
00415 (
00416     TPI_FORMATINFO * _fiInfo,
00417     bool _bFirst = false
00418 );
00419 
00425 int __stdcall LoadPlugin
00426 (
00427     const wxString & _szArcName,
00428     wxULongLong_t _nTypeId = 0
00429 );
00430 
00435 int __stdcall FreePlugin
00436 (
00437     void * _pReserved = NULL
00438 );
00439 
00446 int __stdcall OpenArchive
00447 (
00448     const wxString & _szArcName,
00449     void * * _hArchive,
00450     wxULongLong_t * _nFileCount = NULL
00451 );
00452 
00457 int __stdcall CloseArchive
00458 (
00459     void * _hArchive
00460 );
00461 
00468 int __stdcall GetFileInformation
00469 (
00470     void * _hArchive,
00471     TPI_FILEINFO * _fiInfo,
00472     bool _bFirst = false
00473 );
00474 
00480 int __stdcall GetArchiveInformation
00481 (
00482     void * _hArchive,
00483     TPI_ARCHIVEINFO * _aiInfo
00484 );
00485 
00494 int __stdcall Command
00495 (
00496     wxULongLong_t _eCommand,
00497     TPI_SWITCHES * _swInfo,
00498     const wxString & _szArcName,
00499     const wxArrayString & _szFiles
00500 );
00501 
00506 int __stdcall SetCallbackProc
00507 (
00508     TPI_PROC _prArcProc
00509 );
00510 
00511 #ifdef __cplusplus
00512 }
00513 #endif
00514 
00516 
00517 #endif /* __TPI_API_SPEC */

TPIに対してFri Oct 1 2010に生成されました。  doxygen 1.7.1