Initial import of ephy (rev# 7126) from svn
[ephy-soc.git] / doc / reference / tmpl / ephy-permission-manager.sgml
blobded9a074245ddd180c57d6e44db822b0c811789a
1 <!-- ##### SECTION Title ##### -->
2 EphyPermissionManager
4 <!-- ##### SECTION Short_Description ##### -->
5 Sets webpages' cookie, image and popup permissions.
7 <!-- ##### SECTION Long_Description ##### -->
8 <para>
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.
13 </para>
14 <para>
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.
20 </para>
21 <para>
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.
29 </para>
30 <para>
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.
33 </para>
34 <para>
35 Though the word &quot;host&quot; 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 &quot;host&quot; parameter. However, the &quot;host&quot; in an
38 #EphyPermissionInfo is a simple DNS hostname.
39 </para>
41 <!-- ##### SECTION See_Also ##### -->
42 <para>
44 </para>
46 <!-- ##### SECTION Stability_Level ##### -->
49 <!-- ##### STRUCT EphyPermissionInfo ##### -->
50 <para>
51 Details a specific permission of a specific website.
52 </para>
54 @host: The hostname of the website to which this permission applies.
55 @qtype:
56 @permission: An #EphyPermission (either allow or deny).
58 <!-- ##### ENUM EphyPermission ##### -->
59 <para>
60 Determines whether the website is allowed or denied access.
61 </para>
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 ##### -->
72 <para>
74 </para>
76 @info: