Mailinglist Archive: opensuse-commit (1177 mails)
| < Previous | Next > |
commit obex-data-server for openSUSE:Factory
- From: root@xxxxxxxxxxxxxxx (h_root)
- Date: Mon, 19 Jan 2009 02:13:10 +0100
- Message-id: <20090119011310.D2D046780A8@xxxxxxxxxxxxxxx>
Hello community,
here is the log from the commit of package obex-data-server for openSUSE:Factory
checked in at Mon Jan 19 02:13:10 CET 2009.
--------
--- obex-data-server/obex-data-server.changes 2008-10-27 15:56:45.000000000
+0100
+++ /mounts/work_src_done/STABLE/obex-data-server/obex-data-server.changes
2009-01-17 17:40:48.000000000 +0100
@@ -1,0 +2,8 @@
+Sat Jan 17 17:36:07 CET 2009 - tpatzig@xxxxxxx
+
+- Update to 0.4.2
+ * Implement RemoteCopy and RemoteMove methods in Session
+ * add more errors corresponding to OBEX responses
+ * fix for ARM build
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
obex-data-server-0.4.1.tar.bz2
New:
----
obex-data-server-0.4.2.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ obex-data-server.spec ++++++
--- /var/tmp/diff_new_pack.C21206/_old 2009-01-19 02:12:37.000000000 +0100
+++ /var/tmp/diff_new_pack.C21206/_new 2009-01-19 02:12:37.000000000 +0100
@@ -1,7 +1,7 @@
#
-# spec file for package obex-data-server (Version 0.4.1)
+# spec file for package obex-data-server (Version 0.4.2)
#
-# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -21,7 +21,7 @@
Name: obex-data-server
BuildRequires: dbus-1-glib-devel openobex-devel
Url: http://www.bluez.org
-Version: 0.4.1
+Version: 0.4.2
Release: 1
Summary: Obex DBus API
License: GPL v2 or later
@@ -71,6 +71,11 @@
%doc AUTHORS COPYING INSTALL ChangeLog dbus-api.txt NEWS
%changelog
+* Sat Jan 17 2009 tpatzig@xxxxxxx
+- Update to 0.4.2
+ * Implement RemoteCopy and RemoteMove methods in Session
+ * add more errors corresponding to OBEX responses
+ * fix for ARM build
* Sun Oct 26 2008 jpr@xxxxxxxxxx
- Update to 0.4.1, most importantly for bluez 4.x support
* Fix a race condition when client app misses
@@ -91,7 +96,7 @@
* Add manual page
* Properly close sockets for Session and ServerSession objects
- Drop obex-server-bluez-libs-CVE-2008-2374.diff, its upstream
-* Tue Sep 16 2008 ro@xxxxxxx
+* Wed Sep 17 2008 ro@xxxxxxx
- adapt CVE diff to bluez-4: function name back to original
len paramer now also in sdp_extract_pdu
* Thu Jul 03 2008 tpatzig@xxxxxxx
++++++ obex-data-server-0.4.1.tar.bz2 -> obex-data-server-0.4.2.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/obex-data-server-0.4.1/ChangeLog
new/obex-data-server-0.4.2/ChangeLog
--- old/obex-data-server-0.4.1/ChangeLog 2008-10-25 20:51:24.000000000
+0200
+++ new/obex-data-server-0.4.2/ChangeLog 2008-11-01 18:57:47.000000000
+0100
@@ -1,3 +1,46 @@
+====== obex-data-server-0.4.2 ======
+
+2008-11-01 Tadas Dailyda <tadas@xxxxxxxxxxx>
+
+ * dbus-api.txt:
+ * src/ods-error.c (ods_error_get_type), (ods_error_err2gerror),
+ (ods_error_obexrsp2gerror):
+ * src/ods-error.h:
+ * src/ods-session.c (obex_request_done),
+ (ods_session_remote_action), (ods_session_remote_copy),
+ (ods_session_remote_move):
+ Implement RemoteCopy and RemoteMove methods in Session, add more errors
+ corresponding to OBEX responses
+
+2008-10-31 Tadas Dailyda <tadas@xxxxxxxxxxx>
+
+ * src/ods-obex.c (ods_obex_srv_get):
+ Another fix for ARM build (#144)
+
+2008-10-30 Tadas Dailyda <tadas@xxxxxxxxxxx>
+
+ * configure.in:
+ Use Wand.pc for ImageMagick PKG_CHECK since ImageMagick.pc links only to
+ MagickCore in some distros
+
+2008-10-29 Tadas Dailyda <tadas@xxxxxxxxxxx>
+
+ * src/ods-obex.c (ods_obex_srv_put):
+ * src/ods-server-session.c (obex_request_put):
+ Avoid executing obex_request_put in ServerSession several times for the
+ same transfer
+
+2008-10-27 Tadas Dailyda <tadas@xxxxxxxxxxx>
+
+ * src/ods-manager.c (create_bluetooth_session_full):
+ Avoid printing out NULL (fixes #143)
+
+2008-10-26 Tadas Dailyda <tadas@xxxxxxxxxxx>
+
+ * configure.in:
+ Check for Bluez 3.34 or later since older versions don't have
+ sdp_extract_pdu_safe and sdp_extract_seqtype_safe functions
+
====== obex-data-server-0.4.1 ======
2008-10-25 Tadas Dailyda <tadas@xxxxxxxxxxx>
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/obex-data-server-0.4.1/configure
new/obex-data-server-0.4.2/configure
--- old/obex-data-server-0.4.1/configure 2008-10-25 20:49:09.000000000
+0200
+++ new/obex-data-server-0.4.2/configure 2008-11-01 18:58:35.000000000
+0100
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for obex-data-server 0.4.1.
+# Generated by GNU Autoconf 2.61 for obex-data-server 0.4.2.
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
@@ -572,8 +572,8 @@
# Identity of this package.
PACKAGE_NAME='obex-data-server'
PACKAGE_TARNAME='obex-data-server'
-PACKAGE_VERSION='0.4.1'
-PACKAGE_STRING='obex-data-server 0.4.1'
+PACKAGE_VERSION='0.4.2'
+PACKAGE_STRING='obex-data-server 0.4.2'
PACKAGE_BUGREPORT=''
ac_unique_file="src"
@@ -1198,7 +1198,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures obex-data-server 0.4.1 to adapt to many kinds of
systems.
+\`configure' configures obex-data-server 0.4.2 to adapt to many kinds of
systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1264,7 +1264,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of obex-data-server 0.4.1:";;
+ short | recursive ) echo "Configuration of obex-data-server 0.4.2:";;
esac
cat <<\_ACEOF
@@ -1373,7 +1373,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-obex-data-server configure 0.4.1
+obex-data-server configure 0.4.2
generated by GNU Autoconf 2.61
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1387,7 +1387,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by obex-data-server $as_me 0.4.1, which was
+It was created by obex-data-server $as_me 0.4.2, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ $0 $@
@@ -2078,7 +2078,7 @@
# Define the identity of the package.
PACKAGE=obex-data-server
- VERSION=0.4.1
+ VERSION=0.4.2
cat >>confdefs.h <<_ACEOF
@@ -3706,12 +3706,12 @@
pkg_cv_BIP_CFLAGS="$BIP_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors
\"gthread-2.0 ImageMagick >= \$IMAGEMAGICK_REQUIRED\"") >&5
- ($PKG_CONFIG --exists --print-errors "gthread-2.0 ImageMagick >=
$IMAGEMAGICK_REQUIRED") 2>&5
+ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors
\"gthread-2.0 Wand >= \$IMAGEMAGICK_REQUIRED\"") >&5
+ ($PKG_CONFIG --exists --print-errors "gthread-2.0 Wand >=
$IMAGEMAGICK_REQUIRED") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
- pkg_cv_BIP_CFLAGS=`$PKG_CONFIG --cflags "gthread-2.0 ImageMagick >=
$IMAGEMAGICK_REQUIRED" 2>/dev/null`
+ pkg_cv_BIP_CFLAGS=`$PKG_CONFIG --cflags "gthread-2.0 Wand >=
$IMAGEMAGICK_REQUIRED" 2>/dev/null`
else
pkg_failed=yes
fi
@@ -3722,12 +3722,12 @@
pkg_cv_BIP_LIBS="$BIP_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors
\"gthread-2.0 ImageMagick >= \$IMAGEMAGICK_REQUIRED\"") >&5
- ($PKG_CONFIG --exists --print-errors "gthread-2.0 ImageMagick >=
$IMAGEMAGICK_REQUIRED") 2>&5
+ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors
\"gthread-2.0 Wand >= \$IMAGEMAGICK_REQUIRED\"") >&5
+ ($PKG_CONFIG --exists --print-errors "gthread-2.0 Wand >=
$IMAGEMAGICK_REQUIRED") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
- pkg_cv_BIP_LIBS=`$PKG_CONFIG --libs "gthread-2.0 ImageMagick >=
$IMAGEMAGICK_REQUIRED" 2>/dev/null`
+ pkg_cv_BIP_LIBS=`$PKG_CONFIG --libs "gthread-2.0 Wand >=
$IMAGEMAGICK_REQUIRED" 2>/dev/null`
else
pkg_failed=yes
fi
@@ -3745,9 +3745,9 @@
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
- BIP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors
"gthread-2.0 ImageMagick >= $IMAGEMAGICK_REQUIRED" 2>&1`
+ BIP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors
"gthread-2.0 Wand >= $IMAGEMAGICK_REQUIRED" 2>&1`
else
- BIP_PKG_ERRORS=`$PKG_CONFIG --print-errors "gthread-2.0
ImageMagick >= $IMAGEMAGICK_REQUIRED" 2>&1`
+ BIP_PKG_ERRORS=`$PKG_CONFIG --print-errors "gthread-2.0 Wand >=
$IMAGEMAGICK_REQUIRED" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$BIP_PKG_ERRORS" >&5
@@ -3945,7 +3945,7 @@
GLIB_REQUIRED=2.10.0
DBUS_REQUIRED=0.70
-BLUEZ_REQUIRED=3.13
+BLUEZ_REQUIRED=3.34
OPENOBEX_REQUIRED=1.3
@@ -4884,7 +4884,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by obex-data-server $as_me 0.4.1, which was
+This file was extended by obex-data-server $as_me 0.4.2, which was
generated by GNU Autoconf 2.61. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4937,7 +4937,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-obex-data-server config.status 0.4.1
+obex-data-server config.status 0.4.2
configured by $0, generated by GNU Autoconf 2.61,
with options \\"`echo "$ac_configure_args" | sed 's/^ //;
s/[\\""\`\$]/\\\\&/g'`\\"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/obex-data-server-0.4.1/configure.in
new/obex-data-server-0.4.2/configure.in
--- old/obex-data-server-0.4.1/configure.in 2008-10-25 20:48:43.000000000
+0200
+++ new/obex-data-server-0.4.2/configure.in 2008-11-01 18:57:26.000000000
+0100
@@ -1,6 +1,6 @@
AC_PREREQ(2.52)
-AC_INIT(obex-data-server, 0.4.1)
+AC_INIT(obex-data-server, 0.4.2)
AC_CONFIG_SRCDIR(src)
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
AM_CONFIG_HEADER(config.h)
@@ -35,7 +35,7 @@
[bip_enable=${enableval}], [bip_enable=auto])
if test "$bip_enable" = "auto" || test "$bip_enable" = "magick"; then
- PKG_CHECK_MODULES(BIP, gthread-2.0 ImageMagick >= $IMAGEMAGICK_REQUIRED,
+ PKG_CHECK_MODULES(BIP, gthread-2.0 Wand >= $IMAGEMAGICK_REQUIRED,
[bip_found=yes], [bip_found=no])
if test "$bip_found" = "yes" ; then
AC_DEFINE(USE_IMAGEMAGICK, [], [We have ImageMagick support])
@@ -133,7 +133,7 @@
dnl ---------------------------------------------------------------------------
GLIB_REQUIRED=2.10.0
DBUS_REQUIRED=0.70
-BLUEZ_REQUIRED=3.13
+BLUEZ_REQUIRED=3.34
OPENOBEX_REQUIRED=1.3
dnl ---------------------------------------------------------------------------
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/obex-data-server-0.4.1/dbus-api.txt
new/obex-data-server-0.4.2/dbus-api.txt
--- old/obex-data-server-0.4.1/dbus-api.txt 2008-10-23 22:37:15.000000000
+0200
+++ new/obex-data-server-0.4.2/dbus-api.txt 2008-11-01 18:36:10.000000000
+0100
@@ -453,6 +453,34 @@
Possible errors: org.openobex.Error.Failed
+ void RemoteCopy(string remote_source, string remote_destination)
+
+ FTP profile
+
+ Initiates remote copy operation (data is copied from
one location
+ to the other in remote device). remote_source specifies
a file
+ or folder to be copied (this file or folder has to
exist in current
+ directory). remote_destination specifies path where to
copy data.
+ This path can be relative to current folder or relative
to root
+ folder. Both slash ('/') and backslash ('\') symbols
can be used in
+ path. Example source/destination pairs :
+ 'File.txt' : 'Folder/OtherFolder/NewFile.txt'
+ 'Folder' : '/Folder/OtherFolder/NewFolder'
(relative to root folder)
+ 'Folder' : 'Folder\NewFolder'
+ Note that ods does not check remote_destination
argument validity.
+
+ Possible errors:
+
+ void RemoteMove(string remote_source, string remote_destination)
+
+ FTP profile
+
+ Initiates remote move operation (data is moved from one
location
+ to the other in remote device). See RemoteCopy method
for how the
+ arguments should be used.
+
+ Possible errors:
+
string GetImagingCapabilities()
BIP profile, all features
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/obex-data-server-0.4.1/NEWS
new/obex-data-server-0.4.2/NEWS
--- old/obex-data-server-0.4.1/NEWS 2008-10-25 20:53:13.000000000 +0200
+++ new/obex-data-server-0.4.2/NEWS 2008-11-01 18:57:14.000000000 +0100
@@ -1,3 +1,11 @@
+0.4.2 version
+ * Implement RemoteCopy and RemoteMove methods in Session
+ * Use Wand.pc for ImageMagick PKG_CHECK to be compatible with all
distros
+ * Avoid executing obex_request_put in ServerSession several times for
the
+ same transfer
+ * Avoid printing out NULL for ARM compatibility
+ * Check for Bluez 3.34 or later in configure
+
0.4.1 version
* Fix a race condition when client app misses
ServerSession.TransferStarted signal
* Do not use g_assert for checking if DBus context is set in Session
and ServerSession methods
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/obex-data-server-0.4.1/src/ods-error.c
new/obex-data-server-0.4.2/src/ods-error.c
--- old/obex-data-server-0.4.1/src/ods-error.c 2008-08-29 18:56:46.000000000
+0200
+++ new/obex-data-server-0.4.2/src/ods-error.c 2008-11-01 15:06:46.000000000
+0100
@@ -78,6 +78,9 @@
ENUM_ENTRY (ODS_ERROR_SERVER_ERROR, "ServerError"),
ENUM_ENTRY (ODS_ERROR_TIMEOUT, "Timeout"),
ENUM_ENTRY (ODS_ERROR_CANCELLED, "Cancelled"),
+ ENUM_ENTRY (ODS_ERROR_NOT_MODIFIED, "NotModified"),
+ ENUM_ENTRY (ODS_ERROR_DATABASE_ERROR, "DatabaseError"),
+ ENUM_ENTRY (ODS_ERROR_CONFLICT, "Conflict"),
{ 0, 0, 0 }
};
etype = g_enum_register_static ("OdsError", values);
@@ -118,6 +121,9 @@
g_set_error (error, ODS_ERROR, ODS_ERROR_FORBIDDEN,
"Operation forbidden");
break;
+ case ENOSPC:
+ g_set_error (error, ODS_ERROR, ODS_ERROR_DATABASE_ERROR,
+ "No space left on device");
default:
g_set_error (error, ODS_ERROR, ODS_ERROR_FAILED,
"Unknown error occurred (errno:
%d)", err);
@@ -160,6 +166,21 @@
g_set_error (error, ODS_ERROR, ODS_ERROR_SERVER_ERROR,
"Remote server error");
break;
+ case OBEX_RSP_NOT_MODIFIED:
+ g_set_error (error, ODS_ERROR, ODS_ERROR_NOT_MODIFIED,
+ "No modification done");
+ break;
+ case OBEX_RSP_CONFLICT:
+ g_set_error (error, ODS_ERROR, ODS_ERROR_CONFLICT,
+ "Conflict error");
+ break;
+ case OBEX_RSP_DATABASE_FULL:
+ g_set_error (error, ODS_ERROR, ODS_ERROR_DATABASE_ERROR,
+ "Could not write (database
full)");
+ break;
+ case OBEX_RSP_DATABASE_LOCKED:
+ g_set_error (error, ODS_ERROR, ODS_ERROR_DATABASE_ERROR,
+ "Could not read/write (database
locked)");
default:
g_set_error (error, ODS_ERROR, ODS_ERROR_FAILED,
"Operation failed (unexpected
response)");
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/obex-data-server-0.4.1/src/ods-error.h
new/obex-data-server-0.4.2/src/ods-error.h
--- old/obex-data-server-0.4.1/src/ods-error.h 2008-07-24 19:19:36.000000000
+0200
+++ new/obex-data-server-0.4.2/src/ods-error.h 2008-11-01 14:58:29.000000000
+0100
@@ -54,7 +54,10 @@
ODS_ERROR_NOT_IMPLEMENTED,
ODS_ERROR_SERVER_ERROR,
ODS_ERROR_TIMEOUT,
- ODS_ERROR_CANCELLED
+ ODS_ERROR_CANCELLED,
+ ODS_ERROR_NOT_MODIFIED,
+ ODS_ERROR_DATABASE_ERROR,
+ ODS_ERROR_CONFLICT
} OdsError;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/obex-data-server-0.4.1/src/ods-manager.c
new/obex-data-server-0.4.2/src/ods-manager.c
--- old/obex-data-server-0.4.1/src/ods-manager.c 2008-10-17
16:23:21.000000000 +0200
+++ new/obex-data-server-0.4.2/src/ods-manager.c 2008-10-27
15:12:10.000000000 +0100
@@ -684,7 +684,10 @@
cb_data->session = session;
/* start connecting socket for session */
- g_message ("Parsed[0]: %s, Parsed[1]: %s", parsed[0], parsed[1]);
+ if (parsed[0])
+ g_message ("Parsed[0]: %s", parsed[0]);
+ if (parsed[1])
+ g_message ("Parsed[1]: %s", parsed[1]);
cancel_data = ods_bluez_get_client_socket (&dst, &src, &uuid,
imaging_feature,
(g_strv_length
(parsed)>1 ? atoi (parsed[1]) : 0),
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/obex-data-server-0.4.1/src/ods-obex.c
new/obex-data-server-0.4.2/src/ods-obex.c
--- old/obex-data-server-0.4.1/src/ods-obex.c 2008-10-25 18:17:45.000000000
+0200
+++ new/obex-data-server-0.4.2/src/ods-obex.c 2008-10-31 22:33:31.000000000
+0100
@@ -786,7 +786,10 @@
break;
}
}
- g_message ("name: %s, type: %s", obex_context->remote,
obex_context->type);
+ if (obex_context->remote)
+ g_message ("name: %s", obex_context->remote);
+ if (obex_context->type)
+ g_message ("type: %s", obex_context->type);
OBEX_ObjectReParseHeaders (obex_context->obex_handle, object);
@@ -1172,11 +1175,6 @@
guchar *apparam = NULL;
guint apparam_len = 0;
- /* Check if we already have all transfer info
- * because both EV_REQCHECK and EV_REQ trigger this function */
- if (obex_context->stream_fd >= 0)
- return 1;
-
while (OBEX_ObjectGetNextHeader(obex_context->obex_handle, object,
&hi,
&hv, &hlen)) {
g_message ("header: %d", hi);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/obex-data-server-0.4.1/src/ods-server-session.c
new/obex-data-server-0.4.2/src/ods-server-session.c
--- old/obex-data-server-0.4.1/src/ods-server-session.c 2008-10-25
16:06:44.000000000 +0200
+++ new/obex-data-server-0.4.2/src/ods-server-session.c 2008-10-29
11:53:45.000000000 +0100
@@ -310,6 +310,11 @@
gint ret;
gchar *img_filename;
+ /* Check if we already have all transfer info
+ * because both EV_REQCHECK and EV_REQ trigger this function */
+ if (obex_context->stream_fd >= 0)
+ return;
+
if (!server_session->priv->allow_write) {
g_message ("CMD_PUT forbidden");
OBEX_ObjectSetRsp (object, OBEX_RSP_FORBIDDEN,
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/obex-data-server-0.4.1/src/ods-session.c
new/obex-data-server-0.4.2/src/ods-session.c
--- old/obex-data-server-0.4.1/src/ods-session.c 2008-10-23
22:30:05.000000000 +0200
+++ new/obex-data-server-0.4.2/src/ods-session.c 2008-11-01
15:12:49.000000000 +0100
@@ -396,6 +396,21 @@
}
ODS_SESSION_UNLOCK (session);
break;
+ case OBEX_CMD_ACTION:
+ if (response == OBEX_RSP_SUCCESS) {
+ if (session->priv->dbus_context) {
+ dbus_g_method_return
(session->priv->dbus_context);
+ session->priv->dbus_context = NULL;
+ }
+ } else {
+ /* get GError corresponding to OBEX response
code */
+ ods_error_obexrsp2gerror (response, &error);
+ dbus_g_method_return_error
(session->priv->dbus_context, error);
+ session->priv->dbus_context = NULL;
+ g_clear_error (&error);
+ }
+ ODS_SESSION_UNLOCK (session);
+ break;
case OBEX_CMD_PUT:
if (!obex_context->report_progress) {
/* DeleteRemoteFile or RemoteDisplay* was
executed */
@@ -1629,6 +1644,93 @@
return TRUE;
}
+static gboolean
+ods_session_remote_action (OdsSession *session,
+ const gchar
*remote_source,
+ const gchar
*remote_destination,
+ guint8 action,
DBusGMethodInvocation *context)
+{
+ gint ret;
+ GError *error = NULL;
+ OdsObexContext *obex_context = session->priv->obex_context;
+
+ ODS_SESSION_LOCK (session);
+ /* do checks */
+ if (!ods_check_caller (context, session->priv->owner)) {
+ ODS_SESSION_UNLOCK (session);
+ return FALSE;
+ }
+ if (session->priv->service != ODS_SERVICE_GOEP &&
+ session->priv->service != ODS_SERVICE_FTP) {
+ g_set_error (&error, ODS_ERROR, ODS_ERROR_NOT_SUPPORTED,
+ "Function not supported by
selected profile");
+ dbus_g_method_return_error (context, error);
+ g_clear_error (&error);
+ ODS_SESSION_UNLOCK (session);
+ return FALSE;
+ }
+ if (!ods_session_check_state (session, context)) {
+ ODS_SESSION_UNLOCK (session);
+ return FALSE;
+ }
+ /* validate remote_source */
+ if (strchr (remote_source, '/')) {
+ g_set_error (&error, ODS_ERROR, ODS_ERROR_INVALID_ARGUMENTS,
+ "Invalid character in
remote_source ('/')");
+ dbus_g_method_return_error (context, error);
+ g_clear_error (&error);
+ ODS_SESSION_UNLOCK (session);
+ return FALSE;
+ }
+
+ if (session->priv->dbus_context) {
+ g_set_error (&error, ODS_ERROR, ODS_ERROR_FAILED,
+ "DBus context is set (this is
probably a bug)");
+ dbus_g_method_return_error (context, error);
+ g_clear_error (&error);
+ ODS_SESSION_UNLOCK (session);
+ return FALSE;
+ }
+ /* set dbus context */
+ session->priv->dbus_context = context;
+
+ /* do selected action */
+ ret = ods_obex_action (obex_context, remote_source,
+ remote_destination,
action, 0);
+ if (ret < 0) {
+ ods_error_err2gerror(ret, &error);
+ dbus_g_method_return_error (context, error);
+ g_clear_error (&error);
+ /* reset state */
+ session->priv->dbus_context = NULL;
+ ODS_SESSION_UNLOCK (session);
+ return FALSE;
+ }
+ return TRUE;
+}
+
+gboolean
+ods_session_remote_copy (OdsSession *session,
+ const gchar
*remote_source,
+ const gchar
*remote_destination,
+ DBusGMethodInvocation
*context)
+{
+ return ods_session_remote_action (session, remote_source,
+
remote_destination, OBEX_ACTION_COPY,
+
context);
+}
+
+gboolean
+ods_session_remote_move (OdsSession *session,
+ const gchar
*remote_source,
+ const gchar
*remote_destination,
+ DBusGMethodInvocation
*context)
+{
+ return ods_session_remote_action (session, remote_source,
+
remote_destination, OBEX_ACTION_MOVE,
+
context);
+}
+
static void
get_image_info_cb (OdsImageInfo *info, OdsSessionPutImageData *data)
{
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx
| < Previous | Next > |