org.freedesktop.PolicyKit1.Authority.xml 10.8 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">
11

12 13 14
      <annotation name="org.gtk.EggDBus.Struct.Member"  value="s:subject_kind">
        <annotation name="org.gtk.EggDBus.DocString" value="Kind of subject"/>
      </annotation>
15

16 17 18
      <annotation name="org.gtk.EggDBus.Struct.Member"  value="a{sv}:subject_details">
        <annotation name="org.gtk.EggDBus.DocString" value="Details about the subject"/>
      </annotation>
19

20
      <!-- TODO: document values in hash map for each subject type-->
21 22 23

    </annotation>

24 25
    <!-- Identity struct -->
    <annotation name="org.gtk.EggDBus.DeclareStruct" value="Identity">
26

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

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

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

    </annotation>

39 40
    <!-- ActionDescription struct -->
    <annotation name="org.gtk.EggDBus.DeclareStruct" value="ActionDescription">
41

42 43 44
      <annotation name="org.gtk.EggDBus.Struct.Member"  value="s:action_id">
        <annotation name="org.gtk.EggDBus.DocString" value="Action Identifier"/>
      </annotation>
45

46 47 48
      <annotation name="org.gtk.EggDBus.Struct.Member"  value="s:description">
        <annotation name="org.gtk.EggDBus.DocString" value="Action Description"/>
      </annotation>
49

50 51 52
      <annotation name="org.gtk.EggDBus.Struct.Member"  value="s:message">
        <annotation name="org.gtk.EggDBus.DocString" value="Action Message"/>
      </annotation>
53

54 55 56
      <annotation name="org.gtk.EggDBus.Struct.Member"  value="s:vendor_name">
        <annotation name="org.gtk.EggDBus.DocString" value="Vendor Name"/>
      </annotation>
57

58 59 60
      <annotation name="org.gtk.EggDBus.Struct.Member"  value="s:vendor_url">
        <annotation name="org.gtk.EggDBus.DocString" value="Vendor URL"/>
      </annotation>
61

62 63 64
      <annotation name="org.gtk.EggDBus.Struct.Member"  value="s:icon_name">
        <annotation name="org.gtk.EggDBus.DocString" value="Icon Name"/>
      </annotation>
65

66 67 68 69
      <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>
70

71 72 73 74
      <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>
75

76 77 78 79
      <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>
80

81 82 83
      <annotation name="org.gtk.EggDBus.Struct.Member"  value="a{ss}:annotations">
        <annotation name="org.gtk.EggDBus.DocString" value="Annotations"/>
      </annotation>
84

85
    </annotation>
86

87 88 89 90 91
    <!-- 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>
92
    </annotation>
93

94 95 96 97 98 99 100 101 102 103 104
    <!-- An enumeration for results when checking for an authorization -->
    <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>
105 106
    </annotation>

107 108
    <!-- An enumeration for implicit authorizations -->
    <annotation name="org.gtk.EggDBus.DeclareEnum" value="ImplicitAuthorization">
109

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

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

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

122 123 124
      <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
125

126 127 128 129 130 131 132
      <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>
133

134 135
    </annotation>

136 137 138 139 140 141 142 143 144 145 146 147
    <!-- The error domain used for reporting errors -->
    <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>
      <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>
    </annotation>
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>