mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-12 22:09:25 +08:00
Integration into sflphoned
in xml: floats are represented as d
This commit is contained in:
@ -3,7 +3,7 @@ dnl
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_PREREQ(2.59)
|
||||
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$])
|
||||
|
||||
dnl Compute canonical system name
|
||||
@ -185,6 +185,11 @@ PKG_CHECK_MODULES(libportaudiocpp, portaudiocpp >= ${LIBPORTAUDIOCPP_MIN_VERSION
|
||||
SFLPHONE_CFLAGS="$SFLPHONE_CFLAGS $libportaudiocpp_CFLAGS"
|
||||
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
|
||||
AC_ARG_ENABLE(speex,
|
||||
AS_HELP_STRING(
|
||||
|
@ -36,7 +36,7 @@ sflphoned_SOURCES = eventthread.cpp main.cpp voIPLink.cpp \
|
||||
sflphoned_CXXFLAGS = -DPREFIX=\"$(prefix)\" -DPROGSHAREDIR=\"${datadir}/sflphone\" $(ZEROCONFFLAGS) $(IAX_FLAGS) $(SFLPHONE_CFLAGS) $(SIP_CFLAGS)
|
||||
|
||||
#sflphoned_LDFLAGS = -static
|
||||
sflphoned_LDADD = ./libsflphone.la $(SFLPHONE_LIBS) $(ZEROCONFLIB) $(LIB_DNSSD) $(IAX_LIBS) $(EXOSIP_LIBS)
|
||||
sflphoned_LDADD = ./libsflphone.la $(SFLPHONE_LIBS) $(ZEROCONFLIB) $(LIB_DNSSD) $(IAX_LIBS) $(EXOSIP_LIBS)
|
||||
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/libs $(libccext2_CFLAGS) $(libccgnu2_CFLAGS) $(IAX_CFLAGS) $(USER_INCLUDES)
|
||||
|
||||
#libsflphone_la_LDFLAGS= -version-info 0:1:0
|
||||
@ -45,6 +45,7 @@ libsflphone_la_LIBADD = \
|
||||
$(top_builddir)/libs/utilspp/libutilspp.la \
|
||||
./audio/libaudio.la \
|
||||
./gui/libguiframework.la \
|
||||
./dbus/libdbus.la \
|
||||
./config/libconfig.la \
|
||||
$(IAX_LIBS)
|
||||
|
||||
|
@ -1,12 +1,16 @@
|
||||
SUBDIRS =
|
||||
|
||||
EXTRA_DIST = *.xml
|
||||
EXTRA_DIST = *.xml README
|
||||
|
||||
noinst_LTLIBRARIES = libdbus.la
|
||||
|
||||
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)
|
||||
libdbus_la_LIBADD = $(LIB_DNSSD)
|
||||
AM_CXXFLAGS =
|
||||
libdbus_la_LIBADD =
|
||||
|
||||
|
@ -19,7 +19,7 @@ public:
|
||||
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, accept, _accept_stub);
|
||||
register_method(CallManager, hangUp, _hangUp_stub);
|
||||
@ -35,7 +35,7 @@ public:
|
||||
|
||||
::DBus::IntrospectedInterface* const introspect() const
|
||||
{
|
||||
static ::DBus::IntrospectedArgument call_args[] =
|
||||
static ::DBus::IntrospectedArgument placeCall_args[] =
|
||||
{
|
||||
{ "accountID", "s", true },
|
||||
{ "callID", "s", true },
|
||||
@ -76,13 +76,13 @@ public:
|
||||
static ::DBus::IntrospectedArgument setVolume_args[] =
|
||||
{
|
||||
{ "device", "s", true },
|
||||
{ "value", "f", true },
|
||||
{ "value", "d", true },
|
||||
{ 0, 0, 0 }
|
||||
};
|
||||
static ::DBus::IntrospectedArgument getVolume_args[] =
|
||||
{
|
||||
{ "device", "s", true },
|
||||
{ "value", "f", false },
|
||||
{ "value", "d", false },
|
||||
{ 0, 0, 0 }
|
||||
};
|
||||
static ::DBus::IntrospectedArgument getVoiceMailCount_args[] =
|
||||
@ -132,7 +132,7 @@ public:
|
||||
static ::DBus::IntrospectedArgument volumeChanged_args[] =
|
||||
{
|
||||
{ "device", "s", false },
|
||||
{ "value", "f", false },
|
||||
{ "value", "d", false },
|
||||
{ 0, 0, 0 }
|
||||
};
|
||||
static ::DBus::IntrospectedArgument error_args[] =
|
||||
@ -142,7 +142,7 @@ public:
|
||||
};
|
||||
static ::DBus::IntrospectedMethod CallManager_methods[] =
|
||||
{
|
||||
{ "call", call_args },
|
||||
{ "placeCall", placeCall_args },
|
||||
{ "refuse", refuse_args },
|
||||
{ "accept", accept_args },
|
||||
{ "hangUp", hangUp_args },
|
||||
@ -192,15 +192,15 @@ public:
|
||||
/* methods exported by this interface,
|
||||
* 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 accept( const ::DBus::String& callID ) = 0;
|
||||
virtual void hangUp( const ::DBus::String& callID ) = 0;
|
||||
virtual void hold( 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 setVolume( const ::DBus::String& device, const & value ) = 0;
|
||||
virtual getVolume( const ::DBus::String& device ) = 0;
|
||||
virtual void setVolume( const ::DBus::String& device, const ::DBus::Double& value ) = 0;
|
||||
virtual ::DBus::Double getVolume( const ::DBus::String& device ) = 0;
|
||||
virtual ::DBus::Int32 getVoiceMailCount( ) = 0;
|
||||
virtual std::map< ::DBus::String, ::DBus::String > getCallDetails( const ::DBus::String& callID ) = 0;
|
||||
virtual ::DBus::String getCurrentCallID( ) = 0;
|
||||
@ -247,7 +247,7 @@ public:
|
||||
wi << arg1;
|
||||
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::MessageIter wi = sig.writer();
|
||||
@ -267,14 +267,14 @@ private:
|
||||
|
||||
/* 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::String argin1; ri >> argin1;
|
||||
::DBus::String argin2; ri >> argin2;
|
||||
::DBus::String argin3; ri >> argin3;
|
||||
call(argin1, argin2, argin3);
|
||||
placeCall(argin1, argin2, argin3);
|
||||
::DBus::ReturnMessage reply(call);
|
||||
return reply;
|
||||
}
|
||||
@ -338,7 +338,7 @@ private:
|
||||
::DBus::MessageIter ri = call.reader();
|
||||
|
||||
::DBus::String argin1; ri >> argin1;
|
||||
argin2; ri >> argin2;
|
||||
::DBus::Double argin2; ri >> argin2;
|
||||
setVolume(argin1, argin2);
|
||||
::DBus::ReturnMessage reply(call);
|
||||
return reply;
|
||||
@ -348,7 +348,7 @@ private:
|
||||
::DBus::MessageIter ri = call.reader();
|
||||
|
||||
::DBus::String argin1; ri >> argin1;
|
||||
argout1 = getVolume(argin1);
|
||||
::DBus::Double argout1 = getVolume(argin1);
|
||||
::DBus::ReturnMessage reply(call);
|
||||
::DBus::MessageIter wi = reply.writer();
|
||||
wi << argout1;
|
||||
|
@ -2,7 +2,7 @@
|
||||
<node 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="callID" direction="in"/>
|
||||
<arg type="s" name="to" direction="in"/>
|
||||
@ -35,12 +35,12 @@
|
||||
|
||||
<method name="setVolume">
|
||||
<arg type="s" name="device" direction="in"/>
|
||||
<arg type="f" name="value" direction="in"/>
|
||||
<arg type="d" name="value" direction="in"/>
|
||||
</method>
|
||||
|
||||
<method name="getVolume">
|
||||
<arg type="s" name="device" direction="in"/>
|
||||
<arg type="f" name="value" direction="out"/>
|
||||
<arg type="d" name="value" direction="out"/>
|
||||
</method>
|
||||
|
||||
<method name="getVoiceMailCount">
|
||||
@ -81,7 +81,7 @@
|
||||
|
||||
<signal name="volumeChanged">
|
||||
<arg type="s" name="device" />
|
||||
<arg type="f" name="value" />
|
||||
<arg type="d" name="value" />
|
||||
</signal>
|
||||
|
||||
<signal name="error">
|
||||
|
60
src/dbus/callmanager.h
Normal file
60
src/dbus/callmanager.h
Normal file
@ -0,0 +1,60 @@
|
||||
/*
|
||||
* 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
|
28
src/dbus/dbusmanager.h
Normal file
28
src/dbus/dbusmanager.h
Normal file
@ -0,0 +1,28 @@
|
||||
/*
|
||||
* 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__
|
20
src/dbus/dbusmanagerimpl.cpp
Normal file
20
src/dbus/dbusmanagerimpl.cpp
Normal file
@ -0,0 +1,20 @@
|
||||
/*
|
||||
* 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>
|
32
src/dbus/dbusmanagerimpl.h
Normal file
32
src/dbus/dbusmanagerimpl.h
Normal file
@ -0,0 +1,32 @@
|
||||
/*
|
||||
* 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
|
Reference in New Issue
Block a user