2 * Copyright (c) 2014 Samsung Electronics, Inc.
5 * This software is a confidential and proprietary information
6 * of Samsung Electronics, Inc. ("Confidential Information"). You
7 * shall not disclose such Confidential Information and shall use
8 * it only in accordance with the terms of the license agreement
9 * you entered into with Samsung Electronics.
11 #include <appcore-efl.h>
14 #include "oicapp-utils.h"
16 static void _popup_timeout_cb(void *data, Evas_Object *obj, void *event_info)
18 oicapp_data *ad = data;
22 //evas_object_del(ad->popup);
26 void oicapp_fail_popup(oicapp_data *ad, char *title, char *text, int timeout)
30 evas_object_del(ad->popup);
34 Evas_Object *popup = elm_popup_add(ad->win);
35 evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
38 elm_object_part_text_set(popup, "title,text", title);
41 elm_object_text_set(popup, text);
44 elm_popup_timeout_set(popup, timeout);
46 elm_popup_timeout_set(popup, 3);
48 evas_object_smart_callback_add(popup, "timeout", _popup_timeout_cb, ad);
50 evas_object_show(popup);
55 void oicapp_util_put_msg(oicapp_data *ad, const char *msg)
61 ad->output_msg = strdup(msg);
63 DBG("Output msg : %s", ad->output_msg);
65 elm_genlist_item_update(ad->item_multiline);
66 elm_genlist_item_item_class_update(ad->item_multiline, &(ad->itc_multiline));
69 char* oicapp_util_wifi()
75 ret = wifi_initialize();
76 if (WIFI_ERROR_NONE != ret)
78 ERR("wifi_initialize() Fail");
82 ret = wifi_get_connected_ap(&ap);
83 if (WIFI_ERROR_NONE != ret)
85 ERR("wifi_get_connected_ap() Fail");
89 ret = wifi_ap_get_ip_address(ap, WIFI_ADDRESS_FAMILY_IPV4, &ip_addr);
90 if (WIFI_ERROR_NONE != ret)
92 ERR("wifi_ap_get_ip_address() Fail");