openobex:mainline.git
5 years agoUse standard memset() instead of bzero()
Hendrik Sattler [Sun, 4 Sep 2011 16:54:52 +0000 (18:54 +0200)]
Use standard memset() instead of bzero()

5 years agoFix cppcheck complaints about charset pointer usage
Hendrik Sattler [Sun, 4 Sep 2011 16:53:24 +0000 (18:53 +0200)]
Fix cppcheck complaints about charset pointer usage

5 years agoFix leaks as reported by cppcheck
Hendrik Sattler [Sun, 4 Sep 2011 16:52:20 +0000 (18:52 +0200)]
Fix leaks as reported by cppcheck

5 years agoAdjust config.h include to be like all others
Hendrik Sattler [Sun, 4 Sep 2011 16:50:58 +0000 (18:50 +0200)]
Adjust config.h include to be like all others

5 years agoAdd missing include for INT_MAX
Hendrik Sattler [Thu, 4 Aug 2011 13:35:12 +0000 (15:35 +0200)]
Add missing include for INT_MAX

5 years agoFix redefinition when compiling with mingw32
Hendrik Sattler [Thu, 4 Aug 2011 13:29:45 +0000 (15:29 +0200)]
Fix redefinition when compiling with mingw32

5 years agoAdapt CMake configuration for OBEX_DEBUG and OBEX_DUMP
Hendrik Sattler [Wed, 27 Jul 2011 16:07:09 +0000 (18:07 +0200)]
Adapt CMake configuration for OBEX_DEBUG and OBEX_DUMP

5 years agoFix debug output for MSVC 7.1
Hendrik Sattler [Mon, 1 Aug 2011 17:02:14 +0000 (19:02 +0200)]
Fix debug output for MSVC 7.1

5 years agoMake MSVC 7.1 compile again
Hendrik Sattler [Thu, 21 Jul 2011 20:04:55 +0000 (22:04 +0200)]
Make MSVC 7.1 compile again

5 years agoRemove unused defines
Hendrik Sattler [Thu, 21 Jul 2011 20:00:58 +0000 (22:00 +0200)]
Remove unused defines

6 years agoFix: set MODE_SRV/STATE_IDLE _after_ sending event
Hendrik Sattler [Wed, 27 Jul 2011 16:53:37 +0000 (18:53 +0200)]
Fix: set MODE_SRV/STATE_IDLE _after_ sending event

This is needed for obex_test to actually work.

6 years agoFix behaviour of STREAM send functionality
Hendrik Sattler [Wed, 27 Jul 2011 16:53:35 +0000 (18:53 +0200)]
Fix behaviour of STREAM send functionality

6 years agoAdd function buf_empty() and use it to fix send bug
Hendrik Sattler [Wed, 27 Jul 2011 16:53:33 +0000 (18:53 +0200)]
Add function buf_empty() and use it to fix send bug

If non-blocking file descriptors or sockets are used, it can happen that
incomplete message get sent.

6 years agoFix BODY_END header and its debug message
Hendrik Sattler [Wed, 27 Jul 2011 16:53:34 +0000 (18:53 +0200)]
Fix BODY_END header and its debug message

6 years agoFix spelling mistake
Iain Hibbert [Wed, 27 Jul 2011 16:53:32 +0000 (18:53 +0200)]
Fix spelling mistake

6 years agoDon't use BEFORE for include path
Iain Hibbert [Wed, 27 Jul 2011 16:53:31 +0000 (18:53 +0200)]
Don't use BEFORE for include path

6 years agoRemove spurious ;
Iain Hibbert [Wed, 27 Jul 2011 16:53:30 +0000 (18:53 +0200)]
Remove spurious ;

6 years agoFix up bt_addr_t definition
Iain Hibbert [Wed, 27 Jul 2011 16:53:29 +0000 (18:53 +0200)]
Fix up bt_addr_t definition

