privacy.h

Go to the documentation of this file.
00001 
00006 /* purple
00007  *
00008  * Purple is the legal property of its developers, whose names are too numerous
00009  * to list here.  Please refer to the COPYRIGHT file distributed with this
00010  * source distribution.
00011  *
00012  * This program is free software; you can redistribute it and/or modify
00013  * it under the terms of the GNU General Public License as published by
00014  * the Free Software Foundation; either version 2 of the License, or
00015  * (at your option) any later version.
00016  *
00017  * This program is distributed in the hope that it will be useful,
00018  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00019  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020  * GNU General Public License for more details.
00021  *
00022  * You should have received a copy of the GNU General Public License
00023  * along with this program; if not, write to the Free Software
00024  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
00025  */
00026 #ifndef _PURPLE_PRIVACY_H_
00027 #define _PURPLE_PRIVACY_H_
00028 
00029 #include "account.h"
00030 
00034 typedef enum _PurplePrivacyType
00035 {
00036     PURPLE_PRIVACY_ALLOW_ALL = 1,
00037     PURPLE_PRIVACY_DENY_ALL,
00038     PURPLE_PRIVACY_ALLOW_USERS,
00039     PURPLE_PRIVACY_DENY_USERS,
00040     PURPLE_PRIVACY_ALLOW_BUDDYLIST
00041 } PurplePrivacyType;
00042 
00043 #ifdef __cplusplus
00044 extern "C" {
00045 #endif
00046 
00050 typedef struct
00051 {
00052     void (*permit_added)(PurpleAccount *account, const char *name);
00053     void (*permit_removed)(PurpleAccount *account, const char *name);
00054     void (*deny_added)(PurpleAccount *account, const char *name);
00055     void (*deny_removed)(PurpleAccount *account, const char *name);
00056 
00057     void (*_purple_reserved1)(void);
00058     void (*_purple_reserved2)(void);
00059     void (*_purple_reserved3)(void);
00060     void (*_purple_reserved4)(void);
00061 } PurplePrivacyUiOps;
00062 
00073 gboolean purple_privacy_permit_add(PurpleAccount *account, const char *name,
00074                                  gboolean local_only);
00075 
00086 gboolean purple_privacy_permit_remove(PurpleAccount *account, const char *name,
00087                                     gboolean local_only);
00088 
00099 gboolean purple_privacy_deny_add(PurpleAccount *account, const char *name,
00100                                gboolean local_only);
00101 
00112 gboolean purple_privacy_deny_remove(PurpleAccount *account, const char *name,
00113                                   gboolean local_only);
00114 
00135 void purple_privacy_allow(PurpleAccount *account, const char *who, gboolean local,
00136                         gboolean restore);
00137 
00158 void purple_privacy_deny(PurpleAccount *account, const char *who, gboolean local,
00159                         gboolean restore);
00160 
00169 gboolean purple_privacy_check(PurpleAccount *account, const char *who);
00170 
00176 void purple_privacy_set_ui_ops(PurplePrivacyUiOps *ops);
00177 
00183 PurplePrivacyUiOps *purple_privacy_get_ui_ops(void);
00184 
00188 void purple_privacy_init(void);
00189 
00190 #ifdef __cplusplus
00191 }
00192 #endif
00193 
00194 #endif /* _PURPLE_PRIVACY_H_ */