OSDN Git Service

android-x86/external-bluetooth-bluez.git
11 years agogobex: add option to set input/output MTU to test-server
Luiz Augusto von Dentz [Thu, 1 Sep 2011 09:47:51 +0000 (12:47 +0300)]
gobex: add option to set input/output MTU to test-server

11 years agogobex: add option to set input/output MTU to test-client
Luiz Augusto von Dentz [Thu, 1 Sep 2011 09:47:50 +0000 (12:47 +0300)]
gobex: add option to set input/output MTU to test-client

11 years agogobex: Use larger timeout first packet in transfers
Johan Hedberg [Thu, 1 Sep 2011 07:47:08 +0000 (10:47 +0300)]
gobex: Use larger timeout first packet in transfers

Frequently upon receiving the first packet servers will perform some
sort of user interaction to authorize the incoming request. It's
therefore wise to use a larger timeout for this first packet on the
client side.

11 years agogobex: Fix request timeout handling when aborting
Johan Hedberg [Thu, 1 Sep 2011 07:41:50 +0000 (10:41 +0300)]
gobex: Fix request timeout handling when aborting

11 years agogobex: Protect against user callback freeing internal objects
Johan Hedberg [Wed, 31 Aug 2011 09:41:48 +0000 (12:41 +0300)]
gobex: Protect against user callback freeing internal objects

A user callback could potentially do things like g_obex_cancel_request
or g_obex_unref while we are inside the IO watch callback. It is
therefore important to ensure that we are in a consistent state when the
user callback returns.

11 years agogobex: Protect against transfer_complete callback removing the transfer
Johan Hedberg [Tue, 30 Aug 2011 15:13:19 +0000 (18:13 +0300)]
gobex: Protect against transfer_complete callback removing the transfer

11 years agogobex: Add unit tests for Action command functions
Johan Hedberg [Tue, 30 Aug 2011 09:57:50 +0000 (12:57 +0300)]
gobex: Add unit tests for Action command functions

11 years agogobex: Fix opcode for Action command convenience functions
Johan Hedberg [Tue, 30 Aug 2011 09:57:29 +0000 (12:57 +0300)]
gobex: Fix opcode for Action command convenience functions

11 years agogobex: Add support for Action command header offset (0)
Johan Hedberg [Tue, 30 Aug 2011 09:57:09 +0000 (12:57 +0300)]
gobex: Add support for Action command header offset (0)

11 years agogobex: Add client transfer functions taking a pre-created GObexPacket
Johan Hedberg [Tue, 30 Aug 2011 09:33:20 +0000 (12:33 +0300)]
gobex: Add client transfer functions taking a pre-created GObexPacket

11 years agogobex: Add OBEX packet header addition convenience functions
Johan Hedberg [Tue, 30 Aug 2011 09:32:00 +0000 (12:32 +0300)]
gobex: Add OBEX packet header addition convenience functions

11 years agogobex: Add Action command convenience functions
Johan Hedberg [Tue, 30 Aug 2011 09:30:39 +0000 (12:30 +0300)]
gobex: Add Action command convenience functions

11 years agogobex: add root support to test-server
Luiz Augusto von Dentz [Fri, 26 Aug 2011 09:49:36 +0000 (12:49 +0300)]
gobex: add root support to test-server

11 years agogobex: Add Bluetooth support for test-server
Luiz Augusto von Dentz [Fri, 26 Aug 2011 09:49:35 +0000 (12:49 +0300)]
gobex: Add Bluetooth support for test-server

11 years agogobex: Add Bluetooth support for test-client
Luiz Augusto von Dentz [Fri, 26 Aug 2011 09:49:34 +0000 (12:49 +0300)]
gobex: Add Bluetooth support for test-client

11 years agogobex: Add random put request test
Luiz Augusto von Dentz [Fri, 26 Aug 2011 09:49:33 +0000 (12:49 +0300)]
gobex: Add random put request test

