org.freedesktop.PolicyKit1.Authority.xml 3.84 KB
Newer Older
David Zeuthen's avatar
David Zeuthen committed
1 2 3 4
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>

5 6 7
  <!-- User defined struct for Subjects -->
  <annotation name="org.gtk.EggDBus.DeclareStruct" value="Subject">
    <annotation name="org.gtk.EggDBus.Struct.Signature" value="(sa{sv})"/>
8 9 10 11 12 13 14

    <!-- element 0: string:          the subject type; known values: "unix-user", "unix-group", "unix-process" -->

    <!-- element 1: map<string,any>: key/value pairs depending on the subject type -->

    <!-- TODO: document values in hash table for each subject type-->

15 16
  </annotation>

17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
  <!-- User defined struct for ActionDescription -->
  <annotation name="org.gtk.EggDBus.DeclareStruct" value="ActionDescription">
    <annotation name="org.gtk.EggDBus.Struct.Signature" value="(ssssssa{ss})"/>

    <!-- element 0: string:              action-id -->
    <!-- element 1: string:              description -->
    <!-- element 2: string:              message -->
    <!-- element 3: string:              vendor name -->
    <!-- element 4: string:              vendor url -->
    <!-- element 5: string:              icon name -->
    <!-- element 6: map<string,string>:  annotations -->

    <!-- TODO: also include defaults -->

  </annotation>

33 34 35 36 37 38 39 40 41 42
  <!-- User defined struct for AuthorizationClaim -->
  <annotation name="org.gtk.EggDBus.DeclareStruct" value="AuthorizationClaim">
    <annotation name="org.gtk.EggDBus.Struct.Signature" value="((sa{sv})sa{ss})"/>

    <!-- element 0: (sa{sv}):            subject -->
    <!-- element 1: string:              action-id -->
    <!-- element 2: map<string,string>:  attributes -->

  </annotation>

43
  <!-- The error domain used for reporting errors -->
44 45 46 47 48 49 50
  <annotation name="org.gtk.EggDBus.DeclareErrorDomain" value="Error">
    <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.NotSupported">
      <annotation name="org.gtk.EggDBus.DocString" value="Operation is not supported"/>
    </annotation>
David Zeuthen's avatar
David Zeuthen committed
51
  </annotation>
David Zeuthen's avatar
David Zeuthen committed
52

53
  <!-- An enumeration for results of CheckClaim() (TODO: implement this method) -->
54 55 56 57 58 59 60 61 62 63 64 65 66
  <annotation name="org.gtk.EggDBus.DeclareEnum" value="AuthorizationResult">
    <annotation name="org.gtk.EggDBus.Enum.Member" value="NotAuthorized">
      <annotation name="org.gtk.EggDBus.DocString" value="The subject is not authorized for the specified action"/>
    </annotation>
    <annotation name="org.gtk.EggDBus.Enum.Member" value="Authorized">
      <annotation name="org.gtk.EggDBus.DocString" value="The subject is authorized for the specified action"/>
    </annotation>
    <annotation name="org.gtk.EggDBus.Enum.Member" value="Challenge">
      <annotation name="org.gtk.EggDBus.DocString" value="The subject is authorized if more information is provided"/>
    </annotation>
  </annotation>


David Zeuthen's avatar
David Zeuthen committed
67 68 69 70 71 72 73
  <interface name="org.freedesktop.PolicyKit1.Authority">

    <method name="SayHello">
      <arg name="message" direction="in" type="s"/>
      <arg name="result" direction="out" type="s"/>
    </method>

David Zeuthen's avatar
David Zeuthen committed
74 75
    <method name="EnumerateUsers">
      <arg name="users" direction="out" type="a(sa{sv})"/>
David Zeuthen's avatar
David Zeuthen committed
76 77
    </method>

78 79 80 81 82
    <method name="EnumerateActions">
      <arg name="locale" direction="in" type="s"/>
      <arg name="action_descriptions" direction="out" type="a(ssssssa{ss})"/>
    </method>

83 84 85 86 87 88 89 90 91
    <method name="CheckClaim">
      <arg name="claim" direction="in" type="((sa{sv})sa{ss})">
        <annotation name="org.gtk.EggDBus.StructType" value="AuthorizationClaim"/>
      </arg>
      <arg name="result" direction="out" type="i">
        <annotation name="org.gtk.EggDBus.EnumType" value="AuthorizationResult"/>
      </arg>
    </method>

David Zeuthen's avatar
David Zeuthen committed
92 93
  </interface>
</node>