--- a/libpurple/purpleprotocolmanager.h Fri Nov 01 00:28:41 2024 -0500 +++ b/libpurple/purpleprotocolmanager.h Fri Nov 01 00:30:41 2024 -0500 @@ -56,7 +56,7 @@ * PurpleProtocolManager: * * #PurpleProtocolManager keeps track of all protocols and emits signals when - * protocols are registered and unregistered. + * protocols are added and removed. * * Since: 3.0 */ @@ -74,6 +74,22 @@ typedef void (*PurpleProtocolManagerForeachFunc)(PurpleProtocol *protocol, gpointer data); /** + * purple_protocol_manager_add: + * @manager: The #PurpleProtocolManager instance. + * @protocol: The #PurpleProtocol to add. + * @error: Return address for a #GError, or %NULL. + * + * Adds @protocol to @manager. + * + * Returns: %TRUE if @protocol was successfully added with @manager, %FALSE + * otherwise. + * + * Since: 3.0 + */ +PURPLE_AVAILABLE_IN_3_0 +gboolean purple_protocol_manager_add(PurpleProtocolManager *manager, PurpleProtocol *protocol, GError **error); + +/** * purple_protocol_manager_get_default: * * Gets the default #PurpleProtocolManager instance. @@ -97,8 +113,10 @@ * %FALSE otherwise. * * Since: 3.0 + * + * Deprecated: 3.0 */ -PURPLE_AVAILABLE_IN_3_0 +PURPLE_DEPRECATED_FOR(purple_protocol_manager_add) gboolean purple_protocol_manager_register(PurpleProtocolManager *manager, PurpleProtocol *protocol, GError **error); /** @@ -113,8 +131,10 @@ * %FALSE otherwise. * * Since: 3.0 + * + * Deprecated: 3.0 */ -PURPLE_AVAILABLE_IN_3_0 +PURPLE_DEPRECATED_FOR(purple_protocol_manager_remove) gboolean purple_protocol_manager_unregister(PurpleProtocolManager *manager, PurpleProtocol *protocol, GError **error); /** @@ -140,8 +160,10 @@ * Calls @func for each #PurpleProtocol that @manager knows about. * * Since: 3.0 + * + * Deprecated: 3.0 */ -PURPLE_AVAILABLE_IN_3_0 +PURPLE_DEPRECATED void purple_protocol_manager_foreach(PurpleProtocolManager *manager, PurpleProtocolManagerForeachFunc func, gpointer data); /** @@ -155,9 +177,27 @@ * containing all of the #PurpleProtocols registered with @manager. * * Since: 3.0 + * + * Deprecated: 3.0 + */ +PURPLE_DEPRECATED +GList *purple_protocol_manager_get_all(PurpleProtocolManager *manager); + +/** + * purple_protocol_manager_remove: + * @manager: The #PurpleProtocolManager instance. + * @protocol: The #PurpleProtocol to remove. + * @error: Return address for a #GError, or %NULL. + * + * Removes @protocol from @manager. + * + * Returns: %TRUE if @protocol was successfully removed from @manager, %FALSE + * otherwise. + * + * Since: 3.0 */ PURPLE_AVAILABLE_IN_3_0 -GList *purple_protocol_manager_get_all(PurpleProtocolManager *manager); +gboolean purple_protocol_manager_remove(PurpleProtocolManager *manager, PurpleProtocol *protocol, GError **error); G_END_DECLS