org.freedesktop.PolicyKit1.Authority.xml 13.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 6 7
  <interface name="org.freedesktop.PolicyKit1.Authority">
    <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."/>
8

9 10
    <!-- Subject struct -->
    <annotation name="org.gtk.EggDBus.DeclareStruct" value="Subject">
David Zeuthen's avatar
David Zeuthen committed
11 12
      <annotation name="org.gtk.EggDBus.DocString.Summary" value="Subjects"/>
      <annotation name="org.gtk.EggDBus.DocString" value="<para>This struct describes subjects such as UNIX processes. It is typically used to check if a given process is authorized for an action.</para><para>TODO: document required/optional key/value pairs in @subject_details.</para>"/>
13

14
      <annotation name="org.gtk.EggDBus.Struct.Member"  value="String:subject_kind">
David Zeuthen's avatar
David Zeuthen committed
15
        <annotation name="org.gtk.EggDBus.DocString" value="The type of the subject."/>
16
      </annotation>
17

18
      <annotation name="org.gtk.EggDBus.Struct.Member"  value="Dict<String,Variant>:subject_details">
David Zeuthen's avatar
David Zeuthen committed
19
        <annotation name="org.gtk.EggDBus.DocString" value="Details about the subject. Depending of the value of @subject_kind, a set of well-defined key/value pairs are guaranteed to be available."/>
20
      </annotation>
21

22 23
    </annotation>

24 25
    <!-- Identity struct -->
    <annotation name="org.gtk.EggDBus.DeclareStruct" value="Identity">
David Zeuthen's avatar
David Zeuthen committed
26 27
      <annotation name="org.gtk.EggDBus.DocString.Summary" value="Subjects"/>
      <annotation name="org.gtk.EggDBus.DocString" value="<para>This struct describes identities such as UNIX users and UNIX groups. It is typically used to check if a given process is authorized for an action.</para><para>TODO: document required/optional key/value pairs in @identity_details.</para>"/>
28

29
      <annotation name="org.gtk.EggDBus.Struct.Member"  value="String:identity_kind">
David Zeuthen's avatar
David Zeuthen committed
30
        <annotation name="org.gtk.EggDBus.DocString" value="Type of identity."/>
31
      </annotation>
32

33
      <annotation name="org.gtk.EggDBus.Struct.Member"  value="Dict<String,Variant>:identity_details">
David Zeuthen's avatar
David Zeuthen committed
34
        <annotation name="org.gtk.EggDBus.DocString" value="Details about the identity. Depending of the value of @identity_kind, a set of well-defined key/value pairs are guaranteed to be available."/>
35
      </annotation>
36

37
      <!-- TODO: document values in hash map for each identity type-->
38 39 40

    </annotation>

41 42
    <!-- ActionDescription struct -->
    <annotation name="org.gtk.EggDBus.DeclareStruct" value="ActionDescription">
David Zeuthen's avatar
David Zeuthen committed
43 44
      <annotation name="org.gtk.EggDBus.DocString.Summary" value="Actions"/>
      <annotation name="org.gtk.EggDBus.DocString" value="This struct describes actions registered with the PolicyKit daemon."/>
45

46
      <annotation name="org.gtk.EggDBus.Struct.Member"  value="String:action_id">
David Zeuthen's avatar
David Zeuthen committed
47
        <annotation name="org.gtk.EggDBus.DocString" value="Action Identifier."/>
48
      </annotation>
49

50
      <annotation name="org.gtk.EggDBus.Struct.Member"  value="String:description">
David Zeuthen's avatar
David Zeuthen committed
51
        <annotation name="org.gtk.EggDBus.DocString" value="Localized description of the action."/>
52
      </annotation>
53

54
      <annotation name="org.gtk.EggDBus.Struct.Member"  value="String:message">
David Zeuthen's avatar
David Zeuthen committed
55
        <annotation name="org.gtk.EggDBus.DocString" value="Localized message to be displayed when making the user authenticate for an action."/>
56
      </annotation>
57

58
      <annotation name="org.gtk.EggDBus.Struct.Member"  value="String:vendor_name">
David Zeuthen's avatar
David Zeuthen committed
59
        <annotation name="org.gtk.EggDBus.DocString" value="Name of the provider of the action or the empty string."/>
60
      </annotation>
61

62
      <annotation name="org.gtk.EggDBus.Struct.Member"  value="String:vendor_url">
David Zeuthen's avatar
David Zeuthen committed
63
        <annotation name="org.gtk.EggDBus.DocString" value="A URL pointing to a place with more information about the action or the empty string."/>
64
      </annotation>
65

66
      <annotation name="org.gtk.EggDBus.Struct.Member"  value="String:icon_name">
