INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
INCLUDE(FindPkgConfig)
-pkg_check_modules(pkgs REQUIRED dlog vconf gio-2.0 gio-unix-2.0 eventsystem capi-system-info)
+pkg_check_modules(pkgs REQUIRED dlog vconf gio-2.0 gio-unix-2.0 eventsystem capi-system-info libactd)
FOREACH(flag ${pkgs_CFLAGS})
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
#include <bundle.h>
#include <eventsystem.h>
#include <stdio.h>
+#ifdef TIZEN_FEATURE_ACTD
+#include <actd/unit_control.h>
+#endif
#include "bt-core-main.h"
#include "bt-core-adapter.h"
}
}
+#ifdef TIZEN_FEATURE_ACTD
+static int __bt_call_systemact_service(const char *service_name)
+{
+ int ret;
+
+ BT_DBG("Use System Activated : %s", service_name);
+
+ ret = actd_start_unit(UNIT_CONTROL_BUS_TYPE_SYSTEM, service_name, 5000);
+
+ if (ret != UNIT_CONTROL_OK) {
+ BT_ERR("Failed to activate the %s: %d", service_name, ret);
+ /* Return Success even if the activating result is fail */
+ return 0;
+ }
+
+ return 0;
+}
+#else
static int __bt_call_systemact_service(const char *file_path)
{
BT_DBG("+");
return 0;
}
+#endif
static int __execute_command(const char *cmd, char *const arg_list[])
{
#define BT_CORE_NAME "org.projectx.bt_core"
#define BT_CORE_PATH "/org/projectx/bt_core"
+#ifdef TIZEN_FEATURE_ACTD
+#define BT_SYSTEMACT_HCI_LOGGER_START "bluetooth-hci-logger.service"
+#define BT_SYSTEMACT_HCI_LOGGER_STOP "bluetooth-hci-logger-stop.service"
+#define BT_SYSTEMACT_HCI_UP "bluetooth-hci-up.service"
+#define BT_SYSTEMACT_HCI_DOWN "bluetooth-hci-down.service"
+#define BT_SYSTEMACT_BLUEZ_START "bluez-start.service"
+#define BT_SYSTEMACT_BLUETOOTH_SHARE_START "bluetooth-share-start.service"
+#define BT_SYSTEMACT_RFKILL_UNBLOCK "bluetooth-rfkill-unblock.service"
+#define BT_SYSTEMACT_RFKILL_BLOCK "bluetooth-rfkill-block.service"
+#define BT_SYSTEMACT_STACK_UP "bluetooth-stack-up.service"
+#define BT_SYSTEMACT_STACK_DOWN "bluetooth-stack-down.service"
+#define BT_SYSTEMACT_STACK_DOWN_WITH_RADIO "bluetooth-stack-down-with-radio.service"
+#else
#define BT_SYSTEMACT_HCI_LOGGER_START "/run/.hci_logger_start"
#define BT_SYSTEMACT_HCI_LOGGER_STOP "/run/.hci_logger_stop"
#define BT_SYSTEMACT_HCI_UP "/run/.hci_up"
#define BT_SYSTEMACT_STACK_UP "/run/.bt_stack_up"
#define BT_SYSTEMACT_STACK_DOWN "/run/.bt_stack_down"
#define BT_SYSTEMACT_STACK_DOWN_WITH_RADIO "/run/.bt_stack_down_with_radio"
+#endif
#define BT_CORE_TYPE (bt_core_get_type())
BuildRequires: pkgconfig(capi-system-info)
BuildRequires: pkgconfig(capi-appfw-app-control)
BuildRequires: pkgconfig(gmock)
+BuildRequires: pkgconfig(libactd)
Requires(post): /usr/bin/vconftool
Requires(post): /sbin/ldconfig
export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
export CFLAGS="$CFLAGS -DTIZEN_GATT_CLIENT"
+export CFLAGS="$CFLAGS -DTIZEN_FEATURE_ACTD"
%define _servicefile packaging/bluetooth-frwk-common.service
%define _servicedir starter.target.wants