libpurple/protocols/null/nullprpl.c

changeset 40945
bbeb2e98ea5b
parent 40885
87f6241da196
child 40948
2c312f084d84
equal deleted inserted replaced
40944:6e95a22ee02f 40945:bbeb2e98ea5b
45 #include <time.h> 45 #include <time.h>
46 46
47 #include <glib.h> 47 #include <glib.h>
48 #include <glib/gi18n-lib.h> 48 #include <glib/gi18n-lib.h>
49 49
50 #include <gplugin.h>
51 #include <gplugin-native.h>
52
50 #include <purple.h> 53 #include <purple.h>
51 54
52 #include "nullprpl.h" 55 #include "nullprpl.h"
53 56
54 struct _NullProtocol { 57 struct _NullProtocol {
1221 "name", "Null - Testing Protocol", 1224 "name", "Null - Testing Protocol",
1222 "options", OPT_PROTO_NO_PASSWORD | OPT_PROTO_CHAT_TOPIC, 1225 "options", OPT_PROTO_NO_PASSWORD | OPT_PROTO_CHAT_TOPIC,
1223 NULL)); 1226 NULL));
1224 } 1227 }
1225 1228
1226 static PurplePluginInfo * 1229 static GPluginPluginInfo *
1227 plugin_query(GError **error) 1230 null_query(GError **error)
1228 { 1231 {
1229 return purple_plugin_info_new( 1232 return purple_plugin_info_new(
1230 "id", "prpl-null", 1233 "id", "prpl-null",
1231 "name", "Null Protocol", 1234 "name", "Null Protocol",
1232 "version", DISPLAY_VERSION, 1235 "version", DISPLAY_VERSION,
1243 NULL 1246 NULL
1244 ); 1247 );
1245 } 1248 }
1246 1249
1247 static gboolean 1250 static gboolean
1248 plugin_load(PurplePlugin *plugin, GError **error) 1251 null_load(GPluginPlugin *plugin, GError **error)
1249 { 1252 {
1250 PurpleProtocolManager *manager = purple_protocol_manager_get_default(); 1253 PurpleProtocolManager *manager = purple_protocol_manager_get_default();
1251 1254
1252 /* register the NULL_TYPE_PROTOCOL type in the type system. this function 1255 /* register the NULL_TYPE_PROTOCOL type in the type system. this function
1253 * is defined by G_DEFINE_DYNAMIC_TYPE_EXTENDED. */ 1256 * is defined by G_DEFINE_DYNAMIC_TYPE_EXTENDED. */
1271 1274
1272 return TRUE; 1275 return TRUE;
1273 } 1276 }
1274 1277
1275 static gboolean 1278 static gboolean
1276 plugin_unload(PurplePlugin *plugin, GError **error) 1279 null_unload(GPluginPlugin *plugin, GError **error)
1277 { 1280 {
1278 PurpleProtocolManager *manager = purple_protocol_manager_get_default(); 1281 PurpleProtocolManager *manager = purple_protocol_manager_get_default();
1279 1282
1280 purple_debug_info("nullprpl", "shutting down\n"); 1283 purple_debug_info("nullprpl", "shutting down\n");
1281 1284
1287 g_clear_object(&my_protocol); 1290 g_clear_object(&my_protocol);
1288 1291
1289 return TRUE; 1292 return TRUE;
1290 } 1293 }
1291 1294
1292 /* initialize the plugin */ 1295 GPLUGIN_NATIVE_PLUGIN_DECLARE(null);
1293 PURPLE_PLUGIN_INIT(null, plugin_query, plugin_load, plugin_unload);

mercurial