Wed, 25 May 2022 23:52:45 -0500
Remove prpl-gtalk from XMPP console
It no longer exists, and complicates the code a bit.
| 8675 | 1 | /* |
| 2 | * nmuserrecord.h | |
| 3 | * | |
|
8933
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8684
diff
changeset
|
4 | * Copyright (c) 2004 Novell, Inc. All Rights Reserved. |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8684
diff
changeset
|
5 | * |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8684
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:
8684
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:
8684
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:
8684
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:
8684
diff
changeset
|
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8684
diff
changeset
|
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
0f1e8160581d
[gaim-migrate @ 9703]
Mike Stoddard <mistoddard@novell.com>
parents:
8684
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:
8684
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:
8684
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_NMUSERRECORD_H |
|
3554dac2991b
Standardize all protocol header guard macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
19859
diff
changeset
|
22 | #define PURPLE_NOVELL_NMUSERRECORD_H |
| 8675 | 23 | |
| 24 | #include <glib.h> | |
| 25 | ||
| 26 | typedef struct _NMUserRecord NMUserRecord; | |
| 27 | ||
| 28 | #include "nmfield.h" | |
| 29 | #include "nmuser.h" | |
| 30 | ||
| 31 | /** | |
| 32 | * Creates an NMUserRecord | |
| 33 | * | |
| 34 | * The NMUserRecord should be released by calling | |
| 35 | * nm_release_user_record | |
| 36 | * | |
| 37 | * @return The new user record | |
| 38 | * | |
| 39 | */ | |
| 12323 | 40 | NMUserRecord *nm_create_user_record(void); |
| 8675 | 41 | |
| 42 | /** | |
| 43 | * Creates an NMUserRecord | |
| 44 | * | |
| 45 | * The NMUserRecord should be released by calling | |
|
8684
7ec649752daa
[gaim-migrate @ 9437]
Christian Hammond <chipx86@chipx86.com>
parents:
8675
diff
changeset
|
46 | * nm_release_user_record |
| 8675 | 47 | * |
| 48 | * @param details Should be a NM_A_FA_USER_DETAILS | |
| 49 | * | |
| 50 | * | |
| 51 | * @return The new user record | |
| 52 | * | |
| 53 | */ | |
| 54 | NMUserRecord *nm_create_user_record_from_fields(NMField * details); | |
| 55 | ||
| 56 | /** | |
| 57 | * Add a reference to an existing user_record | |
| 58 | * | |
| 59 | * The reference should be released by calling | |
|
8684
7ec649752daa
[gaim-migrate @ 9437]
Christian Hammond <chipx86@chipx86.com>
parents:
8675
diff
changeset
|
60 | * nm_release_user_record |
| 8675 | 61 | * |
| 62 | * @param user_record The contact to addref | |
| 63 | * | |
| 64 | */ | |
| 65 | void nm_user_record_add_ref(NMUserRecord * user_record); | |
| 66 | ||
| 67 | /** | |
| 68 | * Release a reference to the user record | |
| 69 | * | |
| 70 | * @param user_record The user record | |
| 71 | * | |
| 72 | */ | |
| 73 | void nm_release_user_record(NMUserRecord * user_record); | |
| 74 | ||
| 75 | /** | |
| 76 | * Set the status for the user record | |
| 77 | * | |
| 78 | * @param user_record The user record | |
| 79 | * @param status The status for the user | |
| 80 | * @param text The status text for the user | |
| 81 | * | |
| 82 | */ | |
| 83 | void nm_user_record_set_status(NMUserRecord * user_record, NMSTATUS_T status, | |
| 84 | const char *text); | |
| 85 | ||
| 86 | /** | |
| 87 | * Get the status for the user record | |
| 88 | * | |
| 89 | * @param user_record The user record | |
| 90 | * | |
| 91 | * @return The status for the user record | |
| 92 | */ | |
| 93 | NMSTATUS_T nm_user_record_get_status(NMUserRecord * user_record); | |
| 94 | ||
| 95 | /** | |
| 96 | * Get the status text for the user record | |
| 97 | * | |
| 98 | * @param user_record The user record | |
| 99 | * | |
| 100 | * @return The status text if there is any, NULL otherwise | |
| 101 | * | |
| 102 | */ | |
| 103 | const char *nm_user_record_get_status_text(NMUserRecord * user_record); | |
| 104 | ||
| 105 | /** | |
| 106 | * Set the DN for the user record | |
| 107 | * | |
| 108 | * @param user_record The user record | |
| 109 | * @param dn The new DN for the user record | |
| 110 | * | |
| 111 | */ | |
| 112 | void nm_user_record_set_dn(NMUserRecord * user_record, const char *dn); | |
| 113 | ||
| 114 | /** | |
| 115 | * Get the DN for the user record | |
| 116 | * | |
| 117 | * @param user_record The user record | |
| 118 | * | |
| 119 | * @return The DN for the user record | |
| 120 | */ | |
| 121 | const char *nm_user_record_get_dn(NMUserRecord * user_record); | |
| 122 | ||
| 123 | /** | |
|
8684
7ec649752daa
[gaim-migrate @ 9437]
Christian Hammond <chipx86@chipx86.com>
parents:
8675
diff
changeset
|
124 | * Set the user id for the |
| 8675 | 125 | * |
| 126 | * @param user_record The user record | |
| 127 | * @param userid The userid (CN) for the user record | |
| 128 | * | |
| 129 | */ | |
| 130 | void nm_user_record_set_userid(NMUserRecord * user_record, const char *userid); | |
| 131 | ||
| 132 | /** | |
| 133 | * Get the user id for the user record | |
| 134 | * | |
| 135 | * @param user_record The user record | |
| 136 | * | |
| 137 | * @return The user id for the user record | |
| 138 | */ | |
| 139 | const char *nm_user_record_get_userid(NMUserRecord * user_record); | |
| 140 | ||
| 141 | /** | |
| 142 | * Set the display id for the user record | |
| 143 | * | |
| 144 | * @param user_record The user record | |
| 145 | * @param display_id The new display id for the user | |
| 146 | * | |
| 147 | */ | |
| 148 | void nm_user_record_set_display_id(NMUserRecord * user_record, | |
| 149 | const char *display_id); | |
| 150 | ||
| 151 | /** | |
| 152 | * Get the display id for the user record | |
| 153 | * | |
| 154 | * @param user_record The user record | |
| 155 | * | |
| 156 | * @return The display id for the user record | |
| 157 | */ | |
| 158 | const char *nm_user_record_get_display_id(NMUserRecord * user_record); | |
| 159 | ||
| 160 | /** | |
| 161 | * Return whether or not the display id is an auth attribute or not. | |
| 162 | * | |
| 163 | * @param user_record The user record | |
| 164 | * | |
| 165 | * @return TRUE if display_id is an auth attribute, FALSE otherwise. | |
| 166 | */ | |
| 167 | gboolean | |
| 168 | nm_user_record_get_auth_attr(NMUserRecord *user_record); | |
| 169 | ||
| 170 | /** | |
| 171 | * Get the full name for the user record | |
| 172 | * | |
| 173 | * @param user_record The user record | |
| 174 | * | |
| 175 | * @return The full name for the user | |
| 176 | */ | |
| 177 | const char *nm_user_record_get_full_name(NMUserRecord * user_record); | |
| 178 | ||
| 179 | /** | |
| 180 | * Get the first name for the user record | |
| 181 | * | |
| 182 | * @param user_record The user record | |
| 183 | * | |
| 184 | * @return The first name for the user | |
| 185 | */ | |
| 186 | const char *nm_user_record_get_first_name(NMUserRecord * user_record); | |
| 187 | ||
| 188 | /** | |
| 189 | * Get the last name for the user record | |
| 190 | * | |
| 191 | * @param user_record The user record | |
|
8684
7ec649752daa
[gaim-migrate @ 9437]
Christian Hammond <chipx86@chipx86.com>
parents:
8675
diff
changeset
|
192 | * |
| 8675 | 193 | * @return The last name for the user |
| 194 | */ | |
| 195 | const char *nm_user_record_get_last_name(NMUserRecord * user_record); | |
| 196 | ||
| 197 | /** | |
| 198 | * Set the user defined data for the user record | |
| 199 | * | |
| 200 | * @param user_record The user record | |
| 201 | * @param data The user defined data for the user record | |
|
8684
7ec649752daa
[gaim-migrate @ 9437]
Christian Hammond <chipx86@chipx86.com>
parents:
8675
diff
changeset
|
202 | * |
| 8675 | 203 | */ |
| 204 | void nm_user_record_set_data(NMUserRecord * user_record, gpointer data); | |
| 205 | ||
| 206 | /** | |
| 207 | * Get the user defined data for the user record | |
| 208 | * | |
| 209 | * @param user_record The user record | |
| 210 | * | |
| 211 | * @return The user defined data for the user record | |
| 212 | */ | |
| 213 | gpointer nm_user_record_get_data(NMUserRecord * user_record); | |
| 214 | ||
| 215 | /** | |
| 216 | * Get the property count for the user record | |
| 217 | * | |
| 218 | * @param user_record The user record | |
| 219 | * | |
| 220 | * @return The number of information properties for the user record | |
| 221 | * | |
| 222 | */ | |
| 223 | int nm_user_record_get_property_count(NMUserRecord * user_record); | |
| 224 | ||
| 225 | /** | |
| 226 | * Get an info property for the user record. The property must be released | |
|
40780
3c037af432c4
Replace NMProperty with PurpleKeyValuePair
Arkadiy Illarionov <qarkai@gmail.com>
parents:
39819
diff
changeset
|
227 | * by calling purple_key_value_pair_free() |
| 8675 | 228 | * |
| 229 | * @param user_record The user record | |
| 230 | * @param index The index of the property to get (zero based) | |
| 231 | * | |
| 232 | * @return The property | |
| 233 | */ | |
|
40780
3c037af432c4
Replace NMProperty with PurpleKeyValuePair
Arkadiy Illarionov <qarkai@gmail.com>
parents:
39819
diff
changeset
|
234 | PurpleKeyValuePair *nm_user_record_get_property(NMUserRecord * user_record, int index); |
| 8675 | 235 | |
| 236 | /** | |
| 237 | * Copy a user record (deep copy). The dest user record must have already been | |
| 238 | * created (nm_create_user_record) | |
| 239 | * | |
| 240 | * @param dest The destination of the copy | |
| 241 | * @param src The source of the copy | |
| 242 | * | |
| 243 | */ | |
| 244 | void nm_user_record_copy(NMUserRecord * dest, NMUserRecord * src); | |
| 245 | ||
|
39819
3554dac2991b
Standardize all protocol header guard macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
19859
diff
changeset
|
246 | #endif /* PURPLE_NOVELL_NMUSERRECORD_H */ |