| 76 #define PLUGIN_CATEGORY "Protocol" |
76 #define PLUGIN_CATEGORY "Protocol" |
| 77 #define PLUGIN_SUMMARY "Sametime Protocol Plugin" |
77 #define PLUGIN_SUMMARY "Sametime Protocol Plugin" |
| 78 #define PLUGIN_DESC "Open implementation of a Lotus Sametime client" |
78 #define PLUGIN_DESC "Open implementation of a Lotus Sametime client" |
| 79 #define PLUGIN_AUTHOR "Christopher (siege) O'Brien <siege@preoccupied.net>" |
79 #define PLUGIN_AUTHOR "Christopher (siege) O'Brien <siege@preoccupied.net>" |
| 80 #define PLUGIN_HOMEPAGE "http://meanwhile.sourceforge.net/" |
80 #define PLUGIN_HOMEPAGE "http://meanwhile.sourceforge.net/" |
| 81 |
|
| 82 #define PLUGIN_DOMAIN (g_quark_from_static_string(PLUGIN_ID)) |
|
| 83 |
81 |
| 84 |
82 |
| 85 /* plugin preference names */ |
83 /* plugin preference names */ |
| 86 #define MW_PROTOCOL_OPT_BASE "/plugins/prpl/meanwhile" |
84 #define MW_PROTOCOL_OPT_BASE "/plugins/prpl/meanwhile" |
| 87 #define MW_PROTOCOL_OPT_BLIST_ACTION MW_PROTOCOL_OPT_BASE "/blist_action" |
85 #define MW_PROTOCOL_OPT_BLIST_ACTION MW_PROTOCOL_OPT_BASE "/blist_action" |
| 5758 |
5756 |
| 5759 |
5757 |
| 5760 static gboolean |
5758 static gboolean |
| 5761 plugin_load(PurplePlugin *plugin, GError **error) |
5759 plugin_load(PurplePlugin *plugin, GError **error) |
| 5762 { |
5760 { |
| 5763 my_protocol = purple_protocols_add(MW_TYPE_PROTOCOL); |
5761 my_protocol = purple_protocols_add(MW_TYPE_PROTOCOL, error); |
| 5764 |
5762 if (!my_protocol) |
| 5765 if (!my_protocol) { |
|
| 5766 g_set_error(error, PLUGIN_DOMAIN, 0, _("Failed to add sametime protocol")); |
|
| 5767 return FALSE; |
5763 return FALSE; |
| 5768 } |
|
| 5769 |
5764 |
| 5770 return TRUE; |
5765 return TRUE; |
| 5771 } |
5766 } |
| 5772 |
5767 |
| 5773 |
5768 |
| 5774 static gboolean |
5769 static gboolean |
| 5775 plugin_unload(PurplePlugin *plugin, GError **error) |
5770 plugin_unload(PurplePlugin *plugin, GError **error) |
| 5776 { |
5771 { |
| 5777 if (!purple_protocols_remove(my_protocol)) { |
5772 if (!purple_protocols_remove(my_protocol, error)) |
| 5778 g_set_error(error, PLUGIN_DOMAIN, 0, _("Failed to remove sametime protocol")); |
|
| 5779 return FALSE; |
5773 return FALSE; |
| 5780 } |
|
| 5781 |
5774 |
| 5782 return TRUE; |
5775 return TRUE; |
| 5783 } |
5776 } |
| 5784 |
5777 |
| 5785 static PurplePlugin *my_plugin; |
5778 static PurplePlugin *my_plugin; |