00001
00025 #ifndef _PURPLE_PRIVACY_H_
00026 #define _PURPLE_PRIVACY_H_
00027
00028 #include "account.h"
00029
00033 typedef enum _PurplePrivacyType
00034 {
00035 PURPLE_PRIVACY_ALLOW_ALL = 1,
00036 PURPLE_PRIVACY_DENY_ALL,
00037 PURPLE_PRIVACY_ALLOW_USERS,
00038 PURPLE_PRIVACY_DENY_USERS,
00039 PURPLE_PRIVACY_ALLOW_BUDDYLIST
00040 } PurplePrivacyType;
00041
00042 #ifdef __cplusplus
00043 extern "C" {
00044 #endif
00045
00049 typedef struct
00050 {
00051 void (*permit_added)(PurpleAccount *account, const char *name);
00052 void (*permit_removed)(PurpleAccount *account, const char *name);
00053 void (*deny_added)(PurpleAccount *account, const char *name);
00054 void (*deny_removed)(PurpleAccount *account, const char *name);
00055
00056 void (*_purple_reserved1)(void);
00057 void (*_purple_reserved2)(void);
00058 void (*_purple_reserved3)(void);
00059 void (*_purple_reserved4)(void);
00060 } PurplePrivacyUiOps;
00061
00072 gboolean purple_privacy_permit_add(PurpleAccount *account, const char *name,
00073 gboolean local_only);
00074
00085 gboolean purple_privacy_permit_remove(PurpleAccount *account, const char *name,
00086 gboolean local_only);
00087
00098 gboolean purple_privacy_deny_add(PurpleAccount *account, const char *name,
00099 gboolean local_only);
00100
00111 gboolean purple_privacy_deny_remove(PurpleAccount *account, const char *name,
00112 gboolean local_only);
00113
00134 void purple_privacy_allow(PurpleAccount *account, const char *who, gboolean local,
00135 gboolean restore);
00136
00157 void purple_privacy_deny(PurpleAccount *account, const char *who, gboolean local,
00158 gboolean restore);
00159
00168 gboolean purple_privacy_check(PurpleAccount *account, const char *who);
00169
00175 void purple_privacy_set_ui_ops(PurplePrivacyUiOps *ops);
00176
00182 PurplePrivacyUiOps *purple_privacy_get_ui_ops(void);
00183
00187 void purple_privacy_init(void);
00188
00189 #ifdef __cplusplus
00190 }
00191 #endif
00192
00193 #endif