Debian Codegraph @

src/af/xap/cocoa/xap_CocoaModule.h

raw
1 /* -*- mode: C++; tab-width: 4; c-basic-offset: 4; -*- */
2
3 /* AbiSource Application Framework
4 * Copyright (C) 1998 AbiSource, Inc.
5 * Copyright (C) 2001 Hubert Figuiere
6 * Copyright (C) 2004 Francis James Franklin
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21 * 02110-1301 USA.
22 */
23
24 #ifndef XAP_COCOAMODULE_H
25 #define XAP_COCOAMODULE_H
26
27 #include <string>
28 #include "xap_Module.h"
29
30 class XAP_CocoaModule : public XAP_Module
31 {
32
33 friend class XAP_ModuleManager;
34
35 protected:
36
37 XAP_CocoaModule () ;
38
39 virtual ~XAP_CocoaModule (void);
40
41 virtual bool load (const char * name);
42 virtual bool unload (void);
43
44 public:
45 virtual bool resolveSymbol (const char * symbol_name, void ** symbol);
46 virtual bool getModuleName (char ** dest) const;
47 virtual bool getErrorMsg (char ** dest) const;
48
49 static void loadAllPlugins (); // called on start-up, and *only* then
50
51 /* used by CocoaAppController to auto-load plugins selected through the Finder
52 */
53 static bool loadPlugin (const std::string & path);
54 static bool hasPluginExtension (const std::string & path);
55
56 private:
57 std::string m_szname;
58 std::string m_module_path;
59
60 void * m_module;
61
62 bool m_bLoaded;
63 };
64
65 #endif /* XAP_COCOAMODULE_H */