We need to detect the presence of "Bluetooth Device Address" type
in order to provide the BtOBEX_ function prototypes, which needs
to be from a header included prior to <openobex/obex.h>

6 years agoUse const for bt_addr_t in BtOBEX_ functions
Iain Hibbert [Wed, 27 Jul 2011 16:53:28 +0000 (18:53 +0200)]
Use const for bt_addr_t in BtOBEX_ functions

(For NetBSD at least, the BDADDR_ANY that is passed to
these functions is defined as a const)

6 years agoUse bt_addr_t type consistently for BtOBEX_ functions
Iain Hibbert [Wed, 27 Jul 2011 16:53:27 +0000 (18:53 +0200)]
Use bt_addr_t type consistently for BtOBEX_ functions

6 years agoUse _XOPEN_SOURCE=520
Iain Hibbert [Tue, 21 Jun 2011 08:57:22 +0000 (09:57 +0100)]
Use _XOPEN_SOURCE=520

getaddrinfo() was first released in Issue 6 of XNS, but was derived
from the Issue 5.2 specification.

http://pubs.opengroup.org/onlinepubs/009695399/functions/getaddrinfo.html

6 years agoAI_ADDRCONFIG may not be supported
Iain Hibbert [Tue, 21 Jun 2011 08:57:21 +0000 (09:57 +0100)]
AI_ADDRCONFIG may not be supported

6 years agoAdd compat str2ba() for NetBSD
Iain Hibbert [Tue, 21 Jun 2011 08:57:20 +0000 (09:57 +0100)]
Add compat str2ba() for NetBSD

6 years agoAdd "-lbluetooth" for FreeBSD and NetBSD
Iain Hibbert [Tue, 21 Jun 2011 08:57:19 +0000 (09:57 +0100)]
Add "-lbluetooth" for FreeBSD and NetBSD

6 years agoobex_test: split PUT local/remote filename choice
Hendrik Sattler [Sun, 5 Jun 2011 15:39:00 +0000 (17:39 +0200)]
obex_test: split PUT local/remote filename choice

6 years agoFix: allow using 's' command more than once in obex_test
Hendrik Sattler [Sun, 5 Jun 2011 15:38:59 +0000 (17:38 +0200)]
Fix: allow using 's' command more than once in obex_test

This also increases the server timeout to make it usuable if the client is
manually operated by a human (e.g. obex_test client mode).

6 years agoFix: use calloc() instead of malloc()+memset()
Hendrik Sattler [Sun, 5 Jun 2011 15:38:58 +0000 (17:38 +0200)]
Fix: use calloc() instead of malloc()+memset()

6 years agoFix return value from client accept
Hendrik Sattler [Sun, 5 Jun 2011 15:38:57 +0000 (17:38 +0200)]
Fix return value from client accept

6 years agoFix: allow disconnect of server socket
Hendrik Sattler [Sun, 5 Jun 2011 15:38:56 +0000 (17:38 +0200)]
Fix: allow disconnect of server socket

6 years agoFix some issues with newer versions of glibc
Hendrik Sattler [Sun, 5 Jun 2011 15:38:55 +0000 (17:38 +0200)]
Fix some issues with newer versions of glibc

6 years agoFix build errors on ircp tool when using gcc 4.6
Luiz Augusto von Dentz [Sun, 5 Jun 2011 15:38:54 +0000 (17:38 +0200)]
Fix build errors on ircp tool when using gcc 4.6

ircp_server.c: In function ‘ircp_srv_receive’:
ircp_server.c:303:1: error: ISO C90 forbids mixed declarations and code
ircp_server.c: In function ‘ircp_srv_recv’:
ircp_server.c:346:6: error: variable ‘err’ set but not used
ircp_server.c: In function ‘ircp_srv_receive’:
ircp_server.c:369:1: error: expected declaration or statement at end of input
ircp_server.c:369:1: error: control reaches end of non-void function
cc1: all warnings being treated as errors

