--- a/libpurple/media/backend-iface.c Tue Aug 06 04:51:53 2019 +0000
+++ b/libpurple/media/backend-iface.c Tue Aug 06 17:40:37 2019 -0400
@@ -101,7 +101,7 @@
static GType iface_type = 0;
static const GTypeInfo info = {
- sizeof(PurpleMediaBackendIface),
+ sizeof(PurpleMediaBackendInterface), purple_media_backend_base_init,
@@ -195,7 +195,7 @@
const gchar *sess_id, const gchar *cipher,
const gchar *auth, const gchar *key, gsize key_len)
- PurpleMediaBackendIface *backend_iface;
+ PurpleMediaBackendInterface *backend_iface; g_return_val_if_fail(PURPLE_IS_MEDIA_BACKEND(self), FALSE);
backend_iface = PURPLE_MEDIA_BACKEND_GET_INTERFACE(self);
@@ -210,7 +210,7 @@
const gchar *cipher, const gchar *auth,
const gchar *key, gsize key_len)
- PurpleMediaBackendIface *backend_iface;
+ PurpleMediaBackendInterface *backend_iface; g_return_val_if_fail(PURPLE_IS_MEDIA_BACKEND(self), FALSE);
backend_iface = PURPLE_MEDIA_BACKEND_GET_INTERFACE(self);
@@ -240,7 +240,7 @@
purple_media_backend_set_send_rtcp_mux(PurpleMediaBackend *self,
const gchar *sess_id, const gchar *participant, gboolean send_rtcp_mux)
- PurpleMediaBackendIface *backend_iface;
+ PurpleMediaBackendInterface *backend_iface; g_return_val_if_fail(PURPLE_IS_MEDIA_BACKEND(self), FALSE);
backend_iface = PURPLE_MEDIA_BACKEND_GET_INTERFACE(self);
--- a/libpurple/protocol.c Tue Aug 06 04:51:53 2019 +0000
+++ b/libpurple/protocol.c Tue Aug 06 17:40:37 2019 -0400
@@ -255,13 +255,13 @@
* Protocol Client Interface API
**************************************************************************/
#define DEFINE_PROTOCOL_FUNC(protocol,funcname,...) \
- PurpleProtocolClientIface *client_iface = \
+ PurpleProtocolClientInterface *client_iface = \ PURPLE_PROTOCOL_GET_CLIENT_IFACE(protocol); \
if (client_iface && client_iface->funcname) \
client_iface->funcname(__VA_ARGS__);
#define DEFINE_PROTOCOL_FUNC_WITH_RETURN(protocol,defaultreturn,funcname,...) \
- PurpleProtocolClientIface *client_iface = \
+ PurpleProtocolClientInterface *client_iface = \ PURPLE_PROTOCOL_GET_CLIENT_IFACE(protocol); \
if (client_iface && client_iface->funcname) \
return client_iface->funcname(__VA_ARGS__); \
@@ -275,11 +275,11 @@
if (G_UNLIKELY(type == 0)) {
static const GTypeInfo info = {
- .class_size = sizeof(PurpleProtocolClientIface),
+ .class_size = sizeof(PurpleProtocolClientInterface), type = g_type_register_static(G_TYPE_INTERFACE,
- "PurpleProtocolClientIface", &info, 0);
+ "PurpleProtocolClientInterface", &info, 0); @@ -384,13 +384,13 @@
* Protocol Server Interface API
**************************************************************************/
#define DEFINE_PROTOCOL_FUNC(protocol,funcname,...) \
- PurpleProtocolServerIface *server_iface = \
+ PurpleProtocolServerInterface *server_iface = \ PURPLE_PROTOCOL_GET_SERVER_IFACE(protocol); \
if (server_iface && server_iface->funcname) \
server_iface->funcname(__VA_ARGS__);
#define DEFINE_PROTOCOL_FUNC_WITH_RETURN(protocol,defaultreturn,funcname,...) \
- PurpleProtocolServerIface *server_iface = \
+ PurpleProtocolServerInterface *server_iface = \ PURPLE_PROTOCOL_GET_SERVER_IFACE(protocol); \
if (server_iface && server_iface->funcname) \
return server_iface->funcname(__VA_ARGS__); \
@@ -404,11 +404,11 @@
if (G_UNLIKELY(type == 0)) {
static const GTypeInfo info = {
- .class_size = sizeof(PurpleProtocolServerIface),
+ .class_size = sizeof(PurpleProtocolServerInterface), type = g_type_register_static(G_TYPE_INTERFACE,
- "PurpleProtocolServerIface", &info, 0);
+ "PurpleProtocolServerInterface", &info, 0); @@ -577,13 +577,13 @@
* Protocol IM Interface API
**************************************************************************/
#define DEFINE_PROTOCOL_FUNC(protocol,funcname,...) \
- PurpleProtocolIMIface *im_iface = \
+ PurpleProtocolIMInterface *im_iface = \ PURPLE_PROTOCOL_GET_IM_IFACE(protocol); \
if (im_iface && im_iface->funcname) \
im_iface->funcname(__VA_ARGS__);
#define DEFINE_PROTOCOL_FUNC_WITH_RETURN(protocol,defaultreturn,funcname,...) \
- PurpleProtocolIMIface *im_iface = \
+ PurpleProtocolIMInterface *im_iface = \ PURPLE_PROTOCOL_GET_IM_IFACE(protocol); \
if (im_iface && im_iface->funcname) \
return im_iface->funcname(__VA_ARGS__); \
@@ -597,11 +597,11 @@
if (G_UNLIKELY(type == 0)) {
static const GTypeInfo info = {
- .class_size = sizeof(PurpleProtocolIMIface),
+ .class_size = sizeof(PurpleProtocolIMInterface), type = g_type_register_static(G_TYPE_INTERFACE,
- "PurpleProtocolIMIface", &info, 0);
+ "PurpleProtocolIMInterface", &info, 0); @@ -627,13 +627,13 @@
* Protocol Chat Interface API
**************************************************************************/
#define DEFINE_PROTOCOL_FUNC(protocol,funcname,...) \
- PurpleProtocolChatIface *chat_iface = \
+ PurpleProtocolChatInterface *chat_iface = \ PURPLE_PROTOCOL_GET_CHAT_IFACE(protocol); \
if (chat_iface && chat_iface->funcname) \
chat_iface->funcname(__VA_ARGS__);
#define DEFINE_PROTOCOL_FUNC_WITH_RETURN(protocol,defaultreturn,funcname,...) \
- PurpleProtocolChatIface *chat_iface = \
+ PurpleProtocolChatInterface *chat_iface = \ PURPLE_PROTOCOL_GET_CHAT_IFACE(protocol); \
if (chat_iface && chat_iface->funcname) \
return chat_iface->funcname(__VA_ARGS__); \
@@ -647,11 +647,11 @@
if (G_UNLIKELY(type == 0)) {
static const GTypeInfo info = {
- .class_size = sizeof(PurpleProtocolChatIface),
+ .class_size = sizeof(PurpleProtocolChatInterface), type = g_type_register_static(G_TYPE_INTERFACE,
- "PurpleProtocolChatIface", &info, 0);
+ "PurpleProtocolChatInterface", &info, 0); @@ -734,13 +734,13 @@
* Protocol Privacy Interface API
**************************************************************************/
#define DEFINE_PROTOCOL_FUNC(protocol,funcname,...) \
- PurpleProtocolPrivacyIface *privacy_iface = \
+ PurpleProtocolPrivacyInterface *privacy_iface = \ PURPLE_PROTOCOL_GET_PRIVACY_IFACE(protocol); \
if (privacy_iface && privacy_iface->funcname) \
privacy_iface->funcname(__VA_ARGS__);
#define DEFINE_PROTOCOL_FUNC_WITH_RETURN(protocol,defaultreturn,funcname,...) \
- PurpleProtocolPrivacyIface *privacy_iface = \
+ PurpleProtocolPrivacyInterface *privacy_iface = \ PURPLE_PROTOCOL_GET_PRIVACY_IFACE(protocol); \
if (privacy_iface && privacy_iface->funcname) \
return privacy_iface->funcname(__VA_ARGS__); \
@@ -754,11 +754,11 @@
if (G_UNLIKELY(type == 0)) {
static const GTypeInfo info = {
- .class_size = sizeof(PurpleProtocolPrivacyIface),
+ .class_size = sizeof(PurpleProtocolPrivacyInterface), type = g_type_register_static(G_TYPE_INTERFACE,
- "PurpleProtocolPrivacyIface", &info, 0);
+ "PurpleProtocolPrivacyInterface", &info, 0); @@ -805,13 +805,13 @@
* Protocol Roomlist Interface API
**************************************************************************/
#define DEFINE_PROTOCOL_FUNC(protocol,funcname,...) \
- PurpleProtocolRoomlistIface *roomlist_iface = \
+ PurpleProtocolRoomlistInterface *roomlist_iface = \ PURPLE_PROTOCOL_GET_ROOMLIST_IFACE(protocol); \
if (roomlist_iface && roomlist_iface->funcname) \
roomlist_iface->funcname(__VA_ARGS__);
#define DEFINE_PROTOCOL_FUNC_WITH_RETURN(protocol,defaultreturn,funcname,...) \
- PurpleProtocolRoomlistIface *roomlist_iface = \
+ PurpleProtocolRoomlistInterface *roomlist_iface = \ PURPLE_PROTOCOL_GET_ROOMLIST_IFACE(protocol); \
if (roomlist_iface && roomlist_iface->funcname) \
return roomlist_iface->funcname(__VA_ARGS__); \
@@ -825,11 +825,11 @@
if (G_UNLIKELY(type == 0)) {
static const GTypeInfo info = {
- .class_size = sizeof(PurpleProtocolRoomlistIface),
+ .class_size = sizeof(PurpleProtocolRoomlistInterface), type = g_type_register_static(G_TYPE_INTERFACE,
- "PurpleProtocolRoomlistIface", &info, 0);
+ "PurpleProtocolRoomlistInterface", &info, 0); @@ -869,13 +869,13 @@
* Protocol Media Interface API
**************************************************************************/
#define DEFINE_PROTOCOL_FUNC(protocol,funcname,...) \
- PurpleProtocolMediaIface *media_iface = \
+ PurpleProtocolMediaInterface *media_iface = \ PURPLE_PROTOCOL_GET_MEDIA_IFACE(protocol); \
if (media_iface && media_iface->funcname) \
media_iface->funcname(__VA_ARGS__);
#define DEFINE_PROTOCOL_FUNC_WITH_RETURN(protocol,defaultreturn,funcname,...) \
- PurpleProtocolMediaIface *media_iface = \
+ PurpleProtocolMediaInterface *media_iface = \ PURPLE_PROTOCOL_GET_MEDIA_IFACE(protocol); \
if (media_iface && media_iface->funcname) \
return media_iface->funcname(__VA_ARGS__); \
@@ -889,11 +889,11 @@
if (G_UNLIKELY(type == 0)) {
static const GTypeInfo info = {
- .class_size = sizeof(PurpleProtocolMediaIface),
+ .class_size = sizeof(PurpleProtocolMediaInterface), type = g_type_register_static(G_TYPE_INTERFACE,
- "PurpleProtocolMediaIface", &info, 0);
+ "PurpleProtocolMediaInterface", &info, 0); @@ -927,13 +927,13 @@
* Protocol Factory Interface API
**************************************************************************/
#define DEFINE_PROTOCOL_FUNC(protocol,funcname,...) \
- PurpleProtocolFactoryIface *factory_iface = \
+ PurpleProtocolFactoryInterface *factory_iface = \ PURPLE_PROTOCOL_GET_FACTORY_IFACE(protocol); \
if (factory_iface && factory_iface->funcname) \
factory_iface->funcname(__VA_ARGS__);
#define DEFINE_PROTOCOL_FUNC_WITH_RETURN(protocol,defaultreturn,funcname,...) \
- PurpleProtocolFactoryIface *factory_iface = \
+ PurpleProtocolFactoryInterface *factory_iface = \ PURPLE_PROTOCOL_GET_FACTORY_IFACE(protocol); \
if (factory_iface && factory_iface->funcname) \
return factory_iface->funcname(__VA_ARGS__); \
@@ -947,11 +947,11 @@
if (G_UNLIKELY(type == 0)) {
static const GTypeInfo info = {
- .class_size = sizeof(PurpleProtocolFactoryIface),
+ .class_size = sizeof(PurpleProtocolFactoryInterface), type = g_type_register_static(G_TYPE_INTERFACE,
- "PurpleProtocolFactoryIface", &info, 0);
+ "PurpleProtocolFactoryInterface", &info, 0); --- a/libpurple/protocol.h Tue Aug 06 04:51:53 2019 +0000
+++ b/libpurple/protocol.h Tue Aug 06 17:40:37 2019 -0400
@@ -145,10 +145,10 @@
#define PURPLE_TYPE_PROTOCOL_CLIENT_IFACE (purple_protocol_client_iface_get_type())
-typedef struct _PurpleProtocolClientIface PurpleProtocolClientIface;
+typedef struct _PurpleProtocolClientInterface PurpleProtocolClientInterface; - * PurpleProtocolClientIface:
+ * PurpleProtocolClientInterface: * @get_actions: Returns the actions the protocol can perform. These will
* show up in the Accounts menu, under a submenu with the name
@@ -209,7 +209,7 @@
* This interface provides a gateway between purple and the protocol.
-struct _PurpleProtocolClientIface
+struct _PurpleProtocolClientInterface GTypeInterface parent_iface;
@@ -245,14 +245,14 @@
#define PURPLE_PROTOCOL_HAS_CLIENT_IFACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), PURPLE_TYPE_PROTOCOL_CLIENT_IFACE))
#define PURPLE_PROTOCOL_GET_CLIENT_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE((obj), PURPLE_TYPE_PROTOCOL_CLIENT_IFACE, \
- PurpleProtocolClientIface))
+ PurpleProtocolClientInterface)) #define PURPLE_TYPE_PROTOCOL_SERVER_IFACE (purple_protocol_server_iface_get_type())
-typedef struct _PurpleProtocolServerIface PurpleProtocolServerIface;
+typedef struct _PurpleProtocolServerInterface PurpleProtocolServerInterface; - * PurpleProtocolServerIface:
+ * PurpleProtocolServerInterface: * @register_user: New user registration
* @unregister_user: Remove the user from the server. The account can either be
* connected or disconnected. After the removal is finished,
@@ -320,7 +320,7 @@
* This interface provides a gateway between purple and the protocol's server.
-struct _PurpleProtocolServerIface
+struct _PurpleProtocolServerInterface GTypeInterface parent_iface;
@@ -383,14 +383,14 @@
#define PURPLE_PROTOCOL_HAS_SERVER_IFACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), PURPLE_TYPE_PROTOCOL_SERVER_IFACE))
#define PURPLE_PROTOCOL_GET_SERVER_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE((obj), PURPLE_TYPE_PROTOCOL_SERVER_IFACE, \
- PurpleProtocolServerIface))
+ PurpleProtocolServerInterface)) #define PURPLE_TYPE_PROTOCOL_IM_IFACE (purple_protocol_im_iface_get_type())
-typedef struct _PurpleProtocolIMIface PurpleProtocolIMIface;
+typedef struct _PurpleProtocolIMInterface PurpleProtocolIMInterface; - * PurpleProtocolIMIface:
+ * PurpleProtocolIMInterface: * @send: This protocol function should return a positive value on
* success. If the message is too big to be sent, return
* <literal>-E2BIG</literal>. If the account is not connected,
@@ -409,7 +409,7 @@
* This interface provides callbacks needed by protocols that implement IMs.
-struct _PurpleProtocolIMIface
+struct _PurpleProtocolIMInterface GTypeInterface parent_iface;
@@ -423,14 +423,14 @@
#define PURPLE_PROTOCOL_HAS_IM_IFACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), PURPLE_TYPE_PROTOCOL_IM_IFACE))
#define PURPLE_PROTOCOL_GET_IM_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE((obj), PURPLE_TYPE_PROTOCOL_IM_IFACE, \
- PurpleProtocolIMIface))
+ PurpleProtocolIMInterface)) #define PURPLE_TYPE_PROTOCOL_CHAT_IFACE (purple_protocol_chat_iface_get_type())
-typedef struct _PurpleProtocolChatIface PurpleProtocolChatIface;
+typedef struct _PurpleProtocolChatInterface PurpleProtocolChatInterface; - * PurpleProtocolChatIface:
+ * PurpleProtocolChatInterface: * @info: Returns a list of #PurpleProtocolChatEntry structs, which represent
* information required by the protocol to join a chat. libpurple will
* call join_chat along with the information filled by the user.
@@ -492,7 +492,7 @@
* This interface provides callbacks needed by protocols that implement chats.
-struct _PurpleProtocolChatIface
+struct _PurpleProtocolChatInterface GTypeInterface parent_iface;
@@ -522,14 +522,14 @@
#define PURPLE_PROTOCOL_HAS_CHAT_IFACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), PURPLE_TYPE_PROTOCOL_CHAT_IFACE))
#define PURPLE_PROTOCOL_GET_CHAT_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE((obj), PURPLE_TYPE_PROTOCOL_CHAT_IFACE, \
- PurpleProtocolChatIface))
+ PurpleProtocolChatInterface)) #define PURPLE_TYPE_PROTOCOL_PRIVACY_IFACE (purple_protocol_privacy_iface_get_type())
-typedef struct _PurpleProtocolPrivacyIface PurpleProtocolPrivacyIface;
+typedef struct _PurpleProtocolPrivacyInterface PurpleProtocolPrivacyInterface; - * PurpleProtocolPrivacyIface:
+ * PurpleProtocolPrivacyInterface: * @add_permit: Add the buddy on the required authorized list.
* @add_deny: Add the buddy on the required blocked list.
* @rem_permit: Remove the buddy from the requried authorized list.
@@ -540,7 +540,7 @@
* This interface provides privacy callbacks such as to permit/deny users.
-struct _PurpleProtocolPrivacyIface
+struct _PurpleProtocolPrivacyInterface GTypeInterface parent_iface;
@@ -559,20 +559,20 @@
#define PURPLE_PROTOCOL_HAS_PRIVACY_IFACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), PURPLE_TYPE_PROTOCOL_PRIVACY_IFACE))
#define PURPLE_PROTOCOL_GET_PRIVACY_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE((obj), PURPLE_TYPE_PROTOCOL_PRIVACY_IFACE, \
- PurpleProtocolPrivacyIface))
+ PurpleProtocolPrivacyInterface)) #define PURPLE_TYPE_PROTOCOL_ROOMLIST_IFACE (purple_protocol_roomlist_iface_get_type())
-typedef struct _PurpleProtocolRoomlistIface PurpleProtocolRoomlistIface;
+typedef struct _PurpleProtocolRoomlistInterface PurpleProtocolRoomlistInterface; - * PurpleProtocolRoomlistIface:
+ * PurpleProtocolRoomlistInterface: * The protocol roomlist interface.
* This interface provides callbacks for room listing.
-struct _PurpleProtocolRoomlistIface
+struct _PurpleProtocolRoomlistInterface GTypeInterface parent_iface;
@@ -591,14 +591,14 @@
#define PURPLE_PROTOCOL_HAS_ROOMLIST_IFACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), PURPLE_TYPE_PROTOCOL_ROOMLIST_IFACE))
#define PURPLE_PROTOCOL_GET_ROOMLIST_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE((obj), PURPLE_TYPE_PROTOCOL_ROOMLIST_IFACE, \
- PurpleProtocolRoomlistIface))
+ PurpleProtocolRoomlistInterface)) #define PURPLE_TYPE_PROTOCOL_MEDIA_IFACE (purple_protocol_media_iface_get_type())
-typedef struct _PurpleProtocolMediaIface PurpleProtocolMediaIface;
+typedef struct _PurpleProtocolMediaInterface PurpleProtocolMediaInterface; - * PurpleProtocolMediaIface:
+ * PurpleProtocolMediaInterface: * @initiate_session: Initiate a media session with the given contact.
* <sbr/>@account: The account to initiate the media session
@@ -620,7 +620,7 @@
* This interface provides callbacks for media sessions on the protocol.
-struct _PurpleProtocolMediaIface
+struct _PurpleProtocolMediaInterface GTypeInterface parent_iface;
@@ -638,14 +638,14 @@
#define PURPLE_PROTOCOL_HAS_MEDIA_IFACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), PURPLE_TYPE_PROTOCOL_MEDIA_IFACE))
#define PURPLE_PROTOCOL_GET_MEDIA_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE((obj), PURPLE_TYPE_PROTOCOL_MEDIA_IFACE, \
- PurpleProtocolMediaIface))
+ PurpleProtocolMediaInterface)) #define PURPLE_TYPE_PROTOCOL_FACTORY_IFACE (purple_protocol_factory_iface_get_type())
-typedef struct _PurpleProtocolFactoryIface PurpleProtocolFactoryIface;
+typedef struct _PurpleProtocolFactoryInterface PurpleProtocolFactoryInterface; - * PurpleProtocolFactoryIface:
+ * PurpleProtocolFactoryInterface: * @connection_new: Creates a new protocol-specific connection object that
* inherits #PurpleConnection.
* @roomlist_new: Creates a new protocol-specific room list object that
@@ -660,7 +660,7 @@
* This interface provides callbacks for construction of protocol-specific
* subclasses of some purple objects.
-struct _PurpleProtocolFactoryIface
+struct _PurpleProtocolFactoryInterface GTypeInterface parent_iface;
@@ -678,7 +678,7 @@
#define PURPLE_PROTOCOL_HAS_FACTORY_IFACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), PURPLE_TYPE_PROTOCOL_FACTORY_IFACE))
#define PURPLE_PROTOCOL_GET_FACTORY_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE((obj), PURPLE_TYPE_PROTOCOL_FACTORY_IFACE, \
- PurpleProtocolFactoryIface))
+ PurpleProtocolFactoryInterface)) * PURPLE_PROTOCOL_IMPLEMENTS: