1 <!-- ##### SECTION Title ##### -->
4 <!-- ##### SECTION Short_Description ##### -->
5 Sets webpages' cookie, image and popup permissions.
7 <!-- ##### SECTION Long_Description ##### -->
9 The #EphyPermissionManager keeps a list of websites and their permissions. For
10 example, the user may want a certain website to display images but block
11 cookies and popup windows; this could correspond to three entries in the
12 #EphyPermissionManager.
15 Use ephy_permission_manager_add() to set permissions for a website,
16 ephy_permission_manager_remove() to remove the permissions, and
17 ephy_permission_manager_test() to test them. Note that
18 ephy_permission_manager_test() may return %EPHY_PERMISSION_DEFAULT, which
19 means the caller might need to find the default permission some other way.
22 The #EphyPermissionManager stores a list of site-specific permissions, but not
23 defaults. For popups, the default permission is determined by the GConf key
24 /apps/epiphany/web/allow_popups, which in turn determines Mozilla's
25 dom.disable_open_during_load preference. For cookies, the GConf key
26 /apps/epiphany/web/cookie_accept determines Mozilla's
27 network.cookie.cookieBehavior preference. For images, the default is determined
28 by Mozilla's network.image.imageBehavior preference.
31 The predefined permission types are EPT_COOKIE (
"cookie"), EPT_IMAGE (
"image")
32 and EPT_POPUP (
"popup"). You can also make up your own type string.
35 Though the word
"host
" is used in many function descriptions, Mozilla
36 does not act as one would expect. Always pass a URL to any functions which
37 need have a
"host
" parameter. However, the
"host
" in an
38 #EphyPermissionInfo is a simple DNS hostname.
41 <!-- ##### SECTION See_Also ##### -->
46 <!-- ##### SECTION Stability_Level ##### -->
49 <!-- ##### STRUCT EphyPermissionInfo ##### -->
51 Details a specific permission of a specific website.
54 @host: The hostname of the website to which this permission applies.
56 @permission: An #EphyPermission (either allow or deny).
58 <!-- ##### ENUM EphyPermission ##### -->
60 Determines whether the website is allowed or denied access.
63 @EPHY_PERMISSION_ALLOWED:
64 The website is unconditionally allowed to perform the desired action.
65 @EPHY_PERMISSION_DENIED:
66 The website is unconditionally denied to perform the desired action.
67 @EPHY_PERMISSION_DEFAULT:
68 The user has not set a preference for this particular website; the
69 caller should therefore fall back to default settings.
71 <!-- ##### FUNCTION ephy_permission_info_free ##### -->