merge from master branch's latest code.
authorpark03 <park03@samsung.com>
Mon, 10 Dec 2012 04:21:15 +0000 (13:21 +0900)
committerpark03 <park03@samsung.com>
Mon, 10 Dec 2012 04:26:57 +0000 (13:26 +0900)
Patch set 1 : Initial Version. Apply white winset
Patch set 2 : version name update.

Change-Id: I93d7f618f59c3880f46f121a52e57638425c7164

23 files changed:
CMakeLists.txt
include/ciss-common.h
include/ciss-converter.h
include/ciss-parser.h
include/ciss-resp.h
include/ciss-respnd.h
include/ciss-string.h
include/ciss-tapi-request.h
include/ciss-types.h
include/ciss-ussd.h
include/ciss-util.h
include/ciss-widget.h
org.tizen.ciss.xml
packaging/org.tizen.ciss.spec
src/ciss-converter.c
src/ciss-main.c
src/ciss-parser.c
src/ciss-resp.c
src/ciss-respnd.c
src/ciss-tapi-request.c
src/ciss-ussd.c
src/ciss-util.c
src/ciss-widget.c

index 03886f4..008b348 100644 (file)
@@ -4,17 +4,18 @@ PROJECT(ciss C)
 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
 SET(BINDIR "${PREFIX}/bin")
 SET(RESDIR "${PREFIX}/res")
-SET(DATADIR "${PREFIX}/data")
 SET(LOCALEDIR "${RESDIR}/locale")
 SET(EDJDIR "${RESDIR}/edje")
 SET(IMGDIR "${RESDIR}/images")
+SET(DATADIR "/opt/usr/apps/org.tizen.ciss/data")
 
 ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"")
+ADD_DEFINITIONS("-DBINDIR=\"${BINDIR}\"")
 ADD_DEFINITIONS("-DRESDIR=\"${RESDIR}\"")
-ADD_DEFINITIONS("-DDATADIR=\"${DATADIR}\"")
 ADD_DEFINITIONS("-DLOCALEDIR=\"${LOCALEDIR}\"")
 ADD_DEFINITIONS("-DEDJDIR=\"${EDJDIR}\"")
 ADD_DEFINITIONS("-DIMGDIR=\"${IMGDIR}\"")
+ADD_DEFINITIONS("-DDATADIR=\"${DATADIR}\"")
 
 SET(SRCS
        src/ciss-main.c
@@ -65,7 +66,7 @@ ADD_DEPENDENCIES(${PROJECT_NAME} ciss-mmi.edj)
 
 INSTALL(TARGETS ${PROJECT_NAME} DESTINATION bin)
 INSTALL(DIRECTORY DESTINATION ${DATADIR})
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/org.tizen.${PROJECT_NAME}.xml DESTINATION /opt/share/packages/)
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/org.tizen.${PROJECT_NAME}.xml DESTINATION /usr/share/packages/)
 INSTALL(FILES ${CMAKE_BINARY_DIR}/ciss-mmi.edj DESTINATION ${EDJDIR})
 
 # i18n
index f4b8e5a..f9363c0 100644 (file)
  * limitations under the License.
  */
 
-#ifndef __CISS_COMMON_H__
-#define __CISS_COMMON_H__
+#ifndef _CISS_COMMON_H_
+#define _CISS_COMMON_H_
 
 #include <app_service.h>
 #include <tapi_common.h>
 #include <ITapiSs.h>
 #include <ITapiSat.h>
+#include <tapi_event.h>
 #include <TapiUtility.h>
 #include <Elementary.h>
 #include <vconf.h>
 #define PACKAGE "org.tizen.ciss"
 
 #if !defined(LOCALEDIR)
-    #  define LOCALEDIR "/opt/apps/org.tizen.ciss/res/locale"
+#define LOCALEDIR "/usr/apps/org.tizen.ciss/res/locale"
 #endif
 
 #if !defined(EDJDIR)
-    #  define EDJDIR "/opt/apps/org.tizen.ciss/res/edje"
+#define EDJDIR "/usr/apps/org.tizen.ciss/res/edje"
 #endif
-       
+
 #define EDJ_PATH EDJDIR
 #define EDJ_NAME EDJDIR"/ciss-mmi.edj"
 #define GRP_MAIN "main"
-#define IMG_DIR "/opt/apps/org.tizen.ciss/res/images"
+#define IMG_DIR "/usr/apps/org.tizen.ciss/res/images"
 
 #define _EDJ(o)                elm_layout_edje_get(o)
 
@@ -65,7 +66,6 @@
 #define unstructuredSS_Request          60
 #define unstructuredSS_Notify           61
 #define NULL_SS_OPERATION               0xff
-#define TAPI_NOTIFY_SS_REL_COMP_MSG            DBUS_TELEPHONY_SS_INTERFACE":RelCompMsg"        /**< used for SAT Terminal Response */
 
 typedef struct _EventHandler {
        const char *event_type;
@@ -91,7 +91,7 @@ typedef struct {
        char                            ss_new_password2[CISS_MAX_PASSWORD_LEN+1];      /**< remember the new pwd supplied again */
        char                            ss_code[MAX_SC_LEN + 1];                        /**< the ss code */
        TelSsUssdType_t ussd_type;                              /* Type of ussd */
-}ciss_mmi_context_t;
+} ciss_mmi_context_t;
 
 /**
 * Received TAPI Event when CISS is not launched
@@ -117,7 +117,7 @@ typedef struct {
        Evas *evas;
 
        Evas_Object *win_main;
-       Evas_Object *indicator;
+       Evas_Object *conformant;
        Evas_Object *nf;
        Evas_Object *layout_main;
        Evas_Object *content;
@@ -153,5 +153,5 @@ typedef struct {
        service_h service_handle;
 } ciss_appdata_t;
 
-#endif /* __CISS_COMMON_H__ */
+#endif /* _CISS_COMMON_H_ */
 
index b5e3cb1..d284c51 100644 (file)
  * limitations under the License.\r
  */\r
 \r
-#ifndef _CISS_CONVERTER_MMI_H_\r
-#define _CISS_CONVERTER_MMI_H_\r
-\r
-#ifdef __cplusplus\r
-extern "C" {\r
-#endif /* __cplusplus */\r
+#ifndef _CISS_CONVERTER_H_\r
+#define _CISS_CONVERTER_H_\r
 \r
 #include "ciss-common.h"\r
 #include <glib.h>\r
@@ -117,7 +113,7 @@ typedef enum {
 \r
 \r
 typedef struct {\r
-       char*                   local_sc;       /* local value of Service Code */\r
+       char                    *local_sc;      /* local value of Service Code */\r
        unsigned char           tapi_flavor;    /* TAPI flavor */\r
        unsigned char           ss_type;        /* barring, fwding, waiting, etc*/\r
 } sc_table_element_type;\r
@@ -182,5 +178,6 @@ void _ciss_ui_mmi_get_service_name(ciss_service_t in_service, char *service_name
 void _ciss_ui_mmi_get_flavor_name(ciss_flavor_t in_flavor, char *flavor_name);\r
 void _ciss_ui_mmi_get_bearer_name(ciss_service_t ss_type, ciss_telecomm_svc_t in_teleservice, char *teleservice_name);\r
 void _ciss_ui_mmi_get_result_status_type(ciss_service_t ss_type, ciss_status_t result_status, char *szResult);\r
-#endif /* _CISS_CONVERTER_MMI_H_ */\r
+\r
+#endif /* _CISS_CONVERTER_H_ */\r
 \r
index e752ac9..c8d536f 100644 (file)
  * limitations under the License.\r
  */\r
 \r
-#ifndef _CISS_PARSE_MMI_H_\r
-#define _CISS_PARSE_MMI_H_\r
-\r
-#ifdef __cplusplus\r
-extern "C" {\r
-#endif /* __cplusplus */\r
+#ifndef _CISS_PARSER_H_\r
+#define _CISS_PARSER_H_\r
 \r
 #include "ciss-common.h"\r
 #include <glib.h>\r
@@ -46,5 +42,5 @@ extern "C" {
  */\r
 int _ciss_parse_req_string(char *req_string, ciss_mmi_context_t *mmi_ctx);\r
 \r
-#endif /* _CISS_PARSE_MMI_H_ */\r
+#endif /* _CISS_PARSER_H_ */\r
 \r
index 2e4a48a..c4af3b8 100644 (file)
  * limitations under the License.
  */
 
-#ifndef _CISS_MMI_RESP_H_
-#define _CISS_MMI_RESP_H_
+#ifndef _CISS_RESP_H_
+#define _CISS_RESP_H_
 
 #include <Elementary.h>
 
 Evas_Object *_ciss_create_ss_resp_view(Evas_Object *parent, void *tapi_data, void *data);
 
-#endif
+#endif /* _CISS_RESP_H_ */
 
index 5f57422..681001a 100644 (file)
  * limitations under the License.\r
  */\r
 \r
-#ifndef _CISS_MMI_RESPND_H_\r
-#define _CISS_MMI_RESPND_H_\r
+#ifndef _CISS_RESPND_H_\r
+#define _CISS_RESPND_H_\r
 \r
 #include <Elementary.h>\r
 #include "ciss-ussd.h"\r
 \r
 void _ciss_create_respond_view(void *data);\r
 \r
-#endif\r
+#endif /* _CISS_RESPND_H_ */\r
 \r
index cc766fb..f76dcf0 100644 (file)
@@ -76,3 +76,4 @@
 #define CISS_STR_SMS                                                           dgettext("sys_string", "IDS_COM_BODY_SMS")
 #define CISS_STR_NETWORK_ERROR                                         dgettext("sys_string", "IDS_COM_POP_NETWORK_ERROR")
 #define CISS_STR_INFORMATION                                           dgettext("sys_string", "IDS_COM_BODY_INFORMATION")
+
index ac43024..0e5bdd0 100644 (file)
  * limitations under the License.\r
  */\r
 \r
-#ifndef _CISS_MMI_TAPI_EVENTS_H_\r
-#define _CISS_MMI_TAPI_EVENTS_H_\r
-\r
-#ifdef __cplusplus\r
-extern "C" {\r
-#endif /* __cplusplus */\r
+#ifndef _CISS_TAPI_REQUEST_H_\r
+#define _CISS_TAPI_REQUEST_H_\r
 \r
 #include "ciss-types.h"\r
 #include "ciss-common.h"\r
@@ -39,9 +35,5 @@ int _ciss_on_tapi_sat_ss_event(void *tapi_data, void *data);
 int _ciss_on_tapi_sat_ussd_event(void *tapi_data, void *data);\r
 int _ciss_tapi_ussd_resp_handle(int result, void *tapi_data, void *data);\r
 \r
-#ifdef __cplusplus\r
-}\r
-#endif /* __cplusplus */\r
-\r
-#endif /* _CISS_TAPI_EVENTS_H_ */\r
+#endif /* _CISS_TAPI_REQUEST_H_ */\r
 \r
index 8afa9e1..93c9a3d 100644 (file)
 #ifndef _CISS_TYPES_H_
 #define _CISS_TYPES_H_
 
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
 #define MID_CISS                       0x201E0012
 #define CISS_MODULE_ID                 22
 #define CISS_NUMBER_LEN_MAX            40      /**< Maximum length of number */
@@ -109,8 +105,7 @@ typedef enum {
 /**
  * This enumeration defines the telecomm services handled by the engine
  */
-typedef enum
-{
+typedef enum {
        CISS_TELECOMM_SVC_NONE,                         /**<0 : None */
        CISS_TELECOMM_SVC_ALL_TELE_BEARER,              /**<1 : All Tele and Bearer services */
 
@@ -181,7 +176,7 @@ typedef enum
  * This enumeration defines the various flavors of SS handled by the engine
  */
 typedef enum {
-/* Forward Flavor */
+       /* Forward Flavor */
        CISS_FLAVOR_NONE = 0x00,                                                /**<  None*/
        CISS_FLAVOR_FORWARD_START = 0x01,                                       /**<  Forward start*/
        CISS_FLAVOR_FORWARD_UNCONDITIONAL = 0x02,                               /**<  Forward unconditional*/
@@ -192,7 +187,7 @@ typedef enum {
        CISS_FLAVOR_FORWARD_ALL_FLAVORS = 0x07,                                 /**<  All Call Forward */
        CISS_FLAVOR_FORWARD_ALL_CONDITIONAL_FLAVORS = 0x08,                     /**<  Forward all conditional */
 
-/* Barring Flavor */
+       /* Barring Flavor */
        CISS_FLAVOR_BARRING_START = 0x10,                                       /**<  Barring start*/
        CISS_FLAVOR_BARRING_ALL_OUTGOING_CALLS = 0x11,                          /**<  bar all outgoing calls*/
        CISS_FLAVOR_BARRING_ALL_OUTGOING_INTERNATIONAL = 0x12,                  /**<  bar all outgoing international calls*/
@@ -225,8 +220,8 @@ typedef enum {
  * This enumeration defines the status of the SS
  */
 typedef enum {
-       CISS_STATUS_REGISTERED = 0x01,                  /**<  Registered*/
-       CISS_STATUS_PROVISIONED = 0x02,                 /**<  Provisioned*/
+       CISS_STATUS_REGISTERED = 0x01,                  /**<  Registered*/
+       CISS_STATUS_PROVISIONED = 0x02,                 /**<  Provisioned*/
        CISS_STATUS_ACTIVE = 0x03,                      /**<  Active*/
        CISS_STATUS_QUIESCENT = 0x04,                   /**<  Quiescent*/
        CISS_STATUS_NOTHING = 0x05                      /**<  Nothing*/
@@ -260,8 +255,8 @@ typedef enum {
 typedef enum {
        CISS_USSD_RES_UNKNOWN_ALPHABET = 0x00,          /**< unlnown alphabet */
        CISS_USSD_RES_DISPL_BUSY = 0x01,                /**< display is busy  */
-       CISS_USSD_RES_OK = 0x02,                        /**< response */
-       CISS_USSD_RES_NONE = 0x03                       /**< no response  use for user release*/
+       CISS_USSD_RES_OK = 0x02,                        /**< response */
+       CISS_USSD_RES_NONE = 0x03                       /**< no response  use for user release*/
 } ciss_ussd_response_type_t;
 
 /**
@@ -337,9 +332,5 @@ typedef enum {
        CISS_ENGINE_NOT_INIT = 0x03
 } ciss_engine_init_type;
 
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* _CISS_TYPES_H_ */
+#endif /* _CISS_TYPES_H_ */
 
index de0cdd3..5617231 100644 (file)
  * limitations under the License.
  */
 
-#ifndef _CISS_MMI_USSD_H_
-#define _CISS_MMI_USSD_H_
+#ifndef _CISS_USSD_H_
+#define _CISS_USSD_H_
 
 #include <Elementary.h>
 #include "ciss-common.h"
 
 Evas_Object *_ciss_create_ussd_view(Evas_Object *parent, void *tapi_data, void *data);
 void _ciss_ussd_quit_cb(void *data, Evas_Object *obj, void *event_info);
-#endif
+
+#endif /* _CISS_USSD_H_ */
 
index 0b09cb8..0431a27 100644 (file)
 #ifndef _CISS_UTIL_H_\r
 #define _CISS_UTIL_H_\r
 \r
-#ifdef __cplusplus\r
-extern "C" {\r
-#endif /* __cplusplus */\r
-\r
 /*\r
  * Functions of safe copy of string by checking the destination buffer size\r
  */\r
@@ -31,9 +27,5 @@ char *_ciss_strcpy(char *pBuffer, int nBufCount, const char *pszString);
  */\r
 void _ciss_util_swap(char *str1, char *str2);\r
 \r
-#ifdef __cplusplus\r
-}\r
-#endif /* __cplusplus */\r
-\r
-#endif /* _CISS_UTIL_H_ */\r
+#endif /* _CISS_UTIL_H_ */\r
 \r
index 9ee668b..c450d0f 100644 (file)
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef _CISS_MMI_VIEW_UTILS_H_
-#define _CISS_MMI_VIEW_UTILS_H_
+#ifndef _CISS_WIDGET_H_
+#define _CISS_WIDGET_H_
 
 #include <Elementary.h>
 #include <vconf.h>
@@ -49,29 +49,24 @@ enum {
        CISS_ICON_TYPE_OTHERS,
 };
 
-Evas_Object *_ciss_create_noti_popup(Evas_Object *parent,
-                       char *strtitle, char *strmsg, double t_timeout,void *data);
-Evas_Object *_ciss_create_error_popup(Evas_Object *parent,
-                       ciss_err_t ciss_error, double t_timeout,void *data);
+Evas_Object *_ciss_create_noti_popup(Evas_Object *parent, char *strtitle, char *strmsg, double t_timeout,void *data);
+Evas_Object *_ciss_create_error_popup(Evas_Object *parent, ciss_err_t ciss_error, double t_timeout,void *data);
 Evas_Object *_ciss_create_popup(Evas_Object *parent, char *msg);
 Evas_Object *_ciss_create_win(const char *name);
-Evas_Object *_ciss_create_layout_main( Evas_Object* parent);
+Evas_Object *_ciss_create_conformant(Evas_Object *parent);
+Evas_Object *_ciss_create_layout_main(Evas_Object *parent);
 Evas_Object *_ciss_create_bg(Evas_Object *parent);
-Evas_Object *_ciss_create_navi_control_bar(Evas_Object *parent,
-                       char *label1, Evas_Smart_Cb cb1,
-                       char *label2, Evas_Smart_Cb cb2,
-                       void *data, Elm_Object_Item *navi_it,
-                       Elm_Object_Item ** c_item);
-Evas_Object *_ciss_create_title_btn(Evas_Object *parent,
-               const char *text, Evas_Smart_Cb func, void *data);
+Evas_Object *_ciss_create_navi_control_bar(Evas_Object *parent, char *label1, Evas_Smart_Cb cb1, char *label2, Evas_Smart_Cb cb2, void *data, Elm_Object_Item *navi_it, Elm_Object_Item **c_item);
+Evas_Object *_ciss_create_title_btn(Evas_Object *parent, const char *text, Evas_Smart_Cb func, void *data);
 void _ciss_remove_naviframe(Evas_Object *nf);
 
-/*Callback Functions */
+/* Callback Functions */
 Eina_Bool _ciss_on_end_key_down(void *data, int type, void *event);
-Evas_Object * _ciss_create_result_genlist(const char *result_str, int str_len, Evas_Object *nf, void *data);
+Evas_Object *_ciss_create_result_genlist(const char *result_str, int str_len, Evas_Object *nf, void *data);
 void _ciss_geinlist_item_class_new(void *data);
 void _ciss_geinlist_item_class_free(void *data);
 void _ciss_create_genlist_separator_no_line(Evas_Object *genlist, void *data);
 void _ciss_create_genlist_underline(Evas_Object *genlist, void *data);
-#endif
+
+#endif /* _CISS_WIDGET_H_ */
 
index caf8440..c43753b 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns="http://tizen.org/ns/packages" package="org.tizen.ciss" version="0.5.01" install-location="internal-only">
+<manifest xmlns="http://tizen.org/ns/packages" package="org.tizen.ciss" version="0.5.02" install-location="internal-only">
        <label>Call Independent SS</label>
        <author email="park03@samsung.com" href="www.samsung.com">Youngsam Park</author>
        <author email="js49.lee@samsung.com" href="www.samsung.com">Jongseok Lee</author>
index dceb31c..f447dfa 100644 (file)
@@ -1,6 +1,6 @@
 Name:       org.tizen.ciss
 Summary:    CISS-MMI application
-Version:    0.5.01
+Version:    0.5.02
 Release:    1
 Group:      devel
 License:    Samsung
index b0f2cb0..11e6e57 100644 (file)
@@ -108,8 +108,9 @@ int _ciss_convert_bsg_to_tapi_bsg(char *local_bsg, TelSsClass_t *tapi_bsg)
        int local_bsg_len =0;
 
        local_bsg_len = strlen(local_bsg);
-       if (local_bsg_len > MAX_BSG_LEN)
+       if (local_bsg_len > MAX_BSG_LEN) {
                return FALSE;
+       }
 
        DBG("\n [CISS-ENGINE] local_bsg : %s", local_bsg);
        while (n < MAX_BSG_ENTRY) {
@@ -221,7 +222,7 @@ int _ciss_get_telecomm_svc(TelSsClass_t in_teleservice, ciss_telecomm_svc_t *out
                *out_teleservice = CISS_TELECOMM_SVC_VOICE;
                break;
        case TAPI_SS_CLASS_AUX_VOICE:
-                *out_teleservice = CISS_TELECOMM_SVC_AUX_VOICE;
+               *out_teleservice = CISS_TELECOMM_SVC_AUX_VOICE;
                break;
        case TAPI_SS_CLASS_FAX:
                *out_teleservice = CISS_TELECOMM_SVC_FAX;
@@ -509,10 +510,11 @@ void _ciss_ui_mmi_get_bearer_name(ciss_service_t ss_type, ciss_telecomm_svc_t in
        default:
                DBG("\n [CISS-MMI] _ciss_ui_get_bearer_name: ERROR  Wrong  Bearer = %d  come. \n", in_teleservice);
                if ((ss_type == CISS_SERVICE_WAITING) ||
-                   (ss_type == CISS_SERVICE_IDENTIFICATION))
+                               (ss_type == CISS_SERVICE_IDENTIFICATION)) {
                        strncpy(teleservice_name, "", CISS_TEXT_LEN_MAX - 1);
-               else
+               } else {
                        strncpy(teleservice_name, CISS_STR_ALL_SERVICES, CISS_TEXT_LEN_MAX - 1);
+               }
        }
        teleservice_name[CISS_TEXT_LEN_MAX - 1] = '\0';
 }
index 5f4d8d1..8e929a6 100644 (file)
@@ -46,6 +46,7 @@ static Eina_Bool __ciss_app_create(void *data)
        ciss_appdata_t *ad = (ciss_appdata_t *)data;
        _ciss_tapi_event_setup(ad);
        ad->win_main = NULL;
+       ad->conformant = NULL;
        ad->layout_main = NULL;
        ad->bg = NULL;
        ad->popup = NULL;
@@ -66,10 +67,15 @@ static void __ciss_app_terminate(void *data)
        ciss_appdata_t *ad = data;
 
        _ciss_geinlist_item_class_free(ad);
-       if (ad->win_main) {
-               evas_object_del(ad->win_main);
-               if (ad->end_key_event_handler)
-                       ecore_event_handler_del(ad->end_key_event_handler);
+
+       if (ad->layout_main) {
+               evas_object_del(ad->layout_main);
+               ad->layout_main = NULL;
+       }
+
+       if (ad->conformant) {
+               evas_object_del(ad->conformant);
+               ad->conformant = NULL;
        }
 
        if (ad->bg) {
@@ -77,6 +83,13 @@ static void __ciss_app_terminate(void *data)
                ad->bg = NULL;
        }
 
+       if (ad->win_main) {
+               evas_object_del(ad->win_main);
+               if (ad->end_key_event_handler) {
+                       ecore_event_handler_del(ad->end_key_event_handler);
+               }
+       }
+
        _ciss_deregister_tel_event(ad);
        DBG("Leave");
 }
@@ -84,6 +97,19 @@ static void __ciss_app_terminate(void *data)
 static void __ciss_app_pause(void *data)
 {
        DBG("Enter");
+
+       ciss_appdata_t *ad = (ciss_appdata_t *)data;
+       memset(ad->c_item, 0, sizeof(ad->c_item));
+
+       if ((ad->resp_ss_type == CISS_SERVICE_USSD) && (ad->ussd_action_require)) {
+               ciss_mmi_context_t mmi_ctx;
+               memset(&mmi_ctx, 0x0, sizeof(ciss_mmi_context_t));
+               mmi_ctx.opcode = processUnstructuredSS_Request;
+               mmi_ctx.ussd_type = TAPI_SS_USSD_TYPE_USER_REL;
+
+               _ciss_send_tapi_request(&mmi_ctx, ad);
+       }
+
        elm_exit();
 }
 
@@ -116,8 +142,9 @@ static void __ciss_app_service(service_h service, void *data)
                return;
        }
 
-       if (ad->win_main)
+       if (ad->win_main) {
                elm_win_activate(ad->win_main);
+       }
 
        __ciss_relaunch_handler(data);
 
@@ -137,7 +164,9 @@ static int __ciss_relaunch_handler(void *data)
        int event_type = 0;
 #ifdef _CISS_USE_PARAM
        int event_status = 0;
-       int encoded_data_length;
+       int encoded_data_length = 0;
+       char *key_status = NULL;
+       char *key_encoded_data_length = NULL;
 #endif
        int err = SERVICE_ERROR_NONE;
 
@@ -146,8 +175,6 @@ static int __ciss_relaunch_handler(void *data)
        char *launching_mode = NULL;
        char *req_string = NULL;
        char *key_event_type = NULL;
-       char *key_status = NULL;
-       char *key_encoded_data_length = NULL;
        char *key_encoded_data = NULL;
 
        err = service_get_extra_data(ad->service_handle, "CISS_LAUNCHING_MODE", &launching_mode);
@@ -156,7 +183,12 @@ static int __ciss_relaunch_handler(void *data)
                return -1;
        }
 
-       if (strcmp(launching_mode, "REQ") == 0) {
+       if (launching_mode == NULL) {
+               DBG("Cannot get launching_mode value...\n");
+               return -1;
+       }
+
+       if (strncmp(launching_mode, "REQ", 3) == 0) {
                err = service_get_extra_data(ad->service_handle, "CISS_REQ_STRING", &req_string);
                if (err != SERVICE_ERROR_NONE) {
                        DBG("service_get_extra_data for CISS_LAUNCHING_MODE failed - (%d)\n", err);
@@ -175,29 +207,45 @@ static int __ciss_relaunch_handler(void *data)
                        ad->end_key_event_handler = ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, _ciss_on_end_key_down, NULL);
                }
 
+               if (ad->conformant == NULL) {
+                       Evas_Object *conform = NULL;
+                       conform = _ciss_create_conformant(ad->win_main);
+                       retv_if(conform == NULL, -1);
+                       ad->conformant = conform;
+                       evas_object_show(conform);
+               }
+
                if (ad->popup != NULL)  {
                        evas_object_del(ad->popup);
                        ad->popup = NULL;
                }
 
+               if (ad->layout_main == NULL) {
+                       Evas_Object *ly = NULL;
+                       ly = _ciss_create_layout_main(ad->conformant);
+                       retv_if(ly == NULL, -1);
+                       ad->layout_main = ly;
+                       evas_object_show(ly);
+               }
+
                DBG("scale = %f", elm_config_scale_get());
 
-               popup = _ciss_create_noti_popup(ad->win_main, CISS_STR_REQUESTING, NULL, POPUP_DISPLAY_DURATION, ad);
+               popup = _ciss_create_noti_popup(ad->layout_main, CISS_STR_REQUESTING, NULL, POPUP_DISPLAY_DURATION, ad);
                ad->popup = popup;
                ciss_mmi_context_t      mmi_ctx;
 
                ciss_err_code = _ciss_parse_req_string(req_string, &mmi_ctx);
 
                if (ciss_err_code != CISS_ERR_NONE) {
-                       _ciss_create_error_popup(ad->win_main, ciss_err_code, 2.0, ad);
+                       _ciss_create_error_popup(ad->layout_main, ciss_err_code, 2.0, ad);
                } else {
                        ciss_err_code = _ciss_send_tapi_request(&mmi_ctx, ad);
                        DBG("ciss_err_code(_ciss_send_tapi_request) = %d", ciss_err_code);
                        if (ciss_err_code != CISS_ERR_NONE) {
-                               _ciss_create_error_popup(ad->win_main, ciss_err_code, 2.0, ad);
+                               _ciss_create_error_popup(ad->layout_main, ciss_err_code, 2.0, ad);
                        }
                }
-       } else if (strcmp(launching_mode, "RESP")== 0) {
+       } else if (strncmp(launching_mode, "RESP", 4)== 0) {
                err = service_get_extra_data(ad->service_handle, "KEY_EVENT_TYPE", &key_event_type);
                if (err != SERVICE_ERROR_NONE) {
                        DBG("service_get_extra_data for KEY_EVENT_TYPE failed - (%d)\n", err);
@@ -263,6 +311,7 @@ static int __ciss_relaunch_handler(void *data)
                free(key_event_type);
                key_event_type = NULL;
        }
+#ifdef _CISS_USE_PARAM
        if (key_status) {
                free(key_status);
                key_status = NULL;
@@ -271,6 +320,7 @@ static int __ciss_relaunch_handler(void *data)
                free(key_encoded_data_length);
                key_encoded_data_length = NULL;
        }
+#endif
        if (key_encoded_data) {
                free(key_encoded_data);
                key_encoded_data = NULL;
index 0ec236a..9a1f458 100644 (file)
@@ -33,9 +33,9 @@ static int __ciss_find_si_fields(char *user_input, char *sc, char *sia, char *si
        input = user_input;\r
        sc_len = strspn(input, "0123456789");\r
        DBG("\n [CISS-ENGINE] sc_len : %d", sc_len);\r
-       if (sc_len > MAX_SC_LEN)\r
+       if (sc_len > MAX_SC_LEN) {\r
                return FALSE;\r
-       else {\r
+       else {\r
                memcpy(sc, input, sc_len);\r
                sc[sc_len] = '\0';\r
        }\r
@@ -45,7 +45,7 @@ static int __ciss_find_si_fields(char *user_input, char *sc, char *sia, char *si
                sia_len = strspn((input + sia_offset), "+1234567890");\r
                if (input[sia_offset + sia_len] == '*') {       /* 2nd Seperator */\r
                        sib_offset = sia_offset + sia_len + 1;\r
-                       sib_len = strspn (input + sib_offset, "+1234567890");\r
+                       sib_len = strspn(input + sib_offset, "+1234567890");\r
                        if (input[sib_offset + sib_len] == '*') {       /* 3rd Seperator */\r
                                sic_offset = sib_offset + sib_len + 1;\r
                                sic_len = strspn(input + sic_offset, "+1234567890");\r
@@ -69,10 +69,11 @@ static int __ciss_find_si_fields(char *user_input, char *sc, char *sia, char *si
        }\r
 \r
        if ((sib_len > MAX_SIB_LEN) ||\r
-           (sia_len > MAX_SIA_LEN) ||\r
-           (sic_len > MAX_SIC_LEN))\r
+                       (sia_len > MAX_SIA_LEN) ||\r
+                       (sic_len > MAX_SIC_LEN)) {\r
                return FALSE;\r
-    return TRUE;\r
+       }\r
+       return TRUE;\r
 }\r
 \r
 static unsigned char __ciss_parse_mmi_string(ciss_mmi_context_t *mmi_ctx, int *error_code)\r
@@ -113,9 +114,10 @@ static unsigned char __ciss_parse_mmi_string(ciss_mmi_context_t *mmi_ctx, int *e
        ss_str_len = mmi_ctx->user_string_length;\r
 \r
        if (((memcmp(sups_str, "*31#", 4) == 0) ||\r
-           (memcmp(sups_str, "#31#", 4) == 0)) &&\r
-           (sups_str[ss_str_len - 1] != '#'))\r
+                       (memcmp(sups_str, "#31#", 4) == 0)) &&\r
+                       (sups_str[ss_str_len - 1] != '#')) {\r
                return NULL_SS_OPERATION;\r
+       }\r
 \r
        if (sups_str[0] == '*') {\r
                if (ISDIGIT(sups_str [1])) {\r
@@ -185,10 +187,10 @@ static unsigned char __ciss_parse_mmi_string(ciss_mmi_context_t *mmi_ctx, int *e
 \r
        strncpy(mmi_ctx->ss_code, ss_code, MAX_SC_LEN);\r
        if ((ss_operation != registerPassword) &&\r
-           (ss_operation != NULL_SS_OPERATION)) {\r
-               if (!_ciss_convert_sc_to_tapi_flavor(ss_code, &tapi_flavor, &ss_type))\r
+                       (ss_operation != NULL_SS_OPERATION)) {\r
+               if (!_ciss_convert_sc_to_tapi_flavor(ss_code, &tapi_flavor, &ss_type)) {\r
                        ss_operation = NULL_SS_OPERATION;\r
-               else {\r
+               else {\r
                        mmi_ctx->ss_flavor = tapi_flavor;\r
                        mmi_ctx->ss_type = ss_type;\r
                }\r
@@ -196,26 +198,26 @@ static unsigned char __ciss_parse_mmi_string(ciss_mmi_context_t *mmi_ctx, int *e
 \r
        if (ss_operation != NULL_SS_OPERATION) {\r
                if ((ss_operation != registerPassword)&&\r
-                   ((ss_type == CISS_SERVICE_FORWARDING)||\r
-                   (ss_type == CISS_SERVICE_BARRING))) {\r
-                       if (ss_operation == interrogateSS)\r
-                               strncpy(bsg, sia, MAX_SIA_LEN);\r
-                       else\r
+                               ((ss_type == CISS_SERVICE_FORWARDING)||\r
+                                (ss_type == CISS_SERVICE_BARRING))) {\r
                                strncpy(bsg, sib, MAX_SIB_LEN);\r
                } else if (ss_type == CISS_SERVICE_WAITING) {\r
-                       if ((sib[0] !=0) || (sic[0] != 0))\r
+                       if ((sib[0] !=0) || (sic[0] != 0)) {\r
                                ss_operation = NULL_SS_OPERATION;\r
-                       else\r
+                       } else {\r
                                strncpy(bsg, sia, MAX_SIA_LEN);\r
-               } else\r
+                       }\r
+               } else {\r
                        bsg[0] = '\0';\r
+               }\r
 \r
                if ((ss_operation != registerPassword) &&\r
-                   (ss_operation != NULL_SS_OPERATION)) {\r
-                       if (_ciss_convert_bsg_to_tapi_bsg(bsg, &tapi_bsg))\r
+                               (ss_operation != NULL_SS_OPERATION)) {\r
+                       if (_ciss_convert_bsg_to_tapi_bsg(bsg, &tapi_bsg)) {\r
                                mmi_ctx->tapi_bsg = tapi_bsg;\r
-                       else\r
+                       } else {\r
                                ss_operation = NULL_SS_OPERATION;\r
+                       }\r
                }\r
        }\r
 \r
@@ -229,26 +231,28 @@ static unsigned char __ciss_parse_mmi_string(ciss_mmi_context_t *mmi_ctx, int *e
        }\r
 \r
        if (((ss_operation == activateSS) || (ss_operation == registerSS)) &&\r
-           (ss_type == CISS_SERVICE_FORWARDING) &&\r
-           ((tapi_flavor == CISS_FLAVOR_FORWARD_ALL_FLAVORS) ||\r
-           (tapi_flavor == CISS_FLAVOR_FORWARD_ALL_CONDITIONAL_FLAVORS) ||\r
-           (tapi_flavor == TAPI_SS_CF_WHEN_CFNRy))) {\r
-               if (sic[0] != '\0')\r
+                       (ss_type == CISS_SERVICE_FORWARDING) &&\r
+                       ((tapi_flavor == CISS_FLAVOR_FORWARD_ALL_FLAVORS) ||\r
+                        (tapi_flavor == CISS_FLAVOR_FORWARD_ALL_CONDITIONAL_FLAVORS) ||\r
+                        (tapi_flavor == TAPI_SS_CF_WHEN_CFNRy))) {\r
+               if (sic[0] != '\0') {\r
                        mmi_ctx->nr_timer = atoi(sic);\r
-               else\r
+               } else {\r
                        mmi_ctx->nr_timer = 0;\r
+               }\r
        }\r
 \r
        if (ss_operation == activateSS) {\r
-               if (mmi_ctx->forward_number[0] > 0)\r
+               if (mmi_ctx->forward_number[0] > 0) {\r
                        ss_operation = registerSS;\r
-               else if (mmi_ctx->nr_timer != 0)\r
+               } else if (mmi_ctx->nr_timer != 0) {\r
                        ss_operation = registerSS;\r
+               }\r
        }\r
 \r
        if (ss_operation != NULL_SS_OPERATION) {\r
                if ((ss_type == CISS_SERVICE_BARRING) ||\r
-                   (ss_operation == registerPassword)) {\r
+                               (ss_operation == registerPassword)) {\r
                        if (strlen(sia) > 4) {\r
                                DBG("\n [CISS-ENGINE] Too long password");\r
                                ss_operation = NULL_SS_OPERATION;\r
@@ -258,7 +262,7 @@ static unsigned char __ciss_parse_mmi_string(ciss_mmi_context_t *mmi_ctx, int *e
                }\r
 \r
                if ((ss_type == CISS_SERVICE_BARRING) &&\r
-                   (ss_operation != registerPassword)) {\r
+                               (ss_operation != registerPassword)) {\r
                        if (ss_operation != interrogateSS) {\r
                                if (strlen(sia) < 4) {\r
                                        DBG("\n [CISS-ENGINE] Pwd Too Short : %d",strlen(sia));\r
@@ -280,8 +284,8 @@ static unsigned char __ciss_parse_mmi_string(ciss_mmi_context_t *mmi_ctx, int *e
 \r
        if (ss_operation == registerPassword) {\r
                if ((strlen(sia) != 4) ||\r
-                   (strlen(sib) != 4) ||\r
-                   (strlen(sic) != 4)) {\r
+                               (strlen(sib) != 4) ||\r
+                               (strlen(sic) != 4)) {\r
                        DBG("\n [CISS-ENGINE] Pwd Length Incorrect : %d %d %d", strlen(sia), strlen(sib), strlen(sic));\r
                        memset(mmi_ctx->ss_password, '\0', CISS_MAX_PASSWORD_LEN + 1);\r
                        memset(mmi_ctx->ss_new_password, '\0', CISS_MAX_PASSWORD_LEN + 1);\r
@@ -301,9 +305,10 @@ static unsigned char __ciss_parse_mmi_string(ciss_mmi_context_t *mmi_ctx, int *e
 \r
        if (ss_operation == NULL_SS_OPERATION) {\r
                if ((ss_str_len <= MAX_USS_CHAR) &&\r
-                   (ss_str_len > 2) &&\r
-                   (sups_str[ss_str_len - 1] == '#'))\r
+                               (ss_str_len > 2) &&\r
+                               (sups_str[ss_str_len - 1] == '#')) {\r
                        ss_operation = processUnstructuredSS_Request;\r
+               }\r
        }\r
        return (ss_operation);\r
 }\r
@@ -314,9 +319,9 @@ int _ciss_parse_req_string(char *pszSS, ciss_mmi_context_t *mmi_ctx)
        memset(mmi_ctx, 0x0, sizeof(ciss_mmi_context_t));\r
        DBG("\n [CISS-ENGINE] received string = %s", pszSS);\r
        mmi_ctx->user_string_length = strlen(pszSS);\r
-       if (mmi_ctx->user_string_length > 0)\r
+       if (mmi_ctx->user_string_length > 0) {\r
                memcpy(mmi_ctx->user_string, pszSS, mmi_ctx->user_string_length);\r
-       else {\r
+       else {\r
                DBG("\n [CISS-ENGINE] User String Length should be non-zero");\r
                return CISS_ERR_UNKNOWN;\r
        }\r
@@ -326,18 +331,19 @@ int _ciss_parse_req_string(char *pszSS, ciss_mmi_context_t *mmi_ctx)
        if (mmi_ctx->opcode == processUnstructuredSS_Request) {\r
                mmi_ctx->ussd_type = TAPI_SS_USSD_TYPE_USER_INIT;\r
        }\r
-       DBG("\n [CISS-ENGINE] Parsed opcode = %d", mmi_ctx->opcode);\r
-       DBG("\n [CISS-ENGINE] Parsed SSCode = %x", mmi_ctx->ss_flavor);\r
-       DBG("\n [CISS-ENGINE] Parsed SStype = %x", mmi_ctx->ss_type);\r
-       DBG("\n [CISS-ENGINE] Parsed BS Code = %x  ", mmi_ctx->tapi_bsg);\r
-       DBG("\n [CISS-ENGINE] Parsed NR Timer = %d", mmi_ctx->nr_timer);\r
-       DBG("\n [CISS-ENGINE] Parsed Forwarded No = %s", mmi_ctx->forward_number);\r
-       DBG("\n [CISS-ENGINE] Parsed SS Pwd = %s", mmi_ctx->ss_password);\r
-       DBG("\n [CISS-ENGINE] Parsed SS New Pwd = %s", mmi_ctx->ss_new_password);\r
-       DBG("\n [CISS-ENGINE] Parsed SS New Pwd cnf = %s", mmi_ctx->ss_new_password2);\r
+       DBG(" [CISS-ENGINE] Parsed opcode = 0x%x", mmi_ctx->opcode);\r
+       DBG(" [CISS-ENGINE] Parsed SSCode = 0x%x", mmi_ctx->ss_flavor);\r
+       DBG(" [CISS-ENGINE] Parsed SStype = 0x%x", mmi_ctx->ss_type);\r
+       DBG(" [CISS-ENGINE] Parsed BS Code = 0x%x  ", mmi_ctx->tapi_bsg);\r
+       DBG(" [CISS-ENGINE] Parsed NR Timer = %d", mmi_ctx->nr_timer);\r
+       DBG(" [CISS-ENGINE] Parsed Forwarded No = %s", mmi_ctx->forward_number);\r
+       DBG(" [CISS-ENGINE] Parsed SS Pwd = %s", mmi_ctx->ss_password);\r
+       DBG(" [CISS-ENGINE] Parsed SS New Pwd = %s", mmi_ctx->ss_new_password);\r
+       DBG(" [CISS-ENGINE] Parsed SS New Pwd cnf = %s", mmi_ctx->ss_new_password2);\r
        if ((mmi_ctx->opcode == NULL_SS_OPERATION) &&\r
-           (error_code == CISS_ERR_NONE))\r
+                       (error_code == CISS_ERR_NONE)) {\r
                error_code = CISS_ERR_ILLEGAL_SS_OPER;\r
+       }\r
 \r
        return error_code;\r
 }\r
index 5cbc54b..3acd467 100644 (file)
@@ -44,7 +44,7 @@ static void __ciss_create_forward_result_string(ciss_result_t *ciss_result, TelS
                        _ciss_get_telecomm_svc(ss_forward_info.record[i].Class, &ciss_result->szBearer[i]);
                        _ciss_get_result_status_type(ss_forward_info.record[i].Status, &ciss_result->szResult[i]);
                        if ((ss_forward_info.record[i].ForwardCondition == TAPI_SS_CF_WHEN_CFNRy)
-                               && (ss_forward_info.record[i].NoReplyWaitTime != 0)) {
+                                       && (ss_forward_info.record[i].NoReplyWaitTime != 0)) {
                                ciss_result->nForwardWaitingTime[i] = ss_forward_info.record[i].NoReplyWaitTime;
                                DBG("\n [CISS-ENGINE] __ciss_create_forward_result_string(Multiple %dth): No reply time=%d\n",
                                        i, ciss_result->nForwardWaitingTime[i]);
@@ -55,8 +55,8 @@ static void __ciss_create_forward_result_string(ciss_result_t *ciss_result, TelS
 
                        if (strlen((char *)ss_forward_info.record[i].szCallForwardingNumber) > 0) {
                                _ciss_strcpy(ciss_result->szForwardedToNumber[i],
-                                       sizeof(ciss_result->szForwardedToNumber[i]),
-                                       (char *)ss_forward_info.record[i].szCallForwardingNumber);
+                                                        sizeof(ciss_result->szForwardedToNumber[i]),
+                                                        (char *)ss_forward_info.record[i].szCallForwardingNumber);
                                DBG("\n [CISS-ENGINE] #########forwarding number in response= %s########\n\n",
                                        ciss_result->szForwardedToNumber[i]);
                        }
@@ -100,10 +100,11 @@ static void __ciss_create_waiting_result_string(ciss_result_t *ciss_result /*out
 
        ciss_result->szSsType = CISS_SERVICE_WAITING;
 
-       if (ss_waiting_info.record[0].Status == TAPI_SS_STATUS_QUIESCENT)
+       if (ss_waiting_info.record[0].Status == TAPI_SS_STATUS_QUIESCENT) {
                WaitingResultStatus = TAPI_SS_STATUS_PROVISIONED;
-       else
+       } else {
                WaitingResultStatus = TAPI_SS_STATUS_ACTIVE;
+       }
 
        DBG("\n [CISS-ENGINE] create_waiting_result_string : WaitingResultStatus = %d", WaitingResultStatus);
        ciss_result->nRecordNum = ss_waiting_info.record_num;
@@ -135,7 +136,7 @@ static void __ciss_create_cli_result_string(ciss_result_t *ciss_result /*out */,
                ciss_result->cli_type = CISS_CALLING_LINE_IDENTITY_PRESENTATION;
                DBG("\n [CISS-ENGINE] ciss_callId_display_identification: TAPI_CALLING_LINE_IDENTITY_PRESENTATION (ss_cli_info.status=%d)\n", ss_cli_info.Status);
                if ((ss_cli_info.Status == TAPI_CLI_STATUS_ACTIVATED) ||
-                       ss_cli_info.Status == TAPI_CLI_STATUS_PROVISIONED) {
+                               ss_cli_info.Status == TAPI_CLI_STATUS_PROVISIONED) {
                        ciss_result->szResult[0] = CISS_STATUS_ACTIVE;
                } else {
                        ciss_result->szResult[0] = CISS_STATUS_NOTHING;
@@ -146,8 +147,8 @@ static void __ciss_create_cli_result_string(ciss_result_t *ciss_result /*out */,
                ciss_result->cli_type = CISS_CALLING_LINE_IDENTITY_RESTRICTION;
                DBG("\n [CISS-ENGINE] ciss_callId_display_identification: TAPI_CALLING_LINE_IDENTITY_RESTRICTION (ss_cli_info.status = %d)\n", ss_cli_info.Status);
                if (ss_cli_info.Status == TAPI_CLI_STATUS_ACTIVATED ||
-                   ss_cli_info.Status == TAPI_CLI_STATUS_PROVISIONED ||
-                   ss_cli_info.Status == TAPI_CLI_STATUS_TEMP_RESTRICTED) {
+                               ss_cli_info.Status == TAPI_CLI_STATUS_PROVISIONED ||
+                               ss_cli_info.Status == TAPI_CLI_STATUS_TEMP_RESTRICTED) {
                        ciss_result->szResult[0] = CISS_STATUS_ACTIVE;
                } else {
                        ciss_result->szResult[0] = CISS_STATUS_NOTHING;
@@ -178,7 +179,7 @@ static void __ciss_create_cli_result_string(ciss_result_t *ciss_result /*out */,
                ciss_result->cli_type = CISS_CALLING_NAME_PRESENTATION;
                DBG("\n [CISS-ENGINE] ciss_callId_display_identification: TAPI_CALLING_NAME_PRESENTATION (ss_cli_info.status=%d)\n", ss_cli_info.Status);
                if ((ss_cli_info.Status == TAPI_CLI_STATUS_ACTIVATED) ||
-                   (ss_cli_info.Status == TAPI_CLI_STATUS_PROVISIONED)) {
+                               (ss_cli_info.Status == TAPI_CLI_STATUS_PROVISIONED)) {
                        ciss_result->szResult[0] = CISS_STATUS_ACTIVE;
                } else {
                        ciss_result->szResult[0] = CISS_STATUS_NOTHING;
@@ -300,7 +301,7 @@ static void __ciss_ui_mmi_create_mmi_result_string(ciss_result_t *pSSResult, int
 
        if (pSSResult->szSsType == CISS_SERVICE_FORWARDING) {
                if ((strcmp(flavor, CISS_STR_CALL_FORWARDING_ACTIVE_C_WHEN_NOREPLY) == 0) &&
-                       (pSSResult->nForwardWaitingTime[index] != 0)) {
+                               (pSSResult->nForwardWaitingTime[index] != 0)) {
                        snprintf(szBuffer, CISS_TEXT_LEN_MAX, "%s %02ds", flavor, pSSResult->nForwardWaitingTime[index]);
                } else {
                        strncpy(szBuffer, flavor, CISS_TEXT_LEN_MAX - 1);
@@ -319,15 +320,16 @@ static void __ciss_ui_mmi_create_mmi_result_string(ciss_result_t *pSSResult, int
                strncat(mszBuffer, status, strlen(szBuffer));
 
                if (strlen(pSSResult->szForwardedToNumber[index]) &&
-                   (strcmp(status, CISS_STR_ACTIVATED) == 0)) {
+                               (strcmp(status, CISS_STR_ACTIVATED) == 0)) {
                        DBG("\n [CISS-MMI] create_result_string: Forwarded to number = %s\n",
                                pSSResult->szForwardedToNumber[index]);
 
                        strncat(mszBuffer, "<br>", strlen("<br>"));
                        strncat(mszBuffer, " ", strlen(" "));
                        strncat(mszBuffer, pSSResult->szForwardedToNumber[index], strlen(pSSResult->szForwardedToNumber[index]));
-               } else
+               } else {
                        DBG("\n [CISS-MMI] create_result_string: Forwarded to number is not need");
+               }
        } else if (pSSResult->szSsType == CISS_SERVICE_BARRING) {
                if (strlen(flavor) > 1) {
                        strncat(mszBuffer, "<br>", strlen("<br>"));
@@ -366,7 +368,7 @@ static int __ciss_tapi_handle_forward_cnf(ciss_result_t *ciss_result, void *tapi
                ss_forward_info.record[0].szCallForwardingNumber,
                strlen((char *)ss_forward_info.record[0].szCallForwardingNumber));
        _ciss_get_forward_flavor_type(ss_forward_info.record[0].ForwardCondition,
-               &(ciss_result->szFlavor));
+                                                                 &(ciss_result->szFlavor));
        __ciss_create_forward_result_string(ciss_result, ss_forward_info);
 
        DBG("\n [CISS-ENGINE] this->ss_req_data.flavor: %d\n", ciss_result->szFlavor);
@@ -508,17 +510,17 @@ Evas_Object *_ciss_create_ss_resp_view(Evas_Object *parent, void *tapi_data, voi
 
        nf = elm_naviframe_add(parent);
        retv_if(nf == NULL, NULL);
-       
+
        Evas_Object *genlist =
                _ciss_create_result_genlist(ss_result_string, CISS_MMI_MAX_SS_RESP_STRING, nf, ad);
        retv_if(NULL == genlist, NULL);
 
        l_button = elm_button_add(nf);
        evas_object_smart_callback_add(l_button, "clicked",
-               __ciss_ssresp_view_quit_cb, NULL);
+                                                                  __ciss_ssresp_view_quit_cb, NULL);
 
        elm_naviframe_item_push(nf, CISS_STR_INFORMATION,
-               l_button, NULL, genlist, NULL);
+                                                       l_button, NULL, genlist, NULL);
        elm_object_style_set(l_button, "naviframe/back_btn/default");
 
        evas_object_show(nf);
index 1a2522b..15d2850 100644 (file)
@@ -22,7 +22,7 @@
 
 typedef enum {
        BT_KOR_MODE = 0,
-       BT_CHINESE_MODE = 1, /* Not support yet */ 
+       BT_CHINESE_MODE = 1, /* Not support yet */
        BT_ENG_LOWER_MODE = 2,
        BT_ENG_UPPER_MODE = 3,
        BT_NUMBER_MODE = 4,
@@ -48,8 +48,9 @@ static void __ciss_respond_cb(void *data, Evas_Object *obj, void *event_info)
 
        buf = (char *)elm_entry_entry_get(ad->ef_entry);
        imf_context = elm_entry_imf_context_get(ad->ef_entry);
-       if (imf_context)
+       if (imf_context) {
                ecore_imf_context_input_panel_hide(imf_context);
+       }
 
        snprintf(ussd_str, TAPI_SS_USSD_DATA_SIZE_MAX, "%s", buf);
        if (strlen(ussd_str) == 0) {
@@ -66,8 +67,8 @@ static void __ciss_respond_cb(void *data, Evas_Object *obj, void *event_info)
        mmi_ctx.user_string_length = strlen(ussd_str);
        memcpy(mmi_ctx.user_string, ussd_str, MAX_USS_CHAR);
 
-       ad->popup = _ciss_create_noti_popup(ad->win_main,
-                               CISS_STR_REQUESTING, NULL, POPUP_DISPLAY_DURATION, ad);
+       ad->popup = _ciss_create_noti_popup(ad->layout_main,
+                                                                               CISS_STR_REQUESTING, NULL, POPUP_DISPLAY_DURATION, ad);
 
        ret = _ciss_send_tapi_request(&mmi_ctx, ad);
 
@@ -85,16 +86,18 @@ static void __ciss_changed_cb(void *data, Evas_Object *obj, void *event_info)
 
        if (elm_object_focus_get(editfield)) {
                Evas_Object *btn = elm_object_item_part_content_get(navi_it,
-                       "title_right_btn");
+                                                  "title_right_btn");
 
                if (elm_entry_is_empty(obj)) {
                        elm_object_signal_emit(editfield, "elm,state,eraser,hide", "elm");
-                       if (btn)
+                       if (btn) {
                                elm_object_disabled_set(btn, EINA_TRUE);
+                       }
                } else {
                        elm_object_signal_emit(editfield, "elm,state,eraser,show", "elm");
-                       if (btn)
+                       if (btn) {
                                elm_object_disabled_set(btn, EINA_FALSE);
+                       }
                }
        }
 }
@@ -105,8 +108,9 @@ static void __ciss_focused_cb(void *data, Evas_Object *obj, void *event_info)
        ciss_appdata_t *ad = (ciss_appdata_t *)data;
        Evas_Object *editfield = ad->ef_layout;
 
-       if (!elm_entry_is_empty(obj))
+       if (!elm_entry_is_empty(obj)) {
                elm_object_signal_emit(editfield, "elm,state,eraser,show", "elm");
+       }
        elm_object_signal_emit(editfield, "elm,state,guidetext,hide", "elm");
 }
 
@@ -116,8 +120,9 @@ static void __ciss_unfocused_cb(void *data, Evas_Object *obj, void *event_info)
        ciss_appdata_t *ad = (ciss_appdata_t *)data;
        Evas_Object *editfield = ad->ef_layout;
 
-       if (elm_entry_is_empty(obj))
+       if (elm_entry_is_empty(obj)) {
                elm_object_signal_emit(editfield, "elm,state,guidetext,show", "elm");
+       }
        elm_object_signal_emit(editfield, "elm,state,eraser,hide", "elm");
 }
 
@@ -173,7 +178,6 @@ static Evas_Object *__ciss_gl_content_respond_ime(void *data, Evas_Object *obj,
 
 static Evas_Object *__ciss_respond_ime_genlist(void *data)
 {
-       Elm_Object_Item *item = NULL;
        Evas_Object *genlist;
        ciss_appdata_t *ad = (ciss_appdata_t *)data;
 
@@ -188,9 +192,9 @@ static Evas_Object *__ciss_respond_ime_genlist(void *data)
        ad->itc_ime->func.state_get = NULL;
        ad->itc_ime->func.del = NULL;
 
-       item = elm_genlist_item_append(genlist, ad->itc_ime,
-                       (void *)ad, NULL, ELM_GENLIST_ITEM_NONE,
-                       NULL, NULL);
+       elm_genlist_item_append(genlist, ad->itc_ime,
+                                                       (void *)ad, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+
        return genlist;
 }
 
@@ -206,14 +210,14 @@ void _ciss_create_respond_view(void *data)
 
        _ciss_remove_naviframe(ad->nf);
        navi_it = elm_naviframe_item_push(ad->nf, CISS_STR_INFORMATION,
-               NULL, NULL, ime_genlist, "1line");
+                                                                         NULL, NULL, ime_genlist, "1line");
 
        btn = _ciss_create_title_btn(ad->nf, CISS_STR_QUIT,
-               _ciss_ussd_quit_cb, (void *)ad);
+                                                                _ciss_ussd_quit_cb, (void *)ad);
        elm_object_item_part_content_set(navi_it, "title_left_btn", btn);
 
        btn = _ciss_create_title_btn(ad->nf, CISS_STR_REPLY,
-               __ciss_respond_cb, (void *)ad);
+                                                                __ciss_respond_cb, (void *)ad);
        elm_object_item_part_content_set(navi_it, "title_right_btn", btn);
        elm_object_disabled_set(btn, EINA_TRUE);
 }
index af1ce2a..e9677e4 100644 (file)
@@ -25,7 +25,7 @@
 #include "ciss-resp.h"
 #include "ciss-converter.h"
 
-static void __ciss_tapi_ss_rel_complete_cb(TapiHandle *tapi_handle, const char *noti_id, void *data, void *user_data);
+static void __ciss_tapi_ss_rel_complete_cb(TapiHandle *tapi_handle, const char *event_type, void *data, void *user_data);
 static void __ciss_ss_forward_resp_cb(TapiHandle *handle, int result, void *data, void *user_data);
 static void __ciss_ss_barring_resp_cb(TapiHandle *handle, int result, void *data, void *user_data);
 static void __ciss_ss_waiting_resp_cb(TapiHandle *handle, int result, void *data, void *user_data);
@@ -34,7 +34,7 @@ static void __ciss_change_ss_barring_pw_resp_cb(TapiHandle *handle, int result,
 static void __ciss_ss_ussd_resp_cb(TapiHandle *handle, int result, void *data, void *user_data);
 
 EventHandler event_list[] = {
-       {TAPI_NOTIFY_SS_REL_COMP_MSG, 0, __ciss_tapi_ss_rel_complete_cb},
+       {TAPI_NOTI_SS_RELEASE_COMPLETE, 0, __ciss_tapi_ss_rel_complete_cb},
 };
 
 int _ciss_tapi_event_setup(ciss_appdata_t *ad)
@@ -72,8 +72,9 @@ void _ciss_deregister_tel_event(void *data)
        int ret = TAPI_API_SUCCESS;
 
        ret = tel_deinit(ad->tapi_handle);
-       if (ret != TAPI_API_SUCCESS)
+       if (ret != TAPI_API_SUCCESS) {
                DBG("tapi_deinit() ret : %d", ret);
+       }
 }
 
 ciss_err_t _ciss_send_tapi_request(ciss_mmi_context_t *mmi_ctx, void *data)
@@ -138,7 +139,7 @@ ciss_err_t _ciss_send_tapi_request(ciss_mmi_context_t *mmi_ctx, void *data)
                break;
        case activateSS:
                DBG("activateSS");
-               switch(mmi_ctx->ss_type){
+               switch (mmi_ctx->ss_type) {
                case CISS_SERVICE_FORWARDING:
                        stCfActReq.Mode = TAPI_SS_CF_MODE_ENABLE_EV;
 
@@ -174,7 +175,7 @@ ciss_err_t _ciss_send_tapi_request(ciss_mmi_context_t *mmi_ctx, void *data)
                break;
        case deactivateSS:
                DBG("deactivateSS");
-               switch(mmi_ctx->ss_type){
+               switch (mmi_ctx->ss_type) {
                case CISS_SERVICE_FORWARDING:
                        stCfActReq.Mode = TAPI_SS_CF_MODE_DISABLE_EV;
                        err = tel_set_ss_forward(ad->tapi_handle, &stCfActReq, __ciss_ss_forward_resp_cb, ad);
@@ -203,10 +204,10 @@ ciss_err_t _ciss_send_tapi_request(ciss_mmi_context_t *mmi_ctx, void *data)
                break;
        case interrogateSS:
                DBG("interrogateSS");
-               switch(mmi_ctx->ss_type){
+               switch (mmi_ctx->ss_type) {
                case CISS_SERVICE_FORWARDING:
                        err = tel_get_ss_forward_status(ad->tapi_handle, stCfActReq.Class, stCfActReq.Condition,
-                                                                       __ciss_ss_forward_resp_cb, ad);
+                                                                                       __ciss_ss_forward_resp_cb, ad);
                        if (err != TAPI_API_SUCCESS) {
                                DBG("\n [CISS-ENGINE] tel_get_ss_forward_status call fails g_err_code = %x", err);
                                _ciss_get_error_from_tapi_error(&error_code, err);
@@ -214,15 +215,15 @@ ciss_err_t _ciss_send_tapi_request(ciss_mmi_context_t *mmi_ctx, void *data)
                        break;
                case CISS_SERVICE_BARRING:
                        err = tel_get_ss_barring_status(ad->tapi_handle, stCbReq.Class, stCbReq.Type,
-                                                                       __ciss_ss_barring_resp_cb, ad);
+                                                                                       __ciss_ss_barring_resp_cb, ad);
                        if (err != TAPI_API_SUCCESS) {
                                DBG("\n [CISS-ENGINE] tel_get_ss_barring_status call fails g_err_code = %x", err);
                                _ciss_get_error_from_tapi_error(&error_code, err);
                        }
                        break;
                case CISS_SERVICE_WAITING:
-                       err = tel_get_ss_waiting_status(ad->tapi_handle, stCbReq.Class,
-                                                                       __ciss_ss_waiting_resp_cb, ad);
+                       err = tel_get_ss_waiting_status(ad->tapi_handle, stCwReq.Class,
+                                                                                       __ciss_ss_waiting_resp_cb, ad);
                        if (err != TAPI_API_SUCCESS) {
                                DBG("\n [CISS-ENGINE] tel_get_ss_waiting_status call fails g_err_code = %x", err);
                                _ciss_get_error_from_tapi_error(&error_code, err);
@@ -231,7 +232,7 @@ ciss_err_t _ciss_send_tapi_request(ciss_mmi_context_t *mmi_ctx, void *data)
                case CISS_SERVICE_IDENTIFICATION:
                        cliType = (TelSsCliType_t)mmi_ctx->ss_flavor;
                        err = tel_get_ss_cli_status(ad->tapi_handle, cliType,
-                                                                       __ciss_ss_cli_resp_cb, ad);
+                                                                               __ciss_ss_cli_resp_cb, ad);
                        if (err != TAPI_API_SUCCESS) {
                                DBG("\n [CISS-ENGINE] tel_get_ss_cli_status call fails g_err_code = %x", err);
                                _ciss_get_error_from_tapi_error(&error_code, err);
@@ -244,18 +245,18 @@ ciss_err_t _ciss_send_tapi_request(ciss_mmi_context_t *mmi_ctx, void *data)
                /* password registration request */
                /* check for too short password and mismatch password */
                if (CISS_MAX_PASSWORD_LEN > strlen(mmi_ctx->ss_password) ||
-                   CISS_MAX_PASSWORD_LEN > strlen(mmi_ctx->ss_new_password) ||
-                   CISS_MAX_PASSWORD_LEN > strlen(mmi_ctx->ss_new_password2)) {
+                               CISS_MAX_PASSWORD_LEN > strlen(mmi_ctx->ss_new_password) ||
+                               CISS_MAX_PASSWORD_LEN > strlen(mmi_ctx->ss_new_password2)) {
                        /* too short password */
                        DBG("\n [CISS-ENGINE] Too short password");
                        error_code = CISS_ERR_CB_PWD_TOO_SORT;
                }
 
                err = tel_change_ss_barring_password(ad->tapi_handle,
-                                       mmi_ctx->ss_password,
-                                       mmi_ctx->ss_new_password,
-                                       mmi_ctx->ss_new_password2,
-                                       __ciss_change_ss_barring_pw_resp_cb, ad);
+                                                                                        mmi_ctx->ss_password,
+                                                                                        mmi_ctx->ss_new_password,
+                                                                                        mmi_ctx->ss_new_password2,
+                                                                                        __ciss_change_ss_barring_pw_resp_cb, ad);
 
                if (err != TAPI_API_SUCCESS) {
                        DBG("\n [CISS-ENGINE] tel_change_ss_barring_password call fails g_err_code = %x", err);
@@ -273,8 +274,8 @@ ciss_err_t _ciss_send_tapi_request(ciss_mmi_context_t *mmi_ctx, void *data)
                DBG("\n [CISS-ENGINE] stUssdRecord.Length = %d, stUssdRecord.ussd_string = %s", stUssdRecord.Length, stUssdRecord.szString);
 
                err = tel_send_ss_ussd_request(ad->tapi_handle,
-                               &stUssdRecord,
-                               __ciss_ss_ussd_resp_cb, ad);
+                                                                          &stUssdRecord,
+                                                                          __ciss_ss_ussd_resp_cb, ad);
                if (err != TAPI_API_SUCCESS) {
                        DBG("\n [CISS-ENGINE] tel_send_ss_ussd_request call fails g_err_code = %x", err);
                        _ciss_get_error_from_tapi_error(&error_code, err);
@@ -291,8 +292,8 @@ ciss_err_t _ciss_send_tapi_request(ciss_mmi_context_t *mmi_ctx, void *data)
                DBG("\n [CISS-ENGINE] stUssdRecord.Length = %d, stUssdRecord.ussd_string = %s", stUssdRecord.Length, stUssdRecord.szString);
 
                err = tel_send_ss_ussd_request(ad->tapi_handle,
-                               &stUssdRecord,
-                               __ciss_ss_ussd_resp_cb, ad);
+                                                                          &stUssdRecord,
+                                                                          __ciss_ss_ussd_resp_cb, ad);
                if (err != TAPI_API_SUCCESS) {
                        DBG("\n [CISS-ENGINE] tel_send_ss_ussd_request call fails g_err_code = %x", err);
                        _ciss_get_error_from_tapi_error(&error_code, err);
@@ -341,7 +342,7 @@ int _ciss_on_tapi_sat_ss_event(void *tapi_data, void *data)
                } else {
                        TelSatAppsRetInfo_t app_ret_info;
                        memset(&app_ret_info, 0, sizeof(TelSatAppsRetInfo_t));
-                       
+
                        app_ret_info.commandType = TAPI_SAT_CMD_TYPE_SEND_SS;
                        app_ret_info.commandId = ad->sat_terminal_response.sat_command_id;
                        app_ret_info.appsRet.sendSs.resp = TAPI_SAT_R_COMMAND_DATA_NOT_UNDERSTOOD_BY_ME;
@@ -384,15 +385,16 @@ int _ciss_on_tapi_sat_ussd_event(void *tapi_data, void *data)
                TelSsUssdMsgInfo_t ussd_info;
                ussd_info.Type = TAPI_SS_USSD_TYPE_USER_INIT;
                ussd_info.Length = (int)(send_ussd_info.ussdStringLen);
-               if (ussd_info.Length >0)
+               if (ussd_info.Length >0) {
                        memcpy(&ussd_info.szString, send_ussd_info.ussdString, ussd_info.Length);
+               }
 
                ret = tel_send_ss_ussd_request(ad->tapi_handle, &ussd_info,
-                                                                                       __ciss_ss_ussd_resp_cb, ad);
+                                                                          __ciss_ss_ussd_resp_cb, ad);
        } else {
                TelSatAppsRetInfo_t app_ret_info;
                memset(&app_ret_info, 0, sizeof(TelSatAppsRetInfo_t));
-               
+
                app_ret_info.commandType = TAPI_SAT_CMD_TYPE_SEND_USSD;
                app_ret_info.commandId = ad->sat_terminal_response.sat_command_id;
 
@@ -408,34 +410,32 @@ int _ciss_on_tapi_sat_ussd_event(void *tapi_data, void *data)
        return ret;
 }
 
-static void __ciss_tapi_ss_rel_complete_cb(TapiHandle *tapi_handle, const char *noti_id, void *data, void *user_data)
+static void __ciss_tapi_ss_rel_complete_cb(TapiHandle *tapi_handle, const char *event_type, void *data, void *user_data)
 {
        DBG("Enter");
        ret_if(data == NULL);
        ret_if(user_data == NULL);
 
-       char * msg_length_temp;
-
        ciss_appdata_t *ad = (ciss_appdata_t *)user_data;
        TelSsRelCompMsgInfo_t rel_comp_info;
+       memset(&rel_comp_info, 0, sizeof(TelSsRelCompMsgInfo_t));
 
-       DBG("event type=%s, is_sat_request=%d", noti_id, ad->is_sat_request);
+       DBG("event type=%s, is_sat_request=%d", event_type, ad->is_sat_request);
        ad->sat_terminal_response.rel_comp_msg_length = 0;
 
        if (ad->is_sat_request == EINA_TRUE) {
                memcpy(&rel_comp_info, data, sizeof(TelSsRelCompMsgInfo_t));
-               msg_length_temp = (char *)(&(rel_comp_info.RelCompMsgLen));
-               ad->sat_terminal_response.rel_comp_msg_length = (unsigned short)(atoi(msg_length_temp));
-               
+               ad->sat_terminal_response.rel_comp_msg_length = (unsigned short)rel_comp_info.RelCompMsgLen;
+
                if (ad->sat_terminal_response.rel_comp_msg_length > 0) {
-                       memcpy(ad->sat_terminal_response.rel_comp_msg_string, rel_comp_info.szRelCompMsg, rel_comp_info.RelCompMsgLen);
+                       memcpy(ad->sat_terminal_response.rel_comp_msg_string, rel_comp_info.szRelCompMsg, TAPI_MAX_RELEASE_COMPLETE_DATA_LEN);
                }
-       }
 
-       DBG("rel_comp_info.RelCompMsgLen = %s", rel_comp_info.RelCompMsgLen); 
-       DBG("rel_comp_info.szRelCompMsg = %s", rel_comp_info.szRelCompMsg);
-       DBG("ad->sat_terminal_response.rel_comp_msg_length = %d", ad->sat_terminal_response.rel_comp_msg_length); 
-       DBG("ad->sat_terminal_response.rel_comp_msg_string = %s", ad->sat_terminal_response.rel_comp_msg_string);
+               DBG("rel_comp_info.RelCompMsgLen = 0x%x", rel_comp_info.RelCompMsgLen);
+               DBG("rel_comp_info.szRelCompMsg = %s", rel_comp_info.szRelCompMsg);
+               DBG("ad->sat_terminal_response.rel_comp_msg_length = 0x%x", ad->sat_terminal_response.rel_comp_msg_length);
+               DBG("ad->sat_terminal_response.rel_comp_msg_string = %s", ad->sat_terminal_response.rel_comp_msg_string);
+       }
 
        return ;
 }
@@ -467,7 +467,7 @@ static void __ciss_tapi_ss_resp_handle(int result, void *tapi_data, void *data)
                        if (ad->sat_terminal_response.rel_comp_msg_length >0) {
                                app_ret_info.appsRet.sendSs.ssString.stringLen = ad->sat_terminal_response.rel_comp_msg_length;
                                memcpy(app_ret_info.appsRet.sendSs.ssString.string,
-                                       ad->sat_terminal_response.rel_comp_msg_string, ad->sat_terminal_response.rel_comp_msg_length);
+                                          ad->sat_terminal_response.rel_comp_msg_string, ad->sat_terminal_response.rel_comp_msg_length);
                        } else {
                                app_ret_info.appsRet.sendSs.ssString.stringLen = 0;
                        }
@@ -494,16 +494,25 @@ static void __ciss_tapi_ss_resp_handle(int result, void *tapi_data, void *data)
 
                DBG("win=0x%p main=0x%p", ad->win_main, ad->layout_main);
 
-               if (result == TAPI_SS_SUCCESS) {
-                       if (ad->bg == NULL) {
-                               ad->bg = _ciss_create_bg(ad->win_main);
-                               ret_if(ad->bg == NULL);
-                       }
+               if (ad->conformant == NULL) {
+                       ad->conformant = _ciss_create_conformant(ad->win_main);
+                       ret_if(ad->conformant == NULL);
+                       evas_object_show(ad->conformant);
+               }
 
-                       if (ad->layout_main == NULL) {
-                               ad->layout_main = _ciss_create_layout_main(ad->win_main);
-                               ret_if(ad->layout_main== NULL);
-                       }
+               if (ad->layout_main == NULL) {
+                       ad->layout_main = _ciss_create_layout_main(ad->conformant);
+                       ret_if(ad->layout_main== NULL);
+                       evas_object_show(ad->layout_main);
+               }
+
+               if (ad->bg == NULL) {
+                       ad->bg = _ciss_create_bg(ad->conformant);
+                       ret_if(ad->bg == NULL);
+                       elm_object_part_content_set(ad->layout_main, "elm.swallow.bg", ad->bg);
+               }
+
+               if (result == TAPI_SS_SUCCESS) {
                        DBG("win=0x%p main=0x%p", ad->win_main, ad->layout_main);
 
                        content = (Evas_Object *)_ciss_create_ss_resp_view(ad->layout_main, tapi_data, ad);
@@ -512,7 +521,7 @@ static void __ciss_tapi_ss_resp_handle(int result, void *tapi_data, void *data)
                } else {
                        ciss_err_t ciss_err;
                        _ciss_get_error_from_tapi_error(&ciss_err, result);
-                       _ciss_create_error_popup(ad->win_main, ciss_err, 2.0, ad);
+                       _ciss_create_error_popup(ad->layout_main, ciss_err, 2.0, ad);
                }
 
        }
@@ -552,7 +561,7 @@ int _ciss_tapi_ussd_resp_handle(int result, void *tapi_data, void *data)
                        if (ad->sat_terminal_response.rel_comp_msg_length >0) {
                                app_ret_info.appsRet.sendUssd.ussdString.stringLen = ad->sat_terminal_response.rel_comp_msg_length;
                                memcpy(app_ret_info.appsRet.sendUssd.ussdString.string,
-                                       ad->sat_terminal_response.rel_comp_msg_string, ad->sat_terminal_response.rel_comp_msg_length);
+                                          ad->sat_terminal_response.rel_comp_msg_string, ad->sat_terminal_response.rel_comp_msg_length);
                        } else {
                                app_ret_info.appsRet.sendUssd.ussdString.stringLen = 0;
                        }
@@ -577,16 +586,25 @@ int _ciss_tapi_ussd_resp_handle(int result, void *tapi_data, void *data)
                ad->end_key_event_handler = ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, _ciss_on_end_key_down, NULL);
        }
 
-       if (result == TAPI_SS_SUCCESS) {
-               if (ad->bg == NULL) {
-                       ad->bg = _ciss_create_bg(ad->win_main);
-                       retv_if(ad->bg == NULL, -1);
-               }
+       if (ad->conformant == NULL) {
+               ad->conformant = _ciss_create_conformant(ad->win_main);
+               retv_if(ad->conformant == NULL, -1);
+               evas_object_show(ad->conformant);
+       }
 
-               if (ad->layout_main == NULL) {
-                       ad->layout_main = _ciss_create_layout_main(ad->win_main);
-                       retv_if(ad->layout_main== NULL, -1);
-               }
+       if (ad->layout_main == NULL) {
+               ad->layout_main = _ciss_create_layout_main(ad->conformant);
+               retv_if(ad->layout_main== NULL, -1);
+               evas_object_show(ad->layout_main);
+       }
+
+       if (ad->bg == NULL) {
+               ad->bg = _ciss_create_bg(ad->conformant);
+               retv_if(ad->bg == NULL, -1);
+               elm_object_part_content_set(ad->layout_main, "elm.swallow.bg", ad->bg);
+       }
+
+       if (result == TAPI_SS_SUCCESS) {
                DBG("win=0x%p main=0x%p", ad->win_main, ad->layout_main);
 
                content = (Evas_Object *)_ciss_create_ussd_view(ad->layout_main, tapi_data, ad);
@@ -595,7 +613,7 @@ int _ciss_tapi_ussd_resp_handle(int result, void *tapi_data, void *data)
        } else {
                ciss_err_t ciss_err;
                _ciss_get_error_from_tapi_error(&ciss_err, result);
-               _ciss_create_error_popup(ad->win_main, ciss_err, 2.0, ad);
+               _ciss_create_error_popup(ad->layout_main, ciss_err, 2.0, ad);
        }
        ret = 0;
 
@@ -658,7 +676,6 @@ static void __ciss_ss_cli_resp_cb(TapiHandle *handle, int result, void *data, vo
 static void __ciss_change_ss_barring_pw_resp_cb(TapiHandle *handle, int result, void *data, void *user_data)
 {
        DBG("Enter");
-       ret_if(data == NULL);
        ret_if(user_data == NULL);
 
        ciss_appdata_t *ad = (ciss_appdata_t *)user_data;
index 9560dd3..5e34d65 100644 (file)
@@ -26,8 +26,8 @@ static int __ciss_get_ussd_string(char *ss_result_string, int length, char *szSt
 {
        DBG("Enter");
 
-       char *ptr;
-       char *temp_ptr;
+       char *ptr = NULL;
+       char *temp_ptr = NULL;
 
        if (length > 0) {
                ptr = strtok_r(szString, "\n", &temp_ptr);
@@ -38,8 +38,9 @@ static int __ciss_get_ussd_string(char *ss_result_string, int length, char *szSt
                        strncpy(temp_str, ss_result_string, CISS_MMI_MAX_USSD_RESP_STRING - 1);
                        snprintf(ss_result_string, CISS_MMI_MAX_USSD_RESP_STRING, "%s<br>%s", temp_str, ptr);
                }
-       } else
+       } else {
                strncpy(ss_result_string, "", CISS_MMI_MAX_USSD_RESP_STRING - 1);
+       }
 
        return 0;
 }
@@ -83,7 +84,7 @@ Evas_Object *_ciss_create_ussd_view(Evas_Object *parent, void *tapi_data, void *
        char ussd_string[CISS_MMI_MAX_USSD_RESP_STRING] = { };
 
        DBG("[CISS-USSD]ad->tapi_event.event_type = %d", ad->tapi_event.event_type);
-       if(ad->tapi_event.event_type == TAPI_EVENT_SS_USSD_IND) {
+       if (ad->tapi_event.event_type == TAPI_EVENT_SS_USSD_IND) {
                TelSsUssdNoti_t ussd_noti_info;
                memset(&ussd_noti_info, 0, sizeof(TelSsUssdNoti_t));
                memcpy(&ussd_noti_info, tapi_data, sizeof(TelSsUssdNoti_t));
@@ -121,19 +122,19 @@ Evas_Object *_ciss_create_ussd_view(Evas_Object *parent, void *tapi_data, void *
 
        l_button = elm_button_add(nf);
        evas_object_smart_callback_add(l_button, "clicked",
-               _ciss_ussd_quit_cb, ad);
+                                                                  _ciss_ussd_quit_cb, ad);
 
        navi_it = elm_naviframe_item_push(nf, CISS_STR_INFORMATION,
-               l_button, NULL, genlist, "1line");
+                                                                         l_button, NULL, genlist, NULL);
        elm_object_style_set(l_button, "naviframe/back_btn/default");
 
        if (ussd_record.ind_type == CISS_USSD_IND_ACTION_REQUIRE) {
                DBG("require action");
                cbar = _ciss_create_navi_control_bar(nf,
-                       CISS_STR_REPLY, __ciss_respnd_cb,
-                       NULL, NULL,
-                       ad, navi_it,
-                       ad->c_item);
+                                                                                        CISS_STR_REPLY, __ciss_respnd_cb,
+                                                                                        NULL, NULL,
+                                                                                        ad, navi_it,
+                                                                                        ad->c_item);
                retv_if(cbar == NULL, NULL);
                ad->ussd_action_require = 1;
        }
index 86899a1..4159297 100644 (file)
@@ -23,8 +23,7 @@ char *_ciss_strcpy(char *pBuffer, int nBufCount, const char *pszString)
        if ((nBufCount - 1) >= (int)strlen(pszString)) {
                strncpy(pBuffer, pszString, (int)strlen(pszString));
                pBuffer[(int)strlen(pszString)] = '\0';
-       }
-       else {
+       } else {
                DBG("\n [CISS-ENGINE] _ciss_strcpy:short of buffer..BufCount=%d, strlen=%d, str=%s\n", nBufCount, strlen(pszString), pszString);
                strncpy(pBuffer, pszString, (nBufCount - 1));
                pBuffer[nBufCount - 1] = '\0';
index 906a384..4bf8933 100644 (file)
@@ -46,7 +46,7 @@ static void __ciss_resp_timeout_cb(void *data, Evas_Object *obj, void *event_inf
        ciss_appdata_t *ad = (ciss_appdata_t *)data;
 
        _ciss_ussd_quit_cb(ad, obj, event_info);
-       _ciss_create_error_popup(ad->win_main, CISS_ERR_UNKNOWN, 2.0, ad);
+       _ciss_create_error_popup(ad->layout_main, CISS_ERR_UNKNOWN, 2.0, ad);
 }
 
 static void __ciss_err_cb(void *data, Evas_Object *obj, void *event_info)
@@ -64,9 +64,10 @@ Evas_Object *_ciss_create_error_popup(Evas_Object *parent, ciss_err_t ciss_error
        DBG("Enter");
        Evas_Object *popup;
        ciss_appdata_t *ad = (ciss_appdata_t *)data;
-       if (ciss_error == CISS_ERR_NONE)
+       if (ciss_error == CISS_ERR_NONE) {
                return NULL;
-       
+       }
+
        if (ad->popup) {
                evas_object_del(ad->popup);
                ad->popup = NULL;
@@ -105,7 +106,7 @@ Evas_Object *_ciss_create_error_popup(Evas_Object *parent, ciss_err_t ciss_error
        case CISS_ERR_FORWARD_TO_EMERGENCY_BLOCKED:     /**<Call forward to an emergency number not allowed*/
                snprintf(strmsg, 100, "%s", CISS_STR_REJECTED_BY_NETWORK);
                break;
-        /* Call barring password mismatch errors */
+               /* Call barring password mismatch errors */
        case CISS_ERR_CB_PWD_TOO_SORT:  /**<Password is too short - less than 4 characters*/
        case CISS_ERR_CB_PWD_MISMATCH:  /**<Password do not match - unequal password*/
        case CISS_ERR_CB_PWD_TOO_LONG:  /**<Password is too long - greater than 4 characters*/
@@ -167,8 +168,9 @@ Eina_Bool _ciss_on_end_key_down(void *data, int type, void *event)
        DBG("Enter");
        Ecore_Event_Key *ev = event;
 
-       if (!strcmp(ev->keyname, KEY_END))
+       if (!strcmp(ev->keyname, KEY_END)) {
                elm_exit();
+       }
 
        return EXIT_FAILURE;
 }
@@ -176,17 +178,19 @@ Eina_Bool _ciss_on_end_key_down(void *data, int type, void *event)
 Evas_Object *_ciss_create_win(const char *name)
 {
        DBG("Enter");
-       Evas_Object *eo;
+       Evas_Object *eo = NULL;
        int w, h;
+       const char *str = "mobile";
+
        eo = elm_win_add(NULL, name, ELM_WIN_BASIC);
        retv_if(eo == NULL, NULL);
 
        if (eo) {
                elm_win_alpha_set(eo, EINA_TRUE);
                elm_win_title_set(eo, name);
-               elm_win_borderless_set(eo, EINA_TRUE);
                elm_win_raise(eo);
                elm_win_indicator_mode_set(eo, ELM_WIN_INDICATOR_SHOW);
+               elm_win_profiles_set(eo, &str, 1);
                evas_object_smart_callback_add(eo, "delete,request", __ciss_win_del, NULL);
                ecore_x_window_size_get(ecore_x_window_root_first_get(), &w, &h);
                DBG("win w=%d h=%d", w, h);
@@ -196,6 +200,21 @@ Evas_Object *_ciss_create_win(const char *name)
        return eo;
 }
 
+Evas_Object *_ciss_create_conformant(Evas_Object *parent)
+{
+       DBG("Enter");
+       retv_if(parent == NULL, NULL);
+
+       Evas_Object *eo = NULL;
+       int w, h;
+       eo = elm_conformant_add(parent);
+       retv_if(eo == NULL, NULL);
+
+       elm_win_resize_object_add(parent, eo);
+
+       return eo;
+}
+
 Evas_Object *_ciss_create_layout_main(Evas_Object *parent)
 {
        DBG("Enter");
@@ -208,7 +227,7 @@ Evas_Object *_ciss_create_layout_main(Evas_Object *parent)
 
        elm_layout_theme_set(layout, "layout", "application", "default");
        evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-       elm_win_resize_object_add(parent, layout);
+       elm_object_content_set(parent, layout);
        evas_object_show(layout);
 
        return layout;
@@ -228,10 +247,10 @@ Evas_Object *_ciss_create_bg(Evas_Object *parent)
 }
 
 Evas_Object *_ciss_create_navi_control_bar(Evas_Object *parent,
-                       char *label1, Evas_Smart_Cb cb1,
-                       char *label2, Evas_Smart_Cb cb2,
-                       void *data, Elm_Object_Item *navi_it,
-                       Elm_Object_Item ** c_item)
+               char *label1, Evas_Smart_Cb cb1,
+               char *label2, Evas_Smart_Cb cb2,
+               void *data, Elm_Object_Item *navi_it,
+               Elm_Object_Item **c_item)
 {
        retv_if(NULL == parent, NULL);
        Evas_Object *toolbar = elm_toolbar_add(parent);
@@ -244,24 +263,24 @@ Evas_Object *_ciss_create_navi_control_bar(Evas_Object *parent,
 
 
        if (label2) {
-               item = elm_toolbar_item_append(toolbar, NULL, NULL, NULL, NULL);
+               item = elm_toolbar_item_append(toolbar, NULL, NULL, NULL, NULL);
                elm_object_item_disabled_set(item, EINA_TRUE);
                c_item[0] = elm_toolbar_item_append(toolbar,
-                       NULL, label1, cb1, data);
-               item = elm_toolbar_item_append(toolbar, NULL, NULL, NULL, NULL);
+                                                                                       NULL, label1, cb1, data);
+               item = elm_toolbar_item_append(toolbar, NULL, NULL, NULL, NULL);
                elm_object_item_disabled_set(item, EINA_TRUE);
                c_item[1] = elm_toolbar_item_append(toolbar,
-                       NULL, label2, cb2, data);
+                                                                                       NULL, label2, cb2, data);
        } else {
-               item = elm_toolbar_item_append(toolbar, NULL, NULL, NULL, NULL);
+               item = elm_toolbar_item_append(toolbar, NULL, NULL, NULL, NULL);
                elm_object_item_disabled_set(item, EINA_TRUE);
-               item = elm_toolbar_item_append(toolbar, NULL, NULL, NULL, NULL);
+               item = elm_toolbar_item_append(toolbar, NULL, NULL, NULL, NULL);
                elm_object_item_disabled_set(item, EINA_TRUE);
-               item = elm_toolbar_item_append(toolbar, NULL, NULL, NULL, NULL);
+               item = elm_toolbar_item_append(toolbar, NULL, NULL, NULL, NULL);
                elm_object_item_disabled_set(item, EINA_TRUE);
 
                c_item[0] = elm_toolbar_item_append(toolbar,
-                       NULL, label1, cb1, data);
+                                                                                       NULL, label1, cb1, data);
        }
 
        elm_object_item_part_content_set(navi_it, "controlbar", toolbar);
@@ -269,10 +288,12 @@ Evas_Object *_ciss_create_navi_control_bar(Evas_Object *parent,
 }
 
 Evas_Object *_ciss_create_title_btn(Evas_Object *parent,
-               const char *text, Evas_Smart_Cb func, void *data)
+                                                                       const char *text, Evas_Smart_Cb func, void *data)
 {
        Evas_Object *btn = elm_button_add(parent);
-       if (!btn) return NULL;
+       if (!btn) {
+               return NULL;
+       }
        elm_object_style_set(btn, "naviframe/title/default");
        elm_object_text_set(btn, text);
        evas_object_smart_callback_add(btn, "clicked", func, data);
@@ -291,29 +312,31 @@ void _ciss_remove_naviframe(Evas_Object *nf)
        ret_if(NULL == nf);
        elm_naviframe_prev_btn_auto_pushed_set(nf, EINA_FALSE);
        evas_object_smart_callback_add(nf, "transition,finished",
-               __ciss_trans_finished, NULL);
+                                                                  __ciss_trans_finished, NULL);
 }
 
 static char *__ciss_gl_label_get_result(void *data, Evas_Object *obj, const char *part)
 {
        char *label = (char *)data;
 
-       if (label)
+       if (label) {
                return strdup(label);
-       else
+       } else {
                return NULL;
+       }
 }
 
 static void __ciss_gl_del_result(void *data, Evas_Object *obj)
 {
        char *label = (char *)data;
-       if(label)
+       if (label) {
                free(label);
+       }
 
        return;
 }
 
-Evas_Object * _ciss_create_result_genlist(const char *result_str, int str_len, Evas_Object *nf, void *data)
+Evas_Object *_ciss_create_result_genlist(const char *result_str, int str_len, Evas_Object *nf, void *data)
 {
        Evas_Object *genlist = elm_genlist_add(nf);
        retv_if(NULL == genlist, NULL);
@@ -332,8 +355,8 @@ Evas_Object * _ciss_create_result_genlist(const char *result_str, int str_len, E
 
        strncpy(label, result_str, str_len - 1);
        Elm_Object_Item *item = elm_genlist_item_append(genlist, ad->itc_multi_line,
-               (void *)label, NULL, ELM_GENLIST_ITEM_NONE,
-               NULL, NULL);
+                                                       (void *)label, NULL, ELM_GENLIST_ITEM_NONE,
+                                                       NULL, NULL);
        elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
 
        return genlist;
@@ -353,14 +376,18 @@ void _ciss_geinlist_item_class_free(void *data)
        ret_if(data == NULL);
 
        ciss_appdata_t *ad = (ciss_appdata_t *)data;
-       if (ad->itc_ime)
+       if (ad->itc_ime) {
                elm_genlist_item_class_free(ad->itc_ime);
-       if (ad->itc_multi_line)
+       }
+       if (ad->itc_multi_line) {
                elm_genlist_item_class_free(ad->itc_multi_line);
-       if (ad->itc_seperator_no_line)
+       }
+       if (ad->itc_seperator_no_line) {
                elm_genlist_item_class_free(ad->itc_seperator_no_line);
-       if (ad->itc_underline)
+       }
+       if (ad->itc_underline) {
                elm_genlist_item_class_free(ad->itc_underline);
+       }
 }
 
 void _ciss_create_genlist_separator_no_line(Evas_Object *genlist, void *data)
@@ -371,8 +398,9 @@ void _ciss_create_genlist_separator_no_line(Evas_Object *genlist, void *data)
        ciss_appdata_t *ad = (ciss_appdata_t *)data;
        Elm_Object_Item *item = NULL;
 
-       if (!ad->itc_seperator_no_line)
+       if (!ad->itc_seperator_no_line) {
                ad->itc_seperator_no_line = elm_genlist_item_class_new();
+       }
 
        ad->itc_seperator_no_line->item_style = "dialogue/separator/end";
        ad->itc_seperator_no_line->func.text_get = NULL;
@@ -392,8 +420,9 @@ void _ciss_create_genlist_underline(Evas_Object *genlist, void *data)
        ciss_appdata_t *ad = (ciss_appdata_t *)data;
        Elm_Object_Item *item = NULL;
 
-       if (!ad->itc_underline)
+       if (!ad->itc_underline) {
                ad->itc_underline = elm_genlist_item_class_new();
+       }
 
        ad->itc_underline->item_style = "dialogue/separator/1/with_line";
        ad->itc_underline->func.text_get = NULL;