aboutsummaryrefslogtreecommitdiffstats
path: root/embed/ephy-permission-manager.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2003-12-13 05:44:35 +0800
committerChristian Persch <chpe@src.gnome.org>2003-12-13 05:44:35 +0800
commita24d8402cd926c267682ede6f4325d8da0c4479d (patch)
tree9465fa6e65660158388323c570221d6ae19cc89e /embed/ephy-permission-manager.c
parentac58742bbf40beaa31967cc8a75b4b3504e52f65 (diff)
downloadgsoc2013-epiphany-a24d8402cd926c267682ede6f4325d8da0c4479d.tar
gsoc2013-epiphany-a24d8402cd926c267682ede6f4325d8da0c4479d.tar.gz
gsoc2013-epiphany-a24d8402cd926c267682ede6f4325d8da0c4479d.tar.bz2
gsoc2013-epiphany-a24d8402cd926c267682ede6f4325d8da0c4479d.tar.lz
gsoc2013-epiphany-a24d8402cd926c267682ede6f4325d8da0c4479d.tar.xz
gsoc2013-epiphany-a24d8402cd926c267682ede6f4325d8da0c4479d.tar.zst
gsoc2013-epiphany-a24d8402cd926c267682ede6f4325d8da0c4479d.zip
Fix permission return types.
2003-12-12 Christian Persch <chpe@cvs.gnome.org> * embed/ephy-permission-manager.c: (ephy_permission_info_new), (ephy_permission_info_copy), (ephy_permission_manager_add): * embed/ephy-permission-manager.h: * embed/mozilla/EphySingle.cpp: * embed/mozilla/mozilla-embed-single.cpp: Fix permission return types.
Diffstat (limited to 'embed/ephy-permission-manager.c')
-rw-r--r--embed/ephy-permission-manager.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/embed/ephy-permission-manager.c b/embed/ephy-permission-manager.c
index b4b60ab78..22add0d0b 100644
--- a/embed/ephy-permission-manager.c
+++ b/embed/ephy-permission-manager.c
@@ -55,13 +55,13 @@ ephy_permission_info_get_type (void)
EphyPermissionInfo *
ephy_permission_info_new (const char *host,
EphyPermissionType type,
- gboolean allowed)
+ EphyPermission permission)
{
EphyPermissionInfo *info = g_new0 (EphyPermissionInfo, 1);
info->host = g_strdup (host);
info->type = type;
- info->allowed = allowed;
+ info->permission = permission;
return info;
}
@@ -79,7 +79,7 @@ ephy_permission_info_copy (const EphyPermissionInfo *info)
copy->host = g_strdup (info->host);
copy->type = info->type;
- copy->allowed = info->allowed;
+ copy->permission = info->permission;
return copy;
}
@@ -213,7 +213,7 @@ ephy_permission_manager_base_init (gpointer g_class)
* @manager: the #EphyPermissionManager
* @host: a host name
* @type: a #EphyPermissionType
- * @allow: the permission itself
+ * @permission: either #EPHY_PERMISSION_ALLOWED or #EPHY_PERMISSION_DENIED
*
* Adds the permission @allow of type @type for host @host to the permissions
* database.
@@ -222,10 +222,10 @@ void
ephy_permission_manager_add (EphyPermissionManager *manager,
const char *host,
EphyPermissionType type,
- gboolean allow)
+ EphyPermission permission)
{
EphyPermissionManagerIFace *iface = EPHY_PERMISSION_MANAGER_GET_IFACE (manager);
- iface->add (manager, host, type, allow);
+ iface->add (manager, host, type, permission);
}
/**
@@ -265,11 +265,12 @@ ephy_permission_manager_clear (EphyPermissionManager *manager)
* @host: a host name
* @type: a #EphyPermissionType
*
- * Tests whether the host @host is allowed to do the action specified by @type.
- *
- * Return value: TRUE if allowed
+ * Gets the permission of @host for type @type. If there is no entry
+ * for this type for @host, it will return #EPHY_PERMISSION_DEFAULT.
+ *
+ * Return value: the permission of type #EphyPermission
**/
-gboolean
+EphyPermission
ephy_permission_manager_test (EphyPermissionManager *manager,
const char *host,
EphyPermissionType type)