11 years agogobex: fix setting final bit on PUT requests
Luiz Augusto von Dentz [Fri, 26 Aug 2011 09:49:32 +0000 (12:49 +0300)]
gobex: fix setting final bit on PUT requests

Final bit should not be set when creating new request packets for PUT
since it may be not be the end of the body.

11 years agogobex: fix not handling unkown transport type
Luiz Augusto von Dentz [Fri, 26 Aug 2011 09:49:31 +0000 (12:49 +0300)]
gobex: fix not handling unkown transport type

11 years agogobex: Fix encoding of empty unicode headers
Jakub Adamek [Sun, 14 Aug 2011 13:16:25 +0000 (15:16 +0200)]
gobex: Fix encoding of empty unicode headers

According to IrOBEX:
"An empty Name header is defined as a Name header of length 3 (one byte
opcode + two byte length)."

The current code encodes an empty header with 5 bytes, including two
bytes of null-terminator.

This patch assumes that this definition of emptiness applies to all
unicode headers, not just the name header.

11 years agogobex: Remove bogus extra semicolons
Syam Sidhardhan [Wed, 10 Aug 2011 18:43:28 +0000 (00:13 +0530)]
gobex: Remove bogus extra semicolons

11 years agogobex: Fix compilation when NEED_G_SLIST_FREE_FULL is defined
Daniele Forsi [Wed, 3 Aug 2011 22:20:38 +0000 (00:20 +0200)]
gobex: Fix compilation when NEED_G_SLIST_FREE_FULL is defined

To use the replacement for g_slist_free_full() both compat.h and
glib-helper.h need to be included.

Fixes:
gobex/gobex.c:911: error: implicit declaration of function 'g_slist_free_full'
tools/obex-server-tool.c:344: error: implicit declaration of function ‘g_slist_free_full’

11 years agogobex: Make use of g_slist_free_full when elements are dynamically-allocated
Luiz Augusto von Dentz [Tue, 2 Aug 2011 10:00:06 +0000 (13:00 +0300)]
gobex: Make use of g_slist_free_full when elements are dynamically-allocated

This avoid having to iterate twice in the list to free its elements.

11 years agogobex: Remove reduntant empty line
Johan Hedberg [Tue, 19 Jul 2011 21:18:15 +0000 (00:18 +0300)]
gobex: Remove reduntant empty line

11 years agogobex: Fix compilation error with GPOINTER_TO_UINT
Johan Hedberg [Mon, 18 Jul 2011 10:35:16 +0000 (13:35 +0300)]
gobex: Fix compilation error with GPOINTER_TO_UINT

Fixes the following issue seen on debian unstable:

gobex/gobex.c: In function 'handle_request':
gobex/gobex.c:646:50: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]

11 years agogobex: Add support for returning -EAGAIN from producer callback
Johan Hedberg [Tue, 12 Jul 2011 08:52:05 +0000 (11:52 +0300)]
gobex: Add support for returning -EAGAIN from producer callback

11 years agogobex: Premit raw OBEX error codes within G_OBEX_ERROR GError domain
Johan Hedberg [Mon, 11 Jul 2011 22:51:37 +0000 (01:51 +0300)]
gobex: Premit raw OBEX error codes within G_OBEX_ERROR GError domain

11 years agogobex: Refactor get response parsing in transfer code
Johan Hedberg [Mon, 11 Jul 2011 22:45:16 +0000 (01:45 +0300)]
gobex: Refactor get response parsing in transfer code

11 years agogobex: Fix put request handling with final bit value
Johan Hedberg [Mon, 11 Jul 2011 21:38:18 +0000 (00:38 +0300)]
gobex: Fix put request handling with final bit value

11 years agogobex: Add g_obex_packet_get_body convenience function
Johan Hedberg [Mon, 11 Jul 2011 21:37:25 +0000 (00:37 +0300)]
gobex: Add g_obex_packet_get_body convenience function

