| 2958 |
2958 |
| 2959 |
2959 |
| 2960 static gboolean |
2960 static gboolean |
| 2961 plugin_load(PurplePlugin *plugin, GError **error) |
2961 plugin_load(PurplePlugin *plugin, GError **error) |
| 2962 { |
2962 { |
| 2963 my_protocol = purple_protocols_add(ZEPHYR_TYPE_PROTOCOL); |
2963 my_protocol = purple_protocols_add(ZEPHYR_TYPE_PROTOCOL, error); |
| 2964 |
2964 if (!my_protocol) |
| 2965 if (!my_protocol) { |
|
| 2966 g_set_error(error, ZEPHYR_DOMAIN, 0, _("Failed to add zephyr protocol")); |
|
| 2967 return FALSE; |
2965 return FALSE; |
| 2968 } |
|
| 2969 |
2966 |
| 2970 return TRUE; |
2967 return TRUE; |
| 2971 } |
2968 } |
| 2972 |
2969 |
| 2973 |
2970 |
| 2974 static gboolean |
2971 static gboolean |
| 2975 plugin_unload(PurplePlugin *plugin, GError **error) |
2972 plugin_unload(PurplePlugin *plugin, GError **error) |
| 2976 { |
2973 { |
| 2977 if (!purple_protocols_remove(my_protocol)) { |
2974 if (!purple_protocols_remove(my_protocol, error)) |
| 2978 g_set_error(error, ZEPHYR_DOMAIN, 0, _("Failed to remove zephyr protocol")); |
|
| 2979 return FALSE; |
2975 return FALSE; |
| 2980 } |
|
| 2981 |
2976 |
| 2982 return TRUE; |
2977 return TRUE; |
| 2983 } |
2978 } |
| 2984 |
2979 |
| 2985 static PurplePlugin *my_plugin; |
2980 static PurplePlugin *my_plugin; |