6 years agoFix build errors on obex_test tool when using gcc 4.6
Luiz Augusto von Dentz [Sun, 5 Jun 2011 15:38:53 +0000 (17:38 +0200)]
Fix build errors on obex_test tool when using gcc 4.6

obex_test_client.c: In function ‘push_client’:
obex_test_client.c:229:6: error: variable ‘num’ set but not used
obex_test_client.c: In function ‘put_client’:
obex_test_client.c:290:6: error: variable ‘num’ set but not used
obex_test_client.c: In function ‘get_client’:
obex_test_client.c:347:6: error: variable ‘num’ set but not used
obex_test_client.c: In function ‘setpath_client’:
obex_test_client.c:418:6: error: variable ‘num’ set but not used
cc1: all warnings being treated as errors

6 years agoFix Windows build broken by commit b807401578a6
Hendrik Sattler [Tue, 22 Feb 2011 18:51:24 +0000 (19:51 +0100)]
Fix Windows build broken by commit b807401578a6

6 years agoFix miscellaneous coding style issues
Johan Hedberg [Mon, 21 Feb 2011 21:08:26 +0000 (18:08 -0300)]
Fix miscellaneous coding style issues

6 years agoAdd verbose flag and use it to print more information about usb device
Hendrik Sattler [Sat, 19 Feb 2011 12:12:45 +0000 (13:12 +0100)]
Add verbose flag and use it to print more information about usb device

6 years agoFix usb transport
Hendrik Sattler [Fri, 18 Feb 2011 19:39:52 +0000 (20:39 +0100)]
Fix usb transport

I couldn't test the usb based transport for quite some time due to missing
hardware. A combination of previous broke the usb transport. This patch fixes
this breakage and also simplifies a bit.

6 years agoFix compilation for Microsoft Visual C++ compiler version 10
Hendrik Sattler [Sun, 30 Jan 2011 19:41:30 +0000 (20:41 +0100)]
Fix compilation for Microsoft Visual C++ compiler version 10

6 years agoMerge all transport-specific data into one union
Hendrik Sattler [Sat, 19 Feb 2011 11:45:05 +0000 (12:45 +0100)]
Merge all transport-specific data into one union

This lowers the memory consumption for every transport type and avoids a
seperate malloc() call for custom transports.

6 years agoFix wrong installation rule instroduced in 81d918714d75184c...
Hendrik Sattler [Fri, 18 Feb 2011 19:42:17 +0000 (20:42 +0100)]
Fix wrong installation rule instroduced in 81d918714d75184c...

Problem was wrong syntax in the CMake code.

6 years agoReorganize some line in acinline.m4 and fix openobex.pc file
Hendrik Sattler [Thu, 20 Jan 2011 20:55:06 +0000 (21:55 +0100)]
Reorganize some line in acinline.m4 and fix openobex.pc file

6 years agoBuild manpages with autotools using xmlto
Hendrik Sattler [Fri, 7 Jan 2011 15:05:06 +0000 (16:05 +0100)]
Build manpages with autotools using xmlto

6 years agoFix Doxygen output for autotools build when srcdir!=buildir
Hendrik Sattler [Fri, 7 Jan 2011 14:46:10 +0000 (15:46 +0100)]
Fix Doxygen output for autotools build when srcdir!=buildir

6 years agoAdd udev helper to allow access to USB devices for non-root users
Hendrik Sattler [Sat, 1 Jan 2011 20:54:59 +0000 (21:54 +0100)]
Add udev helper to allow access to USB devices for non-root users

6 years agoAllow bootstrap-configure to take extra parameters
Johan Hedberg [Tue, 18 Jan 2011 11:32:03 +0000 (11:32 +0000)]
Allow bootstrap-configure to take extra parameters

6 years agoFix OBEX_ResponseToString documentation
Iain Hibbert [Tue, 26 Oct 2010 13:10:41 +0000 (14:10 +0100)]
Fix OBEX_ResponseToString documentation

