00001 00027 #ifndef __EVENT_LOGGER_PLUGIN_H 00028 #define __EVENT_LOGGER_PLUGIN_H 00029 00030 #include <glib.h> 00031 #include <glib-object.h> 00032 #include <gmodule.h> 00033 00034 #include "rtcom-eventlogger/eventlogger-iter.h" 00035 00036 typedef struct _RTComElService RTComElService; 00037 typedef struct _RTComElEventType RTComElEventType; 00038 typedef struct _RTComElFlag RTComElFlag; 00039 00044 struct _RTComElService { 00045 guint id; 00046 gchar * name; 00047 guint plugin_id; 00048 gchar * desc; 00049 }; 00050 00055 struct _RTComElEventType { 00056 guint id; 00057 gchar * name; 00058 guint plugin_id; 00059 gchar * desc; 00060 }; 00061 00066 struct _RTComElFlag { 00067 guint id; 00068 guint service_id; 00069 gchar * name; 00070 guint value; 00071 gchar * desc; 00072 }; 00073 00074 typedef gboolean (*PluginInitFunc)(gpointer); /* Not mandatory */ 00075 typedef gchar * (*PluginNameFunc)(); 00076 typedef gchar * (*PluginDescFunc)(); 00077 typedef RTComElService * (*PluginServiceFunc)(); 00078 typedef GList * (*PluginEventTypesFunc)(); 00079 typedef GList * (*PluginFlagsFunc)(); /* Not mandatory */ 00080 typedef gboolean (*PluginGetValueFunc)( /* Not mandatory */ 00081 RTComElIter * it, 00082 const gchar *, 00083 GValue *); 00084 00085 typedef struct _RTComElPlugin RTComElPlugin; 00086 struct _RTComElPlugin { 00087 GModule * module; 00088 guint id; 00089 PluginInitFunc init; 00090 PluginNameFunc get_name; 00091 PluginDescFunc get_desc; 00092 PluginServiceFunc get_service; 00093 PluginEventTypesFunc get_event_types; 00094 PluginFlagsFunc get_flags; 00095 PluginGetValueFunc get_value; 00096 }; 00097 00106 RTComElService * rtcom_el_service_new( 00107 const gchar * name, 00108 const gchar * desc); 00109 00114 void rtcom_el_service_free( 00115 RTComElService * service); 00116 00125 RTComElEventType * rtcom_el_eventtype_new( 00126 const gchar * name, 00127 const gchar * desc); 00128 00133 void rtcom_el_eventtype_free( 00134 RTComElEventType * event_type); 00135 00145 RTComElFlag * rtcom_el_flag_new( 00146 const gchar * name, 00147 guint value, 00148 const gchar * desc); 00149 00154 void rtcom_el_flag_free( 00155 RTComElFlag * flag); 00156 00157 #endif 00158 00159 /* vim: set ai et tw=75 ts=4 sw=4: */ 00160