Commit Graph

48 Commits

Author SHA1 Message Date
Frédéric Danis
3ecf9b3398 obexd: Add Properties to org.bluez.obex.Image
This allows to get the different version of the image provided by
the remote device to chose the one to use with Get.

This bip-common.[ch] files are based on previous work done by
Jakub Adamek for GSoC 2011, see [1] and [2].

[1] https://www.bluez.org/gsoc-basic-image-profilebip/
[2] https://github.com/enkait/Basic-Imaging-Profile-in-obexd/blob/gsoc_final/plugins/bip_util.c
2024-09-17 10:54:53 -04:00
Frédéric Danis
1a681aa014 obexd: Add BIP client for AVRCP cover art download
The cover art image handle is available in the metadata of the track
when the OBEX BIP session is connected to the PSM port provided
in AVRCP SDP record and available as org.bluez.MediaPlayer property.

This service allows to get the thumbnail.
2024-09-17 10:54:30 -04:00
Guido Günther
daa86e06c3 tools/mpris-proxy: Add systemd user unit
That way it will be started automatically which is convenient on phones.
Distributions can then decide part of which install the unit should be.

Signed-off-by: Guido Günther <agx@sigxcpu.org>
2024-09-09 13:02:38 -04:00
Luiz Augusto von Dentz
9cc8b97b8f build: obexd: Fix make distcheck
This fixes the following error:

/usr/bin/install: cannot remove
'/usr/share/dbus-1/services/org.bluez.obex.service': Permission denied
2024-03-04 13:10:54 -05:00
Emil Velikov
4d3605e472 build: obexd: remove duplicate include -I$(builddir)/lib
The -I$(builddir)/lib include is already in the AM_CPPFLAGS. Drop the
duplicate instance in obexd.
2024-02-20 08:55:15 -05:00
Emil Velikov
bade07f43f build: drop explicit -fPIC from obexd CFLAGS
The option is handled by the global --enable-pic. Drop the local
explicit argument.

With that we can drop the standalone CFLAGS.
2024-02-20 08:53:41 -05:00
Emil Velikov
c2b9f357d5 build: install obexd (dbus,systemd} services as needed
Currently we ship the service files, even when built with
--disable-obex.

Move the "if OBEX" guard few lines further up.
2024-02-20 08:50:50 -05:00
Emil Velikov
9fe4ccb79f build: rework {install-data,uninstall}-hook
Currently autoconfigure throws a useful error, about a duplicate
install-data-hook.

Address that by making the two target specific and pulling them as
dependencies.

We have to create empty ones otherwise dependency tracking and
resolution will fail.
2024-02-20 08:50:26 -05:00
Giovanni Campagna
b16b19885c Allow using obexd without systemd in the user session
Not all sessions run systemd --user and in some cases one may be missing
systemd all together.

Provide the correct path instead of /bin/false, allowing dbus to start
the service in such cases.

DBUS implementations can ignore the Exec line all together when run in
systemd aware mode - at least the OG dbus does that. So ultimately this
change is a no-op for the systemd --user case.

On my system, this is literally the only non-system service which uses
/bin/false.
2024-02-13 08:38:49 -05:00
Emil Velikov
004b5b28a0 obexd: factor out external plugin support
As a whole all plugins should be built-in, otherwise they would be using
internal, undocumented, unversioned, unstable API.

Flesh out the external plugin support into a few blocks and simplify the
normal path. Guard the external plugin support behind a runtime check,
which will be dead-code eliminated in the default case.

Hide the internal API (omit export-dynamic) when built without external
plugins.
2024-01-29 13:50:51 -05:00
Emil Velikov
1cd6c874c2 build: install dbus-org.bluez.obex.service symlink
obex.service has an alias(dbus-org.bluez.obex.service) which is created
as it's enabled. At the same time, the dbus service references the alias
itself.

Thus the dbus socket activation can happen, only when the service is
already enabled/running... Which defeats the whole purpose.

Create/install the respective symlink/alias, so that any user looking
for the dbus will start it.

