summaryrefslogtreecommitdiff
path: root/src/polkitagent
diff options
context:
space:
mode:
authorDavid Zeuthen <davidz@redhat.com>2009-02-08 11:17:04 -0500
committerDavid Zeuthen <davidz@redhat.com>2009-02-08 11:17:04 -0500
commit21cdbad09bd3f9790c5e57ddfecbd0ef538b9c2c (patch)
treee31c7b741879b63f1e156d10b651a1e70dc094f9 /src/polkitagent
parent0dc7a817cd6b932fd92c5fb3d142f26ff360dcc8 (diff)
downloadpolkit-21cdbad09bd3f9790c5e57ddfecbd0ef538b9c2c.tar.gz
generate all polkit dbus code in one place
Diffstat (limited to 'src/polkitagent')
-rw-r--r--src/polkitagent/Makefile.am19
-rw-r--r--src/polkitagent/polkitagentlistener.c29
2 files changed, 16 insertions, 32 deletions
diff --git a/src/polkitagent/Makefile.am b/src/polkitagent/Makefile.am
index 2c8d670..cec4c24 100644
--- a/src/polkitagent/Makefile.am
+++ b/src/polkitagent/Makefile.am
@@ -18,22 +18,8 @@ INCLUDES = \
BUILT_SOURCES = \
marshal.stamp \
- agent-built-sources.stamp \
$(NULL)
-agent-built-sources.stamp : Makefile.am $(top_srcdir)/data/org.freedesktop.PolicyKit1.AuthenticationAgent.xml
- 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 _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
(echo "#include \"polkitagentmarshal.h\""; glib-genmarshal --prefix=polkit_agent_marshal $(srcdir)/polkitagentmarshal.list --body) > polkitagentmarshal.c.tmp && mv polkitagentmarshal.c.tmp polkitagentmarshal.c
@@ -54,7 +40,6 @@ libpolkit_agent_1include_HEADERS = \
libpolkit_agent_1_la_SOURCES = \
$(BUILT_SOURCES) \
- $(agent_built_sources) \
$(marshal_built_sources) \
polkitagent.h \
polkitagenttypes.h \
@@ -91,7 +76,7 @@ install-exec-hook:
EXTRA_DIST = polkitagentmarshal.list
dist-hook :
- (for i in $(agent_built_sources) $(marshal_built_sources) $(BUILT_SOURCES) ; do rm -f $(distdir)/$$i ; done)
+ (for i in $(marshal_built_sources) $(BUILT_SOURCES) ; do rm -f $(distdir)/$$i ; done)
clean-local :
- rm -f *~ $(agent_built_sources) $(marshal_built_sources) $(BUILT_SOURCES)
+ rm -f *~ $(marshal_built_sources) $(BUILT_SOURCES)
diff --git a/src/polkitagent/polkitagentlistener.c b/src/polkitagent/polkitagentlistener.c
index c1c6771..cf20f28 100644
--- a/src/polkitagent/polkitagentlistener.c
+++ b/src/polkitagent/polkitagentlistener.c
@@ -22,7 +22,6 @@
#include "config.h"
#include <polkit/polkitprivate.h>
-#include "_polkitagentbindings.h"
#include "polkitagentlistener.h"
@@ -86,10 +85,10 @@ struct _ServerClass
static GType server_get_type (void) G_GNUC_CONST;
-static void authentication_agent_iface_init (_PolkitAgentAuthenticationAgentIface *agent_iface);
+static void authentication_agent_iface_init (_PolkitAuthenticationAgentIface *agent_iface);
G_DEFINE_TYPE_WITH_CODE (Server, server, G_TYPE_OBJECT,
- G_IMPLEMENT_INTERFACE (_POLKIT_AGENT_TYPE_AUTHENTICATION_AGENT,
+ G_IMPLEMENT_INTERFACE (_POLKIT_TYPE_AUTHENTICATION_AGENT,
authentication_agent_iface_init)
);
@@ -278,7 +277,7 @@ polkit_agent_register_listener (PolkitAgentListener *listener,
egg_dbus_connection_register_interface (server->system_bus,
server->object_path,
- _POLKIT_AGENT_TYPE_AUTHENTICATION_AGENT,
+ _POLKIT_TYPE_AUTHENTICATION_AGENT,
G_OBJECT (server),
G_TYPE_INVALID);
@@ -347,7 +346,7 @@ auth_cb (GObject *source_object,
}
else
{
- _polkit_agent_authentication_agent_handle_begin_authentication_finish (data->method_invocation);
+ _polkit_authentication_agent_handle_begin_authentication_finish (data->method_invocation);
}
g_hash_table_remove (data->server->cookie_to_pending_auth, data->cookie);
@@ -356,11 +355,11 @@ auth_cb (GObject *source_object,
}
static void
-handle_begin_authentication (_PolkitAgentAuthenticationAgent *instance,
- const gchar *action_id,
- const gchar *cookie,
- EggDBusArraySeq *identities,
- EggDBusMethodInvocation *method_invocation)
+handle_begin_authentication (_PolkitAuthenticationAgent *instance,
+ const gchar *action_id,
+ const gchar *cookie,
+ EggDBusArraySeq *identities,
+ EggDBusMethodInvocation *method_invocation)
{
Server *server = SERVER (instance);
AuthData *data;
@@ -399,9 +398,9 @@ handle_begin_authentication (_PolkitAgentAuthenticationAgent *instance,
}
static void
-handle_cancel_authentication (_PolkitAgentAuthenticationAgent *instance,
- const gchar *cookie,
- EggDBusMethodInvocation *method_invocation)
+handle_cancel_authentication (_PolkitAuthenticationAgent *instance,
+ const gchar *cookie,
+ EggDBusMethodInvocation *method_invocation)
{
Server *server = SERVER (instance);
AuthData *data;
@@ -418,12 +417,12 @@ handle_cancel_authentication (_PolkitAgentAuthenticationAgent *instance,
else
{
g_cancellable_cancel (data->cancellable);
- _polkit_agent_authentication_agent_handle_cancel_authentication_finish (method_invocation);
+ _polkit_authentication_agent_handle_cancel_authentication_finish (method_invocation);
}
}
static void
-authentication_agent_iface_init (_PolkitAgentAuthenticationAgentIface *agent_iface)
+authentication_agent_iface_init (_PolkitAuthenticationAgentIface *agent_iface)
{
agent_iface->handle_begin_authentication = handle_begin_authentication;
agent_iface->handle_cancel_authentication = handle_cancel_authentication;