Mercurial > pidgin
comparison src/protocols/msn/page.h @ 8646:1e211dde3cae
[gaim-migrate @ 9398]
Added a patch by shx to clean up the message-handling code and split the
command stuff from it, among a few other things. Also, I fixed a crash in
message parsing, which I think may close a couple bug reports.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Tue, 13 Apr 2004 04:08:22 +0000 |
parents | 06f57183e29f |
children | bbd8cdaf0ad5 |
comparison
equal
deleted
inserted
replaced
8645:47f647dd2ac3 | 8646:1e211dde3cae |
---|---|
30 /** | 30 /** |
31 * A page. | 31 * A page. |
32 */ | 32 */ |
33 struct _MsnPage | 33 struct _MsnPage |
34 { | 34 { |
35 MsnUser *sender; | |
36 MsnUser *receiver; | |
37 | |
38 char *from_location; | 35 char *from_location; |
39 char *from_phone; | 36 char *from_phone; |
40 | |
41 gboolean incoming; | |
42 | |
43 unsigned int trId; | |
44 | 37 |
45 size_t size; | 38 size_t size; |
46 | 39 |
47 char *body; | 40 char *body; |
48 }; | 41 }; |
53 * @return A new page. | 46 * @return A new page. |
54 */ | 47 */ |
55 MsnPage *msn_page_new(void); | 48 MsnPage *msn_page_new(void); |
56 | 49 |
57 /** | 50 /** |
58 * Creates a new page based off a string. | |
59 * | |
60 * @param session The MSN session. | |
61 * @param str The string. | |
62 * | |
63 * @return The new page. | |
64 */ | |
65 MsnPage *msn_page_new_from_str(MsnSession *session, const char *str); | |
66 | |
67 /** | |
68 * Destroys a page. | 51 * Destroys a page. |
69 */ | 52 */ |
70 void msn_page_destroy(MsnPage *page); | 53 void msn_page_destroy(MsnPage *page); |
71 | 54 |
72 /** | 55 /** |
73 * Converts a page to a string. | 56 * Converts a page to a payload string. |
74 * | 57 * |
75 * @param page The page. | 58 * @param page The page. |
59 * @param ret_size The returned size of the payload. | |
76 * | 60 * |
77 * @return The string representation of a page. | 61 * @return The payload string of a page. |
78 */ | 62 */ |
79 char *msn_page_build_string(const MsnPage *page); | 63 char *msn_page_gen_payload(const MsnPage *page, size_t *ret_size); |
80 | |
81 /** | |
82 * Returns TRUE if the page is outgoing. | |
83 * | |
84 * @param page The page. | |
85 * | |
86 * @return @c TRUE if the page is outgoing, or @c FALSE otherwise. | |
87 */ | |
88 gboolean msn_page_is_outgoing(const MsnPage *page); | |
89 | |
90 /** | |
91 * Returns TRUE if the page is incoming. | |
92 * | |
93 * @param page The page. | |
94 * | |
95 * @return @c TRUE if the page is incoming, or @c FALSE otherwise. | |
96 */ | |
97 gboolean msn_page_is_incoming(const MsnPage *page); | |
98 | |
99 /** | |
100 * Sets the page's sender. | |
101 * | |
102 * @param page The page. | |
103 * @param user The sender. | |
104 */ | |
105 void msn_page_set_sender(MsnPage *page, MsnUser *user); | |
106 | |
107 /** | |
108 * Returns the page's sender. | |
109 * | |
110 * @param page The page. | |
111 * | |
112 * @return The sender. | |
113 */ | |
114 MsnUser *msn_page_get_sender(const MsnPage *page); | |
115 | |
116 /** | |
117 * Sets the page's receiver. | |
118 * | |
119 * @param page The page. | |
120 * @param user The receiver. | |
121 */ | |
122 void msn_page_set_receiver(MsnPage *page, MsnUser *user); | |
123 | |
124 /** | |
125 * Returns the page's receiver. | |
126 * | |
127 * @param page The page. | |
128 * | |
129 * @return The receiver. | |
130 */ | |
131 MsnUser *msn_page_get_receiver(const MsnPage *page); | |
132 | |
133 /** | |
134 * Sets the page transaction ID. | |
135 * | |
136 * @param page The page. | |
137 * @param tid The transaction ID. | |
138 */ | |
139 void msn_page_set_transaction_id(MsnPage *page, unsigned int tid); | |
140 | |
141 /** | |
142 * Returns the page transaction ID. | |
143 * | |
144 * @param page The page. | |
145 * | |
146 * @return The transaction ID. | |
147 */ | |
148 unsigned int msn_page_get_transaction_id(const MsnPage *page); | |
149 | |
150 | 64 |
151 /** | 65 /** |
152 * Sets the body of a page. | 66 * Sets the body of a page. |
153 * | 67 * |
154 * @param page The page. | 68 * @param page The page. |