summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorDavid Zeuthen <davidz@redhat.com>2009-02-08 14:22:45 -0500
committerDavid Zeuthen <davidz@redhat.com>2009-02-08 14:22:45 -0500
commitbc150368d95ef70b04af3bc9250c1bdfe950a048 (patch)
treeb09e80b4ac2636f7c7f128fe20a9d741f43f12b3 /data
parent7b815725b03da8564f7bea835c8f05539e481adc (diff)
downloadpolkit-bc150368d95ef70b04af3bc9250c1bdfe950a048.tar.gz
implement cancellation of authorization checks
Also add a short example to test this.
Diffstat (limited to 'data')
-rw-r--r--data/org.freedesktop.PolicyKit1.Authority.xml23
1 files changed, 22 insertions, 1 deletions
diff --git a/data/org.freedesktop.PolicyKit1.Authority.xml b/data/org.freedesktop.PolicyKit1.Authority.xml
index 2057bd6..34a2b4b 100644
--- a/data/org.freedesktop.PolicyKit1.Authority.xml
+++ b/data/org.freedesktop.PolicyKit1.Authority.xml
@@ -153,12 +153,21 @@
<annotation name="org.gtk.EggDBus.ErrorDomain.Member" value="org.freedesktop.PolicyKit1.Error.Failed">
<annotation name="org.gtk.EggDBus.DocString" value="The operation failed."/>
</annotation>
+ <annotation name="org.gtk.EggDBus.ErrorDomain.Member" value="org.freedesktop.PolicyKit1.Error.Cancelled">
+ <annotation name="org.gtk.EggDBus.DocString" value="The operation was cancelled."/>
+ </annotation>
<annotation name="org.gtk.EggDBus.ErrorDomain.Member" value="org.freedesktop.PolicyKit1.Error.NotSupported">
<annotation name="org.gtk.EggDBus.DocString" value="Operation is not supported."/>
</annotation>
<annotation name="org.gtk.EggDBus.ErrorDomain.Member" value="org.freedesktop.PolicyKit1.Error.NotAuthorized">
<annotation name="org.gtk.EggDBus.DocString" value="Not authorized to perform operation."/>
</annotation>
+
+ <!-- errors not exposed in GObject library follows here -->
+ <annotation name="org.gtk.EggDBus.ErrorDomain.Member" value="org.freedesktop.PolicyKit1.Error.CancellationIdNotUnique">
+ <annotation name="org.gtk.EggDBus.ErrorDomain.Member.Value" value="1000"/>
+ <annotation name="org.gtk.EggDBus.DocString" value="The passed @cancellation_id is already in use."/>
+ </annotation>
</annotation>
<method name="EnumerateActions">
@@ -175,7 +184,7 @@
</method>
<method name="CheckAuthorization">
- <annotation name="org.gtk.EggDBus.DocString" value="Checks if @subject is authorized to perform the action with identifier @action_id."/>
+ <annotation name="org.gtk.EggDBus.DocString" value="<para>Checks if @subject is authorized to perform the action with identifier @action_id.</para><para>If @cancellation_id is non-empty and already in use for the caller, the %org.freedesktop.PolicyKit1.Error.CancellationIdNotUnique error is returned.</para>"/>
<arg name="subject" direction="in" type="(sa{sv})">
<annotation name="org.gtk.EggDBus.DocString" value="A #Subject struct."/>
@@ -191,12 +200,24 @@
<annotation name="org.gtk.EggDBus.DocString" value="A set of #CheckAuthorizationFlags."/>
</arg>
+ <arg name="cancellation_id" direction="in" type="s">
+ <annotation name="org.gtk.EggDBus.DocString" value="A unique id used to cancel the the authentication check via org.freedesktop.PolicyKit1.Authority.CancelCheckAuthorization() or the empty string if cancellation is not needed."/>
+ </arg>
+
<arg name="result" direction="out" type="u">
<annotation name="org.gtk.EggDBus.Type" value="AuthorizationResult"/>
<annotation name="org.gtk.EggDBus.DocString" value="A value from the #AuthorizationResult enumeration."/>
</arg>
</method>
+ <method name="CancelCheckAuthorization">
+ <annotation name="org.gtk.EggDBus.DocString" value="Cancels an authorization check."/>
+
+ <arg name="cancellation_id" direction="in" type="s">
+ <annotation name="org.gtk.EggDBus.DocString" value="The @cancellation_id passed to org.freedesktop.PolicyKit1.Authority.CheckAuthorization()."/>
+ </arg>
+ </method>
+
<method name="RegisterAuthenticationAgent">
<annotation name="org.gtk.EggDBus.DocString" value="<para>Register an authentication agent.</para><para>Note that current versions of PolicyKit will only work if @session_id is set to the empty string. In the future it might work for non-empty strings if the caller is sufficiently privileged.</para>"/>