OSDN Git Service

a52910a77f9809f373f8349a2344073952ab55da
[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                 int GetPluginInformation(unsigned int, wxULongLong, void *);
37                 int GetFormatInformation(TPI_FORMATINFO *, bool);
38                 bool InitLibrary(const wxString &, const wxString &, wxULongLong);
39                 bool FreeLibrary(void);
40
41                 int CheckArchive(const wxString &, int *);
42                 int OpenArchive(const wxString &);
43                 int CloseArchive(void);
44                 int GetFileInformation(TPI_FILEINFO *, bool);
45                 int GetArchiveInformation(TPI_ARCHIVEINFO *);
46
47                 int Command(unsigned int, TPI_SWITCHES *, const wxString &, const wxArrayString &);
48
49                 int SetCallbackProc(TPI_PROC);
50         private:
51                 wxDynamicLibrary lib;
52                 void * archive;
53 };
54
55 #endif