comparison 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
comparison
equal deleted inserted replaced
5505:870207a49f2f 5506:4f72b611f0ee
30 /** 30 /**
31 * A message. 31 * A message.
32 */ 32 */
33 struct _MsnMessage 33 struct _MsnMessage
34 { 34 {
35 size_t ref_count; /**< The reference count. */
36
35 MsnUser *sender; 37 MsnUser *sender;
36 MsnUser *receiver; 38 MsnUser *receiver;
37 39
38 unsigned int tid; 40 unsigned int tid;
39 char flag; 41 char flag;
71 * Destroys a message. 73 * Destroys a message.
72 */ 74 */
73 void msn_message_destroy(MsnMessage *msg); 75 void msn_message_destroy(MsnMessage *msg);
74 76
75 /** 77 /**
78 * Increments the reference count on a message.
79 *
80 * @param msg The message.
81 *
82 * @return @a msg
83 */
84 MsnMessage *msn_message_ref(MsnMessage *msg);
85
86 /**
87 * Decrements the reference count on a message.
88 *
89 * This will destroy the structure if the count hits 0.
90 *
91 * @param msg The message.
92 *
93 * @return @a msg, or @c NULL if the new count is 0.
94 */
95 MsnMessage *msn_message_unref(MsnMessage *msg);
96
97 /**
76 * Converts a message to a string. 98 * Converts a message to a string.
77 * 99 *
78 * @param msg The message. 100 * @param msg The message.
79 * 101 *
80 * @return The string representation of a message. 102 * @return The string representation of a message.