Skip to content
Snippets Groups Projects
Commit cda52886 authored by Pierre-Luc Beaudoin's avatar Pierre-Luc Beaudoin
Browse files

Integration into sflphoned

in xml: floats are represented as d
parent abbf0ada
Branches
Tags
No related merge requests found
...@@ -3,7 +3,7 @@ dnl ...@@ -3,7 +3,7 @@ dnl
dnl Process this file with autoconf to produce a configure script. dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59) AC_PREREQ(2.59)
AC_INIT([SFLPhone],[0.7],[sflphoneteam@savoirfairelinux.com],[sflphone]) AC_INIT([SFLPhone],[0.7],[sflphoneteam@savoirfairelinux.com],[sflphone])
AC_COPYRIGHT([[Copyright (c) Savoir-Faire Linux 2004-2006]]) AC_COPYRIGHT([[Copyright (c) Savoir-Faire Linux 2004-2007]])
AC_REVISION([$Revision$]) AC_REVISION([$Revision$])
dnl Compute canonical system name dnl Compute canonical system name
...@@ -185,6 +185,11 @@ PKG_CHECK_MODULES(libportaudiocpp, portaudiocpp >= ${LIBPORTAUDIOCPP_MIN_VERSION ...@@ -185,6 +185,11 @@ PKG_CHECK_MODULES(libportaudiocpp, portaudiocpp >= ${LIBPORTAUDIOCPP_MIN_VERSION
SFLPHONE_CFLAGS="$SFLPHONE_CFLAGS $libportaudiocpp_CFLAGS" SFLPHONE_CFLAGS="$SFLPHONE_CFLAGS $libportaudiocpp_CFLAGS"
SFLPHONE_LIBS="$SFLPHONE_LIBS $libportaudiocpp_LIBS" SFLPHONE_LIBS="$SFLPHONE_LIBS $libportaudiocpp_LIBS"
LIBDBUSCPP_MIN_VERSION=0.5
PKG_CHECK_MODULES(libdbuscpp, dbus-c++-1 >= ${LIBDBUSCPP_MIN_VERSION})
SFLPHONE_CFLAGS="$SFLPHONE_CFLAGS $libdbuscpp_CFLAGS"
SFLPHONE_LIBS="$SFLPHONE_LIBS $libdbuscpp_LIBS"
dnl Check for speex dnl Check for speex
AC_ARG_ENABLE(speex, AC_ARG_ENABLE(speex,
AS_HELP_STRING( AS_HELP_STRING(
......
...@@ -45,6 +45,7 @@ libsflphone_la_LIBADD = \ ...@@ -45,6 +45,7 @@ libsflphone_la_LIBADD = \
$(top_builddir)/libs/utilspp/libutilspp.la \ $(top_builddir)/libs/utilspp/libutilspp.la \
./audio/libaudio.la \ ./audio/libaudio.la \
./gui/libguiframework.la \ ./gui/libguiframework.la \
./dbus/libdbus.la \
./config/libconfig.la \ ./config/libconfig.la \
$(IAX_LIBS) $(IAX_LIBS)
......
SUBDIRS = SUBDIRS =
EXTRA_DIST = *.xml EXTRA_DIST = *.xml README
noinst_LTLIBRARIES = libdbus.la noinst_LTLIBRARIES = libdbus.la
libdbus_la_SOURCES = \ libdbus_la_SOURCES = \
callmanager-glue.h callmanager-glue.h \
configurationmanager-glue.h \
callmanager.h callmanager.cpp \
dbusmanager.h dbusmanagerimpl.h dbusmanagerimp.cpp \
configurationmanager.h
AM_CXXFLAGS = $(libccext2_CFLAGS) AM_CXXFLAGS =
libdbus_la_LIBADD = $(LIB_DNSSD) libdbus_la_LIBADD =
...@@ -19,7 +19,7 @@ public: ...@@ -19,7 +19,7 @@ public:
CallManager() CallManager()
: ::DBus::InterfaceAdaptor("org.sflphone.CallManager") : ::DBus::InterfaceAdaptor("org.sflphone.CallManager")
{ {
register_method(CallManager, call, _call_stub); register_method(CallManager, placeCall, _placeCall_stub);
register_method(CallManager, refuse, _refuse_stub); register_method(CallManager, refuse, _refuse_stub);
register_method(CallManager, accept, _accept_stub); register_method(CallManager, accept, _accept_stub);
register_method(CallManager, hangUp, _hangUp_stub); register_method(CallManager, hangUp, _hangUp_stub);
...@@ -35,7 +35,7 @@ public: ...@@ -35,7 +35,7 @@ public:
::DBus::IntrospectedInterface* const introspect() const ::DBus::IntrospectedInterface* const introspect() const
{ {
static ::DBus::IntrospectedArgument call_args[] = static ::DBus::IntrospectedArgument placeCall_args[] =
{ {
{ "accountID", "s", true }, { "accountID", "s", true },
{ "callID", "s", true }, { "callID", "s", true },
...@@ -76,13 +76,13 @@ public: ...@@ -76,13 +76,13 @@ public:
static ::DBus::IntrospectedArgument setVolume_args[] = static ::DBus::IntrospectedArgument setVolume_args[] =
{ {
{ "device", "s", true }, { "device", "s", true },
{ "value", "f", true }, { "value", "d", true },
{ 0, 0, 0 } { 0, 0, 0 }
}; };
static ::DBus::IntrospectedArgument getVolume_args[] = static ::DBus::IntrospectedArgument getVolume_args[] =
{ {
{ "device", "s", true }, { "device", "s", true },
{ "value", "f", false }, { "value", "d", false },
{ 0, 0, 0 } { 0, 0, 0 }
}; };
static ::DBus::IntrospectedArgument getVoiceMailCount_args[] = static ::DBus::IntrospectedArgument getVoiceMailCount_args[] =
...@@ -132,7 +132,7 @@ public: ...@@ -132,7 +132,7 @@ public:
static ::DBus::IntrospectedArgument volumeChanged_args[] = static ::DBus::IntrospectedArgument volumeChanged_args[] =
{ {
{ "device", "s", false }, { "device", "s", false },
{ "value", "f", false }, { "value", "d", false },
{ 0, 0, 0 } { 0, 0, 0 }
}; };
static ::DBus::IntrospectedArgument error_args[] = static ::DBus::IntrospectedArgument error_args[] =
...@@ -142,7 +142,7 @@ public: ...@@ -142,7 +142,7 @@ public:
}; };
static ::DBus::IntrospectedMethod CallManager_methods[] = static ::DBus::IntrospectedMethod CallManager_methods[] =
{ {
{ "call", call_args }, { "placeCall", placeCall_args },
{ "refuse", refuse_args }, { "refuse", refuse_args },
{ "accept", accept_args }, { "accept", accept_args },
{ "hangUp", hangUp_args }, { "hangUp", hangUp_args },
...@@ -192,15 +192,15 @@ public: ...@@ -192,15 +192,15 @@ public:
/* methods exported by this interface, /* methods exported by this interface,
* you will have to implement them in your ObjectAdaptor * you will have to implement them in your ObjectAdaptor
*/ */
virtual void call( const ::DBus::String& accountID, const ::DBus::String& callID, const ::DBus::String& to ) = 0; virtual void placeCall( const ::DBus::String& accountID, const ::DBus::String& callID, const ::DBus::String& to ) = 0;
virtual void refuse( const ::DBus::String& callID ) = 0; virtual void refuse( const ::DBus::String& callID ) = 0;
virtual void accept( const ::DBus::String& callID ) = 0; virtual void accept( const ::DBus::String& callID ) = 0;
virtual void hangUp( const ::DBus::String& callID ) = 0; virtual void hangUp( const ::DBus::String& callID ) = 0;
virtual void hold( const ::DBus::String& callID ) = 0; virtual void hold( const ::DBus::String& callID ) = 0;
virtual void unhold( const ::DBus::String& callID ) = 0; virtual void unhold( const ::DBus::String& callID ) = 0;
virtual void transfert( const ::DBus::String& callID, const ::DBus::String& to ) = 0; virtual void transfert( const ::DBus::String& callID, const ::DBus::String& to ) = 0;
virtual void setVolume( const ::DBus::String& device, const & value ) = 0; virtual void setVolume( const ::DBus::String& device, const ::DBus::Double& value ) = 0;
virtual getVolume( const ::DBus::String& device ) = 0; virtual ::DBus::Double getVolume( const ::DBus::String& device ) = 0;
virtual ::DBus::Int32 getVoiceMailCount( ) = 0; virtual ::DBus::Int32 getVoiceMailCount( ) = 0;
virtual std::map< ::DBus::String, ::DBus::String > getCallDetails( const ::DBus::String& callID ) = 0; virtual std::map< ::DBus::String, ::DBus::String > getCallDetails( const ::DBus::String& callID ) = 0;
virtual ::DBus::String getCurrentCallID( ) = 0; virtual ::DBus::String getCurrentCallID( ) = 0;
...@@ -247,7 +247,7 @@ public: ...@@ -247,7 +247,7 @@ public:
wi << arg1; wi << arg1;
emit_signal(sig); emit_signal(sig);
} }
void volumeChanged( const ::DBus::String& arg1, const & arg2 ) void volumeChanged( const ::DBus::String& arg1, const ::DBus::Double& arg2 )
{ {
::DBus::SignalMessage sig("volumeChanged"); ::DBus::SignalMessage sig("volumeChanged");
::DBus::MessageIter wi = sig.writer(); ::DBus::MessageIter wi = sig.writer();
...@@ -267,14 +267,14 @@ private: ...@@ -267,14 +267,14 @@ private:
/* unmarshalers (to unpack the DBus message before calling the actual interface method) /* unmarshalers (to unpack the DBus message before calling the actual interface method)
*/ */
::DBus::Message _call_stub( const ::DBus::CallMessage& call ) ::DBus::Message _placeCall_stub( const ::DBus::CallMessage& call )
{ {
::DBus::MessageIter ri = call.reader(); ::DBus::MessageIter ri = call.reader();
::DBus::String argin1; ri >> argin1; ::DBus::String argin1; ri >> argin1;
::DBus::String argin2; ri >> argin2; ::DBus::String argin2; ri >> argin2;
::DBus::String argin3; ri >> argin3; ::DBus::String argin3; ri >> argin3;
call(argin1, argin2, argin3); placeCall(argin1, argin2, argin3);
::DBus::ReturnMessage reply(call); ::DBus::ReturnMessage reply(call);
return reply; return reply;
} }
...@@ -338,7 +338,7 @@ private: ...@@ -338,7 +338,7 @@ private:
::DBus::MessageIter ri = call.reader(); ::DBus::MessageIter ri = call.reader();
::DBus::String argin1; ri >> argin1; ::DBus::String argin1; ri >> argin1;
argin2; ri >> argin2; ::DBus::Double argin2; ri >> argin2;
setVolume(argin1, argin2); setVolume(argin1, argin2);
::DBus::ReturnMessage reply(call); ::DBus::ReturnMessage reply(call);
return reply; return reply;
...@@ -348,7 +348,7 @@ private: ...@@ -348,7 +348,7 @@ private:
::DBus::MessageIter ri = call.reader(); ::DBus::MessageIter ri = call.reader();
::DBus::String argin1; ri >> argin1; ::DBus::String argin1; ri >> argin1;
argout1 = getVolume(argin1); ::DBus::Double argout1 = getVolume(argin1);
::DBus::ReturnMessage reply(call); ::DBus::ReturnMessage reply(call);
::DBus::MessageIter wi = reply.writer(); ::DBus::MessageIter wi = reply.writer();
wi << argout1; wi << argout1;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<node name="/org/sflphone/CallManager"> <node name="/org/sflphone/CallManager">
<interface name="org.sflphone.CallManager"> <interface name="org.sflphone.CallManager">
<method name="call"> <method name="placeCall">
<arg type="s" name="accountID" direction="in"/> <arg type="s" name="accountID" direction="in"/>
<arg type="s" name="callID" direction="in"/> <arg type="s" name="callID" direction="in"/>
<arg type="s" name="to" direction="in"/> <arg type="s" name="to" direction="in"/>
...@@ -35,12 +35,12 @@ ...@@ -35,12 +35,12 @@
<method name="setVolume"> <method name="setVolume">
<arg type="s" name="device" direction="in"/> <arg type="s" name="device" direction="in"/>
<arg type="f" name="value" direction="in"/> <arg type="d" name="value" direction="in"/>
</method> </method>
<method name="getVolume"> <method name="getVolume">
<arg type="s" name="device" direction="in"/> <arg type="s" name="device" direction="in"/>
<arg type="f" name="value" direction="out"/> <arg type="d" name="value" direction="out"/>
</method> </method>
<method name="getVoiceMailCount"> <method name="getVoiceMailCount">
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
<signal name="volumeChanged"> <signal name="volumeChanged">
<arg type="s" name="device" /> <arg type="s" name="device" />
<arg type="f" name="value" /> <arg type="d" name="value" />
</signal> </signal>
<signal name="error"> <signal name="error">
......
/*
* Copyright (C) 2007 Savoir-Faire Linux inc.
* Author: Pierre-Luc Beaudoin <pierre-luc.beaudoin@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef CALLMANAGER_H
#define CALLMANAGER_H
#include "callmanager-glue.h"
#include <dbus-c++/dbus.h>
static const char* SERVER_NAME = "org.sflphone.CallManager";
static const char* SERVER_PATH = "/org/sflphone/CallManager";
class CallManager
: public org::sflphone::CallManager,
public DBus::IntrospectableAdaptor,
public DBus::ObjectAdaptor
{
public:
CallManager(DBus::Connection& connection);
static int exec();
public:
/* methods exported by this interface,
* you will have to implement them in your ObjectAdaptor
*/
void placeCall( const ::DBus::String& accountID, const ::DBus::String& callID, const ::DBus::String& to );
void refuse( const ::DBus::String& callID );
void accept( const ::DBus::String& callID );
void hangUp( const ::DBus::String& callID );
void hold( const ::DBus::String& callID );
void unhold( const ::DBus::String& callID );
void transfert( const ::DBus::String& callID, const ::DBus::String& to );
void setVolume( const ::DBus::String& device, const ::DBus::Double& value );
::DBus::Double getVolume( const ::DBus::String& device );
::DBus::Int32 getVoiceMailCount( );
std::map< ::DBus::String, ::DBus::String > getCallDetails( const ::DBus::String& callID );
::DBus::String getCurrentCallID( );
};
#endif//CALLMANAGER_H
/*
* Copyright (C) 2007 Savoir-Faire Linux inc.
* Author: Pierre-Luc Beaudoin <pierre-luc.beaudoin@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __DBUSMANAGERSINGLETON_H__
#define __DBUSMANAGERSINGLETON_H__
#include "utilspp/Singleton.hpp"
#include "dbusmanagerimpl.h"
typedef utilspp::SingletonHolder< DBusManagerImpl > DBusManager;
#endif // __DBUSMANAGERSINGLETON_H__
/*
* Copyright (C) 2007 Savoir-Faire Linux inc.
* Author: Pierre-Luc Beaudoin <pierre-luc.beaudoin@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <dbusmanagerimpl.h>
/*
* Copyright (C) 2007 Savoir-Faire Linux inc.
* Author: Pierre-Luc Beaudoin <pierre-luc.beaudoin@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef DBUSMANAGERIMPL_H
#define DBUSMANAGERIMPL_H
class DBusManager {
public:
void connect();
int exec();
private:
CallManager * _callManager;
}
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment