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
If we don't force the symlink creation the build fails when the link
already exists. This happens if the rule to create the link is triggered
again because the file it points to changed. This is the case when doing
incremental builds and we modified the file.
$ make
$ touch lib/cmtp.h
$ make
GEN lib/bluetooth/cmtp.h
ln: failed to create symbolic link ‘lib/bluetooth/cmtp.h’: File exists
make: *** [lib/bluetooth/cmtp.h] Error 1
make: *** Waiting for unfinished jobs....
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.
After the decision to drop the "default-adapter" feature in the D-Bus
API, the org.bluez.Manager interface can be entirely dropped since it
has been replaced by the ObjectManager.
suspend.c is a symlink generated at build time, therefore it should be
created on build directory. Additionally, it is necessary to add
-I$(srcdir)/profiles/input to CPPFLAGS so suspend.h can be found (the
compiler does not follow symlinks prior to resolving #include
directives).
The dummy backend was always being compiled and the --with-hog-suspend
option was not being accepted by configure. Now the backend can be
selected with --with-hog-suspend and the suspend implementation file is
generated during compile time.
This allows oob plugin to register for callback after executing
certain action on adapter. Currently reading local OOB data and
pairing is supported. It should be easy to support more callbacks
in future if needed e.g. powering on.
Thanks to this plugin is not required to duplicate code that would
validate adapter/device when callback is received as callback condition
is check in adapter.
It also allows to pass user data which will be provided back when cb
is called further reducing plugin code.