org.freedesktop.PolicyKit1.Authority.xml 8.32 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
  <!-- Subject struct -->
6
  <annotation name="org.gtk.EggDBus.DeclareStruct" value="Subject">
7

8 9 10
    <annotation name="org.gtk.EggDBus.Struct.Member"  value="s:subject_kind">
      <annotation name="org.gtk.EggDBus.DocString" value="Kind of subject"/>
    </annotation>
11

12 13 14
    <annotation name="org.gtk.EggDBus.Struct.Member"  value="a{sv}:subject_details">
      <annotation name="org.gtk.EggDBus.DocString" value="Details about the subject"/>
    </annotation>
15

16
    <!-- TODO: document values in hash map for each subject type-->
17

18 19
  </annotation>

20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
  <!-- Identity struct -->
  <annotation name="org.gtk.EggDBus.DeclareStruct" value="Identity">

    <annotation name="org.gtk.EggDBus.Struct.Member"  value="s:identity_kind">
      <annotation name="org.gtk.EggDBus.DocString" value="Kind of identity"/>
    </annotation>

    <annotation name="org.gtk.EggDBus.Struct.Member"  value="a{sv}:identity_details">
      <annotation name="org.gtk.EggDBus.DocString" value="Details about the identity"/>
    </annotation>

    <!-- TODO: document values in hash map for each identity type-->

  </annotation>

35
  <!-- ActionDescription struct -->
36 37
  <annotation name="org.gtk.EggDBus.DeclareStruct" value="ActionDescription">

38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
    <annotation name="org.gtk.EggDBus.Struct.Member"  value="s:action_id">
      <annotation name="org.gtk.EggDBus.DocString" value="Action Identifier"/>
    </annotation>
    <annotation name="org.gtk.EggDBus.Struct.Member"  value="s:description">
      <annotation name="org.gtk.EggDBus.DocString" value="Action Description"/>
    </annotation>
    <annotation name="org.gtk.EggDBus.Struct.Member"  value="s:message">
      <annotation name="org.gtk.EggDBus.DocString" value="Action Message"/>
    </annotation>
    <annotation name="org.gtk.EggDBus.Struct.Member"  value="s:vendor_name">
      <annotation name="org.gtk.EggDBus.DocString" value="Vendor Name"/>
    </annotation>
    <annotation name="org.gtk.EggDBus.Struct.Member"  value="s:vendor_url">
      <annotation name="org.gtk.EggDBus.DocString" value="Vendor URL"/>
    </annotation>
    <annotation name="org.gtk.EggDBus.Struct.Member"  value="s:icon_name">
      <annotation name="org.gtk.EggDBus.DocString" value="Icon Name"/>
    </annotation>
    <annotation name="org.gtk.EggDBus.Struct.Member"  value="a{ss}:annotations">
      <annotation name="org.gtk.EggDBus.DocString" value="Annotations"/>
    </annotation>
59 60 61 62 63 64

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

  </annotation>

  <!-- The error domain used for reporting errors -->
65 66 67 68 69 70 71
  <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>
72 73 74
    <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>
David Zeuthen's avatar
David Zeuthen committed
75
  </annotation>
David Zeuthen's avatar
David Zeuthen committed
76

77
  <!-- An enumeration for results when checking for an authorization -->
78 79 80 81 82 83 84 85 86 87 88 89
  <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>

90 91 92 93 94 95 96 97 98 99
  <!-- Flags used for checking authorizations -->
  <annotation name="org.gtk.EggDBus.DeclareFlags" value="CheckAuthorizationFlags">
    <annotation name="org.gtk.EggDBus.Flags.Member" value="AllowUserInteraction">
      <annotation name="org.gtk.EggDBus.DocString" value="If the subject can obtain the authorization through authentication, and an authentication agent is available, then attempt to do so. Note, this means that the #CheckAuthorization() method is likely to block for a long time."/>
    </annotation>
  </annotation>

  <!-- Authorization struct -->
  <annotation name="org.gtk.EggDBus.DeclareStruct" value="Authorization">
    <annotation name="org.gtk.EggDBus.Struct.Member"  value="s:action_id">
100
      <annotation name="org.gtk.EggDBus.DocString" value="Identifier for the action the authorization is for"/>
101 102
    </annotation>