OBEX_ResponseToString() documentation says that it returns a static
string or NULL on error. This is not quite correct as the code does
never return NULL, and moreover it will be easier to use if that is
part of the API. Make it so.

6 years agoFix non-header data parsing
Hendrik Sattler [Tue, 21 Dec 2010 05:38:13 +0000 (06:38 +0100)]
Fix non-header data parsing

6 years agoCentralize memory allocation for data reading
Hendrik Sattler [Sun, 19 Dec 2010 14:56:52 +0000 (15:56 +0100)]
Centralize memory allocation for data reading

6 years agoFix return codes for libusb-0.1 transport
Hendrik Sattler [Thu, 16 Dec 2010 21:54:11 +0000 (22:54 +0100)]
Fix return codes for libusb-0.1 transport

6 years agoMake sure that all TX data gets transferred
Hendrik Sattler [Fri, 10 Dec 2010 21:25:36 +0000 (22:25 +0100)]
Make sure that all TX data gets transferred

6 years agoFix definitions in pkg-config file
Hendrik Sattler [Wed, 8 Dec 2010 18:27:16 +0000 (19:27 +0100)]
Fix definitions in pkg-config file

6 years agoAdd support for OBEX_DEBUG and OBEX_DUMP enviroment variables
Luiz Augusto von Dentz [Fri, 10 Dec 2010 11:25:53 +0000 (13:25 +0200)]
Add support for OBEX_DEBUG and OBEX_DUMP enviroment variables

6 years agoFix not resetting state to idle when canceling a request on server mode
Luiz Augusto von Dentz [Thu, 9 Dec 2010 10:06:02 +0000 (12:06 +0200)]
Fix not resetting state to idle when canceling a request on server mode

Also deliver ABORT signal so the user application can free whatever
resource being use to handle the request.

7 years agoFix miscelaneous coding style issues
Johan Hedberg [Wed, 8 Dec 2010 09:43:24 +0000 (11:43 +0200)]
Fix miscelaneous coding style issues

7 years agoUse fast path for rejected packets
Hendrik Sattler [Sun, 5 Dec 2010 11:06:00 +0000 (12:06 +0100)]
Use fast path for rejected packets

7 years agoAdd support for SRM flags
Hendrik Sattler [Thu, 2 Dec 2010 21:12:29 +0000 (22:12 +0100)]
Add support for SRM flags

This includes the ability for the application to insert additional headers in
between BODY headers. However, the application itself must then make sure that
it is appending an empty BODY header/stream, so that a proper END-OF-BODY
header can be generated.

7 years agoAdd SRM header ID definitions
Hendrik Sattler [Thu, 2 Dec 2010 21:11:04 +0000 (22:11 +0100)]
Add SRM header ID definitions

7 years agoMake obex_object_send() easier to understand
Hendrik Sattler [Sun, 21 Nov 2010 13:06:27 +0000 (14:06 +0100)]
Make obex_object_send() easier to understand

7 years agoReformat debug dump output
Hendrik Sattler [Sun, 21 Nov 2010 10:09:34 +0000 (11:09 +0100)]
Reformat debug dump output

7 years agoAdd support for single response mode
Hendrik Sattler [Mon, 15 Nov 2010 20:32:30 +0000 (21:32 +0100)]
Add support for single response mode

7 years agoAllow custom transport to insert whole packets on read()
Hendrik Sattler [Mon, 15 Nov 2010 20:29:24 +0000 (21:29 +0100)]
Allow custom transport to insert whole packets on read()

7 years agoReturn correct return value for USB-1.x write timeout
Hendrik Sattler [Mon, 15 Nov 2010 20:24:47 +0000 (21:24 +0100)]
Return correct return value for USB-1.x write timeout

7 years agoHandle multiple messages in RX message queue
Hendrik Sattler [Wed, 10 Nov 2010 17:09:34 +0000 (18:09 +0100)]
Handle multiple messages in RX message queue

The self->rx_msg buffer may contain more that one message. These changes allow
to handle this.

