--- a/libpurple/attention.c Thu Jan 25 22:58:24 2018 -0600
+++ b/libpurple/attention.c Thu Feb 01 23:39:11 2018 -0600
@@ -42,8 +42,8 @@
purple_attention_type_new(const gchar *unlocalized_name,
- const gchar *incoming_description,
- const gchar *outgoing_description)
+ const gchar *incoming_description, + const gchar *outgoing_description) PurpleAttentionType *attn = g_new0(PurpleAttentionType, 1);
--- a/libpurple/attention.h Thu Jan 25 22:58:24 2018 -0600
+++ b/libpurple/attention.h Thu Feb 01 23:39:11 2018 -0600
@@ -145,7 +145,7 @@
* @type: The attention type.
* @desc: The localized description for incoming events.
- * Sets the description of the attention-demanding event shown in conversations
+ * Sets the description of the attention-demanding event shown in conversations * when the event is received.
void purple_attention_type_set_incoming_desc(PurpleAttentionType *type, const gchar *desc);
@@ -230,13 +230,24 @@
* @protocol: The #PurpleProtocol.
* @account: The #PurpleAccount whose attention types to get.
+ * Returns a list of #PurpleAttentionType's for @attn. + * Returns: (transfer container) (element-type PurpleAttentionType): The list of #PurpleAttentionType's. -GList *purple_protocol_attention_get_types(PurpleProtocolAttention *attn,
+GList *purple_protocol_attention_get_types(PurpleProtocolAttention *attn, PurpleAccount *acct); -gboolean purple_protocol_attention_send(PurpleProtocolAttention *attn,
- PurpleConnection *gc, const char *username, guint type);
+ * purple_protocol_attention_send: + * @attn: The #PurpleProtocolAttention instance. + * @gc: The #PurpleConnection to send on + * @username: The name of the user to send the attention to. + * @type: The type of attention to send. + * Sends an attention message of @type to @username. + * Returns: TRUE on success, FALSE otherwise. +gboolean purple_protocol_attention_send(PurpleProtocolAttention *attn, PurpleConnection *gc, const gchar *username, guint type); --- a/libpurple/tests/test_protocol_attention.c Thu Jan 25 22:58:24 2018 -0600
+++ b/libpurple/tests/test_protocol_attention.c Thu Feb 01 23:39:11 2018 -0600
@@ -117,7 +117,7 @@
types = purple_protocol_attention_get_types(PURPLE_PROTOCOL_ATTENTION(attn), a);
g_assert_true(g_list_length(types) == 1);
- // take the first item and cast it into type
+ /* take the first item and cast it into type */ type = (PurpleAttentionType *)(types->data);