Skip to content
Snippets Groups Projects
Commit 9b391130 authored by Emmanuel Milou's avatar Emmanuel Milou
Browse files

[#1220] Generate client-side glue files and marshaller at compilation time

parent e91211db
Branches
Tags
No related merge requests found
......@@ -21,7 +21,6 @@ sflphone_gtk_SOURCES = \
call.c \
actions.c \
accountlist.c \
marshaller.c \
sliders.c \
statusicon.c \
codeclist.c \
......@@ -30,9 +29,8 @@ sflphone_gtk_SOURCES = \
noinst_HEADERS = actions.h sflnotify.h mainwindow.h dialpad.h codeclist.h \
assistant.h timestamp.h reqaccount.h errors.h sflphone_const.h \
menus.h accountlist.h marshaller.h sliders.h statusicon.h call.h toolbar.h
menus.h accountlist.h sliders.h statusicon.h call.h toolbar.h
EXTRA_DIST = marshaller.list
sflphone_gtk_LDADD = $(DEPS_LIBS) $(NOTIFY_LIBS) $(SFLPHONEGTK_LIBS) $(LIBSEXY_LIBS) $(LOG4C)
......
include ../../globals.mak
noinst_LTLIBRARIES = libdbus.la
GENHEADERS= \
callmanager-glue.h \
configurationmanager-glue.h \
instance-glue.h
libdbus_la_SOURCES = dbus.c
MARSHALLER_SOURCES= \
marshaller.c \
marshaller.h
libdbus_la_LDFLAGS = @DEPS_LDFLAGS@
EXTRA_DIST=marshaller.list
CLEANFILES= \
$(GENHEADERS) \
$(MARSHALLER_SOURCES)
# Rule to generate the binding headers
%-glue.h: ../../../src/dbus/%-introspec.xml Makefile.am
dbus-binding-tool --mode=glib-client $< > $@
# Create the necessary marshallers for the signals implemented by the
# library
marshaller.h: marshaller.list Makefile.am
glib-genmarshal --header --g-fatal-warnings $< > $@
marshaller.c: marshaller.list
glib-genmarshal --body --g-fatal-warnings $< > $@
noinst_LTLIBRARIES = libdbus.la
libdbus_la_SOURCES = dbus.c \
$(MARSHALLER_SOURCES) \
$(GENHEADERS)
libdbus_la_LDFLAGS = @DEPS_LDFLAGS@
libdbus_la_CFLAGS = @DEPS_CFLAGS@
......@@ -6,3 +6,6 @@ These files are generated by dbus-binding-tool using the server's files named *-
* dbus-binding-tool --mode=glib-client "../../../src/dbus/contactmanager-introspec.xml" > contactmanager-glue.h
These files dbus call wrapper functions to simplify access to dbus API.
UPDATE: These files, and { marshaller.c, marshaller.h } are now created by the build system at the compilation time
This diff is collapsed.
This diff is collapsed.
/* Generated by dbus-binding-tool; do not edit! */
#include <glib/gtypes.h>
#include <glib/gerror.h>
#include <dbus/dbus-glib.h>
G_BEGIN_DECLS
#ifndef DBUS_GLIB_CLIENT_WRAPPERS_org_sflphone_SFLphone_Instance
#define DBUS_GLIB_CLIENT_WRAPPERS_org_sflphone_SFLphone_Instance
static
#ifdef G_HAVE_INLINE
inline
#endif
gboolean
org_sflphone_SFLphone_Instance_register (DBusGProxy *proxy, const gint IN_pid, const char * IN_name, GError **error)
{
return dbus_g_proxy_call (proxy, "Register", error, G_TYPE_INT, IN_pid, G_TYPE_STRING, IN_name, G_TYPE_INVALID, G_TYPE_INVALID);
}
typedef void (*org_sflphone_SFLphone_Instance_register_reply) (DBusGProxy *proxy, GError *error, gpointer userdata);
static void
org_sflphone_SFLphone_Instance_register_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
{
DBusGAsyncData *data = (DBusGAsyncData*) user_data;
GError *error = NULL;
dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID);
(*(org_sflphone_SFLphone_Instance_register_reply)data->cb) (proxy, error, data->userdata);
return;
}
static
#ifdef G_HAVE_INLINE
inline
#endif
DBusGProxyCall*
org_sflphone_SFLphone_Instance_register_async (DBusGProxy *proxy, const gint IN_pid, const char * IN_name, org_sflphone_SFLphone_Instance_register_reply callback, gpointer userdata)
{
DBusGAsyncData *stuff;
stuff = g_new (DBusGAsyncData, 1);
stuff->cb = G_CALLBACK (callback);
stuff->userdata = userdata;
return dbus_g_proxy_begin_call (proxy, "Register", org_sflphone_SFLphone_Instance_register_async_callback, stuff, g_free, G_TYPE_INT, IN_pid, G_TYPE_STRING, IN_name, G_TYPE_INVALID);
}
static
#ifdef G_HAVE_INLINE
inline
#endif
gboolean
org_sflphone_SFLphone_Instance_unregister (DBusGProxy *proxy, const gint IN_pid, GError **error)
{
return dbus_g_proxy_call (proxy, "Unregister", error, G_TYPE_INT, IN_pid, G_TYPE_INVALID, G_TYPE_INVALID);
}
typedef void (*org_sflphone_SFLphone_Instance_unregister_reply) (DBusGProxy *proxy, GError *error, gpointer userdata);
static void
org_sflphone_SFLphone_Instance_unregister_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
{
DBusGAsyncData *data = (DBusGAsyncData*) user_data;
GError *error = NULL;
dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID);
(*(org_sflphone_SFLphone_Instance_unregister_reply)data->cb) (proxy, error, data->userdata);
return;
}
static
#ifdef G_HAVE_INLINE
inline
#endif
DBusGProxyCall*
org_sflphone_SFLphone_Instance_unregister_async (DBusGProxy *proxy, const gint IN_pid, org_sflphone_SFLphone_Instance_unregister_reply callback, gpointer userdata)
{
DBusGAsyncData *stuff;
stuff = g_new (DBusGAsyncData, 1);
stuff->cb = G_CALLBACK (callback);
stuff->userdata = userdata;
return dbus_g_proxy_begin_call (proxy, "Unregister", org_sflphone_SFLphone_Instance_unregister_async_callback, stuff, g_free, G_TYPE_INT, IN_pid, G_TYPE_INVALID);
}
static
#ifdef G_HAVE_INLINE
inline
#endif
gboolean
org_sflphone_SFLphone_Instance_get_registration_count (DBusGProxy *proxy, gint* OUT_count, GError **error)
{
return dbus_g_proxy_call (proxy, "getRegistrationCount", error, G_TYPE_INVALID, G_TYPE_INT, OUT_count, G_TYPE_INVALID);
}
typedef void (*org_sflphone_SFLphone_Instance_get_registration_count_reply) (DBusGProxy *proxy, gint OUT_count, GError *error, gpointer userdata);
static void
org_sflphone_SFLphone_Instance_get_registration_count_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
{
DBusGAsyncData *data = (DBusGAsyncData*) user_data;
GError *error = NULL;
gint OUT_count;
dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INT, &OUT_count, G_TYPE_INVALID);
(*(org_sflphone_SFLphone_Instance_get_registration_count_reply)data->cb) (proxy, OUT_count, error, data->userdata);
return;
}
static
#ifdef G_HAVE_INLINE
inline
#endif
DBusGProxyCall*
org_sflphone_SFLphone_Instance_get_registration_count_async (DBusGProxy *proxy, org_sflphone_SFLphone_Instance_get_registration_count_reply callback, gpointer userdata)
{
DBusGAsyncData *stuff;
stuff = g_new (DBusGAsyncData, 1);
stuff->cb = G_CALLBACK (callback);
stuff->userdata = userdata;
return dbus_g_proxy_begin_call (proxy, "getRegistrationCount", org_sflphone_SFLphone_Instance_get_registration_count_async_callback, stuff, g_free, G_TYPE_INVALID);
}
#endif /* defined DBUS_GLIB_CLIENT_WRAPPERS_org_sflphone_SFLphone_Instance */
G_END_DECLS
#include <marshaller.h>
#ifdef G_ENABLE_DEBUG
#define g_marshal_value_peek_boolean(v) g_value_get_boolean (v)
#define g_marshal_value_peek_char(v) g_value_get_char (v)
#define g_marshal_value_peek_uchar(v) g_value_get_uchar (v)
#define g_marshal_value_peek_int(v) g_value_get_int (v)
#define g_marshal_value_peek_uint(v) g_value_get_uint (v)
#define g_marshal_value_peek_long(v) g_value_get_long (v)
#define g_marshal_value_peek_ulong(v) g_value_get_ulong (v)
#define g_marshal_value_peek_int64(v) g_value_get_int64 (v)
#define g_marshal_value_peek_uint64(v) g_value_get_uint64 (v)
#define g_marshal_value_peek_enum(v) g_value_get_enum (v)
#define g_marshal_value_peek_flags(v) g_value_get_flags (v)
#define g_marshal_value_peek_float(v) g_value_get_float (v)
#define g_marshal_value_peek_double(v) g_value_get_double (v)
#define g_marshal_value_peek_string(v) (char*) g_value_get_string (v)
#define g_marshal_value_peek_param(v) g_value_get_param (v)
#define g_marshal_value_peek_boxed(v) g_value_get_boxed (v)
#define g_marshal_value_peek_pointer(v) g_value_get_pointer (v)
#define g_marshal_value_peek_object(v) g_value_get_object (v)
#else /* !G_ENABLE_DEBUG */
/* WARNING: This code accesses GValues directly, which is UNSUPPORTED API.
* Do not access GValues directly in your code. Instead, use the
* g_value_get_*() functions
*/
#define g_marshal_value_peek_boolean(v) (v)->data[0].v_int
#define g_marshal_value_peek_char(v) (v)->data[0].v_int
#define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint
#define g_marshal_value_peek_int(v) (v)->data[0].v_int
#define g_marshal_value_peek_uint(v) (v)->data[0].v_uint
#define g_marshal_value_peek_long(v) (v)->data[0].v_long
#define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong
#define g_marshal_value_peek_int64(v) (v)->data[0].v_int64
#define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64
#define g_marshal_value_peek_enum(v) (v)->data[0].v_long
#define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong
#define g_marshal_value_peek_float(v) (v)->data[0].v_float
#define g_marshal_value_peek_double(v) (v)->data[0].v_double
#define g_marshal_value_peek_string(v) (v)->data[0].v_pointer
#define g_marshal_value_peek_param(v) (v)->data[0].v_pointer
#define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer
#define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer
#define g_marshal_value_peek_object(v) (v)->data[0].v_pointer
#endif /* !G_ENABLE_DEBUG */
/* VOID:STRING,STRING,STRING (marshaller.list:1) */
void
g_cclosure_user_marshal_VOID__STRING_STRING_STRING (GClosure *closure,
GValue *return_value UNUSED,
guint n_param_values,
const GValue *param_values,
gpointer invocation_hint UNUSED,
gpointer marshal_data)
{
typedef void (*GMarshalFunc_VOID__STRING_STRING_STRING) (gpointer data1,
gpointer arg_1,
gpointer arg_2,
gpointer arg_3,
gpointer data2);
register GMarshalFunc_VOID__STRING_STRING_STRING callback;
register GCClosure *cc = (GCClosure*) closure;
register gpointer data1, data2;
g_return_if_fail (n_param_values == 4);
if (G_CCLOSURE_SWAP_DATA (closure))
{
data1 = closure->data;
data2 = g_value_peek_pointer (param_values + 0);
}
else
{
data1 = g_value_peek_pointer (param_values + 0);
data2 = closure->data;
}
callback = (GMarshalFunc_VOID__STRING_STRING_STRING) (marshal_data ? marshal_data : cc->callback);
callback (data1,
g_marshal_value_peek_string (param_values + 1),
g_marshal_value_peek_string (param_values + 2),
g_marshal_value_peek_string (param_values + 3),
data2);
}
/* VOID:STRING,STRING (marshaller.list:2) */
void
g_cclosure_user_marshal_VOID__STRING_STRING (GClosure *closure,
GValue *return_value UNUSED,
guint n_param_values,
const GValue *param_values,
gpointer invocation_hint UNUSED,
gpointer marshal_data)
{
typedef void (*GMarshalFunc_VOID__STRING_STRING) (gpointer data1,
gpointer arg_1,
gpointer arg_2,
gpointer data2);
register GMarshalFunc_VOID__STRING_STRING callback;
register GCClosure *cc = (GCClosure*) closure;
register gpointer data1, data2;
g_return_if_fail (n_param_values == 3);
if (G_CCLOSURE_SWAP_DATA (closure))
{
data1 = closure->data;
data2 = g_value_peek_pointer (param_values + 0);
}
else
{
data1 = g_value_peek_pointer (param_values + 0);
data2 = closure->data;
}
callback = (GMarshalFunc_VOID__STRING_STRING) (marshal_data ? marshal_data : cc->callback);
callback (data1,
g_marshal_value_peek_string (param_values + 1),
g_marshal_value_peek_string (param_values + 2),
data2);
}
/* VOID:INT (marshaller.list:3) */
/* VOID:STRING,INT (marshaller.list:4) */
void
g_cclosure_user_marshal_VOID__STRING_INT (GClosure *closure,
GValue *return_value UNUSED,
guint n_param_values,
const GValue *param_values,
gpointer invocation_hint UNUSED,
gpointer marshal_data)
{
typedef void (*GMarshalFunc_VOID__STRING_INT) (gpointer data1,
gpointer arg_1,
gint arg_2,
gpointer data2);
register GMarshalFunc_VOID__STRING_INT callback;
register GCClosure *cc = (GCClosure*) closure;
register gpointer data1, data2;
g_return_if_fail (n_param_values == 3);
if (G_CCLOSURE_SWAP_DATA (closure))
{
data1 = closure->data;
data2 = g_value_peek_pointer (param_values + 0);
}
else
{
data1 = g_value_peek_pointer (param_values + 0);
data2 = closure->data;
}
callback = (GMarshalFunc_VOID__STRING_INT) (marshal_data ? marshal_data : cc->callback);
callback (data1,
g_marshal_value_peek_string (param_values + 1),
g_marshal_value_peek_int (param_values + 2),
data2);
}
/* VOID:STRING,DOUBLE (marshaller.list:5) */
void
g_cclosure_user_marshal_VOID__STRING_DOUBLE (GClosure *closure,
GValue *return_value UNUSED,
guint n_param_values,
const GValue *param_values,
gpointer invocation_hint UNUSED,
gpointer marshal_data)
{
typedef void (*GMarshalFunc_VOID__STRING_DOUBLE) (gpointer data1,
gpointer arg_1,
gdouble arg_2,
gpointer data2);
register GMarshalFunc_VOID__STRING_DOUBLE callback;
register GCClosure *cc = (GCClosure*) closure;
register gpointer data1, data2;
g_return_if_fail (n_param_values == 3);
if (G_CCLOSURE_SWAP_DATA (closure))
{
data1 = closure->data;
data2 = g_value_peek_pointer (param_values + 0);
}
else
{
data1 = g_value_peek_pointer (param_values + 0);
data2 = closure->data;
}
callback = (GMarshalFunc_VOID__STRING_DOUBLE) (marshal_data ? marshal_data : cc->callback);
callback (data1,
g_marshal_value_peek_string (param_values + 1),
g_marshal_value_peek_double (param_values + 2),
data2);
}
#ifndef __g_cclosure_user_marshal_MARSHAL_H__
#define __g_cclosure_user_marshal_MARSHAL_H__
#include <glib-object.h>
#include <sflphone_const.h>
G_BEGIN_DECLS
/* VOID:STRING,STRING,STRING (marshaller.list:1) */
extern void g_cclosure_user_marshal_VOID__STRING_STRING_STRING (GClosure *closure,
GValue *return_value,
guint n_param_values,
const GValue *param_values,
gpointer invocation_hint,
gpointer marshal_data);
/* VOID:STRING,STRING (marshaller.list:2) */
extern void g_cclosure_user_marshal_VOID__STRING_STRING (GClosure *closure,
GValue *return_value,
guint n_param_values,
const GValue *param_values,
gpointer invocation_hint,
gpointer marshal_data);
/* VOID:INT (marshaller.list:3) */
#define g_cclosure_user_marshal_VOID__INT g_cclosure_marshal_VOID__INT
/* VOID:STRING,INT (marshaller.list:4) */
extern void g_cclosure_user_marshal_VOID__STRING_INT (GClosure *closure,
GValue *return_value,
guint n_param_values,
const GValue *param_values,
gpointer invocation_hint,
gpointer marshal_data);
/* VOID:STRING,DOUBLE (marshaller.list:5) */
extern void g_cclosure_user_marshal_VOID__STRING_DOUBLE (GClosure *closure,
GValue *return_value,
guint n_param_values,
const GValue *param_values,
gpointer invocation_hint,
gpointer marshal_data);
G_END_DECLS
#endif /* __g_cclosure_user_marshal_MARSHAL_H__ */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment