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 file was automatically generated by dbusxx-xml2cpp; DO NOT EDIT!
*/
#ifndef __dbusxx__callmanager_glue_h__ADAPTOR_MARSHAL_H
#define __dbusxx__callmanager_glue_h__ADAPTOR_MARSHAL_H
#include <dbus-c++/dbus.h>
namespace org {
namespace sflphone {
namespace SFLphone {
class CallManager_adaptor
: public ::DBus::InterfaceAdaptor
{
public:
CallManager_adaptor()
: ::DBus::InterfaceAdaptor("org.sflphone.SFLphone.CallManager")
{
register_method(CallManager_adaptor, placeCall, _placeCall_stub);
register_method(CallManager_adaptor, refuse, _refuse_stub);
register_method(CallManager_adaptor, accept, _accept_stub);
register_method(CallManager_adaptor, hangUp, _hangUp_stub);
register_method(CallManager_adaptor, hold, _hold_stub);
register_method(CallManager_adaptor, unhold, _unhold_stub);
register_method(CallManager_adaptor, transfert, _transfert_stub);
register_method(CallManager_adaptor, playDTMF, _playDTMF_stub);
register_method(CallManager_adaptor, startTone, _startTone_stub);
register_method(CallManager_adaptor, setVolume, _setVolume_stub);
register_method(CallManager_adaptor, getVolume, _getVolume_stub);
register_method(CallManager_adaptor, setRecording, _setRecording_stub);
register_method(CallManager_adaptor, getIsRecording, _getIsRecording_stub);
register_method(CallManager_adaptor, getCallDetails, _getCallDetails_stub);
register_method(CallManager_adaptor, getCurrentCallID, _getCurrentCallID_stub);
register_method(CallManager_adaptor, getCurrentCodecName, _getCurrentCodecName_stub);
}
::DBus::IntrospectedInterface *const introspect() const
{
static ::DBus::IntrospectedArgument placeCall_args[] =
{
{ "accountID", "s", true },
{ "callID", "s", true },
{ "to", "s", true },
{ 0, 0, 0 }
};
static ::DBus::IntrospectedArgument refuse_args[] =
{
{ "callID", "s", true },
{ 0, 0, 0 }
};
static ::DBus::IntrospectedArgument accept_args[] =
{
{ "callID", "s", true },
{ 0, 0, 0 }
};
static ::DBus::IntrospectedArgument hangUp_args[] =
{
{ "callID", "s", true },
{ 0, 0, 0 }
};
static ::DBus::IntrospectedArgument hold_args[] =
{
{ "callID", "s", true },
{ 0, 0, 0 }
};
static ::DBus::IntrospectedArgument unhold_args[] =
{
{ "callID", "s", true },
{ 0, 0, 0 }
};
static ::DBus::IntrospectedArgument transfert_args[] =
{
{ "callID", "s", true },
{ "to", "s", true },
{ 0, 0, 0 }
};
static ::DBus::IntrospectedArgument playDTMF_args[] =
{
{ "key", "s", true },
{ 0, 0, 0 }
};
static ::DBus::IntrospectedArgument startTone_args[] =
{
{ "start", "i", true },
{ "type", "i", true },
{ 0, 0, 0 }
};
static ::DBus::IntrospectedArgument setVolume_args[] =
{
{ "device", "s", true },
{ "value", "d", true },
{ 0, 0, 0 }
};
static ::DBus::IntrospectedArgument getVolume_args[] =
{
{ "device", "s", true },
{ "value", "d", false },
{ 0, 0, 0 }
};
static ::DBus::IntrospectedArgument setRecording_args[] =
{
{ "callID", "s", true },
{ 0, 0, 0 }
};
static ::DBus::IntrospectedArgument getIsRecording_args[] =
{
{ "callID", "s", true },
{ "isRecording", "b", false },
{ 0, 0, 0 }
};
static ::DBus::IntrospectedArgument getCallDetails_args[] =
{
{ "callID", "s", true },
{ "infos", "a{ss}", false },
{ 0, 0, 0 }
};
static ::DBus::IntrospectedArgument getCurrentCallID_args[] =
{
{ "callID", "s", false },
{ 0, 0, 0 }
};
static ::DBus::IntrospectedArgument getCurrentCodecName_args[] =
{
{ "callID", "s", true },
{ "codecName", "s", false },
{ 0, 0, 0 }
};
static ::DBus::IntrospectedArgument currentSelectedCodec_args[] =
{
{ "callID", "s", false },
{ "codecName", "s", false },
{ 0, 0, 0 }
};
static ::DBus::IntrospectedArgument incomingCall_args[] =
{
{ "accountID", "s", false },
{ "callID", "s", false },
{ "from", "s", false },
{ 0, 0, 0 }
};
static ::DBus::IntrospectedArgument incomingMessage_args[] =
{
{ "accountID", "s", false },
{ "message", "s", false },
{ 0, 0, 0 }
};
static ::DBus::IntrospectedArgument callStateChanged_args[] =
{
{ "callID", "s", false },
{ "state", "s", false },
{ 0, 0, 0 }
};
static ::DBus::IntrospectedArgument voiceMailNotify_args[] =
{
{ "accountID", "s", false },
{ "count", "i", false },
{ 0, 0, 0 }
};
static ::DBus::IntrospectedArgument volumeChanged_args[] =
{
{ "device", "s", false },
{ "value", "d", false },
{ 0, 0, 0 }
};
static ::DBus::IntrospectedArgument error_args[] =
{
{ "details", "a{ss}", false },
{ 0, 0, 0 }
};
static ::DBus::IntrospectedMethod CallManager_adaptor_methods[] =
{
{ "placeCall", placeCall_args },
{ "refuse", refuse_args },
{ "accept", accept_args },
{ "hangUp", hangUp_args },
{ "hold", hold_args },
{ "unhold", unhold_args },
{ "transfert", transfert_args },
{ "playDTMF", playDTMF_args },
{ "startTone", startTone_args },
{ "setVolume", setVolume_args },
{ "getVolume", getVolume_args },
{ "setRecording", setRecording_args },
{ "getIsRecording", getIsRecording_args },
{ "getCallDetails", getCallDetails_args },
{ "getCurrentCallID", getCurrentCallID_args },
{ "getCurrentCodecName", getCurrentCodecName_args },
{ 0, 0 }
};
static ::DBus::IntrospectedMethod CallManager_adaptor_signals[] =
{
{ "currentSelectedCodec", currentSelectedCodec_args },
{ "incomingCall", incomingCall_args },
{ "incomingMessage", incomingMessage_args },
{ "callStateChanged", callStateChanged_args },
{ "voiceMailNotify", voiceMailNotify_args },
{ "volumeChanged", volumeChanged_args },
{ "error", error_args },
{ 0, 0 }
};
static ::DBus::IntrospectedProperty CallManager_adaptor_properties[] =
{
{ 0, 0, 0, 0 }
};
static ::DBus::IntrospectedInterface CallManager_adaptor_interface =
{
"org.sflphone.SFLphone.CallManager",
CallManager_adaptor_methods,
CallManager_adaptor_signals,
CallManager_adaptor_properties
};
return &CallManager_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 placeCall(const std::string& accountID, const std::string& callID, const std::string& to) = 0;
virtual void refuse(const std::string& callID) = 0;
virtual void accept(const std::string& callID) = 0;
virtual void hangUp(const std::string& callID) = 0;
virtual void hold(const std::string& callID) = 0;
virtual void unhold(const std::string& callID) = 0;
virtual void transfert(const std::string& callID, const std::string& to) = 0;
virtual void playDTMF(const std::string& key) = 0;
virtual void startTone(const int32_t& start, const int32_t& type) = 0;
virtual void setVolume(const std::string& device, const double& value) = 0;
virtual double getVolume(const std::string& device) = 0;
virtual void setRecording(const std::string& callID) = 0;
virtual bool getIsRecording(const std::string& callID) = 0;
virtual std::map< std::string, std::string > getCallDetails(const std::string& callID) = 0;
virtual std::string getCurrentCallID() = 0;
virtual std::string getCurrentCodecName(const std::string& callID) = 0;
public:
/* signal emitters for this interface
*/
void currentSelectedCodec(const std::string& arg1, const std::string& arg2)
{
::DBus::SignalMessage sig("currentSelectedCodec");
::DBus::MessageIter wi = sig.writer();
wi << arg1;
wi << arg2;
emit_signal(sig);
}
void incomingCall(const std::string& arg1, const std::string& arg2, const std::string& arg3)
{
::DBus::SignalMessage sig("incomingCall");
::DBus::MessageIter wi = sig.writer();
wi << arg1;
wi << arg2;
wi << arg3;
emit_signal(sig);
}
void incomingMessage(const std::string& arg1, const std::string& arg2)
{
::DBus::SignalMessage sig("incomingMessage");
::DBus::MessageIter wi = sig.writer();
wi << arg1;
wi << arg2;
emit_signal(sig);
}
void callStateChanged(const std::string& arg1, const std::string& arg2)
{
::DBus::SignalMessage sig("callStateChanged");
::DBus::MessageIter wi = sig.writer();
wi << arg1;
wi << arg2;
emit_signal(sig);
}
void voiceMailNotify(const std::string& arg1, const int32_t& arg2)
{
::DBus::SignalMessage sig("voiceMailNotify");
::DBus::MessageIter wi = sig.writer();
wi << arg1;
wi << arg2;
emit_signal(sig);
}
void volumeChanged(const std::string& arg1, const double& arg2)
{
::DBus::SignalMessage sig("volumeChanged");
::DBus::MessageIter wi = sig.writer();
wi << arg1;
wi << arg2;
emit_signal(sig);
}
void error(const std::map< std::string, std::string >& arg1)
{
::DBus::SignalMessage sig("error");
::DBus::MessageIter wi = sig.writer();
wi << arg1;
emit_signal(sig);
}
private:
/* unmarshalers (to unpack the DBus message before calling the actual interface method)
*/
::DBus::Message _placeCall_stub(const ::DBus::CallMessage &call)
{
::DBus::MessageIter ri = call.reader();
std::string argin1; ri >> argin1;
std::string argin2; ri >> argin2;
std::string argin3; ri >> argin3;
placeCall(argin1, argin2, argin3);
::DBus::ReturnMessage reply(call);
return reply;
}
::DBus::Message _refuse_stub(const ::DBus::CallMessage &call)
{
::DBus::MessageIter ri = call.reader();
std::string argin1; ri >> argin1;
refuse(argin1);
::DBus::ReturnMessage reply(call);
return reply;
}
::DBus::Message _accept_stub(const ::DBus::CallMessage &call)
{
::DBus::MessageIter ri = call.reader();
std::string argin1; ri >> argin1;
accept(argin1);
::DBus::ReturnMessage reply(call);
return reply;
}
::DBus::Message _hangUp_stub(const ::DBus::CallMessage &call)
{
::DBus::MessageIter ri = call.reader();
std::string argin1; ri >> argin1;
hangUp(argin1);
::DBus::ReturnMessage reply(call);
return reply;
}
::DBus::Message _hold_stub(const ::DBus::CallMessage &call)
{
::DBus::MessageIter ri = call.reader();
std::string argin1; ri >> argin1;
hold(argin1);
::DBus::ReturnMessage reply(call);
return reply;
}
::DBus::Message _unhold_stub(const ::DBus::CallMessage &call)
{
::DBus::MessageIter ri = call.reader();
std::string argin1; ri >> argin1;
unhold(argin1);
::DBus::ReturnMessage reply(call);
return reply;
}
::DBus::Message _transfert_stub(const ::DBus::CallMessage &call)
{
::DBus::MessageIter ri = call.reader();
std::string argin1; ri >> argin1;
std::string argin2; ri >> argin2;
transfert(argin1, argin2);
::DBus::ReturnMessage reply(call);
return reply;
}
::DBus::Message _playDTMF_stub(const ::DBus::CallMessage &call)
{
::DBus::MessageIter ri = call.reader();
std::string argin1; ri >> argin1;
playDTMF(argin1);
::DBus::ReturnMessage reply(call);
return reply;
}
::DBus::Message _startTone_stub(const ::DBus::CallMessage &call)
{
::DBus::MessageIter ri = call.reader();
int32_t argin1; ri >> argin1;
int32_t argin2; ri >> argin2;
startTone(argin1, argin2);
::DBus::ReturnMessage reply(call);
return reply;
}
::DBus::Message _setVolume_stub(const ::DBus::CallMessage &call)
{
::DBus::MessageIter ri = call.reader();
std::string argin1; ri >> argin1;
double argin2; ri >> argin2;
setVolume(argin1, argin2);
::DBus::ReturnMessage reply(call);
return reply;
}
::DBus::Message _getVolume_stub(const ::DBus::CallMessage &call)
{
::DBus::MessageIter ri = call.reader();
std::string argin1; ri >> argin1;
double argout1 = getVolume(argin1);
::DBus::ReturnMessage reply(call);
::DBus::MessageIter wi = reply.writer();
wi << argout1;
return reply;
}
::DBus::Message _setRecording_stub(const ::DBus::CallMessage &call)
{
::DBus::MessageIter ri = call.reader();
std::string argin1; ri >> argin1;
setRecording(argin1);
::DBus::ReturnMessage reply(call);
return reply;
}
::DBus::Message _getIsRecording_stub(const ::DBus::CallMessage &call)
{
::DBus::MessageIter ri = call.reader();
std::string argin1; ri >> argin1;
bool argout1 = getIsRecording(argin1);
::DBus::ReturnMessage reply(call);
::DBus::MessageIter wi = reply.writer();
wi << argout1;
return reply;
}
::DBus::Message _getCallDetails_stub(const ::DBus::CallMessage &call)
{
::DBus::MessageIter ri = call.reader();
std::string argin1; ri >> argin1;
std::map< std::string, std::string > argout1 = getCallDetails(argin1);
::DBus::ReturnMessage reply(call);
::DBus::MessageIter wi = reply.writer();
wi << argout1;
return reply;
}
::DBus::Message _getCurrentCallID_stub(const ::DBus::CallMessage &call)
{
::DBus::MessageIter ri = call.reader();
std::string argout1 = getCurrentCallID();
::DBus::ReturnMessage reply(call);
::DBus::MessageIter wi = reply.writer();
wi << argout1;
return reply;
}
::DBus::Message _getCurrentCodecName_stub(const ::DBus::CallMessage &call)
{
::DBus::MessageIter ri = call.reader();
std::string argin1; ri >> argin1;
std::string argout1 = getCurrentCodecName(argin1);
::DBus::ReturnMessage reply(call);
::DBus::MessageIter wi = reply.writer();
wi << argout1;
return reply;
}
};
} } }
#endif//__dbusxx__callmanager_glue_h__ADAPTOR_MARSHAL_H
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;