privacy.h
Go to the documentation of this file.
/* purple
*
* Purple is the legal property of its developers, whose names are too numerous
* to list here. Please refer to the COPYRIGHT file distributed with this
* source distribution.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
*/
#ifndef _PURPLE_PRIVACY_H_
#define _PURPLE_PRIVACY_H_
typedef enum _PurplePrivacyType
{
PURPLE_PRIVACY_ALLOW_ALL = 1,
PURPLE_PRIVACY_DENY_ALL,
PURPLE_PRIVACY_ALLOW_USERS,
PURPLE_PRIVACY_DENY_USERS,
PURPLE_PRIVACY_ALLOW_BUDDYLIST
} PurplePrivacyType;
#include "account.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct
{
void (*permit_added)(PurpleAccount *account, const char *name);
void (*permit_removed)(PurpleAccount *account, const char *name);
void (*deny_added)(PurpleAccount *account, const char *name);
void (*deny_removed)(PurpleAccount *account, const char *name);
void (*_purple_reserved1)(void);
void (*_purple_reserved2)(void);
void (*_purple_reserved3)(void);
void (*_purple_reserved4)(void);
} PurplePrivacyUiOps;
gboolean purple_privacy_permit_add(PurpleAccount *account, const char *name,
gboolean local_only);
gboolean purple_privacy_permit_remove(PurpleAccount *account, const char *name,
gboolean local_only);
gboolean purple_privacy_deny_add(PurpleAccount *account, const char *name,
gboolean local_only);
gboolean purple_privacy_deny_remove(PurpleAccount *account, const char *name,
gboolean local_only);
void purple_privacy_allow(PurpleAccount *account, const char *who, gboolean local,
gboolean restore);
void purple_privacy_deny(PurpleAccount *account, const char *who, gboolean local,
gboolean restore);
gboolean purple_privacy_check(PurpleAccount *account, const char *who);
void purple_privacy_set_ui_ops(PurplePrivacyUiOps *ops);
PurplePrivacyUiOps *purple_privacy_get_ui_ops(void);
void purple_privacy_init(void);
#ifdef __cplusplus
}
#endif
#endif /* _PURPLE_PRIVACY_H_ */
purple_privacy_deny_add
gboolean purple_privacy_deny_add(PurpleAccount *account, const char *name, gboolean local_only)
Adds a user to the account's deny list.
account.h
purple_privacy_init
void purple_privacy_init(void)
Initializes the privacy subsystem.
purple_privacy_permit_add
gboolean purple_privacy_permit_add(PurpleAccount *account, const char *name, gboolean local_only)
Adds a user to the account's permit list.
purple_privacy_allow
void purple_privacy_allow(PurpleAccount *account, const char *who, gboolean local, gboolean restore)
Allow a user to send messages.
PurplePrivacyUiOps
Privacy core/UI operations.
Definition: privacy.h:50
purple_privacy_deny_remove
gboolean purple_privacy_deny_remove(PurpleAccount *account, const char *name, gboolean local_only)
Removes a user from the account's deny list.
_PurpleAccount
Structure representing an account.
Definition: account.h:169
purple_privacy_get_ui_ops
PurplePrivacyUiOps * purple_privacy_get_ui_ops(void)
Returns the UI operations structure for the privacy subsystem.
_PurplePrivacyType
_PurplePrivacyType
Privacy data types.
Definition: privacy.h:32
purple_privacy_check
gboolean purple_privacy_check(PurpleAccount *account, const char *who)
Check the privacy-setting for a user.
purple_privacy_set_ui_ops
void purple_privacy_set_ui_ops(PurplePrivacyUiOps *ops)
Sets the UI operations structure for the privacy subsystem.
PurplePrivacyType
enum _PurplePrivacyType PurplePrivacyType
Privacy data types.
purple_privacy_permit_remove
gboolean purple_privacy_permit_remove(PurpleAccount *account, const char *name, gboolean local_only)
Removes a user from the account's permit list.
purple_privacy_deny
void purple_privacy_deny(PurpleAccount *account, const char *who, gboolean local, gboolean restore)
Block messages from a user.