7 years agoRemove STATE_START
Hendrik Sattler [Wed, 10 Nov 2010 17:04:01 +0000 (18:04 +0100)]
Remove STATE_START

STATE_START was MODE_CLI specific and is actually conditional part of
STATE_SEND. This patch merges both states.

7 years agoStrip second argument of obex_object_setcmd()
Hendrik Sattler [Sat, 23 Oct 2010 12:36:09 +0000 (14:36 +0200)]
Strip second argument of obex_object_setcmd()

This also changes the return code from contant 1 (and checked nowhere) to void.

7 years agoAPI documentation updates
Hendrik Sattler [Tue, 19 Oct 2010 19:30:57 +0000 (21:30 +0200)]
API documentation updates

7 years agoMake argument of buf_total_size() const
Hendrik Sattler [Tue, 19 Oct 2010 19:30:08 +0000 (21:30 +0200)]
Make argument of buf_total_size() const

7 years agoFix OBEX_CancelRequest for server mode
Luiz Augusto von Dentz [Thu, 14 Oct 2010 07:25:25 +0000 (10:25 +0300)]
Fix OBEX_CancelRequest for server mode

Make use of last response set if nice is TRUE, so that applications can
set a proper error when canceling a suspended requests.

7 years agoFix use of state as mode
Luiz Augusto von Dentz [Mon, 11 Oct 2010 07:58:52 +0000 (10:58 +0300)]
Fix use of state as mode

Old code use to have just state member but now it is separated into state
and mode.

7 years agoAdd option for hint filtering to obex_find
Hendrik Sattler [Mon, 30 Aug 2010 21:10:31 +0000 (23:10 +0200)]
Add option for hint filtering to obex_find

7 years agoDo no send REQHINT event for ABORT command.
Hendrik Sattler [Tue, 28 Sep 2010 16:48:53 +0000 (18:48 +0200)]
Do no send REQHINT event for ABORT command.

Currently the server application gets a REQHINT for the ABORT command but none
of the other events because it gets automatically converted to an ABORT event
instead. So sending the REQHINT is not necessary and may actually confuse the
application (no matching REQDONE).

7 years agoFix bug in custom transport
Hendrik Sattler [Tue, 28 Sep 2010 16:46:36 +0000 (18:46 +0200)]
Fix bug in custom transport

A bug in custom transport prevents its usage. One other bug makes it crash, fix
both and also the left-over memcpy-instead-of-struct-assignment.

7 years agoFix miscelaneous coding style issues
Johan Hedberg [Thu, 26 Aug 2010 21:03:01 +0000 (00:03 +0300)]
Fix miscelaneous coding style issues

Too long lines, unnecessary type casts, whitespace issues, etc.

7 years agoMSVC build fix, and bug fix for 32-bit systems
Hendrik Sattler [Thu, 19 Aug 2010 14:56:30 +0000 (16:56 +0200)]
MSVC build fix, and bug fix for 32-bit systems

7 years agoCheck that SetCustomData is only used with OBEX_TRANS_CUSTOM
Hendrik Sattler [Sun, 22 Aug 2010 14:47:05 +0000 (16:47 +0200)]
Check that SetCustomData is only used with OBEX_TRANS_CUSTOM

7 years agoFix autoconf build warnings
Luiz Augusto von Dentz [Fri, 13 Aug 2010 10:53:30 +0000 (13:53 +0300)]
Fix autoconf build warnings

Variables must contain _cv_ to be cached

7 years agoEnable AM_SILENT_RULES if supported
Luiz Augusto von Dentz [Fri, 13 Aug 2010 08:39:54 +0000 (11:39 +0300)]
Enable AM_SILENT_RULES if supported

7 years agoFix not resuming server requests properly
Luiz Augusto von Dentz [Thu, 12 Aug 2010 08:33:21 +0000 (11:33 +0300)]
Fix not resuming server requests properly

