Commit 70fb636c authored by Emmanuel Milou's avatar Emmanuel Milou

[#1220] Generate server-side glue files at compilation time

parent 9b391130
......@@ -2,6 +2,18 @@ include $(top_srcdir)/globals.mak
EXTRA_DIST = *.xml README
GENHEADERS= \
callmanager-glue.h \
configurationmanager-glue.h \
instance-glue.h
CLEANFILES= \
$(GENHEADERS)
# Rule to generate the binding headers
%-glue.h: %-introspec.xml Makefile.am
dbusxx-xml2cpp $< --adaptor=$@
noinst_LTLIBRARIES = libdbus.la
libdbus_la_SOURCES = \
......@@ -15,12 +27,10 @@ libdbus_la_CXXFLAGS = -DPREFIX=\"$(prefix)\" -DPROGSHAREDIR=\"${datadir}/sflphon
libdbus_la_LIBADD = $(top_srcdir)/libs/dbus-c++/src/libdbus-c++-1.la
noinst_HEADERS = \
callmanager-glue.h \
$(GENHEADERS) \
callmanager.h \
configurationmanager.h \
configurationmanager-glue.h \
instance.h \
instance-glue.h \
dbusmanager.h \
dbusmanagerimpl.h
......
This diff is collapsed.
This diff is collapsed.
/*
* This file was automatically generated by dbusxx-xml2cpp; DO NOT EDIT!
*/
#ifndef __dbusxx__instance_glue_h__ADAPTOR_MARSHAL_H
#define __dbusxx__instance_glue_h__ADAPTOR_MARSHAL_H
#include <dbus-c++/dbus.h>
namespace org {
namespace sflphone {
namespace SFLphone {
class Instance_adaptor
: public ::DBus::InterfaceAdaptor
{
public:
Instance_adaptor()
: ::DBus::InterfaceAdaptor("org.sflphone.SFLphone.Instance")
{
register_method(Instance_adaptor, Register, _Register_stub);
register_method(Instance_adaptor, Unregister, _Unregister_stub);
register_method(Instance_adaptor, getRegistrationCount, _getRegistrationCount_stub);
}
::DBus::IntrospectedInterface *const introspect() const
{
static ::DBus::IntrospectedArgument Register_args[] =
{
{ "pid", "i", true },
{ "name", "s", true },
{ 0, 0, 0 }
};
static ::DBus::IntrospectedArgument Unregister_args[] =
{
{ "pid", "i", true },
{ 0, 0, 0 }
};
static ::DBus::IntrospectedArgument getRegistrationCount_args[] =
{
{ "count", "i", false },
{ 0, 0, 0 }
};
static ::DBus::IntrospectedMethod Instance_adaptor_methods[] =
{
{ "Register", Register_args },
{ "Unregister", Unregister_args },
{ "getRegistrationCount", getRegistrationCount_args },
{ 0, 0 }
};
static ::DBus::IntrospectedMethod Instance_adaptor_signals[] =
{
{ 0, 0 }
};
static ::DBus::IntrospectedProperty Instance_adaptor_properties[] =
{
{ 0, 0, 0, 0 }
};
static ::DBus::IntrospectedInterface Instance_adaptor_interface =
{
"org.sflphone.SFLphone.Instance",
Instance_adaptor_methods,
Instance_adaptor_signals,
Instance_adaptor_properties
};
return &Instance_adaptor_interface;
}
public:
/* properties exposed by this interface, use
* property() and property(value) to get and set a particular property
*/
public:
/* methods exported by this interface,
* you will have to implement them in your ObjectAdaptor
*/
virtual void Register(const int32_t& pid, const std::string& name) = 0;
virtual void Unregister(const int32_t& pid) = 0;
virtual int32_t getRegistrationCount() = 0;
public:
/* signal emitters for this interface
*/
private:
/* unmarshalers (to unpack the DBus message before calling the actual interface method)
*/
::DBus::Message _Register_stub(const ::DBus::CallMessage &call)
{
::DBus::MessageIter ri = call.reader();
int32_t argin1; ri >> argin1;
std::string argin2; ri >> argin2;
Register(argin1, argin2);
::DBus::ReturnMessage reply(call);
return reply;
}
::DBus::Message _Unregister_stub(const ::DBus::CallMessage &call)
{
::DBus::MessageIter ri = call.reader();
int32_t argin1; ri >> argin1;
Unregister(argin1);
::DBus::ReturnMessage reply(call);
return reply;
}
::DBus::Message _getRegistrationCount_stub(const ::DBus::CallMessage &call)
{
::DBus::MessageIter ri = call.reader();
int32_t argout1 = getRegistrationCount();
::DBus::ReturnMessage reply(call);
::DBus::MessageIter wi = reply.writer();
wi << argout1;
return reply;
}
};
} } }
#endif//__dbusxx__instance_glue_h__ADAPTOR_MARSHAL_H
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment