Fix the build warnings and typo error 67/188967/1
authorDoHyun Pyun <dh79.pyun@samsung.com>
Wed, 12 Sep 2018 06:21:55 +0000 (15:21 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Wed, 12 Sep 2018 06:21:55 +0000 (15:21 +0900)
Change-Id: I45c386258f39a5dbf71555b4a058caebe16f71df
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
14 files changed:
bt-api/bt-gatt-client.c
bt-api/bt-gatt-service.c
bt-api/include/bt-gatt-client.h
bt-oal/bluez_hal/src/bt-hal-gatt-server.c
bt-oal/haltest/bluetooth_hal_tc.cpp
bt-oal/include/oal-avrcp-ct.h
bt-service-adaptation/services/audio/bt-service-audio.c
bt-service-adaptation/services/bt-request-handler.c
bt-service-adaptation/services/gatt/bt-service-gatt.c
bt-service/bt-service-audio.c
bt-service/bt-service-event-receiver.c
include/bluetooth-api.h
include/bluetooth-gatt-server-api.h
test/gatt-test/bluetooth-gatt-test.c

index a3258ee..3f92e17 100755 (executable)
@@ -2202,7 +2202,7 @@ static gboolean  bluetooth_gatt_client_notify_channel_watch_cb(GIOChannel *gio,
                        memcpy(char_val.prop.uuid, chr_info->UUID, 16);
                        memcpy(char_val.value, buffer, len);
                        char_val.val_len = len;
-                       memcpy(char_val.address, chr_info->adress, 18);
+                       memcpy(char_val.address, chr_info->address, 18);
 
                        event_info = _bt_event_get_cb_data(BT_GATT_CLIENT_EVENT);
 
@@ -2256,7 +2256,7 @@ static bt_gatt_characteristic_notify_info_t *  bluetooth_gatt_client_create_watc
        chr_info->notify_fd = fd;
        chr_info->id = id;
        chr_info->mtu = mtu;
-       g_strlcpy(chr_info->adress, address, 18);
+       g_strlcpy(chr_info->address, address, 18);
        memcpy(chr_info->UUID, uuid, 16);
 
        channel = g_io_channel_unix_new(fd);
index c819c59..4d30589 100644 (file)
@@ -3251,7 +3251,7 @@ static gboolean bluetooth_gatt_server_acquire_channel_write_cb(GIOChannel *gio,
 
        bluetooth_gatt_server_acquire_write_info_t *write_data =  (bluetooth_gatt_server_acquire_write_info_t*)data;
 
-       BT_INFO("FD io write data  received  remote adress  [%s]\n", write_data->adress);
+       BT_INFO("FD io write data  received  remote adress  [%s]\n", write_data->address);
 
        if (cond & G_IO_IN) {
                GIOStatus status = G_IO_STATUS_NORMAL;
@@ -3296,7 +3296,7 @@ static gboolean bluetooth_gatt_server_acquire_channel_write_cb(GIOChannel *gio,
                        write_info.need_resp = false;
                        write_info.attribute_handle = write_data->attribute_handle;
                        //memcpy()
-                       _bt_convert_addr_string_to_type(write_info.device_address.addr,  write_data->adress);
+                       _bt_convert_addr_string_to_type(write_info.device_address.addr,  write_data->address);
                        write_info.connection_id = write_data->connection_id;
                        write_info.offset = write_data->offset;
                        write_info.request_id = -2;
@@ -3383,9 +3383,9 @@ void  bluetooth_gatt_server_send_acquire_write_response(GVariant * parameters)
        write_info->connection_id  = tran_id;
        write_info->offset = offset;
 
-        memcpy(write_info->adress,  addr ,  BLUETOOTH_ADDRESS_STRING_LENGTH);
+        memcpy(write_info->address,  addr ,  BLUETOOTH_ADDRESS_STRING_LENGTH);
 
-       BT_INFO("FD read %d   remote adress  [%s ] \n", pipefd[0], addr);
+       BT_INFO("FD read %d   remote address  [%s ] \n", pipefd[0], addr);
 
 
        channel = g_io_channel_unix_new(pipefd[0]);
index c678658..4ecc07c 100644 (file)
@@ -54,7 +54,7 @@ typedef struct {
        int id;
        int mtu;
        unsigned char UUID[16];
-       char adress[BLUETOOTH_ADDRESS_STRING_LENGTH];
+       char address[BLUETOOTH_ADDRESS_STRING_LENGTH];
 } bt_gatt_characteristic_notify_info_t;
 
 
index 0aaa3b9..913c7b8 100644 (file)
@@ -1318,7 +1318,7 @@ static void __bt_gatt_char_method_call(GDBusConnection *connection,
 
                                _bt_hal_convert_device_path_to_address(dev_path, addr);
 
-                               DBG("remote adress %s", addr);
+                               DBG("remote address %s", addr);
 
                                /* Check if device is already in connected list */
                                conn_info = __bt_find_remote_gatt_client_info(addr);
@@ -1366,8 +1366,6 @@ static void __bt_gatt_char_method_call(GDBusConnection *connection,
                                struct gatt_service_info *svc_info = NULL;
                                struct gatt_client_info_t *conn_info = NULL;
                                struct gatt_req_info *req_info = NULL;
-                               char * link = 0;
-                               int len = 0;
 
                                DBG("AcquireNotify");
                                DBG("Application path = %s", object_path);
@@ -3060,7 +3058,6 @@ static bt_status_t gatt_server_send_acquire_response(int conn_id, int trans_id,
 
        struct gatt_req_info *req_info = NULL;
        struct gatt_client_info_t *conn_info = NULL;
-       int i;
 
        DBG("GATT Server Send Response Conn ID [%d]", conn_id);
 
index f53d4f4..aa18042 100644 (file)
@@ -178,7 +178,7 @@ TEST(BluetoothHAL_test, adapter_get_name_p) {
 TEST(BluetoothHAL_test, adapter_set_name_p) {
        int ret = OAL_STATUS_SUCCESS;
 
-       ret = adapter_set_name("TizenHAL");
+       ret = adapter_set_name((char *)"TizenHAL");
        ASSERT_TRUE(ret == OAL_STATUS_SUCCESS);
 
        wait_for_async(TIMEOUT_500MILISECONDS);
index 7839485..ddaa899 100644 (file)
@@ -232,6 +232,29 @@ oal_status_t avrcp_ct_next_track(bt_address_t *device_address);
 oal_status_t avrcp_ct_prev_track(bt_address_t *device_address);
 
 /**
+ * @brief Play volume up on the connected remote device.
+ *
+ * @return OAL_STATUS_SUCCESS on success, otherwise a non-zero error value.
+ * @retval #OAL_STATUS_SUCCESS Successful
+ *
+ * @pre A2DP Sink should be connected with a device.
+ * @pre AVRCP connection should exist with the device.
+ */
+oal_status_t avrcp_ct_volume_up(bt_address_t *device_address);
+
+/**
+ * @brief Play volume down on the connected remote device.
+ *
+ * @return OAL_STATUS_SUCCESS on success, otherwise a non-zero error value.
+ * @retval #OAL_STATUS_SUCCESS Successful
+ *
+ * @pre A2DP Sink should be connected with a device.
+ * @pre AVRCP connection should exist with the device.
+ */
+oal_status_t avrcp_ct_volume_down(bt_address_t *device_address);
+
+
+/**
  * @brief Set media player properties to target device
  *
  * @remarks Target device will receive media player properties.
index 6825750..6d5922e 100644 (file)
@@ -311,7 +311,7 @@ static int __bt_is_headset_connected(int current_conn_type, const char *address)
                return BLUETOOTH_ERROR_NOT_CONNECTED;
 #endif
 
-       /* Convert BD adress from string type */
+       /* Convert BD address from string type */
        _bt_convert_addr_string_to_type(device_address.addr, connected_address);
        int value = BLUETOOTH_ERROR_NONE;
        BT_DBG("Already connected headset addr  [%s] connected headset type [0x%x] current dev conn type [0x%x]",
index 2acfa31..28a950a 100644 (file)
@@ -2281,7 +2281,7 @@ int __bt_bluez_request(int function_name,
 
                BT_ERR("sending acquire write  respose sent \n  ");
 
-               fd_list_array = g_unix_fd_list_peek_fds(fd_list, &len);
+               fd_list_array = (int *)g_unix_fd_list_peek_fds(fd_list, &len);
                BT_INFO("Num fds in fd_list is : %d, fd_list[0]: %d", len, fd_list_array[0]);
                fd = fd_list_array[0];
 
@@ -2314,7 +2314,7 @@ int __bt_bluez_request(int function_name,
 
                BT_ERR("sending acquire write  respose sent \n  ");
 
-               fd_list_array = g_unix_fd_list_peek_fds(fd_list, &len);
+               fd_list_array = (int *)g_unix_fd_list_peek_fds(fd_list, &len);
                BT_INFO("Num fds in fd_list is : %d, fd_list[0]: %d", len, fd_list_array[0]);
                fd = fd_list_array[0];
 
index 8e5db8e..310387b 100644 (file)
@@ -1661,13 +1661,13 @@ static void __bt_handle_gatt_server_acquire_write_requested(event_gatts_srvc_acq
        int result = BLUETOOTH_ERROR_NONE;
        struct gatt_server_req_info *req_info = NULL;
        bluetooth_device_address_t dev_addr;
-       char  adress[BT_ADDRESS_STRING_SIZE] = {'/0',};
+       char address[BT_ADDRESS_STRING_SIZE] = { 0 };
 
        BT_INFO("GATT Server ACQUIRE  Write Req Connection ID: [%d]", event->attr_trans.conn_id);
        BT_INFO("GATT Server  ACQUIRE Write Req Transaction ID:[%d]", event->attr_trans.trans_id);
        BT_INFO("GATT Server ACQUIRE Write Req Attribute Handle: [%d]", event->attr_trans.attr_handle);
 
-       //adress = g_malloc0(BT_ADDRESS_STRING_SIZE);
+       //address = g_malloc0(BT_ADDRESS_STRING_SIZE);
        memcpy(dev_addr.addr, event->address.addr, 6);
 
        req_info = g_new0(struct gatt_server_req_info, 1);
@@ -1677,15 +1677,15 @@ static void __bt_handle_gatt_server_acquire_write_requested(event_gatts_srvc_acq
        req_info->request_type = BLUETOOTH_GATT_REQUEST_TYPE_ACQUIRE_WRITE;
        gatt_server_requests = g_slist_append(gatt_server_requests, req_info);
 
-       _bt_convert_addr_type_to_string(adress,
+       _bt_convert_addr_type_to_string(address,
                        (unsigned char *)dev_addr.addr);
 
        param = g_variant_new("(iiiiiis)", result,
                        event->attr_trans.conn_id,
                        event->attr_trans.trans_id,
                        event->attr_trans.attr_handle,
-                       event->mtu, event->attr_trans.offset, adress);
-       BT_INFO("GATT Server ACQUIRE Write Req Attribute remote adress : [%s]", adress);
+                       event->mtu, event->attr_trans.offset, address);
+       BT_INFO("GATT Server ACQUIRE Write Req Attribute remote address : [%s]", address);
 
        _bt_send_event(BT_GATT_SERVER_EVENT,
                        BLUETOOTH_EVENT_GATT_SERVER_ACQUIRE_WRITE,
index e9a53bb..8118f4e 100644 (file)
@@ -406,7 +406,7 @@ static int __bt_is_headset_connected(int type, int req_id,
                return BLUETOOTH_ERROR_NOT_CONNECTED;
 #endif
 
-       /* Convert BD adress from string type */
+       /* Convert BD address from string type */
        _bt_convert_addr_string_to_type(device_address.addr, connected_address);
        int value = BLUETOOTH_ERROR_NONE;
        value = _bt_audio_disconnect(0, connected_device->type & type, &device_address, NULL);
index 49e8c77..c66c1c5 100644 (file)
@@ -2544,7 +2544,7 @@ void _bt_handle_sink_event(GVariant *msg, const char *path)
                                if (connected) {
                                        /* Match connected device address */
                                        if (g_strcmp0(connected_address, address) != 0) {
-                                               /* Convert BD adress from string type */
+                                               /* Convert BD address from string type */
                                                _bt_convert_addr_string_to_type(
                                                                device_address.addr,
                                                                connected_address);
index 5ef0019..f63b194 100644 (file)
@@ -1640,7 +1640,7 @@ typedef struct {
 
 typedef struct {
        unsigned char UUID[16];
-       char adress[18];
+       char address[18];
        char *val;
        int len;
 } bt_gatt_notify_req_t ;
index 0475c27..89100ab 100644 (file)
@@ -172,7 +172,7 @@ typedef struct {
        int request_id;                                 /** < GATT Server Write Request ID */
        int attribute_handle;                           /** < GATT Server Write att handle */
        int offset;                             /** < GATT Server attribute offset */
-       char adress[BLUETOOTH_ADDRESS_STRING_LENGTH];
+       char address[BLUETOOTH_ADDRESS_STRING_LENGTH];
 } bluetooth_gatt_server_acquire_write_info_t;;
 
 
index d2738fc..cb7ef22 100755 (executable)
@@ -130,7 +130,7 @@ static void __accept_bdaddress(bluetooth_device_address_t *device_address)
 
        addr = get_bd_from_file(BD_ADDR_FILE);
        if (addr) {
-               TC_PRT("Remote bd adress from file: %s", addr);
+               TC_PRT("Remote bd address from file: %s", addr);
                convert_addr_string_to_addr_type(device_address, addr);
                g_free(addr);
                return;