+static bluetooth_ibeacon_device_info_t *__bt_get_ibeacon_device_info_in_message(GVariant *parameters, int *ret)
+{
+ bluetooth_ibeacon_device_info_t *ibeacon_dev_info = NULL;
+ const char *address = NULL;
+ short addr_type = 0;
+ int company_id = 0;
+ int ibeacon_type = 0;
+ int major_id = 0;
+ int minor_id = 0;
+ int measured_power = 0;
+ const char *uuid = NULL;
+ int result = BLUETOOTH_ERROR_NONE;
+
+ g_variant_get(parameters, "(i&snnn&snnn)", &result, &address,
+ &addr_type, &company_id, &ibeacon_type, &uuid, &major_id, &minor_id, &measured_power);
+ ibeacon_dev_info = g_malloc0(sizeof(bluetooth_ibeacon_device_info_t));
+ if (ibeacon_dev_info == NULL) {
+ result = BLUETOOTH_ERROR_MEMORY_ALLOCATION;
+ goto done;
+ }
+
+ _bt_convert_addr_string_to_type(ibeacon_dev_info->device_address.addr, address);
+ ibeacon_dev_info->addr_type = addr_type;
+ ibeacon_dev_info->company_id = company_id;
+ ibeacon_dev_info->ibeacon_type = ibeacon_type;
+ ibeacon_dev_info->major_id = major_id;
+ ibeacon_dev_info->minor_id = minor_id;
+ ibeacon_dev_info->measured_power = measured_power;
+ ibeacon_dev_info->uuid_len = strlen(uuid);
+ memcpy(ibeacon_dev_info->uuid, uuid, ibeacon_dev_info->uuid_len);
+done:
+
+ *ret = result;
+
+ return ibeacon_dev_info;
+}
+