Commit Graph

23 Commits

Author SHA1 Message Date
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
Luiz Augusto von Dentz
63d1b60c8c gobex: Integrate GObexApparam with GObexHeader
This introduce 2 new convenient functions: g_obex_header_get_apparam
which parses and decode an header into GObexApparam and
gobex_header_new_apparam that encode GObexApparam into GObexHeader.
2012-12-04 22:22:06 +01:00
Neal Peacock
a3bb0a6dc5 gobex: Change UTF name to standard 2012-12-04 22:22:06 +01:00
Szymon Janc
55626b774e gobex: Fix dead assignments in gobex-header.c
Values stored are never read.
2012-12-04 22:22:06 +01:00
Luiz Augusto von Dentz
f6952b7e3a gobex: log headers using G_OBEX_DEBUG_HEADER 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
Luiz Augusto von Dentz
745e460a58 gobex: add missing checks for config.h 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
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
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
f8e95ce529 gobex: Make buffer parameter const for g_obex_header_new_bytes 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
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
007fe21a23 gobex: Add missing g_set_error in header parsing 2012-12-04 22:21:58 +01:00
Johan Hedberg
ad811dd51e gobex: Add support for on-demand headers 2012-12-04 22:21:58 +01:00
Johan Hedberg
54559a6cd1 gobex: Improve decoding error message 2012-12-04 22:21:57 +01:00
Johan Hedberg
aa1b87b6d8 gobex: Add initial GError support 2012-12-04 22:21:57 +01:00
Johan Hedberg
1dc2ad6f0b gobex: Use GLib size types 2012-12-04 22:21:57 +01:00
Johan Hedberg
b105277b97 gobex: Split gobex.c into multiple modules 2012-12-04 22:21:57 +01:00