diff src/protocols/msn/msg.h @ 5506:4f72b611f0ee

[gaim-migrate @ 5905] A few changes here. - Messages now have reference counting. - There's a message queue API in servconn. This was needed for times when we have a message but need further information from a command before processing it, like initial e-mail notifications. - As a result of the two above, we now have initial e-mail notifications again! committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Sun, 25 May 2003 09:04:32 +0000
parents e2e53316a21d
children b7e113a59b51
line wrap: on
line diff
--- a/src/protocols/msn/msg.h	Sat May 24 19:15:58 2003 +0000
+++ b/src/protocols/msn/msg.h	Sun May 25 09:04:32 2003 +0000
@@ -32,6 +32,8 @@
  */
 struct _MsnMessage
 {
+	size_t ref_count;           /**< The reference count.       */
+
 	MsnUser *sender;
 	MsnUser *receiver;
 
@@ -73,6 +75,26 @@
 void msn_message_destroy(MsnMessage *msg);
 
 /**
+ * Increments the reference count on a message.
+ *
+ * @param msg The message.
+ *
+ * @return @a msg
+ */
+MsnMessage *msn_message_ref(MsnMessage *msg);
+
+/**
+ * Decrements the reference count on a message.
+ *
+ * This will destroy the structure if the count hits 0.
+ *
+ * @param msg The message.
+ *
+ * @return @a msg, or @c NULL if the new count is 0.
+ */
+MsnMessage *msn_message_unref(MsnMessage *msg);
+
+/**
  * Converts a message to a string.
  *
  * @param msg The message.