David Zeuthen's avatar
David Zeuthen committed
67
        <annotation name="org.gtk.EggDBus.DocString" value="The themed icon describing the action or the empty string if no icon is set."/>
68
      </annotation>
69

70 71
      <annotation name="org.gtk.EggDBus.Struct.Member"  value="ImplicitAuthorization:implicit_any">
        <annotation name="org.gtk.EggDBus.Type" value="ImplicitAuthorization"/>
David Zeuthen's avatar
David Zeuthen committed
72
        <annotation name="org.gtk.EggDBus.DocString" value="A value from the #ImplicitAuthorization enumeration for implicit authorizations that apply to any #Subject."/>
73
      </annotation>
74

75 76
      <annotation name="org.gtk.EggDBus.Struct.Member"  value="ImplicitAuthorization:implicit_inactive">
        <annotation name="org.gtk.EggDBus.Type" value="ImplicitAuthorization"/>
David Zeuthen's avatar
David Zeuthen committed
77
        <annotation name="org.gtk.EggDBus.DocString" value="A value from the #ImplicitAuthorization enumeration for implicit authorizations that apply any #Subject in an inactive user session on the local console."/>
78
      </annotation>
79

80 81
      <annotation name="org.gtk.EggDBus.Struct.Member"  value="ImplicitAuthorization:implicit_active">
        <annotation name="org.gtk.EggDBus.Type" value="ImplicitAuthorization"/>
David Zeuthen's avatar
David Zeuthen committed
82
        <annotation name="org.gtk.EggDBus.DocString" value="A value from the #ImplicitAuthorization enumeration for implicit authorizations that apply any #Subject in an active user session on the local console."/>
83
      </annotation>
84

85
      <annotation name="org.gtk.EggDBus.Struct.Member"  value="Dict<String,String>:annotations">
David Zeuthen's avatar
David Zeuthen committed
86
        <annotation name="org.gtk.EggDBus.DocString" value="Annotations for the action."/>
87
      </annotation>
88

89
    </annotation>
90

91 92
    <!-- Flags used for checking authorizations -->
    <annotation name="org.gtk.EggDBus.DeclareFlags" value="CheckAuthorizationFlags">
David Zeuthen's avatar
David Zeuthen committed
93 94 95
      <annotation name="org.gtk.EggDBus.DocString.Summary" value="Flags used when checking authorizations"/>
      <annotation name="org.gtk.EggDBus.DocString" value="Flags used in the org.freedesktop.PolicyKit1.Authority.CheckAuthorization() method."/>

96
      <annotation name="org.gtk.EggDBus.Flags.Member" value="AllowUserInteraction">
David Zeuthen's avatar
David Zeuthen committed
97
        <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 org.freedesktop.PolicyKit1.Authority.CheckAuthorization() method will block while the user is being asked to authenticate."/>
98
      </annotation>
99
    </annotation>
100

101 102
    <!-- An enumeration for results when checking for an authorization -->
    <annotation name="org.gtk.EggDBus.DeclareEnum" value="AuthorizationResult">
David Zeuthen's avatar
David Zeuthen committed
103 104 105
      <annotation name="org.gtk.EggDBus.DocString.Summary" value="Possible results for checking authorizations"/>
      <annotation name="org.gtk.EggDBus.DocString" value="Possible results that the org.freedesktop.PolicyKit1.Authority.CheckAuthorization() method can return."/>

106
      <annotation name="org.gtk.EggDBus.Enum.Member" value="NotAuthorized">
David Zeuthen's avatar
David Zeuthen committed
107
        <annotation name="org.gtk.EggDBus.DocString" value="The given #Subject is not authorized for the specified action."/>
108 109
      </annotation>
      <annotation name="org.gtk.EggDBus.Enum.Member" value="Authorized">
David Zeuthen's avatar
David Zeuthen committed
110
        <annotation name="org.gtk.EggDBus.DocString" value="The given #Subject is authorized for the specified action."/>
111 112
      </annotation>
      <annotation name="org.gtk.EggDBus.Enum.Member" value="Challenge">
David Zeuthen's avatar
David Zeuthen committed
113
        <annotation name="org.gtk.EggDBus.DocString" value="The given #Subject is authorized if more information is provided."/>
114
      </annotation>
115 116
    </annotation>

117 118
    <!-- An enumeration for implicit authorizations -->
    <annotation name="org.gtk.EggDBus.DeclareEnum" value="ImplicitAuthorization">
David Zeuthen's avatar
David Zeuthen committed
119 120
      <annotation name="org.gtk.EggDBus.DocString.Summary" value="Implicit authorizations"/>
      <annotation name="org.gtk.EggDBus.DocString" value="An enumeration for granting implicit authorizations."/>
121

122
      <annotation name="org.gtk.EggDBus.Enum.Member" value="NotAuthorized">
