pidgin/pidgin

Add boxes around FbApi types

2022-03-13, Elliott Sales de Andrade
6b5fe1c14970
Parents bcd5530b1462
Children 45a2de546565
Add boxes around FbApi types

Testing Done:
Compile only.

Reviewed at https://reviews.imfreedom.org/r/1340/
--- a/libpurple/protocols/facebook/api.c Sun Mar 13 21:59:39 2022 -0500
+++ b/libpurple/protocols/facebook/api.c Sun Mar 13 22:01:25 2022 -0500
@@ -3299,6 +3299,9 @@
}
}
+G_DEFINE_BOXED_TYPE(FbApiEvent, fb_api_event, fb_api_event_dup,
+ fb_api_event_free)
+
FbApiMessage *
fb_api_message_dup(const FbApiMessage *msg)
{
@@ -3335,6 +3338,9 @@
}
}
+G_DEFINE_BOXED_TYPE(FbApiMessage, fb_api_message, fb_api_message_dup,
+ fb_api_message_free)
+
FbApiPresence *
fb_api_presence_dup(const FbApiPresence *presence)
{
@@ -3356,6 +3362,9 @@
}
}
+G_DEFINE_BOXED_TYPE(FbApiPresence, fb_api_presence, fb_api_presence_dup,
+ fb_api_presence_free)
+
FbApiThread *
fb_api_thread_dup(const FbApiThread *thrd)
{
@@ -3395,6 +3404,9 @@
}
}
+G_DEFINE_BOXED_TYPE(FbApiThread, fb_api_thread, fb_api_thread_dup,
+ fb_api_thread_free)
+
FbApiTyping *
fb_api_typing_dup(const FbApiTyping *typg)
{
@@ -3416,6 +3428,9 @@
}
}
+G_DEFINE_BOXED_TYPE(FbApiTyping, fb_api_typing, fb_api_typing_dup,
+ fb_api_typing_free)
+
FbApiUser *
fb_api_user_dup(const FbApiUser *user)
{
@@ -3457,3 +3472,5 @@
g_free(user);
}
}
+
+G_DEFINE_BOXED_TYPE(FbApiUser, fb_api_user, fb_api_user_dup, fb_api_user_free)
--- a/libpurple/protocols/facebook/api.h Sun Mar 13 21:59:39 2022 -0500
+++ b/libpurple/protocols/facebook/api.h Sun Mar 13 22:01:25 2022 -0500
@@ -426,6 +426,8 @@
FB_API_MESSAGE_FLAG_SELF = 1 << 2
} FbApiMessageFlags;
+#define FB_TYPE_API_EVENT (fb_api_event_get_type())
+
/**
* FbApiEvent:
* @type: The #FbApiEventType.
@@ -443,6 +445,8 @@
gchar *text;
};
+#define FB_TYPE_API_MESSAGE (fb_api_message_get_type())
+
/**
* FbApiMessage:
* @flags: The #FbApiMessageFlags.
@@ -462,6 +466,8 @@
gchar *text;
};
+#define FB_TYPE_API_PRESENCE (fb_api_presence_get_type())
+
/**
* FbApiPresence:
* @uid: The user #FbId.
@@ -475,6 +481,8 @@
gboolean active;
};
+#define FB_TYPE_API_THREAD (fb_api_thread_get_type())
+
/**
* FbApiThread:
* @tid: The thread #FbId.
@@ -490,6 +498,8 @@
GSList *users;
};
+#define FB_TYPE_API_TYPING (fb_api_typing_get_type())
+
/**
* FbApiTyping:
* @uid: The user #FbId.
@@ -503,6 +513,8 @@
gboolean state;
};
+#define FB_TYPE_API_USER (fb_api_user_get_type())
+
/**
* FbApiUser:
* @uid: The user #FbId.
@@ -762,6 +774,13 @@
fb_api_typing(FbApi *api, FbId uid, gboolean state);
/**
+ * fb_api_event_get_type:
+ *
+ * Returns: The #GType for the #FbApiEvent boxed structure.
+ */
+GType fb_api_event_get_type(void);
+
+/**
* fb_api_event_dup:
* @event: The #FbApiEvent or #NULL.
*
@@ -793,6 +812,13 @@
fb_api_event_free(FbApiEvent *event);
/**
+ * fb_api_message_get_type:
+ *
+ * Returns: The #GType for the #FbApiMessage boxed structure.
+ */
+GType fb_api_message_get_type(void);
+
+/**
* fb_api_message_dup:
* @msg: The #FbApiMessage or #NULL.
*
@@ -824,6 +850,13 @@
fb_api_message_free(FbApiMessage *msg);
/**
+ * fb_api_presence_get_type:
+ *
+ * Returns: The #GType for the #FbApiPresence boxed structure.
+ */
+GType fb_api_presence_get_type(void);
+
+/**
* fb_api_presence_dup:
* @presence: The #FbApiPresence or %NULL.
*
@@ -854,6 +887,13 @@
fb_api_presence_free(FbApiPresence *presence);
/**
+ * fb_api_thread_get_type:
+ *
+ * Returns: The #GType for the #FbApiThread boxed structure.
+ */
+GType fb_api_thread_get_type(void);
+
+/**
* fb_api_thread_dup:
* @thrd: The #FbApiThread or #NULL.
*
@@ -885,6 +925,13 @@
fb_api_thread_free(FbApiThread *thrd);
/**
+ * fb_api_typing_get_type:
+ *
+ * Returns: The #GType for the #FbApiTyping boxed structure.
+ */
+GType fb_api_typing_get_type(void);
+
+/**
* fb_api_typing_dup:
* @typg: The #FbApiTyping or #NULL.
*
@@ -915,6 +962,13 @@
fb_api_typing_free(FbApiTyping *typg);
/**
+ * fb_api_user_get_type:
+ *
+ * Returns: The #GType for the #FbApiUser boxed structure.
+ */
+GType fb_api_user_get_type(void);
+
+/**
* fb_api_user_dup:
* @user: The #FbApiUser or #NULL.
*