Fix the memory leak
[platform/core/connectivity/bluetooth-frwk.git] / include / bt-internal-types.h
index f8e577a..95794dc 100644 (file)
@@ -87,15 +87,11 @@ typedef enum {
 //#ifndef GATT_DIRECT
        BT_GATT_SERVER_EVENT,
 //#endif
-#ifdef TIZEN_GATT_CLIENT
        BT_GATT_CLIENT_EVENT,
-#endif
        BT_TDS_EVENT,
        BT_OTP_EVENT,
        BT_HDP_EVENT,
-#ifdef TIZEN_FEATURE_BT_AVC_TARGET
        BT_AUDIO_AVC_EVENT,
-#endif
        BT_MESH_EVENT,
        /* Will be added */
 } bt_event_type_t;
@@ -370,23 +366,19 @@ typedef enum {
        BT_HDP_GET_FD,
 
        BT_GATT_GET_PRIMARY_SERVICES = BT_FUNC_GATT_BASE, /* GATT Client */
-#ifdef TIZEN_GATT_CLIENT
        BT_GATT_CLIENT_REGISTER,        /* GATT Client */
        BT_GATT_CLIENT_UNREGISTER,      /* GATT Client */
        BT_GATT_GET_SERVICE_PROPERTIES, /* GATT Client */
        BT_GATT_GET_CHARACTERISTIC_PROPERTIES, /* GATT Client */
        BT_GATT_GET_INCLUDED_SERVICES,          /* GATT Client */
-#endif
        BT_GATT_DISCOVER_CHARACTERISTICS,
        BT_GATT_SET_PROPERTY_REQUEST,
        BT_GATT_READ_CHARACTERISTIC, /* GATT Client*/
-#ifdef TIZEN_GATT_CLIENT
        BT_GATT_READ_DESCRIPTOR_VALUE, /* GATT Client */
        BT_GATT_WRITE_CHARACTERISTIC_VALUE_BY_TYPE, /* GATT Client */
        BT_GATT_WRITE_DESCRIPTOR_VALUE, /* GATT Client */
        BT_GATT_WATCH_SERVICE_CHANGED_INDICATION, /* GATT Client */
        BT_GATT_ACQUIRE_WRITE, /* GATT Client */
-#endif
        BT_GATT_DISCOVER_CHARACTERISTICS_DESCRIPTOR,
 #ifndef GATT_NO_RELAY
        BT_GATT_WATCH_CHARACTERISTIC,
@@ -477,7 +469,9 @@ typedef enum {
        BT_MESH_INIT = BT_FUNC_MESH_BASE,
        BT_MESH_DEINIT,
        BT_MESH_NETWORK_CREATE,
+       BT_MESH_NETWORK_DESTROY,
        BT_MESH_NETWORK_LOAD,
+       BT_MESH_NETWORK_UNLOAD,
        BT_MESH_NETWORK_SCAN,
        BT_MESH_NETWORK_CANCEL_SCAN,
        BT_MESH_NETWORK_SET_CAPABILITIES,
@@ -500,12 +494,15 @@ typedef enum {
        BT_MESH_NODE_TTL_EXECUTE,
        BT_MESH_NODE_GET_NETKEYS,
        BT_MESH_NODE_GET_APPKEYS,
+       BT_MESH_NODE_RESET,
        BT_MESH_MODEL_CONFIGURE_APPKEY,
        BT_MESH_MODEL_GET_APPKEY_LIST,
+       BT_MESH_MODEL_EXECUTE_MSG,
        BT_MESH_MODEL_GET_SUBSCRIPTION_LIST,
        BT_MESH_MODEL_SET_PUBLICATION,
        BT_MESH_MODEL_GET_PUBLICATION,
        BT_MESH_NETWORK_CREATE_GROUP,
+       BT_MESH_NETWORK_REMOVE_GROUP,
        BT_MESH_NETWORK_GET_GROUPS,
        BT_MESH_MODEL_CONFIG_GROUP_SUB,
        BT_MESH_MODEL_CONFIG_VIRTUAL_GROUP_SUB
@@ -526,9 +523,7 @@ typedef struct {
 /* Need to convert the design ID */
 #define BT_STR_NOT_SUPPORT "Not support"
 
-#ifdef TIZEN_FEATURE_BT_DPM
 #define BT_DPM_SYSPOPUP "dpm-syspopup"
-#endif
 
 #define BT_FILE_VISIBLE_TIME "file/private/libug-setting-bluetooth-efl/visibility_time"
 
@@ -573,13 +568,9 @@ typedef struct {
 #define BT_GATT_SERVER_PATH "/org/projectx/bt/gatt_server"
 #endif
 
-#ifdef TIZEN_GATT_CLIENT
 #define BT_GATT_CLIENT_PATH "/org/projectx/bt/gatt_client"
-#endif
 
-#ifdef TIZEN_FEATURE_BT_AVC_TARGET
 #define BT_AUDIO_AVC_PATH "/org/projectx/bt/avc_mode"
-#endif
 
 #define BT_MESH_PATH "/org/projectx/bt/mesh"
 
@@ -683,15 +674,10 @@ typedef struct {
 #define BT_MEDIA_VOLUME_CHANGE "MediaVolumeStatus"
 #define BT_NAME_OWNER_CHANGED "NameOwnerChanged"
 
-#ifdef TIZEN_GATT_CLIENT
 #define BT_GATT_SERVER_CONNECTED "GattServerConnected"
 #define BT_GATT_SERVER_DISCONNECTED "GattServerDisconnected"
 #define BT_GATT_CLIENT_CONNECTED "GattClientConnected"
 #define BT_GATT_CLIENT_DISCONNECTED "GattClientDisconnected"
-#else
-#define BT_GATT_CONNECTED "GattConnected"
-#define BT_GATT_DISCONNECTED "GattDisconnected"
-#endif
 
 #ifndef GATT_DIRECT
 #define BT_GATT_VALUE_CHANGED "GattValueChanged"
@@ -702,13 +688,11 @@ typedef struct {
 #define BT_GATT_SERVER_ACQUIRE_NOTIFICATION "GattServerAcquireNotify"
 #endif
 
-#ifdef TIZEN_GATT_CLIENT
 #define BT_GATT_CLIENT_READ_CHAR "GattReadCharValue"
 #define BT_GATT_CLIENT_WRITE_CHAR "GattWriteCharValue"
 #define BT_GATT_CLIENT_READ_DESC "GattReadDescriptor"
 #define BT_GATT_CLIENT_WRITE_DESC "GattWriteDescriptor"
 #define BT_GATT_CLIENT_SERVICE_CHANGED "GattServiceChanged"
-#endif
 
 #define BT_GATT_REQ_ATT_MTU_CHANGED "GattReqAttMtuChanged"
 #define BT_GATT_SERVER_ATT_MTU_CHANGED "GattServerAttMtuChanged"
@@ -744,10 +728,7 @@ typedef struct {
 #define BT_OTP_WRITE_CHAR_VAL "OtpWriteCharVal"
 #define BT_OTP_INDICATION "OtpIndication"
 #define BT_OTC_STATE_CHANGED "OtcStateChanged"
-
-#ifdef TIZEN_FEATURE_BT_AVC_TARGET
 #define BT_AUDIO_AVC_MODE_CHANGED "AvcModeChanged"
-#endif
 
 #define HEADED_PLUGIN_FILEPATH "/usr/lib/bt-plugin-headed.so"
 #define HEADED_PLUGIN_FILEPATH64 "/usr/lib64/bt-plugin-headed.so"
@@ -763,6 +744,7 @@ typedef struct {
 #define BT_MESH_NODE_KEY_CONFIGURED "MeshNodeKeyConfigured"
 #define BT_MESH_NODE_TTL_CONFIGURED "MeshNodeTTLConfigured"
 #define BT_MESH_MODEL_APPKEY_CONFIGURED  "MeshModelAppKeyConfigured"
+#define BT_MESH_MODEL_MSG_EXECUTED  "MeshModelMsgExecuted"
 #define BT_MESH_MODEL_APPKEY_LIST "MeshModelAppKeyList"
 #define BT_MESH_MODEL_SUB_LIST "MeshModelSubscriptionList"
 #define BT_MESH_MODEL_SUB_CONF "MeshModelSubConfiguration"
@@ -771,6 +753,9 @@ typedef struct {
 
 #define BT_FEATURE_COMMON "http://tizen.org/feature/network.bluetooth"
 #define BT_FEATURE_OPP "http://tizen.org/feature/network.bluetooth.opp"
+#define BT_FEATURE_AUDIO_CALL "http://tizen.org/feature/network.bluetooth.audio.call"
+#define BT_FEATURE_HID_DEVICE "http://tizen.org/feature/network.bluetooth.hid_device"
+#define BT_FEATURE_PBAP "http://tizen.org/feature/network.bluetooth.phonebook.client"
 
 struct bluetooth_headed_plugin_t {
        int (*bt_launch_dpmpopup) (char *mode);
@@ -925,6 +910,9 @@ static inline bool get_tizen_feature_supported(char *feature)
 #define TIZEN_FEATURE_BLUEZ_SPEAKER_REFERENCE ((get_tizen_model()) == _MODEL_RPI3 && (get_tizen_profile()) == _PROFILE_COMMON)
 #define TIZEN_FEATURE_BT_SUPPORTED (get_tizen_feature_supported(BT_FEATURE_COMMON) == true)
 #define TIZEN_FEATURE_OPP_SUPPORTED (get_tizen_feature_supported(BT_FEATURE_OPP) == true)
+#define TIZEN_FEATURE_AUDIO_CALL_SUPPORTED (get_tizen_feature_supported(BT_FEATURE_AUDIO_CALL) == true)
+#define TIZEN_FEATURE_HID_DEVICE_SUPPORTED (get_tizen_feature_supported(BT_FEATURE_HID_DEVICE) == true)
+#define TIZEN_FEATURE_PBAP_SUPPORTED (get_tizen_feature_supported(BT_FEATURE_PBAP) == true)
 
 #ifdef __cplusplus
 }