Name: wifi-efl-ug
Summary: Wi-Fi UI Gadget for TIZEN
-Version: 1.0.243
+Version: 1.0.244
Release: 1
Group: App/Network
License: Flora-1.1
BuildRequires: pkgconfig(feedback)
BuildRequires: pkgconfig(efl-extension)
BuildRequires: pkgconfig(aul)
+BuildRequires: pkgconfig(capi-system-info)
#BuildRequires: pkgconfig(setting-common-internal)
#BuildRequires: pkgconfig(setting-lite-common-internal)
BuildRequires: cmake
#include <libxml/xmlmemory.h>
#include <libxml/parser.h>
#include <libxml/tree.h>
+#include <system_info.h>
#include "common.h"
#include "ug_wifi.h"
return value;
}
-static inline int __get_model_from_model_config_xml(const char *field, char **value)
-{
- char *node_name = NULL;
- char *node_value = NULL;
- xmlNode *cur_node = NULL;
- xmlNodePtr cur_ptr = NULL;
- xmlNodePtr model_ptr = NULL;
- xmlDocPtr xml_doc = NULL;
-
- xml_doc = xmlParseFile(MODEL_CONFIG_FILE);
- if (xml_doc == NULL)
- return -1;
-
- cur_ptr = xmlDocGetRootElement(xml_doc);
- if (cur_ptr == NULL) {
- xmlFreeDoc(xml_doc);
- return -1;
- }
-
- for (cur_node = cur_ptr; cur_node; cur_node = cur_node->next) {
- if (!xmlStrcmp(cur_ptr->name, (const xmlChar*)MODEL_CONFIG_TAG))
- break;
- }
-
- cur_ptr = cur_ptr->xmlChildrenNode;
- for (cur_node = cur_ptr; cur_node; cur_node = cur_node->next) {
- if (!xmlStrcmp(cur_node->name, (const xmlChar*)FEATURE_TAG)) {
- model_ptr = cur_node;
- break;
- }
- }
-
- if (model_ptr == NULL) {
- xmlFreeDoc(xml_doc);
- return -1;
- }
-
- if (model_ptr) {
- cur_ptr = model_ptr->xmlChildrenNode;
-
- for (cur_node = cur_ptr; cur_node; cur_node = cur_node->next) {
- if (cur_node->type == XML_ELEMENT_NODE) {
- node_name = (char *)xmlGetProp(cur_node, (const xmlChar*)"name");
- if (node_name == NULL) {
- xmlFreeDoc(xml_doc);
- return -1;
- }
-
- if (!strncmp(node_name, field, strlen(node_name))) {
- node_value = (char *)xmlNodeListGetString(xml_doc, cur_node->xmlChildrenNode, 1);
- if (node_value) {
- *value = strdup(node_value);
- free(node_name);
- free(node_value);
- break;
- }
- }
- free(node_name);
- }
- }
- }
-
- xmlFreeDoc(xml_doc);
- return 0;
-}
-
Eina_Bool _is_emulator(void)
{
char *model_name = NULL;
else if (emulator == TIZEN_MODEL_NOT_EMULATOR)
return EINA_FALSE;
- if (__get_model_from_model_config_xml("tizen.org/system/model_name", &model_name) < 0)
+ if (system_info_get_platform_string("http://tizen.org/system/model_name", &model_name) < 0)
return EINA_FALSE;
if (model_name == NULL)