Fri, 14 Oct 2022 01:06:41 -0500
Fix the namespace of the PurpleConnectionState enum constants
Testing Done:
Connected an XMPP account everything looked fine.
Reviewed at https://reviews.imfreedom.org/r/1936/
| 8675 | 1 | /* |
| 2 | * nmuser.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:
17154
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_NMUSER_H |
|
3554dac2991b
Standardize all protocol header guard macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
19859
diff
changeset
|
22 | #define PURPLE_NOVELL_NMUSER_H |
| 8675 | 23 | |
| 24 | #include <glib.h> | |
| 25 | #include <stdio.h> | |
| 26 | #include <stdlib.h> | |
| 27 | ||
| 28 | typedef guint32 NMERR_T; | |
| 29 | typedef int NMSTATUS_T; | |
| 30 | ||
| 31 | typedef struct _NMUser NMUser; | |
| 32 | ||
| 33 | typedef enum | |
| 34 | { | |
| 35 | NMREQUEST_TYPE_LOGIN = 0, | |
| 36 | NMREQUEST_TYPE_LOGOUT, | |
| 37 | NMREQUEST_TYPE_SETSTATUS, | |
| 38 | NMREQUEST_TYPE_GETDETAILS, | |
| 39 | NMREQUEST_TYPE_CREATECONF, | |
| 40 | NMREQUEST_TYPE_SENDMESSAGE, | |
| 41 | NMREQUEST_TYPE_JOINCONF, | |
| 42 | NMREQUEST_TYPE_LEAVECONF, | |
| 43 | NMREQUEST_TYPE_REJECTCONF, | |
| 44 | NMREQUEST_TYPE_SENDTYPING, | |
| 45 | NMREQUEST_TYPE_CREATECONTACT, | |
| 46 | NMREQUEST_TYPE_DELETECONTACT | |
| 47 | ||
| 48 | } NMRequestType; | |
| 49 | ||
|
40358
e6fe6fc1f516
move all protocols, purple plugins, and purple tests to use purple.h instead of including files individually
Gary Kramlich <grim@reaperworld.com>
parents:
40118
diff
changeset
|
50 | #include <purple.h> |
|
e6fe6fc1f516
move all protocols, purple plugins, and purple tests to use purple.h instead of including files individually
Gary Kramlich <grim@reaperworld.com>
parents:
40118
diff
changeset
|
51 | |
| 8675 | 52 | #include "nmmessage.h" |
| 53 | #include "nmconference.h" | |
| 54 | #include "nmcontact.h" | |
| 55 | #include "nmuserrecord.h" | |
| 56 | #include "nmfield.h" | |
| 57 | #include "nmevent.h" | |
| 58 | ||
| 59 | /* Callback typedefs */ | |
| 60 | typedef void (*nm_response_cb) (NMUser * user, NMERR_T ret_code, | |
| 61 | gpointer resp_data, gpointer user_data); | |
| 62 | ||
| 63 | typedef void (*nm_event_cb) (NMUser * user, NMEvent * event); | |
| 64 | ||
| 65 | #include "nmrequest.h" | |
| 66 | #include "nmconn.h" | |
| 67 | ||
| 68 | /* This represents user that we are currently logged in as */ | |
| 69 | struct _NMUser | |
| 70 | { | |
|
40118
621987e8e765
Convert novell to GIO.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
40098
diff
changeset
|
71 | GCancellable *cancellable; |
| 8675 | 72 | |
| 73 | char *name; | |
| 74 | ||
| 75 | NMSTATUS_T status; | |
| 76 | ||
| 77 | /* A copy of the login response fields */ | |
| 78 | NMField *fields; | |
| 79 | ||
| 80 | /* The user record for this user */ | |
| 81 | NMUserRecord *user_record; | |
| 82 | ||
| 83 | /* Our connection information */ | |
| 84 | NMConn *conn; | |
| 85 | ||
| 86 | /* This is the contact list */ | |
| 87 | NMFolder *root_folder; | |
| 88 | ||
| 89 | /* All contacts that we know about hashed by dn */ | |
| 90 | GHashTable *contacts; | |
| 91 | ||
| 92 | /* All user records hashed by dn */ | |
| 93 | GHashTable *user_records; | |
| 94 | ||
| 95 | /* DN lookup */ | |
| 96 | GHashTable *display_id_to_dn; | |
| 97 | ||
| 98 | /* One on one conversations indexed by recipient's dn */ | |
| 99 | GSList *conferences; | |
| 100 | ||
| 101 | guint32 conference_count; | |
| 102 | ||
| 103 | /* Called when we receive an event */ | |
| 104 | nm_event_cb evt_callback; | |
| 105 | ||
|
8933
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
106 | /* Privacy settings */ |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
107 | gboolean privacy_locked; |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
108 | gboolean default_deny; |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
109 | GSList *allow_list; |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
110 | GSList *deny_list; |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
111 | |
| 8675 | 112 | /* Generic pointer to data needed by the client |
| 113 | * using the API | |
| 114 | */ | |
| 115 | gpointer client_data; | |
| 116 | ||
|
9268
196cbf2cae4c
[gaim-migrate @ 10069]
Mike Stoddard <mistoddard@novell.com>
parents:
8933
diff
changeset
|
117 | /* Have the privacy lists been synched yet */ |
|
196cbf2cae4c
[gaim-migrate @ 10069]
Mike Stoddard <mistoddard@novell.com>
parents:
8933
diff
changeset
|
118 | gboolean privacy_synched; |
|
196cbf2cae4c
[gaim-migrate @ 10069]
Mike Stoddard <mistoddard@novell.com>
parents:
8933
diff
changeset
|
119 | |
|
9360
c40bc951573a
[gaim-migrate @ 10168]
Mike Stoddard <mistoddard@novell.com>
parents:
9268
diff
changeset
|
120 | /* Has the contact list been synched */ |
|
c40bc951573a
[gaim-migrate @ 10168]
Mike Stoddard <mistoddard@novell.com>
parents:
9268
diff
changeset
|
121 | gboolean clist_synched; |
| 8675 | 122 | }; |
| 123 | ||
| 124 | #define NM_STATUS_UNKNOWN 0 | |
| 125 | #define NM_STATUS_OFFLINE 1 | |
| 126 | #define NM_STATUS_AVAILABLE 2 | |
| 127 | #define NM_STATUS_BUSY 3 | |
| 128 | #define NM_STATUS_AWAY 4 | |
| 129 | #define NM_STATUS_AWAY_IDLE 5 | |
| 130 | #define NM_STATUS_INVALID 6 | |
| 131 | ||
| 132 | #define NMERR_BASE 0x2000L | |
| 133 | #define NM_OK 0L | |
| 134 | #define NMERR_BAD_PARM (NMERR_BASE + 0x0001) | |
| 135 | #define NMERR_TCP_WRITE (NMERR_BASE + 0x0002) | |
| 136 | #define NMERR_TCP_READ (NMERR_BASE + 0x0003) | |
| 137 | #define NMERR_PROTOCOL (NMERR_BASE + 0x0004) | |
|
8933
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
138 | #define NMERR_SERVER_REDIRECT (NMERR_BASE + 0x0005) |
| 8675 | 139 | #define NMERR_CONFERENCE_NOT_FOUND (NMERR_BASE + 0x0006) |
| 140 | #define NMERR_CONFERENCE_NOT_INSTANTIATED (NMERR_BASE + 0x0007) | |
| 141 | #define NMERR_FOLDER_EXISTS (NMERR_BASE + 0x0008) | |
| 142 | ||
|
8933
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
143 | /* Errors that are returned from the server */ |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
144 | #define NMERR_SERVER_BASE 0xD100L |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
145 | #define NMERR_ACCESS_DENIED (NMERR_SERVER_BASE + 0x0006) |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
146 | #define NMERR_NOT_SUPPORTED (NMERR_SERVER_BASE + 0x000A) |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
147 | #define NMERR_PASSWORD_EXPIRED (NMERR_SERVER_BASE + 0x000B) |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
148 | #define NMERR_PASSWORD_INVALID (NMERR_SERVER_BASE + 0x000C) |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
149 | #define NMERR_USER_NOT_FOUND (NMERR_SERVER_BASE + 0x000D) |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
150 | #define NMERR_USER_DISABLED (NMERR_SERVER_BASE + 0x0010) |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
151 | #define NMERR_DIRECTORY_FAILURE (NMERR_SERVER_BASE + 0x0011) |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
152 | #define NMERR_HOST_NOT_FOUND (NMERR_SERVER_BASE + 0x0019) |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
153 | #define NMERR_ADMIN_LOCKED (NMERR_SERVER_BASE + 0x001C) |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
154 | #define NMERR_DUPLICATE_PARTICIPANT (NMERR_SERVER_BASE + 0x001F) |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
155 | #define NMERR_SERVER_BUSY (NMERR_SERVER_BASE + 0x0023) |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
156 | #define NMERR_OBJECT_NOT_FOUND (NMERR_SERVER_BASE + 0x0024) |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
157 | #define NMERR_DIRECTORY_UPDATE (NMERR_SERVER_BASE + 0x0025) |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
158 | #define NMERR_DUPLICATE_FOLDER (NMERR_SERVER_BASE + 0x0026) |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
159 | #define NMERR_DUPLICATE_CONTACT (NMERR_SERVER_BASE + 0x0027) |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
160 | #define NMERR_USER_NOT_ALLOWED (NMERR_SERVER_BASE + 0x0028) |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
161 | #define NMERR_TOO_MANY_CONTACTS (NMERR_SERVER_BASE + 0x0029) |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
162 | #define NMERR_CONFERENCE_NOT_FOUND_2 (NMERR_SERVER_BASE + 0x002B) |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
163 | #define NMERR_TOO_MANY_FOLDERS (NMERR_SERVER_BASE + 0x002C) |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
164 | #define NMERR_SERVER_PROTOCOL (NMERR_SERVER_BASE + 0x0030) |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
165 | #define NMERR_CONVERSATION_INVITE (NMERR_SERVER_BASE + 0x0035) |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
166 | #define NMERR_USER_BLOCKED (NMERR_SERVER_BASE + 0x0039) |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
167 | #define NMERR_MASTER_ARCHIVE_MISSING (NMERR_SERVER_BASE + 0x003A) |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
168 | #define NMERR_PASSWORD_EXPIRED_2 (NMERR_SERVER_BASE + 0x0042) |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
169 | #define NMERR_CREDENTIALS_MISSING (NMERR_SERVER_BASE + 0x0046) |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
170 | #define NMERR_AUTHENTICATION_FAILED (NMERR_SERVER_BASE + 0x0049) |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
171 | #define NMERR_EVAL_CONNECTION_LIMIT (NMERR_SERVER_BASE + 0x004A) |
| 8675 | 172 | |
|
8684
7ec649752daa
[gaim-migrate @ 9437]
Christian Hammond <chipx86@chipx86.com>
parents:
8675
diff
changeset
|
173 | /** |
| 8675 | 174 | * Initialize the user that we are going to login to the system as. |
| 175 | * | |
| 176 | * @param name The userid of the user | |
| 177 | * @param server IP Address of server | |
| 178 | * @param port Port to connect to on the server | |
| 179 | * @param data Client data to associate with the user | |
|
8735
01248ea222d3
[gaim-migrate @ 9490]
Jonathan Champ <royanee@users.sourceforge.net>
parents:
8684
diff
changeset
|
180 | * @param event_callback Function to call when we receive an event |
| 8675 | 181 | * |
| 182 | * @return The initialized user object. Must be freed by calling | |
| 183 | * nm_deinitialize_user | |
| 184 | */ | |
| 185 | NMUser *nm_initialize_user(const char *name, const char *server, int port, | |
| 186 | gpointer data, nm_event_cb event_callback); | |
| 187 | ||
| 188 | ||
|
8684
7ec649752daa
[gaim-migrate @ 9437]
Christian Hammond <chipx86@chipx86.com>
parents:
8675
diff
changeset
|
189 | /** |
| 8675 | 190 | * Free up resources associated with the user object. |
| 191 | * | |
| 192 | * @param user The user to deinitialize | |
| 193 | */ | |
| 194 | void nm_deinitialize_user(NMUser * user); | |
| 195 | ||
|
8684
7ec649752daa
[gaim-migrate @ 9437]
Christian Hammond <chipx86@chipx86.com>
parents:
8675
diff
changeset
|
196 | /** |
| 8675 | 197 | * Send a login request to the server. |
| 198 | * | |
| 199 | * The response data sent to the callback will be NULL. | |
| 200 | * | |
| 201 | * @param user The User to login -- must be initialized | |
| 202 | * @param pwd The password of the user | |
| 203 | * @param my_addr The address of the client machine | |
| 15884 | 204 | * @param user_agent String describing the client (eg. "Purple/0.76 (Linux; 2.4.20)") |
| 8675 | 205 | * @param callback Function to call when we get the response from the server |
| 206 | * @param data User defined data to be passed to the callback function | |
|
8684
7ec649752daa
[gaim-migrate @ 9437]
Christian Hammond <chipx86@chipx86.com>
parents:
8675
diff
changeset
|
207 | * |
| 8675 | 208 | * |
| 209 | * @return NM_OK if login is sent successfully, error otherwise. | |
| 210 | */ | |
| 211 | NMERR_T nm_send_login(NMUser * user, const char *pwd, const char *my_addr, | |
| 212 | const char *user_agent, nm_response_cb callback, | |
| 213 | gpointer data); | |
| 214 | ||
|
8684
7ec649752daa
[gaim-migrate @ 9437]
Christian Hammond <chipx86@chipx86.com>
parents:
8675
diff
changeset
|
215 | /** |
| 8675 | 216 | * Send a set status request to the server. |
| 217 | * | |
| 218 | * The response data sent to the callback will be NULL. | |
| 219 | * | |
| 220 | * @param user The logged in User | |
| 221 | * @param dn The DN of the user (if known, or NULL if not known) | |
| 222 | * @param address IP Address of server | |
| 223 | * @param callback Function to call when we get the response from the server | |
| 224 | * | |
| 225 | * | |
| 226 | * @return NM_OK if successfully sent, error otherwise | |
| 227 | */ | |
| 228 | NMERR_T nm_send_set_status(NMUser * user, int status, const char *text, | |
| 229 | const char *auto_resp, nm_response_cb callback, | |
| 230 | gpointer data); | |
| 231 | ||
|
8684
7ec649752daa
[gaim-migrate @ 9437]
Christian Hammond <chipx86@chipx86.com>
parents:
8675
diff
changeset
|
232 | /** |
| 8675 | 233 | * Send a create conference to the server. |
| 234 | * | |
| 235 | * The response data sent to the callback will be NULL. | |
| 236 | * | |
|
8933
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
237 | * @param user The logged in User |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
238 | * @param conference Conference to create |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
239 | * @param add_participants Add participant list on create? |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
240 | * @param callback Function to call when we get the response from the server |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
241 | * @param data User defined data to be passed to the callback function |
| 8675 | 242 | * |
| 243 | * @return NM_OK if successfully sent, error otherwise | |
| 244 | */ | |
| 245 | NMERR_T nm_send_create_conference(NMUser * user, NMConference * conference, | |
| 246 | nm_response_cb callback, gpointer data); | |
| 247 | ||
|
8684
7ec649752daa
[gaim-migrate @ 9437]
Christian Hammond <chipx86@chipx86.com>
parents:
8675
diff
changeset
|
248 | /** |
| 8675 | 249 | * Tell server we have left the conference. |
|
8684
7ec649752daa
[gaim-migrate @ 9437]
Christian Hammond <chipx86@chipx86.com>
parents:
8675
diff
changeset
|
250 | * |
| 8675 | 251 | * The response data sent to the callback will be NULL. |
| 252 | * | |
| 253 | * @param user The logged in User | |
| 254 | * @param conference Conference the user is leaving | |
| 255 | * @param callback Function to call when we get the response from the server | |
| 256 | * @param data User defined data to be passed to the callback function | |
| 257 | * | |
| 258 | * @return NM_OK if successfully sent, error otherwise | |
| 259 | */ | |
| 260 | NMERR_T nm_send_leave_conference(NMUser * user, NMConference * conference, | |
| 261 | nm_response_cb callback, gpointer data); | |
| 262 | ||
|
8684
7ec649752daa
[gaim-migrate @ 9437]
Christian Hammond <chipx86@chipx86.com>
parents:
8675
diff
changeset
|
263 | /** |
| 8675 | 264 | * Send a join conference request to the server. |
| 265 | * | |
| 266 | * The response data sent to the callback will be NULL. | |
| 267 | * | |
| 268 | * @param user The logged in User | |
| 269 | * @param conference Conference the user is joining | |
| 270 | * @param callback Function to call when we get the response from the server | |
| 271 | * @param data User defined data to be passed to the callback function | |
| 272 | * | |
| 273 | * | |
| 274 | * @return NM_OK if successfully sent, error otherwise | |
| 275 | */ | |
| 276 | NMERR_T nm_send_join_conference(NMUser * user, NMConference * conference, | |
| 277 | nm_response_cb callback, gpointer data); | |
| 278 | ||
|
8684
7ec649752daa
[gaim-migrate @ 9437]
Christian Hammond <chipx86@chipx86.com>
parents:
8675
diff
changeset
|
279 | /** |
| 8675 | 280 | * Send a conference reject request to the server. |
| 281 | * | |
|
8684
7ec649752daa
[gaim-migrate @ 9437]
Christian Hammond <chipx86@chipx86.com>
parents:
8675
diff
changeset
|
282 | * The response data sent to the callback will be NULL. |
| 8675 | 283 | * |
| 284 | * @param user The logged in User | |
| 285 | * @param conference Conference the user is rejecting | |
| 286 | * @param callback Function to call when we get the response from the server | |
| 287 | * @param data User defined data to be passed to the callback function | |
| 288 | * | |
| 289 | * | |
| 290 | * @return NM_OK if successfully sent, error otherwise | |
| 291 | */ | |
| 292 | NMERR_T nm_send_reject_conference(NMUser * user, NMConference * conference, | |
| 293 | nm_response_cb callback, gpointer data); | |
| 294 | ||
|
8933
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
295 | |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
296 | /** |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
297 | * Send a conference invitation to the server. |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
298 | * |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
299 | * The response data sent to the callback will be NULL. |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
300 | * |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
301 | * @param user The logged in User |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
302 | * @param conference Conference the user is rejecting |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
303 | * @param user_record The user to invite |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
304 | * @param message The invite message if there is one, NULL otherwise |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
305 | * @param callback Function to call when we get the response from the server |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
306 | * @param data User defined data to be passed to the callback function |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
307 | * |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
308 | * |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
309 | * @return NM_OK if successfully sent, error otherwise |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
310 | */ |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
311 | NMERR_T nm_send_conference_invite(NMUser *user, NMConference *conference, NMUserRecord *user_record, |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
312 | const char *message, nm_response_cb callback, gpointer data); |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
313 | |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
314 | /** |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
315 | * Get details for a more than one user from the server. |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
316 | * |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
317 | * The response data sent to the callback will be an NMUserRecord which should be |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
318 | * freed with nm_release_user_record |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
319 | * |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
320 | * @param user The logged in User |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
321 | * @param names Link list of user id's or dn's |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
322 | * @param callback Function to call when we get the response from the server |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
323 | * @param data User defined data to be passed to the callback function |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
324 | * |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
325 | * @return NM_OK if successfully sent, error otherwise |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
326 | */ |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
327 | NMERR_T nm_send_multiple_get_details(NMUser * user, GSList *names, |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
328 | nm_response_cb callback, gpointer data); |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
329 | |
|
8684
7ec649752daa
[gaim-migrate @ 9437]
Christian Hammond <chipx86@chipx86.com>
parents:
8675
diff
changeset
|
330 | /** |
| 8675 | 331 | * Get details for a user from the server. |
|
8684
7ec649752daa
[gaim-migrate @ 9437]
Christian Hammond <chipx86@chipx86.com>
parents:
8675
diff
changeset
|
332 | * |
| 8675 | 333 | * The response data sent to the callback will be an NMUserRecord which should be |
| 334 | * freed with nm_release_user_record | |
| 335 | * | |
| 336 | * @param user The logged in User | |
| 337 | * @param name Userid or DN of the user to look up | |
| 338 | * @param callback Function to call when we get the response from the server | |
| 339 | * @param data User defined data to be passed to the callback function | |
| 340 | * | |
| 341 | * @return NM_OK if successfully sent, error otherwise | |
| 342 | */ | |
| 343 | NMERR_T nm_send_get_details(NMUser * user, const char *name, | |
| 344 | nm_response_cb callback, gpointer data); | |
| 345 | ||
|
8684
7ec649752daa
[gaim-migrate @ 9437]
Christian Hammond <chipx86@chipx86.com>
parents:
8675
diff
changeset
|
346 | /** |
| 8675 | 347 | * Send a message. |
| 348 | * | |
| 349 | * The response data sent to the callback will be NULL. | |
| 350 | * | |
| 351 | * @param user The logged in User | |
| 352 | * @param message The message to send. | |
| 353 | * @param callback Function to call when we get the response from the server | |
| 354 | * | |
| 355 | * @return NM_OK if successfully sent, error otherwise | |
| 356 | */ | |
| 357 | NMERR_T nm_send_message(NMUser * user, NMMessage * message, | |
| 358 | nm_response_cb callback); | |
| 359 | ||
|
8684
7ec649752daa
[gaim-migrate @ 9437]
Christian Hammond <chipx86@chipx86.com>
parents:
8675
diff
changeset
|
360 | /** |
| 8675 | 361 | * Sends a typing event to the server. |
| 362 | * | |
| 363 | * The response data sent to the callback will be NULL. | |
| 364 | * | |
| 365 | * @param user The logged in User | |
| 366 | * @param conf The conference that corresponds to the typing event | |
| 367 | * @param typing TRUE if the user is typing | |
| 368 | * FALSE if the user has stopped typing | |
| 369 | * @param callback Function to call when we get the response from the server | |
| 370 | * | |
| 371 | * @return NM_OK if successfully sent, error otherwise | |
| 372 | */ | |
| 373 | NMERR_T nm_send_typing(NMUser * user, NMConference * conf, | |
| 374 | gboolean typing, nm_response_cb callback); | |
| 375 | ||
|
8684
7ec649752daa
[gaim-migrate @ 9437]
Christian Hammond <chipx86@chipx86.com>
parents:
8675
diff
changeset
|
376 | /** |
| 8675 | 377 | * Send a create contact request to the server. |
| 378 | * | |
| 379 | * The given folder should already exist on the server. If not, | |
| 380 | * the call will fail. | |
| 381 | * | |
| 382 | * The response data sent to the callback will be a NMContact which should | |
| 383 | * be released with nm_release_contact | |
| 384 | * | |
| 385 | * @param user The logged in User | |
| 386 | * @param folder The folder that the contact should be created in | |
| 387 | * @param contact The contact to add | |
| 388 | * @param callback Function to call when we get the response from the server | |
| 389 | * @param data User defined data | |
| 390 | * | |
| 391 | * @return NM_OK if successfully sent, error otherwise | |
| 392 | */ | |
| 393 | NMERR_T nm_send_create_contact(NMUser * user, NMFolder * folder, | |
| 394 | NMContact * contact, nm_response_cb callback, | |
| 395 | gpointer data); | |
| 396 | ||
|
8684
7ec649752daa
[gaim-migrate @ 9437]
Christian Hammond <chipx86@chipx86.com>
parents:
8675
diff
changeset
|
397 | /** |
| 8675 | 398 | * Send a remove contact request to the server. |
| 399 | * | |
| 400 | * The response data sent to the callback will be NULL. | |
| 401 | * | |
| 402 | * @param user The logged in User | |
| 403 | * @param folder The folder to remove contact from | |
| 404 | * @param contact The contact to remove | |
| 405 | * @param callback Function to call when we get the response from the server | |
| 406 | * @param data User defined data | |
| 407 | * | |
| 408 | * @return NM_OK if successfully sent, error otherwise | |
| 409 | */ | |
| 410 | NMERR_T nm_send_remove_contact(NMUser * user, NMFolder * folder, | |
| 411 | NMContact * contact, nm_response_cb callback, | |
| 412 | gpointer data); | |
| 413 | ||
|
8684
7ec649752daa
[gaim-migrate @ 9437]
Christian Hammond <chipx86@chipx86.com>
parents:
8675
diff
changeset
|
414 | /** |
| 8675 | 415 | * Send a create folder request to the server. |
| 416 | * | |
| 417 | * The response data sent to the callback will be a NMFolder which should be | |
| 418 | * released with nm_release_folder | |
| 419 | * | |
| 420 | * @param user The logged in User | |
| 421 | * @param name The name of the folder to create | |
| 422 | * @param callback Function to call when we get the response from the server | |
| 423 | * @param data User defined data | |
| 424 | * | |
| 425 | * @return NM_OK if successfully sent, error otherwise | |
| 426 | */ | |
| 427 | NMERR_T nm_send_create_folder(NMUser * user, const char *name, | |
| 428 | nm_response_cb callback, gpointer data); | |
| 429 | ||
|
8684
7ec649752daa
[gaim-migrate @ 9437]
Christian Hammond <chipx86@chipx86.com>
parents:
8675
diff
changeset
|
430 | /** |
| 8675 | 431 | * Send a delete folder request to the server. |
| 432 | * | |
| 433 | * The response data sent to the callback will be NULL. | |
| 434 | * | |
| 435 | * @param user The logged in User | |
| 436 | * @param folder The name of the folder to remove | |
| 437 | * @param callback Function to call when we get the response from the server | |
| 438 | * @param data User defined data | |
| 439 | * | |
| 440 | * @return NM_OK if successfully sent, error otherwise | |
| 441 | */ | |
| 442 | NMERR_T nm_send_remove_folder(NMUser * user, NMFolder * folder, | |
| 443 | nm_response_cb callback, gpointer data); | |
| 444 | ||
|
8684
7ec649752daa
[gaim-migrate @ 9437]
Christian Hammond <chipx86@chipx86.com>
parents:
8675
diff
changeset
|
445 | /** |
| 8675 | 446 | * Send a rename contact request to the server. |
| 447 | * | |
| 448 | * The response data sent to the callback will be NULL. | |
| 449 | * | |
| 450 | * @param user The logged in User | |
| 451 | * @param contact The contact to rename | |
| 452 | * @param new_name The new display name for the contact | |
| 453 | * @param callback Function to call when we get the response from the server | |
| 454 | * @param data User defined data | |
| 455 | * | |
| 456 | * @return NM_OK if successfully sent, error otherwise | |
| 457 | */ | |
| 458 | NMERR_T nm_send_rename_contact(NMUser * user, NMContact * contact, | |
| 459 | const char *new_name, nm_response_cb callback, | |
| 460 | gpointer data); | |
| 461 | ||
|
8684
7ec649752daa
[gaim-migrate @ 9437]
Christian Hammond <chipx86@chipx86.com>
parents:
8675
diff
changeset
|
462 | /** |
| 8675 | 463 | * Send a rename folder request to the server. |
| 464 | * | |
| 465 | * The response data sent to the callback will be NULL. | |
| 466 | * | |
| 467 | * @param user The logged in User | |
| 468 | * @param folder The folder to rename | |
| 469 | * @param new_name The new name of the folder | |
| 470 | * @param callback Function to call when we get the response from the server | |
| 471 | * @param data User defined data | |
| 472 | * | |
| 473 | * @return NM_OK if successfully sent, error otherwise | |
| 474 | */ | |
| 475 | NMERR_T nm_send_rename_folder(NMUser * user, NMFolder * folder, | |
| 476 | const char *new_name, nm_response_cb callback, | |
| 477 | gpointer data); | |
| 478 | ||
|
8684
7ec649752daa
[gaim-migrate @ 9437]
Christian Hammond <chipx86@chipx86.com>
parents:
8675
diff
changeset
|
479 | /** |
| 8675 | 480 | * Send a move contact request to the server. |
| 481 | * | |
| 482 | * The response data sent to the callback will be NULL. | |
| 483 | * | |
| 484 | * @param user The logged in User | |
| 485 | * @param contact The contact to move | |
| 486 | * @param folder The folder to move the contact to | |
| 487 | * @param callback Function to call when we get the response from the server | |
| 488 | * @param data User defined data | |
| 489 | * | |
| 490 | * @return NM_OK if successfully sent, error otherwise | |
| 491 | */ | |
| 492 | NMERR_T nm_send_move_contact(NMUser * user, NMContact * contact, | |
| 493 | NMFolder * folder, nm_response_cb callback, | |
| 494 | gpointer data); | |
| 495 | ||
|
8684
7ec649752daa
[gaim-migrate @ 9437]
Christian Hammond <chipx86@chipx86.com>
parents:
8675
diff
changeset
|
496 | /** |
| 8675 | 497 | * Send a get status request to the server. |
| 498 | * | |
| 499 | * The response data sent to the callback will be a NMUserRecord. | |
| 500 | * | |
| 501 | * @param user The logged in User | |
| 502 | * @param contact The contact to move | |
| 503 | * @param folder The folder to move the contact to | |
| 504 | * @param callback Function to call when we get the response from the server | |
| 505 | * @param data User defined data | |
| 506 | * | |
| 507 | * @return NM_OK if successfully sent, error otherwise | |
| 508 | */ | |
| 509 | NMERR_T nm_send_get_status(NMUser * user, NMUserRecord * user_record, | |
| 510 | nm_response_cb callback, gpointer data); | |
| 511 | ||
|
8684
7ec649752daa
[gaim-migrate @ 9437]
Christian Hammond <chipx86@chipx86.com>
parents:
8675
diff
changeset
|
512 | /** |
|
8933
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
513 | * Send a request to add an item to the allow or deny list. |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
514 | * |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
515 | * @param user The logged in User |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
516 | * @param who The userid or DN of the user to add to list |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
517 | * @param allow_list TRUE if adding to allow list, FALSE if adding to deny list |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
518 | * @param callback Function to call when we get the response from the server |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
519 | * @param data User defined data |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
520 | * |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
521 | * @return NM_OK if successfully sent, error otherwise |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
522 | */ |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
523 | NMERR_T |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
524 | nm_send_create_privacy_item(NMUser *user, const char *who, gboolean is_allowed, |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
525 | nm_response_cb callback, gpointer data); |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
526 | |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
527 | /** |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
528 | * Send a request to remove an item from the allow or deny list. |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
529 | * |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
530 | * @param user The logged in User |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
531 | * @param who The userid or DN of the user to add to list |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
532 | * @param allow_list TRUE if removing from allow list, FALSE if removing from deny list |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
533 | * @param callback Function to call when we get the response from the server |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
534 | * @param data User defined data |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
535 | * |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
536 | * @return NM_OK if successfully sent, error otherwise |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
537 | */ |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
538 | NMERR_T |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
539 | nm_send_remove_privacy_item(NMUser *user, const char *dn, gboolean allow_list, |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
540 | nm_response_cb callback, gpointer data); |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
541 | |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
542 | /** |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
543 | * Send a request to change the default privacy setting to deny all or allow all |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
544 | * |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
545 | * @param user The logged in User |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
546 | * @param default_deny TRUE if default should be changed to deny all |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
547 | * @param callback Function to call when we get the response from the server |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
548 | * @param data User defined data |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
549 | * |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
550 | * @return NM_OK if successfully sent, error otherwise |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
551 | */ |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
552 | NMERR_T |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
553 | nm_send_set_privacy_default(NMUser *user, gboolean default_deny, |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
554 | nm_response_cb callback, gpointer data); |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
555 | |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
556 | /** |
|
9268
196cbf2cae4c
[gaim-migrate @ 10069]
Mike Stoddard <mistoddard@novell.com>
parents:
8933
diff
changeset
|
557 | * Send a ping to the server |
|
196cbf2cae4c
[gaim-migrate @ 10069]
Mike Stoddard <mistoddard@novell.com>
parents:
8933
diff
changeset
|
558 | * |
|
196cbf2cae4c
[gaim-migrate @ 10069]
Mike Stoddard <mistoddard@novell.com>
parents:
8933
diff
changeset
|
559 | * @param user The logged in User |
|
196cbf2cae4c
[gaim-migrate @ 10069]
Mike Stoddard <mistoddard@novell.com>
parents:
8933
diff
changeset
|
560 | * @param callback Function to call when we get the response from the server |
|
196cbf2cae4c
[gaim-migrate @ 10069]
Mike Stoddard <mistoddard@novell.com>
parents:
8933
diff
changeset
|
561 | * @param data User defined data |
|
196cbf2cae4c
[gaim-migrate @ 10069]
Mike Stoddard <mistoddard@novell.com>
parents:
8933
diff
changeset
|
562 | * |
|
196cbf2cae4c
[gaim-migrate @ 10069]
Mike Stoddard <mistoddard@novell.com>
parents:
8933
diff
changeset
|
563 | * @return NM_OK if successfully sent, error otherwise |
|
196cbf2cae4c
[gaim-migrate @ 10069]
Mike Stoddard <mistoddard@novell.com>
parents:
8933
diff
changeset
|
564 | */ |
|
196cbf2cae4c
[gaim-migrate @ 10069]
Mike Stoddard <mistoddard@novell.com>
parents:
8933
diff
changeset
|
565 | NMERR_T |
|
196cbf2cae4c
[gaim-migrate @ 10069]
Mike Stoddard <mistoddard@novell.com>
parents:
8933
diff
changeset
|
566 | nm_send_keepalive(NMUser *user, nm_response_cb callback, gpointer data); |
|
196cbf2cae4c
[gaim-migrate @ 10069]
Mike Stoddard <mistoddard@novell.com>
parents:
8933
diff
changeset
|
567 | |
|
196cbf2cae4c
[gaim-migrate @ 10069]
Mike Stoddard <mistoddard@novell.com>
parents:
8933
diff
changeset
|
568 | /** |
| 8675 | 569 | * Reads a response/event from the server and processes it. |
| 570 | * | |
| 571 | * @param user The logged in User | |
| 572 | */ | |
| 573 | NMERR_T nm_process_new_data(NMUser * user); | |
| 574 | ||
|
8684
7ec649752daa
[gaim-migrate @ 9437]
Christian Hammond <chipx86@chipx86.com>
parents:
8675
diff
changeset
|
575 | /** |
| 8675 | 576 | * Return the root folder of the contact list |
| 577 | * | |
| 578 | * @param user The logged in User | |
| 579 | * | |
| 580 | * @return Root folder | |
| 581 | */ | |
| 582 | NMFolder *nm_get_root_folder(NMUser * user); | |
| 583 | ||
|
8684
7ec649752daa
[gaim-migrate @ 9437]
Christian Hammond <chipx86@chipx86.com>
parents:
8675
diff
changeset
|
584 | /** |
| 8675 | 585 | * Create the contact list based on the login fields |
| 586 | * | |
| 587 | * @param user The logged in User | |
| 588 | * | |
| 589 | */ | |
| 590 | NMERR_T nm_create_contact_list(NMUser * user); | |
| 591 | ||
| 592 | void nm_destroy_contact_list(NMUser * user); | |
| 593 | ||
| 594 | void nm_user_add_contact(NMUser * user, NMContact * contact); | |
| 595 | ||
| 596 | void nm_user_add_user_record(NMUser * user, NMUserRecord * user_record); | |
| 597 | ||
| 598 | NMContact *nm_find_contact(NMUser * user, const char *dn); | |
| 599 | ||
| 600 | GList *nm_find_contacts(NMUser * user, const char *dn); | |
| 601 | ||
| 602 | NMUserRecord *nm_find_user_record(NMUser * user, const char *dn); | |
| 603 | ||
| 604 | NMFolder *nm_find_folder(NMUser * user, const char *name); | |
| 605 | ||
| 606 | NMFolder *nm_find_folder_by_id(NMUser * user, int object_id); | |
| 607 | ||
| 608 | NMConference *nm_find_conversation(NMUser * user, const char *who); | |
| 609 | ||
| 610 | void nm_conference_list_add(NMUser * user, NMConference * conf); | |
| 611 | ||
| 612 | void nm_conference_list_remove(NMUser * user, NMConference * conf); | |
| 613 | ||
| 614 | void nm_conference_list_free(NMUser * user); | |
| 615 | ||
| 616 | NMConference *nm_conference_list_find(NMUser * user, const char *guid); | |
| 617 | ||
| 618 | const char *nm_lookup_dn(NMUser * user, const char *display_id); | |
| 619 | ||
| 620 | nm_event_cb nm_user_get_event_callback(NMUser * user); | |
| 621 | ||
| 622 | NMConn *nm_user_get_conn(NMUser * user); | |
| 623 | ||
|
8933
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
624 | gboolean nm_user_is_privacy_locked(NMUser *user); |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
625 | |
| 8675 | 626 | /** Some utility functions **/ |
| 627 | ||
| 628 | /** | |
|
8684
7ec649752daa
[gaim-migrate @ 9437]
Christian Hammond <chipx86@chipx86.com>
parents:
8675
diff
changeset
|
629 | * Check to see if the conference GUIDs are equivalent. |
| 8675 | 630 | * |
| 631 | * @param guid1 First guid to compare | |
| 632 | * @param guid2 Second guid to compare | |
| 633 | * | |
| 634 | * @return TRUE if conference GUIDs are equivalent, FALSE otherwise. | |
| 635 | * | |
| 636 | */ | |
| 637 | gboolean nm_are_guids_equal(const char *guid1, const char *guid2); | |
| 638 | ||
| 639 | /** | |
| 640 | * Compare UTF8 strings for equality only (case insensitive) | |
| 641 | * | |
| 642 | * @param guid1 First string to compare | |
| 643 | * @param guid2 Second string to compare | |
| 644 | * | |
| 645 | * @return TRUE if strings are equal, FALSE otherwise | |
| 646 | * | |
| 647 | */ | |
| 648 | gboolean nm_utf8_str_equal(gconstpointer str1, gconstpointer str2); | |
| 649 | ||
| 650 | /** | |
| 651 | * Convert a fully typed LDAP DN to dotted, untype notation | |
| 652 | * e.g. cn=mike,o=novell -> mike.novell | |
| 653 | * | |
| 654 | * @param typed Fully typed dn | |
| 655 | * | |
| 656 | * @return Dotted equivalent of typed (must be freed). | |
| 657 | * | |
| 658 | */ | |
| 659 | char *nm_typed_to_dotted(const char *typed); | |
| 660 | ||
|
8933
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
661 | /** |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
662 | * Return a string representation of the error code. |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
663 | * |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
664 | * @param error NMERR_T to convert to string |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
665 | * |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
666 | * @return String representation. |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
667 | */ |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
668 | const char *nm_error_to_string (NMERR_T err); |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8735
diff
changeset
|
669 | |
|
39819
3554dac2991b
Standardize all protocol header guard macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
19859
diff
changeset
|
670 | #endif /* PURPLE_NOVELL_NMUSER_H */ |