libpurple/protocols/null/nullprotocol.c

branch
soc.2013.gobjectification.plugins
changeset 36628
3d43ca8d69ee
parent 36613
0e96218aa13a
child 36637
9b0109ae118d
equal deleted inserted replaced
36627:a3b0d16f69ef 36628:3d43ca8d69ee
1187 } 1187 }
1188 1188
1189 static gboolean 1189 static gboolean
1190 plugin_load(PurplePlugin *plugin, GError **error) 1190 plugin_load(PurplePlugin *plugin, GError **error)
1191 { 1191 {
1192 my_protocol = purple_protocols_add(NULL_TYPE_PROTOCOL); 1192 my_protocol = purple_protocols_add(NULL_TYPE_PROTOCOL, error);
1193 1193 if (!my_protocol)
1194 if (!my_protocol) {
1195 g_set_error(error, NULL_DOMAIN, 0, _("Failed to add null protocol"));
1196 return FALSE; 1194 return FALSE;
1197 }
1198 1195
1199 return TRUE; 1196 return TRUE;
1200 } 1197 }
1201 1198
1202 static gboolean 1199 static gboolean
1203 plugin_unload(PurplePlugin *plugin, GError **error) 1200 plugin_unload(PurplePlugin *plugin, GError **error)
1204 { 1201 {
1205 if (!purple_protocols_remove(my_protocol)) { 1202 if (!purple_protocols_remove(my_protocol, error))
1206 g_set_error(error, NULL_DOMAIN, 0, _("Failed to remove null protocol"));
1207 return FALSE; 1203 return FALSE;
1208 }
1209 1204
1210 return TRUE; 1205 return TRUE;
1211 } 1206 }
1212 1207
1213 static PurplePlugin *my_plugin; 1208 static PurplePlugin *my_plugin;

mercurial