Hello community,
here is the log from the commit of package bluez-gnome
checked in at Thu Oct 16 14:23:45 CEST 2008.
--------
--- GNOME/bluez-gnome/bluez-gnome.changes 2008-10-03 07:58:44.000000000 +0200
+++ /mounts/work_src_done/STABLE/bluez-gnome/bluez-gnome.changes 2008-10-14 23:30:05.000000000 +0200
@@ -1,0 +2,7 @@
+Wed Oct 15 08:28:16 EST 2008 - mboman@suse.de
+
+- Update to version 1.8:
+ + Add additional support for using obex-client.
+ + Make mice and keyboards automatically trusted.
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
bluez-gnome-1.7.tar.bz2
New:
----
bluez-gnome-1.8.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ bluez-gnome.spec ++++++
--- /var/tmp/diff_new_pack.e25850/_old 2008-10-16 14:23:15.000000000 +0200
+++ /var/tmp/diff_new_pack.e25850/_new 2008-10-16 14:23:15.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package bluez-gnome (Version 1.7)
+# spec file for package bluez-gnome (Version 1.8)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -34,7 +34,7 @@
License: GPL v2 or later
Group: System/GUI/GNOME
AutoReqProv: on
-Version: 1.7
+Version: 1.8
Release: 1
Summary: Bluetooth helpers for GNOME
Source: %{name}-%{version}.tar.bz2
@@ -119,6 +119,10 @@
%files lang -f bluetooth-manager.lang
%changelog
+* Wed Oct 15 2008 mboman@suse.de
+- Update to version 1.8:
+ + Add additional support for using obex-client.
+ + Make mice and keyboards automatically trusted.
* Fri Oct 03 2008 mboman@suse.de
- Update to version 1.7:
+ Add support for HAL enabled kill switches.
@@ -127,14 +131,14 @@
+ Add activation menu with option to setup devices.
+ Use the Icon property for device type icons.
+ Use the Alias property for device names.
-* Tue Sep 30 2008 mboman@suse.de
+* Mon Sep 29 2008 mboman@suse.de
- Update to version 1.5:
+ Use GIO to normalize pathnames.
+ Fix getting name of remote devices.
+ Write "time left" in human readable terms.
* Tue Sep 16 2008 dmueller@suse.de
- adjust bluez requires
-* Tue Sep 16 2008 jpr@suse.de
+* Mon Sep 15 2008 jpr@suse.de
- Update to 1.4 for bluez 4.x
Use longer D-Bus timeout for device creation.
Add Simple Pairing support to the wizard.
@@ -152,14 +156,14 @@
Fix device status display in selection lists.
Enable bluetooth-sendto application.
Enable bluetooth-wizard application.
-* Mon Sep 01 2008 ro@suse.de
+* Sun Aug 31 2008 ro@suse.de
- for 11.0, require gvfs-backends instead of gnome-vfs-obexftp
-* Wed Aug 13 2008 captain.magnus@opensuse.org
+* Tue Aug 12 2008 captain.magnus@opensuse.org
- Update to version 0.28
+ Import translations from Ubuntu Rosetta.
+ Add selected device name property.
+ Hide filters box when not needed.
-* Thu Jul 03 2008 jpr@suse.de
+* Wed Jul 02 2008 jpr@suse.de
- Update to version 0.27
* Improve the handling of error messages.
* Make the display of service names translatable.
@@ -170,7 +174,7 @@
* Update user interface of sendto application.
* Move analyzer application to the system category.
* Translation updates
-* Tue Mar 18 2008 jpr@suse.de
+* Mon Mar 17 2008 jpr@suse.de
- Update to version 0.25
Remove signal handlers when no longer needed.
Show OBEX errors and close server on failure.
@@ -179,7 +183,7 @@
Fix setting filter properties in the device selection widget.
Fix missing assignment of filter labels.
Show all the possibly known devices.
-* Tue Mar 04 2008 jpr@suse.de
+* Mon Mar 03 2008 jpr@suse.de
- Update to version 0.23
Update for obex-data-server version 0.3 API.
Allow translation of the sendto application.
@@ -204,7 +208,7 @@
Make notification library a requirement.
Enable sendto application.
Updated translations
-* Fri Feb 01 2008 rodrigo@suse.de
+* Thu Jan 31 2008 rodrigo@suse.de
- Update to version 0.15:
* Use buttons in notification popups
* Use CreateSecureDevice for input device setup
@@ -213,7 +217,7 @@
* Enable singleton support
* Update device selection widget
* Make tooltips HIG compliant
-* Thu Nov 08 2007 jpr@suse.de
+* Wed Nov 07 2007 jpr@suse.de
- Require bluez-utils (#339906)
* Thu Oct 25 2007 jpr@suse.de
- Upgrade to 0.14
@@ -247,13 +251,13 @@
- Use gconf macros
* Thu Jun 21 2007 sbrabec@suse.cz
- Support for turning Bluetooth on by GUI (#226137).
-* Mon Mar 12 2007 stbinner@suse.de
+* Sun Mar 11 2007 stbinner@suse.de
- fix build (/etc/xdg/autostart ownership)
-* Thu Jan 11 2007 sbrabec@suse.cz
+* Wed Jan 10 2007 sbrabec@suse.cz
- Some specfile cleanup.
* Thu Nov 30 2006 sbrabec@suse.cz
- Build correctly in older products.
* Tue Nov 14 2006 sbrabec@suse.cz
- Updated to version 0.6 (#220551).
-* Tue Oct 17 2006 jhargadon@suse.de
+* Mon Oct 16 2006 jhargadon@suse.de
- initial submission of package
++++++ bluez-gnome-1.7.tar.bz2 -> bluez-gnome-1.8.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bluez-gnome-1.7/ChangeLog new/bluez-gnome-1.8/ChangeLog
--- old/bluez-gnome-1.7/ChangeLog 2008-09-30 06:25:59.000000000 +0200
+++ new/bluez-gnome-1.8/ChangeLog 2008-10-04 21:32:56.000000000 +0200
@@ -1,3 +1,7 @@
+ver 1.8:
+ Add additional support for using obex-client.
+ Make mice and keyboards automatically trusted.
+
ver 1.7:
Add support for HAL enabled kill switches.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bluez-gnome-1.7/common/bluetooth-client.c new/bluez-gnome-1.8/common/bluetooth-client.c
--- old/bluez-gnome-1.7/common/bluetooth-client.c 2008-09-29 14:08:50.000000000 +0200
+++ new/bluez-gnome-1.8/common/bluetooth-client.c 2008-10-04 21:32:56.000000000 +0200
@@ -1021,6 +1021,35 @@
return TRUE;
}
+gboolean bluetooth_client_set_trusted(BluetoothClient *client,
+ const char *device, gboolean trusted)
+{
+ BluetoothClientPrivate *priv = BLUETOOTH_CLIENT_GET_PRIVATE(client);
+ DBusGProxy *proxy;
+ GValue value = { 0 };
+
+ DBG("client %p", client);
+
+ proxy = dbus_g_proxy_new_from_proxy(priv->manager,
+ BLUEZ_DEVICE_INTERFACE, device);
+ if (proxy == NULL)
+ return FALSE;
+
+ g_value_init(&value, G_TYPE_BOOLEAN);
+ g_value_set_boolean(&value, trusted);
+
+ dbus_g_proxy_call(proxy, "SetProperty", NULL,
+ G_TYPE_STRING, "Trusted",
+ G_TYPE_VALUE, &value,
+ G_TYPE_INVALID, G_TYPE_INVALID);
+
+ g_value_unset(&value);
+
+ g_object_unref(proxy);
+
+ return TRUE;
+}
+
typedef struct {
BluetoothClientConnectFunc func;
gpointer data;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bluez-gnome-1.7/common/bluetooth-client.h new/bluez-gnome-1.8/common/bluetooth-client.h
--- old/bluez-gnome-1.7/common/bluetooth-client.h 2008-09-29 14:08:50.000000000 +0200
+++ new/bluez-gnome-1.8/common/bluetooth-client.h 2008-10-04 21:32:56.000000000 +0200
@@ -79,6 +79,9 @@
const char *address, const char *agent,
BluetoothClientCreateDeviceFunc func, gpointer data);
+gboolean bluetooth_client_set_trusted(BluetoothClient *client,
+ const char *device, gboolean trusted);
+
typedef void (*BluetoothClientConnectFunc) (gpointer data);
gboolean bluetooth_client_connect_input(BluetoothClient *client,
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bluez-gnome-1.7/common/Makefile.am new/bluez-gnome-1.8/common/Makefile.am
--- old/bluez-gnome-1.7/common/Makefile.am 2008-08-24 23:14:24.000000000 +0200
+++ new/bluez-gnome-1.8/common/Makefile.am 2008-10-04 21:32:56.000000000 +0200
@@ -2,16 +2,18 @@
noinst_LIBRARIES = libcommon.a
libcommon_a_SOURCES = helper.h helper.c \
+ bluetooth-instance.h bluetooth-instance.c \
bluetooth-client.h bluetooth-client.c \
bluetooth-agent.h bluetooth-agent.c \
- bluetooth-instance.h bluetooth-instance.c
+ obex-agent.h obex-agent.c
AM_CFLAGS = @DBUS_CFLAGS@ @GTK_CFLAGS@
BUILT_SOURCES = marshal.h marshal.c \
+ bluetooth-instance-glue.h \
bluetooth-client-glue.h \
bluetooth-agent-glue.h \
- bluetooth-instance-glue.h
+ obex-agent-glue.h
nodist_libcommon_a_SOURCES = $(BUILT_SOURCES)
@@ -24,9 +26,10 @@
test_agent_LDADD = libcommon.a @DBUS_LIBS@
EXTRA_DIST = marshal.list \
+ bluetooth-instance.xml \
bluetooth-client.xml \
bluetooth-agent.xml \
- bluetooth-instance.xml
+ obex-agent.xml
MAINTAINERCLEANFILES = Makefile.in
@@ -36,11 +39,14 @@
marshal.c: marshal.list
$(GLIB_GENMARSHAL) --prefix=marshal $< --body > $@
+bluetooth-instance-glue.h: bluetooth-instance.xml
+ $(DBUS_BINDING_TOOL) --prefix=bluetooth_instance --mode=glib-server --output=$@ $<
+
bluetooth-client-glue.h: bluetooth-client.xml
$(DBUS_BINDING_TOOL) --prefix=bluetooth_client --mode=glib-client --output=$@ $<
bluetooth-agent-glue.h: bluetooth-agent.xml
$(DBUS_BINDING_TOOL) --prefix=bluetooth_agent --mode=glib-server --output=$@ $<
-bluetooth-instance-glue.h: bluetooth-instance.xml
- $(DBUS_BINDING_TOOL) --prefix=bluetooth_instance --mode=glib-server --output=$@ $<
+obex-agent-glue.h: obex-agent.xml
+ $(DBUS_BINDING_TOOL) --prefix=obex_agent --mode=glib-server --output=$@ $<
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bluez-gnome-1.7/common/Makefile.in new/bluez-gnome-1.8/common/Makefile.in
--- old/bluez-gnome-1.7/common/Makefile.in 2008-09-30 06:26:24.000000000 +0200
+++ new/bluez-gnome-1.8/common/Makefile.in 2008-10-04 21:33:12.000000000 +0200
@@ -47,8 +47,9 @@
ARFLAGS = cru
libcommon_a_AR = $(AR) $(ARFLAGS)
libcommon_a_LIBADD =
-am_libcommon_a_OBJECTS = helper.$(OBJEXT) bluetooth-client.$(OBJEXT) \
- bluetooth-agent.$(OBJEXT) bluetooth-instance.$(OBJEXT)
+am_libcommon_a_OBJECTS = helper.$(OBJEXT) bluetooth-instance.$(OBJEXT) \
+ bluetooth-client.$(OBJEXT) bluetooth-agent.$(OBJEXT) \
+ obex-agent.$(OBJEXT)
am__objects_1 = marshal.$(OBJEXT)
nodist_libcommon_a_OBJECTS = $(am__objects_1)
libcommon_a_OBJECTS = $(am_libcommon_a_OBJECTS) \
@@ -224,24 +225,27 @@
top_srcdir = @top_srcdir@
noinst_LIBRARIES = libcommon.a
libcommon_a_SOURCES = helper.h helper.c \
+ bluetooth-instance.h bluetooth-instance.c \
bluetooth-client.h bluetooth-client.c \
bluetooth-agent.h bluetooth-agent.c \
- bluetooth-instance.h bluetooth-instance.c
+ obex-agent.h obex-agent.c
AM_CFLAGS = @DBUS_CFLAGS@ @GTK_CFLAGS@
BUILT_SOURCES = marshal.h marshal.c \
+ bluetooth-instance-glue.h \
bluetooth-client-glue.h \
bluetooth-agent-glue.h \
- bluetooth-instance-glue.h
+ obex-agent-glue.h
nodist_libcommon_a_SOURCES = $(BUILT_SOURCES)
CLEANFILES = $(BUILT_SOURCES)
test_client_LDADD = libcommon.a @GTK_LIBS@ @DBUS_LIBS@
test_agent_LDADD = libcommon.a @DBUS_LIBS@
EXTRA_DIST = marshal.list \
+ bluetooth-instance.xml \
bluetooth-client.xml \
bluetooth-agent.xml \
- bluetooth-instance.xml
+ obex-agent.xml
MAINTAINERCLEANFILES = Makefile.in
all: $(BUILT_SOURCES)
@@ -306,6 +310,7 @@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bluetooth-instance.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/helper.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/marshal.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/obex-agent.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-agent.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-client.Po@am__quote@
@@ -509,14 +514,17 @@
marshal.c: marshal.list
$(GLIB_GENMARSHAL) --prefix=marshal $< --body > $@
+bluetooth-instance-glue.h: bluetooth-instance.xml
+ $(DBUS_BINDING_TOOL) --prefix=bluetooth_instance --mode=glib-server --output=$@ $<
+
bluetooth-client-glue.h: bluetooth-client.xml
$(DBUS_BINDING_TOOL) --prefix=bluetooth_client --mode=glib-client --output=$@ $<
bluetooth-agent-glue.h: bluetooth-agent.xml
$(DBUS_BINDING_TOOL) --prefix=bluetooth_agent --mode=glib-server --output=$@ $<
-bluetooth-instance-glue.h: bluetooth-instance.xml
- $(DBUS_BINDING_TOOL) --prefix=bluetooth_instance --mode=glib-server --output=$@ $<
+obex-agent-glue.h: obex-agent.xml
+ $(DBUS_BINDING_TOOL) --prefix=obex_agent --mode=glib-server --output=$@ $<
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bluez-gnome-1.7/common/obex-agent.c new/bluez-gnome-1.8/common/obex-agent.c
--- old/bluez-gnome-1.7/common/obex-agent.c 1970-01-01 01:00:00.000000000 +0100
+++ new/bluez-gnome-1.8/common/obex-agent.c 2008-10-04 21:32:56.000000000 +0200
@@ -0,0 +1,310 @@
+/*
+ *
+ * BlueZ - Bluetooth protocol stack for Linux
+ *
+ * Copyright (C) 2005-2008 Marcel Holtmann
+ *
+ *
+ * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include
+#endif
+
+#include
+#include
+#include
+
+#include "obex-agent.h"
+
+#ifdef DEBUG
+#define DBG(fmt, arg...) printf("%s:%s() " fmt "\n", __FILE__, __FUNCTION__ , ## arg)
+#else
+#define DBG(fmt...)
+#endif
+
+#define OBEX_SERVICE "org.openobex.client"
+
+#define OBEX_CLIENT_PATH "/"
+#define OBEX_CLIENT_INTERFACE "org.openobex.Client"
+#define OBEX_TRANSFER_INTERFACE "org.openobex.Transfer"
+
+static DBusGConnection *connection = NULL;
+
+#define OBEX_AGENT_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), \
+ OBEX_TYPE_AGENT, ObexAgentPrivate))
+
+typedef struct _ObexAgentPrivate ObexAgentPrivate;
+
+struct _ObexAgentPrivate {
+ gchar *busname;
+ gchar *path;
+
+ ObexAgentReleaseFunc release_func;
+ gpointer release_data;
+
+ ObexAgentRequestFunc request_func;
+ gpointer request_data;
+
+ ObexAgentProgressFunc progress_func;
+ gpointer progress_data;
+
+ ObexAgentCompleteFunc complete_func;
+ gpointer complete_data;
+};
+
+G_DEFINE_TYPE(ObexAgent, obex_agent, G_TYPE_OBJECT)
+
+static gboolean obex_agent_request(ObexAgent *agent, const char *path,
+ DBusGMethodInvocation *context)
+{
+ ObexAgentPrivate *priv = OBEX_AGENT_GET_PRIVATE(agent);
+ const char *sender = dbus_g_method_get_sender(context);
+ gboolean result = FALSE;
+
+ DBG("agent %p sender %s", agent, sender);
+
+ if (g_str_equal(sender, priv->busname) == FALSE)
+ return FALSE;
+
+ if (priv->request_func) {
+ DBusGProxy *proxy;
+
+ proxy = dbus_g_proxy_new_for_name(connection, OBEX_SERVICE,
+ path, OBEX_TRANSFER_INTERFACE);
+
+ result = priv->request_func(context, proxy,
+ priv->request_data);
+
+ g_object_unref(proxy);
+ } else
+ dbus_g_method_return(context, "");
+
+ return TRUE;
+}
+
+static gboolean obex_agent_progress(ObexAgent *agent, const char *path,
+ guint64 transferred, DBusGMethodInvocation *context)
+{
+ ObexAgentPrivate *priv = OBEX_AGENT_GET_PRIVATE(agent);
+ const char *sender = dbus_g_method_get_sender(context);
+ gboolean result = FALSE;
+
+ DBG("agent %p sender %s", agent, sender);
+
+ if (g_str_equal(sender, priv->busname) == FALSE)
+ return FALSE;
+
+ if (priv->progress_func) {
+ DBusGProxy *proxy;
+
+ proxy = dbus_g_proxy_new_for_name(connection, OBEX_SERVICE,
+ path, OBEX_TRANSFER_INTERFACE);
+
+ result = priv->progress_func(context, proxy, transferred,
+ priv->progress_data);
+
+ g_object_unref(proxy);
+ } else
+ dbus_g_method_return(context);
+
+ return result;
+}
+
+static gboolean obex_agent_complete(ObexAgent *agent, const char *path,
+ DBusGMethodInvocation *context)
+{
+ ObexAgentPrivate *priv = OBEX_AGENT_GET_PRIVATE(agent);
+ const char *sender = dbus_g_method_get_sender(context);
+ gboolean result = FALSE;
+
+ DBG("agent %p sender %s", agent, sender);
+
+ if (g_str_equal(sender, priv->busname) == FALSE)
+ return FALSE;
+
+ if (priv->complete_func) {
+ DBusGProxy *proxy;
+
+ proxy = dbus_g_proxy_new_for_name(connection, OBEX_SERVICE,
+ path, OBEX_TRANSFER_INTERFACE);
+
+ result = priv->complete_func(context, proxy,
+ priv->complete_data);
+
+ g_object_unref(proxy);
+ } else
+ dbus_g_method_return(context);
+
+ return result;
+}
+
+static gboolean obex_agent_release(ObexAgent *agent,
+ DBusGMethodInvocation *context)
+{
+ ObexAgentPrivate *priv = OBEX_AGENT_GET_PRIVATE(agent);
+ const char *sender = dbus_g_method_get_sender(context);
+ gboolean result = FALSE;
+
+ DBG("agent %p sender %s", agent, sender);
+
+ if (g_str_equal(sender, priv->busname) == FALSE)
+ return FALSE;
+
+ if (priv->release_func)
+ result = priv->release_func(context, priv->release_data);
+ else
+ dbus_g_method_return(context);
+
+ g_object_unref(agent);
+
+ return result;
+}
+
+#include "obex-agent-glue.h"
+
+static void obex_agent_init(ObexAgent *agent)
+{
+ DBG("agent %p", agent);
+}
+
+static void obex_agent_finalize(GObject *agent)
+{
+ ObexAgentPrivate *priv = OBEX_AGENT_GET_PRIVATE(agent);
+
+ DBG("agent %p", agent);
+
+ g_free(priv->path);
+ g_free(priv->busname);
+
+ G_OBJECT_CLASS(obex_agent_parent_class)->finalize(agent);
+}
+
+static void obex_agent_class_init(ObexAgentClass *klass)
+{
+ GObjectClass *object_class = (GObjectClass *) klass;
+ GError *error = NULL;
+
+ DBG("class %p", klass);
+
+ g_type_class_add_private(klass, sizeof(ObexAgentPrivate));
+
+ object_class->finalize = obex_agent_finalize;
+
+ connection = dbus_g_bus_get(DBUS_BUS_SESSION, &error);
+
+ if (error != NULL) {
+ g_printerr("Connecting to session bus failed: %s\n",
+ error->message);
+ g_error_free(error);
+ }
+
+ dbus_g_object_type_install_info(OBEX_TYPE_AGENT,
+ &dbus_glib_obex_agent_object_info);
+
+ //dbus_g_error_domain_register(AGENT_ERROR, "org.openobex.Error",
+ // AGENT_ERROR_TYPE);
+}
+
+ObexAgent *obex_agent_new(void)
+{
+ ObexAgent *agent;
+
+ agent = OBEX_AGENT(g_object_new(OBEX_TYPE_AGENT, NULL));
+
+ DBG("agent %p", agent);
+
+ return agent;
+}
+
+gboolean obex_agent_setup(ObexAgent *agent, const char *path)
+{
+ ObexAgentPrivate *priv = OBEX_AGENT_GET_PRIVATE(agent);
+ DBusGProxy *proxy;
+ GObject *object;
+
+ DBG("agent %p path %s", agent, path);
+
+ if (priv->path != NULL)
+ return FALSE;
+
+ priv->path = g_strdup(path);
+
+ proxy = dbus_g_proxy_new_for_name_owner(connection, OBEX_SERVICE,
+ OBEX_CLIENT_PATH, OBEX_CLIENT_INTERFACE, NULL);
+
+ g_free(priv->busname);
+
+ if (proxy != NULL) {
+ priv->busname = g_strdup(dbus_g_proxy_get_bus_name(proxy));
+ g_object_unref(proxy);
+ } else
+ priv->busname = NULL;
+
+ object = dbus_g_connection_lookup_g_object(connection, priv->path);
+ if (object != NULL)
+ g_object_unref(object);
+
+ dbus_g_connection_register_g_object(connection,
+ priv->path, G_OBJECT(agent));
+
+ return TRUE;
+}
+
+void obex_agent_set_release_func(ObexAgent *agent,
+ ObexAgentReleaseFunc func, gpointer data)
+{
+ ObexAgentPrivate *priv = OBEX_AGENT_GET_PRIVATE(agent);
+
+ DBG("agent %p", agent);
+
+ priv->release_func = func;
+ priv->release_data = data;
+}
+
+void obex_agent_set_request_func(ObexAgent *agent,
+ ObexAgentRequestFunc func, gpointer data)
+{
+ ObexAgentPrivate *priv = OBEX_AGENT_GET_PRIVATE(agent);
+
+ DBG("agent %p", agent);
+
+ priv->request_func = func;
+ priv->request_data = data;
+}
+
+void obex_agent_set_progress_func(ObexAgent *agent,
+ ObexAgentProgressFunc func, gpointer data)
+{
+ ObexAgentPrivate *priv = OBEX_AGENT_GET_PRIVATE(agent);
+
+ DBG("agent %p", agent);
+
+ priv->progress_func = func;
+ priv->progress_data = data;
+}
+
+void obex_agent_set_complete_func(ObexAgent *agent,
+ ObexAgentCompleteFunc func, gpointer data)
+{
+ ObexAgentPrivate *priv = OBEX_AGENT_GET_PRIVATE(agent);
+
+ DBG("agent %p", agent);
+
+ priv->complete_func = func;
+ priv->complete_data = data;
+}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bluez-gnome-1.7/common/obex-agent.h new/bluez-gnome-1.8/common/obex-agent.h
--- old/bluez-gnome-1.7/common/obex-agent.h 1970-01-01 01:00:00.000000000 +0100
+++ new/bluez-gnome-1.8/common/obex-agent.h 2008-10-04 21:32:56.000000000 +0200
@@ -0,0 +1,82 @@
+/*
+ *
+ * BlueZ - Bluetooth protocol stack for Linux
+ *
+ * Copyright (C) 2005-2008 Marcel Holtmann
+ *
+ *
+ * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#ifndef __OBEX_AGENT_H
+#define __OBEX_AGENT_H
+
+#include
+#include
+
+G_BEGIN_DECLS
+
+#define OBEX_TYPE_AGENT (obex_agent_get_type())
+#define OBEX_AGENT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), \
+ OBEX_TYPE_AGENT, ObexAgent))
+#define OBEX_AGENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), \
+ OBEX_TYPE_AGENT, ObexAgentClass))
+#define OBEX_IS_AGENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), \
+ OBEX_TYPE_AGENT))
+#define OBEX_IS_AGENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), \
+ OBEX_TYPE_AGENT))
+#define OBEX_GET_AGENT_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), \
+ OBEX_TYPE_AGENT, ObexAgentClass))
+
+typedef struct _ObexAgent ObexAgent;
+typedef struct _ObexAgentClass ObexAgentClass;
+
+struct _ObexAgent {
+ GObject parent;
+};
+
+struct _ObexAgentClass {
+ GObjectClass parent_class;
+};
+
+GType obex_agent_get_type(void);
+
+ObexAgent *obex_agent_new(void);
+
+gboolean obex_agent_setup(ObexAgent *agent, const char *path);
+
+typedef gboolean (*ObexAgentReleaseFunc) (DBusGMethodInvocation *context,
+ gpointer data);
+typedef gboolean (*ObexAgentRequestFunc) (DBusGMethodInvocation *context,
+ DBusGProxy *transfer, gpointer data);
+typedef gboolean (*ObexAgentProgressFunc) (DBusGMethodInvocation *context,
+ DBusGProxy *transfer,
+ guint64 transferred, gpointer data);
+typedef gboolean (*ObexAgentCompleteFunc) (DBusGMethodInvocation *context,
+ DBusGProxy *transfer, gpointer data);
+
+void obex_agent_set_release_func(ObexAgent *agent,
+ ObexAgentReleaseFunc func, gpointer data);
+void obex_agent_set_request_func(ObexAgent *agent,
+ ObexAgentRequestFunc func, gpointer data);
+void obex_agent_set_progress_func(ObexAgent *agent,
+ ObexAgentProgressFunc func, gpointer data);
+void obex_agent_set_complete_func(ObexAgent *agent,
+ ObexAgentCompleteFunc func, gpointer data);
+
+G_END_DECLS
+
+#endif /* __OBEX_AGENT_H */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bluez-gnome-1.7/common/obex-agent.xml new/bluez-gnome-1.8/common/obex-agent.xml
--- old/bluez-gnome-1.7/common/obex-agent.xml 1970-01-01 01:00:00.000000000 +0100
+++ new/bluez-gnome-1.8/common/obex-agent.xml 2008-10-04 21:32:56.000000000 +0200
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<node name="/">
+ <interface name="org.openobex.Agent">
+ <method name="Request">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+ <arg type="o" name="transfer"/>
+ <arg type="s" name="name" direction="out"/>
+ </method>
+
+ <method name="Progress">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+ <arg type="o" name="transfer"/>
+ <arg type="t" name="transferred"/>
+ </method>
+
+ <method name="Complete">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+ <arg type="o" name="transfer"/>
+ </method>
+
+ <method name="Release">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+ </method>
+ </interface>
+</node>
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bluez-gnome-1.7/configure new/bluez-gnome-1.8/configure
--- old/bluez-gnome-1.7/configure 2008-09-30 06:26:27.000000000 +0200
+++ new/bluez-gnome-1.8/configure 2008-10-04 21:33:15.000000000 +0200
@@ -2168,7 +2168,7 @@
# Define the identity of the package.
PACKAGE=bluez-gnome
- VERSION=1.7
+ VERSION=1.8
cat >>confdefs.h <<_ACEOF
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bluez-gnome-1.7/configure.ac new/bluez-gnome-1.8/configure.ac
--- old/bluez-gnome-1.7/configure.ac 2008-09-30 06:25:59.000000000 +0200
+++ new/bluez-gnome-1.8/configure.ac 2008-10-04 21:32:56.000000000 +0200
@@ -1,7 +1,7 @@
AC_PREREQ(2.50)
AC_INIT()
-AM_INIT_AUTOMAKE(bluez-gnome, 1.7)
+AM_INIT_AUTOMAKE(bluez-gnome, 1.8)
AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bluez-gnome-1.7/sendto/main.c new/bluez-gnome-1.8/sendto/main.c
--- old/bluez-gnome-1.7/sendto/main.c 2008-09-27 04:57:05.000000000 +0200
+++ new/bluez-gnome-1.8/sendto/main.c 2008-10-04 21:32:56.000000000 +0200
@@ -33,11 +33,15 @@
#include
#include
+#include
-#include
+#include
+#include "helper.h"
#include "marshal.h"
+#define AGENT_PATH "/org/bluez/agent/sendto"
+
static DBusGConnection *conn = NULL;
static GtkWidget *dialog;
@@ -542,6 +546,123 @@
return name;
}
+static gboolean request_callback(DBusGMethodInvocation *context,
+ DBusGProxy *transfer, gpointer user_data)
+{
+ gchar *filename = option_files[file_index];
+ gchar *basename, *text, *markup;
+ GHashTable *hash;
+
+ if (dbus_g_proxy_call(transfer,
+ "GetProperties", NULL, G_TYPE_INVALID,
+ dbus_g_type_get_map("GHashTable",
+ G_TYPE_STRING, G_TYPE_VALUE),
+ &hash, G_TYPE_INVALID) == TRUE) {
+ GValue *value;
+
+ value = g_hash_table_lookup(hash, "Size");
+ if (value) {
+ current_size = g_value_get_uint64(value);
+
+ last_update = get_system_time();
+ }
+
+ g_hash_table_destroy(hash);
+ }
+
+ text = g_path_get_dirname(filename);
+ gtk_label_set_markup(GTK_LABEL(label_from), text);
+ g_free(text);
+
+ basename = g_path_get_basename(filename);
+ text = g_strdup_printf(_("Sending %s"), basename);
+ g_free(basename);
+ markup = g_markup_printf_escaped("<i>%s</i>", text);
+ gtk_label_set_markup(GTK_LABEL(label_status), markup);
+ g_free(markup);
+ g_free(text);
+
+ text = g_strdup_printf(_("Sending file %d of %d"),
+ file_index + 1, file_count);
+ gtk_progress_bar_set_text(GTK_PROGRESS_BAR(progress), text);
+ g_free(text);
+
+ dbus_g_method_return(context, "");
+
+ return TRUE;
+}
+
+static gboolean progress_callback(DBusGMethodInvocation *context,
+ DBusGProxy *transfer, guint64 transferred,
+ gpointer user_data)
+{
+ transfer_progress(NULL, transferred, NULL);
+
+ dbus_g_method_return(context);
+
+ return TRUE;
+}
+
+static gboolean complete_callback(DBusGMethodInvocation *context,
+ DBusGProxy *transfer, gpointer user_data)
+{
+ total_sent += current_size;
+
+ file_index++;
+
+ dbus_g_method_return(context);
+
+ return TRUE;
+}
+
+static gboolean release_callback(DBusGMethodInvocation *context,
+ gpointer user_data)
+{
+ dbus_g_method_return(context);
+
+ gtk_label_set_markup(GTK_LABEL(label_status), NULL);
+
+ gtk_widget_destroy(dialog);
+
+ gtk_main_quit();
+
+ return TRUE;
+}
+
+static void send_notify(DBusGProxy *proxy,
+ DBusGProxyCall *call, void *user_data)
+{
+ GError *error = NULL;
+
+ if (dbus_g_proxy_end_call(proxy, call, &error,
+ G_TYPE_INVALID) == FALSE) {
+ gchar *text, *message;
+
+ message = get_error_message(error);
+
+ text = g_strdup_printf("%s</span>",
+ message);
+ gtk_label_set_markup(GTK_LABEL(label_status), text);
+ g_free(text);
+
+ g_free(message);
+
+ gtk_dialog_set_response_sensitive(GTK_DIALOG(dialog),
+ GTK_RESPONSE_CLOSE, TRUE);
+ return;
+ }
+
+ gtk_progress_bar_set_text(GTK_PROGRESS_BAR(progress), NULL);
+
+ first_update = get_system_time();
+}
+
+static void value_free(GValue *value)
+{
+ g_value_unset(value);
+ g_free(value);
+}
+
static void name_owner_changed(DBusGProxy *proxy, const char *name,
const char *prev, const char *new, gpointer user_data)
{
@@ -652,19 +773,54 @@
create_window();
- proxy = dbus_g_proxy_new_for_name(conn, "org.openobex",
+ proxy = dbus_g_proxy_new_for_name_owner(conn, "org.openobex.client",
+ "/", "org.openobex.Client", NULL);
+
+ if (proxy == NULL) {
+ proxy = dbus_g_proxy_new_for_name(conn, "org.openobex",
"/org/openobex", "org.openobex.Manager");
- dbus_g_proxy_add_signal(proxy, "NameOwnerChanged",
- G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INVALID);
+ dbus_g_proxy_add_signal(proxy, "NameOwnerChanged",
+ G_TYPE_STRING, G_TYPE_STRING,
+ G_TYPE_STRING, G_TYPE_INVALID);
- dbus_g_proxy_connect_signal(proxy, "NameOwnerChanged",
+ dbus_g_proxy_connect_signal(proxy, "NameOwnerChanged",
G_CALLBACK(name_owner_changed), NULL, NULL);
- dbus_g_proxy_begin_call(proxy, "CreateBluetoothSession",
- create_notify, NULL, NULL,
- G_TYPE_STRING, option_device,
- G_TYPE_STRING, "opp", G_TYPE_INVALID);
+ dbus_g_proxy_begin_call(proxy, "CreateBluetoothSession",
+ create_notify, NULL, NULL,
+ G_TYPE_STRING, option_device,
+ G_TYPE_STRING, "opp", G_TYPE_INVALID);
+ } else {
+ GHashTable *hash = NULL;
+ GValue *value;
+ ObexAgent *agent;
+
+ agent = obex_agent_new();
+
+ obex_agent_set_release_func(agent, release_callback, NULL);
+ obex_agent_set_request_func(agent, request_callback, NULL);
+ obex_agent_set_progress_func(agent, progress_callback, NULL);
+ obex_agent_set_complete_func(agent, complete_callback, NULL);
+
+ obex_agent_setup(agent, AGENT_PATH);
+
+ hash = g_hash_table_new_full(g_str_hash, g_str_equal,
+ g_free, (GDestroyNotify) value_free);
+
+ value = g_new0(GValue, 1);
+ g_value_init(value, G_TYPE_STRING);
+ g_value_set_string(value, option_device);
+ g_hash_table_insert(hash, g_strdup("Destination"), value);
+
+ dbus_g_proxy_begin_call(proxy, "SendFiles",
+ send_notify, NULL, NULL,
+ dbus_g_type_get_map("GHashTable",
+ G_TYPE_STRING, G_TYPE_VALUE), hash,
+ G_TYPE_STRV, option_files,
+ DBUS_TYPE_G_OBJECT_PATH, AGENT_PATH,
+ G_TYPE_INVALID);
+ }
gtk_main();
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bluez-gnome-1.7/wizard/main.c new/bluez-gnome-1.8/wizard/main.c
--- old/bluez-gnome-1.7/wizard/main.c 2008-09-29 14:08:50.000000000 +0200
+++ new/bluez-gnome-1.8/wizard/main.c 2008-10-04 21:32:56.000000000 +0200
@@ -150,9 +150,11 @@
gtk_assistant_set_current_page(assistant, page + 1);
if (target_type == BLUETOOTH_TYPE_KEYBOARD ||
- target_type == BLUETOOTH_TYPE_MOUSE)
+ target_type == BLUETOOTH_TYPE_MOUSE) {
+ bluetooth_client_set_trusted(client, path, TRUE);
bluetooth_client_connect_input(client, path,
connect_callback, assistant);
+ }
complete = TRUE;
} else
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org