org.freedesktop.PolicyKit1.Authority.xml 10.6 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 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
  <!-- An enumeration for implicit authorizations -->
  <annotation name="org.gtk.EggDBus.DeclareEnum" value="ImplicitAuthorization">

    <annotation name="org.gtk.EggDBus.Enum.Member" value="NotAuthorized">
      <annotation name="org.gtk.EggDBus.DocString" value="Subject is not authorized."/>
    </annotation>

    <annotation name="org.gtk.EggDBus.Enum.Member" value="AuthenticationRequired">
      <annotation name="org.gtk.EggDBus.DocString" value="Authentication is required."/>
    </annotation>

    <annotation name="org.gtk.EggDBus.Enum.Member" value="AdministratorAuthenticationRequired">
      <annotation name="org.gtk.EggDBus.DocString" value="Authentication as an administrator is required."/>
    </annotation>

    <annotation name="org.gtk.EggDBus.Enum.Member" value="AuthenticationRequiredRetained">
      <annotation name="org.gtk.EggDBus.DocString" value="Authentication is required. If the authorization is obtained, it is retained."/>
    </annotation>

    <annotation name="org.gtk.EggDBus.Enum.Member" value="AdministratorAuthenticationRequiredRetained">
      <annotation name="org.gtk.EggDBus.DocString" value="Authentication as an administrator is required. If the authorization is obtained, it is retained."/>
    </annotation>

    <annotation name="org.gtk.EggDBus.Enum.Member" value="Authorized">
      <annotation name="org.gtk.EggDBus.DocString" value="The subject is authorized"/>
    </annotation>

  </annotation>

64
  <!-- ActionDescription struct -->
65 66
  <annotation name="org.gtk.EggDBus.DeclareStruct" value="ActionDescription">

67 68 69
    <annotation name="org.gtk.EggDBus.Struct.Member"  value="s:action_id">
      <annotation name="org.gtk.EggDBus.DocString" value="Action Identifier"/>
    </annotation>
70

71 72 73
    <annotation name="org.gtk.EggDBus.Struct.Member"  value="s:description">
      <annotation name="org.gtk.EggDBus.DocString" value="Action Description"/>
    </annotation>
74

75 76 77
    <annotation name="org.gtk.EggDBus.Struct.Member"  value="s:message">
      <annotation name="org.gtk.EggDBus.DocString" value="Action Message"/>
    </annotation>
78

79 80 81
    <annotation name="org.gtk.EggDBus.Struct.Member"  value="s:vendor_name">
      <annotation name="org.gtk.EggDBus.DocString" value="Vendor Name"/>
    </annotation>
82

83 84 85
    <annotation name="org.gtk.EggDBus.Struct.Member"  value="s:vendor_url">
      <annotation name="org.gtk.EggDBus.DocString" value="Vendor URL"/>
    </annotation>
86

87 88 89
    <annotation name="org.gtk.EggDBus.Struct.Member"  value="s:icon_name">
      <annotation name="org.gtk.EggDBus.DocString" value="Icon Name"/>
    </annotation>
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105

    <annotation name="org.gtk.EggDBus.Struct.Member"  value="i:implicit_any">
      <annotation name="org.gtk.EggDBus.EnumType" value="ImplicitAuthorization"/>
      <annotation name="org.gtk.EggDBus.DocString" value="Defaults for any kind of subject"/>
    </annotation>

    <annotation name="org.gtk.EggDBus.Struct.Member"  value="i:implicit_inactive">
      <annotation name="org.gtk.EggDBus.EnumType" value="ImplicitAuthorization"/>
      <annotation name="org.gtk.EggDBus.DocString" value="Defaults for subjects in local inactive sessions"/>
    </annotation>

    <annotation name="org.gtk.EggDBus.Struct.Member"  value="i:implicit_active">
      <annotation name="org.gtk.EggDBus.EnumType" value="ImplicitAuthorization"/>
      <annotation name="org.gtk.EggDBus.DocString" value="Defaults for subjects in local active sessions"/>
    </annotation>

106 107 108
    <annotation name="org.gtk.EggDBus.Struct.Member"  value="a{ss}:annotations">
      <annotation name="org.gtk.EggDBus.DocString" value="Annotations"/>
    </annotation>
