Fri, 12 Aug 2022 03:44:34 -0500
A bunch of random fixes for the the gtk4 branch
Testing Done:
Compiled
Reviewed at https://reviews.imfreedom.org/r/1581/
| 8675 | 1 | /* |
| 2 | * nmrequest.h | |
| 3 | * | |
|
8933
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
4 | * Copyright (c) 2004 Novell, Inc. All Rights Reserved. |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
5 | * |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
6 | * This program is free software; you can redistribute it and/or modify |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
7 | * it under the terms of the GNU General Public License as published by |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
8 | * the Free Software Foundation; version 2 of the License. |
| 8675 | 9 | * |
|
8933
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
10 | * This program is distributed in the hope that it will be useful, |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
13 | * GNU General Public License for more details. |
|
8684
7ec649752daa
[gaim-migrate @ 9437]
Christian Hammond <chipx86@chipx86.com>
parents:
8675
diff
changeset
|
14 | * |
|
8933
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
15 | * You should have received a copy of the GNU General Public License |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
16 | * along with this program; if not, write to the Free Software |
|
19859
71d37b57eff2
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
15435
diff
changeset
|
17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
| 8675 | 18 | * |
| 19 | */ | |
| 20 | ||
|
39819
3554dac2991b
Standardize all protocol header guard macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
19859
diff
changeset
|
21 | #ifndef PURPLE_NOVELL_NMREQUEST_H |
|
3554dac2991b
Standardize all protocol header guard macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
19859
diff
changeset
|
22 | #define PURPLE_NOVELL_NMREQUEST_H |
| 8675 | 23 | |
| 24 | typedef struct _NMRequest NMRequest; | |
| 25 | ||
| 26 | #include "nmuser.h" | |
| 27 | ||
|
8684
7ec649752daa
[gaim-migrate @ 9437]
Christian Hammond <chipx86@chipx86.com>
parents:
8675
diff
changeset
|
28 | /** |
| 8675 | 29 | * Create a new request object. Object must be release with nm_release_object. |
| 30 | * | |
| 31 | * @param cmd The request command string (e.g. "login") | |
| 32 | * @param trans_id The request transaction id | |
| 33 | * | |
| 34 | * @return The new request object | |
| 35 | */ | |
|
40098
1f2ef108cfcb
novell: Remove unused data/code.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39819
diff
changeset
|
36 | NMRequest *nm_create_request(const char *cmd, int trans_id, nm_response_cb cb, |
|
1f2ef108cfcb
novell: Remove unused data/code.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39819
diff
changeset
|
37 | gpointer resp_data, gpointer user_define); |
| 8675 | 38 | |
|
8684
7ec649752daa
[gaim-migrate @ 9437]
Christian Hammond <chipx86@chipx86.com>
parents:
8675
diff
changeset
|
39 | /** |
| 8675 | 40 | * Release a request object. |
| 41 | * | |
| 42 | * @param req The request to release | |
| 43 | */ | |
| 44 | void nm_release_request(NMRequest * req); | |
| 45 | ||
|
8684
7ec649752daa
[gaim-migrate @ 9437]
Christian Hammond <chipx86@chipx86.com>
parents:
8675
diff
changeset
|
46 | /** |
| 8675 | 47 | * Add a new reference to this object. This reference must be released by |
| 48 | * a call to nm_release_object. | |
| 49 | * | |
| 50 | * @param req The request object | |
| 51 | */ | |
| 52 | void nm_request_add_ref(NMRequest * req); | |
| 53 | ||
|
8684
7ec649752daa
[gaim-migrate @ 9437]
Christian Hammond <chipx86@chipx86.com>
parents:
8675
diff
changeset
|
54 | /** |
| 8675 | 55 | * Set the response callback for this request object. This is the callback |
| 56 | * that will be made when we get a response from the server. | |
| 57 | * | |
| 58 | * @param req The request object | |
| 59 | * @param callback The response callback | |
| 60 | * | |
| 61 | */ | |
| 62 | void nm_request_set_callback(NMRequest * req, nm_response_cb callback); | |
| 63 | ||
|
8684
7ec649752daa
[gaim-migrate @ 9437]
Christian Hammond <chipx86@chipx86.com>
parents:
8675
diff
changeset
|
64 | /** |
|
7ec649752daa
[gaim-migrate @ 9437]
Christian Hammond <chipx86@chipx86.com>
parents:
8675
diff
changeset
|
65 | * Set the response data. This will be set differently depending on |
| 8675 | 66 | * the request type (for example to nm_send_get_details will set this |
| 67 | * to be the newly create NMUserRecord object). | |
| 68 | * | |
| 69 | * @param req The request object | |
| 70 | * @param data Pointer to some data | |
| 71 | * | |
| 72 | */ | |
| 73 | void nm_request_set_data(NMRequest * req, gpointer data); | |
| 74 | ||
|
8684
7ec649752daa
[gaim-migrate @ 9437]
Christian Hammond <chipx86@chipx86.com>
parents:
8675
diff
changeset
|
75 | /** |
| 8675 | 76 | * Set the user defined data. This is the data that the client |
| 77 | * passes to the various nm_send_* functions. We will pass it | |
| 78 | * back when we make the callback. | |
| 79 | * | |
| 80 | * @param req The request object | |
|
8684
7ec649752daa
[gaim-migrate @ 9437]
Christian Hammond <chipx86@chipx86.com>
parents:
8675
diff
changeset
|
81 | * @param user_define Pointer to some data |
| 8675 | 82 | * |
| 83 | */ | |
| 84 | void nm_request_set_user_define(NMRequest * req, gpointer user_define); | |
| 85 | ||
|
8684
7ec649752daa
[gaim-migrate @ 9437]
Christian Hammond <chipx86@chipx86.com>
parents:
8675
diff
changeset
|
86 | /** |
| 8675 | 87 | * Get the transaction id for this request. |
| 88 | * | |
| 89 | * @param req The request object | |
| 90 | * | |
| 91 | * @return The transaction id. | |
| 92 | */ | |
| 93 | int nm_request_get_trans_id(NMRequest * req); | |
| 94 | ||
|
8684
7ec649752daa
[gaim-migrate @ 9437]
Christian Hammond <chipx86@chipx86.com>
parents:
8675
diff
changeset
|
95 | /** |
| 8675 | 96 | * Get the command (request type) for this request. |
| 97 | * | |
| 98 | * @param req The request object | |
| 99 | * | |
| 100 | * @return The request cmd | |
| 101 | */ | |
| 102 | const char *nm_request_get_cmd(NMRequest * req); | |
| 103 | ||
|
8684
7ec649752daa
[gaim-migrate @ 9437]
Christian Hammond <chipx86@chipx86.com>
parents:
8675
diff
changeset
|
104 | /** |
| 8675 | 105 | * Get the response data for this request |
| 106 | * | |
| 107 | * @param req The request object | |
| 108 | * | |
| 109 | * @return The response data | |
| 110 | */ | |
| 111 | gpointer nm_request_get_data(NMRequest * req); | |
| 112 | ||
|
8684
7ec649752daa
[gaim-migrate @ 9437]
Christian Hammond <chipx86@chipx86.com>
parents:
8675
diff
changeset
|
113 | /** |
| 8675 | 114 | * Get the user defined data for this request |
| 115 | * | |
| 116 | * @param req The request object | |
| 117 | * | |
| 118 | * @return The user defined data | |
| 119 | */ | |
| 120 | gpointer nm_request_get_user_define(NMRequest * req); | |
| 121 | ||
|
8684
7ec649752daa
[gaim-migrate @ 9437]
Christian Hammond <chipx86@chipx86.com>
parents:
8675
diff
changeset
|
122 | /** |
| 8675 | 123 | * Get the response callback for this request |
| 124 | * | |
| 125 | * @param req The request object | |
| 126 | * | |
| 127 | * @return The response callback | |
| 128 | */ | |
| 129 | nm_response_cb nm_request_get_callback(NMRequest * req); | |
| 130 | ||
|
39819
3554dac2991b
Standardize all protocol header guard macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
19859
diff
changeset
|
131 | #endif /* PURPLE_NOVELL_NMREQUEST_H */ |