11 years agogobex: Make use of g_obex_send_rsp where possible
Johan Hedberg [Mon, 11 Jul 2011 20:45:49 +0000 (23:45 +0300)]
gobex: Make use of g_obex_send_rsp where possible

11 years agogobex: Allow g_obex_send_rsp to take custom headers
Johan Hedberg [Mon, 11 Jul 2011 19:28:47 +0000 (22:28 +0300)]
gobex: Allow g_obex_send_rsp to take custom headers

11 years agogobex: Merge gobex-transfer.h into gobex.h
Johan Hedberg [Mon, 11 Jul 2011 14:17:48 +0000 (17:17 +0300)]
gobex: Merge gobex-transfer.h into gobex.h

11 years agogobex: Use guint instead of gint for request callback id
Johan Hedberg [Mon, 11 Jul 2011 07:47:34 +0000 (10:47 +0300)]
gobex: Use guint instead of gint for request callback id

11 years agogobex: Fix missing newline in test-server error log
Johan Hedberg [Sun, 10 Jul 2011 22:15:26 +0000 (01:15 +0300)]
gobex: Fix missing newline in test-server error log

11 years agogobex: Minor coding style fixes
Johan Hedberg [Sun, 10 Jul 2011 22:13:46 +0000 (01:13 +0300)]
gobex: Minor coding style fixes

11 years agogobex: Add g_obex_send_rsp convenience function
Johan Hedberg [Sun, 10 Jul 2011 22:07:33 +0000 (01:07 +0300)]
gobex: Add g_obex_send_rsp convenience function

11 years agogobex: Fix test-server/client file creation mode
Johan Hedberg [Sun, 10 Jul 2011 21:52:33 +0000 (00:52 +0300)]
gobex: Fix test-server/client file creation mode

11 years agogobex: Add Get support to test-client and test-server
Johan Hedberg [Sun, 10 Jul 2011 21:50:15 +0000 (00:50 +0300)]
gobex: Add Get support to test-client and test-server

11 years agogobex: Make use of va-args headers in higher level functions
Johan Hedberg [Sun, 10 Jul 2011 20:09:02 +0000 (23:09 +0300)]
gobex: Make use of va-args headers in higher level functions

11 years agogobex: Fix minor memory leak in unit test
Johan Hedberg [Sun, 10 Jul 2011 20:08:35 +0000 (23:08 +0300)]
gobex: Fix minor memory leak in unit test

11 years agogobex: Make transfer functions take va-args header lists
Johan Hedberg [Sun, 10 Jul 2011 19:33:16 +0000 (22:33 +0300)]
gobex: Make transfer functions take va-args header lists

11 years agogobex: Remove _ID_ from header type definitions
Johan Hedberg [Sun, 10 Jul 2011 18:47:49 +0000 (21:47 +0300)]
gobex: Remove _ID_ from header type definitions

11 years agogobex: Add va-args based packet creation support
Johan Hedberg [Sun, 10 Jul 2011 18:36:47 +0000 (21:36 +0300)]
gobex: Add va-args based packet creation support

11 years agogobex: Make buffer parameter const for g_obex_header_new_bytes
Johan Hedberg [Sun, 10 Jul 2011 17:59:12 +0000 (20:59 +0300)]
gobex: Make buffer parameter const for g_obex_header_new_bytes

11 years agogobex: Remove unneeded data_policy from g_obex_header_new_bytes
Johan Hedberg [Sun, 10 Jul 2011 10:57:55 +0000 (13:57 +0300)]
gobex: Remove unneeded data_policy from g_obex_header_new_bytes

11 years agogobex: Allow calling g_obex_get_rsp later with custom headers
Johan Hedberg [Sun, 10 Jul 2011 09:47:50 +0000 (12:47 +0300)]
gobex: Allow calling g_obex_get_rsp later with custom headers

