• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

xap_CocoaModule.h

Go to the documentation of this file.
00001 /* -*- mode: C++; tab-width: 4; c-basic-offset: 4; -*- */
00002 
00003 /* AbiSource Application Framework
00004  * Copyright (C) 1998 AbiSource, Inc.
00005  * Copyright (C) 2001 Hubert Figuiere
00006  * Copyright (C) 2004 Francis James Franklin
00007  *
00008  * This program is free software; you can redistribute it and/or
00009  * modify it under the terms of the GNU General Public License
00010  * as published by the Free Software Foundation; either version 2
00011  * of the License, or (at your option) any later version.
00012  *
00013  * This program is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016  * GNU General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU General Public License
00019  * along with this program; if not, write to the Free Software
00020  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00021  * 02110-1301 USA.
00022  */
00023 
00024 #ifndef XAP_COCOAMODULE_H
00025 #define XAP_COCOAMODULE_H
00026 
00027 #include <string>
00028 #include "xap_Module.h"
00029 
00030 class XAP_CocoaModule : public XAP_Module
00031 {
00032 
00033     friend class XAP_ModuleManager;
00034 
00035 protected:
00036 
00037     XAP_CocoaModule () ;
00038 
00039     virtual ~XAP_CocoaModule (void);
00040 
00041     virtual bool    load (const char * name);
00042     virtual bool    unload (void);
00043 
00044 public:
00045     virtual bool    resolveSymbol (const char * symbol_name, void ** symbol);
00046     virtual bool    getModuleName (char ** dest) const;
00047     virtual bool    getErrorMsg (char ** dest) const;
00048 
00049     static void     loadAllPlugins (); // called on start-up, and *only* then
00050 
00051     /* used by CocoaAppController to auto-load plugins selected through the Finder
00052      */
00053     static bool     loadPlugin (const std::string & path);
00054     static bool     hasPluginExtension (const std::string & path);
00055 
00056 private:
00057     std::string     m_szname;
00058     std::string     m_module_path;
00059 
00060     void *          m_module;
00061 
00062     bool            m_bLoaded;
00063 };
00064 
00065 #endif /* XAP_COCOAMODULE_H */

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1