libpurple/protocols/myspace/myspace.c

branch
soc.2013.gobjectification.plugins
changeset 36714
ec178f7d66da
parent 36701
5acd461707ae
child 36729
7f9fac14ed60
equal deleted inserted replaced
36713:8959b4ffee99 36714:ec178f7d66da
3459 iface->send_attention = msim_send_attention; 3459 iface->send_attention = msim_send_attention;
3460 iface->get_attention_types = msim_attention_types; 3460 iface->get_attention_types = msim_attention_types;
3461 iface->get_account_text_table = msim_get_account_text_table; 3461 iface->get_account_text_table = msim_get_account_text_table;
3462 } 3462 }
3463 3463
3464 PURPLE_DEFINE_TYPE_EXTENDED(
3465 MsimProtocol, msim_protocol, PURPLE_TYPE_PROTOCOL, 0,
3466 PURPLE_IMPLEMENT_INTERFACE_STATIC(PURPLE_TYPE_PROTOCOL_INTERFACE,
3467 msim_protocol_interface_init)
3468 );
3469
3464 /** 3470 /**
3465 * Query the plugin 3471 * Query the plugin
3466 */ 3472 */
3467 static PurplePluginInfo * 3473 static PurplePluginInfo *
3468 plugin_query(GError **error) 3474 plugin_query(GError **error)
3492 * Load the plugin. 3498 * Load the plugin.
3493 */ 3499 */
3494 static gboolean 3500 static gboolean
3495 plugin_load(PurplePlugin *plugin, GError **error) 3501 plugin_load(PurplePlugin *plugin, GError **error)
3496 { 3502 {
3503 msim_protocol_register_type(plugin);
3504
3497 #ifdef MSIM_SELF_TEST 3505 #ifdef MSIM_SELF_TEST
3498 msim_test_all(); 3506 msim_test_all();
3499 g_set_error(error, MSIM_DOMAIN, 0, _("Finished MySpaceIM self test")); 3507 g_set_error(error, MSIM_DOMAIN, 0, _("Finished MySpaceIM self test"));
3500 return FALSE; 3508 return FALSE;
3501 #endif /* MSIM_SELF_TEST */ 3509 #endif /* MSIM_SELF_TEST */
3520 return FALSE; 3528 return FALSE;
3521 3529
3522 return TRUE; 3530 return TRUE;
3523 } 3531 }
3524 3532
3525 static PurplePlugin *my_plugin; 3533 PURPLE_PLUGIN_INIT(myspace, plugin_query, plugin_load, plugin_unload);
3526 PURPLE_PROTOCOL_DEFINE(my_plugin, MsimProtocol, msim_protocol);
3527 PURPLE_PLUGIN_INIT_VAL(my_plugin, myspace, plugin_query, plugin_load,
3528 plugin_unload);

mercurial