ephy-permission-manager

ephy-permission-manager —

Synopsis




#define     EPHY_TYPE_PERMISSION_INFO
enum        EphyPermissionType;
EphyPermissionInfo* ephy_permission_info_new
                                            (const char *host,
                                             EphyPermissionType type,
                                             gboolean allowed);
EphyPermissionInfo* ephy_permission_info_copy
                                            (EphyPermissionInfo *info);
void        ephy_permission_info_free       (EphyPermissionInfo *info);
GType       ephy_permission_manager_get_type
                                            (void);
void        ephy_permission_manager_add     (EphyPermissionManager *manager,
                                             const char *host,
                                             EphyPermissionType type,
                                             gboolean allow);
void        ephy_permission_manager_remove  (EphyPermissionManager *manager,
                                             const char *host,
                                             EphyPermissionType type);
void        ephy_permission_manager_clear   (EphyPermissionManager *manager);
gboolean    ephy_permission_manager_test    (EphyPermissionManager *manager,
                                             const char *host,
                                             EphyPermissionType type);
GList*      ephy_permission_manager_list    (EphyPermissionManager *manager,
                                             EphyPermissionType type);

Description

Details

EPHY_TYPE_PERMISSION_INFO

#define EPHY_TYPE_PERMISSION_INFO		(ephy_permission_info_get_type ())


enum EphyPermissionType

typedef enum
{
	EPT_COOKIE,
	EPT_IMAGE,
	EPT_PASSWORD
} EphyPermissionType;


ephy_permission_info_new ()

EphyPermissionInfo* ephy_permission_info_new
                                            (const char *host,
                                             EphyPermissionType type,
                                             gboolean allowed);

host: a host name
type: a EphyPermissionType
allowed: whether host should be allowed to do what type specifies
Returns : the new EphyPermissionInfo

ephy_permission_info_copy ()

EphyPermissionInfo* ephy_permission_info_copy
                                            (EphyPermissionInfo *info);

info: a EphyPermissionInfo
Returns : a copy of info

ephy_permission_info_free ()

void        ephy_permission_info_free       (EphyPermissionInfo *info);

Frees info.

info: a EphyPermissionInfo

ephy_permission_manager_get_type ()

GType       ephy_permission_manager_get_type
                                            (void);

Returns :

ephy_permission_manager_add ()

void        ephy_permission_manager_add     (EphyPermissionManager *manager,
                                             const char *host,
                                             EphyPermissionType type,
                                             gboolean allow);

Adds the permission allow of type type for host host to the permissions database.

manager: the EphyPermissionManager
host: a host name
type: a EphyPermissionType
allow: the permission itself

ephy_permission_manager_remove ()

void        ephy_permission_manager_remove  (EphyPermissionManager *manager,
                                             const char *host,
                                             EphyPermissionType type);

Removes the permission of type type for host host from the permissions database.

manager: the EphyPermissionManager
host: a host name
type: a EphyPermissionType

ephy_permission_manager_clear ()

void        ephy_permission_manager_clear   (EphyPermissionManager *manager);

Clears the permissions database.

manager: the EphyPermissionManager

ephy_permission_manager_test ()

gboolean    ephy_permission_manager_test    (EphyPermissionManager *manager,
                                             const char *host,
                                             EphyPermissionType type);

Tests whether the host host is allowed to do the action specified by type.

manager: the EphyPermissionManager
host: a host name
type: a EphyPermissionType
Returns : TRUE if allowed

ephy_permission_manager_list ()

GList*      ephy_permission_manager_list    (EphyPermissionManager *manager,
                                             EphyPermissionType type);

Lists all permission entries of type type in the permissions database.

manager: the EphyPermissionManager
type: a EphyPermissionType
Returns : the list of permission entries