11 years agogobex: Ignore unexpected responses (which can occur when aborting)
Johan Hedberg [Sat, 9 Jul 2011 13:26:46 +0000 (16:26 +0300)]
gobex: Ignore unexpected responses (which can occur when aborting)

11 years agogobex: Add g_obex_delete
Johan Hedberg [Sat, 9 Jul 2011 11:36:05 +0000 (13:36 +0200)]
gobex: Add g_obex_delete

11 years agogobex: Add g_obex_mkdir
Johan Hedberg [Sat, 9 Jul 2011 11:29:22 +0000 (13:29 +0200)]
gobex: Add g_obex_mkdir

11 years agogobex: Add unit test for SetPath("..")
Johan Hedberg [Sat, 9 Jul 2011 11:26:01 +0000 (13:26 +0200)]
gobex: Add unit test for SetPath("..")

11 years agogobex: Use proper response code in connect response
Johan Hedberg [Sat, 9 Jul 2011 11:23:39 +0000 (13:23 +0200)]
gobex: Use proper response code in connect response

11 years agogobex: Add g_obex_setpath
Johan Hedberg [Sat, 9 Jul 2011 11:22:19 +0000 (13:22 +0200)]
gobex: Add g_obex_setpath

11 years agogobex: Fix header offset lookup
Johan Hedberg [Sat, 9 Jul 2011 11:14:46 +0000 (13:14 +0200)]
gobex: Fix header offset lookup

11 years agogobex: Add unit test for g_obex_connect
Johan Hedberg [Sat, 9 Jul 2011 10:53:09 +0000 (12:53 +0200)]
gobex: Add unit test for g_obex_connect

11 years agogobex: Refactor common unit test functions to util.c
Johan Hedberg [Sat, 9 Jul 2011 09:06:31 +0000 (11:06 +0200)]
gobex: Refactor common unit test functions to util.c

11 years agogobex: Add g_obex_cancel_transfer
Johan Hedberg [Fri, 8 Jul 2011 10:32:20 +0000 (12:32 +0200)]
gobex: Add g_obex_cancel_transfer

11 years agogobex: Add unit tests for g_obex_suspend & g_obex_resume
Johan Hedberg [Fri, 8 Jul 2011 10:01:29 +0000 (12:01 +0200)]
gobex: Add unit tests for g_obex_suspend & g_obex_resume

11 years agogobex: Fix g_obex_get_rsp end of transfer handling
Johan Hedberg [Fri, 8 Jul 2011 09:48:59 +0000 (11:48 +0200)]
gobex: Fix g_obex_get_rsp end of transfer handling

11 years agogobex: Assert correct io_cb count in transfer unit tests
Johan Hedberg [Fri, 8 Jul 2011 09:48:32 +0000 (11:48 +0200)]
gobex: Assert correct io_cb count in transfer unit tests

11 years agogobex: Add support for suspend & resume
Johan Hedberg [Thu, 7 Jul 2011 11:33:42 +0000 (13:33 +0200)]
gobex: Add support for suspend & resume

11 years agogobex: Refactor transfer unit test IO callbacks
Johan Hedberg [Wed, 6 Jul 2011 16:42:00 +0000 (18:42 +0200)]
gobex: Refactor transfer unit test IO callbacks

11 years agogobex: Add g_obex_get_rsp
Johan Hedberg [Wed, 6 Jul 2011 15:30:38 +0000 (17:30 +0200)]
gobex: Add g_obex_get_rsp

11 years agogobex: Add g_obex_get_req
Johan Hedberg [Wed, 6 Jul 2011 15:05:19 +0000 (17:05 +0200)]
gobex: Add g_obex_get_req

11 years agogobex: Extend g_obex_put_rsp unit test to have two rounds of requests
Johan Hedberg [Wed, 6 Jul 2011 14:23:50 +0000 (17:23 +0300)]
gobex: Extend g_obex_put_rsp unit test to have two rounds of requests

