annotate libgaim/privacy.h @ 15323:99dcbb8c4557

[gaim-migrate @ 18114] Patch #1575852 from Denis Washington to fix group count display in the buddy list when expanding/collapsing the groups. committer: Tailor Script <tailor@pidgin.im>
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Fri, 12 Jan 2007 17:43:25 +0000
parents b17a907065cc
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
14192
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
1 /**
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
2 * @file privacy.h Privacy API
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
3 * @ingroup core
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
4 *
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
5 * gaim
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
6 *
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
7 * Gaim is the legal property of its developers, whose names are too numerous
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
8 * to list here. Please refer to the COPYRIGHT file distributed with this
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
9 * source distribution.
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
10 *
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
11 * This program is free software; you can redistribute it and/or modify
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
12 * it under the terms of the GNU General Public License as published by
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
13 * the Free Software Foundation; either version 2 of the License, or
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
14 * (at your option) any later version.
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
15 *
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
16 * This program is distributed in the hope that it will be useful,
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
19 * GNU General Public License for more details.
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
20 *
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
21 * You should have received a copy of the GNU General Public License
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
22 * along with this program; if not, write to the Free Software
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
24 */
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
25 #ifndef _GAIM_PRIVACY_H_
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
26 #define _GAIM_PRIVACY_H_
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
27
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
28 #include "account.h"
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
29
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
30 /**
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
31 * Privacy data types.
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
32 */
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
33 typedef enum _GaimPrivacyType
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
34 {
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
35 GAIM_PRIVACY_ALLOW_ALL = 1,
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
36 GAIM_PRIVACY_DENY_ALL,
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
37 GAIM_PRIVACY_ALLOW_USERS,
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
38 GAIM_PRIVACY_DENY_USERS,
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
39 GAIM_PRIVACY_ALLOW_BUDDYLIST
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
40 } GaimPrivacyType;
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
41
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
42 #ifdef __cplusplus
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
43 extern "C" {
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
44 #endif
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
45
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
46 /**
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
47 * Privacy core/UI operations.
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
48 */
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
49 typedef struct
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
50 {
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
51 void (*permit_added)(GaimAccount *account, const char *name);
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
52 void (*permit_removed)(GaimAccount *account, const char *name);
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
53 void (*deny_added)(GaimAccount *account, const char *name);
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
54 void (*deny_removed)(GaimAccount *account, const char *name);
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
55
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
56 } GaimPrivacyUiOps;
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
57
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
58 /**
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
59 * Adds a user to the account's permit list.
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
60 *
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
61 * @param account The account.
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
62 * @param name The name of the user to add to the list.
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
63 * @param local_only If TRUE, only the local list is updated, and not
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
64 * the server.
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
65 *
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
66 * @return TRUE if the user was added successfully, or @c FALSE otherwise.
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
67 */
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
68 gboolean gaim_privacy_permit_add(GaimAccount *account, const char *name,
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
69 gboolean local_only);
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
70
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
71 /**
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
72 * Removes a user from the account's permit list.
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
73 *
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
74 * @param account The account.
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
75 * @param name The name of the user to add to the list.
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
76 * @param local_only If TRUE, only the local list is updated, and not
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
77 * the server.
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
78 *
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
79 * @return TRUE if the user was removed successfully, or @c FALSE otherwise.
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
80 */
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
81 gboolean gaim_privacy_permit_remove(GaimAccount *account, const char *name,
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
82 gboolean local_only);
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
83
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
84 /**
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
85 * Adds a user to the account's deny list.
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
86 *
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
87 * @param account The account.
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
88 * @param name The name of the user to add to the list.
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
89 * @param local_only If TRUE, only the local list is updated, and not
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
90 * the server.
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
91 *
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
92 * @return TRUE if the user was added successfully, or @c FALSE otherwise.
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
93 */
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
94 gboolean gaim_privacy_deny_add(GaimAccount *account, const char *name,
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
95 gboolean local_only);
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
96
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
97 /**
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
98 * Removes a user from the account's deny list.
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
99 *
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
100 * @param account The account.
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
101 * @param name The name of the user to add to the list.
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
102 * @param local_only If TRUE, only the local list is updated, and not
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
103 * the server.
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
104 *
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
105 * @return TRUE if the user was removed successfully, or @c FALSE otherwise.
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
106 */
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
107 gboolean gaim_privacy_deny_remove(GaimAccount *account, const char *name,
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
108 gboolean local_only);
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
109
15318
b17a907065cc [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14192
diff changeset
110 /**
b17a907065cc [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14192
diff changeset
111 * Allow a user to send messages. If current privacy setting for the account is:
b17a907065cc [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14192
diff changeset
112 * GAIM_PRIVACY_ALLOW_USERS: The user is added to the allow-list.
b17a907065cc [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14192
diff changeset
113 * GAIM_PRIVACY_DENY_USERS : The user is removed from the deny-list.
b17a907065cc [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14192
diff changeset
114 * GAIM_PRIVACY_ALLOW_ALL : No changes made.
b17a907065cc [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14192
diff changeset
115 * GAIM_PRIVACY_DENY_ALL : The privacy setting is changed to
b17a907065cc [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14192
diff changeset
116 * GAIM_PRIVACY_ALLOW_USERS and the user
b17a907065cc [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14192
diff changeset
117 * is added to the allow-list.
b17a907065cc [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14192
diff changeset
118 * GAIM_PRIVACY_ALLOW_BUDDYLIST: No changes made if the user is already in
b17a907065cc [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14192
diff changeset
119 * the buddy-list. Otherwise the setting is
b17a907065cc [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14192
diff changeset
120 * changed to GAIM_PRIVACY_ALLOW_USERS, all the
b17a907065cc [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14192
diff changeset
121 * buddies are added to the allow-list, and the
b17a907065cc [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14192
diff changeset
122 * user is also added to the allow-list.
b17a907065cc [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14192
diff changeset
123 *
b17a907065cc [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14192
diff changeset
124 * @param account The account.
b17a907065cc [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14192
diff changeset
125 * @param who The name of the user.
b17a907065cc [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14192
diff changeset
126 * @param local Whether the change is local-only.
b17a907065cc [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14192
diff changeset
127 * @param restore Should the previous allow/deny list be restored if the
b17a907065cc [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14192
diff changeset
128 * privacy setting is changed.
b17a907065cc [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14192
diff changeset
129 */
b17a907065cc [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14192
diff changeset
130 void gaim_privacy_allow(GaimAccount *account, const char *who, gboolean local,
b17a907065cc [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14192
diff changeset
131 gboolean restore);
b17a907065cc [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14192
diff changeset
132
b17a907065cc [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14192
diff changeset
133 /**
b17a907065cc [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14192
diff changeset
134 * Block messages from a user. If current privacy setting for the account is:
b17a907065cc [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14192
diff changeset
135 * GAIM_PRIVACY_ALLOW_USERS: The user is removed from the allow-list.
b17a907065cc [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14192
diff changeset
136 * GAIM_PRIVACY_DENY_USERS : The user is added to the deny-list.
b17a907065cc [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14192
diff changeset
137 * GAIM_PRIVACY_DENY_ALL : No changes made.
b17a907065cc [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14192
diff changeset
138 * GAIM_PRIVACY_ALLOW_ALL : The privacy setting is changed to
b17a907065cc [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14192
diff changeset
139 * GAIM_PRIVACY_DENY_USERS and the user is
b17a907065cc [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14192
diff changeset
140 * added to the deny-list.
b17a907065cc [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14192
diff changeset
141 * GAIM_PRIVACY_ALLOW_BUDDYLIST: If the user is not in the buddy-list,
b17a907065cc [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14192
diff changeset
142 * then no changes made. Otherwise, the setting
b17a907065cc [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14192
diff changeset
143 * is changed to GAIM_PRIVACY_ALLOW_USERS, all
b17a907065cc [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14192
diff changeset
144 * the buddies are added to the allow-list, and
b17a907065cc [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14192
diff changeset
145 * this user is removed from the list.
b17a907065cc [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14192
diff changeset
146 *
b17a907065cc [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14192
diff changeset
147 * @param account The account.
b17a907065cc [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14192
diff changeset
148 * @param who The name of the user.
b17a907065cc [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14192
diff changeset
149 * @param local Whether the change is local-only.
b17a907065cc [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14192
diff changeset
150 * @param restore Should the previous allow/deny list be restored if the
b17a907065cc [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14192
diff changeset
151 * privacy setting is changed.
b17a907065cc [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14192
diff changeset
152 */
b17a907065cc [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14192
diff changeset
153 void gaim_privacy_deny(GaimAccount *account, const char *who, gboolean local,
b17a907065cc [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14192
diff changeset
154 gboolean restore);
14192
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
155
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
156 /**
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
157 * Check the privacy-setting for a user.
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
158 *
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
159 * @param account The account.
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
160 * @param who The name of the user.
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
161 *
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
162 * @return @c FALSE if the specified account's privacy settings block the user or @c TRUE otherwise. The meaning of "block" is protocol-dependent and generally relates to status and/or sending of messages.
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
163 */
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
164 gboolean gaim_privacy_check(GaimAccount *account, const char *who);
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
165
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
166 /**
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
167 * Sets the UI operations structure for the privacy subsystem.
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
168 *
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
169 * @param ops The UI operations structure.
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
170 */
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
171 void gaim_privacy_set_ui_ops(GaimPrivacyUiOps *ops);
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
172
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
173 /**
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
174 * Returns the UI operations structure for the privacy subsystem.
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
175 *
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
176 * @return The UI operations structure.
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
177 */
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
178 GaimPrivacyUiOps *gaim_privacy_get_ui_ops(void);
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
179
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
180 /**
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
181 * Initializes the privacy subsystem.
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
182 */
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
183 void gaim_privacy_init(void);
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
184
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
185 #ifdef __cplusplus
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
186 }
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
187 #endif
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
188
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
189 #endif /* _GAIM_PRIVACY_H_ */