David Zeuthen's avatar
David Zeuthen committed
123
        <annotation name="org.gtk.EggDBus.DocString" value="The #Subject is not authorized."/>
124
      </annotation>
125

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

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

134 135 136
      <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>
David Zeuthen's avatar
David Zeuthen committed
137

138 139 140 141 142
      <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">
David Zeuthen's avatar
David Zeuthen committed
143
        <annotation name="org.gtk.EggDBus.DocString" value="The subject is authorized."/>
144
      </annotation>
145

146 147
    </annotation>

148 149
    <!-- The error domain used for reporting errors -->
    <annotation name="org.gtk.EggDBus.DeclareErrorDomain" value="Error">
David Zeuthen's avatar
David Zeuthen committed
150 151 152
      <annotation name="org.gtk.EggDBus.DocString.Summary" value="Errors"/>
      <annotation name="org.gtk.EggDBus.DocString" value="Errors that can be returned."/>

153
      <annotation name="org.gtk.EggDBus.ErrorDomain.Member" value="org.freedesktop.PolicyKit1.Error.Failed">
David Zeuthen's avatar
David Zeuthen committed
154
        <annotation name="org.gtk.EggDBus.DocString" value="The operation failed."/>
155 156
      </annotation>
      <annotation name="org.gtk.EggDBus.ErrorDomain.Member" value="org.freedesktop.PolicyKit1.Error.NotSupported">
David Zeuthen's avatar
David Zeuthen committed
157
        <annotation name="org.gtk.EggDBus.DocString" value="Operation is not supported."/>
158 159
      </annotation>
      <annotation name="org.gtk.EggDBus.ErrorDomain.Member" value="org.freedesktop.PolicyKit1.Error.NotAuthorized">
David Zeuthen's avatar
David Zeuthen committed
160
        <annotation name="org.gtk.EggDBus.DocString" value="Not authorized to perform operation."/>
161 162
      </annotation>
    </annotation>
David Zeuthen's avatar
David Zeuthen committed
163

164
    <method name="EnumerateActions">
165 166 167 168 169 170
      <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>

171 172
      <arg name="action_descriptions" direction="out" type="a(ssssssuuua{ss})">
        <annotation name="org.gtk.EggDBus.Type" value="Array<ActionDescription>"/>
David Zeuthen's avatar
David Zeuthen committed
173
        <annotation name="org.gtk.EggDBus.DocString" value="An array of #ActionDescription structs."/>
174
      </arg>
175 176
    </method>

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

180
      <arg name="subject" direction="in" type="(sa{sv})">
David Zeuthen's avatar
David Zeuthen committed
181
        <annotation name="org.gtk.EggDBus.DocString" value="A #Subject struct."/>
182
        <annotation name="org.gtk.EggDBus.Type" value="Subject"/>
183
      </arg>
184 185 186 187 188

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

189 190
      <arg name="flags" direction="in" type="u">
        <annotation name="org.gtk.EggDBus.Type" value="CheckAuthorizationFlags"/>
191
        <annotation name="org.gtk.EggDBus.DocString" value="A set of #CheckAuthorizationFlags."/>
192
      </arg>
193

194 195 196
      <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."/>
197 198 199
      </arg>
    </method>

200
    <method name="RegisterAuthenticationAgent">
201 202
      <annotation name="org.gtk.EggDBus.DocString" value="Register an authentication agent."/>

203
      <arg name="object_path" direction="in" type="s">
204
        <annotation name="org.gtk.EggDBus.DocString" value="The object path of authentication agent object on the unique name of the caller."/>
205 206 207 208
      </arg>
    </method>

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

211
      <arg name="object_path" direction="in" type="s">
212
        <annotation name="org.gtk.EggDBus.DocString" value="The object path of authentication agent object on the unique name of the caller."/>
213 214 215
      </arg>
    </method>

216
    <method name="AuthenticationAgentResponse">
217 218
      <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."/>

219
      <arg name="cookie" direction="in" type="s">
220
        <annotation name="org.gtk.EggDBus.DocString" value="The cookie identifying the authentication request that was passed to the authentication agent."/>
221 222 223
      </arg>

      <arg name="identity" direction="in" type="(sa{sv})">
224
        <annotation name="org.gtk.EggDBus.Type" value="Identity"/>
David Zeuthen's avatar
David Zeuthen committed
225
        <annotation name="org.gtk.EggDBus.DocString" value="A #Identity struct describing what identity was authenticated."/>
226 227 228
      </arg>
    </method>

229
    <signal name="Changed">
David Zeuthen's avatar
David Zeuthen committed
230
      <annotation name="org.gtk.EggDBus.DocString" value="This signal is emitted when actions and/or authorizations change"/>
231 232
    </signal>

David Zeuthen's avatar
David Zeuthen committed
233 234
  </interface>
</node>