| 28 /** |
28 /** |
| 29 * Create a new request object. Object must be release with nm_release_object. |
29 * Create a new request object. Object must be release with nm_release_object. |
| 30 * |
30 * |
| 31 * @param cmd The request command string (e.g. "login") |
31 * @param cmd The request command string (e.g. "login") |
| 32 * @param trans_id The request transaction id |
32 * @param trans_id The request transaction id |
| 33 * @param gmt The time in seconds that the request was created |
|
| 34 * |
33 * |
| 35 * @return The new request object |
34 * @return The new request object |
| 36 */ |
35 */ |
| 37 NMRequest *nm_create_request(const char *cmd, int trans_id, int gmt, nm_response_cb cb, |
36 NMRequest *nm_create_request(const char *cmd, int trans_id, nm_response_cb cb, |
| 38 gpointer resp_data, gpointer user_define); |
37 gpointer resp_data, gpointer user_define); |
| 39 |
38 |
| 40 /** |
39 /** |
| 41 * Release a request object. |
40 * Release a request object. |
| 42 * |
41 * |
| 43 * @param req The request to release |
42 * @param req The request to release |
| 83 * |
82 * |
| 84 */ |
83 */ |
| 85 void nm_request_set_user_define(NMRequest * req, gpointer user_define); |
84 void nm_request_set_user_define(NMRequest * req, gpointer user_define); |
| 86 |
85 |
| 87 /** |
86 /** |
| 88 * Set the return code. This is the return code that we received in |
|
| 89 * the server response fields. |
|
| 90 * |
|
| 91 * @param req The request object |
|
| 92 * @param rc The return code to set |
|
| 93 */ |
|
| 94 void nm_request_set_ret_code(NMRequest * req, NMERR_T rc); |
|
| 95 |
|
| 96 /** |
|
| 97 * Get the transaction id for this request. |
87 * Get the transaction id for this request. |
| 98 * |
88 * |
| 99 * @param req The request object |
89 * @param req The request object |
| 100 * |
90 * |
| 101 * @return The transaction id. |
91 * @return The transaction id. |
| 136 * |
126 * |
| 137 * @return The response callback |
127 * @return The response callback |
| 138 */ |
128 */ |
| 139 nm_response_cb nm_request_get_callback(NMRequest * req); |
129 nm_response_cb nm_request_get_callback(NMRequest * req); |
| 140 |
130 |
| 141 /** |
|
| 142 * Get the return code |
|
| 143 * |
|
| 144 * @param req The request object |
|
| 145 * |
|
| 146 * @return The return code (from the response fields) |
|
| 147 */ |
|
| 148 NMERR_T nm_request_get_ret_code(NMRequest * req); |
|
| 149 |
|
| 150 #endif /* PURPLE_NOVELL_NMREQUEST_H */ |
131 #endif /* PURPLE_NOVELL_NMREQUEST_H */ |