OSDN Git Service

TPIHandleの各関数の返し値をboolにし、エラーコードをnErrorCodeに記録するよう変更。
[tpi/lychee.git] / src / common / handle / TPIHandle.h
1 /*******************************************************************************
2   TPI - flexible but useless plug-in framework.
3   Copyright (C) 2002-2009 Silky
4
5   This library is free software; you can redistribute it and/or modify it under
6   the terms of the GNU Lesser General Public License as published by the Free
7   Software Foundation; either version 2.1 of the License, or (at your option)
8   any later version.
9
10   This library is distributed in the hope that it will be useful, but WITHOUT
11   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
12   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
13   for more details.
14
15   You should have received a copy of the GNU Lesser General Public License along
16   with this library; if not, write to the Free Software Foundation, Inc.,
17   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
18
19   $Id: TPIHandle.h,v 1.2 2009/08/15 07:20:13 sirakaba Exp $
20 *******************************************************************************/
21
22 #ifndef H_LOADED_TPI_HANDLE
23 #define H_LOADED_TPI_HANDLE
24
25 #define wxUSE_DYNLIB_CLASS  1
26 #include <wx/dynlib.h>
27
28 //******************************************************************************
29 //    Class (TPIHandle)
30 //******************************************************************************
31
32 class TPIHandle
33 {
34         public:
35                 TPIHandle(void);
36                 ~TPIHandle(void);
37                 bool InitLibrary(const wxString &, const wxString &, wxULongLong);
38                 bool FreeLibrary(void);
39
40                 bool GetPluginInformation(unsigned int, wxULongLong, void *);
41                 bool GetFormatInformation(TPI_FORMATINFO *, bool);
42
43                 bool CheckArchive(const wxString &, int *);
44                 bool OpenArchive(const wxString &);
45                 bool CloseArchive(void);
46                 bool GetFileInformation(TPI_FILEINFO *, bool);
47                 bool GetArchiveInformation(TPI_ARCHIVEINFO *);
48
49                 bool Command(unsigned int, TPI_SWITCHES *, const wxString &, const wxArrayString &);
50
51                 bool SetCallbackProc(TPI_PROC);
52
53                 int nErrorCode;
54
55         private:
56                 wxDynamicLibrary lib;
57                 void * archive;
58 };
59
60 #endif