Johan Hedberg
30e2aaa3f8
gobex: Fix GPL version reference
...
These files (like everything else in the tree) should be GPL 2 or later
instead of GPL 2 only.
2013-02-15 16:25:29 +02:00
Johan Hedberg
b8779d2202
Revert "Ensure config.h is included by using CPPFLAGS"
...
This reverts commit 8a03376544
.
The patch needs to be split up and the gdbus/ changes were bogus
compared to the original commit message.
Conflicts:
Makefile.am
Makefile.obexd
profiles/cyclingspeed/cyclingspeed.c
profiles/heartrate/heartrate.c
src/error.c
2012-12-07 12:46:04 +02:00
Lucas De Marchi
8a03376544
Ensure config.h is included by using CPPFLAGS
...
Instead of trying to include config.h in each file over the tree and
possibly forgetting to include it, give a "-include config.h" argument
to the compiler so it's guaranteed that a) it will be included for all
source files and b) it will be the first header included.
gdbus/ directory is left out, since it would break other projects using
it.
2012-12-05 17:18:07 +02:00
Jaganath Kanakkassery
9095deb825
gobex: Add callback and userdata parameter to g_obex_cancel_transfer()
...
If callback is provided in g_obex_cancel_transfer() current complete
callback will be replaced by the new one and user will be informed
when abort completes.
2012-12-04 22:22:06 +01:00
Luiz Augusto von Dentz
faac92a4cb
gobex: Translate posix error code to proper OBEX response opcode
...
This patch create a map between posix errors code and OBEX response
opcode and use it to generate a proper response in case a transfer
failed instead of always responding with internal error.
2012-12-04 22:22:05 +01:00
Luiz Augusto von Dentz
6e7d00ceec
gobex: handle Single Response Mode (SRM) headers
...
Single Response Mode (SRM) is a 1-byte quantity containing a value to
enable or disable SRM, as well as to indicate support for SRM.
2012-12-04 22:22:05 +01:00
Luiz Augusto von Dentz
c11d66be4c
gobex: introduce g_obex_get_rsp_pkt
...
g_obex_get_rsp_pkt takes a response packet which sometimes is more
convenient for adding headers.
2012-12-04 22:22:05 +01:00
Luiz Augusto von Dentz
ab6b0ae829
gobex: reduce duplicated code in g_obex_put_req
...
g_obex_put_req is quite similar to g_obex_put_req_pkt so now it just
call it to avoid duplicating this code.
2012-12-04 22:22:04 +01:00
Mikel Astiz
7dbc36186e
gobex: fix transfer search in transfer_complete
...
The previous approach searched the transfer pointer itself, assuming
that the transfers has not been modified if the pointer is in the list.
However the callback could have removed the transfer and registered
another one, which can eventually point to the same memory location.
This is solved by looking for the transfer id instead of the pointer.
2012-12-04 22:22:04 +01:00
Luiz Augusto von Dentz
1c0b69678f
gobex: fix removing wrong id on transfer_free
...
If statement checks for get_id handle but was removing req_id.
2012-12-04 22:22:04 +01:00
Luiz Augusto von Dentz
48bbe41993
gobex: log transfers using G_OBEX_DEBUG_TRANSFER
2012-12-04 22:22:03 +01:00
Luiz Augusto von Dentz
fffdbad4a8
gobex: log errors using G_OBEX_DEBUG_ERROR
2012-12-04 22:22:03 +01:00
Luiz Augusto von Dentz
e058d7a519
gobex: fix includes of config.h
2012-12-04 22:22:03 +01:00
Johan Hedberg
81dd14a05e
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.
2012-12-04 22:22:02 +01:00
Johan Hedberg
5c50f04098
gobex: Protect against transfer_complete callback removing the transfer
2012-12-04 22:22:02 +01:00
Johan Hedberg
4549f997e8
gobex: Add client transfer functions taking a pre-created GObexPacket
2012-12-04 22:22:02 +01:00
Luiz Augusto von Dentz
c96d0645b3
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.
2012-12-04 22:22:02 +01:00
Johan Hedberg
6814998db7
gobex: Remove reduntant empty line
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
f0598095d1
gobex: Premit raw OBEX error codes within G_OBEX_ERROR GError domain
2012-12-04 22:22:02 +01:00
Johan Hedberg
c38b06abda
gobex: Refactor get response parsing in transfer code
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
57e1082eb0
gobex: Use guint instead of gint for request callback id
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
60263d9a33
gobex: Add g_obex_cancel_transfer
2012-12-04 22:22:00 +01:00
Johan Hedberg
5eb7afa856
gobex: Fix g_obex_get_rsp end of transfer handling
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
a2ced03a85
gobex: Don't call consumer callback if there is no data
2012-12-04 22:22:00 +01:00
Johan Hedberg
d070d17059
gobex: Add basic server-side put transfer support
2012-12-04 22:21:59 +01:00
Johan Hedberg
10dfec83a1
gobex: Rename g_obex_put to g_obex_put_req
2012-12-04 22:21:59 +01:00
Johan Hedberg
2af993b895
gobex: Add type and name headers to the g_obex_put request
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
920c62df3e
gobex: Add initial transfer abstraction
2012-12-04 22:21:59 +01:00