103 104 105 106 107 108 109
    <annotation name="org.gtk.EggDBus.Struct.Member"  value="(sa{sv}):subject">
      <annotation name="org.gtk.EggDBus.StructType" value="Subject"/>
      <annotation name="org.gtk.EggDBus.DocString" value="Subject that the authorization applies to"/>
    </annotation>

    <annotation name="org.gtk.EggDBus.Struct.Member"  value="b:is_negative">
      <annotation name="org.gtk.EggDBus.DocString" value="Whether the authorization is negative"/>
110 111
    </annotation>
  </annotation>
112

David Zeuthen's avatar
David Zeuthen committed
113 114
  <interface name="org.freedesktop.PolicyKit1.Authority">

David Zeuthen's avatar
David Zeuthen committed
115
    <method name="EnumerateUsers">
116
      <arg name="users" direction="out" type="a(sa{sv})">
117
        <annotation name="org.gtk.EggDBus.StructType" value="Identity"/>
118
      </arg>
David Zeuthen's avatar
David Zeuthen committed
119 120
    </method>

121
    <method name="EnumerateGroups">
122
      <arg name="groups" direction="out" type="a(sa{sv})">
123
        <annotation name="org.gtk.EggDBus.StructType" value="Identity"/>
124
      </arg>
125 126
    </method>

127 128
    <method name="EnumerateActions">
      <arg name="locale" direction="in" type="s"/>
129 130 131
      <arg name="action_descriptions" direction="out" type="a(ssssssa{ss})">
        <annotation name="org.gtk.EggDBus.StructType" value="ActionDescription"/>
      </arg>
132 133
    </method>

134 135 136 137 138 139 140
    <method name="CheckAuthorization">
      <arg name="subject" direction="in" type="(sa{sv})">
        <annotation name="org.gtk.EggDBus.StructType" value="Subject"/>
      </arg>
      <arg name="action_id" direction="in" type="s"/>
      <arg name="flags" direction="in" type="i">
        <annotation name="org.gtk.EggDBus.FlagsType" value="CheckAuthorizationFlags"/>
141
      </arg>
142

143 144 145 146 147
      <arg name="result" direction="out" type="i">
        <annotation name="org.gtk.EggDBus.EnumType" value="AuthorizationResult"/>
      </arg>
    </method>

148
    <method name="AddAuthorization">
149 150 151 152
      <arg name="identity" direction="in" type="(sa{sv})">
        <annotation name="org.gtk.EggDBus.StructType" value="Identity"/>
        <annotation name="org.gtk.EggDBus.DocString" value="The identity to add @authorization to"/>
      </arg>
153 154
      <arg name="authorization" direction="in" type="(s(sa{sv})b)">
        <annotation name="org.gtk.EggDBus.StructType" value="Authorization"/>
155
        <annotation name="org.gtk.EggDBus.DocString" value="The authorization to add for @identity"/>
156 157 158
      </arg>
    </method>

159
    <method name="RemoveAuthorization">
160 161 162 163
      <arg name="identity" direction="in" type="(sa{sv})">
        <annotation name="org.gtk.EggDBus.StructType" value="Identity"/>
        <annotation name="org.gtk.EggDBus.DocString" value="The identity to remove @authorization from"/>
      </arg>
164 165
      <arg name="authorization" direction="in" type="(s(sa{sv})b)">
        <annotation name="org.gtk.EggDBus.StructType" value="Authorization"/>
166
        <annotation name="org.gtk.EggDBus.DocString" value="The authorization to remove from @identity"/>
167 168 169 170
      </arg>
    </method>

    <method name="EnumerateAuthorizations">
171 172 173
      <arg name="identity" direction="in" type="(sa{sv})">
        <annotation name="org.gtk.EggDBus.StructType" value="Identity"/>
        <annotation name="org.gtk.EggDBus.DocString" value="The identity to enumerate authorizations for"/>
174
      </arg>
175
      <arg name="authorizations" direction="out" type="a(s(sa{sv})b)">
176
        <annotation name="org.gtk.EggDBus.StructType" value="Authorization"/>
177
        <annotation name="org.gtk.EggDBus.DocString" value="An array of authorizations for @identity"/>
178 179 180
      </arg>
    </method>

David Zeuthen's avatar
David Zeuthen committed
181 182
  </interface>
</node>