diff options
author | David Zeuthen <davidz@redhat.com> | 2010-07-29 16:56:59 -0400 |
---|---|---|
committer | David Zeuthen <davidz@redhat.com> | 2010-07-29 16:56:59 -0400 |
commit | d04cd425c6049da749516f37252264f96109e179 (patch) | |
tree | 57134d62ce66b6b9e06c02aff3497ff9b32842d4 /docs | |
parent | 007b07f979b952744137b7a5b49712df87377014 (diff) | |
download | polkit-d04cd425c6049da749516f37252264f96109e179.tar.gz |
Add generated docbook D-Bus API docs to git
When we switch away from eggdbus these will no longer be
autogenerated.
Signed-off-by: David Zeuthen <davidz@redhat.com>
Diffstat (limited to 'docs')
-rw-r--r-- | docs/polkit/Makefile.am | 4 | ||||
-rw-r--r-- | docs/polkit/docbook-interface-org.freedesktop.PolicyKit1.AuthenticationAgent.xml | 116 | ||||
-rw-r--r-- | docs/polkit/docbook-interface-org.freedesktop.PolicyKit1.Authority.xml | 897 | ||||
-rw-r--r-- | docs/polkit/polkit-1-docs.xml | 4 |
4 files changed, 1017 insertions, 4 deletions
diff --git a/docs/polkit/Makefile.am b/docs/polkit/Makefile.am index bf05b92..370fb56 100644 --- a/docs/polkit/Makefile.am +++ b/docs/polkit/Makefile.am @@ -57,8 +57,8 @@ content_files = \ overview.xml \ ../extensiondir.xml \ ../version.xml \ - ../../src/polkit/docbook-interface-org.freedesktop.PolicyKit1.Authority.xml \ - ../../src/polkit/docbook-interface-org.freedesktop.PolicyKit1.AuthenticationAgent.xml \ + docbook-interface-org.freedesktop.PolicyKit1.Authority.xml \ + docbook-interface-org.freedesktop.PolicyKit1.AuthenticationAgent.xml \ ../man/polkit.xml \ ../man/polkitd.xml \ ../man/pklocalauthority.xml \ diff --git a/docs/polkit/docbook-interface-org.freedesktop.PolicyKit1.AuthenticationAgent.xml b/docs/polkit/docbook-interface-org.freedesktop.PolicyKit1.AuthenticationAgent.xml new file mode 100644 index 0000000..85bbcf0 --- /dev/null +++ b/docs/polkit/docbook-interface-org.freedesktop.PolicyKit1.AuthenticationAgent.xml @@ -0,0 +1,116 @@ +<?xml version="1.0"?> +<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2 //EN" +"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"> +<refentry id="eggdbus-interface-org.freedesktop.PolicyKit1.AuthenticationAgent"> + <refmeta> + <refentrytitle role="top_of_page">org.freedesktop.PolicyKit1.AuthenticationAgent Interface</refentrytitle> + </refmeta> + <refnamediv> + <refname>org.freedesktop.PolicyKit1.AuthenticationAgent Interface</refname> + <refpurpose>Authentication Agent Interface</refpurpose> + </refnamediv> + <refsynopsisdiv role="synopsis"> + <title role="synopsis.title">Methods</title> + <synopsis> +<link linkend="eggdbus-method-org.freedesktop.PolicyKit1.AuthenticationAgent.BeginAuthentication">BeginAuthentication</link> (IN String action_id, + IN String message, + IN String icon_name, + IN Dict<String,String> details, + IN String cookie, + IN Array<<link linkend="eggdbus-struct-Identity">Identity</link>> identities) +<link linkend="eggdbus-method-org.freedesktop.PolicyKit1.AuthenticationAgent.CancelAuthentication">CancelAuthentication</link> (IN String cookie) + </synopsis> + </refsynopsisdiv> + <refsect1 role="desc" id="eggdbus-if-description-org.freedesktop.PolicyKit1.AuthenticationAgent"> + <title role="desc.title">Description</title> + <para> +<para>This D-Bus interface is used for communication between the system-wide PolicyKit daemon and one or more authentication agents each running in a user session.</para><para>An authentication agent must implement this interface and register (passing the object path of the object implementing the interface) using the <link linkend="eggdbus-method-org.freedesktop.PolicyKit1.Authority.RegisterAuthenticationAgent">RegisterAuthenticationAgent()</link> and <link linkend="eggdbus-method-org.freedesktop.PolicyKit1.Authority.UnregisterAuthenticationAgent">UnregisterAuthenticationAgent()</link> methods on the <link linkend="eggdbus-interface-org.freedesktop.PolicyKit1.Authority">org.freedesktop.PolicyKit1.Authority</link> interface of the PolicyKit daemon.</para> + </para> + </refsect1> + <refsect1 role="details" id="eggdbus-if-method-details-org.freedesktop.PolicyKit1.AuthenticationAgent"> + <title role="details.title">Method Details</title> + <refsect2 role="function" id="eggdbus-method-org.freedesktop.PolicyKit1.AuthenticationAgent.BeginAuthentication"> + <title>BeginAuthentication ()</title> + <programlisting> +BeginAuthentication (IN String action_id, + IN String message, + IN String icon_name, + IN Dict<String,String> details, + IN String cookie, + IN Array<<link linkend="eggdbus-struct-Identity">Identity</link>> identities) + </programlisting> + <para> +<para>Called by the PolicyKit daemon when the authentication agent needs the user to authenticate as one of the identities in <parameter>identities</parameter> for the action with the identifier <parameter>action_id</parameter>.</para><para>Upon succesful authentication, the authentication agent must invoke the <link linkend="eggdbus-method-org.freedesktop.PolicyKit1.Authority.AuthenticationAgentResponse">AuthenticationAgentResponse()</link> method on the <link linkend="eggdbus-interface-org.freedesktop.PolicyKit1.Authority">org.freedesktop.PolicyKit1.Authority</link> interface of the PolicyKit daemon before returning.</para><para>If the user dismisses the authentication dialog, the authentication agent should return an error.</para> + </para> +<variablelist role="params"> + <varlistentry> + <term><literal>IN String <parameter>action_id</parameter></literal>:</term> + <listitem> + <para> +The identifier for the action that the user is authentication for. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>IN String <parameter>message</parameter></literal>:</term> + <listitem> + <para> +The message to display to the user. This is translated into the locale passed when registering the authentication agent using <link linkend="eggdbus-method-org.freedesktop.PolicyKit1.Authority.RegisterAuthenticationAgent">RegisterAuthenticationAgent()</link>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>IN String <parameter>icon_name</parameter></literal>:</term> + <listitem> + <para> +The themed icon describing the action or the empty string if no icon is set. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>IN Dict<String,String> <parameter>details</parameter></literal>:</term> + <listitem> + <para> +Details about the authentication request. This is a dictionary of key/value pairs where both key and value are strings. These strings are translated into the locale passed when registering the authentication agent using <link linkend="eggdbus-method-org.freedesktop.PolicyKit1.Authority.RegisterAuthenticationAgent">RegisterAuthenticationAgent()</link>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>IN String <parameter>cookie</parameter></literal>:</term> + <listitem> + <para> +A cookie identifying the authentication request. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>IN Array<<link linkend="eggdbus-struct-Identity">Identity</link>> <parameter>identities</parameter></literal>:</term> + <listitem> + <para> +An array of <link linkend="eggdbus-struct-Identity">Identity</link> structs that the user can use for authentication. + </para> + </listitem> + </varlistentry> +</variablelist> + </refsect2> + <refsect2 role="function" id="eggdbus-method-org.freedesktop.PolicyKit1.AuthenticationAgent.CancelAuthentication"> + <title>CancelAuthentication ()</title> + <programlisting> +CancelAuthentication (IN String cookie) + </programlisting> + <para> +Called by the PolicyKit daemon if the authentication agent needs to cancel an authentication dialog. + </para> +<variablelist role="params"> + <varlistentry> + <term><literal>IN String <parameter>cookie</parameter></literal>:</term> + <listitem> + <para> +The cookie identifying the authentication request. + </para> + </listitem> + </varlistentry> +</variablelist> + </refsect2> + </refsect1> +</refentry> diff --git a/docs/polkit/docbook-interface-org.freedesktop.PolicyKit1.Authority.xml b/docs/polkit/docbook-interface-org.freedesktop.PolicyKit1.Authority.xml new file mode 100644 index 0000000..8b76fa2 --- /dev/null +++ b/docs/polkit/docbook-interface-org.freedesktop.PolicyKit1.Authority.xml @@ -0,0 +1,897 @@ +<?xml version="1.0"?> +<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2 //EN" +"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"> +<refentry id="eggdbus-interface-org.freedesktop.PolicyKit1.Authority"> + <refmeta> + <refentrytitle role="top_of_page">org.freedesktop.PolicyKit1.Authority Interface</refentrytitle> + </refmeta> + <refnamediv> + <refname>org.freedesktop.PolicyKit1.Authority Interface</refname> + <refpurpose>Authority Interface</refpurpose> + </refnamediv> + <refsynopsisdiv role="synopsis"> + <title role="synopsis.title">Methods</title> + <synopsis> +Flags <link linkend="eggdbus-enum-CheckAuthorizationFlags">CheckAuthorizationFlags</link> +Enumeration <link linkend="eggdbus-enum-ImplicitAuthorization">ImplicitAuthorization</link> +ErrorDomain <link linkend="eggdbus-errordomain-org.freedesktop.PolicyKit1.Error.">org.freedesktop.PolicyKit1.Error.*</link> +Flags <link linkend="eggdbus-enum-AuthorityFeatures">AuthorityFeatures</link> +Structure <link linkend="eggdbus-struct-Subject">Subject</link> +Structure <link linkend="eggdbus-struct-Identity">Identity</link> +Structure <link linkend="eggdbus-struct-ActionDescription">ActionDescription</link> +Structure <link linkend="eggdbus-struct-AuthorizationResult">AuthorizationResult</link> +Structure <link linkend="eggdbus-struct-TemporaryAuthorization">TemporaryAuthorization</link> + +<link linkend="eggdbus-method-org.freedesktop.PolicyKit1.Authority.EnumerateActions">EnumerateActions</link> (IN String locale, + OUT Array<<link linkend="eggdbus-struct-ActionDescription">ActionDescription</link>> action_descriptions) +<link linkend="eggdbus-method-org.freedesktop.PolicyKit1.Authority.CheckAuthorization">CheckAuthorization</link> (IN <link linkend="eggdbus-struct-Subject">Subject</link> subject, + IN String action_id, + IN Dict<String,String> details, + IN <link linkend="eggdbus-enum-CheckAuthorizationFlags">CheckAuthorizationFlags</link> flags, + IN String cancellation_id, + OUT <link linkend="eggdbus-struct-AuthorizationResult">AuthorizationResult</link> result) +<link linkend="eggdbus-method-org.freedesktop.PolicyKit1.Authority.CancelCheckAuthorization">CancelCheckAuthorization</link> (IN String cancellation_id) +<link linkend="eggdbus-method-org.freedesktop.PolicyKit1.Authority.RegisterAuthenticationAgent">RegisterAuthenticationAgent</link> (IN <link linkend="eggdbus-struct-Subject">Subject</link> subject, + IN String locale, + IN String object_path) +<link linkend="eggdbus-method-org.freedesktop.PolicyKit1.Authority.UnregisterAuthenticationAgent">UnregisterAuthenticationAgent</link> (IN <link linkend="eggdbus-struct-Subject">Subject</link> subject, + IN String object_path) +<link linkend="eggdbus-method-org.freedesktop.PolicyKit1.Authority.AuthenticationAgentResponse">AuthenticationAgentResponse</link> (IN String cookie, + IN <link linkend="eggdbus-struct-Identity">Identity</link> identity) +<link linkend="eggdbus-method-org.freedesktop.PolicyKit1.Authority.EnumerateTemporaryAuthorizations">EnumerateTemporaryAuthorizations</link> (IN <link linkend="eggdbus-struct-Subject">Subject</link> subject, + OUT Array<<link linkend="eggdbus-struct-TemporaryAuthorization">TemporaryAuthorization</link>> temporary_authorizations) +<link linkend="eggdbus-method-org.freedesktop.PolicyKit1.Authority.RevokeTemporaryAuthorizations">RevokeTemporaryAuthorizations</link> (IN <link linkend="eggdbus-struct-Subject">Subject</link> subject) +<link linkend="eggdbus-method-org.freedesktop.PolicyKit1.Authority.RevokeTemporaryAuthorizationById">RevokeTemporaryAuthorizationById</link> (IN String id) +<link linkend="eggdbus-method-org.freedesktop.PolicyKit1.Authority.AddLockdownForAction">AddLockdownForAction</link> (IN String action_id) +<link linkend="eggdbus-method-org.freedesktop.PolicyKit1.Authority.RemoveLockdownForAction">RemoveLockdownForAction</link> (IN String action_id) + </synopsis> + </refsynopsisdiv> + <refsect1 role="signal_proto" id="eggdbus-if-signals-org.freedesktop.PolicyKit1.Authority"> + <title role="signal_proto.title">Signals</title> + <synopsis> +<link linkend="eggdbus-signal-org.freedesktop.PolicyKit1.Authority::Changed">Changed</link> () + </synopsis> + </refsect1> + <refsect1 role="properties" id="eggdbus-if-properties-org.freedesktop.PolicyKit1.Authority"> + <title role="properties.title">Properties</title> + <synopsis> +<link linkend="eggdbus-property-org.freedesktop.PolicyKit1.Authority:BackendName">BackendName</link> readable String +<link linkend="eggdbus-property-org.freedesktop.PolicyKit1.Authority:BackendVersion">BackendVersion</link> readable String +<link linkend="eggdbus-property-org.freedesktop.PolicyKit1.Authority:BackendFeatures">BackendFeatures</link> readable <link linkend="eggdbus-enum-AuthorityFeatures">AuthorityFeatures</link> + </synopsis> + </refsect1> + <refsect1 role="desc" id="eggdbus-if-description-org.freedesktop.PolicyKit1.Authority"> + <title role="desc.title">Description</title> + <para> +This D-Bus interface is implemented by the <literal>/org/freedesktop/PoliycKit1/Authority</literal> object on the well-known name <literal>org.freedesktop.PolicyKit1</literal> on the system message bus. + </para> + </refsect1> + <refsect1 role="desc" id="eggdbus-if-enumerations-org.freedesktop.PolicyKit1.Authority"> + <title role="desc.title">Enumerations</title> + <refsect2 role="enum" id="eggdbus-enum-CheckAuthorizationFlags"> + <title>The CheckAuthorizationFlags Flags</title> + <para> + <programlisting> +{ + None = 0x00000000, + AllowUserInteraction = 0x00000001 +} + </programlisting> + <para> +Flags used in the <link linkend="eggdbus-method-org.freedesktop.PolicyKit1.Authority.CheckAuthorization">CheckAuthorization()</link> method. + </para> + <variablelist role="constant"> + <varlistentry id="eggdbus-constant-CheckAuthorizationFlags.None" role="constant"> + <term><literal>None</literal></term> + <listitem> + <para> +No flags set. + </para> + </listitem> + </varlistentry> + <varlistentry id="eggdbus-constant-CheckAuthorizationFlags.AllowUserInteraction" role="constant"> + <term><literal>AllowUserInteraction</literal></term> + <listitem> + <para> +If the <link linkend="eggdbus-struct-Subject">Subject</link> can obtain the authorization through authentication, and an authentication agent is available, then attempt to do so. Note, this means that the <link linkend="eggdbus-method-org.freedesktop.PolicyKit1.Authority.CheckAuthorization">CheckAuthorization()</link> method will block while the user is being asked to authenticate. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect2> + <refsect2 role="enum" id="eggdbus-enum-ImplicitAuthorization"> + <title>The ImplicitAuthorization Enumeration</title> + <para> + <programlisting> +{ + NotAuthorized = 0, + AuthenticationRequired = 1, + AdministratorAuthenticationRequired = 2, + AuthenticationRequiredRetained = 3, + AdministratorAuthenticationRequiredRetained = 4, + Authorized = 5 +} + </programlisting> + <para> +An enumeration for granting implicit authorizations. + </para> + <variablelist role="constant"> + <varlistentry id="eggdbus-constant-ImplicitAuthorization.NotAuthorized" role="constant"> + <term><literal>NotAuthorized</literal></term> + <listitem> + <para> +The <link linkend="eggdbus-struct-Subject">Subject</link> is not authorized. + </para> + </listitem> + </varlistentry> + <varlistentry id="eggdbus-constant-ImplicitAuthorization.AuthenticationRequired" role="constant"> + <term><literal>AuthenticationRequired</literal></term> + <listitem> + <para> +Authentication is required. + </para> + </listitem> + </varlistentry> + <varlistentry id="eggdbus-constant-ImplicitAuthorization.AdministratorAuthenticationRequired" role="constant"> + <term><literal>AdministratorAuthenticationRequired</literal></term> + <listitem> + <para> +Authentication as an administrator is required. + </para> + </listitem> + </varlistentry> + <varlistentry id="eggdbus-constant-ImplicitAuthorization.AuthenticationRequiredRetained" role="constant"> + <term><literal>AuthenticationRequiredRetained</literal></term> + <listitem> + <para> +Authentication is required. If the authorization is obtained, it is retained. + </para> + </listitem> + </varlistentry> + <varlistentry id="eggdbus-constant-ImplicitAuthorization.AdministratorAuthenticationRequiredRetained" role="constant"> + <term><literal>AdministratorAuthenticationRequiredRetained</literal></term> + <listitem> + <para> +Authentication as an administrator is required. If the authorization is obtained, it is retained. + </para> + </listitem> + </varlistentry> + <varlistentry id="eggdbus-constant-ImplicitAuthorization.Authorized" role="constant"> + <term><literal>Authorized</literal></term> + <listitem> + <para> +The subject is authorized. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect2> + <refsect2 role="enum" id="eggdbus-errordomain-org.freedesktop.PolicyKit1.Error."> <title>The org.freedesktop.PolicyKit1.Error.* Error Domain</title> + <para> + <programlisting> +{ + org.freedesktop.PolicyKit1.Error.Failed, + org.freedesktop.PolicyKit1.Error.Cancelled, + org.freedesktop.PolicyKit1.Error.NotSupported, + org.freedesktop.PolicyKit1.Error.NotAuthorized, + org.freedesktop.PolicyKit1.Error.CancellationIdNotUnique +} + </programlisting> + <para> +Errors that can be returned by various method calls. + </para> + <variablelist role="constant"> + <varlistentry id="eggdbus-constant-Error.org.freedesktop.PolicyKit1.Error.Failed" role="constant"> + <term><literal>org.freedesktop.PolicyKit1.Error.Failed</literal></term> + <listitem> + <para> +The operation failed. + </para> + </listitem> + </varlistentry> + <varlistentry id="eggdbus-constant-Error.org.freedesktop.PolicyKit1.Error.Cancelled" role="constant"> + <term><literal>org.freedesktop.PolicyKit1.Error.Cancelled</literal></term> + <listitem> + <para> +The operation was cancelled. + </para> + </listitem> + </varlistentry> + <varlistentry id="eggdbus-constant-Error.org.freedesktop.PolicyKit1.Error.NotSupported" role="constant"> + <term><literal>org.freedesktop.PolicyKit1.Error.NotSupported</literal></term> + <listitem> + <para> +The operation is not supported. + </para> + </listitem> + </varlistentry> + <varlistentry id="eggdbus-constant-Error.org.freedesktop.PolicyKit1.Error.NotAuthorized" role="constant"> + <term><literal>org.freedesktop.PolicyKit1.Error.NotAuthorized</literal></term> + <listitem> + <para> +You are not authorized to perform the requested operation. + </para> + </listitem> + </varlistentry> + <varlistentry id="eggdbus-constant-Error.org.freedesktop.PolicyKit1.Error.CancellationIdNotUnique" role="constant"> + <term><literal>org.freedesktop.PolicyKit1.Error.CancellationIdNotUnique</literal></term> + <listitem> + <para> +The passed <parameter>cancellation_id</parameter> is already in use. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect2> + <refsect2 role="enum" id="eggdbus-enum-AuthorityFeatures"> + <title>The AuthorityFeatures Flags</title> + <para> + <programlisting> +{ + None = 0x00000000, + TemporaryAuthorization = 0x00000001, + Lockdown = 0x00000002 +} + </programlisting> + <para> +Flags describing features supported by the Authority implementation. + </para> + <variablelist role="constant"> + <varlistentry id="eggdbus-constant-AuthorityFeatures.None" role="constant"> + <term><literal>None</literal></term> + <listitem> + <para> +No flags set. + </para> + </listitem> + </varlistentry> + <varlistentry id="eggdbus-constant-AuthorityFeatures.TemporaryAuthorization" role="constant"> + <term><literal>TemporaryAuthorization</literal></term> + <listitem> + <para> +The authority supports temporary authorizations that can be obtained through authentication. + </para> + </listitem> + </varlistentry> + <varlistentry id="eggdbus-constant-AuthorityFeatures.Lockdown" role="constant"> + <term><literal>Lockdown</literal></term> + <listitem> + <para> +The authority supports the <link linkend="eggdbus-method-org.freedesktop.PolicyKit1.Authority.AddLockdownForAction">AddLockdownForAction()</link> and <link linkend="eggdbus-method-org.freedesktop.PolicyKit1.Authority.RemoveLockdownForAction">RemoveLockdownForAction()</link> methods. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect2> + </refsect1> + <refsect1 role="desc" id="eggdbus-if-structures-org.freedesktop.PolicyKit1.Authority"> + <title role="desc.title">Structures</title> + <refsect2 role="struct" id="eggdbus-struct-Subject"> + <title>The Subject Structure</title> + <para> + <programlisting> +{ + String subject_kind, + Dict<String,Variant> subject_details +} + </programlisting> + <para> +<para>This struct describes subjects such as UNIX processes. It is typically used to check if a given process is authorized for an action.</para><para>The following kinds of subjects are known:</para> <formalpara><title>Unix Process</title><para><literal>subject_kind</literal> should be set to <literal>unix-process</literal> with keys <literal>pid</literal> (of type <literal>uint32</literal>) and <literal>start-time</literal> (of type <literal>uint64</literal>).</para></formalpara> <formalpara><title>Unix Session</title><para><literal>subject_kind</literal> should be set to <literal>unix-session</literal> with the key <literal>session-id</literal> (of type <literal>string</literal>).</para></formalpara> <formalpara><title>System Bus Name</title><para><literal>subject_kind</literal> should be set to <literal>system-bus-name</literal> with the key <literal>name</literal> (of type <literal>string</literal>).</para></formalpara> + </para> + <variablelist role="struct"> + <varlistentry> + <term><literal>String <structfield>subject_kind</structfield></literal></term> + <listitem> + <para> +The type of the subject. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>Dict<String,Variant> <structfield>subject_details</structfield></literal></term> + <listitem> + <para> +Details about the subject. Depending of the value of <parameter>subject_kind</parameter>, a set of well-defined key/value pairs are guaranteed to be available. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect2> + <refsect2 role="struct" id="eggdbus-struct-Identity"> + <title>The Identity Structure</title> + <para> + <programlisting> +{ + String identity_kind, + Dict<String,Variant> identity_details +} + </programlisting> + <para> +<para>This struct describes identities such as UNIX users and UNIX groups. It is typically used to check if a given process is authorized for an action.</para><para>The following kinds of identities are known:</para> <formalpara><title>Unix User</title><para><literal>identity_kind</literal> should be set to <literal>unix-user</literal> with key <literal>uid</literal> (of type <literal>uint32</literal>).</para></formalpara> <formalpara><title>Unix Group</title><para><literal>identity_kind</literal> should be set to <literal>unix-group</literal> with key <literal>gid</literal> (of type <literal>uint32</literal>).</para></formalpara> + </para> + <variablelist role="struct"> + <varlistentry> + <term><literal>String <structfield>identity_kind</structfield></literal></term> + <listitem> + <para> +Type of identity. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>Dict<String,Variant> <structfield>identity_details</structfield></literal></term> + <listitem> + <para> +Details about the identity. Depending of the value of <parameter>identity_kind</parameter>, a set of well-defined key/value pairs are guaranteed to be available. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect2> + <refsect2 role="struct" id="eggdbus-struct-ActionDescription"> + <title>The ActionDescription Structure</title> + <para> + <programlisting> +{ + String action_id, + String description, + String message, + String vendor_name, + String vendor_url, + String icon_name, + <link linkend="eggdbus-enum-ImplicitAuthorization">ImplicitAuthorization</link> implicit_any, + <link linkend="eggdbus-enum-ImplicitAuthorization">ImplicitAuthorization</link> implicit_inactive, + <link linkend="eggdbus-enum-ImplicitAuthorization">ImplicitAuthorization</link> implicit_active, + Dict<String,String> annotations +} + </programlisting> + <para> +This struct describes actions registered with the PolicyKit daemon. + </para> + <variablelist role="struct"> + <varlistentry> + <term><literal>String <structfield>action_id</structfield></literal></term> + <listitem> + <para> +Action Identifier. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>String <structfield>description</structfield></literal></term> + <listitem> + <para> +Localized description of the action. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>String <structfield>message</structfield></literal></term> + <listitem> + <para> +Localized message to be displayed when making the user authenticate for an action. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>String <structfield>vendor_name</structfield></literal></term> + <listitem> + <para> +Name of the provider of the action or the empty string. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>String <structfield>vendor_url</structfield></literal></term> + <listitem> + <para> +A URL pointing to a place with more information about the action or the empty string. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>String <structfield>icon_name</structfield></literal></term> + <listitem> + <para> +The themed icon describing the action or the empty string if no icon is set. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><literal><link linkend="eggdbus-enum-ImplicitAuthorization">ImplicitAuthorization</link> <structfield>implicit_any</structfield></literal></term> + <listitem> + <para> +A value from the <link linkend="eggdbus-enum-ImplicitAuthorization">ImplicitAuthorization</link>. enumeration for implicit authorizations that apply to any <link linkend="eggdbus-struct-Subject">Subject</link>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><literal><link linkend="eggdbus-enum-ImplicitAuthorization">ImplicitAuthorization</link> <structfield>implicit_inactive</structfield></literal></term> + <listitem> + <para> +A value from the <link linkend="eggdbus-enum-ImplicitAuthorization">ImplicitAuthorization</link>. enumeration for implicit authorizations that apply any <link linkend="eggdbus-struct-Subject">Subject</link> in an inactive user session on the local console. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><literal><link linkend="eggdbus-enum-ImplicitAuthorization">ImplicitAuthorization</link> <structfield>implicit_active</structfield></literal></term> + <listitem> + <para> +A value from the <link linkend="eggdbus-enum-ImplicitAuthorization">ImplicitAuthorization</link>. enumeration for implicit authorizations that apply any <link linkend="eggdbus-struct-Subject">Subject</link> in an active user session on the local console. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>Dict<String,String> <structfield>annotations</structfield></literal></term> + <listitem> + <para> +Annotations for the action. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect2> + <refsect2 role="struct" id="eggdbus-struct-AuthorizationResult"> + <title>The AuthorizationResult Structure</title> + <para> + <programlisting> +{ + Boolean is_authorized, + Boolean is_challenge, + Dict<String,String> details +} + </programlisting> + <para> +Describes the result of calling <link linkend="eggdbus-method-org.freedesktop.PolicyKit1.Authority.CheckAuthorization">CheckAuthorization()</link>. + </para> + <variablelist role="struct"> + <varlistentry> + <term><literal>Boolean <structfield>is_authorized</structfield></literal></term> + <listitem> + <para> +TRUE if the given <link linkend="eggdbus-struct-Subject">Subject</link> is authorized for the given action. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>Boolean <structfield>is_challenge</structfield></literal></term> + <listitem> + <para> +TRUE if the given <link linkend="eggdbus-struct-Subject">Subject</link> could be authorized if more information was provided, and <link linkend="eggdbus-constant-CheckAuthorizationFlags.AllowUserInteraction">CheckAuthorizationFlags.AllowUserInteraction</link> wasn't passed or no suitable authentication agent was available. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>Dict<String,String> <structfield>details</structfield></literal></term> + <listitem> + <para> +Details for the result or empty if not authorized. Known key/value-pairs include <literal>polkit.temporary_authorization_id</literal> (if the authorization is temporary, this is set to the opaque temporary authorization id), <literal>polkit.retains_authorization_after_challenge</literal> (Set to a non-empty string if the authorization will be retained after authentication (if is_challenge is TRUE)) and <literal>polkit.lockdown</literal> (set to a non-empty string if the action is locked down). + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect2> + <refsect2 role="struct" id="eggdbus-struct-TemporaryAuthorization"> + <title>The TemporaryAuthorization Structure</title> + <para> + <programlisting> +{ + String id, + String action_id, + <link linkend="eggdbus-struct-Subject">Subject</link> subject, + UInt64 time_obtained, + UInt64 time_expires +} + </programlisting> + <para> +This struct describes a temporary authorization. + </para> + <variablelist role="struct"> + <varlistentry> + <term><literal>String <structfield>id</structfield></literal></term> + <listitem> + <para> +An opaque identifier for the temporary authorization. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>String <structfield>action_id</structfield></literal></term> + <listitem> + <para> +The action the temporary authorization is for. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><literal><link linkend="eggdbus-struct-Subject">Subject</link> <structfield>subject</structfield></literal></term> + <listitem> + <para> +The subject the temporary authorization is for. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>UInt64 <structfield>time_obtained</structfield></literal></term> + <listitem> + <para> +When the temporary authorization was obtained, in seconds since the Epoch Jan 1, 1970 0:00 UTC. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>UInt64 <structfield>time_expires</structfield></literal></term> + <listitem> + <para> +When the temporary authorization is set to expire, in seconds since the Epoch Jan 1, 1970 0:00 UTC. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect2> + </refsect1> + <refsect1 role="details" id="eggdbus-if-method-details-org.freedesktop.PolicyKit1.Authority"> + <title role="details.title">Method Details</title> + <refsect2 role="function" id="eggdbus-method-org.freedesktop.PolicyKit1.Authority.EnumerateActions"> + <title>EnumerateActions ()</title> + <programlisting> +EnumerateActions (IN String locale, + OUT Array<<link linkend="eggdbus-struct-ActionDescription">ActionDescription</link>> action_descriptions) + </programlisting> + <para> +Enumerates all registered PolicyKit actions. + </para> +<variablelist role="params"> + <varlistentry> + <term><literal>IN String <parameter>locale</parameter></literal>:</term> + <listitem> + <para> +The locale to get descriptions in or the blank string to use the system locale. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>OUT Array<<link linkend="eggdbus-struct-ActionDescription">ActionDescription</link>> <parameter>action_descriptions</parameter></literal>:</term> + <listitem> + <para> +An array of <link linkend="eggdbus-struct-ActionDescription">ActionDescription</link> structs. + </para> + </listitem> + </varlistentry> +</variablelist> + </refsect2> + <refsect2 role="function" id="eggdbus-method-org.freedesktop.PolicyKit1.Authority.CheckAuthorization"> + <title>CheckAuthorization ()</title> + <programlisting> +CheckAuthorization (IN <link linkend="eggdbus-struct-Subject">Subject</link> subject, + IN String action_id, + IN Dict<String,String> details, + IN <link linkend="eggdbus-enum-CheckAuthorizationFlags">CheckAuthorizationFlags</link> flags, + IN String cancellation_id, + OUT <link linkend="eggdbus-struct-AuthorizationResult">AuthorizationResult</link> result) + </programlisting> + <para> +<para>Checks if <parameter>subject</parameter> is authorized to perform the action with identifier <parameter>action_id</parameter>.</para><para>If <parameter>cancellation_id</parameter> is non-empty and already in use for the caller, the <link linkend="eggdbus-constant-Error.org.freedesktop.PolicyKit1.Error.CancellationIdNotUnique">org.freedesktop.PolicyKit1.Error.CancellationIdNotUnique</link> error is returned.</para><para>Note that <link linkend="eggdbus-constant-CheckAuthorizationFlags.AllowUserInteraction">CheckAuthorizationFlags.AllowUserInteraction</link> SHOULD be passed ONLY if the event that triggered the authorization check is stemming from an user action, e.g. the user pressing a button or attaching a device.</para> + </para> +<variablelist role="params"> + <varlistentry> + <term><literal>IN <link linkend="eggdbus-struct-Subject">Subject</link> <parameter>subject</parameter></literal>:</term> + <listitem> + <para> +A <link linkend="eggdbus-struct-Subject">Subject</link> struct. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>IN String <parameter>action_id</parameter></literal>:</term> + <listitem> + <para> +Identifier for the action that <parameter>subject</parameter> is attempting to do. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>IN Dict<String,String> <parameter>details</parameter></literal>:</term> + <listitem> + <para> +Details describing the action. Keys starting with <literal>polkit.</literal> are reserved for internal use and cannot be used. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>IN <link linkend="eggdbus-enum-CheckAuthorizationFlags">CheckAuthorizationFlags</link> <parameter>flags</parameter></literal>:</term> + <listitem> + <para> +A set of <link linkend="eggdbus-enum-CheckAuthorizationFlags">CheckAuthorizationFlags</link>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>IN String <parameter>cancellation_id</parameter></literal>:</term> + <listitem> + <para> +A unique id used to cancel the the authentication check via <link linkend="eggdbus-method-org.freedesktop.PolicyKit1.Authority.CancelCheckAuthorization">CancelCheckAuthorization()</link> or the empty string if cancellation is not needed. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>OUT <link linkend="eggdbus-struct-AuthorizationResult">AuthorizationResult</link> <parameter>result</parameter></literal>:</term> + <listitem> + <para> +An <link linkend="eggdbus-struct-AuthorizationResult">AuthorizationResult</link> structure. + </para> + </listitem> + </varlistentry> +</variablelist> + </refsect2> + <refsect2 role="function" id="eggdbus-method-org.freedesktop.PolicyKit1.Authority.CancelCheckAuthorization"> + <title>CancelCheckAuthorization ()</title> + <programlisting> +CancelCheckAuthorization (IN String cancellation_id) + </programlisting> + <para> +Cancels an authorization check. + </para> +<variablelist role="params"> + <varlistentry> + <term><literal>IN String <parameter>cancellation_id</parameter></literal>:</term> + <listitem> + <para> +The <parameter>cancellation_id</parameter> passed to <link linkend="eggdbus-method-org.freedesktop.PolicyKit1.Authority.CheckAuthorization">CheckAuthorization()</link>. + </para> + </listitem> + </varlistentry> +</variablelist> + </refsect2> + <refsect2 role="function" id="eggdbus-method-org.freedesktop.PolicyKit1.Authority.RegisterAuthenticationAgent"> + <title>RegisterAuthenticationAgent ()</title> + <programlisting> +RegisterAuthenticationAgent (IN <link linkend="eggdbus-struct-Subject">Subject</link> subject, + IN String locale, + IN String object_path) + </programlisting> + <para> +<para>Register an authentication agent.</para><para>Note that current versions of PolicyKit will only work if <parameter>session_id</parameter> is set to the empty string. In the future it might work for non-empty strings if the caller is sufficiently privileged.</para> + </para> +<variablelist role="params"> + <varlistentry> + <term><literal>IN <link linkend="eggdbus-struct-Subject">Subject</link> <parameter>subject</parameter></literal>:</term> + <listitem> + <para> +The subject to register the authentication agent for, typically a session subject. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>IN String <parameter>locale</parameter></literal>:</term> + <listitem> + <para> +The locale of the authentication agent. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>IN String <parameter>object_path</parameter></literal>:</term> + <listitem> + <para> +The object path of authentication agent object on the unique name of the caller. + </para> + </listitem> + </varlistentry> +</variablelist> + </refsect2> + <refsect2 role="function" id="eggdbus-method-org.freedesktop.PolicyKit1.Authority.UnregisterAuthenticationAgent"> + <title>UnregisterAuthenticationAgent ()</title> + <programlisting> +UnregisterAuthenticationAgent (IN <link linkend="eggdbus-struct-Subject">Subject</link> subject, + IN String object_path) + </programlisting> + <para> +Unregister an authentication agent. + </para> +<variablelist role="params"> + <varlistentry> + <term><literal>IN <link linkend="eggdbus-struct-Subject">Subject</link> <parameter>subject</parameter></literal>:</term> + <listitem> + <para> +The <parameter>subject</parameter> passed to <link linkend="eggdbus-method-org.freedesktop.PolicyKit1.Authority.RegisterAuthenticationAgent">RegisterAuthenticationAgent()</link>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>IN String <parameter>object_path</parameter></literal>:</term> + <listitem> + <para> +The <parameter>object_path</parameter> passed to <link linkend="eggdbus-method-org.freedesktop.PolicyKit1.Authority.RegisterAuthenticationAgent">RegisterAuthenticationAgent()</link>. + </para> + </listitem> + </varlistentry> +</variablelist> + </refsect2> + <refsect2 role="function" id="eggdbus-method-org.freedesktop.PolicyKit1.Authority.AuthenticationAgentResponse"> + <title>AuthenticationAgentResponse ()</title> + <programlisting> +AuthenticationAgentResponse (IN String cookie, + IN <link linkend="eggdbus-struct-Identity">Identity</link> identity) + </programlisting> + <para> +Method for authentication agents to invoke on successful authentication. This method will fail unless a sufficiently privileged caller invokes it. + </para> +<variablelist role="params"> + <varlistentry> + <term><literal>IN String <parameter>cookie</parameter></literal>:</term> + <listitem> + <para> +The cookie identifying the authentication request that was passed to the authentication agent. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>IN <link linkend="eggdbus-struct-Identity">Identity</link> <parameter>identity</parameter></literal>:</term> + <listitem> + <para> +A <link linkend="eggdbus-struct-Identity">Identity</link> struct describing what identity was authenticated. + </para> + </listitem> + </varlistentry> +</variablelist> + </refsect2> + <refsect2 role="function" id="eggdbus-method-org.freedesktop.PolicyKit1.Authority.EnumerateTemporaryAuthorizations"> + <title>EnumerateTemporaryAuthorizations ()</title> + <programlisting> +EnumerateTemporaryAuthorizations (IN <link linkend="eggdbus-struct-Subject">Subject</link> subject, + OUT Array<<link linkend="eggdbus-struct-TemporaryAuthorization">TemporaryAuthorization</link>> temporary_authorizations) + </programlisting> + <para> +Retrieves all temporary authorizations that applies to <parameter>subject</parameter>. + </para> +<variablelist role="params"> + <varlistentry> + <term><literal>IN <link linkend="eggdbus-struct-Subject">Subject</link> <parameter>subject</parameter></literal>:</term> + <listitem> + <para> +The subject to get temporary authorizations for. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>OUT Array<<link linkend="eggdbus-struct-TemporaryAuthorization">TemporaryAuthorization</link>> <parameter>temporary_authorizations</parameter></literal>:</term> + <listitem> + <para> +An array of <link linkend="eggdbus-struct-TemporaryAuthorization">TemporaryAuthorization</link> structs. + </para> + </listitem> + </varlistentry> +</variablelist> + </refsect2> + <refsect2 role="function" id="eggdbus-method-org.freedesktop.PolicyKit1.Authority.RevokeTemporaryAuthorizations"> + <title>RevokeTemporaryAuthorizations ()</title> + <programlisting> +RevokeTemporaryAuthorizations (IN <link linkend="eggdbus-struct-Subject">Subject</link> subject) + </programlisting> + <para> +Revokes all temporary authorizations that applies to <parameter>subject</parameter>. + </para> +<variablelist role="params"> + <varlistentry> + <term><literal>IN <link linkend="eggdbus-struct-Subject">Subject</link> <parameter>subject</parameter></literal>:</term> + <listitem> + <para> +The subject to revoke temporary authorizations from. + </para> + </listitem> + </varlistentry> +</variablelist> + </refsect2> + <refsect2 role="function" id="eggdbus-method-org.freedesktop.PolicyKit1.Authority.RevokeTemporaryAuthorizationById"> + <title>RevokeTemporaryAuthorizationById ()</title> + <programlisting> +RevokeTemporaryAuthorizationById (IN String id) + </programlisting> + <para> +Revokes all temporary authorizations that applies to <parameter>subject</parameter>. + </para> +<variablelist role="params"> + <varlistentry> + <term><literal>IN String <parameter>id</parameter></literal>:</term> + <listitem> + <para> +The opaque identifier of the temporary authorization. + </para> + </listitem> + </varlistentry> +</variablelist> + </refsect2> + <refsect2 role="function" id="eggdbus-method-org.freedesktop.PolicyKit1.Authority.AddLockdownForAction"> + <title>AddLockdownForAction ()</title> + <programlisting> +AddLockdownForAction (IN String action_id) + </programlisting> + <para> +Locks down an action so administrator authentication is always needed to obtain a temporary authorization for the action. + </para> +<variablelist role="params"> + <varlistentry> + <term><literal>IN String <parameter>action_id</parameter></literal>:</term> + <listitem> + <para> +Identifier for the action. + </para> + </listitem> + </varlistentry> +</variablelist> + </refsect2> + <refsect2 role="function" id="eggdbus-method-org.freedesktop.PolicyKit1.Authority.RemoveLockdownForAction"> + <title>RemoveLockdownForAction ()</title> + <programlisting> +RemoveLockdownForAction (IN String action_id) + </programlisting> + <para> +Removes the effect of a previous <link linkend="eggdbus-method-org.freedesktop.PolicyKit1.Authority.AddLockdownForAction">AddLockdownForAction()</link> call. + </para> +<variablelist role="params"> + <varlistentry> + <term><literal>IN String <parameter>action_id</parameter></literal>:</term> + <listitem> + <para> +Identifier for the action. + </para> + </listitem> + </varlistentry> +</variablelist> + </refsect2> + </refsect1> + <refsect1 role="signals" id="eggdbus-if-signal-details-org.freedesktop.PolicyKit1.Authority"> + <title role="signals.title">Signal Details</title> + <refsect2 role="signal" id="eggdbus-signal-org.freedesktop.PolicyKit1.Authority::Changed"> + <title>The "Changed" signal</title> + <programlisting> +Changed () + </programlisting> + <para> +This signal is emitted when actions and/or authorizations change + </para> +<variablelist role="params"> +</variablelist> + </refsect2> + </refsect1> + <refsect1 role="property_details" id="eggdbus-if-property-details-org.freedesktop.PolicyKit1.Authority"> + <title role="property_details.title">Property Details</title> + <refsect2 role="property" id="eggdbus-property-org.freedesktop.PolicyKit1.Authority:BackendName"> + <title>The "BackendName" property</title> + <programlisting> +BackendName readable String + </programlisting> + <para> +The name of the currently used Authority backend. + </para> + </refsect2> + <refsect2 role="property" id="eggdbus-property-org.freedesktop.PolicyKit1.Authority:BackendVersion"> + <title>The "BackendVersion" property</title> + <programlisting> +BackendVersion readable String + </programlisting> + <para> +The version of the currently used Authority backend. + </para> + </refsect2> + <refsect2 role="property" id="eggdbus-property-org.freedesktop.PolicyKit1.Authority:BackendFeatures"> + <title>The "BackendFeatures" property</title> + <programlisting> +BackendFeatures readable <link linkend="eggdbus-enum-AuthorityFeatures">AuthorityFeatures</link> + </programlisting> + <para> +The features supported by the currently used Authority backend. + </para> + </refsect2> + </refsect1> +</refentry> diff --git a/docs/polkit/polkit-1-docs.xml b/docs/polkit/polkit-1-docs.xml index 5d2ea73..4ddf9cd 100644 --- a/docs/polkit/polkit-1-docs.xml +++ b/docs/polkit/polkit-1-docs.xml @@ -61,8 +61,8 @@ <part id="ref-dbus-api"> <title>D-Bus API Reference</title> - <xi:include href="../../src/polkit/docbook-interface-org.freedesktop.PolicyKit1.Authority.xml"/> - <xi:include href="../../src/polkit/docbook-interface-org.freedesktop.PolicyKit1.AuthenticationAgent.xml"/> + <xi:include href="docbook-interface-org.freedesktop.PolicyKit1.Authority.xml"/> + <xi:include href="docbook-interface-org.freedesktop.PolicyKit1.AuthenticationAgent.xml"/> </part> <part id="ref-api"> |