In the server case the final bit of the opcode must always be set, but
when receiving if the final bit is not set it should not allow last
command to not trigger REQDONE when there is still more data coming.

7 years agoFix not ignoring aborted objects when resuming
Luiz Augusto von Dentz [Mon, 5 Jul 2010 11:16:50 +0000 (14:16 +0300)]
Fix not ignoring aborted objects when resuming

Requests that have been aborted should be ignored and not be sent, similar
to what happen when receiving.

7 years agoFix final bit not being set on a resumed request
Vinicius Costa Gomes [Wed, 11 Aug 2010 18:11:12 +0000 (14:11 -0400)]
Fix final bit not being set on a resumed request

In the server case the final bit of the opcode must always be set. When
resuming a request that would take more than one packet, it was not set.

7 years agoFix build with autotools
Hendrik Sattler [Thu, 22 Jul 2010 19:11:09 +0000 (21:11 +0200)]
Fix build with autotools

7 years agoUpdate documentation cover page and add more documentation for data types
Hendrik Sattler [Tue, 22 Jun 2010 20:26:41 +0000 (22:26 +0200)]
Update documentation cover page and add more documentation for data types

7 years agoProcess body headers after REQCHECK
Hendrik Sattler [Tue, 20 Jul 2010 17:35:50 +0000 (19:35 +0200)]
Process body headers after REQCHECK

If the application choses stream mode, it can never receive REQCHECK events.
Splitting the processing times of body and non-body headers makes this possible
and allows even the usage of stream mode after inspecting the other headers.
To allow this, obex_object_receive() has one additional parameter that has one
bit for each possible header id (OBEX_HDR_ID_*).

7 years agoSplit obex_object_receive()
Hendrik Sattler [Fri, 16 Jul 2010 21:32:42 +0000 (23:32 +0200)]
Split obex_object_receive()

The object receive function was reworked to make some other changes possible.
The path of the data is not more clear.

7 years agoMake data pointer of buf_insert_*() const
Hendrik Sattler [Sun, 9 May 2010 08:15:11 +0000 (10:15 +0200)]
Make data pointer of buf_insert_*() const

7 years agoAdd an application for finding connectable devices.
Hendrik Sattler [Fri, 16 Jul 2010 21:23:21 +0000 (23:23 +0200)]
Add an application for finding connectable devices.

Since transports can be used to get a list of devices to connect to, this
example application makes that information available from the command line.

7 years agoCode cleanup
Hendrik Sattler [Fri, 16 Jul 2010 21:14:25 +0000 (23:14 +0200)]
Code cleanup

Some issues cleaned up with this patch:
 - safer use of sizeof() by using variables instead of repeating the variable
   type
 - remove magic values (size of headers)
 - remove unused local variables that were not detected by the compiler
 - remove unused struct member

7 years agoMake send/write routines honour the user-selected timeout
Hendrik Sattler [Sat, 17 Jul 2010 09:14:37 +0000 (11:14 +0200)]
Make send/write routines honour the user-selected timeout

All socket/file descriptor bases routines solve this using a select() call.
LibUSB-1.x is also easy (using a variable instead of a constant). LibUSB-0.x
doesn't know about waiting infinitely but that is simulated by a maximum
timeout. The custom transport must manage the timeout itself for the read()
and write() callbacks.
Previously, the timeout value given to OBEX_HandleInput() was ignored for
the USB transport. Instead they used a fixed timeout. This patch fixes that
without adding additonal data copies.

7 years agoAdd read callback for custom transport
Hendrik Sattler [Fri, 16 Jul 2010 20:48:13 +0000 (22:48 +0200)]
Add read callback for custom transport

Currently, custom transport need their own buffer of the size of the largest
obex packet to do the custom data feed. This includes one data copy that can
be avoided by defining a read function like for all other transports. The old
method can be used at the same time.
Application must be recompiled! But we did not release, yet, and the next
release will have a different SOVERSION, so no problem.

