00001 /* 00002 * File: gedplugin.h - Interface for plugins 00003 * Project: GED - bitmap editor (ICP) 00004 * Author: Kamil Dudka, xdudka00 00005 * Team: xdudka00, xfilak01, xhefka00, xhradi08 00006 * Created: 2006-04-04 00007 */ 00008 00009 #ifndef GEDPLUGIN_H 00010 #define GEDPLUGIN_H 00011 00012 #include <string> 00013 #include <vector> 00014 00015 #include "framebuffer.h" 00016 00017 namespace GedPlugin { 00018 00025 typedef int (*PluginCorePtr) (FrameBuffer &fb, std::vector<std::string> argList); 00026 00030 enum PluginType { 00031 TYPE_VOID = 0, 00032 TYPE_FILEFORMAT, 00033 TYPE_FILTER 00034 }; 00035 00039 struct PluginDescription { 00040 PluginType type; 00041 std::string name; 00042 PluginCorePtr pCore; 00043 00044 PluginDescription(): type(TYPE_VOID), pCore(0) { } 00045 }; 00046 00050 class Plugin { 00051 public: 00057 Plugin (int argc, char *argv[]); 00058 ~Plugin (); 00059 00064 void set (const PluginDescription &desc); 00065 00071 int exec (); 00072 00073 private: 00074 std::vector<std::string> _args; 00075 PluginDescription _desc; 00076 }; 00077 } 00078 00079 #endif // GEDPLUGIN_H
1.5.2