11 years agogobex: Don't call consumer callback if there is no data
Johan Hedberg [Wed, 6 Jul 2011 14:21:52 +0000 (17:21 +0300)]
gobex: Don't call consumer callback if there is no data

11 years agogobex: Add unit test for g_obex_put_rsp
Johan Hedberg [Wed, 6 Jul 2011 12:42:08 +0000 (15:42 +0300)]
gobex: Add unit test for g_obex_put_rsp

11 years agogobex: Use zero timeout to make timeout unit tests run faster
Johan Hedberg [Wed, 6 Jul 2011 09:06:50 +0000 (12:06 +0300)]
gobex: Use zero timeout to make timeout unit tests run faster

11 years agogobex: Add unit test for put transfer API
Johan Hedberg [Wed, 6 Jul 2011 08:05:02 +0000 (11:05 +0300)]
gobex: Add unit test for put transfer API

11 years agogobex: Move more unit test helpers to util.c
Johan Hedberg [Wed, 6 Jul 2011 07:59:01 +0000 (10:59 +0300)]
gobex: Move more unit test helpers to util.c

11 years agogobex: Add unit test for unexpected data
Johan Hedberg [Tue, 5 Jul 2011 23:11:18 +0000 (02:11 +0300)]
gobex: Add unit test for unexpected data

11 years agogobex: Add put streaming support to test-server
Johan Hedberg [Tue, 5 Jul 2011 22:56:05 +0000 (01:56 +0300)]
gobex: Add put streaming support to test-server

11 years agogobex: Add basic server-side put transfer support
Johan Hedberg [Tue, 5 Jul 2011 22:55:43 +0000 (01:55 +0300)]
gobex: Add basic server-side put transfer support

11 years agogobex: Print more informative disconnect message in test-client
Johan Hedberg [Tue, 5 Jul 2011 22:54:12 +0000 (01:54 +0300)]
gobex: Print more informative disconnect message in test-client

11 years agogobex: Fix typo
Johan Hedberg [Tue, 5 Jul 2011 22:53:46 +0000 (01:53 +0300)]
gobex: Fix typo

11 years agogobex: Fix also response code for on-demand data based packets
Johan Hedberg [Tue, 5 Jul 2011 21:49:09 +0000 (00:49 +0300)]
gobex: Fix also response code for on-demand data based packets

11 years agogobex: Rename g_obex_put to g_obex_put_req
Johan Hedberg [Tue, 5 Jul 2011 20:33:20 +0000 (23:33 +0300)]
gobex: Rename g_obex_put to g_obex_put_req

11 years agogobex: Remove g_obex_set_request_function
Johan Hedberg [Tue, 5 Jul 2011 19:57:34 +0000 (22:57 +0300)]
gobex: Remove g_obex_set_request_function

11 years agogobex: Update test-server to use per-opcode request handlers
Johan Hedberg [Tue, 5 Jul 2011 19:51:46 +0000 (22:51 +0300)]
gobex: Update test-server to use per-opcode request handlers

11 years agogobex: Add per-opcode request handlers
Johan Hedberg [Tue, 5 Jul 2011 19:51:32 +0000 (22:51 +0300)]
gobex: Add per-opcode request handlers

11 years agogobex: Add basic put request parsing to test-server
Johan Hedberg [Tue, 5 Jul 2011 18:59:47 +0000 (21:59 +0300)]
gobex: Add basic put request parsing to test-server

11 years agogobex: Add type and name headers to the g_obex_put request
Johan Hedberg [Tue, 5 Jul 2011 18:25:17 +0000 (21:25 +0300)]
gobex: Add type and name headers to the g_obex_put request

11 years agogobex: Use GObexDataProducer type instead of (custom) GObexPacketDataFunc
Johan Hedberg [Tue, 5 Jul 2011 16:36:41 +0000 (19:36 +0300)]
gobex: Use GObexDataProducer type instead of (custom) GObexPacketDataFunc

