Commit 869118ce authored by Rafaël Carré's avatar Rafaël Carré

Remove copy of dbus-c++ from libs/

It is packaged in most distributions
parent dab0969f
......@@ -36,10 +36,6 @@ AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([libs/Makefile \
libs/utilspp/Makefile \
libs/utilspp/singleton/Makefile \
libs/dbus-c++/Makefile \
libs/dbus-c++/src/Makefile \
libs/dbus-c++/tools/Makefile \
libs/dbus-c++/data/Makefile \
libs/iax2/Makefile])
AC_CONFIG_FILES([src/Makefile \
......@@ -204,28 +200,12 @@ dnl Check for libzrtpcpp, a ccRTP extension providing zrtp key exchange
LIBZRTPCPP_MIN_VERSION=1.3.0
PKG_CHECK_MODULES(ZRTPCPP, libzrtpcpp >= ${LIBZRTPCPP_MIN_VERSION},, AC_MSG_ERROR([Missing zrtp development package: libzrtpcpp-dev]))
dnl DBus-C++ detection (used to be in library own build system)
DBUS_REQUIRED_VERSION=0.60
PKG_CHECK_MODULES(dbus, [dbus-1 >= $DBUS_REQUIRED_VERSION],,
AC_MSG_ERROR([You need the DBus libraries (version 0.6 or better)]
[http://gitorious.org/dbus-cplusplus]))
DBUS_API_STABLE_VERSION=1.0.0
PKG_CHECK_EXISTS([dbus-1 < $DBUS_API_STABLE_VERSION],
[AC_DEFINE(DBUS_API_SUBJECT_TO_CHANGE, , [unstable DBus])]
)
DBUS_THREADS_INIT_DEFAULT_VERSION=0.93
PKG_CHECK_EXISTS([dbus-1 >= $DBUS_THREADS_INIT_DEFAULT_VERSION],
[AC_DEFINE(DBUS_HAS_THREADS_INIT_DEFAULT, , [dbus_threads_init_default (needs DBus >= 0.93)])]
)
DBUS_RECURSIVE_MUTEX_VERSION=0.95
PKG_CHECK_EXISTS([dbus-1 >= $DBUS_RECURSIVE_MUTEX_VERSION],
[AC_DEFINE(DBUS_HAS_RECURSIVE_MUTEX, , [DBus supports recursive mutexes (needs DBus >= 0.95)])]
)
dnl DBus-C++ detection
dnl pkg-config doesn't like 0.6.0-pre1 version number, it assumes that it is
dnl more recent than (unreleased) 0.6.0
DBUS_CPP_REQUIRED_VERSION=0.6.0-pre1
PKG_CHECK_MODULES(DBUSCPP, dbus-c++-1,,
AC_MSG_ERROR([You need the DBus-c++ libraries (version $DBUS_CPP_REQUIRED_VERSION or better)]))
AC_ARG_WITH(debug,
AS_HELP_STRING(
......@@ -291,21 +271,6 @@ AC_MSG_ERROR([You need the Perl-Compatible Regular Expressions library (pcre)])
AC_SUBST(PCRE_LIBS)
AC_SUBST(PCRE_CFLAGS)
# For the tools/, we need libdbus-c++ for the "build" architecture as well
AM_CONDITIONAL(CROSS_COMPILING, test "$cross_compiling" = "yes")
AC_ARG_WITH(build-libdbus-cxx,
AS_HELP_STRING([--with-build-libdbus-cxx],
[For cross compilation: path to libdbus-cxx which was compiled for the 'build' system.]),
[ BUILD_LIBDBUS_CXX_DIR=${withval} ],
[ BUILD_LIBDBUS_CXX_DIR="\$(top_builddir)" ]
)
AC_SUBST(BUILD_LIBDBUS_CXX_DIR)
dnl Check for libcppunit-dev
CPPUNIT_MIN_VERSION=1.12
PKG_CHECK_MODULES(CPPUNIT, cppunit >= ${CPPUNIT_MIN_VERSION}, AM_CONDITIONAL(BUILD_TEST, test 1 = 1 ), AM_CONDITIONAL(BUILD_TEST, test 0 = 1 ))
......
......@@ -33,8 +33,6 @@ SIP_CFLAGS=-I$(src)/libs/pjproject/pjsip/include \
-I$(src)/libs/pjproject/pjmedia/include \
-I$(src)/libs/pjproject/pjnath/include
DBUSCPP_CFLAGS=$(top_srcdir)/libs/dbus-c++/include/dbus-c++
if BUILD_SPEEX
SPEEXCODEC=-DHAVE_SPEEX_CODEC
else
......@@ -50,13 +48,13 @@ endif
# Preprocessor flags
AM_CPPFLAGS = \
-I$(src)/libs \
-I$(src)/libs/dbus-c++/include \
-I$(src)/libs/iax2 \
-I$(src)/libs/pjproject \
-I$(src)/src \
-I$(src)/src/config \
-I$(src)/test \
$(SIP_CFLAGS) \
@DBUSCPP_CFLAGS@ \
-DPREFIX=\"$(prefix)\" \
-DPROGSHAREDIR=\"${datadir}/sflphone\" \
-DCODECS_DIR=\""$(sflcodecdir)"\" \
......
SUBDIRS = utilspp iax2 dbus-c++
SUBDIRS = utilspp iax2
Fetched from (30 septembre 2008):
git clone git://anongit.freedesktop.org/git/dbus/dbus-c++/
Paolo Durante <shackan@gmail.com>
Andreas Volz <andreas.volz@tux-style.com>
This diff is collapsed.
SUBDIRS = src tools data
MAINTAINERCLEANFILES = \
Makefile.in
Debugging
---------
To compile debugging code configure the project with the --enable-debug option. Then at runtime you may set the environment variable "DBUSXX_VERBOSE=1" to activate debugging and to '0' to deactivate debugging.
BUGS:
-----
test
EXTRA_DIST = org.freedesktop.DBus.xml
MAINTAINERCLEANFILES = \
Makefile.in
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.freedesktop.DBus.Introspectable">
<method name="Introspect">
<arg name="data" direction="out" type="s"/>
</method>
</interface>
<interface name="org.freedesktop.DBus.Properties">
<method name="Get">
<arg name="interface_name" direction="in" type="s"/>
<arg name="property_name" direction="in" type="s"/>
<arg name="value" direction="out" type="v"/>
</method>
<method name="Set">
<arg name="interface_name" direction="in" type="s"/>
<arg name="property_name" direction="in" type="s"/>
<arg name="value" direction="in" type="v"/>
</method>
<method name="GetAll">
<arg name="interface_name" direction="in" type="s"/>
<arg name="props" direction="out" type="a{sv}"/>
</method>
</interface>
<interface name="org.freedesktop.DBus">
<method name="RequestName">
<arg direction="in" type="s"/>
<arg direction="in" type="u"/>
<arg direction="out" type="u"/>
</method>
<method name="ReleaseName">
<arg direction="in" type="s"/>
<arg direction="out" type="u"/>
</method>
<method name="StartServiceByName">
<arg direction="in" type="s"/>
<arg direction="in" type="u"/>
<arg direction="out" type="u"/>
</method>
<method name="Hello">
<arg direction="out" type="s"/>
</method>
<method name="NameHasOwner">
<arg direction="in" type="s"/>
<arg direction="out" type="b"/>
</method>
<method name="ListNames">
<arg direction="out" type="as"/>
</method>
<method name="AddMatch">
<arg direction="in" type="s"/>
</method>
<method name="RemoveMatch">
<arg direction="in" type="s"/>
</method>
<method name="GetNameOwner">
<arg direction="in" type="s"/>
<arg direction="out" type="s"/>
</method>
<method name="ListQueuedOwners">
<arg direction="in" type="s"/>
<arg direction="out" type="as"/>
</method>
<method name="GetConnectionUnixUser">
<arg direction="in" type="s"/>
<arg direction="out" type="u"/>
</method>
<method name="GetConnectionUnixProcessID">
<arg direction="in" type="s"/>
<arg direction="out" type="u"/>
</method>
<method name="GetConnectionSELinuxSecurityContext">
<arg direction="in" type="s"/>
<arg direction="out" type="ay"/>
</method>
<method name="ReloadConfig">
</method>
<signal name="NameOwnerChanged">
<arg type="s"/>
<arg type="s"/>
<arg type="s"/>
</signal>
<signal name="NameLost">
<arg type="s"/>
</signal>
<signal name="NameAcquired">
<arg type="s"/>
</signal>
</interface>
</node>
/*
*
* D-Bus++ - C++ bindings for D-Bus
*
* Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com>
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#ifndef __DBUSXX_API_H
#define __DBUSXX_API_H
#ifdef GCC_HASCLASSVISIBILITY
# define DXXAPILOCAL __attribute__ ((visibility("hidden")))
# define DXXAPIPUBLIC __attribute__ ((visibility("default")))
#else
# define DXXAPILOCAL
# define DXXAPIPUBLIC
#endif
#define DXXAPI DXXAPIPUBLIC
#endif//__DBUSXX_API_H
/*
*
* D-Bus++ - C++ bindings for D-Bus
*
* Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com>
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#ifndef __DBUSXX_DBUS_H
#define __DBUSXX_DBUS_H
#include "types.h"
#include "interface.h"
#include "object.h"
#include "property.h"
#include "connection.h"
#include "server.h"
#include "error.h"
#include "message.h"
#include "debug.h"
#include "pendingcall.h"
#include "server.h"
#include "util.h"
#include "dispatcher.h"
#include "eventloop.h"
#include "eventloop-integration.h"
#include "introspection.h"
#include "pipe.h"
#endif//__DBUSXX_DBUS_H
/*
*
* D-Bus++ - C++ bindings for D-Bus
*
* Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com>
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#ifndef __DBUSXX_DEBUG_H
#define __DBUSXX_DEBUG_H
#include "api.h"
namespace DBus {
typedef void (*LogFunction)(const char *format, ...);
extern DXXAPI LogFunction debug_log;
} /* namespace DBus */
#endif
/*
*
* D-Bus++ - C++ bindings for D-Bus
*
* Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com>
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#ifndef __DBUSXX_DISPATCHER_H
#define __DBUSXX_DISPATCHER_H
#include "api.h"
#include "connection.h"
#include "eventloop.h"
namespace DBus {
class DXXAPI Timeout
{
public:
class Internal;
Timeout(Internal *i);
virtual ~Timeout(){}
/*!
* \brief Gets the timeout interval.
*
* The handle() should be called each time this interval elapses,
* starting after it elapses once.
*
* The interval may change during the life of the timeout; if so, the timeout
* will be disabled and re-enabled (calling the "timeout toggled function") to
* notify you of the change.
*
* return The interval in miliseconds.
*/
int interval() const;
bool enabled() const;
/*!
* \brief Calls the timeout handler for this timeout.
*
* This function should be called when the timeout occurs.
*
* If this function returns FALSE, then there wasn't enough memory to handle
* the timeout. Typically just letting the timeout fire again next time it
* naturally times out is an adequate response to that problem, but you could
* try to do more if you wanted.
*
* return false If there wasn't enough memory.
*/
bool handle();
virtual void toggle() = 0;
private:
DXXAPILOCAL Timeout(const Timeout &);
private:
Internal *_int;
};
class DXXAPI Watch
{
public:
class Internal;
Watch(Internal *i);
virtual ~Watch(){}
/*!
* \brief A main loop could poll this descriptor to integrate dbus-c++.
*
* This function calls dbus_watch_get_socket() on win32 and
* dbus_watch_get_unix_fd() on all other systems. (see dbus documentation)
*
* @return The file descriptor.
*/
int descriptor() const;
/*!
* \brief Gets flags from DBusWatchFlags indicating what conditions should be
* monitored on the file descriptor.
*
* The flags returned will only contain DBUS_WATCH_READABLE and DBUS_WATCH_WRITABLE,
* never DBUS_WATCH_HANGUP or DBUS_WATCH_ERROR; all watches implicitly include
* a watch for hangups, errors, and other exceptional conditions.
*
* @return The conditions to watch.
*/
int flags() const;
bool enabled() const;
/*!
* \brief Called to notify the D-Bus library when a previously-added watch
* is ready for reading or writing, or has an exception such as a hangup.
*
* If this function returns FALSE, then the file descriptor may still be
* ready for reading or writing, but more memory is needed in order to do the
* reading or writing. If you ignore the FALSE return, your application may
* spin in a busy loop on the file descriptor until memory becomes available,
* but nothing more catastrophic should happen.
*
* dbus_watch_handle() cannot be called during the DBusAddWatchFunction, as the
* connection will not be ready to handle that watch yet.
*
* It is not allowed to reference a DBusWatch after it has been passed to remove_function.
*
* @param flags The poll condition using DBusWatchFlags values.
* @return false If there wasn't enough memory.
*/
bool handle(int flags);
virtual void toggle() = 0;
private:
DXXAPILOCAL Watch(const Watch &);
private:
Internal *_int;
};
class DXXAPI Dispatcher
{
public:
virtual ~Dispatcher()
{}
void queue_connection(Connection::Private *);
void dispatch_pending();
bool has_something_to_dispatch();
virtual void enter() = 0;
virtual void leave() = 0;
virtual Timeout *add_timeout(Timeout::Internal *) = 0;
virtual void rem_timeout(Timeout *) = 0;
virtual Watch *add_watch(Watch::Internal *) = 0;
virtual void rem_watch(Watch *) = 0;
struct Private;
private:
DefaultMutex _mutex_p;
Connection::PrivatePList _pending_queue;
};
extern DXXAPI Dispatcher *default_dispatcher;
/* classes for multithreading support
*/
class DXXAPI Mutex
{
public:
virtual ~Mutex() {}
virtual void lock() = 0;
virtual void unlock() = 0;
struct Internal;
protected:
Internal *_int;
};
class DXXAPI CondVar
{
public:
virtual ~CondVar() {}
virtual void wait(Mutex *) = 0;
virtual bool wait_timeout(Mutex *, int timeout) = 0;
virtual void wake_one() = 0;
virtual void wake_all() = 0;
struct Internal;
protected:
Internal *_int;
};
typedef Mutex *(*MutexNewFn)();
typedef void (*MutexUnlockFn)(Mutex *mx);
#ifndef DBUS_HAS_RECURSIVE_MUTEX
typedef bool (*MutexFreeFn)(Mutex *mx);
typedef bool (*MutexLockFn)(Mutex *mx);
#else
typedef void (*MutexFreeFn)(Mutex *mx);
typedef void (*MutexLockFn)(Mutex *mx);
#endif//DBUS_HAS_RECURSIVE_MUTEX
typedef CondVar *(*CondVarNewFn)();
typedef void (*CondVarFreeFn)(CondVar *cv);
typedef void (*CondVarWaitFn)(CondVar *cv, Mutex *mx);
typedef bool (*CondVarWaitTimeoutFn)(CondVar *cv, Mutex *mx, int timeout);
typedef void (*CondVarWakeOneFn)(CondVar *cv);
typedef void (*CondVarWakeAllFn)(CondVar *cv);
void DXXAPI _init_threading();
void DXXAPI _init_threading(
MutexNewFn, MutexFreeFn, MutexLockFn, MutexUnlockFn,
CondVarNewFn, CondVarFreeFn, CondVarWaitFn, CondVarWaitTimeoutFn, CondVarWakeOneFn, CondVarWakeAllFn
);
template<class Mx, class Cv>
struct Threading
{
static void init()
{
_init_threading(
mutex_new, mutex_free, mutex_lock, mutex_unlock,
condvar_new, condvar_free, condvar_wait, condvar_wait_timeout, condvar_wake_one, condvar_wake_all
);
}
static Mutex *mutex_new()
{
return new Mx;
}
static void mutex_free(Mutex *mx)
{
delete mx;
}
static void mutex_lock(Mutex *mx)
{
mx->lock();
}
static void mutex_unlock(Mutex *mx)
{
mx->unlock();
}
static CondVar *condvar_new()
{
return new Cv;
}
static void condvar_free(CondVar *cv)
{
delete cv;
}
static void condvar_wait(CondVar *cv, Mutex *mx)
{
cv->wait(mx);
}
static bool condvar_wait_timeout(CondVar *cv, Mutex *mx, int timeout)
{
return cv->wait_timeout(mx, timeout);
}
static void condvar_wake_one(CondVar *cv)
{
cv->wake_one();
}
static void condvar_wake_all(CondVar *cv)
{
cv->wake_all();
}
};
} /* namespace DBus */
#endif//__DBUSXX_DISPATCHER_H
/*
*
* D-Bus++ - C++ bindings for D-Bus
*
* Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com>
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#ifndef __DBUSXX_ECORE_INTEGRATION_H
#define __DBUSXX_ECORE_INTEGRATION_H
#include <Ecore.h>
#include "api.h"
#include "dispatcher.h"
#include "Ecore.h"
namespace DBus {
namespace Ecore {