diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2007-09-25 19:29:11 +0000 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2007-09-25 19:29:11 +0000 |
commit | e13c4d2146bf81f24e22048ed81da17a3abe1452 (patch) | |
tree | 93bba2f883b526850e7f0624cb42ec225550b704 | |
parent | cd911ed48753313a8faf0914cfc280a3379947fe (diff) |
Hook up the locally built stubs for Renaming and use them instead of the ones in tp-glib-unstable
-rw-r--r-- | Makefile.am | 3 | ||||
-rw-r--r-- | autogen.sh | 27 | ||||
-rw-r--r-- | configure.ac | 25 | ||||
-rw-r--r-- | src/Makefile.am | 5 | ||||
-rw-r--r-- | src/idle-connection.c | 17 |
5 files changed, 61 insertions, 16 deletions
diff --git a/Makefile.am b/Makefile.am index ac1b1f2..ca6f8a7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,3 @@ ACLOCAL_AMFLAGS = -I m4 -SUBDIRS = src data m4 tests - +SUBDIRS = extensions src data m4 tests diff --git a/autogen.sh b/autogen.sh new file mode 100644 index 0000000..f84b784 --- /dev/null +++ b/autogen.sh @@ -0,0 +1,27 @@ +#!/bin/sh +set -e + +if test -z "$MAKE" +then + MAKE=make +fi + +( cd extensions && \ + TOP_SRCDIR=.. sh tools/update-spec-gen-am.sh _gen/spec-gen.am _gen ) + +autoreconf -i + +run_configure=true +for arg in $*; do + case $arg in + --no-configure) + run_configure=false + ;; + *) + ;; + esac +done + +if test $run_configure = true; then + ./configure "$@" +fi diff --git a/configure.ac b/configure.ac index a20ff17..65aa682 100644 --- a/configure.ac +++ b/configure.ac @@ -66,11 +66,7 @@ dnl ]) AC_SUBST(SOFIA_CFLAGS) AC_SUBST(SOFIA_LIBS) -dnl Check for telepathy-glib. Use -unstable to get the Renaming interface, -dnl if telepathy-glib is a version where that's necessary. -PKG_CHECK_EXISTS([telepathy-glib > 0.5.9], - [PKG_CHECK_MODULES(TELEPATHY, [telepathy-glib telepathy-glib-unstable])], - [PKG_CHECK_MODULES(TELEPATHY, [telepathy-glib >= 0.5.8])]) +PKG_CHECK_MODULES(TELEPATHY, [telepathy-glib >= 0.5.8]) AC_SUBST(TELEPATHY_CFLAGS) AC_SUBST(TELEPATHY_LIBS) @@ -81,6 +77,23 @@ PKG_CHECK_MODULES(OPENSSL, [openssl >= 0.9.7]) AC_SUBST(OPENSSL_CFLAGS) AC_SUBST(OPENSSL_LIBS) +dnl Check for code generation tools +XSLTPROC= +AC_CHECK_PROGS([XSLTPROC], [xsltproc]) +if test -z "$XSLTPROC"; then + AC_MSG_ERROR([xsltproc (from the libxslt source package) is required]) +fi +DBUS_BINDING_TOOL= +AC_CHECK_PROGS([DBUS_BINDING_TOOL], [dbus-binding-tool]) +if test -z "$DBUS_BINDING_TOOL"; then + AC_MSG_ERROR([dbus-binding-tool (from dbus-glib) is required]) +fi +PYTHON= +AC_CHECK_PROGS([PYTHON], [python2.3 python2.4 python2.5 python]) +if test -z "$PYTHON"; then + AC_MSG_ERROR([Python is required to compile this package]) +fi + AS_AC_EXPAND(DATADIR, $datadir) DBUS_SERVICES_DIR="$DATADIR/dbus-1/services" AC_SUBST(DBUS_SERVICES_DIR) @@ -88,6 +101,8 @@ AC_DEFINE_UNQUOTED(DBUS_SERVICES_DIR, "$DBUS_SERVICES_DIR", [DBus services direc AC_OUTPUT( Makefile \ data/Makefile \ + extensions/Makefile \ + extensions/tools/Makefile \ m4/Makefile \ src/Makefile \ tests/Makefile \ diff --git a/src/Makefile.am b/src/Makefile.am index 2ad16c2..9fb6a5d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -46,7 +46,10 @@ libidle_convenience_la_SOURCES = \ telepathy_idle_SOURCES = \ idle.c -telepathy_idle_LDADD = libidle-convenience.la @TELEPATHY_LIBS@ +telepathy_idle_LDADD = \ + libidle-convenience.la \ + ../extensions/libidle-extensions.la \ + @TELEPATHY_LIBS@ noinst_LTLIBRARIES = libidle-convenience.la diff --git a/src/idle-connection.c b/src/idle-connection.c index 07db93c..0dce044 100644 --- a/src/idle-connection.c +++ b/src/idle-connection.c @@ -31,7 +31,6 @@ #include <telepathy-glib/errors.h> #include <telepathy-glib/dbus.h> #include <telepathy-glib/svc-connection.h> -#include <telepathy-glib/svc-unstable.h> #include <telepathy-glib/channel-factory-iface.h> #include <stdio.h> @@ -70,6 +69,8 @@ #define IDLE_DEBUG_FLAG IDLE_DEBUG_CONNECTION #include "idle-debug.h" +#include "extensions/extensions.h" /* Renaming */ + /* From RFC 2813 : * This in essence means that the client may send one (1) message every * two (2) seconds without being adversely affected. Services MAY also @@ -92,7 +93,7 @@ static void _renaming_iface_init(gpointer, gpointer); G_DEFINE_TYPE_WITH_CODE(IdleConnection, idle_connection, TP_TYPE_BASE_CONNECTION, G_IMPLEMENT_INTERFACE(TP_TYPE_SVC_CONNECTION_INTERFACE_ALIASING, _aliasing_iface_init); - G_IMPLEMENT_INTERFACE(TP_TYPE_SVC_CONNECTION_INTERFACE_RENAMING, _renaming_iface_init)); + G_IMPLEMENT_INTERFACE(IDLE_TYPE_SVC_CONNECTION_INTERFACE_RENAMING, _renaming_iface_init)); typedef struct _IdleOutputPendingMsg IdleOutputPendingMsg; struct _IdleOutputPendingMsg { @@ -339,7 +340,7 @@ static void idle_connection_class_init (IdleConnectionClass *klass) { GParamSpec *param_spec; static const gchar *interfaces_always_present[] = { TP_IFACE_CONNECTION_INTERFACE_ALIASING, - TP_IFACE_CONNECTION_INTERFACE_RENAMING, + IDLE_IFACE_CONNECTION_INTERFACE_RENAMING, NULL}; g_type_class_add_private(klass, sizeof(IdleConnectionPrivate)); @@ -708,7 +709,7 @@ static IdleParserHandlerResult _nick_handler(IdleParser *parser, IdleParserMessa tp_handle_ref(handles, new_handle); } - tp_svc_connection_interface_renaming_emit_renamed(TP_SVC_CONNECTION_INTERFACE_RENAMING(conn), old_handle, new_handle); + idle_svc_connection_interface_renaming_emit_renamed(IDLE_SVC_CONNECTION_INTERFACE_RENAMING(conn), old_handle, new_handle); idle_connection_emit_queued_aliases_changed(conn); @@ -937,11 +938,11 @@ static gboolean _send_rename_request(IdleConnection *obj, const gchar *nick, DBu return TRUE; } -static void idle_connection_request_rename(TpSvcConnectionInterfaceRenaming *iface, const gchar *nick, DBusGMethodInvocation *context) { +static void idle_connection_request_rename(IdleSvcConnectionInterfaceRenaming *iface, const gchar *nick, DBusGMethodInvocation *context) { IdleConnection *conn = IDLE_CONNECTION(iface); if (_send_rename_request(conn, nick, context)) - tp_svc_connection_interface_renaming_return_from_request_rename(context); + idle_svc_connection_interface_renaming_return_from_request_rename(context); } static void idle_connection_set_aliases(TpSvcConnectionInterfaceAliasing *iface, GHashTable *aliases, DBusGMethodInvocation *context) { @@ -1027,9 +1028,9 @@ static void _aliasing_iface_init(gpointer g_iface, gpointer iface_data) { } static void _renaming_iface_init(gpointer g_iface, gpointer iface_data) { - TpSvcConnectionInterfaceRenamingClass *klass = (TpSvcConnectionInterfaceRenamingClass *) g_iface; + IdleSvcConnectionInterfaceRenamingClass *klass = (IdleSvcConnectionInterfaceRenamingClass *) g_iface; -#define IMPLEMENT(x) tp_svc_connection_interface_renaming_implement_##x (\ +#define IMPLEMENT(x) idle_svc_connection_interface_renaming_implement_##x (\ klass, idle_connection_##x) IMPLEMENT(request_rename); #undef IMPLEMENT |