109 110 111 112

  </annotation>

  <!-- The error domain used for reporting errors -->
113 114 115 116 117 118 119
  <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>
120 121 122
    <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
123
  </annotation>
David Zeuthen's avatar
David Zeuthen committed
124

125
  <!-- An enumeration for results when checking for an authorization -->
126 127 128 129 130 131 132 133 134 135 136 137
  <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>

138 139 140 141 142 143 144
  <!-- 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>

David Zeuthen's avatar
David Zeuthen committed
145
  <interface name="org.freedesktop.PolicyKit1.Authority">
146 147
    <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."/>
David Zeuthen's avatar
David Zeuthen committed
148

149
    <method name="EnumerateActions">
150 151 152 153 154 155
      <annotation name="org.gtk.EggDBus.DocString" value="Enumerates all registered PolicyKit actions."/>

      <arg name="locale" direction="in" type="s">
        <annotation name="org.gtk.EggDBus.DocString" value="The locale to get descriptions in or the blank string to use the system locale."/>
      </arg>

156
      <arg name="action_descriptions" direction="out" type="a(ssssssiiia{ss})">
157
        <annotation name="org.gtk.EggDBus.DocString" value="An array of action description structs."/>
158 159
        <annotation name="org.gtk.EggDBus.StructType" value="ActionDescription"/>
      </arg>
160 161
    </method>

162
    <method name="CheckAuthorization">
163 164
      <annotation name="org.gtk.EggDBus.DocString" value="Checks if @subject is authorized to perform the action with identifier @action_id."/>

165
      <arg name="subject" direction="in" type="(sa{sv})">
166
        <annotation name="org.gtk.EggDBus.DocString" value="The subject in question."/>
167 168
        <annotation name="org.gtk.EggDBus.StructType" value="Subject"/>
      </arg>
169 170 171 172 173

      <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>

174
      <arg name="flags" direction="in" type="i">
175
        <annotation name="org.gtk.EggDBus.DocString" value="A set of #CheckAuthorizationFlags."/>
176
        <annotation name="org.gtk.EggDBus.FlagsType" value="CheckAuthorizationFlags"/>
177
      </arg>
178

179
      <arg name="result" direction="out" type="i">
180
        <annotation name="org.gtk.EggDBus.DocString" value="The result of the authorization check."/>
181 182 183 184
        <annotation name="org.gtk.EggDBus.EnumType" value="AuthorizationResult"/>
      </arg>
    </method>

185
    <method name="RegisterAuthenticationAgent">
186 187
      <annotation name="org.gtk.EggDBus.DocString" value="Register an authentication agent."/>

188
      <arg name="object_path" direction="in" type="s">
189
        <annotation name="org.gtk.EggDBus.DocString" value="The object path of authentication agent object on the unique name of the caller."/>
190 191 192 193
      </arg>
    </method>

    <method name="UnregisterAuthenticationAgent">
194 195
      <annotation name="org.gtk.EggDBus.DocString" value="Unregister an authentication agent."/>

196
      <arg name="object_path" direction="in" type="s">
197
        <annotation name="org.gtk.EggDBus.DocString" value="The object path of authentication agent object on the unique name of the caller."/>
198 199 200
      </arg>
    </method>

201
    <method name="AuthenticationAgentResponse">
202 203
      <annotation name="org.gtk.EggDBus.DocString" value="Method for authentication agents to invoke on successful authentication. This method will fail unless a sufficiently privileged caller invokes it."/>

204
      <arg name="cookie" direction="in" type="s">
205
        <annotation name="org.gtk.EggDBus.DocString" value="The cookie identifying the authentication request that was passed to the authentication agent."/>
206 207 208 209
      </arg>

      <arg name="identity" direction="in" type="(sa{sv})">
        <annotation name="org.gtk.EggDBus.StructType" value="Identity"/>
210
        <annotation name="org.gtk.EggDBus.DocString" value="The identity that was authenticated."/>
211 212 213
      </arg>
    </method>

214 215 216 217
    <signal name="Changed">
      <annotation name="org.gtk.EggDBus.DocString" value="Emitted when actions and/or authorizations change"/>
    </signal>

David Zeuthen's avatar
David Zeuthen committed
218 219
  </interface>
</node>