Mercurial > pidgin
comparison src/protocols/novell/nmrequest.h @ 8684:046dd8ef2920
[gaim-migrate @ 9437]
Excess whitespace bad, especially *that* much.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Sat, 17 Apr 2004 18:29:20 +0000 |
parents | 9ee2542d1104 |
children | 92cbf9713795 |
comparison
equal
deleted
inserted
replaced
8683:76935eb1bd40 | 8684:046dd8ef2920 |
---|---|
7 * USED, PRACTICED, PERFORMED, COPIED, DISTRIBUTED, REVISED, MODIFIED, | 7 * USED, PRACTICED, PERFORMED, COPIED, DISTRIBUTED, REVISED, MODIFIED, |
8 * TRANSLATED, ABRIDGED, CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, | 8 * TRANSLATED, ABRIDGED, CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, |
9 * RECAST, TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF NOVELL, | 9 * RECAST, TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF NOVELL, |
10 * INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT AUTHORIZATION COULD SUBJECT | 10 * INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT AUTHORIZATION COULD SUBJECT |
11 * THE PERPETRATOR TO CRIMINAL AND CIVIL LIABILITY. | 11 * THE PERPETRATOR TO CRIMINAL AND CIVIL LIABILITY. |
12 * | 12 * |
13 * AS BETWEEN [GAIM] AND NOVELL, NOVELL GRANTS [GAIM] THE RIGHT TO REPUBLISH | 13 * AS BETWEEN [GAIM] AND NOVELL, NOVELL GRANTS [GAIM] THE RIGHT TO REPUBLISH |
14 * THIS WORK UNDER THE GPL (GNU GENERAL PUBLIC LICENSE) WITH ALL RIGHTS AND | 14 * THIS WORK UNDER THE GPL (GNU GENERAL PUBLIC LICENSE) WITH ALL RIGHTS AND |
15 * LICENSES THEREUNDER. IF YOU HAVE RECEIVED THIS WORK DIRECTLY OR INDIRECTLY | 15 * LICENSES THEREUNDER. IF YOU HAVE RECEIVED THIS WORK DIRECTLY OR INDIRECTLY |
16 * FROM [GAIM] AS PART OF SUCH A REPUBLICATION, YOU HAVE ALL RIGHTS AND LICENSES | 16 * FROM [GAIM] AS PART OF SUCH A REPUBLICATION, YOU HAVE ALL RIGHTS AND LICENSES |
17 * GRANTED BY [GAIM] UNDER THE GPL. IN CONNECTION WITH SUCH A REPUBLICATION, IF | 17 * GRANTED BY [GAIM] UNDER THE GPL. IN CONNECTION WITH SUCH A REPUBLICATION, IF |
25 | 25 |
26 typedef struct _NMRequest NMRequest; | 26 typedef struct _NMRequest NMRequest; |
27 | 27 |
28 #include "nmuser.h" | 28 #include "nmuser.h" |
29 | 29 |
30 /** | 30 /** |
31 * Create a new request object. Object must be release with nm_release_object. | 31 * Create a new request object. Object must be release with nm_release_object. |
32 * | 32 * |
33 * @param cmd The request command string (e.g. "login") | 33 * @param cmd The request command string (e.g. "login") |
34 * @param trans_id The request transaction id | 34 * @param trans_id The request transaction id |
35 * @param gmt The time in seconds that the request was created | 35 * @param gmt The time in seconds that the request was created |
36 * | 36 * |
37 * @return The new request object | 37 * @return The new request object |
38 */ | 38 */ |
39 NMRequest *nm_create_request(const char *cmd, int trans_id, int gmt); | 39 NMRequest *nm_create_request(const char *cmd, int trans_id, int gmt); |
40 | 40 |
41 /** | 41 /** |
42 * Release a request object. | 42 * Release a request object. |
43 * | 43 * |
44 * @param req The request to release | 44 * @param req The request to release |
45 */ | 45 */ |
46 void nm_release_request(NMRequest * req); | 46 void nm_release_request(NMRequest * req); |
47 | 47 |
48 /** | 48 /** |
49 * Add a new reference to this object. This reference must be released by | 49 * Add a new reference to this object. This reference must be released by |
50 * a call to nm_release_object. | 50 * a call to nm_release_object. |
51 * | 51 * |
52 * @param req The request object | 52 * @param req The request object |
53 */ | 53 */ |
54 void nm_request_add_ref(NMRequest * req); | 54 void nm_request_add_ref(NMRequest * req); |
55 | 55 |
56 /** | 56 /** |
57 * Set the response callback for this request object. This is the callback | 57 * Set the response callback for this request object. This is the callback |
58 * that will be made when we get a response from the server. | 58 * that will be made when we get a response from the server. |
59 * | 59 * |
60 * @param req The request object | 60 * @param req The request object |
61 * @param callback The response callback | 61 * @param callback The response callback |
62 * | 62 * |
63 */ | 63 */ |
64 void nm_request_set_callback(NMRequest * req, nm_response_cb callback); | 64 void nm_request_set_callback(NMRequest * req, nm_response_cb callback); |
65 | 65 |
66 /** | 66 /** |
67 * Set the response data. This will be set differently depending on | 67 * Set the response data. This will be set differently depending on |
68 * the request type (for example to nm_send_get_details will set this | 68 * the request type (for example to nm_send_get_details will set this |
69 * to be the newly create NMUserRecord object). | 69 * to be the newly create NMUserRecord object). |
70 * | 70 * |
71 * @param req The request object | 71 * @param req The request object |
72 * @param data Pointer to some data | 72 * @param data Pointer to some data |
73 * | 73 * |
74 */ | 74 */ |
75 void nm_request_set_data(NMRequest * req, gpointer data); | 75 void nm_request_set_data(NMRequest * req, gpointer data); |
76 | 76 |
77 /** | 77 /** |
78 * Set the user defined data. This is the data that the client | 78 * Set the user defined data. This is the data that the client |
79 * passes to the various nm_send_* functions. We will pass it | 79 * passes to the various nm_send_* functions. We will pass it |
80 * back when we make the callback. | 80 * back when we make the callback. |
81 * | 81 * |
82 * @param req The request object | 82 * @param req The request object |
83 * @param user_define Pointer to some data | 83 * @param user_define Pointer to some data |
84 * | 84 * |
85 */ | 85 */ |
86 void nm_request_set_user_define(NMRequest * req, gpointer user_define); | 86 void nm_request_set_user_define(NMRequest * req, gpointer user_define); |
87 | 87 |
88 /** | 88 /** |
89 * Set the return code. This is the return code that we recieved in | 89 * Set the return code. This is the return code that we recieved in |
90 * the server response fields. | 90 * the server response fields. |
91 * | 91 * |
92 * @param req The request object | 92 * @param req The request object |
93 * @param rc The return code to set | 93 * @param rc The return code to set |
94 */ | 94 */ |
95 void nm_request_set_ret_code(NMRequest * req, NMERR_T rc); | 95 void nm_request_set_ret_code(NMRequest * req, NMERR_T rc); |
96 | 96 |
97 /** | 97 /** |
98 * Get the transaction id for this request. | 98 * Get the transaction id for this request. |
99 * | 99 * |
100 * @param req The request object | 100 * @param req The request object |
101 * | 101 * |
102 * @return The transaction id. | 102 * @return The transaction id. |
103 */ | 103 */ |
104 int nm_request_get_trans_id(NMRequest * req); | 104 int nm_request_get_trans_id(NMRequest * req); |
105 | 105 |
106 /** | 106 /** |
107 * Get the command (request type) for this request. | 107 * Get the command (request type) for this request. |
108 * | 108 * |
109 * @param req The request object | 109 * @param req The request object |
110 * | 110 * |
111 * @return The request cmd | 111 * @return The request cmd |
112 */ | 112 */ |
113 const char *nm_request_get_cmd(NMRequest * req); | 113 const char *nm_request_get_cmd(NMRequest * req); |
114 | 114 |
115 /** | 115 /** |
116 * Get the response data for this request | 116 * Get the response data for this request |
117 * | 117 * |
118 * @param req The request object | 118 * @param req The request object |
119 * | 119 * |
120 * @return The response data | 120 * @return The response data |
121 */ | 121 */ |
122 gpointer nm_request_get_data(NMRequest * req); | 122 gpointer nm_request_get_data(NMRequest * req); |
123 | 123 |
124 /** | 124 /** |
125 * Get the user defined data for this request | 125 * Get the user defined data for this request |
126 * | 126 * |
127 * @param req The request object | 127 * @param req The request object |
128 * | 128 * |
129 * @return The user defined data | 129 * @return The user defined data |
130 */ | 130 */ |
131 gpointer nm_request_get_user_define(NMRequest * req); | 131 gpointer nm_request_get_user_define(NMRequest * req); |
132 | 132 |
133 /** | 133 /** |
134 * Get the response callback for this request | 134 * Get the response callback for this request |
135 * | 135 * |
136 * @param req The request object | 136 * @param req The request object |
137 * | 137 * |
138 * @return The response callback | 138 * @return The response callback |
139 */ | 139 */ |
140 nm_response_cb nm_request_get_callback(NMRequest * req); | 140 nm_response_cb nm_request_get_callback(NMRequest * req); |
141 | 141 |
142 /** | 142 /** |
143 * Get the return code | 143 * Get the return code |
144 * | 144 * |
145 * @param req The request object | 145 * @param req The request object |
146 * | 146 * |
147 * @return The return code (from the response fields) | 147 * @return The return code (from the response fields) |