diff options
-rwxr-xr-x[-rw-r--r--] | CMakeLists.txt | 87 | ||||
-rw-r--r-- | data/edc/ug-nfc-efl.edc (renamed from ug-nfc-setting-efl/data/edc/ug-setting-nfc-efl.edc) | 0 | ||||
-rw-r--r-- | data/icons/setting-nfc.png (renamed from ug-nfc-setting-efl/data/icons/setting-nfc.png) | bin | 6386 -> 6386 bytes | |||
-rwxr-xr-x | include/ug-nfc-setting-main.h | 75 | ||||
-rw-r--r-- | packaging/ug-nfc-efl.spec | 12 | ||||
-rwxr-xr-x[-rw-r--r--] | po/CMakeLists.txt (renamed from ug-nfc-setting-efl/po/CMakeLists.txt) | 4 | ||||
-rw-r--r-- | po/POTFILES.in (renamed from ug-nfc-setting-efl/po/POTFILES.in) | 0 | ||||
-rw-r--r-- | po/ar.po (renamed from ug-nfc-setting-efl/po/ar.po) | 0 | ||||
-rw-r--r-- | po/az.po (renamed from ug-nfc-setting-efl/po/az.po) | 0 | ||||
-rw-r--r-- | po/bg.po (renamed from ug-nfc-setting-efl/po/bg.po) | 0 | ||||
-rw-r--r-- | po/ca.po (renamed from ug-nfc-setting-efl/po/ca.po) | 0 | ||||
-rw-r--r-- | po/cs.po (renamed from ug-nfc-setting-efl/po/cs.po) | 0 | ||||
-rw-r--r-- | po/da.po (renamed from ug-nfc-setting-efl/po/da.po) | 0 | ||||
-rw-r--r-- | po/de.po (renamed from ug-nfc-setting-efl/po/de.po) | 0 | ||||
-rw-r--r-- | po/el_GR.po (renamed from ug-nfc-setting-efl/po/el_GR.po) | 0 | ||||
-rw-r--r-- | po/en.po (renamed from ug-nfc-setting-efl/po/en.po) | 0 | ||||
-rw-r--r-- | po/en_PH.po (renamed from ug-nfc-setting-efl/po/en_PH.po) | 0 | ||||
-rw-r--r-- | po/en_US.po (renamed from ug-nfc-setting-efl/po/en_US.po) | 0 | ||||
-rw-r--r-- | po/es_ES.po (renamed from ug-nfc-setting-efl/po/es_ES.po) | 0 | ||||
-rw-r--r-- | po/es_US.po (renamed from ug-nfc-setting-efl/po/es_US.po) | 0 | ||||
-rw-r--r-- | po/et.po (renamed from ug-nfc-setting-efl/po/et.po) | 0 | ||||
-rw-r--r-- | po/eu.po (renamed from ug-nfc-setting-efl/po/eu.po) | 0 | ||||
-rw-r--r-- | po/fi.po (renamed from ug-nfc-setting-efl/po/fi.po) | 0 | ||||
-rw-r--r-- | po/fr.po (renamed from ug-nfc-setting-efl/po/fr.po) | 0 | ||||
-rw-r--r-- | po/fr_CA.po (renamed from ug-nfc-setting-efl/po/fr_CA.po) | 0 | ||||
-rw-r--r-- | po/ga.po (renamed from ug-nfc-setting-efl/po/ga.po) | 0 | ||||
-rw-r--r-- | po/gl.po (renamed from ug-nfc-setting-efl/po/gl.po) | 0 | ||||
-rw-r--r-- | po/hi.po (renamed from ug-nfc-setting-efl/po/hi.po) | 0 | ||||
-rw-r--r-- | po/hr.po (renamed from ug-nfc-setting-efl/po/hr.po) | 0 | ||||
-rw-r--r-- | po/hu.po (renamed from ug-nfc-setting-efl/po/hu.po) | 0 | ||||
-rw-r--r-- | po/hy.po (renamed from ug-nfc-setting-efl/po/hy.po) | 0 | ||||
-rw-r--r-- | po/is.po (renamed from ug-nfc-setting-efl/po/is.po) | 0 | ||||
-rw-r--r-- | po/it_IT.po (renamed from ug-nfc-setting-efl/po/it_IT.po) | 0 | ||||
-rw-r--r-- | po/ja_JP.po (renamed from ug-nfc-setting-efl/po/ja_JP.po) | 0 | ||||
-rw-r--r-- | po/ka.po (renamed from ug-nfc-setting-efl/po/ka.po) | 0 | ||||
-rw-r--r-- | po/kk.po (renamed from ug-nfc-setting-efl/po/kk.po) | 0 | ||||
-rw-r--r-- | po/ko_KR.po (renamed from ug-nfc-setting-efl/po/ko_KR.po) | 0 | ||||
-rw-r--r-- | po/lt.po (renamed from ug-nfc-setting-efl/po/lt.po) | 0 | ||||
-rw-r--r-- | po/lv.po (renamed from ug-nfc-setting-efl/po/lv.po) | 0 | ||||
-rw-r--r-- | po/mk.po (renamed from ug-nfc-setting-efl/po/mk.po) | 0 | ||||
-rw-r--r-- | po/nb.po (renamed from ug-nfc-setting-efl/po/nb.po) | 0 | ||||
-rw-r--r-- | po/nl.po (renamed from ug-nfc-setting-efl/po/nl.po) | 0 | ||||
-rw-r--r-- | po/pl.po (renamed from ug-nfc-setting-efl/po/pl.po) | 0 | ||||
-rw-r--r-- | po/pt_BR.po (renamed from ug-nfc-setting-efl/po/pt_BR.po) | 0 | ||||
-rw-r--r-- | po/pt_PT.po (renamed from ug-nfc-setting-efl/po/pt_PT.po) | 0 | ||||
-rw-r--r-- | po/ro.po (renamed from ug-nfc-setting-efl/po/ro.po) | 0 | ||||
-rw-r--r-- | po/ru_RU.po (renamed from ug-nfc-setting-efl/po/ru_RU.po) | 0 | ||||
-rw-r--r-- | po/sk.po (renamed from ug-nfc-setting-efl/po/sk.po) | 0 | ||||
-rw-r--r-- | po/sl.po (renamed from ug-nfc-setting-efl/po/sl.po) | 0 | ||||
-rw-r--r-- | po/sr.po (renamed from ug-nfc-setting-efl/po/sr.po) | 0 | ||||
-rw-r--r-- | po/sv.po (renamed from ug-nfc-setting-efl/po/sv.po) | 0 | ||||
-rw-r--r-- | po/tr_TR.po (renamed from ug-nfc-setting-efl/po/tr_TR.po) | 0 | ||||
-rw-r--r-- | po/uk.po (renamed from ug-nfc-setting-efl/po/uk.po) | 0 | ||||
-rwxr-xr-x | po/update-po.sh (renamed from ug-nfc-setting-efl/po/update-po.sh) | 0 | ||||
-rw-r--r-- | po/uz.po (renamed from ug-nfc-setting-efl/po/uz.po) | 0 | ||||
-rw-r--r-- | po/zh_CN.po (renamed from ug-nfc-setting-efl/po/zh_CN.po) | 0 | ||||
-rw-r--r-- | po/zh_HK.po (renamed from ug-nfc-setting-efl/po/zh_HK.po) | 0 | ||||
-rw-r--r-- | po/zh_TW.po (renamed from ug-nfc-setting-efl/po/zh_TW.po) | 0 | ||||
-rwxr-xr-x | src/ug-nfc-setting-main.c | 486 | ||||
-rwxr-xr-x | ug-nfc-efl.xml | 13 | ||||
-rw-r--r-- | ug-nfc-setting-efl/CMakeLists.txt | 90 | ||||
-rw-r--r-- | ug-nfc-setting-efl/include/ug-nfc-setting-main.h | 170 | ||||
-rw-r--r-- | ug-nfc-setting-efl/include/ug-nfc-setting-popup.h | 59 | ||||
-rw-r--r-- | ug-nfc-setting-efl/src/ug-nfc-setting-main.c | 824 | ||||
-rw-r--r-- | ug-nfc-setting-efl/src/ug-nfc-setting-popup.c | 198 | ||||
-rw-r--r-- | ug-nfc-setting-efl/src/ug-nfc-setting-secure-storage.c | 305 | ||||
-rw-r--r-- | ug-nfc-setting-efl/sysinfo-nfc-ug.xml | 6 | ||||
-rw-r--r-- | ug-nfc-setting-efl/ug-setting-nfc-efl.xml | 13 |
68 files changed, 667 insertions, 1675 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 7cb8ed7..435f9ed 100644..100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,88 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.6) +PROJECT(ug-nfc-efl C) -MESSAGE("NFC UI Gardet version: ${VERSION}") +SET(PREFIX ${CMAKE_INSTALL_PREFIX}) +SET(EXEC_PREFIX "\${prefix}") +SET(LIBDIR "\${prefix}/lib") +SET(INCLUDEDIR "\${prefix}/include") +SET(VERSION 0.1.0) +SET(RESDIR "${PREFIX}/res") +SET(LOCALEDIR "${RESDIR}/locale") +SET(EDJDIR "${RESDIR}/edje/${PROJECT_NAME}") +SET(ICONDIR "${RESDIR}/icons/${PROJECT_NAME}") -ADD_SUBDIRECTORY(ug-nfc-setting-efl) +ADD_DEFINITIONS("-DPACKAGE=\"ug-nfc-efl\"") +ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"") +ADD_DEFINITIONS("-DLOCALEDIR=\"${LOCALEDIR}\"") +ADD_DEFINITIONS("-DEDJDIR=\"${EDJDIR}\"") +ADD_DEFINITIONS("-DICONDIR=\"${ICONDIR}\"") + +SET(SRCS +src/ug-nfc-setting-main.c +) + +IF("${CMAKE_BUILD_TYPE}" STREQUAL "") + SET(CMAKE_BUILD_TYPE "Release") +ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "") +MESSAGE("Build type: ${CMAKE_BUILD_TYPE}") + +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include) + +INCLUDE(FindPkgConfig) +pkg_check_modules(pkgs_ug_nfc_setting REQUIRED +ecore-evas +elementary +efl-extension +ui-gadget-1 +dlog +vconf +capi-appfw-application +capi-network-nfc +capi-appfw-app-manager +sqlite3 +notification +) + +FOREACH(flag ${pkgs_ug_nfc_setting_CFLAGS}) + SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") +ENDFOREACH(flag) + +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror-implicit-function-declaration") +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}") +SET(CMAKE_C_FLAGS_DEBUG "-O0 -g") +SET(CMAKE_C_FLAGS_RELEASE "-O2") + +FIND_PROGRAM(UNAME NAMES uname) +EXEC_PROGRAM("${UNAME}" ARGS "-m" OUTPUT_VARIABLE "ARCH") +IF("${ARCH}" STREQUAL "arm") + ADD_DEFINITIONS("-DTARGET") + MESSAGE("add -DTARGET") +ENDIF("${ARCH}" STREQUAL "arm") + +SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed") + +ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"") +ADD_DEFINITIONS("-DEDJDIR=\"${EDJDIR}\"") +ADD_DEFINITIONS("-DRESDIR=\"${RESDIR}\"") +ADD_DEFINITIONS("-D_SBEAM_SUPPORT_") + +ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS}) +SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SOVERSION 0.1.0) +TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_ug_nfc_setting_LDFLAGS}) + +ADD_CUSTOM_TARGET(ug-nfc-efl.edj + COMMAND edje_cc + ${CMAKE_CURRENT_SOURCE_DIR}/data/edc/ug-nfc-efl.edc ${CMAKE_BINARY_DIR}/ug-nfc-efl.edj + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/data/edc/ug-nfc-efl.edc +) +ADD_DEPENDENCIES(${PROJECT_NAME} ug-nfc-efl.edj) + +INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${LIBDIR}) +INSTALL(FILES ${CMAKE_BINARY_DIR}/ug-nfc-efl.edj DESTINATION ${EDJDIR}) + +INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/icons/setting-nfc.png DESTINATION ${ICONDIR}) + +# install xml file +INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ug-nfc-efl.xml DESTINATION /usr/share/packages/) + +ADD_SUBDIRECTORY(po) diff --git a/ug-nfc-setting-efl/data/edc/ug-setting-nfc-efl.edc b/data/edc/ug-nfc-efl.edc index a49dbf6..a49dbf6 100644 --- a/ug-nfc-setting-efl/data/edc/ug-setting-nfc-efl.edc +++ b/data/edc/ug-nfc-efl.edc diff --git a/ug-nfc-setting-efl/data/icons/setting-nfc.png b/data/icons/setting-nfc.png Binary files differindex cfdabab..cfdabab 100644 --- a/ug-nfc-setting-efl/data/icons/setting-nfc.png +++ b/data/icons/setting-nfc.png diff --git a/include/ug-nfc-setting-main.h b/include/ug-nfc-setting-main.h new file mode 100755 index 0000000..064e57c --- /dev/null +++ b/include/ug-nfc-setting-main.h @@ -0,0 +1,75 @@ +/* + * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd. + * + * Licensed under the Flora License, Version 1.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +#ifndef __UG_NFC_SETTING_MAIN_H__ +#define __UG_NFC_SETTING_MAIN_H__ + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +#include <stdio.h> +#include <ui-gadget-module.h> +#include <Evas.h> +#include <Ecore.h> +#include <Elementary.h> +#include <bundle.h> +#include <dlog.h> +#include <vconf.h> +#include <nfc.h> +#include <glib.h> + +#define LOCALE_PATH LOCALEDIR +#define ICON_PATH ICONDIR +#define EDJ_PATH EDJDIR +#define EDJ_FILE EDJ_PATH"/"PACKAGE".edj" + +#ifdef LOG_TAG +#undef LOG_TAG +#endif + +#define LOG_TAG "UG_NFC_SETTING" + +#define NFCUG_TEXT_DOMAIN PACKAGE +#define NFCUG_LOCALEDIR LOCALE_PATH + +/* Registered string in STMS NFC */ +#define IDS_NFC_NFC \ + dgettext(PACKAGE, "IDS_NFC_BODY_NFC") +#define IDS_NFC_DESCRIPTION_MSG \ + dgettext(PACKAGE, "IDS_NFC_BODY_WHEN_NFC_IS_ON_YOU_CAN_SEND_OR_RECEIVE_DATA_WHEN_YOUR_DEVICE_TOUCHES_OTHER_NFC_CAPABLE_DEVICES_OR_NFC_TAGS") + +typedef struct { + ui_gadget_h nfc_setting_ug; + + Evas_Object* ug_win_main; + Evas_Object* base_layout; + Evas_Object *bg; + Evas_Object* base_naviframe; + Evas_Object* ns_on_off; + Evas_Object* popup; + + Elm_Object_Item *base_navi_it; + + app_control_h service; +} ugdata_t; + +#ifdef __cplusplus +} +#endif + +#endif /*__UG_NFC_SETTING_MAIN_H__*/ diff --git a/packaging/ug-nfc-efl.spec b/packaging/ug-nfc-efl.spec index b434c47..b5a1855 100644 --- a/packaging/ug-nfc-efl.spec +++ b/packaging/ug-nfc-efl.spec @@ -11,13 +11,13 @@ ExcludeArch: %{arm} %ix86 x86_64 Name: ug-nfc-efl Summary: UI gadget about the nfc -Version: 0.1.0 +Version: 3.0.0 Release: 0 Group: TO_BE/FILLED_IN License: Flora-1.1 Source0: %{name}-%{version}.tar.gz BuildRequires: pkgconfig(elementary) -BuildRequires: pkgconfig(efl-assist) +BuildRequires: pkgconfig(efl-extension) BuildRequires: pkgconfig(ui-gadget-1) BuildRequires: pkgconfig(dlog) BuildRequires: pkgconfig(vconf) @@ -76,9 +76,9 @@ ln -sf /usr/bin/ug-client /usr/ug/bin/setting-nfc-efl %files %defattr(-,root,root,-) -/usr/ug/lib/libug-setting-nfc-efl* -/usr/ug/res/edje/ug-setting-nfc-efl/*.edj -/usr/ug/res/locale/*/LC_MESSAGES/ug-setting-nfc-efl* +/usr/ug/lib/libug-nfc-efl.* +/usr/ug/res/edje/ug-nfc-efl/*.edj +/usr/ug/res/locale/*/LC_MESSAGES/ug-nfc-efl* /usr/ug/res/icons/* -/etc/config/nfc/* /usr/share/license/LICENSE +/usr/share/packages/* diff --git a/ug-nfc-setting-efl/po/CMakeLists.txt b/po/CMakeLists.txt index 1e415f0..4e58de6 100644..100755 --- a/ug-nfc-setting-efl/po/CMakeLists.txt +++ b/po/CMakeLists.txt @@ -1,5 +1,5 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 0.1) -PROJECT(ug-setting-nfc-efl C) +CMAKE_MINIMUM_REQUIRED(VERSION 2.6) +PROJECT(ug-nfc-efl C) SET(POFILES ar.po az.po bg.po ca.po cs.po da.po de.po el_GR.po en.po en_PH.po en_US.po es_ES.po diff --git a/ug-nfc-setting-efl/po/POTFILES.in b/po/POTFILES.in index 2068f24..2068f24 100644 --- a/ug-nfc-setting-efl/po/POTFILES.in +++ b/po/POTFILES.in diff --git a/ug-nfc-setting-efl/po/ar.po b/po/ar.po index 959fa03..959fa03 100644 --- a/ug-nfc-setting-efl/po/ar.po +++ b/po/ar.po diff --git a/ug-nfc-setting-efl/po/az.po b/po/az.po index 0ef4e48..0ef4e48 100644 --- a/ug-nfc-setting-efl/po/az.po +++ b/po/az.po diff --git a/ug-nfc-setting-efl/po/bg.po b/po/bg.po index 63f0265..63f0265 100644 --- a/ug-nfc-setting-efl/po/bg.po +++ b/po/bg.po diff --git a/ug-nfc-setting-efl/po/ca.po b/po/ca.po index 7d6d3b2..7d6d3b2 100644 --- a/ug-nfc-setting-efl/po/ca.po +++ b/po/ca.po diff --git a/ug-nfc-setting-efl/po/cs.po b/po/cs.po index e20cde8..e20cde8 100644 --- a/ug-nfc-setting-efl/po/cs.po +++ b/po/cs.po diff --git a/ug-nfc-setting-efl/po/da.po b/po/da.po index c446d21..c446d21 100644 --- a/ug-nfc-setting-efl/po/da.po +++ b/po/da.po diff --git a/ug-nfc-setting-efl/po/de.po b/po/de.po index 058ff27..058ff27 100644 --- a/ug-nfc-setting-efl/po/de.po +++ b/po/de.po diff --git a/ug-nfc-setting-efl/po/el_GR.po b/po/el_GR.po index 59759a1..59759a1 100644 --- a/ug-nfc-setting-efl/po/el_GR.po +++ b/po/el_GR.po diff --git a/ug-nfc-setting-efl/po/en.po b/po/en.po index a893325..a893325 100644 --- a/ug-nfc-setting-efl/po/en.po +++ b/po/en.po diff --git a/ug-nfc-setting-efl/po/en_PH.po b/po/en_PH.po index acef833..acef833 100644 --- a/ug-nfc-setting-efl/po/en_PH.po +++ b/po/en_PH.po diff --git a/ug-nfc-setting-efl/po/en_US.po b/po/en_US.po index 70a1754..70a1754 100644 --- a/ug-nfc-setting-efl/po/en_US.po +++ b/po/en_US.po diff --git a/ug-nfc-setting-efl/po/es_ES.po b/po/es_ES.po index 9fb5eda..9fb5eda 100644 --- a/ug-nfc-setting-efl/po/es_ES.po +++ b/po/es_ES.po diff --git a/ug-nfc-setting-efl/po/es_US.po b/po/es_US.po index 7262062..7262062 100644 --- a/ug-nfc-setting-efl/po/es_US.po +++ b/po/es_US.po diff --git a/ug-nfc-setting-efl/po/et.po b/po/et.po index aef6c3e..aef6c3e 100644 --- a/ug-nfc-setting-efl/po/et.po +++ b/po/et.po diff --git a/ug-nfc-setting-efl/po/eu.po b/po/eu.po index d10adb2..d10adb2 100644 --- a/ug-nfc-setting-efl/po/eu.po +++ b/po/eu.po diff --git a/ug-nfc-setting-efl/po/fi.po b/po/fi.po index 3bf66b7..3bf66b7 100644 --- a/ug-nfc-setting-efl/po/fi.po +++ b/po/fi.po diff --git a/ug-nfc-setting-efl/po/fr.po b/po/fr.po index c38ee3a..c38ee3a 100644 --- a/ug-nfc-setting-efl/po/fr.po +++ b/po/fr.po diff --git a/ug-nfc-setting-efl/po/fr_CA.po b/po/fr_CA.po index 3637bc7..3637bc7 100644 --- a/ug-nfc-setting-efl/po/fr_CA.po +++ b/po/fr_CA.po diff --git a/ug-nfc-setting-efl/po/ga.po b/po/ga.po index bacdd74..bacdd74 100644 --- a/ug-nfc-setting-efl/po/ga.po +++ b/po/ga.po diff --git a/ug-nfc-setting-efl/po/gl.po b/po/gl.po index 7005ecc..7005ecc 100644 --- a/ug-nfc-setting-efl/po/gl.po +++ b/po/gl.po diff --git a/ug-nfc-setting-efl/po/hi.po b/po/hi.po index c26feb2..c26feb2 100644 --- a/ug-nfc-setting-efl/po/hi.po +++ b/po/hi.po diff --git a/ug-nfc-setting-efl/po/hr.po b/po/hr.po index 0f1f0cb..0f1f0cb 100644 --- a/ug-nfc-setting-efl/po/hr.po +++ b/po/hr.po diff --git a/ug-nfc-setting-efl/po/hu.po b/po/hu.po index 19b991c..19b991c 100644 --- a/ug-nfc-setting-efl/po/hu.po +++ b/po/hu.po diff --git a/ug-nfc-setting-efl/po/hy.po b/po/hy.po index 7b02e80..7b02e80 100644 --- a/ug-nfc-setting-efl/po/hy.po +++ b/po/hy.po diff --git a/ug-nfc-setting-efl/po/is.po b/po/is.po index 446cffb..446cffb 100644 --- a/ug-nfc-setting-efl/po/is.po +++ b/po/is.po diff --git a/ug-nfc-setting-efl/po/it_IT.po b/po/it_IT.po index 615d83d..615d83d 100644 --- a/ug-nfc-setting-efl/po/it_IT.po +++ b/po/it_IT.po diff --git a/ug-nfc-setting-efl/po/ja_JP.po b/po/ja_JP.po index 4b7c2dd..4b7c2dd 100644 --- a/ug-nfc-setting-efl/po/ja_JP.po +++ b/po/ja_JP.po diff --git a/ug-nfc-setting-efl/po/ka.po b/po/ka.po index 2070a77..2070a77 100644 --- a/ug-nfc-setting-efl/po/ka.po +++ b/po/ka.po diff --git a/ug-nfc-setting-efl/po/kk.po b/po/kk.po index d1cf014..d1cf014 100644 --- a/ug-nfc-setting-efl/po/kk.po +++ b/po/kk.po diff --git a/ug-nfc-setting-efl/po/ko_KR.po b/po/ko_KR.po index 2ab7eb2..2ab7eb2 100644 --- a/ug-nfc-setting-efl/po/ko_KR.po +++ b/po/ko_KR.po diff --git a/ug-nfc-setting-efl/po/lt.po b/po/lt.po index 76bb01c..76bb01c 100644 --- a/ug-nfc-setting-efl/po/lt.po +++ b/po/lt.po diff --git a/ug-nfc-setting-efl/po/lv.po b/po/lv.po index 5eb7b38..5eb7b38 100644 --- a/ug-nfc-setting-efl/po/lv.po +++ b/po/lv.po diff --git a/ug-nfc-setting-efl/po/mk.po b/po/mk.po index 8d1f555..8d1f555 100644 --- a/ug-nfc-setting-efl/po/mk.po +++ b/po/mk.po diff --git a/ug-nfc-setting-efl/po/nb.po b/po/nb.po index 1071392..1071392 100644 --- a/ug-nfc-setting-efl/po/nb.po +++ b/po/nb.po diff --git a/ug-nfc-setting-efl/po/nl.po b/po/nl.po index 867fbce..867fbce 100644 --- a/ug-nfc-setting-efl/po/nl.po +++ b/po/nl.po diff --git a/ug-nfc-setting-efl/po/pl.po b/po/pl.po index aeb8a8b..aeb8a8b 100644 --- a/ug-nfc-setting-efl/po/pl.po +++ b/po/pl.po diff --git a/ug-nfc-setting-efl/po/pt_BR.po b/po/pt_BR.po index 3384b5d..3384b5d 100644 --- a/ug-nfc-setting-efl/po/pt_BR.po +++ b/po/pt_BR.po diff --git a/ug-nfc-setting-efl/po/pt_PT.po b/po/pt_PT.po index 2c707f1..2c707f1 100644 --- a/ug-nfc-setting-efl/po/pt_PT.po +++ b/po/pt_PT.po diff --git a/ug-nfc-setting-efl/po/ro.po b/po/ro.po index 26b0948..26b0948 100644 --- a/ug-nfc-setting-efl/po/ro.po +++ b/po/ro.po diff --git a/ug-nfc-setting-efl/po/ru_RU.po b/po/ru_RU.po index 9fa5be0..9fa5be0 100644 --- a/ug-nfc-setting-efl/po/ru_RU.po +++ b/po/ru_RU.po diff --git a/ug-nfc-setting-efl/po/sk.po b/po/sk.po index 236c973..236c973 100644 --- a/ug-nfc-setting-efl/po/sk.po +++ b/po/sk.po diff --git a/ug-nfc-setting-efl/po/sl.po b/po/sl.po index 47737a9..47737a9 100644 --- a/ug-nfc-setting-efl/po/sl.po +++ b/po/sl.po diff --git a/ug-nfc-setting-efl/po/sr.po b/po/sr.po index 323097a..323097a 100644 --- a/ug-nfc-setting-efl/po/sr.po +++ b/po/sr.po diff --git a/ug-nfc-setting-efl/po/sv.po b/po/sv.po index 331483b..331483b 100644 --- a/ug-nfc-setting-efl/po/sv.po +++ b/po/sv.po diff --git a/ug-nfc-setting-efl/po/tr_TR.po b/po/tr_TR.po index 9ffd90c..9ffd90c 100644 --- a/ug-nfc-setting-efl/po/tr_TR.po +++ b/po/tr_TR.po diff --git a/ug-nfc-setting-efl/po/uk.po b/po/uk.po index ca9e280..ca9e280 100644 --- a/ug-nfc-setting-efl/po/uk.po +++ b/po/uk.po diff --git a/ug-nfc-setting-efl/po/update-po.sh b/po/update-po.sh index 4b81193..4b81193 100755 --- a/ug-nfc-setting-efl/po/update-po.sh +++ b/po/update-po.sh diff --git a/ug-nfc-setting-efl/po/uz.po b/po/uz.po index 057a34c..057a34c 100644 --- a/ug-nfc-setting-efl/po/uz.po +++ b/po/uz.po diff --git a/ug-nfc-setting-efl/po/zh_CN.po b/po/zh_CN.po index 44b5fa8..44b5fa8 100644 --- a/ug-nfc-setting-efl/po/zh_CN.po +++ b/po/zh_CN.po diff --git a/ug-nfc-setting-efl/po/zh_HK.po b/po/zh_HK.po index ce0938a..ce0938a 100644 --- a/ug-nfc-setting-efl/po/zh_HK.po +++ b/po/zh_HK.po diff --git a/ug-nfc-setting-efl/po/zh_TW.po b/po/zh_TW.po index e4058b6..e4058b6 100644 --- a/ug-nfc-setting-efl/po/zh_TW.po +++ b/po/zh_TW.po diff --git a/src/ug-nfc-setting-main.c b/src/ug-nfc-setting-main.c new file mode 100755 index 0000000..48d6094 --- /dev/null +++ b/src/ug-nfc-setting-main.c @@ -0,0 +1,486 @@ +/* + * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd. + * + * Licensed under the Flora License, Version 1.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include <efl_extension.h> +#include <notification.h> + +#include "ug-nfc-setting-main.h" + +#ifndef UG_MODULE_API +#define UG_MODULE_API __attribute__ ((visibility("default"))) +#endif + +static Elm_Genlist_Item_Class itc_helptext; +static Elm_Genlist_Item_Class itc_onoff; + +static bool pending_status = false; + +static bool __get_pending_status(void) +{ + return pending_status; +} + +static void __set_pending_status(bool status) +{ + pending_status = status; +} + +static void __update_title_onoff_obj(void *data) +{ + ugdata_t *ug_data = (ugdata_t *)data; + int boolval; + + LOGD("BEGIN >>>>"); + + if (!ug_data) + return; + + if (__get_pending_status()) { + elm_object_disabled_set(ug_data->ns_on_off, EINA_TRUE); + return; + } + + elm_object_disabled_set(ug_data->ns_on_off, EINA_FALSE); + + if (!vconf_get_bool(VCONFKEY_NFC_STATE, &boolval) && boolval) + elm_check_state_set(ug_data->ns_on_off, EINA_TRUE); + else + elm_check_state_set(ug_data->ns_on_off, EINA_FALSE); + + LOGD("END >>>>"); +} + +static bool __reply_to_launch_request(app_control_h service, app_control_result_e result) +{ + app_control_h reply; + char *operation = NULL; + bool ret = false; + + LOGD("BEGIN >>>>"); + + if (service != NULL) { + app_control_create(&reply); + app_control_get_operation(service, &operation); + + if (operation != NULL) { + LOGD("reply to launch request : operation %s", operation); + app_control_reply_to_launch_request(reply, service, result); + ret = true; + } + + app_control_destroy(reply); + } + + LOGD("END >>>>"); + + return ret; +} + +static void __nfc_activation_completed_cb(nfc_error_e error, + void *user_data) +{ + ugdata_t *ug_data = (ugdata_t *)user_data; + + LOGD("BEGIN >>>>"); + + if (error != NFC_ERROR_NONE) { + LOGE("__nfc_activation_completed_cb failed"); + + /* show failure popup */ + } + + LOGD("END >>>>"); +} + +static void __nfc_activation_changed_cb(bool activated , void *user_data) +{ + ugdata_t *ug_data = (ugdata_t *)user_data; + + LOGD("BEGIN >>>>"); + + LOGD("nfc mode %s ", activated ? "ON" : "OFF"); + + nfc_manager_unset_activation_changed_cb(); + + /* nfc setting ui updated */ + __set_pending_status(false); + + __update_title_onoff_obj(ug_data); + + if (__reply_to_launch_request(ug_data->service, APP_CONTROL_RESULT_SUCCEEDED) == true) + ug_destroy_me(ug_data->nfc_setting_ug); + + LOGD("END >>>>"); +} + +static Eina_Bool __back_clicked_cb(void *data, Elm_Object_Item *it) +{ + ugdata_t *ug_data = (ugdata_t *)data; + + LOGD("BEGIN >>>>"); + + if (!ug_data) { + LOGE("data is null"); + return EINA_FALSE; + } + + __reply_to_launch_request(ug_data->service, APP_CONTROL_RESULT_FAILED); + + ug_destroy_me(ug_data->nfc_setting_ug); + + LOGD("END >>>>"); + + return EINA_FALSE; +} + +static void __change_nfc_onoff_setting(void *data) +{ + ugdata_t *ug_data = (ugdata_t *)data; + int result, boolval; + + LOGD("BEGIN >>>>"); + + if (!ug_data) + return; + + if (!vconf_get_bool(VCONFKEY_NFC_STATE, &boolval)) { + LOGD("vconf_get_bool status [%d]", boolval); + + if (NFC_ERROR_NONE == nfc_manager_initialize()) { + + /* Register activation changed callback */ + nfc_manager_set_activation_changed_cb( + __nfc_activation_changed_cb, ug_data); + + result = nfc_manager_set_activation(!boolval, + __nfc_activation_completed_cb, ug_data); + if (result != NFC_ERROR_NONE) { + LOGE("nfc_manager_set_activation failed"); + return; + } + + __set_pending_status(true); + } else { + LOGE("nfc_manager_initialize FAIL!!!!"); + } + + + } else { + LOGE("vconf_get_bool failed"); + } + + __update_title_onoff_obj(ug_data); + + LOGD("END >>>>"); +} + +static void __title_ns_on_off_clicked_cb(void *data, Evas_Object *obj, + void *event_info) +{ + ugdata_t *ug_data = (ugdata_t *)data; + + LOGD("BEGIN >>>>"); + + if (ug_data == NULL) { + LOGE("data is null"); + return; + } + + if (__get_pending_status()) + return; + + __change_nfc_onoff_setting(ug_data); + + LOGD("END >>>>"); +} + +static void __nfc_sel(void *data, Evas_Object *obj, void *event_info) +{ + LOGD("BEGIN >>>>"); + + __title_ns_on_off_clicked_cb(data, obj, event_info); + + elm_genlist_item_selected_set((Elm_Object_Item *)event_info, EINA_FALSE); + + LOGD("END >>>>"); +} + +static Evas_Object *__gl_content_get(void *data, Evas_Object *obj, + const char *part) +{ + ugdata_t *ug_data = (ugdata_t *)data; + int boolval = false; + + LOGD("BEGIN >>>>"); + + if (!ug_data) { + LOGE("invalid parameter"); + return NULL; + } + + if (!strncmp(part, "elm.swallow.end", strlen(part))) { + Evas_Object *btn = NULL; + + vconf_get_bool(VCONFKEY_NFC_STATE, &boolval); + + LOGD("elm.swallow.end"); + + btn = elm_check_add(obj); + elm_object_style_set(btn, "on&off"); + elm_check_state_set(btn, boolval); + evas_object_propagate_events_set(btn, EINA_FALSE); + evas_object_smart_callback_add(btn, "changed", __title_ns_on_off_clicked_cb, ug_data); + evas_object_show(btn); + + ug_data->ns_on_off = btn; + + __update_title_onoff_obj(ug_data); + + return btn; + } + + LOGD("END >>>>"); + + return NULL; +} + +static char *__gl_text_get(void *data, Evas_Object *obj, const char *part) +{ + return strcmp(part, "elm.text") == 0 ? strdup(IDS_NFC_NFC) : NULL; +} + +static char *__gl_text_get_desc(void *data, Evas_Object *obj, const char *part) +{ + return strcmp(part, "elm.text.multiline") == 0 ? strdup(IDS_NFC_DESCRIPTION_MSG) : NULL; +} + +static Evas_Object *__create_nfc_list(void *data) +{ + ugdata_t *ug_data = (ugdata_t *)data; + Evas_Object *genlist = NULL; + Elm_Object_Item *onoff_item; + + LOGD("BEGIN >>>>"); + + /* make genlist */ + genlist = elm_genlist_add(ug_data->base_naviframe); + if (genlist == NULL) { + LOGE("genlist is null"); + return NULL; + } + + elm_genlist_mode_set(genlist, ELM_LIST_COMPRESS); + + itc_onoff.item_style = "type1"; + itc_onoff.func.text_get = __gl_text_get; + itc_onoff.func.content_get = __gl_content_get; + + itc_helptext.item_style = "multiline"; + itc_helptext.func.text_get = __gl_text_get_desc; + + /* Append ON / OFF list */ + onoff_item = elm_genlist_item_append(genlist, &itc_onoff, + (void *) ug_data, NULL, ELM_GENLIST_ITEM_NONE, + __nfc_sel, (void *) ug_data); + + elm_object_item_signal_emit(onoff_item, "elm,state,top", ""); + + /* Append help text */ + static Elm_Object_Item *help_item; + help_item = elm_genlist_item_append(genlist, &itc_helptext, (void *)0, + NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(help_item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + elm_object_item_access_unregister(help_item); + + evas_object_show(genlist); + + LOGD("END >>>>"); + + return genlist; +} + +static Evas_Object *__create_bg(Evas_Object *parent, char *style) +{ + Evas_Object *bg = elm_bg_add(parent); + + LOGD("BEGIN >>>>"); + + evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + + if (style) + elm_object_style_set(bg, style); + + elm_win_resize_object_add(parent, bg); + + evas_object_show(bg); + + LOGD("END >>>>"); + + return bg; +} + +static Evas_Object *__create_main_layout(Evas_Object *parent) +{ + Evas_Object *layout; + + LOGD("BEGIN >>>>"); + + if (parent == NULL) + return NULL; + + layout = elm_layout_add(parent); + + elm_layout_theme_set(layout, "layout", "application", "default"); + + evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + + evas_object_show(layout); + + LOGD("END >>>>"); + + return layout; +} + +static void *__ug_nfc_create(ui_gadget_h ug, enum ug_mode mode, + app_control_h service, void *priv) +{ + ugdata_t *ug_data = (ugdata_t *)priv; + Evas_Object *parent = NULL; + Evas_Object *l_button = NULL; + Evas_Object *nfc_setting_list = NULL; + + LOGD("BEGIN >>>>"); + + /* set text domain */ + bindtextdomain(NFCUG_TEXT_DOMAIN, NFCUG_LOCALEDIR); + + /* create base view */ + parent = ug_get_parent_layout(ug); + if (!parent) + return NULL; + + ug_data->ug_win_main = parent; + evas_object_show(ug_data->ug_win_main); + ug_data->nfc_setting_ug = ug; + + ug_data->base_layout = __create_main_layout(ug_data->ug_win_main); + ug_data->bg = __create_bg(ug_data->ug_win_main, "group_list"); + elm_object_part_content_set(ug_data->base_layout, "elm.swallow.bg", ug_data->bg); + + ug_data->base_naviframe = elm_naviframe_add(ug_data->base_layout); + elm_object_part_content_set(ug_data->base_layout, "elm.swallow.content", + ug_data->base_naviframe); + + evas_object_show(ug_data->base_naviframe); + + ug_data->service = service; + nfc_setting_list = __create_nfc_list(ug_data); + + if (nfc_setting_list == NULL) { + LOGE("create nfc list failed"); + return NULL; + } + + /* Push navifreme */ + l_button = elm_button_add(ug_data->base_naviframe); + elm_object_style_set(l_button, "naviframe/back_btn/default"); + evas_object_smart_callback_add(l_button, "clicked", __back_clicked_cb, ug_data); + + eext_object_event_callback_add(ug_data->base_naviframe, EEXT_CALLBACK_BACK, + eext_naviframe_back_cb, NULL); + + ug_data->base_navi_it = elm_naviframe_item_push(ug_data->base_naviframe, + IDS_NFC_NFC, l_button, NULL, nfc_setting_list, NULL); + + elm_naviframe_item_pop_cb_set(ug_data->base_navi_it, __back_clicked_cb, ug_data); + + LOGD("END >>>>"); + + return ug_data->base_layout; +} + +static void __ug_nfc_destroy(ui_gadget_h ug, app_control_h service, void *priv) +{ + ugdata_t *ug_data = (ugdata_t *)priv; + + LOGD("BEGIN >>>>"); + + if ((ug_data == NULL) || (ug == NULL)) + return; + + if (nfc_manager_deinitialize() != NFC_ERROR_NONE) + LOGE("NFC deinitialize failed"); + + evas_object_del(ug_get_layout(ug)); + + LOGD("END >>>>"); +} + +static void __ug_nfc_start(ui_gadget_h ug, app_control_h service, void *priv) +{ + ugdata_t *ug_data = (ugdata_t *)priv; + + LOGD("BEGIN >>>>"); + + if (nfc_manager_is_supported() == false) { + LOGE("NFC not supported"); + /* popup */ + } + + if (nfc_manager_initialize() != NFC_ERROR_NONE) + LOGE("NFC initialize failed"); + + LOGD("END >>>>"); +} + +UG_MODULE_API int UG_MODULE_INIT(struct ug_module_ops *ops) +{ + ugdata_t *ug_data; + + LOGD("UG_MODULE_INIT!!"); + + if (!ops) + return -1; + + ug_data = (ugdata_t *)g_malloc0((gint)sizeof(ugdata_t)); + if (!ug_data) + return -1; + + ops->create = __ug_nfc_create; + ops->start = __ug_nfc_start; + ops->destroy = __ug_nfc_destroy; + ops->priv = ug_data; + ops->opt = UG_OPT_INDICATOR_ENABLE; + + return 0; +} + +UG_MODULE_API void UG_MODULE_EXIT(struct ug_module_ops *ops) +{ + ugdata_t *ug_data; + + LOGD("UG_MODULE_EXIT!!"); + + if (!ops) + return; + + ug_data = ops->priv; + + if (ug_data) + free(ug_data); + + ops->priv = NULL; +} diff --git a/ug-nfc-efl.xml b/ug-nfc-efl.xml new file mode 100755 index 0000000..a0b7528 --- /dev/null +++ b/ug-nfc-efl.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest xmlns="http://tizen.org/ns/packages" package="ug-nfc-efl" api-version="3.0" version="3.0.0" install-location="internal-only"> + <label>NFC Setting</label> + <author email="jh8801.jung@samsung.com" href="www.samsung.com">Jihoon Jung</author> + <description>NFC Setting</description> + <ui-application appid="ug-nfc-efl" exec="/usr/ug/bin/ug-nfc-efl" nodisplay="true" multiple="true" type="capp" taskmanage="false"> + <label>NFC</label> + <icon>/usr/ug/res/icons/ug-nfc-efl/setting-nfc.png</icon> + <application-service> + <operation name="http://tizen.org/appcontrol/operation/setting/nfc"/> + </application-service> + </ui-application> +</manifest> diff --git a/ug-nfc-setting-efl/CMakeLists.txt b/ug-nfc-setting-efl/CMakeLists.txt deleted file mode 100644 index 7f19db6..0000000 --- a/ug-nfc-setting-efl/CMakeLists.txt +++ /dev/null @@ -1,90 +0,0 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 2.6) -PROJECT(ug-setting-nfc-efl C) - -SET(PREFIX ${CMAKE_INSTALL_PREFIX}) -SET(EXEC_PREFIX "\${prefix}") -SET(LIBDIR "\${prefix}/lib") -SET(INCLUDEDIR "\${prefix}/include") -SET(VERSION 0.1.0) -SET(RESDIR "${PREFIX}/res") -SET(LOCALEDIR "${RESDIR}/locale") -SET(EDJDIR "${RESDIR}/edje/${PROJECT_NAME}") -SET(ICONDIR "${RESDIR}/icons/${PROJECT_NAME}") - -ADD_DEFINITIONS("-DPACKAGE=\"ug-setting-nfc-efl\"") -ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"") -ADD_DEFINITIONS("-DLOCALEDIR=\"${LOCALEDIR}\"") -ADD_DEFINITIONS("-DEDJDIR=\"${EDJDIR}\"") -ADD_DEFINITIONS("-DICONDIR=\"${ICONDIR}\"") - -SET(SRCS -src/ug-nfc-setting-main.c -src/ug-nfc-setting-secure-storage.c -src/ug-nfc-setting-popup.c -) - -IF("${CMAKE_BUILD_TYPE}" STREQUAL "") - SET(CMAKE_BUILD_TYPE "Release") -ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "") -MESSAGE("Build type: ${CMAKE_BUILD_TYPE}") - -INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include) - -INCLUDE(FindPkgConfig) -pkg_check_modules(pkgs_ug_nfc_setting REQUIRED -ecore-evas -elementary -efl-assist -ui-gadget-1 -dlog -vconf -capi-appfw-application -capi-network-nfc -capi-appfw-app-manager -sqlite3 -notification -) - -FOREACH(flag ${pkgs_ug_nfc_setting_CFLAGS}) - SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") -ENDFOREACH(flag) - -SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror-implicit-function-declaration") -SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}") -SET(CMAKE_C_FLAGS_DEBUG "-O0 -g") -SET(CMAKE_C_FLAGS_RELEASE "-O2") - -FIND_PROGRAM(UNAME NAMES uname) -EXEC_PROGRAM("${UNAME}" ARGS "-m" OUTPUT_VARIABLE "ARCH") -IF("${ARCH}" STREQUAL "arm") - ADD_DEFINITIONS("-DTARGET") - MESSAGE("add -DTARGET") -ENDIF("${ARCH}" STREQUAL "arm") - -SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed") - -ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"") -ADD_DEFINITIONS("-DEDJDIR=\"${EDJDIR}\"") -ADD_DEFINITIONS("-DRESDIR=\"${RESDIR}\"") -ADD_DEFINITIONS("-D_SBEAM_SUPPORT_") - -ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS}) -SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SOVERSION 0.1.0) -TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_ug_nfc_setting_LDFLAGS}) - -ADD_CUSTOM_TARGET(ug-setting-nfc-efl.edj - COMMAND edje_cc - ${CMAKE_CURRENT_SOURCE_DIR}/data/edc/ug-setting-nfc-efl.edc ${CMAKE_BINARY_DIR}/ug-setting-nfc-efl.edj - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/data/edc/ug-setting-nfc-efl.edc -) -ADD_DEPENDENCIES(${PROJECT_NAME} ug-setting-nfc-efl.edj) - -INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${LIBDIR}) -INSTALL(FILES ${CMAKE_BINARY_DIR}/ug-setting-nfc-efl.edj DESTINATION ${EDJDIR}) - -INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/icons/setting-nfc.png DESTINATION ${ICONDIR}) - -# install xml file -INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/sysinfo-nfc-ug.xml DESTINATION /etc/config/nfc/) - -ADD_SUBDIRECTORY(po) diff --git a/ug-nfc-setting-efl/include/ug-nfc-setting-main.h b/ug-nfc-setting-efl/include/ug-nfc-setting-main.h deleted file mode 100644 index 12b92ce..0000000 --- a/ug-nfc-setting-efl/include/ug-nfc-setting-main.h +++ /dev/null @@ -1,170 +0,0 @@ -/* - * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd. - * - * Licensed under the Flora License, Version 1.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - - * http://floralicense.org/license/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -#ifndef __UG_NFC_SETTING_MAIN_H__ -#define __UG_NFC_SETTING_MAIN_H__ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -#include <stdio.h> -#include <ui-gadget-module.h> -#include <Evas.h> -#include <Ecore.h> -#include <Elementary.h> -#include <bundle.h> -#include <dlog.h> -#include <vconf.h> -#include <nfc.h> -#include <app_manager.h> -#include <app_info.h> -#include <glib.h> - - - -#define LOCALE_PATH LOCALEDIR -#define ICON_PATH ICONDIR -#define EDJ_PATH EDJDIR -#define EDJ_FILE EDJ_PATH"/"PACKAGE".edj" - -#ifdef LOG_TAG -#undef LOG_TAG -#endif - -#define LOG_TAG "UG_NFC_SETTING" - -#define NFCUG_TEXT_DOMAIN PACKAGE -#define NFCUG_LOCALEDIR LOCALE_PATH - -#define POPUP_TEXT_SIZE 1024 - - -/* Registered string in STMS NFC */ -#define IDS_NFC_NFC \ - dgettext(PACKAGE, "IDS_NFC_BODY_NFC") -#define IDS_NFC_DESCRIPTION_MSG \ - dgettext(PACKAGE, "IDS_NFC_BODY_WHEN_NFC_IS_ON_YOU_CAN_SEND_OR_RECEIVE_DATA_WHEN_YOUR_DEVICE_TOUCHES_OTHER_NFC_CAPABLE_DEVICES_OR_NFC_TAGS") -#define IDS_NFC_S_BEAM \ - dgettext(PACKAGE, "IDS_NFC_OPT_S_BEAM") -#define IDS_USE_NFC_IN_HOME \ - dgettext(PACKAGE, "IDS_NFC_OPT_USE_NFC_IN_HOME_ABB") -#define IDS_NFC_TURNED_ON \ - dgettext(PACKAGE, "IDS_NFC_BODY_NFC_TURNED_ON") -#define IDS_NFC_SECURE_STORAGE_HEADER \ - dgettext(PACKAGE, "IDS_NFC_HEADER_NFC_SECURE_STORAGE_ABB") -#define IDS_NFC_SECURE_STORAGE_BODY \ - dgettext(PACKAGE, "IDS_NFC_MBODY_NFC_SECURE_STORAGE") -#define IDS_NFC_SECURE_STORAGE_ITEM_MAN \ - dgettext(PACKAGE, "IDS_NFC_OPT_MANUAL") -#define IDS_NFC_SECURE_STORAGE_ITEM_AUTO \ - dgettext(PACKAGE, "IDS_NFC_OPT_AUTOMATIC") -#define IDS_NFC_DO_NOT_SHOW_AGAIN \ - dgettext(PACKAGE, "IDS_NFC_BODY_DO_NOT_SHOW_AGAIN_ABB2") -#define IDS_FAILED_TO_TURN_ON_NFC \ - dgettext(PACKAGE, "IDS_NFC_HEADER_FAILED_TO_TURN_ON_NFC_ABB") -#define IDS_AN_ERROR_OCCURRED_WHILE_TURNING_ON_NFC_TRY_AGAIN \ - dgettext(PACKAGE, "IDS_NFC_POP_AN_ERROR_OCCURRED_WHILE_TURNING_ON_NFC_TRY_AGAIN") - -#define IDS_SECURITY_POLICY_RESTRICTS_USE_OF_PS \ - dgettext(PACKAGE, "IDS_COM_BODY_SECURITY_POLICY_RESTRICTS_USE_OF_PS") -#define IDS_NONE \ - dgettext(PACKAGE, "IDS_COM_BODY_NONE") -#define IDS_CLOSE \ - dgettext(PACKAGE, "IDS_COM_POP_CLOSE") -#define IDS_OK \ - dgettext(PACKAGE, "IDS_COM_SK_OK") -#define IDS_NFC_SERVICE_IS_NOT_SUPPORTED \ - dgettext(PACKAGE, "IDS_TAGS_POP_NFC_SERVICE_IS_NOT_SUPPORTED") - -#define IDS_NFC_SECURE_STORAGE_ITEM_MAN_DSC \ - dgettext(PACKAGE, "IDS_ST_BODY_USE_YOUR_SIM_CARD_FOR_SECURE_STORAGE") -#define IDS_NFC_SECURE_STORAGE_ITEM_AUTO_DSC \ - dgettext(PACKAGE, "IDS_ST_BODY_SWITCH_AUTOMATICALLY_BETWEEN_USING_YOUR_SIM_CARD_AND_THE_ON_DEVICE_SECURE_STORAGE") -#define IDS_NFC_SECURE_STORAGE_TIPS \ - dgettext(PACKAGE, "IDS_ST_BODY_SELECTING_MANUAL_WILL_DISABLE_SOME_SECURE_FEATURES_SUCH_AS_NFC_PAYMENT_THAT_STORE_DATA_IN_THE_ON_DEVICE_SECURE_STORAGE") - -/* The following texts will be used by NFC Manager */ -// IDS_NFC_TPOP_TAG_TYPE_NOT_SUPPORTED - - -typedef enum { - MENU_NFC = 0, - MENU_MAX -} NFCSettingMenuType; - -typedef enum { - NFC_PREDEFINED_ITEM = 0, - NFC_SECURE_STORAGE, - NFC_SECURE_STORAGE_MAN, - NFC_SECURE_STORAGE_MAN_DES, - NFC_SECURE_STORAGE_AUTO, - NFC_SECURE_STORAGE_AUTO_DES, - NFC_SETTING_MAX -} NFCSettingType; - -enum { - UG_FONT_LIST = 0, - UG_FONT_SBEAM_TITLE, - UG_FONT_LIVEBOX, - UG_FONT_MAX, -}; - -enum { - UG_ALIGN_LEFT, - UG_ALIGN_CENTER, - UG_ALIGN_RIGHT, -}; - -typedef struct { - Evas_Object* ug_win_main; - ui_gadget_h nfc_setting_ug; - Evas_Object* base_layout; - Evas_Object *bg; - Evas_Object* ns_genlist; - Evas_Object* pd_genlist; - Evas_Object* ss_genlist; - Evas_Object* base_naviframe; - Evas_Object* ns_on_off; - Evas_Object* pd_on_off; - Evas_Object* popup; - - Elm_Object_Item *base_navi_it; - - NFCSettingMenuType menu_type; - guint h_ctxpop_res_t; - guint h_auto_t; - guint onoff_comp_t; - Evas_Object* more_bt; - Evas_Object* ctxpopup; /* for more button */ - - app_control_h service; -}ugdata_t; - -typedef struct { - NFCSettingType type; - ugdata_t *data; -} gl_item_data; - -/************************** API **************************/ -void _ug_nfc_secure_storage_create(void *data); - -#ifdef __cplusplus -} -#endif - -#endif /*__UG_NFC_SETTING_MAIN_H__*/ diff --git a/ug-nfc-setting-efl/include/ug-nfc-setting-popup.h b/ug-nfc-setting-efl/include/ug-nfc-setting-popup.h deleted file mode 100644 index 6f7e63b..0000000 --- a/ug-nfc-setting-efl/include/ug-nfc-setting-popup.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd. - * - * Licensed under the Flora License, Version 1.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - - * http://floralicense.org/license/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -#ifndef __UG_NFC_SETTING_POPUP_H__ -#define __UG_NFC_SETTING_POPUP_H__ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -#include "ug-nfc-setting-main.h" - -typedef void (*UG_NFC_POPUP_USER_RESP_CB)(void *data, Evas_Object *obj, void *event_info); - -enum { - UG_NFC_POPUP_RESP_NONE = -1, - UG_NFC_POPUP_RESP_TIMEOUT = -2, - UG_NFC_POPUP_RESP_OK = -3, - UG_NFC_POPUP_RESP_CANCEL = -4, - UG_NFC_POPUP_RESP_CLOSE = -5 -}; - - -Evas_Object *ug_nfc_setting_create_popup(void *data, - Evas_Object *parent_layout, - const char *title, - const char *description, - const char *btn1_text, - int btn1_type, - const char *btn2_text, - int btn2_type, - const char *btn3_text, - int btn3_type, - bool is_alert_type, - bool enable_timeout, - UG_NFC_POPUP_USER_RESP_CB response_cb); -void ug_nfc_setting_close_popup(Evas_Object* popup); - -#ifdef __cplusplus -} -#endif - - -#endif /*__UG_NFC_SETTING_POPUP_H__*/ - diff --git a/ug-nfc-setting-efl/src/ug-nfc-setting-main.c b/ug-nfc-setting-efl/src/ug-nfc-setting-main.c deleted file mode 100644 index e1aecf9..0000000 --- a/ug-nfc-setting-efl/src/ug-nfc-setting-main.c +++ /dev/null @@ -1,824 +0,0 @@ -/* - * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd. - * - * Licensed under the Flora License, Version 1.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - - * http://floralicense.org/license/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include <efl_assist.h> -#include <notification.h> - -#include "ug-nfc-setting-main.h" -#include "ug-nfc-setting-popup.h" - -#ifndef UG_MODULE_API -#define UG_MODULE_API __attribute__ ((visibility("default"))) -#endif - -static Elm_Genlist_Item_Class itc_sep; -static Elm_Genlist_Item_Class itc_sep_help; -static Elm_Genlist_Item_Class itc_helptext; -static Elm_Genlist_Item_Class itc_2text1con; -static Elm_Genlist_Item_Class itc_2text; -static Elm_Genlist_Item_Class itc_onoff; - -static Elm_Object_Item *pd_item; -static Elm_Object_Item *ss_item; - -static bool pending_status = false; -static Eina_Bool rotate_flag = EINA_FALSE; - -static void __nfc_activation_completed_cb(nfc_error_e error, void *user_data); -static void __nfc_activation_changed_cb(bool activated , void *user_data); - -static void __show_app_error_popup_response_cb(void *data, - Evas_Object *obj, void *event_info) -{ - ugdata_t *ug_data = (ugdata_t *)data; - int result = (int)event_info; - - if (!ug_data) { - LOGE("invalid parameter"); - return; - } - - switch (result) { - case UG_NFC_POPUP_RESP_CANCEL : - /* destroy UG */ - LOGD("ug_destroy_me >>>>", __FUNCTION__, __LINE__); - ug_destroy_me(ug_data->nfc_setting_ug); - break; - - default : - break; - } -} - -static void __show_app_error_popup(void *data) -{ - ugdata_t *ug_data = (ugdata_t *)data; - char popup_str[POPUP_TEXT_SIZE] = { 0, }; - - if (ug_data == NULL) - return; - - memcpy(popup_str, IDS_NFC_SERVICE_IS_NOT_SUPPORTED, - strlen(IDS_NFC_SERVICE_IS_NOT_SUPPORTED)); - - /* To do: popup_title */ - ug_nfc_setting_create_popup(ug_data, - ug_data->base_layout, - NULL, - popup_str, - IDS_CLOSE, UG_NFC_POPUP_RESP_CANCEL, - NULL, 0, - NULL, 0, - false, false, - __show_app_error_popup_response_cb); -} - -static void __nfc_activation_failed_popup_res_cb(void *data, - Evas_Object *obj, void *event_info) -{ - -} - -static void __nfc_activation_failed_popup_lang_changed_cb(void *data, - Evas_Object *obj, void *event_info) -{ - Evas_Object *button; - - if (obj == NULL) - return; - - elm_object_part_text_set(obj, "title,text", IDS_FAILED_TO_TURN_ON_NFC); - elm_object_text_set(obj, IDS_AN_ERROR_OCCURRED_WHILE_TURNING_ON_NFC_TRY_AGAIN); - - button = elm_object_part_content_get(obj, "button1"); - elm_object_text_set(button, IDS_OK); -} - -static void __nfc_activation_failed_popup(void *data) -{ - ugdata_t *ug_data = (ugdata_t *)data; - Evas_Object *popup; - - g_assert(ug_data != NULL); - - popup = ug_nfc_setting_create_popup(ug_data, - ug_data->base_layout, - IDS_FAILED_TO_TURN_ON_NFC, - IDS_AN_ERROR_OCCURRED_WHILE_TURNING_ON_NFC_TRY_AGAIN, - IDS_OK, UG_NFC_POPUP_RESP_OK, - NULL, 0, - NULL, 0, - false, false, __nfc_activation_failed_popup_res_cb); - - evas_object_smart_callback_add(popup, "language,changed", - __nfc_activation_failed_popup_lang_changed_cb, NULL); -} - -static char * __get_text_turned_on_popup(void *data) -{ - ugdata_t *ug_data = (ugdata_t *)data; - char *text = NULL; - int boolval = 0; - - if (!ug_data) { - LOGE("invalid parameter"); - return NULL; - } - - if (ug_data->menu_type == MENU_NFC) { - if (!vconf_get_bool(VCONFKEY_NFC_STATE, &boolval)) { - if (boolval) - text = strdup(IDS_NFC_TURNED_ON); - } - } - - return text; -} - -static bool __get_pending_status(void) -{ - return pending_status; -} - -static void __set_pending_status(bool status) -{ - pending_status = status; -} - -static bool __reply_to_launch_request(app_control_h service, app_control_result_e result) -{ - app_control_h reply; - char *operation = NULL; - bool ret = false; - LOGD("BEGIN >>>>"); - - if(service != NULL) - { - app_control_create(&reply); - app_control_get_operation(service, &operation); - - if (operation != NULL) - { - LOGD("reply to launch request : operation %s", operation); - app_control_reply_to_launch_request(reply, service, result); - ret = true; - } - - app_control_destroy(reply); - } - - LOGD("END >>>>"); - - return ret; -} - -static Eina_Bool __back_clicked_cb(void *data, Elm_Object_Item *it) -{ - ugdata_t *ug_data = (ugdata_t *)data; - - LOGD("BEGIN >>>>"); - - if(!ug_data) { - LOGE("data is null"); - return EINA_FALSE; - } - - __reply_to_launch_request(ug_data->service, APP_CONTROL_RESULT_FAILED); - - ug_destroy_me(ug_data->nfc_setting_ug); - - LOGD("END >>>>"); - - return EINA_FALSE; -} - -static void __update_title_onoff_obj(void *data) -{ - ugdata_t *ug_data = (ugdata_t *)data; - int boolval; - - if (!ug_data) - return; - - if (__get_pending_status()) { - elm_object_disabled_set(ug_data->ns_on_off, EINA_TRUE); - return; - } - - elm_object_disabled_set(ug_data->ns_on_off, EINA_FALSE); - if (ug_data->menu_type == MENU_NFC) { - if (!vconf_get_bool(VCONFKEY_NFC_STATE, &boolval) && - boolval) { - elm_check_state_set(ug_data->ns_on_off, EINA_TRUE); - } else { - elm_check_state_set(ug_data->ns_on_off, EINA_FALSE); - } - } -} - -static void __change_nfc_onoff_setting(void *data) -{ - ugdata_t *ug_data = (ugdata_t *)data; - int result, boolval; - - if (!ug_data) - return; - - if (!vconf_get_bool(VCONFKEY_NFC_STATE, &boolval)) { - LOGD("vconf_get_bool status [%d]", boolval); - - if (NFC_ERROR_NONE == nfc_manager_initialize()) { - - /* Register activation changed callback */ - nfc_manager_set_activation_changed_cb( - __nfc_activation_changed_cb, ug_data); - - result = nfc_manager_set_activation(!boolval, - __nfc_activation_completed_cb, ug_data); - if (result != NFC_ERROR_NONE) { - LOGE("nfc_manager_set_activation failed"); - return; - } - - __set_pending_status(true); - } else { - LOGE("nfc_manager_initialize FAIL!!!!"); - } - - - } else { - LOGE("vconf_get_bool failed"); - } - - __update_title_onoff_obj(ug_data); -} - -static void __nfc_activation_completed_cb(nfc_error_e error, - void *user_data) -{ - ugdata_t *ug_data = (ugdata_t *)user_data; - - g_assert(ug_data != NULL); - - if (error != NFC_ERROR_NONE) { - LOGE("__nfc_activation_completed_cb failed"); - - /* show failure popup */ - __nfc_activation_failed_popup(ug_data); - } -} - -static void __nfc_activation_changed_cb(bool activated , void *user_data) -{ - ugdata_t *ug_data = (ugdata_t *)user_data; - - LOGD("nfc mode %s ", activated ? "ON" : "OFF"); - - nfc_manager_unset_activation_changed_cb(); - - /* nfc setting ui updated */ - __set_pending_status(false); - - __update_title_onoff_obj(ug_data); - - if(__reply_to_launch_request(ug_data->service, APP_CONTROL_RESULT_SUCCEEDED) == true) - ug_destroy_me(ug_data->nfc_setting_ug); -} - -static void __title_ns_on_off_clicked_cb(void *data, Evas_Object *obj, - void *event_info) -{ - gl_item_data *item_data = (gl_item_data *)data; - ugdata_t *ug_data = item_data->data; - - if (ug_data == NULL) { - LOGE("data is null"); - return; - } - - if (__get_pending_status()) - return; - - if (ug_data->menu_type == MENU_NFC) { - __change_nfc_onoff_setting(ug_data); - } -} - -static void __ug_layout_cb(ui_gadget_h ug, enum ug_mode mode, void *priv) -{ - Evas_Object *base; - - if (ug == NULL) { - LOGE("data is null"); - return; - } - - base = ug_get_layout(ug); - if (!base) { - LOGE("ug_get_layout() return NULL"); - ug_destroy(ug); - return; - } - - evas_object_size_hint_weight_set(base, EVAS_HINT_EXPAND, - EVAS_HINT_EXPAND); - evas_object_show(base); -} - -static void __ug_destroy_cb(ui_gadget_h ug, void *data) -{ - if (ug == NULL) { - LOGE("data is null"); - return; - } - ug_destroy(ug); -} - -static void __popup_del_cb(void *data, Evas *e, Evas_Object *obj, - void *event_info) -{ - evas_object_event_callback_del(obj, EVAS_CALLBACK_DEL, __popup_del_cb); -} - -static void __popup_back_cb(void *data, Evas_Object *obj, - void *event_info) -{ - evas_object_del(obj); -} - -static void __ok_btn_clicked_cb(void *data, Evas_Object *obj, - void *event_info) -{ - ugdata_t *ug_data = (ugdata_t *)data; - - if(!ug_data) - return; - - if (ug_data->popup) - evas_object_del(ug_data->popup); - - _ug_nfc_secure_storage_create(ug_data); -} - -// get the state of item -static Eina_Bool __gl_state_get(void *data, Evas_Object *obj, const char *part) -{ - Eina_Bool result = EINA_FALSE; - - gl_item_data *item_data = (gl_item_data *)data; - - if (!item_data) { - LOGE("invalid parameter"); - return EINA_FALSE; - } - - return result; -} - -// callback for 'deletion' -static void __gl_del(void *data, Evas_Object *obj) -{ - gl_item_data *item_data = (gl_item_data *)data; - - if (item_data != NULL) - free(item_data); -} - -static void __gl_sel_activation(void *data, Evas_Object *obj, - void *event_info) -{ - Elm_Object_Item *item = (Elm_Object_Item *)event_info; - gl_item_data *item_data = (gl_item_data *)data; - ugdata_t *ug_data; - - - elm_genlist_item_selected_set(item, 0); - - if (!item || !item_data) { - LOGE("invalid parameter"); - return; - } - - ug_data = item_data->data; - if (!ug_data) { - LOGE("invalid parameter"); - return; - } -} - -static Evas_Object *__gl_content_get(void *data, Evas_Object *obj, - const char *part) -{ - gl_item_data *item_data = (gl_item_data *)data; - ugdata_t *ug_data; - Evas_Object *content = NULL; - int boolval; - - //LOGD("part:%s", part); - - if (!item_data) { - LOGE("invalid parameter"); - return NULL; - } - - ug_data = item_data->data; - if (!ug_data) { - LOGE("invalid parameter"); - return NULL; - } - - if (!strncmp(part, "elm.icon.2", strlen(part))) { - Evas_Object *tg = NULL; - - content = elm_layout_add(obj); - elm_layout_theme_set(content, "layout", "list/C/type.3", "default"); - tg = elm_check_add(content); - - int boolval = false; - int ret = vconf_get_bool(VCONFKEY_NFC_STATE, &boolval); - - if (boolval == false){ - elm_check_state_set(tg, EINA_FALSE); - } else { - elm_check_state_set(tg, EINA_TRUE); - } - - elm_object_style_set(tg, "on&off"); - evas_object_propagate_events_set(tg, EINA_FALSE); - evas_object_smart_callback_add(tg, "changed", __title_ns_on_off_clicked_cb, item_data); - - evas_object_show(tg); - - elm_layout_content_set(content, "elm.swallow.content", tg); - ug_data->ns_on_off = tg; - - __update_title_onoff_obj(ug_data); - - return content; - } - - return content; -} - -static char *__gl_text_get(void *data, Evas_Object *obj, - const char *part) -{ - gl_item_data *item_data = (gl_item_data *)data; - char *text = NULL; - int intval; - - //LOGD("part:%s", part); - - // label for 'elm.text' part - if (!item_data) { - LOGE("invalid parameter"); - return NULL; - } - - if (!strcmp(part, "elm.text.1")) { - if (item_data->type == NFC_SECURE_STORAGE) { - text = strdup(IDS_NFC_SECURE_STORAGE_BODY); - } - } else if (!strcmp(part, "elm.text.2")) { - if (item_data->type == NFC_SECURE_STORAGE) { - if (! vconf_get_int(VCONFKEY_NFC_WALLET_MODE, &intval)){ - if (intval == VCONFKEY_NFC_WALLET_MODE_MANUAL) - text = strdup(IDS_NFC_SECURE_STORAGE_ITEM_MAN); - else - text = strdup(IDS_NFC_SECURE_STORAGE_ITEM_AUTO); - } else { - LOGE("vconf_get_int failed"); - text = strdup(IDS_NFC_SECURE_STORAGE_ITEM_MAN); - } - } - } - else if (!strncmp(part, "elm.text.main.left", strlen(part))) { - text = strdup(IDS_NFC_NFC); - } - - return text; -} - -static char *__gl_text_get_des(void *data, Evas_Object *obj, - const char *part) -{ - int index = (int) data; - char *text = NULL; - - //LOGD("index:%d", index); - - if (index == 0) { - text = strdup(IDS_NFC_DESCRIPTION_MSG); - } - - return text; -} - -static void __nfc_sel(void *data, Evas_Object *obj, void *event_info) -{ - __title_ns_on_off_clicked_cb(data, obj, event_info); - - elm_genlist_item_selected_set((Elm_Object_Item *)event_info, EINA_FALSE); -} - -static Evas_Object *__create_nfc_setting_list(void *data) -{ - ugdata_t *ug_data = (ugdata_t *)data; - Evas_Object *genlist = NULL; - Elm_Object_Item* separator = NULL; - int boolval; - - - /* make genlist */ - genlist = elm_genlist_add(ug_data->base_naviframe); - if (genlist == NULL) { - LOGE("genlist is null"); - return NULL; - } - elm_genlist_mode_set(genlist, ELM_LIST_COMPRESS); - - itc_sep.item_style = "dialogue/separator"; - itc_sep.func.text_get = NULL; - itc_sep.func.content_get = NULL; - itc_sep.func.state_get = NULL; - itc_sep.func.del = NULL; - - itc_sep_help.item_style = "dialogue/separator.2"; - itc_sep_help.func.text_get = NULL; - itc_sep_help.func.content_get = NULL; - itc_sep_help.func.state_get = NULL; - itc_sep_help.func.del = NULL; - - itc_helptext.item_style = "multiline_sub"; - itc_helptext.func.text_get = __gl_text_get_des; - itc_helptext.func.content_get = NULL; - itc_helptext.func.state_get = NULL; - itc_helptext.func.del = NULL; - - itc_2text1con.item_style = "dialogue/2text.1icon.10"; - itc_2text1con.func.text_get = __gl_text_get; - itc_2text1con.func.content_get = __gl_content_get; - itc_2text1con.func.state_get = __gl_state_get; - itc_2text1con.func.del = __gl_del; - - itc_2text.item_style = "dialogue/2text"; - itc_2text.func.text_get = __gl_text_get; - itc_2text.func.content_get = NULL; - itc_2text.func.state_get = NULL; - itc_2text.func.del = __gl_del; - - itc_onoff.item_style = "1line"; - itc_onoff.func.text_get = __gl_text_get; - itc_onoff.func.content_get = __gl_content_get; - itc_onoff.func.state_get = NULL; - itc_onoff.func.del = __gl_del; - - gl_item_data *item_data = NULL; - static Elm_Object_Item *onoff_item; - - item_data = (gl_item_data *)g_malloc0((gint)sizeof(gl_item_data)); - - if (!item_data) - return NULL; - - item_data->data = ug_data; - onoff_item = elm_genlist_item_append(genlist, &itc_onoff, - (void *) item_data, NULL, ELM_GENLIST_ITEM_NONE, - __nfc_sel, (void *) item_data); - elm_object_item_signal_emit(onoff_item, "elm,state,top", ""); - - - /* NFC Help Text + SEPARATOR */ - static Elm_Object_Item *help_item; - help_item = elm_genlist_item_append(genlist, &itc_helptext, (void *)0, - NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL); - elm_genlist_item_select_mode_set(help_item, - ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); - elm_object_item_access_unregister(help_item); - - evas_object_show(genlist); - - return genlist; -} - -static Evas_Object *__create_bg(Evas_Object *parent, char *style) -{ - Evas_Object *bg = elm_bg_add(parent); - - evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - - if (style) - elm_object_style_set(bg, style); - - elm_win_resize_object_add(parent, bg); - - evas_object_show(bg); - - return bg; -} - -static Evas_Object *__create_main_layout(Evas_Object *parent) -{ - Evas_Object *layout; - - if (parent == NULL) - return NULL; - - layout = elm_layout_add(parent); - - elm_layout_theme_set(layout, "layout", "application", "default"); - - evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - - evas_object_show(layout); - - return layout; -} - -static void *__ug_nfc_setting_create(ui_gadget_h ug, enum ug_mode mode, - app_control_h service, void *priv) -{ - ugdata_t *ug_data = (ugdata_t *)priv; - Evas_Object *parent = NULL; - Evas_Object *nfc_setting_list = NULL; - Evas_Object *l_button = NULL; - - LOGD("BEGIN >>>>"); - - /* set text domain */ - bindtextdomain(NFCUG_TEXT_DOMAIN, NFCUG_LOCALEDIR); - - /* create base view */ - parent = ug_get_parent_layout(ug); - if (!parent) - return NULL; - ug_data->ug_win_main = parent; - evas_object_show(ug_data->ug_win_main); - ug_data->nfc_setting_ug = ug; - - ug_data->base_layout = __create_main_layout(ug_data->ug_win_main); - ug_data->bg = __create_bg(ug_data->ug_win_main, "group_list"); - elm_object_part_content_set(ug_data->base_layout, "elm.swallow.bg", - ug_data->bg); - - ug_data->base_naviframe = elm_naviframe_add(ug_data->base_layout); - elm_object_part_content_set(ug_data->base_layout, "elm.swallow.content", - ug_data->base_naviframe); - evas_object_show(ug_data->base_naviframe); - - ug_data->service = service; - - nfc_setting_list = __create_nfc_setting_list(ug_data); - ug_data->menu_type = MENU_NFC; - - if (nfc_setting_list == NULL) { - LOGE("wrong type"); - return NULL; - } - - ug_data->ns_genlist = nfc_setting_list; - - /* Push navifreme */ - l_button = elm_button_add(ug_data->base_naviframe); - elm_object_style_set(l_button, "naviframe/back_btn/default"); - ea_object_event_callback_add(ug_data->base_naviframe, EA_CALLBACK_BACK, - ea_naviframe_back_cb, NULL); - - if (ug_data->menu_type == MENU_NFC) { - ug_data->base_navi_it = elm_naviframe_item_push( - ug_data->base_naviframe, - IDS_NFC_NFC, - l_button, - NULL, - nfc_setting_list, - NULL); - } - elm_naviframe_item_pop_cb_set(ug_data->base_navi_it, __back_clicked_cb, - ug_data); - - LOGD("END >>>>"); - - return ug_data->base_layout; -} - -static void __ug_nfc_setting_destroy(ui_gadget_h ug, app_control_h service, - void *priv) -{ - ugdata_t *ug_data = (ugdata_t *)priv; - - LOGD("BEGIN >>>>"); - - if ((ug_data == NULL) || (ug == NULL)) - return; - - if (nfc_manager_deinitialize() != NFC_ERROR_NONE) - LOGE("nfc_manager_deinitialize failed"); - - evas_object_del(ug_get_layout(ug)); - - LOGD("END >>>>"); -} - -static void __ug_nfc_setting_start(ui_gadget_h ug, app_control_h service, - void *priv) -{ - ugdata_t *ug_data = (ugdata_t *)priv; - - LOGD("BEGIN >>>>"); - - /* check nfc-device*/ - if (!nfc_manager_is_supported()) { - LOGE("It is not nfc device >>>>"); - __show_app_error_popup(ug_data); - } - - if (NFC_ERROR_NONE != nfc_manager_initialize()) - LOGE("nfc_manager_initialize FAIL!!!!"); - - LOGD("END >>>>"); -} - -static void __ug_nfc_setting_pause(ui_gadget_h ug, app_control_h service, - void *priv) -{ - LOGD("BEGIN >>>>"); - LOGD("END >>>>"); -} - -static void __ug_nfc_setting_resume(ui_gadget_h ug, app_control_h service, - void *priv) -{ - LOGD("BEGIN >>>>"); - LOGD("END >>>>"); -} - - -static void __ug_nfc_setting_message(ui_gadget_h ug, app_control_h msg, - app_control_h service, void *priv) -{ - LOGD("BEGIN >>>>"); - LOGD("END >>>>"); -} - -static void __ug_nfc_setting_event(ui_gadget_h ug, enum ug_event event, - app_control_h service, void *priv) -{ - LOGD("BEGIN >>>>"); - LOGD("END >>>>"); -} - -UG_MODULE_API int UG_MODULE_INIT(struct ug_module_ops *ops) -{ - ugdata_t *ug_data; // User defined private data - - LOGD("UG_MODULE_INIT!!"); - - if (!ops) - return -1; - - ug_data = (ugdata_t *)g_malloc0((gint)sizeof(ugdata_t)); - if (!ug_data) - return -1; - - ops->create = __ug_nfc_setting_create; - ops->start = __ug_nfc_setting_start; - ops->pause = __ug_nfc_setting_pause; - ops->resume = __ug_nfc_setting_resume; - ops->destroy = __ug_nfc_setting_destroy; - ops->message = __ug_nfc_setting_message; - ops->event = __ug_nfc_setting_event; - ops->priv = ug_data; - ops->opt = UG_OPT_INDICATOR_ENABLE; - - return 0; -} - -UG_MODULE_API void UG_MODULE_EXIT(struct ug_module_ops *ops) -{ - ugdata_t *ug_data; - - LOGD("UG_MODULE_EXIT!!"); - - if (!ops) - return; - - ug_data = ops->priv; - - if (ug_data) - free(ug_data); - - ops->priv = NULL; -} diff --git a/ug-nfc-setting-efl/src/ug-nfc-setting-popup.c b/ug-nfc-setting-efl/src/ug-nfc-setting-popup.c deleted file mode 100644 index 7feb96c..0000000 --- a/ug-nfc-setting-efl/src/ug-nfc-setting-popup.c +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd. - * - * Licensed under the Flora License, Version 1.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - - * http://floralicense.org/license/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "ug-nfc-setting-popup.h" - -#define NFC_POPUP_AUTO_TIMEOUT_SEC 3.0 -#define MOUSE_RIGHT_BTN_UP 3 -#define KEY_BACK "XF86Back" - -static Evas_Object *_popup = NULL; -static UG_NFC_POPUP_USER_RESP_CB _user_response_cb; -static void *_user_data = NULL; - -static void _remove_key_event_handler(void); -static void _add_key_event_handler(void); - -static void _ug_nfc_setting_popup_response_cb(void *data, Evas_Object *obj, void *event_info) -{ - int btn_type = (int)data; - - if (_user_response_cb) - _user_response_cb(_user_data, obj, (void*)btn_type); - - LOGD("btn_type: %d", (int)btn_type); - LOGD("Popup is removed: [%p]", obj); - evas_object_del(_popup); - - _popup = NULL; - _user_response_cb = NULL; - _user_data = NULL; -} - -static Eina_Bool _ug_nfc_setting_popup_show_cb(void *data) -{ - if (_popup) - evas_object_show(_popup); - - return ECORE_CALLBACK_CANCEL; -} - -static void _popup_back_click_cb(void) -{ - if (!_popup) - return; - - _remove_key_event_handler(); - - _ug_nfc_setting_popup_response_cb((void*)UG_NFC_POPUP_RESP_CANCEL, _popup, NULL); -} - -static void _mouseup_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) -{ - Evas_Event_Mouse_Up *ev = event_info; - - if (!ev) - return; - - if (ev->button == MOUSE_RIGHT_BTN_UP) - _popup_back_click_cb(); -} - -static void _keydown_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) -{ - Evas_Event_Key_Down *ev = event_info; - - if (!ev) - return; - - if (!strcmp(ev->keyname, KEY_BACK)) - _popup_back_click_cb(); -} - -static void _remove_key_event_handler(void) -{ - if (!_popup) - return; - - evas_object_event_callback_del(_popup, EVAS_CALLBACK_MOUSE_UP, _mouseup_cb); - evas_object_event_callback_del(_popup, EVAS_CALLBACK_KEY_DOWN, _keydown_cb); -} - -static void _add_key_event_handler(void) -{ - if (!_popup) - return; - - evas_object_event_callback_add(_popup, EVAS_CALLBACK_MOUSE_UP, _mouseup_cb, NULL); - evas_object_event_callback_add(_popup, EVAS_CALLBACK_KEY_DOWN, _keydown_cb, NULL); -} - -static void _ug_nfc_setting_popup_block_clicked_cb(void *data, Evas_Object *obj, void *event_info) -{ - _ug_nfc_setting_popup_response_cb((void*)UG_NFC_POPUP_RESP_CANCEL, _popup, NULL); -} - -Evas_Object *ug_nfc_setting_create_popup(void *data, - Evas_Object *parent_layout, - const char *title, - const char *description, - const char *btn1_text, - int btn1_type, - const char *btn2_text, - int btn2_type, - const char *btn3_text, - int btn3_type, - bool is_alert_type, - bool enable_timeout, - UG_NFC_POPUP_USER_RESP_CB response_cb) -{ - Evas_Object *btn = NULL; - - if (data == NULL) - return NULL; - - if (_popup) { - ug_nfc_setting_close_popup(_popup); - _popup = NULL; - } - - _popup = elm_popup_add(parent_layout); - LOGD("Popup is created: [%p]", _popup); - evas_object_size_hint_weight_set(_popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - - if (title) - elm_object_part_text_set(_popup, "title,text", title); - - elm_object_text_set(_popup, description); - - if(btn1_text) { - btn = elm_button_add(_popup); - elm_object_style_set (btn, "popup"); - elm_object_text_set(btn, btn1_text); - elm_object_part_content_set(_popup, "button1", btn); - evas_object_smart_callback_add(btn, "clicked", - _ug_nfc_setting_popup_response_cb, (void*)btn1_type); - } - if (btn2_text) { - btn = elm_button_add(_popup); - elm_object_style_set (btn, "popup"); - elm_object_text_set(btn, btn2_text); - elm_object_part_content_set(_popup, "button2", btn); - evas_object_smart_callback_add(btn, "clicked", - _ug_nfc_setting_popup_response_cb, (void*)btn2_type); - } - if (btn3_text) { - btn = elm_button_add(_popup); - elm_object_style_set (btn, "popup"); - elm_object_text_set(btn, btn3_text); - elm_object_part_content_set(_popup, "button3", btn); - evas_object_smart_callback_add(btn, "clicked", - _ug_nfc_setting_popup_response_cb, (void*)btn3_type); - } - - _user_response_cb = response_cb; - _user_data = data; - - if (is_alert_type) { - evas_object_smart_callback_add(_popup, "block,clicked", - _ug_nfc_setting_popup_block_clicked_cb, NULL); - } - - if (enable_timeout) { - elm_popup_timeout_set(_popup, NFC_POPUP_AUTO_TIMEOUT_SEC); - evas_object_smart_callback_add(_popup, "timeout", - _ug_nfc_setting_popup_response_cb, NULL); - } - - _add_key_event_handler(); - - _ug_nfc_setting_popup_show_cb(NULL); - - return _popup; -} - - -void ug_nfc_setting_close_popup(Evas_Object* popup) -{ - if (NULL == popup || NULL == _popup || _popup != popup) { - LOGD("NULL == popup || NULL == _popup || _popup != popup"); - } - - _ug_nfc_setting_popup_response_cb((void*)UG_NFC_POPUP_RESP_CANCEL, _popup, NULL); -} - - diff --git a/ug-nfc-setting-efl/src/ug-nfc-setting-secure-storage.c b/ug-nfc-setting-efl/src/ug-nfc-setting-secure-storage.c deleted file mode 100644 index f585c24..0000000 --- a/ug-nfc-setting-efl/src/ug-nfc-setting-secure-storage.c +++ /dev/null @@ -1,305 +0,0 @@ -/* - * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd. - * - * Licensed under the Flora License, Version 1.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - - * http://floralicense.org/license/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -#include <glib.h> - -#include "ug-nfc-setting-main.h" - -static Elm_Genlist_Item_Class itc_sep; -static Elm_Genlist_Item_Class itc_sep_help; -static Elm_Genlist_Item_Class itc_helptext; -static Elm_Genlist_Item_Class itc_1text1icon; - - -static void __radio_changed_cb(void *data, Evas_Object *obj, - void *event_info) -{ - int value; - - value = elm_radio_value_get(obj); - - if (value == NFC_SECURE_STORAGE_MAN) { - if (vconf_set_int(VCONFKEY_NFC_WALLET_MODE, - VCONFKEY_NFC_WALLET_MODE_MANUAL)) { - LOGE("vconf_set_int failed"); - } - } else if (value == NFC_SECURE_STORAGE_AUTO) { - if (vconf_set_int(VCONFKEY_NFC_WALLET_MODE, - VCONFKEY_NFC_WALLET_MODE_AUTOMATIC)) { - LOGE("vconf_set_int failed"); - } - } -} - -static char *__gl_text_get(void *data, Evas_Object *obj, const char *part) -{ - int index = (int) data; - char *text = NULL; - - //LOGD("part:%s", part); - //LOGD("index:%d", index); - - if (index == 0) { - text = strdup(IDS_NFC_SECURE_STORAGE_ITEM_MAN); - } else if (index == 1) { - text = strdup(IDS_NFC_SECURE_STORAGE_ITEM_AUTO); - } - - return text; -} - -static char *__gl_text_get_des(void *data, Evas_Object *obj, - const char *part) -{ - int index = (int) data; - char *text = NULL; - - //LOGD("part:%s", part); - //LOGD("index:%d", index); - - if (index == 0) { - text = strdup(IDS_NFC_SECURE_STORAGE_ITEM_MAN_DSC); - } else if (index == 1) { - text = strdup(IDS_NFC_SECURE_STORAGE_ITEM_AUTO_DSC); - } - - return text; -} - -static Evas_Object *__gl_content_get(void *data, Evas_Object *obj, - const char *part) -{ - int index = (int) data; - Evas_Object *content = NULL; - Evas_Object *radio_group; - int intval; - - - //LOGD("part:%s", part); - //LOGD("index:%d", index); - - if (!strcmp(part, "elm.icon")) { - if (index == 0) { - radio_group = evas_object_data_get(obj, "radio"); - - content = elm_radio_add(obj); - elm_radio_state_value_set(content, - NFC_SECURE_STORAGE_MAN); - elm_radio_group_add(content, radio_group); - evas_object_propagate_events_set(content, EINA_FALSE); - evas_object_smart_callback_add(content, "changed", - __radio_changed_cb, NULL); - - if ((!vconf_get_int(VCONFKEY_NFC_WALLET_MODE, &intval)) && - (intval == VCONFKEY_NFC_WALLET_MODE_MANUAL)) { - elm_radio_value_set(content, - NFC_SECURE_STORAGE_MAN); - } - } else if (index == 1) { - radio_group = evas_object_data_get(obj, "radio"); - - content = elm_radio_add(obj); - elm_radio_state_value_set(content, - NFC_SECURE_STORAGE_AUTO); - elm_radio_group_add(content, radio_group); - evas_object_propagate_events_set(content, EINA_FALSE); - evas_object_smart_callback_add(content, "changed", - __radio_changed_cb, NULL); - - if ((!vconf_get_int(VCONFKEY_NFC_WALLET_MODE, &intval)) && - (intval == VCONFKEY_NFC_WALLET_MODE_AUTOMATIC)) { - elm_radio_value_set(content, - NFC_SECURE_STORAGE_AUTO); - } - } - } - - return content; -} - -static void __gl_sel(void *data, Evas_Object *obj, void *event_info) -{ - Elm_Object_Item *item = (Elm_Object_Item *) event_info; - Evas_Object *radio; - int index; - - if (!item) - return; - - elm_genlist_item_selected_set(item, 0); - - index = (int) elm_object_item_data_get(item); - LOGD("index:%d", index); - - if (index == 0) { - radio = elm_object_item_part_content_get(item, "elm.icon"); - - elm_radio_value_set(radio, NFC_SECURE_STORAGE_MAN); - if (!vconf_set_int(VCONFKEY_NFC_WALLET_MODE, - VCONFKEY_NFC_WALLET_MODE_MANUAL)) { - LOGD("vconf_set_int success"); - } - } else if (index == 1) { - radio = elm_object_item_part_content_get(item,"elm.icon"); - - elm_radio_value_set(radio, NFC_SECURE_STORAGE_AUTO); - if (!vconf_set_int(VCONFKEY_NFC_WALLET_MODE, - VCONFKEY_NFC_WALLET_MODE_AUTOMATIC)) { - LOGD("vconf_set_int success"); - } - } - elm_genlist_item_update(item); -} - -static void __genlist_free_cb(void *data, Evas *e, Evas_Object *obj, - void *ei) -{ - Evas_Object *radio_group = evas_object_data_get(obj, "radio"); - - if (radio_group) - evas_object_del(radio_group); -} - -static Evas_Object *__create_secure_storage_list(void *data) -{ - ugdata_t *ug_data = (ugdata_t *) data; - Elm_Object_Item* separator; - Evas_Object *genlist, *radio_group; - - if (!ug_data) - return NULL; - - genlist = elm_genlist_add(ug_data->base_naviframe); - if (!genlist) { - LOGE("elm_genlist_add failed"); - return NULL; - } - - elm_genlist_mode_set(genlist, ELM_LIST_COMPRESS); - evas_object_event_callback_add(genlist, EVAS_CALLBACK_FREE, - __genlist_free_cb, NULL); - - radio_group = elm_radio_add(genlist); - elm_radio_state_value_set(radio_group, 0); - elm_radio_value_set(radio_group, 0); - evas_object_data_set(genlist, "radio", radio_group); - - itc_sep.item_style = "dialogue/separator"; - itc_sep.func.text_get = NULL; - itc_sep.func.content_get = NULL; - itc_sep.func.state_get = NULL; - itc_sep.func.del = NULL; - - itc_sep_help.item_style = "dialogue/separator.2"; - itc_sep_help.func.text_get = NULL; - itc_sep_help.func.content_get = NULL; - itc_sep_help.func.state_get = NULL; - itc_sep_help.func.del = NULL; - - itc_1text1icon.item_style = "dialogue/1text.1icon.3"; - itc_1text1icon.func.text_get = __gl_text_get; - itc_1text1icon.func.content_get = __gl_content_get; - itc_1text1icon.func.state_get = NULL; - itc_1text1icon.func.del = NULL; - - itc_helptext.item_style = "multiline/1text"; - itc_helptext.func.text_get = __gl_text_get_des; - itc_helptext.func.content_get = NULL; - itc_helptext.func.state_get = NULL; - itc_helptext.func.del = NULL; - - /* SEPARATOR */ - separator = elm_genlist_item_append(genlist, &itc_sep, NULL, NULL, - ELM_GENLIST_ITEM_NONE, NULL, NULL); - elm_genlist_item_select_mode_set(separator, - ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); - elm_object_item_access_unregister(separator); - - /* Manual item : index 0 */ - elm_genlist_item_append(genlist, &itc_1text1icon, (void *)0, NULL, - ELM_GENLIST_ITEM_NONE, __gl_sel, NULL); - separator = elm_genlist_item_append(genlist, &itc_sep_help, - NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL); - elm_genlist_item_select_mode_set(separator, - ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); - elm_object_item_access_unregister(separator); - - // Help text - elm_genlist_item_append(genlist, &itc_helptext, (void *) 0, - NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL); - separator = elm_genlist_item_append(genlist, &itc_sep, NULL, NULL, - ELM_GENLIST_ITEM_NONE, NULL, NULL); - elm_genlist_item_select_mode_set(separator, - ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); - elm_object_item_access_unregister(separator); - - /* Automatic item + separator */ - elm_genlist_item_append(genlist, &itc_1text1icon, (void *)1, NULL, - ELM_GENLIST_ITEM_NONE, __gl_sel, NULL); - separator = elm_genlist_item_append(genlist, &itc_sep_help, - NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL); - elm_genlist_item_select_mode_set(separator, - ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); - elm_object_item_access_unregister(separator); - - // Help text - elm_genlist_item_append(genlist, &itc_helptext, (void *) 1, - NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL); - separator = elm_genlist_item_append(genlist, &itc_sep, NULL, NULL, - ELM_GENLIST_ITEM_NONE, NULL, NULL); - elm_genlist_item_select_mode_set(separator, - ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); - elm_object_item_access_unregister(separator); - - return genlist; -} - -static Eina_Bool __destroy_secure_storage_list(void *data, - Elm_Object_Item *it) -{ - ugdata_t *ug_data = (ugdata_t *)data; - - if (ug_data && ug_data->ns_genlist) { - elm_genlist_realized_items_update(ug_data->ns_genlist); - } - - return EINA_TRUE; -} - -void _ug_nfc_secure_storage_create(void *data) -{ - ugdata_t *ug_data = (ugdata_t *)data; - Evas_Object *genlist; - - if (!ug_data) { - LOGE("invalid paramater"); - return; - } - - /* create setting view */ - ug_data->ss_genlist = genlist = __create_secure_storage_list(ug_data); - if (!genlist) - return; - - /* Push navifreme */ - ug_data->base_navi_it = elm_naviframe_item_push(ug_data->base_naviframe, - IDS_NFC_SECURE_STORAGE_HEADER, NULL, NULL, genlist, NULL); - elm_naviframe_item_pop_cb_set(ug_data->base_navi_it, - __destroy_secure_storage_list, ug_data); -} - - diff --git a/ug-nfc-setting-efl/sysinfo-nfc-ug.xml b/ug-nfc-setting-efl/sysinfo-nfc-ug.xml deleted file mode 100644 index a54e96e..0000000 --- a/ug-nfc-setting-efl/sysinfo-nfc-ug.xml +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version="1.0"?>
-<sys-info>
- <default>
- <key id="reserved-push-support" string="true"/>
- </default>
-</sys-info>
diff --git a/ug-nfc-setting-efl/ug-setting-nfc-efl.xml b/ug-nfc-setting-efl/ug-setting-nfc-efl.xml deleted file mode 100644 index 08a27f4..0000000 --- a/ug-nfc-setting-efl/ug-setting-nfc-efl.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<manifest xmlns="http://tizen.org/ns/packages" package="ug-nfc-efl" version="2.0.25" install-location="internal-only"> - <label>NFC Setting</label> - <author email="junyong.sim@samsung.com" href="www.samsung.com">Junyong Sim</author> - <description>NFC Setting</description> - <ui-application appid="setting-nfc-efl" exec="/usr/ug/bin/setting-nfc-efl" nodisplay="true" multiple="true" type="capp" taskmanage="false"> - <label>NFC</label> - <icon>/usr/ug/res/icons/ug-setting-nfc-efl/setting-nfc.png</icon> - <application-service> - <operation name="http://tizen.org/appcontrol/operation/setting/nfc"/> - </application-service> - </ui-application> -</manifest> |