diff options
author | David Zeuthen <davidz@redhat.com> | 2009-02-04 18:37:26 -0500 |
---|---|---|
committer | David Zeuthen <davidz@redhat.com> | 2009-02-04 18:37:26 -0500 |
commit | a946db044f5ab1b60bd0f306dee8779df93d6d3b (patch) | |
tree | 8e731e505a18c516902dcfc4719ef1160b1b9403 | |
parent | 1d0eea5d1db23b0e8e28243bc4bb69cd8ab680f6 (diff) | |
download | polkit-a946db044f5ab1b60bd0f306dee8779df93d6d3b.tar.gz |
use new eggdbus feature to include enums/structs docs in the interface docs
-rw-r--r-- | data/org.freedesktop.PolicyKit1.AuthenticationAgent.xml | 4 | ||||
-rw-r--r-- | data/org.freedesktop.PolicyKit1.Authority.xml | 210 | ||||
-rw-r--r-- | data/org.freedesktop.PolicyKit1.AuthorityManager.xml | 32 | ||||
-rw-r--r-- | src/polkitagent/Makefile.am | 3 |
4 files changed, 125 insertions, 124 deletions
diff --git a/data/org.freedesktop.PolicyKit1.AuthenticationAgent.xml b/data/org.freedesktop.PolicyKit1.AuthenticationAgent.xml index cf48f2d..9ea9a7a 100644 --- a/data/org.freedesktop.PolicyKit1.AuthenticationAgent.xml +++ b/data/org.freedesktop.PolicyKit1.AuthenticationAgent.xml @@ -5,10 +5,10 @@ <interface name="org.freedesktop.PolicyKit1.AuthenticationAgent"> <annotation name="org.gtk.EggDBus.DocString.Summary" value="Authentication Agent Interface"/> - <annotation name="org.gtk.EggDBus.DocString" value="<para>This D-Bus interface is used for communication between the system-wide PolicyKit daemon and one or more authentication agents each running in a user session.</para><para>An authentication agent must implement this interface and register (passing the object path of the object implementing the interface) using the org.freedesktop.PolicyKit1.Authority.RegisterAuthenticationAgent() and org.freedesktop.PolicyKit1.Authority.UnregisterAuthenticationAgent() methods on the #org.freedesktop.PolicyKit.Authority interface of the PolicyKit daemon.</para>"/> + <annotation name="org.gtk.EggDBus.DocString" value="<para>This D-Bus interface is used for communication between the system-wide PolicyKit daemon and one or more authentication agents each running in a user session.</para><para>An authentication agent must implement this interface and register (passing the object path of the object implementing the interface) using the org.freedesktop.PolicyKit1.Authority.RegisterAuthenticationAgent() and org.freedesktop.PolicyKit1.Authority.UnregisterAuthenticationAgent() methods on the #org.freedesktop.PolicyKit1.Authority interface of the PolicyKit daemon.</para>"/> <method name="BeginAuthentication"> - <annotation name="org.gtk.EggDBus.DocString" value="<para>Called by the PolicyKit daemon when the authentication agent needs the user to authenticate as one of the identities in @identities for the action with the identifier @action_id.</para><para>Upon succesful authentication, the authentication agent must invoke the org.freedesktop.PolicyKit1.Authority.AuthenticationAgentResponse() method on the #org.freedesktop.PolicyKit.Authority interface of the PolicyKit daemon before returning.</para><para>If the user dismisses the authentication dialog, the authentication agent should return an error.</para>"/> + <annotation name="org.gtk.EggDBus.DocString" value="<para>Called by the PolicyKit daemon when the authentication agent needs the user to authenticate as one of the identities in @identities for the action with the identifier @action_id.</para><para>Upon succesful authentication, the authentication agent must invoke the org.freedesktop.PolicyKit1.Authority.AuthenticationAgentResponse() method on the #org.freedesktop.PolicyKit1.Authority interface of the PolicyKit daemon before returning.</para><para>If the user dismisses the authentication dialog, the authentication agent should return an error.</para>"/> <arg name="action_id" direction="in" type="s"> <annotation name="org.gtk.EggDBus.DocString" value="The identifier for the action that the user is authentication for."/> diff --git a/data/org.freedesktop.PolicyKit1.Authority.xml b/data/org.freedesktop.PolicyKit1.Authority.xml index 5f0cac2..06018ee 100644 --- a/data/org.freedesktop.PolicyKit1.Authority.xml +++ b/data/org.freedesktop.PolicyKit1.Authority.xml @@ -2,149 +2,149 @@ "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"> <node> - <!-- Subject struct --> - <annotation name="org.gtk.EggDBus.DeclareStruct" value="Subject"> - - <annotation name="org.gtk.EggDBus.Struct.Member" value="s:subject_kind"> - <annotation name="org.gtk.EggDBus.DocString" value="Kind of subject"/> - </annotation> + <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."/> - <annotation name="org.gtk.EggDBus.Struct.Member" value="a{sv}:subject_details"> - <annotation name="org.gtk.EggDBus.DocString" value="Details about the subject"/> - </annotation> + <!-- Subject struct --> + <annotation name="org.gtk.EggDBus.DeclareStruct" value="Subject"> - <!-- TODO: document values in hash map for each subject type--> + <annotation name="org.gtk.EggDBus.Struct.Member" value="s:subject_kind"> + <annotation name="org.gtk.EggDBus.DocString" value="Kind of subject"/> + </annotation> - </annotation> + <annotation name="org.gtk.EggDBus.Struct.Member" value="a{sv}:subject_details"> + <annotation name="org.gtk.EggDBus.DocString" value="Details about the subject"/> + </annotation> - <!-- Identity struct --> - <annotation name="org.gtk.EggDBus.DeclareStruct" value="Identity"> + <!-- TODO: document values in hash map for each subject type--> - <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> + <!-- Identity struct --> + <annotation name="org.gtk.EggDBus.DeclareStruct" value="Identity"> - <!-- TODO: document values in hash map for each identity type--> + <annotation name="org.gtk.EggDBus.Struct.Member" value="s:identity_kind"> + <annotation name="org.gtk.EggDBus.DocString" value="Kind of identity"/> + </annotation> - </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> - <!-- An enumeration for implicit authorizations --> - <annotation name="org.gtk.EggDBus.DeclareEnum" value="ImplicitAuthorization"> + <!-- TODO: document values in hash map for each identity type--> - <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> + <!-- ActionDescription struct --> + <annotation name="org.gtk.EggDBus.DeclareStruct" value="ActionDescription"> - <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.Struct.Member" value="s:action_id"> + <annotation name="org.gtk.EggDBus.DocString" value="Action Identifier"/> + </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.Struct.Member" value="s:description"> + <annotation name="org.gtk.EggDBus.DocString" value="Action Description"/> + </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.Struct.Member" value="s:message"> + <annotation name="org.gtk.EggDBus.DocString" value="Action Message"/> + </annotation> - <annotation name="org.gtk.EggDBus.Enum.Member" value="Authorized"> - <annotation name="org.gtk.EggDBus.DocString" value="The subject is authorized"/> - </annotation> + <annotation name="org.gtk.EggDBus.Struct.Member" value="s:vendor_name"> + <annotation name="org.gtk.EggDBus.DocString" value="Vendor Name"/> + </annotation> - </annotation> + <annotation name="org.gtk.EggDBus.Struct.Member" value="s:vendor_url"> + <annotation name="org.gtk.EggDBus.DocString" value="Vendor URL"/> + </annotation> - <!-- ActionDescription struct --> - <annotation name="org.gtk.EggDBus.DeclareStruct" value="ActionDescription"> + <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="s:action_id"> - <annotation name="org.gtk.EggDBus.DocString" value="Action Identifier"/> - </annotation> + <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="s:description"> - <annotation name="org.gtk.EggDBus.DocString" value="Action Description"/> - </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="s:message"> - <annotation name="org.gtk.EggDBus.DocString" value="Action Message"/> - </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> - <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="a{ss}:annotations"> + <annotation name="org.gtk.EggDBus.DocString" value="Annotations"/> + </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"/> + <!-- 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> - <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"/> + <!-- 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> </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> + <!-- An enumeration for implicit authorizations --> + <annotation name="org.gtk.EggDBus.DeclareEnum" value="ImplicitAuthorization"> - <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> + <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.Struct.Member" value="a{ss}:annotations"> - <annotation name="org.gtk.EggDBus.DocString" value="Annotations"/> - </annotation> + <annotation name="org.gtk.EggDBus.Enum.Member" value="AuthenticationRequired"> + <annotation name="org.gtk.EggDBus.DocString" value="Authentication is required."/> + </annotation> - </annotation> + <annotation name="org.gtk.EggDBus.Enum.Member" value="AdministratorAuthenticationRequired"> + <annotation name="org.gtk.EggDBus.DocString" value="Authentication as an administrator is required."/> + </annotation> - <!-- 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> + <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> - <!-- 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> - </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> - <!-- 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> - <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."/> + <!-- 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> <method name="EnumerateActions"> <annotation name="org.gtk.EggDBus.DocString" value="Enumerates all registered PolicyKit actions."/> diff --git a/data/org.freedesktop.PolicyKit1.AuthorityManager.xml b/data/org.freedesktop.PolicyKit1.AuthorityManager.xml index 9f855bc..44211e3 100644 --- a/data/org.freedesktop.PolicyKit1.AuthorityManager.xml +++ b/data/org.freedesktop.PolicyKit1.AuthorityManager.xml @@ -2,26 +2,26 @@ "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"> <node> - <!-- Authorization struct --> - <annotation name="org.gtk.EggDBus.DeclareStruct" value="Authorization"> - <annotation name="org.gtk.EggDBus.Struct.Member" value="s:action_id"> - <annotation name="org.gtk.EggDBus.DocString" value="Identifier for the action the authorization is for"/> - </annotation> - - <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"/> - </annotation> - </annotation> - <interface name="org.freedesktop.PolicyKit1.AuthorityManager"> <annotation name="org.gtk.EggDBus.DocString.Summary" value="Manage an Authority"/> <annotation name="org.gtk.EggDBus.DocString" value="This D-Bus interface <emphasis>may</emphasis> be 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."/> + <!-- Authorization struct --> + <annotation name="org.gtk.EggDBus.DeclareStruct" value="Authorization"> + <annotation name="org.gtk.EggDBus.Struct.Member" value="s:action_id"> + <annotation name="org.gtk.EggDBus.DocString" value="Identifier for the action the authorization is for"/> + </annotation> + + <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"/> + </annotation> + </annotation> + <method name="EnumerateUsers"> <annotation name="org.gtk.EggDBus.DocString" value="Enumerate all users known to the authority."/> diff --git a/src/polkitagent/Makefile.am b/src/polkitagent/Makefile.am index 1ecfef5..2c8d670 100644 --- a/src/polkitagent/Makefile.am +++ b/src/polkitagent/Makefile.am @@ -25,13 +25,14 @@ agent-built-sources.stamp : Makefile.am $(top_srcdir)/data/org.freedesktop.Polic eggdbus-binding-tool \ --namespace "_PolkitAgent" \ --dbus-namespace "org.freedesktop.PolicyKit1" \ + --introspection-xml $(top_srcdir)/data/org.freedesktop.PolicyKit1.Authority.xml \ --introspection-xml $(top_srcdir)/data/org.freedesktop.PolicyKit1.AuthenticationAgent.xml \ --stamp-file agent-built-sources.stamp \ $(NULL) # keep in sync with contents of agent-built-sources.stamp (Thanks autotools) # -agent_built_sources = _polkitagentbindingsmarshal.c _polkitagentbindingsmarshal.h _polkitagentbindingsmarshal.list _polkitagentbindings.c _polkitagentbindings.h _polkitagentbindingstypes.h _polkitagentauthenticationagent.c _polkitagentauthenticationagent.h docbook-interface-org.freedesktop.PolicyKit1.AuthenticationAgent.xml +agent_built_sources = _polkitagentbindingsmarshal.c _polkitagentbindingsmarshal.h _polkitagentbindingsmarshal.list _polkitagentbindings.c _polkitagentbindings.h _polkitagentbindingstypes.h _polkitagentauthenticationagent.c _polkitagentauthenticationagent.h docbook-interface-org.freedesktop.PolicyKit1.AuthenticationAgent.xml _polkitagentauthority.c _polkitagentauthority.h docbook-interface-org.freedesktop.PolicyKit1.Authority.xml _polkitagentcheckauthorizationflags.c _polkitagentcheckauthorizationflags.h _polkitagentauthorizationresult.c _polkitagentauthorizationresult.h _polkitagenterror.c _polkitagenterror.h _polkitagentimplicitauthorization.c _polkitagentimplicitauthorization.h _polkitagentactiondescription.c _polkitagentactiondescription.h _polkitagentidentity.c _polkitagentidentity.h _polkitagentsubject.c _polkitagentsubject.h marshal.stamp : Makefile.am $(srcdir)/polkitagentmarshal.list glib-genmarshal --prefix=polkit_agent_marshal $(srcdir)/polkitagentmarshal.list --header > polkitagentmarshal.h.tmp && mv polkitagentmarshal.h.tmp polkitagentmarshal.h |