libpurple/privacy.h

Wed, 23 May 2007 03:59:19 +0000

author
Daniel Atallah <datallah@pidgin.im>
date
Wed, 23 May 2007 03:59:19 +0000
changeset 17293
2b7fbca58d92
parent 16743
1ce5ffe12e2a
child 18068
b6554e3c8224
child 19859
71d37b57eff2
permissions
-rw-r--r--

Fix file transfers aborting and mistakenly being marked as cancelled when they are actually complete. Fixes #814

6371
e92b66ee5518 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
1 /**
e92b66ee5518 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
2 * @file privacy.h Privacy API
e92b66ee5518 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
3 * @ingroup core
e92b66ee5518 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
4 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
5 * purple
4687
91ad36873636 [gaim-migrate @ 4998]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
6 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
7 * Purple is the legal property of its developers, whose names are too numerous
8046
c581b20a47d6 [gaim-migrate @ 8730]
Sean Egan <seanegan@pidgin.im>
parents: 7035
diff changeset
8 * to list here. Please refer to the COPYRIGHT file distributed with this
c581b20a47d6 [gaim-migrate @ 8730]
Sean Egan <seanegan@pidgin.im>
parents: 7035
diff changeset
9 * source distribution.
8307
8663aff7b973 [gaim-migrate @ 9031]
Christian Hammond <chipx86@chipx86.com>
parents: 8175
diff changeset
10 *
4687
91ad36873636 [gaim-migrate @ 4998]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
11 * This program is free software; you can redistribute it and/or modify
91ad36873636 [gaim-migrate @ 4998]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
12 * it under the terms of the GNU General Public License as published by
91ad36873636 [gaim-migrate @ 4998]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
13 * the Free Software Foundation; either version 2 of the License, or
91ad36873636 [gaim-migrate @ 4998]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
14 * (at your option) any later version.
91ad36873636 [gaim-migrate @ 4998]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
15 *
91ad36873636 [gaim-migrate @ 4998]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
16 * This program is distributed in the hope that it will be useful,
91ad36873636 [gaim-migrate @ 4998]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
91ad36873636 [gaim-migrate @ 4998]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
91ad36873636 [gaim-migrate @ 4998]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
19 * GNU General Public License for more details.
91ad36873636 [gaim-migrate @ 4998]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
20 *
91ad36873636 [gaim-migrate @ 4998]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
21 * You should have received a copy of the GNU General Public License
91ad36873636 [gaim-migrate @ 4998]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
22 * along with this program; if not, write to the Free Software
91ad36873636 [gaim-migrate @ 4998]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
91ad36873636 [gaim-migrate @ 4998]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
24 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
25 #ifndef _PURPLE_PRIVACY_H_
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
26 #define _PURPLE_PRIVACY_H_
5944
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
27
6371
e92b66ee5518 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
28 #include "account.h"
e92b66ee5518 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
29
8175
4e79974d452c [gaim-migrate @ 8889]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
30 /**
4e79974d452c [gaim-migrate @ 8889]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
31 * Privacy data types.
4e79974d452c [gaim-migrate @ 8889]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
32 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
33 typedef enum _PurplePrivacyType
8175
4e79974d452c [gaim-migrate @ 8889]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
34 {
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
35 PURPLE_PRIVACY_ALLOW_ALL = 1,
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
36 PURPLE_PRIVACY_DENY_ALL,
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
37 PURPLE_PRIVACY_ALLOW_USERS,
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
38 PURPLE_PRIVACY_DENY_USERS,
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
39 PURPLE_PRIVACY_ALLOW_BUDDYLIST
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
40 } PurplePrivacyType;
8175
4e79974d452c [gaim-migrate @ 8889]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
41
5944
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
42 #ifdef __cplusplus
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
43 extern "C" {
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
44 #endif
4687
91ad36873636 [gaim-migrate @ 4998]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
45
6371
e92b66ee5518 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
46 /**
e92b66ee5518 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
47 * Privacy core/UI operations.
e92b66ee5518 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
48 */
e92b66ee5518 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
49 typedef struct
e92b66ee5518 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
50 {
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
51 void (*permit_added)(PurpleAccount *account, const char *name);
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
52 void (*permit_removed)(PurpleAccount *account, const char *name);
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
53 void (*deny_added)(PurpleAccount *account, const char *name);
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
54 void (*deny_removed)(PurpleAccount *account, const char *name);
6371
e92b66ee5518 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
55
16743
1ce5ffe12e2a Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents: 15884
diff changeset
56 void (*_purple_reserved1)(void);
1ce5ffe12e2a Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents: 15884
diff changeset
57 void (*_purple_reserved2)(void);
1ce5ffe12e2a Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents: 15884
diff changeset
58 void (*_purple_reserved3)(void);
1ce5ffe12e2a Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents: 15884
diff changeset
59 void (*_purple_reserved4)(void);
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
60 } PurplePrivacyUiOps;
6371
e92b66ee5518 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
61
e92b66ee5518 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
62 /**
e92b66ee5518 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
63 * Adds a user to the account's permit list.
e92b66ee5518 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
64 *
6378
233d1294508f [gaim-migrate @ 6883]
Christian Hammond <chipx86@chipx86.com>
parents: 6371
diff changeset
65 * @param account The account.
6720
cdc5348dd848 [gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents: 6379
diff changeset
66 * @param name The name of the user to add to the list.
6378
233d1294508f [gaim-migrate @ 6883]
Christian Hammond <chipx86@chipx86.com>
parents: 6371
diff changeset
67 * @param local_only If TRUE, only the local list is updated, and not
233d1294508f [gaim-migrate @ 6883]
Christian Hammond <chipx86@chipx86.com>
parents: 6371
diff changeset
68 * the server.
6371
e92b66ee5518 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
69 *
e92b66ee5518 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
70 * @return TRUE if the user was added successfully, or @c FALSE otherwise.
e92b66ee5518 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
71 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
72 gboolean purple_privacy_permit_add(PurpleAccount *account, const char *name,
6378
233d1294508f [gaim-migrate @ 6883]
Christian Hammond <chipx86@chipx86.com>
parents: 6371
diff changeset
73 gboolean local_only);
6371
e92b66ee5518 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
74
e92b66ee5518 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
75 /**
e92b66ee5518 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
76 * Removes a user from the account's permit list.
e92b66ee5518 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
77 *
6378
233d1294508f [gaim-migrate @ 6883]
Christian Hammond <chipx86@chipx86.com>
parents: 6371
diff changeset
78 * @param account The account.
6720
cdc5348dd848 [gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents: 6379
diff changeset
79 * @param name The name of the user to add to the list.
6378
233d1294508f [gaim-migrate @ 6883]
Christian Hammond <chipx86@chipx86.com>
parents: 6371
diff changeset
80 * @param local_only If TRUE, only the local list is updated, and not
233d1294508f [gaim-migrate @ 6883]
Christian Hammond <chipx86@chipx86.com>
parents: 6371
diff changeset
81 * the server.
6371
e92b66ee5518 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
82 *
e92b66ee5518 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
83 * @return TRUE if the user was removed successfully, or @c FALSE otherwise.
e92b66ee5518 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
84 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
85 gboolean purple_privacy_permit_remove(PurpleAccount *account, const char *name,
6379
60e805354d1e [gaim-migrate @ 6884]
Christian Hammond <chipx86@chipx86.com>
parents: 6378
diff changeset
86 gboolean local_only);
6371
e92b66ee5518 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
87
e92b66ee5518 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
88 /**
e92b66ee5518 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
89 * Adds a user to the account's deny list.
e92b66ee5518 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
90 *
6378
233d1294508f [gaim-migrate @ 6883]
Christian Hammond <chipx86@chipx86.com>
parents: 6371
diff changeset
91 * @param account The account.
6720
cdc5348dd848 [gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents: 6379
diff changeset
92 * @param name The name of the user to add to the list.
6378
233d1294508f [gaim-migrate @ 6883]
Christian Hammond <chipx86@chipx86.com>
parents: 6371
diff changeset
93 * @param local_only If TRUE, only the local list is updated, and not
233d1294508f [gaim-migrate @ 6883]
Christian Hammond <chipx86@chipx86.com>
parents: 6371
diff changeset
94 * the server.
6371
e92b66ee5518 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
95 *
e92b66ee5518 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
96 * @return TRUE if the user was added successfully, or @c FALSE otherwise.
e92b66ee5518 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
97 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
98 gboolean purple_privacy_deny_add(PurpleAccount *account, const char *name,
6379
60e805354d1e [gaim-migrate @ 6884]
Christian Hammond <chipx86@chipx86.com>
parents: 6378
diff changeset
99 gboolean local_only);
6371
e92b66ee5518 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
100
e92b66ee5518 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
101 /**
e92b66ee5518 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
102 * Removes a user from the account's deny list.
e92b66ee5518 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
103 *
6378
233d1294508f [gaim-migrate @ 6883]
Christian Hammond <chipx86@chipx86.com>
parents: 6371
diff changeset
104 * @param account The account.
6720
cdc5348dd848 [gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents: 6379
diff changeset
105 * @param name The name of the user to add to the list.
6378
233d1294508f [gaim-migrate @ 6883]
Christian Hammond <chipx86@chipx86.com>
parents: 6371
diff changeset
106 * @param local_only If TRUE, only the local list is updated, and not
233d1294508f [gaim-migrate @ 6883]
Christian Hammond <chipx86@chipx86.com>
parents: 6371
diff changeset
107 * the server.
6371
e92b66ee5518 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
108 *
e92b66ee5518 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
109 * @return TRUE if the user was removed successfully, or @c FALSE otherwise.
e92b66ee5518 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
110 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
111 gboolean purple_privacy_deny_remove(PurpleAccount *account, const char *name,
6379
60e805354d1e [gaim-migrate @ 6884]
Christian Hammond <chipx86@chipx86.com>
parents: 6378
diff changeset
112 gboolean local_only);
6371
e92b66ee5518 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
113
15380
1171796358b3 [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14254
diff changeset
114 /**
1171796358b3 [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14254
diff changeset
115 * Allow a user to send messages. If current privacy setting for the account is:
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
116 * PURPLE_PRIVACY_ALLOW_USERS: The user is added to the allow-list.
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
117 * PURPLE_PRIVACY_DENY_USERS : The user is removed from the deny-list.
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
118 * PURPLE_PRIVACY_ALLOW_ALL : No changes made.
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
119 * PURPLE_PRIVACY_DENY_ALL : The privacy setting is changed to
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
120 * PURPLE_PRIVACY_ALLOW_USERS and the user
15380
1171796358b3 [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14254
diff changeset
121 * is added to the allow-list.
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
122 * PURPLE_PRIVACY_ALLOW_BUDDYLIST: No changes made if the user is already in
15380
1171796358b3 [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14254
diff changeset
123 * the buddy-list. Otherwise the setting is
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
124 * changed to PURPLE_PRIVACY_ALLOW_USERS, all the
15380
1171796358b3 [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14254
diff changeset
125 * buddies are added to the allow-list, and the
1171796358b3 [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14254
diff changeset
126 * user is also added to the allow-list.
1171796358b3 [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14254
diff changeset
127 *
1171796358b3 [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14254
diff changeset
128 * @param account The account.
1171796358b3 [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14254
diff changeset
129 * @param who The name of the user.
1171796358b3 [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14254
diff changeset
130 * @param local Whether the change is local-only.
1171796358b3 [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14254
diff changeset
131 * @param restore Should the previous allow/deny list be restored if the
1171796358b3 [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14254
diff changeset
132 * privacy setting is changed.
1171796358b3 [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14254
diff changeset
133 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
134 void purple_privacy_allow(PurpleAccount *account, const char *who, gboolean local,
15380
1171796358b3 [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14254
diff changeset
135 gboolean restore);
1171796358b3 [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14254
diff changeset
136
1171796358b3 [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14254
diff changeset
137 /**
1171796358b3 [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14254
diff changeset
138 * Block messages from a user. If current privacy setting for the account is:
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
139 * PURPLE_PRIVACY_ALLOW_USERS: The user is removed from the allow-list.
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
140 * PURPLE_PRIVACY_DENY_USERS : The user is added to the deny-list.
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
141 * PURPLE_PRIVACY_DENY_ALL : No changes made.
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
142 * PURPLE_PRIVACY_ALLOW_ALL : The privacy setting is changed to
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
143 * PURPLE_PRIVACY_DENY_USERS and the user is
15380
1171796358b3 [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14254
diff changeset
144 * added to the deny-list.
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
145 * PURPLE_PRIVACY_ALLOW_BUDDYLIST: If the user is not in the buddy-list,
15380
1171796358b3 [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14254
diff changeset
146 * then no changes made. Otherwise, the setting
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
147 * is changed to PURPLE_PRIVACY_ALLOW_USERS, all
15380
1171796358b3 [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14254
diff changeset
148 * the buddies are added to the allow-list, and
1171796358b3 [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14254
diff changeset
149 * this user is removed from the list.
1171796358b3 [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14254
diff changeset
150 *
1171796358b3 [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14254
diff changeset
151 * @param account The account.
1171796358b3 [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14254
diff changeset
152 * @param who The name of the user.
1171796358b3 [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14254
diff changeset
153 * @param local Whether the change is local-only.
1171796358b3 [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14254
diff changeset
154 * @param restore Should the previous allow/deny list be restored if the
1171796358b3 [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14254
diff changeset
155 * privacy setting is changed.
1171796358b3 [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14254
diff changeset
156 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
157 void purple_privacy_deny(PurpleAccount *account, const char *who, gboolean local,
15380
1171796358b3 [gaim-migrate @ 18109]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14254
diff changeset
158 gboolean restore);
11111
4621d9b973a4 [gaim-migrate @ 13163]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 8307
diff changeset
159
4621d9b973a4 [gaim-migrate @ 13163]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 8307
diff changeset
160 /**
4621d9b973a4 [gaim-migrate @ 13163]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 8307
diff changeset
161 * Check the privacy-setting for a user.
4621d9b973a4 [gaim-migrate @ 13163]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 8307
diff changeset
162 *
4621d9b973a4 [gaim-migrate @ 13163]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 8307
diff changeset
163 * @param account The account.
4621d9b973a4 [gaim-migrate @ 13163]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 8307
diff changeset
164 * @param who The name of the user.
4621d9b973a4 [gaim-migrate @ 13163]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 8307
diff changeset
165 *
11122
28eadeadf52a [gaim-migrate @ 13178]
Richard Laager <rlaager@pidgin.im>
parents: 11111
diff changeset
166 * @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.
11111
4621d9b973a4 [gaim-migrate @ 13163]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 8307
diff changeset
167 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
168 gboolean purple_privacy_check(PurpleAccount *account, const char *who);
11111
4621d9b973a4 [gaim-migrate @ 13163]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 8307
diff changeset
169
6371
e92b66ee5518 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
170 /**
e92b66ee5518 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
171 * Sets the UI operations structure for the privacy subsystem.
e92b66ee5518 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
172 *
e92b66ee5518 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
173 * @param ops The UI operations structure.
e92b66ee5518 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
174 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
175 void purple_privacy_set_ui_ops(PurplePrivacyUiOps *ops);
6371
e92b66ee5518 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
176
e92b66ee5518 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
177 /**
e92b66ee5518 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
178 * Returns the UI operations structure for the privacy subsystem.
e92b66ee5518 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
179 *
e92b66ee5518 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
180 * @return The UI operations structure.
e92b66ee5518 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
181 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
182 PurplePrivacyUiOps *purple_privacy_get_ui_ops(void);
6371
e92b66ee5518 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
183
e92b66ee5518 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
184 /**
e92b66ee5518 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
185 * Initializes the privacy subsystem.
e92b66ee5518 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
186 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
187 void purple_privacy_init(void);
5944
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
188
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
189 #ifdef __cplusplus
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
190 }
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
191 #endif
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
192
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
193 #endif /* _PURPLE_PRIVACY_H_ */

mercurial