libpurple/protocols/yahoo/libyahoojp.c

branch
soc.2013.gobjectification.plugins
changeset 36628
3d43ca8d69ee
parent 36613
0e96218aa13a
child 36637
9b0109ae118d
equal deleted inserted replaced
36627:a3b0d16f69ef 36628:3d43ca8d69ee
132 } 132 }
133 133
134 static gboolean 134 static gboolean
135 plugin_load(PurplePlugin *plugin, GError **error) 135 plugin_load(PurplePlugin *plugin, GError **error)
136 { 136 {
137 my_protocol = purple_protocols_add(YAHOOJP_TYPE_PROTOCOL); 137 my_protocol = purple_protocols_add(YAHOOJP_TYPE_PROTOCOL, error);
138 138 if (!my_protocol)
139 if (!my_protocol) {
140 g_set_error(error, YAHOOJP_DOMAIN, 0, _("Failed to add yahoojp protocol"));
141 return FALSE; 139 return FALSE;
142 }
143 140
144 yahoojp_register_commands(); 141 yahoojp_register_commands();
145 142
146 return TRUE; 143 return TRUE;
147 } 144 }
148 145
149 static gboolean 146 static gboolean
150 plugin_unload(PurplePlugin *plugin, GError **error) 147 plugin_unload(PurplePlugin *plugin, GError **error)
151 { 148 {
152 if (!purple_protocols_remove(my_protocol)) { 149 if (!purple_protocols_remove(my_protocol, error))
153 g_set_error(error, YAHOOJP_DOMAIN, 0, _("Failed to remove yahoojp protocol"));
154 return FALSE; 150 return FALSE;
155 }
156 151
157 return TRUE; 152 return TRUE;
158 } 153 }
159 154
160 static PurplePlugin *my_plugin; 155 static PurplePlugin *my_plugin;

mercurial