summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorDavid Zeuthen <davidz@redhat.com>2009-02-09 15:53:51 -0500
committerDavid Zeuthen <davidz@redhat.com>2009-02-09 15:53:51 -0500
commitb891d8a3245d364975cecb2289c442f54b2327c6 (patch)
tree7d500881e6c0098c23924888421aaf007162bf3c /data
parent21e21e97cd2b663ae96efe62c8f6cc69edbd1d3c (diff)
downloadpolkit-b891d8a3245d364975cecb2289c442f54b2327c6.tar.gz
add the ObtainAuthorization() method and use in for the 'polkit-1 run' command
Also add an example for this.
Diffstat (limited to 'data')
-rw-r--r--data/org.freedesktop.PolicyKit1.Authority.xml47
1 files changed, 47 insertions, 0 deletions
diff --git a/data/org.freedesktop.PolicyKit1.Authority.xml b/data/org.freedesktop.PolicyKit1.Authority.xml
index 34a2b4b..a3d5741 100644
--- a/data/org.freedesktop.PolicyKit1.Authority.xml
+++ b/data/org.freedesktop.PolicyKit1.Authority.xml
@@ -6,6 +6,8 @@
<annotation name="org.gtk.EggDBus.DocString.Summary" value="Authority Interface"/>
<annotation name="org.gtk.EggDBus.DocString" value="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."/>
+ <!-- ---------------------------------------------------------------------------------------------------- -->
+
<!-- Subject struct -->
<annotation name="org.gtk.EggDBus.DeclareStruct" value="Subject">
<annotation name="org.gtk.EggDBus.DocString.Summary" value="Subjects"/>
@@ -21,6 +23,8 @@
</annotation>
+ <!-- ---------------------------------------------------------------------------------------------------- -->
+
<!-- Identity struct -->
<annotation name="org.gtk.EggDBus.DeclareStruct" value="Identity">
<annotation name="org.gtk.EggDBus.DocString.Summary" value="Subjects"/>
@@ -38,6 +42,8 @@
</annotation>
+ <!-- ---------------------------------------------------------------------------------------------------- -->
+
<!-- ActionDescription struct -->
<annotation name="org.gtk.EggDBus.DeclareStruct" value="ActionDescription">
<annotation name="org.gtk.EggDBus.DocString.Summary" value="Actions"/>
@@ -88,6 +94,8 @@
</annotation>
+ <!-- ---------------------------------------------------------------------------------------------------- -->
+
<!-- Flags used for checking authorizations -->
<annotation name="org.gtk.EggDBus.DeclareFlags" value="CheckAuthorizationFlags">
<annotation name="org.gtk.EggDBus.DocString.Summary" value="Flags used when checking authorizations"/>
@@ -98,6 +106,8 @@
</annotation>
</annotation>
+ <!-- ---------------------------------------------------------------------------------------------------- -->
+
<!-- An enumeration for results when checking for an authorization -->
<annotation name="org.gtk.EggDBus.DeclareEnum" value="AuthorizationResult">
<annotation name="org.gtk.EggDBus.DocString.Summary" value="Possible results for checking authorizations"/>
@@ -114,6 +124,8 @@
</annotation>
</annotation>
+ <!-- ---------------------------------------------------------------------------------------------------- -->
+
<!-- An enumeration for implicit authorizations -->
<annotation name="org.gtk.EggDBus.DeclareEnum" value="ImplicitAuthorization">
<annotation name="org.gtk.EggDBus.DocString.Summary" value="Implicit authorizations"/>
@@ -145,6 +157,8 @@
</annotation>
+ <!-- ---------------------------------------------------------------------------------------------------- -->
+
<!-- The error domain used for reporting errors -->
<annotation name="org.gtk.EggDBus.DeclareErrorDomain" value="Error">
<annotation name="org.gtk.EggDBus.DocString.Summary" value="Errors"/>
@@ -170,6 +184,8 @@
</annotation>
</annotation>
+ <!-- ---------------------------------------------------------------------------------------------------- -->
+
<method name="EnumerateActions">
<annotation name="org.gtk.EggDBus.DocString" value="Enumerates all registered PolicyKit actions."/>
@@ -183,6 +199,8 @@
</arg>
</method>
+ <!-- ---------------------------------------------------------------------------------------------------- -->
+
<method name="CheckAuthorization">
<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>"/>
@@ -218,6 +236,35 @@
</arg>
</method>
+ <!-- ---------------------------------------------------------------------------------------------------- -->
+
+ <method name="ObtainAuthorization">
+ <annotation name="org.gtk.EggDBus.DocString" value="Obtains a temporary authorization for @subject to perform the action identified by @action_id. If @subject is already authorized, this method returns immediately without error. If the authorization could not be obtained or @action_id doesn't allow temporary authorizations, the %org.freedesktop.PolicyKit1.Error.Failed error is returned."/>
+
+ <arg name="subject" direction="in" type="(sa{sv})">
+ <annotation name="org.gtk.EggDBus.DocString" value="A #Subject struct."/>
+ <annotation name="org.gtk.EggDBus.Type" value="Subject"/>
+ </arg>
+
+ <arg name="action_id" direction="in" type="s">
+ <annotation name="org.gtk.EggDBus.DocString" value="Identifier for the action that @subject is attempting to do."/>
+ </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.CancelObtainAuthorization() or the empty string if cancellation is not needed."/>
+ </arg>
+ </method>
+
+ <method name="CancelObtainAuthorization">
+ <annotation name="org.gtk.EggDBus.DocString" value="Cancels an attempt to obtain an authorization."/>
+
+ <arg name="cancellation_id" direction="in" type="s">
+ <annotation name="org.gtk.EggDBus.DocString" value="The @cancellation_id passed to org.freedesktop.PolicyKit1.Authority.ObtainAuthorization()."/>
+ </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>"/>