11 years agogobex: Make on-demand body headers a GObexPacket feature
Johan Hedberg [Tue, 5 Jul 2011 16:26:57 +0000 (19:26 +0300)]
gobex: Make on-demand body headers a GObexPacket feature

11 years agogobex: Track last received request internally and remove g_obex_response
Johan Hedberg [Tue, 5 Jul 2011 15:57:23 +0000 (18:57 +0300)]
gobex: Track last received request internally and remove g_obex_response

11 years agogobex: Add support for put transfer in test-client
Johan Hedberg [Tue, 5 Jul 2011 15:32:28 +0000 (18:32 +0300)]
gobex: Add support for put transfer in test-client

11 years agogobex: Add initial transfer abstraction
Johan Hedberg [Tue, 5 Jul 2011 15:32:05 +0000 (18:32 +0300)]
gobex: Add initial transfer abstraction

11 years agogobex: Add proper responses to all requests in test-server
Johan Hedberg [Tue, 5 Jul 2011 15:30:54 +0000 (18:30 +0300)]
gobex: Add proper responses to all requests in test-server

11 years agogobex: Fix end of body packets for on-demand headers
Johan Hedberg [Tue, 5 Jul 2011 15:29:55 +0000 (18:29 +0300)]
gobex: Fix end of body packets for on-demand headers

11 years agogobex: Don't stop sending data if a single packet fails to encode
Johan Hedberg [Tue, 5 Jul 2011 15:27:09 +0000 (18:27 +0300)]
gobex: Don't stop sending data if a single packet fails to encode

11 years agogobex: Fix parsing over-sized packets
Johan Hedberg [Tue, 5 Jul 2011 13:37:02 +0000 (16:37 +0300)]
gobex: Fix parsing over-sized packets

11 years agogobex: Rename GObexDisconnectFunc to simply GObexFunc
Johan Hedberg [Tue, 5 Jul 2011 10:16:35 +0000 (13:16 +0300)]
gobex: Rename GObexDisconnectFunc to simply GObexFunc

11 years agogobex: Make on-demand header callbacks able to fail cleanly
Johan Hedberg [Tue, 5 Jul 2011 09:33:57 +0000 (12:33 +0300)]
gobex: Make on-demand header callbacks able to fail cleanly

11 years agogobex: Use opcode instead of entire req in g_obex_response
Johan Hedberg [Mon, 4 Jul 2011 20:32:43 +0000 (23:32 +0300)]
gobex: Use opcode instead of entire req in g_obex_response

11 years agogobex: Add support for Connection ID header
Johan Hedberg [Mon, 4 Jul 2011 20:02:52 +0000 (23:02 +0300)]
gobex: Add support for Connection ID header

11 years agogobex: Add g_obex_packet_find_header and g_obex_packet_prepend_header
Johan Hedberg [Mon, 4 Jul 2011 20:02:12 +0000 (23:02 +0300)]
gobex: Add g_obex_packet_find_header and g_obex_packet_prepend_header

11 years agogobex: Use g_obex_respose in test-server
Johan Hedberg [Mon, 4 Jul 2011 19:13:53 +0000 (22:13 +0300)]
gobex: Use g_obex_respose in test-server

11 years agogobex: Add convenience response sending function
Johan Hedberg [Mon, 4 Jul 2011 19:13:28 +0000 (22:13 +0300)]
gobex: Add convenience response sending function

11 years agogobex: Add request callback to test-server
Johan Hedberg [Mon, 4 Jul 2011 13:23:54 +0000 (16:23 +0300)]
gobex: Add request callback to test-server

11 years agogobex: Add connect command to test-client
Johan Hedberg [Mon, 4 Jul 2011 13:23:31 +0000 (16:23 +0300)]
gobex: Add connect command to test-client

11 years agogobex: Add convenience function for sending connect req
Johan Hedberg [Mon, 4 Jul 2011 13:21:45 +0000 (16:21 +0300)]
gobex: Add convenience function for sending connect req