diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2004-06-24 04:07:43 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2004-06-24 04:07:43 +0800 |
commit | bf9a14796c23d31c781a6e09b92f523531285932 (patch) | |
tree | 2b176ececf168f5d06293a7397e5a8f16441b933 /embed/ephy-permission-manager.h | |
parent | 38b74d1e516fd674940903dbf49a48894c0bbab7 (diff) | |
download | gsoc2013-epiphany-bf9a14796c23d31c781a6e09b92f523531285932.tar gsoc2013-epiphany-bf9a14796c23d31c781a6e09b92f523531285932.tar.gz gsoc2013-epiphany-bf9a14796c23d31c781a6e09b92f523531285932.tar.bz2 gsoc2013-epiphany-bf9a14796c23d31c781a6e09b92f523531285932.tar.lz gsoc2013-epiphany-bf9a14796c23d31c781a6e09b92f523531285932.tar.xz gsoc2013-epiphany-bf9a14796c23d31c781a6e09b92f523531285932.tar.zst gsoc2013-epiphany-bf9a14796c23d31c781a6e09b92f523531285932.zip |
Make the permission type a string instead of an enum, that way we can
2004-06-23 Christian Persch <chpe@cvs.gnome.org>
* doc/reference/tmpl/ephy-permission-manager.sgml:
* embed/ephy-permission-manager.c: (ephy_permission_info_new),
(ephy_permission_info_copy), (ephy_permission_manager_add),
(ephy_permission_manager_remove), (ephy_permission_manager_test),
(ephy_permission_manager_list):
* embed/ephy-permission-manager.h:
* embed/mozilla/EphySingle.cpp:
* embed/mozilla/mozilla-embed-single.cpp:
Make the permission type a string instead of an enum, that way
we can support more than just the hardcoded 3 types.
Diffstat (limited to 'embed/ephy-permission-manager.h')
-rw-r--r-- | embed/ephy-permission-manager.h | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/embed/ephy-permission-manager.h b/embed/ephy-permission-manager.h index 4d85accdf..8ada417f2 100644 --- a/embed/ephy-permission-manager.h +++ b/embed/ephy-permission-manager.h @@ -36,12 +36,9 @@ G_BEGIN_DECLS #define EPHY_TYPE_PERMISSION_INFO (ephy_permission_info_get_type ()) -typedef enum -{ - EPT_COOKIE, - EPT_IMAGE, - EPT_POPUP -} EphyPermissionType; +#define EPT_COOKIE "cookie" +#define EPT_IMAGE "image" +#define EPT_POPUP "popup" typedef enum { @@ -58,7 +55,7 @@ typedef struct EphyPermissionManagerIface EphyPermissionManagerIface; struct _EphyPermissionInfo { char *host; - EphyPermissionType type; + GQuark qtype; EphyPermission permission; }; @@ -78,17 +75,17 @@ struct EphyPermissionManagerIface /* Methods */ void (* add) (EphyPermissionManager *manager, const char *host, - EphyPermissionType type, + const char *type, EphyPermission permission); void (* remove) (EphyPermissionManager *manager, const char *host, - EphyPermissionType type); + const char *type); void (* clear) (EphyPermissionManager *manager); EphyPermission (* test) (EphyPermissionManager *manager, const char *host, - EphyPermissionType type); + const char *type); GList * (* list) (EphyPermissionManager *manager, - EphyPermissionType type); + const char *type); }; /* EphyPermissionInfo */ @@ -96,7 +93,7 @@ struct EphyPermissionManagerIface GType ephy_permission_info_get_type (void); EphyPermissionInfo *ephy_permission_info_new (const char *host, - EphyPermissionType type, + const char *type, EphyPermission permission); EphyPermissionInfo *ephy_permission_info_copy (const EphyPermissionInfo *info); @@ -109,21 +106,21 @@ GType ephy_permission_manager_get_type (void); void ephy_permission_manager_add (EphyPermissionManager *manager, const char *host, - EphyPermissionType type, + const char *type, EphyPermission permission); void ephy_permission_manager_remove (EphyPermissionManager *manager, const char *host, - EphyPermissionType type); + const char *type); void ephy_permission_manager_clear (EphyPermissionManager *manager); EphyPermission ephy_permission_manager_test (EphyPermissionManager *manager, const char *host, - EphyPermissionType type); + const char *type); GList * ephy_permission_manager_list (EphyPermissionManager *manager, - EphyPermissionType type); + const char *type); G_END_DECLS |