Commit Graph

96 Commits

Author SHA1 Message Date
Luiz Augusto von Dentz
04bfae5d56 gobex: add unit test for PUT response with delay 2012-12-04 22:22:04 +01:00
Bartosz Szatkowski
b8cc54f1b9 gobex: Add "cd ../dir" handling in setpath 2012-12-04 22:22:04 +01:00
Luiz Augusto von Dentz
648e662542 gobex: add unit test for CONNECT followed by PUT request with random data
Note that in order to work the buffer had to be increased to OBEX maximum
MTU otherwise test_io_cb would be sending responses for each fragment it
has read which may not constitute a full packet.
2012-12-04 22:22:03 +01:00
Luiz Augusto von Dentz
75447e6647 gobex: add unit test for CONNECT followed by GET wrong response 2012-12-04 22:22:03 +01:00
Luiz Augusto von Dentz
4c7baae49e gobex: add unit test for CONNECT followed by PUT response 2012-12-04 22:22:03 +01:00
Luiz Augusto von Dentz
8b6ff020b6 gobex: add unit test for CONNECT followed by PUT request 2012-12-04 22:22:03 +01:00
Luiz Augusto von Dentz
6b1a901678 gobex: add unit test for CONNECT followed by GET response 2012-12-04 22:22:03 +01:00
Luiz Augusto von Dentz
a28a22a707 gobex: add unit test for CONNECT followed by GET request 2012-12-04 22:22:03 +01:00
Luiz Augusto von Dentz
4f64bb1b38 gobex: add unit test for CONNECT response 2012-12-04 22:22:03 +01:00
Luiz Augusto von Dentz
e94ce4ff86 gobex: add unit test for CONNECT request 2012-12-04 22:22:03 +01:00
Johan Hedberg
3a7f9049c0 gobex: Fix decoding byte array headers with too small length
Length values of less than 3 are invalid.
2012-12-04 22:22:03 +01:00
Johan Hedberg
d21fef52df gobex: Add unit tests for Action command functions 2012-12-04 22:22:02 +01:00
Luiz Augusto von Dentz
b9794defb8 gobex: Add random put request test 2012-12-04 22:22:02 +01:00
Jakub Adamek
f264b1c744 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.
2012-12-04 22:22:02 +01:00
Johan Hedberg
0528bfc1a0 gobex: Add support for returning -EAGAIN from producer callback 2012-12-04 22:22:02 +01:00
Johan Hedberg
234c29546d gobex: Fix put request handling with final bit value 2012-12-04 22:22:01 +01:00
Johan Hedberg
ddb69649e8 gobex: Merge gobex-transfer.h into gobex.h 2012-12-04 22:22:01 +01:00
Johan Hedberg
c869ca28b8 gobex: Make use of va-args headers in higher level functions 2012-12-04 22:22:01 +01:00
Johan Hedberg
508cb6f8c2 gobex: Fix minor memory leak in unit test 2012-12-04 22:22:01 +01:00
Johan Hedberg
815218c7ef gobex: Make transfer functions take va-args header lists 2012-12-04 22:22:01 +01:00
Johan Hedberg
58cd14d209 gobex: Remove _ID_ from header type definitions 2012-12-04 22:22:01 +01:00
Johan Hedberg
cdcde59687 gobex: Add va-args based packet creation support 2012-12-04 22:22:01 +01:00
Johan Hedberg
f5d10bf7cb gobex: Remove unneeded data_policy from g_obex_header_new_bytes 2012-12-04 22:22:01 +01:00
Johan Hedberg
25faf4fc79 gobex: Allow calling g_obex_get_rsp later with custom headers 2012-12-04 22:22:01 +01:00
Johan Hedberg
7f5cb418d3 gobex: Ignore unexpected responses (which can occur when aborting) 2012-12-04 22:22:01 +01:00
Johan Hedberg
1760e5f5f5 gobex: Add g_obex_delete 2012-12-04 22:22:01 +01:00
Johan Hedberg
8554bc2a89 gobex: Add g_obex_mkdir 2012-12-04 22:22:01 +01:00
Johan Hedberg
15402c02c1 gobex: Add unit test for SetPath("..") 2012-12-04 22:22:01 +01:00
Johan Hedberg
f4baf99a5e gobex: Use proper response code in connect response 2012-12-04 22:22:01 +01:00
Johan Hedberg
1b609bec8e gobex: Add g_obex_setpath 2012-12-04 22:22:00 +01:00
Johan Hedberg
60fd958c20 gobex: Add unit test for g_obex_connect 2012-12-04 22:22:00 +01:00
Johan Hedberg
b1d071bd5c gobex: Refactor common unit test functions to util.c 2012-12-04 22:22:00 +01:00
Johan Hedberg
d1ad690084 gobex: Add unit tests for g_obex_suspend & g_obex_resume 2012-12-04 22:22:00 +01:00
Johan Hedberg
817b488ebc gobex: Assert correct io_cb count in transfer unit tests 2012-12-04 22:22:00 +01:00
Johan Hedberg
b19d1fbde8 gobex: Refactor transfer unit test IO callbacks 2012-12-04 22:22:00 +01:00
Johan Hedberg
98703e92d1 gobex: Add g_obex_get_rsp 2012-12-04 22:22:00 +01:00
Johan Hedberg
6abdccbf94 gobex: Add g_obex_get_req 2012-12-04 22:22:00 +01:00
Johan Hedberg
3f2536cb1d gobex: Extend g_obex_put_rsp unit test to have two rounds of requests 2012-12-04 22:22:00 +01:00
Johan Hedberg
b7809d9045 gobex: Add unit test for g_obex_put_rsp 2012-12-04 22:22:00 +01:00
Johan Hedberg
5ea9277204 gobex: Use zero timeout to make timeout unit tests run faster 2012-12-04 22:22:00 +01:00
Johan Hedberg
89f8833b25 gobex: Add unit test for put transfer API 2012-12-04 22:22:00 +01:00
Johan Hedberg
33324a068a gobex: Move more unit test helpers to util.c 2012-12-04 22:22:00 +01:00
Johan Hedberg
bd5957292f gobex: Add unit test for unexpected data 2012-12-04 22:22:00 +01:00
Johan Hedberg
7fee9ce693 gobex: Remove g_obex_set_request_function 2012-12-04 22:21:59 +01:00
Johan Hedberg
b50f20a501 gobex: Use GObexDataProducer type instead of (custom) GObexPacketDataFunc 2012-12-04 22:21:59 +01:00
Johan Hedberg
0a4824ddb1 gobex: Make on-demand body headers a GObexPacket feature 2012-12-04 22:21:59 +01:00
Johan Hedberg
714abdfc72 gobex: Make on-demand header callbacks able to fail cleanly 2012-12-04 22:21:59 +01:00
Johan Hedberg
a470646232 gobex: Add convenience response sending function 2012-12-04 22:21:58 +01:00
Johan Hedberg
7afc5a6f90 gobex: g_obex_new should create its own GIOChannel ref 2012-12-04 22:21:58 +01:00
Johan Hedberg
57478308af gobex: Add (transport) MTU parameters to g_obex_new 2012-12-04 22:21:58 +01:00