From 2ae749fc2c8db2f573cd32f5f5f6a2647a262945 Mon Sep 17 00:00:00 2001 From: DoHyun Pyun Date: Fri, 28 Oct 2016 15:32:37 +0900 Subject: [PATCH] Enable the pbap server function in the platform Change-Id: I4a56f4d041c9c23612f3a35246555e5a9c675c93 Signed-off-by: DoHyun Pyun --- packaging/bluetooth-agent.spec | 5 ++++- packaging/bluetooth-pbap-agent.service | 11 +++++++++++ pb-agent/CMakeLists.txt | 7 ------- pb-agent/org.bluez.pb_agent.service | 5 ++--- 4 files changed, 17 insertions(+), 11 deletions(-) create mode 100644 packaging/bluetooth-pbap-agent.service diff --git a/packaging/bluetooth-agent.spec b/packaging/bluetooth-agent.spec index 1c4f4a2..1e8e649 100644 --- a/packaging/bluetooth-agent.spec +++ b/packaging/bluetooth-agent.spec @@ -104,12 +104,13 @@ install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-agent #%if 0%{?sec_product_feature_bt_map_server_enable} install -D -m 0644 packaging/bluetooth-map-agent.service %{buildroot}%{_libdir}/systemd/user/bluetooth-map-agent.service #%endif - +install -D -m 0644 packaging/bluetooth-pbap-agent.service %{buildroot}%{_libdir}/systemd/system/bluetooth-pbap-agent.service %post %if 0%{?sec_product_feature_bt_map_server_enable} ln -sf %{_libdir}/systemd/user/bluetooth-map-agent.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/ %endif +ln -sf %{_libdir}/systemd/system/bluetooth-pbap-agent.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/ %files %manifest %{name}.manifest @@ -118,6 +119,7 @@ ln -sf %{_libdir}/systemd/user/bluetooth-map-agent.service %{_sysconfdir}/system %{_bindir}/bluetooth-hf-agent %{_datadir}/dbus-1/system-services/org.bluez.hf_agent.service %exclude %{_libdir}/systemd/user/bluetooth-map-agent.service +%exclude %{_libdir}/systemd/user/bluetooth-pbap-agent.service %else %{_bindir}/bluetooth-ag-agent %{_bindir}/bluetooth-map-agent @@ -130,5 +132,6 @@ ln -sf %{_libdir}/systemd/user/bluetooth-map-agent.service %{_sysconfdir}/system %attr(0666,-,-) /var/lib/bluetooth/voice-recognition-blacklist %{_sysconfdir}/dbus-1/system.d/bluetooth-ag-agent.conf %{_libdir}/systemd/user/bluetooth-map-agent.service +%{_libdir}/systemd/system/bluetooth-pbap-agent.service %endif %{_datadir}/license/bluetooth-agent diff --git a/packaging/bluetooth-pbap-agent.service b/packaging/bluetooth-pbap-agent.service new file mode 100644 index 0000000..fe5578d --- /dev/null +++ b/packaging/bluetooth-pbap-agent.service @@ -0,0 +1,11 @@ +[Unit] +Description=Bluetooth PBAP Agent + +[Service] +User=owner +Group=users +SupplementaryGroups=priv_message_read +Type=dbus +BusName=org.bluez.pb_agent +SmackProcessLabel=User +ExecStart=/usr/bin/bluetooth-pb-agent diff --git a/pb-agent/CMakeLists.txt b/pb-agent/CMakeLists.txt index 1b8be77..8e64ce7 100644 --- a/pb-agent/CMakeLists.txt +++ b/pb-agent/CMakeLists.txt @@ -15,13 +15,6 @@ FOREACH(flag ${pkgs_pb_agent_CFLAGS}) ENDFOREACH(flag) SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC -Wall -Werror") -FIND_PROGRAM(DBUS_BINDING_TOOL NAMES dbus-binding-tool) -EXEC_PROGRAM("${DBUS_BINDING_TOOL}" - ARGS "--prefix=bluetooth_pb \\ - ${CMAKE_CURRENT_SOURCE_DIR}/bluetooth_pb_agent.xml \\ - --mode=glib-server \\ - --output=${CMAKE_CURRENT_SOURCE_DIR}/bluetooth_pb_agent_glue.h") - ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS}) TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_pb_agent_LDFLAGS}) diff --git a/pb-agent/org.bluez.pb_agent.service b/pb-agent/org.bluez.pb_agent.service index 001f2e5..1a8c43d 100644 --- a/pb-agent/org.bluez.pb_agent.service +++ b/pb-agent/org.bluez.pb_agent.service @@ -1,5 +1,4 @@ [D-BUS Service] Name=org.bluez.pb_agent -Exec=/usr/bin/bluetooth-pb-agent -User=network_fw -Group=network_fw \ No newline at end of file +Exec=/usr/bin/false +SystemdService=bluetooth-pbap-agent.service -- 2.7.4