00001 /*************************************************************************** 00002 * Copyright (C) 2004-2005 by Andrew Krause * 00003 * * 00004 * This program is free software; you can redistribute it and/or modify * 00005 * it under the terms of the GNU General Public License as published by * 00006 * the Free Software Foundation; either version 2 of the License, or * 00007 * (at your option) any later version. * 00008 * * 00009 * This program is distributed in the hope that it will be useful, * 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00012 * GNU General Public License for more details. * 00013 * * 00014 * You should have received a copy of the GNU General Public License * 00015 * along with this program; if not, write to the * 00016 * Free Software Foundation, Inc., * 00017 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 00018 ***************************************************************************/ 00019 00020 #ifndef PLUGIN_H 00021 #define PLUGIN_H 00022 00023 #include <gtk/gtk.h> 00024 #include <iostream> 00025 #include <vector> 00026 using namespace std; 00027 00028 enum PluginState { PLUGIN_OK, PLUGIN_CRASH, PLUGIN_ENABLED, PLUGIN_DISABLED }; 00029 00030 typedef struct _OpenLDevPlugin OpenLDevPlugin; 00031 typedef struct _OpenLDevPluginList OpenLDevPluginList; 00032 00033 struct _OpenLDevPlugin 00034 { 00035 int plugin_id; 00036 gboolean enable; 00037 const char *file; 00038 const char *library; 00039 00040 const char *name; 00041 const char *author; 00042 const char *description; 00043 const char *copyright; 00044 00045 PluginState state; 00046 PluginState (*init) (gpointer); 00047 PluginState (*destroy) (gpointer); 00048 00049 GModule *module; 00050 }; 00051 00052 struct _OpenLDevPluginList 00053 { 00054 vector<OpenLDevPlugin*> plugins; 00055 int num_of_plugins; 00056 }; 00057 00058 #endif