#include <feedback.h>
#include "bt-syspopup-m.h"
#include <notification.h>
-#include <bundle_internal.h>
+#include <bundle.h>
#include <app_control.h>
#include <app_control_internal.h>
#include <efl_assist.h>
char view_title[BT_TITLE_STR_MAX_LEN] = { 0 };
char text[BT_GLOBALIZATION_STR_LENGTH] = { 0 };
int timeout = 0;
- const char *device_name = NULL;
- const char *passkey = NULL;
- const char *file = NULL;
- const char *agent_path;
+ char *device_name = NULL;
+ char *passkey = NULL;
+ char *file = NULL;
+ char *agent_path;
char *conv_str = NULL;
+ int ret;
if (!reset_data || !event_type)
return -1;
BT_INFO("Event Type = %s[0X%X]", event_type, ad->event_type);
if (!strcasecmp(event_type, "pin-request")) {
- device_name = bundle_get_val(kb, "device-name");
- agent_path = bundle_get_val(kb, "agent-path");
+ ret = bundle_get_str(kb, "device-name", &device_name);
+ if (ret != BUNDLE_ERROR_NONE)
+ BT_ERR("bundle_get_str() is failed : %d\n", ret);
+
+ ret = bundle_get_str(kb, "agent-path", &agent_path);
+ if (ret != BUNDLE_ERROR_NONE)
+ BT_ERR("bundle_get_str() is failed : %d\n", ret);
ad->agent_proxy = __bluetooth_create_agent_proxy(ad->conn, agent_path);
retv_if(!ad->agent_proxy, -1);
__bluetooth_draw_input_view(ad, view_title, text,
__bluetooth_input_request_cb);
} else if (!strcasecmp(event_type, "passkey-confirm-request")) {
- device_name = bundle_get_val(kb, "device-name");
- passkey = bundle_get_val(kb, "passkey");
- agent_path = bundle_get_val(kb, "agent-path");
+ ret = bundle_get_str(kb, "device-name", &device_name);
+ if (ret != BUNDLE_ERROR_NONE)
+ BT_ERR("bundle_get_str() is failed : %d\n", ret);
+
+ ret = bundle_get_str(kb, "passkey", &passkey);
+ if (ret != BUNDLE_ERROR_NONE)
+ BT_ERR("bundle_get_str() is failed : %d\n", ret);
+
+ ret = bundle_get_str(kb, "agent-path", &agent_path);
+ if (ret != BUNDLE_ERROR_NONE)
+ BT_ERR("bundle_get_str() is failed : %d\n", ret);
+
ad->agent_proxy = __bluetooth_create_agent_proxy(ad->conn, agent_path);
if (!ad->agent_proxy)
timeout = BT_ERROR_TIMEOUT;
}
} else if (!strcasecmp(event_type, "passkey-request")) {
- const char *device_name = NULL;
+ char *device_name = NULL;
+
+ ret = bundle_get_str(kb, "device-name", &device_name);
+ if (ret != BUNDLE_ERROR_NONE)
+ BT_ERR("bundle_get_str() is failed : %d\n", ret);
- device_name = bundle_get_val(kb, "device-name");
- agent_path = bundle_get_val(kb, "agent-path");
+ ret = bundle_get_str(kb, "agent-path", &agent_path);
+ if (ret != BUNDLE_ERROR_NONE)
+ BT_ERR("bundle_get_str() is failed : %d\n", ret);
ad->agent_proxy = __bluetooth_create_agent_proxy(ad->conn, agent_path);
if (!ad->agent_proxy)
__bluetooth_input_request_cb);
} else if (!strcasecmp(event_type, "passkey-display-request")) {
- device_name = bundle_get_val(kb, "device-name");
- passkey = bundle_get_val(kb, "passkey");
+ ret = bundle_get_str(kb, "device-name", &device_name);
+ if (ret != BUNDLE_ERROR_NONE)
+ BT_ERR("bundle_get_str() is failed : %d\n", ret);
+
+ ret = bundle_get_str(kb, "passkey", &passkey);
+ if (ret != BUNDLE_ERROR_NONE)
+ BT_ERR("bundle_get_str() is failed : %d\n", ret);
if (device_name && passkey) {
} else if (!strcasecmp(event_type, "authorize-request")) {
timeout = BT_AUTHORIZATION_TIMEOUT;
- device_name = bundle_get_val(kb, "device-name");
- agent_path = bundle_get_val(kb, "agent-path");
+ ret = bundle_get_str(kb, "device-name", &device_name);
+ if (ret != BUNDLE_ERROR_NONE)
+ BT_ERR("bundle_get_str() is failed : %d\n", ret);
+
+ ret = bundle_get_str(kb, "agent-path", &agent_path);
+ if (ret != BUNDLE_ERROR_NONE)
+ BT_ERR("bundle_get_str() is failed : %d\n", ret);
ad->agent_proxy = __bluetooth_create_agent_proxy(ad->conn, agent_path);
if (!ad->agent_proxy)
BT_DBG("app-confirm-request");
timeout = BT_AUTHORIZATION_TIMEOUT;
- const char *title = NULL;
- const char *type = NULL;
+ char *title = NULL;
+ char *type = NULL;
+
+ ret = bundle_get_str(kb, "title", &title);
+ if (ret != BUNDLE_ERROR_NONE)
+ BT_ERR("bundle_get_str() is failed : %d\n", ret);
- title = bundle_get_val(kb, "title");
- type = bundle_get_val(kb, "type");
+ ret = bundle_get_str(kb, "type", &type);
+ if (ret != BUNDLE_ERROR_NONE)
+ BT_ERR("bundle_get_str() is failed : %d\n", ret);
if (!title)
return -1;
} else if (!strcasecmp(event_type, "push-authorize-request")) {
timeout = BT_AUTHORIZATION_TIMEOUT;
- device_name = bundle_get_val(kb, "device-name");
- file = bundle_get_val(kb, "file");
+ ret = bundle_get_str(kb, "device-name", &device_name);
+ if (ret != BUNDLE_ERROR_NONE)
+ BT_ERR("bundle_get_str() is failed : %d\n", ret);
+
+ ret = bundle_get_str(kb, "file", &file);
+ if (ret != BUNDLE_ERROR_NONE)
+ BT_ERR("bundle_get_str() is failed : %d\n", ret);
if (device_name) {
snprintf(view_title, BT_TITLE_STR_MAX_LEN,
} else if (!strcasecmp(event_type, "confirm-overwrite-request")) {
timeout = BT_AUTHORIZATION_TIMEOUT;
- file = bundle_get_val(kb, "file");
+ ret = bundle_get_str(kb, "file", &file);
+ if (ret != BUNDLE_ERROR_NONE)
+ BT_ERR("bundle_get_str() is failed : %d\n", ret);
snprintf(view_title, BT_TITLE_STR_MAX_LEN,
BT_STR_OVERWRITE_FILE_Q, file);
BT_STR_CANCEL, BT_STR_OK,
__bluetooth_app_confirm_cb);
} else if (!strcasecmp(event_type, "keyboard-passkey-request")) {
- device_name = bundle_get_val(kb, "device-name");
- passkey = bundle_get_val(kb, "passkey");
+ ret = bundle_get_str(kb, "device-name", &device_name);
+ if (ret != BUNDLE_ERROR_NONE)
+ BT_ERR("bundle_get_str() is failed : %d\n", ret);
+
+ ret = bundle_get_str(kb, "passkey", &passkey);
+ if (ret != BUNDLE_ERROR_NONE)
+ BT_ERR("bundle_get_str() is failed : %d\n", ret);
+
if (device_name && passkey) {
snprintf(view_title, BT_TITLE_STR_MAX_LEN,
BT_DBG("bt-information");
timeout = BT_NOTIFICATION_TIMEOUT;
- const char *title = NULL;
- const char *type = NULL;
+ char *title = NULL;
+ char *type = NULL;
+
+ ret = bundle_get_str(kb, "title", &title);
+ if (ret != BUNDLE_ERROR_NONE)
+ BT_ERR("bundle_get_str() is failed : %d\n", ret);
- title = bundle_get_val(kb, "title");
- type = bundle_get_val(kb, "type");
+ ret = bundle_get_str(kb, "type", &type);
+ if (ret != BUNDLE_ERROR_NONE)
+ BT_ERR("bundle_get_str() is failed : %d\n", ret);
if (title != NULL) {
if (strlen(title) > 255)
} else if (!strcasecmp(event_type, "exchange-request")) {
timeout = BT_AUTHORIZATION_TIMEOUT;
- device_name = bundle_get_val(kb, "device-name");
- agent_path = bundle_get_val(kb, "agent-path");
+ ret = bundle_get_str(kb, "device-name", &device_name);
+ if (ret != BUNDLE_ERROR_NONE)
+ BT_ERR("bundle_get_str() is failed : %d\n", ret);
+
+ ret = bundle_get_str(kb, "agent-path", &agent_path);
+ if (ret != BUNDLE_ERROR_NONE)
+ BT_ERR("bundle_get_str() is failed : %d\n", ret);
ad->agent_proxy = __bluetooth_create_agent_proxy(ad->conn, agent_path);
if (!ad->agent_proxy)
} else if (!strcasecmp(event_type, "phonebook-request")) {
timeout = BT_AUTHORIZATION_TIMEOUT;
- device_name = bundle_get_val(kb, "device-name");
- agent_path = bundle_get_val(kb, "agent-path");
+ ret = bundle_get_str(kb, "device-name", &device_name);
+ if (ret != BUNDLE_ERROR_NONE)
+ BT_ERR("bundle_get_str() is failed : %d\n", ret);
+
+ ret = bundle_get_str(kb, "agent-path", &agent_path);
+ if (ret != BUNDLE_ERROR_NONE)
+ BT_ERR("bundle_get_str() is failed : %d\n", ret);
+
ad->agent_proxy = __bluetooth_create_agent_proxy(ad->conn, agent_path);
if (!ad->agent_proxy)
} else if (!strcasecmp(event_type, "message-request")) {
timeout = BT_AUTHORIZATION_TIMEOUT;
- device_name = bundle_get_val(kb, "device-name");
- agent_path = bundle_get_val(kb, "agent-path");
+ ret = bundle_get_str(kb, "device-name", &device_name);
+ if (ret != BUNDLE_ERROR_NONE)
+ BT_ERR("bundle_get_str() is failed : %d\n", ret);
+
+ ret = bundle_get_str(kb, "agent-path", &agent_path);
+ if (ret != BUNDLE_ERROR_NONE)
+ BT_ERR("bundle_get_str() is failed : %d\n", ret);
ad->agent_proxy = __bluetooth_create_agent_proxy(ad->conn, agent_path);
if (!ad->agent_proxy)
#endif
} else if (!strcasecmp(event_type, "pairing-retry-request")) {
int ret;
- device_name = bundle_get_val(kb, "device-name");
+ ret = bundle_get_str(kb, "device-name", &device_name);
+ if (ret != BUNDLE_ERROR_NONE)
+ BT_ERR("bundle_get_str() is failed : %d\n", ret);
+
if (device_name)
conv_str = elm_entry_utf8_to_markup(device_name);
snprintf(view_title, BT_TITLE_STR_MAX_LEN,
BT_ERR("notification_status_message_post() is failed : %d\n", ret);
} else if (!strcasecmp(event_type, "remote-legacy-pair-failed")) {
BT_DBG("remote-legacy-pair-failed");
- device_name = bundle_get_val(kb, "device-name");
+ ret = bundle_get_str(kb, "device-name", &device_name);
+ if (ret != BUNDLE_ERROR_NONE)
+ BT_ERR("bundle_get_str() is failed : %d\n", ret);
if (device_name)
conv_str = elm_entry_utf8_to_markup(device_name);
static Evas_Object *__bluetooth_create_win(const char *name)
{
Evas_Object *eo;
- int w;
- int h;
-
eo = elm_win_add(NULL, name, ELM_WIN_BASIC);
retv_if(!eo, NULL);
{
struct bt_popup_appdata *ad = data;
bundle *b = NULL;
- const char *event_type = NULL;
+ char *event_type = NULL;
int ret = 0;
BT_DBG("__bluetooth_reset()");
return;
}
/* Start Main UI */
- event_type = bundle_get_val(b, "event-type");
+ ret = bundle_get_str(b, "event-type", &event_type);
+ if (ret != BUNDLE_ERROR_NONE)
+ BT_ERR("bundle_get_str() is failed : %d\n", ret);
+
+
BT_DBG("event-type: %s", event_type);
if (event_type != NULL) {