Commit Graph

31 Commits

Author SHA1 Message Date
Johan Hedberg
4794363f19 obexd: Update string enumeration values to lower case 2012-12-22 18:30:05 +02:00
Luiz Augusto von Dentz
939cebb9f3 obex-client: Rename org.bluez.obex.Synchronization to Synchronization1
Rename the interface and move it to obexd-api.txt since it now belongs
to the same daemon.
2012-12-21 12:01:07 +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
aa77b0bea9 Use the entire include path for gdbus.h 2012-12-05 17:23:03 +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
dea7c760ce obexd: Rename Synchronization interface to org.bluez.obex.Synchronization 2012-12-04 22:49:02 +01:00
Mikel Astiz
0a174f40c6 obexd: Synchronization sessions return transfers
Return the D-Bus path of the transfer representing the operation.
2012-12-04 22:49:01 +01:00
Lucas De Marchi
9692e783c3 obexd: Do not set signature and reply in GDBus tables
Use GDBUS_* macros, so signature and reply fields are not set in each
method/signal.
2012-12-04 22:48:59 +01:00
Lucas De Marchi
d67b588d2b obexd: Convert GDBus methods to use macro helpers
With these macro helpers we can separate in/out arguments and use their
own vector.
2012-12-04 22:48:59 +01:00
Marcel Holtmann
fc009dd49e obexd: Constify GDBus method tables
Constify method tables with the following command:

find . -name '*.[ch]' -exec \
         sed -i 's/\(GDBusMethodTable .* =\)/const \1/g' {} \;
2012-12-04 22:48:59 +01:00
Luiz Augusto von Dentz
fcd02ad59b obexd: Add obc_transfer_set_params to set application parameters
The parameters are optional and only used in a few occasions so it
doesn't make sense to have that directly in obc_transfer_get and
obc_transfer_put.
2012-12-04 22:48:59 +01:00
Mikel Astiz
9b883a0264 obexd: Create transfers in modules
After this patch the modules are responsible for creating the transfers,
and these objects must be queued using the session API.

This way the transfer initiator has full access to the transfer object,
in case for example it wants to access some member variable.
2012-12-04 22:48:59 +01:00
Mikel Astiz
6fb9a7a84b obexd: Use new session callback style in modules
The session API now provides the transfer object in the callback, so
the modules can directly access the transfer object.
2012-12-04 22:48:58 +01:00
Mikel Astiz
b782daebcd obexd: Give transfer pointer in session callbacks
Operations involving a transfer object will receive a pointer to such
transfer in the callback.

Note that the ownership of this object is not changed in any way,
meaning that the session is still responsible for it. However this
pointer can be useful during the execution of the callback, in order to
access data members of the transfer.
2012-12-04 22:48:58 +01:00
Luiz Augusto von Dentz
4d0d679535 obexd: Fix not propagating GError in session API functions
The errors should be properly forward to the caller and not just convert
to generic error.
2012-12-04 22:48:57 +01:00
Luiz Augusto von Dentz
0cdd9bd069 obexd: Remove buffer based transfer
Simplify the code by using temporary files and eliminates reallocations.
2012-12-04 22:48:57 +01:00
Luiz Augusto von Dentz
7aa89d5567 obexd: fix circular dependency of session and transfer
Currently the code has to to pass session to transfer via user data
(void *) only to be casted to session.
2012-12-04 22:48:51 +01:00
Luiz Augusto von Dentz
0e31d0f56b obexd: port to gobex
This remove gwobex dependency of the client using gobex instead.

Based on initial work by Johan Hedberg <johan.hedberg@intel.com>
2012-12-04 22:48:43 +01:00
Luiz Augusto von Dentz
3fbffebe57 obexd: add sync target
sync target implements sync driver
2012-12-04 22:48:42 +01:00
Luiz Augusto von Dentz
29eb13b108 obexd: make use of obc_ prefix for public functions
This should indicate more clearer which function are public to the
drivers.
2012-12-04 22:48:42 +01:00
Luiz Augusto von Dentz
b5c28914a1 obexd: make transfer structure private
This make it easier to modularize obex-client
2012-12-04 22:48:41 +01:00
Luiz Augusto von Dentz
d06d20882a obexd: make session structure private
Session data should not be acessible directly otherwise it cause too
much dependency by profile specific code which is quite inefficient in
the long term.
2012-12-04 22:48:41 +01:00
Luiz Augusto von Dentz
1759d7153c obexd: Make sure errors are reported properly to applications
Error message were most of the time empty.

Thanks for Vitja Makarov <vitja.makarov@gmail.com> for reporting this.
2012-12-04 22:48:24 +01:00
Luiz Augusto Von Dentz
9ce74b2d68 obexd: Move transfer implementation to its own file 2012-12-04 22:48:12 +01:00
Luiz Augusto Von Dentz
296e697160 obexd: Fix agent not being released after transfers complete
This requession was introduced by d57bffe46b71e17a640c11b389dd6da95f933729
that add another reference to the session for the agent.

To fix this a rework on refcount was done so that transfer now hold
references to the session and once done they release the references one
by one.
2012-12-04 22:48:12 +01:00
Marcel Holtmann
c081792026 obexd: Update Intel copyrights 2012-12-04 22:48:07 +01:00
Marcel Holtmann
4174e904a2 obexd: Update copyright information 2012-12-04 22:48:07 +01:00
Forrest Zhao
fba78dbad8 obexd: add support for Sync Putphonebook 2012-12-04 22:48:00 +01:00
Forrest Zhao
2077c66ccf obexd: add support for Sync Getphonebook 2012-12-04 22:48:00 +01:00
Marcel Holtmann
e356b2e9ff obexd: Fix compiler warning 2012-12-04 22:48:00 +01:00
Forrest Zhao
6a19f9408f obexd: add initial framework support for SYNC client 2012-12-04 22:48:00 +01:00