7 years agoRemove indirect buffer copying by obex_data_indication()
Hendrik Sattler [Fri, 16 Jul 2010 20:41:53 +0000 (22:41 +0200)]
Remove indirect buffer copying by obex_data_indication()

Previously, obex_data_indication accepted a buffer (and length) as
arguments, forwarding that to obex_transport_read() where it was copied
to rx_msg. However, this long way can be shortened by copying the data
to rx_msg before calling obex_data_indication(). Thus, the additional
arguments are not needed anymore.

7 years agoAdd OBEX_FL_CLOEXEC flag
Hendrik Sattler [Fri, 16 Jul 2010 17:27:37 +0000 (19:27 +0200)]
Add OBEX_FL_CLOEXEC flag

7 years agoMove obex_transport specific code to own functions
Hendrik Sattler [Fri, 16 Jul 2010 17:17:01 +0000 (19:17 +0200)]
Move obex_transport specific code to own functions

7 years agoAdd obex_transport init and cleanup functions
Hendrik Sattler [Fri, 16 Jul 2010 17:13:41 +0000 (19:13 +0200)]
Add obex_transport init and cleanup functions

7 years agoMove socket_t variables to struct obex_transport
Hendrik Sattler [Fri, 16 Jul 2010 16:56:37 +0000 (18:56 +0200)]
Move socket_t variables to struct obex_transport

The socket variables are transport specific data and do not belong to
struct obex itself. Additionally, replace all usages of "self->trans."
in the transport source files with a shorter struct obex_transport pointer.

7 years agoUse notifiers to get the USB-1.x FD more reliably
Hendrik Sattler [Sat, 20 Mar 2010 20:02:53 +0000 (21:02 +0100)]
Use notifiers to get the USB-1.x FD more reliably

7 years agoUse the transport data pointer to store the obex_ctrans_t
Hendrik Sattler [Fri, 16 Jul 2010 16:09:18 +0000 (18:09 +0200)]
Use the transport data pointer to store the obex_ctrans_t

The obex_ctrans_t is only used when using OBEX_TRANS_CUSTOM. Thus it is
transport private data. Additionally, this adds a clone() function to transport
ops to allow a copy in OBEX_ServerAccept (although a custom transport can never
reach that code as self->fd never gets set).

This also fixes other transports that always relied on the fact the obex_t
pointer is never cleaned up before the obex_t pointers returned from
OBEX_ServerAccept (not relevant on all systems and transports).

7 years agoUse WSAStartup() on Windows only for transports that need it
Hendrik Sattler [Thu, 15 Jul 2010 19:03:32 +0000 (21:03 +0200)]
Use WSAStartup() on Windows only for transports that need it

7 years agoAdd transport specific data pointer
Hendrik Sattler [Wed, 14 Jul 2010 21:08:08 +0000 (23:08 +0200)]
Add transport specific data pointer

The libusb-1.x context must be stored with the obex_t to be able to use more
than one.

7 years agoMake the IrDA device enumeration accessable to the application
Hendrik Sattler [Wed, 14 Jul 2010 20:55:30 +0000 (22:55 +0200)]
Make the IrDA device enumeration accessable to the application

Currently, the IrDA transport can only use the first device. It already uses a
device search to determine possible candidates. These changes make these search
results available to the application by the same functions that are used for
USB interface search. To make that possible, quite some parts of the irobex
transport are reworked and the transport connect function is now a wrapper
around the public interface. This also adds support for IAS queries on Windows.

7 years agoAdd transport enumeration function wrapper
Hendrik Sattler [Wed, 14 Jul 2010 18:45:58 +0000 (20:45 +0200)]
Add transport enumeration function wrapper

This adds a wrapper for calling the transport's find_interfaces() function.
It also changes the signature of that function to add a obex_t ptr as first
argument.

7 years agoAdd missing AF_INET conversion
Hendrik Sattler [Fri, 5 Mar 2010 21:58:06 +0000 (22:58 +0100)]
Add missing AF_INET conversion