Note: we need a hook here instead of LN_S to create the in-tree file,
since `install' aggressively dereferences it.
2024-01-25 13:46:12 -05:00
Emil Velikov
116524c01d build: manage .service.in files via configure.ac
Considering we do basic substitution, we don't need to manually sed,
track dependencies, dist nor clean. Just add the files to
AC_CONFIG_FILES() call it a day - it does everything for us.
2024-01-25 13:46:11 -05:00
Luiz Augusto von Dentz
cfab569484 build: Replace use of g_memdup with util_memdup
This replaces the uses of g_memdup with util_memdup since the former has
been deprecated:

  warning: ‘g_memdup’ is deprecated: Use 'g_memdup2' instead
  [-Wdeprecated-declarations]

g_memdup2 requires bumping glib version which would likely have its
own problems thus why util_memdup was introduced.
2022-01-06 12:58:39 -08:00
Luiz Augusto von Dentz
c37341904a obexd: Add missing phonebook backends
This adds missing phonebook backends to EXTRA_DIST so they can be build
from tarballs.

Fixes: https://github.com/bluez/bluez/issues/222
2021-10-26 11:17:42 -07:00
Luiz Augusto von Dentz
70807e8ff2 Makefile: Fix code style
Fix lines going over 80 columns.
2021-10-26 11:13:20 -07:00
Dylan Van Assche
edb86e5e01 configure.ac: add libebook dependency
Require libebook when phonebook-ebook plugin is built.
2021-07-23 14:47:37 -07:00
Juho Hamalainen
b1c73f4d4c configure.ac: specify phonebook plugin at build time
Various phonebook plugins are available, by default
phonebook-dummy is always built. Allow to specify
which plugin to use at build time.
2021-07-23 14:47:37 -07:00
Tedd Ho-Jeong An
3d22393db2 build: Add SPDX License Identifier
This patch adds SPDX License Identifier and removes the license text.

-------------------------------------
       License            COUNT
-------------------------------------
 GPL-2.0-or-later     :      6

License: GPL-2.0-or-later
   Makefile.am
   Makefile.mesh
   Makefile.obexd
   Makefile.plugins
   Makefile.tools
   configure.ac
2020-09-21 16:20:26 -07:00
Ross Burton
32e1f52469 Makefile.obexd: add missing mkdir in builtin.h generation
In parallel out-of-tree builds it's possible that obexd/src/builtin.h is
generated before the target directory has been implicitly created. Solve this by
creating the directory before writing into it.
2019-10-09 17:35:04 +03:00
Ludwig Nussel
d2a72dd671 install: Fix installations to pkglibexecdir
In 78bce4800 libexecdir was switched to pkglibexecdir. To use the
matching installation script, use pkglibexec_Programs instead of
libexec_Programs.
2019-06-04 13:25:54 -07:00
Jan Engelhardt
f54325e681 build: make building with --coverage work again
When `./configure --enable-coverage` is given and lcov is present,
MISC_CFLAGS and MISC_LDFLAGS will be set to --coverage. However,

1. obexd uses per-target LDFLAGS and, in doing so, forget to re-mention
$(AM_LDFLAGS). This problem existed for a long time.

2. obexd uses per-target CFLAGS and, in doing so, forgot to re-mention
$(AM_CFLAGS). This got broken in 06dbb223fb.

This led to no --coverage showing up in the linker line for obexd,
causing a link failure indicating unresolved symbols like
__gcov_exit.
2018-11-29 13:34:18 +02:00
Jan Engelhardt
06dbb223fb build: -D/-I arguments go into CPPFLAGS
-D and -I are preprocessor directives, they are therefore to appear
in CPPFLAGS, not CFLAGS. (It is unfortunate that pkg-config does not
make the distinction / or it was misnamed, because only -D/-I make
sense to be emitted by pkg-config in the first place — anything else
(-f/-m) has the potential to mess up someone's compilation. So
pkg-config's Cflags is actually used to convery Cppflags.)
2018-11-26 11:24:35 +02:00
Jan Engelhardt
bfede2a086 build: change @foo@ to $(foo) in automake makefiles
When using automake, all AC_SUBSTed variables are made available as
make variables, so that they can also be set at make time. Therefore,
they need not use the @harcoded@ style.
2018-11-26 11:24:34 +02:00
Luiz Augusto von Dentz
e8ae7a4f2d build: Fix make distcheck 2018-03-22 11:16:26 +02:00
Luiz Augusto von Dentz
bff0c2ae9f build: Fix not disabling obexd when given --disable-obex
--disable-obex shall disable building obexd daemon.
2018-03-22 10:35:17 +02:00
ERAMOTO Masaya
53f064d5c4 obexd: Remove unused source/header files for dbus
Due to using g_dbus_emit_property_changed() and g_dbus_get_properties(),
obex_dbus_signal_property_changed() is unused since commit 96063756
("obex-client: Rename org.bluez.obex.Transfer to Transfer1"), and
OBC_PROPERTIES_ARRAY_SIGNATURE macro is unused since commit 3eadc034
("obex-client: Make use of g_dbus_get_properties to get transfer properties").
2018-03-01 10:49:05 +02:00
Marcel Holtmann
a833587b52 build: Remove unneeded includes from obexd binaries 2015-03-01 00:48:41 -08:00
Szymon Janc
ab185a47d0 build-sys: Add missing $(AM_CFLAGS) to obexd_src_obexd_CFLAGS
This fix not passing extra build flags when --enable-maintainer-mode
is used.
2013-10-04 14:16:35 +03:00
Lucas De Marchi
c97860db27 build-sys: Don't build gdbus several times
We are currently compiling gdbus 3 times: one for tests, one for
bluetoothd and another for obexd.

$ ls gdbus/*watch.o
gdbus/bluetoothd-watch.o  gdbus/obexd-watch.o  gdbus/watch.o

Instead of prepending $(gdbus_sources) to several _SOURCES variable, use
a convenience library.
2013-07-18 07:31:50 -07:00
Lucas De Marchi
0585eb43c6 build-sys: Rename lib suffix to -internal
libbluetooth-private -> libbluetooth-internal
2013-07-18 07:31:50 -07:00
Christian Fetzer
24e5a587e4 build: Add support for building MAP notification dispatcher 2013-06-25 16:12:47 +03:00
Christian Fetzer
ae130d6e67 build: Add support for building MNS server 2013-04-10 14:51:09 +03:00
Marcel Holtmann
d452870662 build: Add systemd integration for obexd 2012-12-18 22:00:01 +01:00
Marcel Holtmann
403eeaa615 build: Use single section for all obexd sources 2012-12-18 21:18:19 +01:00
Johan Hedberg
91c50f7fa1 obexd: Merge obex-client into obexd daemon 2012-12-18 17:54:43 +02:00
Luiz Augusto von Dentz
0fea59d098 build: Remove obexd usb plugin
This plugin is not longer maintained and used to work only in meego
times.
2012-12-13 14:23:59 +02:00
Marcel Holtmann
679622277b build: Require phonebook support for IrMC profile 2012-12-11 17:21:01 +01:00
Marcel Holtmann
bde025b912 build: Add support for building Message Access profile 2012-12-10 22:06:22 +01:00
Marcel Holtmann
7004597f9f build: Add support for building Phonebook Access profile 2012-12-10 22:01:03 +01:00
Marcel Holtmann
c52d585169 build: Support OBEX USB and PC-Suite plugins 2012-12-10 22:01:03 +01:00
Marcel Holtmann
f2c695dd1d obexd: Build support for FTP and OBEX Push profiles 2012-12-10 14:39:49 +01: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
0375042892 Use entire include path for gobex.h 2012-12-05 17:23:04 +02:00
Lucas De Marchi
49b5612042 Use the entire include path for btio.h 2012-12-05 17:23: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
Chan-yeol Park
0048000276 build: Include bluetooth lib folder for obexd
Because obexd is included in bluez repo, obexd should refer to local
lib folder before system's one.
2012-12-05 10:40:41 +02:00
Marcel Holtmann
41aa85d123 build: Compile obexd and obex-client 2012-12-04 23:38:48 +01:00