./src/bt-hal-gatt-client.c
./src/bt-hal-hf-client.c
./src/bt-hal-hf-client-dbus-handler.c
-./src/bt-hal-mesh.c
-./src/bt-hal-mesh-dbus-handler.c
./src/bt-hal-tds.c
./src/bt-hal-tds-dbus-handler.c
./src/bt-hal-l2cap-le-dbus-handler.c
./src/bt-hal-socket-common.c
)
+IF("$ENV{CFLAGS}" MATCHES "-DTIZEN_FEATURE_MESH_SUPPORT")
+LIST(APPEND SRCS ./src/bt-hal-mesh.c)
+LIST(APPEND SRCS ./src/bt-hal-mesh-dbus-handler.c)
+ENDIF()
+
SET(PREFIX ${CMAKE_INSTALL_PREFIX})
SET(EXEC_PREFIX "\${prefix}")
SET(LIBDIR ${CMAKE_LIB_DIR})
gio-2.0
syspopup-caller
dbus-1
- ell
dlog
gobject-2.0
bundle
capi-system-info
)
+IF("$ENV{CFLAGS}" MATCHES "-DTIZEN_FEATURE_MESH_SUPPORT")
+LIST(APPEND PKG_MODULES ell)
+ENDIF()
+
INCLUDE(FindPkgConfig)
pkg_check_modules(bluez_hal_pkgs REQUIRED ${PKG_MODULES})
if (!strcmp(profile_id, BT_PROFILE_ADVANCED_AUDIO_SINK_ID))
return bt_get_a2dp_sink_interface();
+#ifdef TIZEN_FEATURE_MESH_SUPPORT
if (!strcmp(profile_id, BT_PROFILE_MESH_ID)) {
INFO("Mesh: Get MESH Stack Interface");
return bt_get_mesh_interface();
}
+#endif
if (!strcmp(profile_id, BT_PROFILE_TDS_ID))
return bt_get_tds_interface();
./services/audio/bt-service-absolute-volume.c
./services/gatt/bt-service-gatt.c
./services/audio/hf/bt-service-hf-client.c
-./services/mesh/bt-service-mesh-util.c
-./services/mesh/bt-service-mesh-keys.c
-./services/mesh/bt-service-mesh-cdb.c
-./services/mesh/bt-service-mesh-nodes.c
-./services/mesh/bt-service-mesh-network.c
-./services/mesh/bt-service-mesh-main.c
-./services/mesh/bt-service-mesh-config-client.c
-./services/mesh/bt-service-mesh-model.c
./services/tds/bt-service-tds.c
./services/l2cap_le/bt-service-l2cap-le.c
)
LIST(APPEND SRCS ./services/ipsp/bt-service-ipsp-event-receiver.c)
ENDIF()
+IF("$ENV{CFLAGS}" MATCHES "-DTIZEN_FEATURE_MESH_SUPPORT")
+LIST(APPEND SRCS ./services/mesh/bt-service-mesh-util.c)
+LIST(APPEND SRCS ./services/mesh/bt-service-mesh-keys.c)
+LIST(APPEND SRCS ./services/mesh/bt-service-mesh-cdb.c)
+LIST(APPEND SRCS ./services/mesh/bt-service-mesh-nodes.c)
+LIST(APPEND SRCS ./services/mesh/bt-service-mesh-network.c)
+LIST(APPEND SRCS ./services/mesh/bt-service-mesh-main.c)
+LIST(APPEND SRCS ./services/mesh/bt-service-mesh-config-client.c)
+LIST(APPEND SRCS ./services/mesh/bt-service-mesh-model.c)
+ENDIF()
+
IF("${CMAKE_BUILD_TYPE}" STREQUAL "")
SET(CMAKE_BUILD_TYPE "Release")
ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "")
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../bt-oal/include)
LINK_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../bt-oal)
-IF("$ENV{CFLAGS}" MATCHES "-DTIZEN_FEATURE_BT_FACTORY_MODE")
SET(PKG_MODULES
vconf
dbus-1
cynara-client
cynara-creds-gdbus
aul
- json-c
- ell
- eventsystem
- storage
- capi-system-info
- libsystemd
- bincfg
- libactd
-)
-ELSE()
-SET(PKG_MODULES
- vconf
- dbus-1
- gio-2.0
- gio-unix-2.0
- alarm-service
- capi-network-connection
- cynara-client
- cynara-creds-gdbus
- aul
- json-c
- ell
eventsystem
storage
capi-system-info
libsystemd
libactd
)
+
+IF("$ENV{CFLAGS}" MATCHES "-DTIZEN_FEATURE_BT_FACTORY_MODE")
+LIST(APPEND PKG_MODULES bincfg)
+ENDIF()
+
+IF("$ENV{CFLAGS}" MATCHES "-DTIZEN_FEATURE_MESH_SUPPORT")
+LIST(APPEND PKG_MODULES json-c ell)
ENDIF()
INCLUDE(FindPkgConfig)
is_le_scan_hold = FALSE;
scanner->is_scanning = TRUE;
return BLUETOOTH_ERROR_DEVICE_BUSY;
+#ifdef TIZEN_FEATURE_MESH_SUPPORT
} else if (_bt_is_mesh_initialized()) {
/* Do not stop LE scan if BLE mesh running */
int value = 0;
_bt_set_le_scan_stop_requested(FALSE);
is_mesh_le_scan_stop_hold = true;
result = BLUETOOTH_ERROR_NONE;
+#endif
} else {
BT_INFO("Just stop LE scan");
ret = gattc_stop_le_discovery(g_gatt_client_id);
break;
}
+#ifdef TIZEN_FEATURE_MESH_SUPPORT
case BT_MESH_INIT:
sender = (char*)g_dbus_method_invocation_get_sender(context);
BT_INFO("Mesh: Init by [%s]", sender);
requester_unique_creds, sender, &network, out_param1);
break;
}
+#endif
case BT_L2CAP_LE_CLIENT_CONNECT: {
bluetooth_device_address_t address = { {0} };
int psm;
/* Check if RFCOMM app is terminated */
_bt_rfcomm_check_termination(name);
+#ifdef TIZEN_FEATURE_MESH_SUPPORT
/* Mesh App Termination */
_bt_check_mesh_app_termination(name);
+#endif
/* Stop the Transport Discovery service */
_bt_tds_stop_by_terminated_process(name);
#include <sys/socket.h>
#include <bundle.h>
#include <eventsystem.h>
+#ifdef TIZEN_FEATURE_MESH_SUPPORT
#include <ell/ell.h>
+#endif
#include "bt-internal-types.h"
#include "bt-service-common.h"
#include <oal-event.h>
#include <oal-manager.h>
-/* ELL Start */
+#ifdef TIZEN_FEATURE_MESH_SUPPORT
struct ell_event_source {
GSource source;
GPollFD pollfd;
.prepare = event_prepare,
.check = event_check,
};
-/* ELL End */
+#endif
static GMainLoop *main_loop;
static gboolean terminated = FALSE;
int main(void)
{
struct sigaction sa;
- /* ELL Start */
+#ifdef TIZEN_FEATURE_MESH_SUPPORT
struct ell_event_source *source;
- /* ELL End */
+#endif
BT_INFO_C("### Starting the bt-service daemon");
if (!TIZEN_FEATURE_BT_SUPPORTED) {
return 0;
}
- /* ELL Start */
+#ifdef TIZEN_FEATURE_MESH_SUPPORT
BT_INFO("ELL Main init");
l_main_init();
- /* ELL End */
+#endif
bluetooth_plugin_init();
main_loop = g_main_loop_new(NULL, FALSE);
- /* ELL Start */
+#ifdef TIZEN_FEATURE_MESH_SUPPORT
source = (struct ell_event_source *) g_source_new(&event_funcs,
sizeof(struct ell_event_source));
g_source_add_poll((GSource *)source, &source->pollfd);
g_source_attach((GSource *) source,
g_main_loop_get_context(main_loop));
+#endif
- /* ELL End */
g_main_loop_run(main_loop);
BT_DBG("g_main_loop_quit called!");
_bt_service_unref_connection();
- /* ELL Start */
+#ifdef TIZEN_FEATURE_MESH_SUPPORT
g_source_destroy((GSource *) source);
- /* ELL End */
+#endif
if (main_loop != NULL)
g_main_loop_unref(main_loop);
if (terminated == FALSE)
__bt_release_service();
- /* ELL Start */
+#ifdef TIZEN_FEATURE_MESH_SUPPORT
l_main_exit();
- /* ELL End */
+#endif
return 0;
}
#ifndef BT_SERVICE_MESH_CDB_H_
#define BT_SERVICE_MESH_CDB_H_
+#ifdef TIZEN_FEATURE_MESH_SUPPORT
#include <glib.h>
#include <sys/types.h>
#include "bluetooth-api.h"
#ifdef __cplusplus
}
#endif /* __cplusplus */
+#endif /* TIZEN_FEATURE_MESH_SUPPORT */
#endif /* BT_SERVICE_MESH_CDB_H_ */
#include <sys/types.h>
#include "bluetooth-api.h"
#include "bluetooth-mesh-api.h"
-#include <json-c/json.h>
#include "oal-mesh.h"
#ifdef __cplusplus
#include <sys/types.h>
#include "bluetooth-api.h"
#include "bluetooth-mesh-api.h"
-#include <json-c/json.h>
#include "oal-mesh.h"
#ifdef __cplusplus
#include <sys/types.h>
#include "bluetooth-api.h"
#include "bluetooth-mesh-api.h"
-#include <json-c/json.h>
#ifdef __cplusplus
extern "C" {
#include <sys/types.h>
#include "bluetooth-api.h"
#include "bluetooth-mesh-api.h"
-#include <json-c/json.h>
#include "oal-mesh.h"
#ifdef __cplusplus
int _bt_mesh_network_remove_net_configuration(bluetooth_mesh_network_t *net);
+#ifdef TIZEN_FEATURE_MESH_SUPPORT
void _bt_mesh_network_unload_net_configuration(_bt_mesh_cdb_t *cdb_cfg);
+#endif
int _bt_mesh_network_remove_node_configuration(bluetooth_mesh_node_info_t *node);
#include <sys/types.h>
#include "bluetooth-api.h"
#include "bluetooth-mesh-api.h"
-#include <json-c/json.h>
#ifdef __cplusplus
extern "C" {
%define bt_http_proxy DISABLED
%define bt_factory_mode DISABLED
%define bt_vendor_operation DISABLED
+%if "%{mv_prj}" == "1"
+%define bt_mesh_support DISABLED
+%else
+%define bt_mesh_support ENABLED
+%endif
BuildRequires: pkgconfig(aul)
%if %{bt_factory_mode} == ENABLED
BuildRequires: pkgconfig(cynara-client)
BuildRequires: pkgconfig(cynara-creds-gdbus)
BuildRequires: pkgconfig(libtzplatform-config)
+%if %{bt_mesh_support} == ENABLED
BuildRequires: pkgconfig(json-c)
BuildRequires: pkgconfig(ell)
+%endif
BuildRequires: pkgconfig(storage)
BuildRequires: pkgconfig(capi-system-info)
BuildRequires: pkgconfig(capi-appfw-app-control)
export BT_INCLUDE_OAL_BLUEZ=DISABLED
%endif
+%if %{bt_mesh_support} == ENABLED
+export CFLAGS="$CFLAGS -DTIZEN_FEATURE_MESH_SUPPORT"
+%endif
+
export CFLAGS_DEFAULT="$CFLAGS"
export CXXFLAGS_DEFAULT="$CXXFLAGS"
export FFLAGS_DEFAULT="$FFLAGS"