diff options
author | sinikang <sinikang@samsung.com> | 2018-10-22 15:38:44 +0900 |
---|---|---|
committer | sinikang <sinikang@samsung.com> | 2018-10-22 15:38:44 +0900 |
commit | 0d57754044e352c982d499b16f85257210d536f8 (patch) | |
tree | 6d8f5bc06f595d7c6eb8011cc9a0661670ec310a | |
parent | 5e549971b053c834584725f11e8d510ac48672bc (diff) | |
download | w-ciss-0d57754044e352c982d499b16f85257210d536f8.tar.gz w-ciss-0d57754044e352c982d499b16f85257210d536f8.tar.bz2 w-ciss-0d57754044e352c982d499b16f85257210d536f8.zip |
Fix coding rule error
Change-Id: I7f9faa460c605d8d1e214ae5f05dea42e80e5725
-rw-r--r-- | include/ciss-common.h | 31 | ||||
-rw-r--r-- | include/ciss-converter.h | 12 | ||||
-rw-r--r-- | include/ciss-debug.h | 22 | ||||
-rw-r--r-- | include/ciss-string.h | 48 | ||||
-rw-r--r-- | include/ciss-types.h | 150 | ||||
-rw-r--r-- | include/ciss-widget.h | 4 | ||||
-rw-r--r-- | packaging/org.tizen.w-ciss.spec | 2 | ||||
-rw-r--r-- | src/ciss-converter.c | 96 | ||||
-rw-r--r-- | src/ciss-main.c | 65 | ||||
-rw-r--r-- | src/ciss-parser.c | 62 | ||||
-rw-r--r-- | src/ciss-resp.c | 46 | ||||
-rw-r--r-- | src/ciss-respnd.c | 2 | ||||
-rw-r--r-- | src/ciss-tapi-request.c | 32 | ||||
-rw-r--r-- | src/ciss-ussd.c | 14 | ||||
-rw-r--r-- | src/ciss-util.c | 7 | ||||
-rw-r--r-- | src/ciss-widget.c | 142 |
16 files changed, 338 insertions, 397 deletions
diff --git a/include/ciss-common.h b/include/ciss-common.h index 633e6c9..bf5ef1e 100644 --- a/include/ciss-common.h +++ b/include/ciss-common.h @@ -75,21 +75,21 @@ typedef struct _EventHandler { */ typedef struct { unsigned char opcode; - char user_string[MAX_USS_CHAR]; /**< String to be parsed */ - int user_string_length; /**< length of string */ - unsigned char dcs; /**< the data coding scheme for ussd */ - unsigned char ss_flavor; /**< current SS code being processed */ + char user_string[MAX_USS_CHAR]; /**< String to be parsed */ + int user_string_length; /**< length of string */ + unsigned char dcs; /**< the data coding scheme for ussd */ + unsigned char ss_flavor; /**< current SS code being processed */ unsigned char ss_type; /**< barring, forwarding, waiting, etc */ TelSsClass_t tapi_bsg; /**< The Basic Service Code */ ciss_type_of_number_t ton; ciss_number_plan_id_t npi; - char forward_number[CISS_NUMBER_LEN_MAX+1]; /**< call forwarding number*/ - char nr_timer; /**< No Reply Timer */ - char ss_password[CISS_MAX_PASSWORD_LEN+1]; /**< remember password if supplied so that */ - char ss_new_password[CISS_MAX_PASSWORD_LEN+1]; /**< remember new password */ - 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 */ + char forward_number[CISS_NUMBER_LEN_MAX+1]; /**< call forwarding number*/ + char nr_timer; /**< No Reply Timer */ + char ss_password[CISS_MAX_PASSWORD_LEN+1]; /**< remember password if supplied so that */ + char ss_new_password[CISS_MAX_PASSWORD_LEN+1]; /**< remember new password */ + 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; /** @@ -97,9 +97,9 @@ typedef struct { */ typedef struct { int event_type; /**< Event type */ - int request_id; /**< This parameter is applicable only for Asynchronous solicited responses. The request id for a service request is sent back in the asynchronous response. For unsolicited indications, request id will be -1 */ - int status; /**< This parameter is applicable only for Asynchronous solicited responses. This status parameter informs the actual result of Asynchronous response. For unsolicited indications, status will be -1 */ - void *p_data; /**< Event Data - Based on Event type response/indications. Event data information is captured in each API Section */ + int request_id; /**< This parameter is applicable only for Asynchronous solicited responses. The request id for a service request is sent back in the asynchronous response. For unsolicited indications, request id will be -1 */ + int status; /**< This parameter is applicable only for Asynchronous solicited responses. This status parameter informs the actual result of Asynchronous response. For unsolicited indications, status will be -1 */ + void *p_data; /**< Event Data - Based on Event type response/indications. Event data information is captured in each API Section */ int data_length; /**< Event Data size */ } ciss_tapi_event_t; @@ -117,8 +117,7 @@ typedef struct { unsigned char string[CISS_USSD_DATA_SIZE_MAX]; /**<character data*/ } ciss_sat_call_control_data_t; -typedef enum -{ +typedef enum { CISS_SAT_CALL_CTRL_R_ALLOWED_NO_MOD = 0, /**< call control result type - ALLOWED WITH NO MOD */ CISS_SAT_CALL_CTRL_R_NOT_ALLOWED = 1, /**< call control result type - NOT ALLOWED */ CISS_SAT_CALL_CTRL_R_ALLOWED_WITH_MOD = 2, /**< call control result type - ALLOWED WITH MOD */ diff --git a/include/ciss-converter.h b/include/ciss-converter.h index 508ba7b..92f75f3 100644 --- a/include/ciss-converter.h +++ b/include/ciss-converter.h @@ -114,17 +114,17 @@ bsg_code_type; typedef struct { - char *local_sc; /* local value of Service Code */ - unsigned char tapi_flavor; /* TAPI flavor */ - unsigned char ss_type; /* barring, fwding, waiting, etc*/ + char *local_sc; /* local value of Service Code */ + unsigned char tapi_flavor; /* TAPI flavor */ + unsigned char ss_type; /* barring, fwding, waiting, etc*/ } sc_table_element_type; /* convert between local and network BSG values */ typedef struct { - char *local_bsg; /* local BSG value */ - char bsg_type; /* BSG type - bearer services, teleservices */ - TelSsClass_t tapi_bsg_code; /* TAPI BSG value */ + char *local_bsg; /* local BSG value */ + char bsg_type; /* BSG type - bearer services, teleservices */ + TelSsClass_t tapi_bsg_code; /* TAPI BSG value */ } bsg_table_element_type; bool _ciss_convert_bsg_to_tapi_bsg(char *local_bsg, TelSsClass_t *tapi_bsg); diff --git a/include/ciss-debug.h b/include/ciss-debug.h index f729215..a62668b 100644 --- a/include/ciss-debug.h +++ b/include/ciss-debug.h @@ -25,55 +25,55 @@ #define DBG(fmt, arg...) \ do { \ LOG(LOG_INFO, CISS_LOG_TAG, "[CISS] "fmt"\n", ##arg); \ - } while(0) + } while (0) #define DBG_SECURE(fmt, arg...) \ do { \ SECURE_LOG(LOG_INFO, CISS_LOG_TAG, "[CISS] "fmt"\n", ##arg); \ - } while(0) + } while (0) #define WARN(fmt, arg...) \ do { \ LOG(LOG_WARN, CISS_LOG_TAG, "[CISS] "fmt"\n", ##arg); \ - } while(0) + } while (0) #define WARN_SECURE(fmt, arg...) \ do { \ SECURE_LOG(LOG_WARN, CISS_LOG_TAG, "[CISS] "fmt"\n", ##arg); \ - } while(0) + } while (0) #define ERR(fmt, arg...) \ do { \ LOG(LOG_ERROR, CISS_LOG_TAG, "[CISS] "fmt"\n", ##arg); \ - } while(0) + } while (0) #define ERR_SECURE(fmt, arg...) \ do { \ SECURE_LOG(LOG_ERROR, CISS_LOG_TAG, "[CISS] "fmt"\n", ##arg); \ - } while(0) + } while (0) #define warn_if(expr, fmt, arg...) do { \ - if(expr) { \ + if (expr) { \ DBG("(%s) -> "fmt, #expr, ##arg); \ } \ } while (0) #define ret_if(expr) do { \ - if(expr) { \ + if (expr) { \ DBG("(%s) -> %s() return", #expr, __FUNCTION__); \ return; \ } \ } while (0) #define retv_if(expr, val) do { \ - if(expr) { \ + if (expr) { \ DBG("(%s) -> %s() return", #expr, __FUNCTION__); \ return (val); \ } \ } while (0) #define retm_if(expr, fmt, arg...) do { \ - if(expr) { \ + if (expr) { \ ERR(fmt, ##arg); \ DBG("(%s) -> %s() return", #expr, __FUNCTION__); \ return; \ @@ -81,7 +81,7 @@ } while (0) #define retvm_if(expr, val, fmt, arg...) do { \ - if(expr) { \ + if (expr) { \ ERR(fmt, ##arg); \ DBG("(%s) -> %s() return", #expr, __FUNCTION__); \ return (val); \ diff --git a/include/ciss-string.h b/include/ciss-string.h index 95bdf41..4f22b21 100644 --- a/include/ciss-string.h +++ b/include/ciss-string.h @@ -29,7 +29,7 @@ #define CISS_STR_ALL_ASYNCHRONOUS_DATA gettext("IDS_CST_POP_ALL_ASYNCHRONOUS_DATA") #define CISS_STR_ALL_BEARER_SERVICES gettext("IDS_CST_POP_ALL_BEARER_SERVICES") -#define CISS_STR_ALL_DATA_SERVICES gettext("IDS_CST_POP_ALL_DATA_SERVICES") +#define CISS_STR_ALL_DATA_SERVICES gettext("IDS_CST_POP_ALL_DATA_SERVICES") #define CISS_STR_ALL_PADCA_SERVICES gettext("IDS_CST_POP_ALL_PADCA_SERVICES") #define CISS_STR_ALL_PDS_SERVICES gettext("IDS_CST_POP_ALL_PDS_SERVICES") #define CISS_STR_ALL_PLMN_BEARERS gettext("IDS_CST_POP_ALL_PLMN_BEARERS") @@ -46,34 +46,34 @@ #define CISS_STR_CANCEL gettext("IDS_COM_SK_CANCEL") #define CISS_STR_CALLER_ID_SHOWN gettext("IDS_CST_POP_CALLER_ID_SHOWN") #define CISS_STR_CALLER_ID_HIDDEN gettext("IDS_CST_POP_CALLER_ID_HIDDEN") -#define CISS_STR_MY_CALLER_ID_IS_NOT_SENT_WHEN_CALLING gettext("IDS_CST_POP_MY_CALLER_ID_IS_NOT_SENT_WHEN_CALLING") -#define CISS_STR_MY_CALLER_ID_WILL_BE_SENT_WHEN_CALLING gettext("IDS_CST_POP_MY_CALLER_ID_WILL_BE_SENT_WHEN_CALLING") -#define CISS_STR_MY_CALLER_ID_WILL_BE_SENT_WHEN_ANSWERING_CALLS gettext("IDS_CST_POP_MY_CALLER_ID_WILL_BE_SENT_WHEN_ANSWERING_CALLS") -#define CISS_STR_MY_CALLER_ID_IS_NOT_SENT_WHEN_ANSWERING_CALLS gettext("IDS_CST_POP_MY_CALLER_ID_IS_NOT_SENT_WHEN_ANSWERING_CALLS") -#define CISS_STR_ANSWERING_NUMBER_IS_SHOWN_WHEN_CALLING gettext("IDS_CST_POP_ANSWERING_NUMBER_IS_SHOWN_WHEN_CALLING") -#define CISS_STR_ANSWERING_NUMBER_IS_NOT_SHOWN_WHEN_CALLING gettext("IDS_CST_POP_ANSWERING_NUMBER_IS_NOT_SHOWN_WHEN_CALLING") -#define CISS_STR_CALLER_ID_AVAILABLE gettext("IDS_CST_POP_CALLER_ID_AVAILABLE") -#define CISS_STR_CALLER_ID_RESTRICTED gettext("IDS_CST_POP_CALLER_ID_RESTRICTED") +#define CISS_STR_MY_CALLER_ID_IS_NOT_SENT_WHEN_CALLING gettext("IDS_CST_POP_MY_CALLER_ID_IS_NOT_SENT_WHEN_CALLING") +#define CISS_STR_MY_CALLER_ID_WILL_BE_SENT_WHEN_CALLING gettext("IDS_CST_POP_MY_CALLER_ID_WILL_BE_SENT_WHEN_CALLING") +#define CISS_STR_MY_CALLER_ID_WILL_BE_SENT_WHEN_ANSWERING_CALLS gettext("IDS_CST_POP_MY_CALLER_ID_WILL_BE_SENT_WHEN_ANSWERING_CALLS") +#define CISS_STR_MY_CALLER_ID_IS_NOT_SENT_WHEN_ANSWERING_CALLS gettext("IDS_CST_POP_MY_CALLER_ID_IS_NOT_SENT_WHEN_ANSWERING_CALLS") +#define CISS_STR_ANSWERING_NUMBER_IS_SHOWN_WHEN_CALLING gettext("IDS_CST_POP_ANSWERING_NUMBER_IS_SHOWN_WHEN_CALLING") +#define CISS_STR_ANSWERING_NUMBER_IS_NOT_SHOWN_WHEN_CALLING gettext("IDS_CST_POP_ANSWERING_NUMBER_IS_NOT_SHOWN_WHEN_CALLING") +#define CISS_STR_CALLER_ID_AVAILABLE gettext("IDS_CST_POP_CALLER_ID_AVAILABLE") +#define CISS_STR_CALLER_ID_RESTRICTED gettext("IDS_CST_POP_CALLER_ID_RESTRICTED") #define CISS_STR_CALLER_ID_DEFAULTS_TO_NOT_RESTRICTED_NEXT_CALL_C_NOT_RESTRICTED gettext("IDS_COM_BODY_CALLER_ID_DEFAULTS_TO_NOT_RESTRICTED_NEXT_CALL_C_NOT_RESTRICTED") #define CISS_STR_CALLER_ID_DEFAULTS_TO_NOT_RESTRICTED_NEXT_CALL_C_RESTRICTED gettext("IDS_COM_BODY_CALLER_ID_DEFAULTS_TO_NOT_RESTRICTED_NEXT_CALL_C_RESTRICTED") #define CISS_STR_CALLER_ID_DEFAULTS_TO_RESTRICTED_NEXT_CALL_C_NOT_RESTRICTED gettext("IDS_COM_BODY_CALLER_ID_DEFAULTS_TO_RESTRICTED_NEXT_CALL_C_NOT_RESTRICTED") #define CISS_STR_CALLER_ID_DEFAULTS_TO_RESTRICTED_NEXT_CALL_C_RESTRICTED gettext("IDS_COM_BODY_CALLER_ID_DEFAULTS_TO_RESTRICTED_NEXT_CALL_C_RESTRICTED") -#define CISS_STR_CHANGE_PASSWORD gettext("IDS_CST_OPT_CHANGE_PASSWORD") +#define CISS_STR_CHANGE_PASSWORD gettext("IDS_CST_OPT_CHANGE_PASSWORD") #define CISS_STR_CALL_FORWARDING_ACTIVE_C_ALWAYS gettext("IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_ALWAYS") -#define CISS_STR_CALL_FORWARDING_ACTIVE_C_WHEN_NOREPLY gettext("IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_NO_ANSWER") -#define CISS_STR_CALL_FORWARDING_ACTIVE_C_WHEN_BUSY gettext("IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_WHEN_BUSY") -#define CISS_STR_CALL_FORWARDING_ACTIVE_C_UNREACHABLE gettext("IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_UNREACHABLE") +#define CISS_STR_CALL_FORWARDING_ACTIVE_C_WHEN_NOREPLY gettext("IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_NO_ANSWER") +#define CISS_STR_CALL_FORWARDING_ACTIVE_C_WHEN_BUSY gettext("IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_WHEN_BUSY") +#define CISS_STR_CALL_FORWARDING_ACTIVE_C_UNREACHABLE gettext("IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_UNREACHABLE") -#define CISS_STR_CONDITIONAL gettext("IDS_CST_HEADER_CONDITIONAL") -#define CISS_STR_ALL_OUTGOING_CALLS_BARRED gettext("IDS_CALL_POP_ALL_OUTGOING_CALLS_BARRED") -#define CISS_STR_OUTGOING_INTERNATIONAL_CALLS_BARRED gettext("IDS_CALL_POP_OUTGOING_INTER_CALLS_BARRED") -#define CISS_STR_OUTGOING_INTERNATIONAL_CALLS_EXCEPT_HOME_BARRED gettext("IDS_CALL_POP_OUTGOING_INTERNATIONAL_CALLS_EXCEPT_HOME_BARRED") -#define CISS_STR_ALL_INCOMING_CALLS_BARRED gettext("IDS_CALL_POP_ALL_INCOMING_CALLS_BARRED") -#define CISS_STR_INCOMING_CALLS_BARRED_WHEN_ROAMING gettext("IDS_CALL_POP_INCOMING_CALLS_BARRED_WHEN_ROAMING") -#define CISS_STR_ALL_BARRING gettext("IDS_ST_POP_ALL_BARRING") -#define CISS_STR_OUTGOING_BARRING gettext("IDS_ST_POP_OUTGOING_BARRING") -#define CISS_STR_INCOMING_BARRING gettext("IDS_ST_POP_INCOMING_BARRING") -#define CISS_STR_FDN_NUMBER_ONLY gettext("IDS_COM_BODY_OUTGOING_CALLS_ARE_RESTRICTED_BY_FDN") +#define CISS_STR_CONDITIONAL gettext("IDS_CST_HEADER_CONDITIONAL") +#define CISS_STR_ALL_OUTGOING_CALLS_BARRED gettext("IDS_CALL_POP_ALL_OUTGOING_CALLS_BARRED") +#define CISS_STR_OUTGOING_INTERNATIONAL_CALLS_BARRED gettext("IDS_CALL_POP_OUTGOING_INTER_CALLS_BARRED") +#define CISS_STR_OUTGOING_INTERNATIONAL_CALLS_EXCEPT_HOME_BARRED gettext("IDS_CALL_POP_OUTGOING_INTERNATIONAL_CALLS_EXCEPT_HOME_BARRED") +#define CISS_STR_ALL_INCOMING_CALLS_BARRED gettext("IDS_CALL_POP_ALL_INCOMING_CALLS_BARRED") +#define CISS_STR_INCOMING_CALLS_BARRED_WHEN_ROAMING gettext("IDS_CALL_POP_INCOMING_CALLS_BARRED_WHEN_ROAMING") +#define CISS_STR_ALL_BARRING gettext("IDS_ST_POP_ALL_BARRING") +#define CISS_STR_OUTGOING_BARRING gettext("IDS_ST_POP_OUTGOING_BARRING") +#define CISS_STR_INCOMING_BARRING gettext("IDS_ST_POP_INCOMING_BARRING") +#define CISS_STR_FDN_NUMBER_ONLY gettext("IDS_COM_BODY_OUTGOING_CALLS_ARE_RESTRICTED_BY_FDN") #define CISS_STR_SUCCESS gettext("IDS_DLNA_BODY_SUCCESS") #define CISS_STR_REPLY gettext("IDS_COM_SK_REPLY") @@ -98,4 +98,4 @@ #define CISS_STR_VIDEO_CALL gettext("IDS_COM_BODY_VIDEO_CALL") #define CISS_STR_COPY_TEXT gettext("IDS_MSGF_BODY_COPY_TEXT") #define CISS_STR_ADD_TO_BOOKMARKS gettext("IDS_COM_OPT_ADD_TO_BOOKMARKS") -#define CISS_STR_SAVE_TO_KEEPIT_ADD gettext("IDS_MSG_OPT_SAVE_TO_KEEPIT_ABB")
\ No newline at end of file +#define CISS_STR_SAVE_TO_KEEPIT_ADD gettext("IDS_MSG_OPT_SAVE_TO_KEEPIT_ABB") diff --git a/include/ciss-types.h b/include/ciss-types.h index 89ed30b..da4d623 100644 --- a/include/ciss-types.h +++ b/include/ciss-types.h @@ -29,11 +29,11 @@ #define CISS_FORWARD_NUMBER_LEN_MAX 32 /**< Maximum length of Forward to number */ #define CISS_TAPI_NW_USSD_HANDLE 255 /**< Mapped to the OEM_INVALID_REQUEST_ID of Tapi - OemTapiCommon.h*/ -#define REQ_STRING_MAX_LEN 255 +#define REQ_STRING_MAX_LEN 255 #define MAX_PWD_CHAR 4 #define MAX_SC_ENTRY 20 -#define MAX_USS_CHAR 160 /**< Max num of char is USS data*/ -#define MAX_SC_LEN 3 /**< Maximum length of service code */ +#define MAX_USS_CHAR 160 /**< Max num of char is USS data*/ +#define MAX_SC_LEN 3 /**< Maximum length of service code */ #define ENCODE_TYPE_GSM 0x0F /**< the value of the GSM encoding fromat for ussd */ #define CISS_MMI_MAX_USSD_RESP_STRING 300 #define CISS_MMI_MAX_SS_RESP_STRING 1664 @@ -113,70 +113,70 @@ typedef enum { * This enumeration defines the telecomm services handled by the engine */ typedef enum { - CISS_TELECOMM_SVC_NONE, /**<0 : None */ + CISS_TELECOMM_SVC_NONE, /**<0 : None */ CISS_TELECOMM_SVC_ALL_TELE_BEARER, /**<1 : All Tele and Bearer services */ /* TELESERVICE */ - CISS_TELECOMM_SVC_ALL_TELE, /**<2 : All Teleservices */ - CISS_TELECOMM_SVC_VOICE, /**<3 : All Voice ( telephony ) */ + CISS_TELECOMM_SVC_ALL_TELE, /**<2 : All Teleservices */ + CISS_TELECOMM_SVC_VOICE, /**<3 : All Voice ( telephony ) */ CISS_TELECOMM_SVC_ALL_DATA_TELE, /**<4 : All Data Teleservices */ - CISS_TELECOMM_SVC_FAX, /**<5 :All Fax Service */ - CISS_TELECOMM_SVC_SMS, /**<6 : SMS service */ - CISS_TELECOMM_SVC_VGCS, /**<7 : Voice Group Call Service */ - CISS_TELECOMM_SVC_VBS, /**<8 : Voice Broadcast */ - CISS_TELECOMM_SVC_ALL_TELE_EXPT_SMS, /**<9 : All teleservice except SMS */ + CISS_TELECOMM_SVC_FAX, /**<5 :All Fax Service */ + CISS_TELECOMM_SVC_SMS, /**<6 : SMS service */ + CISS_TELECOMM_SVC_VGCS, /**<7 : Voice Group Call Service */ + CISS_TELECOMM_SVC_VBS, /**<8 : Voice Broadcast */ + CISS_TELECOMM_SVC_ALL_TELE_EXPT_SMS, /**<9 : All teleservice except SMS */ /* BEARER SERVICE */ - CISS_TELECOMM_SVC_ALL_BEARER, /**<10 : all bearer services */ + CISS_TELECOMM_SVC_ALL_BEARER, /**<10 : all bearer services */ CISS_TELECOMM_SVC_ALL_ASYNC, /**<11 : All Async services */ - CISS_TELECOMM_SVC_ALL_SYNC, /**<12 : All sync services*/ - CISS_TELECOMM_SVC_ALL_CS_SYNC, /**<13 : All Circuit switched sync */ + CISS_TELECOMM_SVC_ALL_SYNC, /**<12 : All sync services*/ + CISS_TELECOMM_SVC_ALL_CS_SYNC, /**<13 : All Circuit switched sync */ CISS_TELECOMM_SVC_ALL_CS_ASYNC, /**<14 : All Circuit switched async */ CISS_TELECOMM_SVC_ALL_DEDI_PS, /**<15 : All Dedicated packet Access */ CISS_TELECOMM_SVC_ALL_DEDI_PAD, /**<16 : All Dedicated PAD Access */ CISS_TELECOMM_SVC_ALL_DATA_CDA, /**<17 : All Data CDA*/ /* PLMN SPECIFIC TELESERVICE */ - CISS_TELECOMM_SVC_PLMN_TELE_ALL, /**<18 : PLMN specific teleservices*/ + CISS_TELECOMM_SVC_PLMN_TELE_ALL, /**<18 : PLMN specific teleservices*/ CISS_TELECOMM_SVC_PLMN_TELE_1, /**<19 : PLMN specific teleservice 1*/ CISS_TELECOMM_SVC_PLMN_TELE_2, /**<20 : PLMN specific teleservice 2*/ - CISS_TELECOMM_SVC_PLMN_TELE_3, /**<21 : PLMN specific teleservice 3*/ - CISS_TELECOMM_SVC_PLMN_TELE_4, /**<22 : PLMN specific teleservice 4*/ - CISS_TELECOMM_SVC_PLMN_TELE_5, /**<23 : PLMN specific teleservice 5*/ - CISS_TELECOMM_SVC_PLMN_TELE_6, /**<24 : PLMN specific teleservice 6*/ - CISS_TELECOMM_SVC_PLMN_TELE_7, /**<25 : PLMN specific teleservice 7*/ - CISS_TELECOMM_SVC_PLMN_TELE_8, /**<26 : PLMN specific teleservice 8*/ - CISS_TELECOMM_SVC_PLMN_TELE_9, /**<27 : PLMN specific teleservice 9*/ - CISS_TELECOMM_SVC_PLMN_TELE_A, /**<28 :PLMN specific teleservice 10*/ - CISS_TELECOMM_SVC_PLMN_TELE_B, /**<29 :PLMN specific teleservice 11*/ - CISS_TELECOMM_SVC_PLMN_TELE_C, /**<30 : PLMN specific teleservice 12*/ - CISS_TELECOMM_SVC_PLMN_TELE_D, /**<31 : PLMN specific teleservice 13*/ - CISS_TELECOMM_SVC_PLMN_TELE_E, /**<32 : PLMN specific teleservice 14*/ - CISS_TELECOMM_SVC_PLMN_TELE_F, /**<33 : PLMN specific teleservice 15*/ + CISS_TELECOMM_SVC_PLMN_TELE_3, /**<21 : PLMN specific teleservice 3*/ + CISS_TELECOMM_SVC_PLMN_TELE_4, /**<22 : PLMN specific teleservice 4*/ + CISS_TELECOMM_SVC_PLMN_TELE_5, /**<23 : PLMN specific teleservice 5*/ + CISS_TELECOMM_SVC_PLMN_TELE_6, /**<24 : PLMN specific teleservice 6*/ + CISS_TELECOMM_SVC_PLMN_TELE_7, /**<25 : PLMN specific teleservice 7*/ + CISS_TELECOMM_SVC_PLMN_TELE_8, /**<26 : PLMN specific teleservice 8*/ + CISS_TELECOMM_SVC_PLMN_TELE_9, /**<27 : PLMN specific teleservice 9*/ + CISS_TELECOMM_SVC_PLMN_TELE_A, /**<28 :PLMN specific teleservice 10*/ + CISS_TELECOMM_SVC_PLMN_TELE_B, /**<29 :PLMN specific teleservice 11*/ + CISS_TELECOMM_SVC_PLMN_TELE_C, /**<30 : PLMN specific teleservice 12*/ + CISS_TELECOMM_SVC_PLMN_TELE_D, /**<31 : PLMN specific teleservice 13*/ + CISS_TELECOMM_SVC_PLMN_TELE_E, /**<32 : PLMN specific teleservice 14*/ + CISS_TELECOMM_SVC_PLMN_TELE_F, /**<33 : PLMN specific teleservice 15*/ /* PLMN SPECIFIC BEARER SERVICE */ - CISS_TELECOMM_SVC_PLMN_BEAR_ALL, /**<34 : All PLMN specific bearer services*/ - CISS_TELECOMM_SVC_PLMN_BEAR_1, /**<35 :PLMN specific bearer service 1*/ - CISS_TELECOMM_SVC_PLMN_BEAR_2, /**<36 : PLMN specific bearer service 2*/ - CISS_TELECOMM_SVC_PLMN_BEAR_3, /**<37 : PLMN specific bearer service 3*/ - CISS_TELECOMM_SVC_PLMN_BEAR_4, /**<38 : PLMN specific bearer service 4*/ - CISS_TELECOMM_SVC_PLMN_BEAR_5, /**<39 : PLMN specific bearer service 5*/ - CISS_TELECOMM_SVC_PLMN_BEAR_6, /**<40 : PLMN specific bearer service 6*/ - CISS_TELECOMM_SVC_PLMN_BEAR_7, /**<41 : PLMN specific bearer service 7*/ - CISS_TELECOMM_SVC_PLMN_BEAR_8, /**<42 : PLMN specific bearer service 8*/ - CISS_TELECOMM_SVC_PLMN_BEAR_9, /**<43 : PLMN specific bearer service 9*/ - CISS_TELECOMM_SVC_PLMN_BEAR_A, /**<44 : PLMN specific bearer service 10*/ - CISS_TELECOMM_SVC_PLMN_BEAR_B, /**<45 : PLMN specific bearer service 11*/ - CISS_TELECOMM_SVC_PLMN_BEAR_C, /**<46 : PLMN specific bearer service 12*/ - CISS_TELECOMM_SVC_PLMN_BEAR_D, /**<47 : PLMN specific bearer service 13*/ - CISS_TELECOMM_SVC_PLMN_BEAR_E, /**<48 : PLMN specific bearer service 14*/ - CISS_TELECOMM_SVC_PLMN_BEAR_F, /**<49 : PLMN specific bearer service 15*/ + CISS_TELECOMM_SVC_PLMN_BEAR_ALL, /**<34 : All PLMN specific bearer services*/ + CISS_TELECOMM_SVC_PLMN_BEAR_1, /**<35 :PLMN specific bearer service 1*/ + CISS_TELECOMM_SVC_PLMN_BEAR_2, /**<36 : PLMN specific bearer service 2*/ + CISS_TELECOMM_SVC_PLMN_BEAR_3, /**<37 : PLMN specific bearer service 3*/ + CISS_TELECOMM_SVC_PLMN_BEAR_4, /**<38 : PLMN specific bearer service 4*/ + CISS_TELECOMM_SVC_PLMN_BEAR_5, /**<39 : PLMN specific bearer service 5*/ + CISS_TELECOMM_SVC_PLMN_BEAR_6, /**<40 : PLMN specific bearer service 6*/ + CISS_TELECOMM_SVC_PLMN_BEAR_7, /**<41 : PLMN specific bearer service 7*/ + CISS_TELECOMM_SVC_PLMN_BEAR_8, /**<42 : PLMN specific bearer service 8*/ + CISS_TELECOMM_SVC_PLMN_BEAR_9, /**<43 : PLMN specific bearer service 9*/ + CISS_TELECOMM_SVC_PLMN_BEAR_A, /**<44 : PLMN specific bearer service 10*/ + CISS_TELECOMM_SVC_PLMN_BEAR_B, /**<45 : PLMN specific bearer service 11*/ + CISS_TELECOMM_SVC_PLMN_BEAR_C, /**<46 : PLMN specific bearer service 12*/ + CISS_TELECOMM_SVC_PLMN_BEAR_D, /**<47 : PLMN specific bearer service 13*/ + CISS_TELECOMM_SVC_PLMN_BEAR_E, /**<48 : PLMN specific bearer service 14*/ + CISS_TELECOMM_SVC_PLMN_BEAR_F, /**<49 : PLMN specific bearer service 15*/ /* CPHS - AUXILIARY SERVICE */ CISS_TELECOMM_SVC_AUX_VOICE, /**<50 : All Auxiliary Voice ( Auxiliary telephony ) */ - CISS_TELECOMM_SVC_ALL_GPRS_BEARER, /**<51 : All GPRS bearer services */ - CISS_TELECOMM_SVC_MAX /**<52 : Max count */ + CISS_TELECOMM_SVC_ALL_GPRS_BEARER, /**<51 : All GPRS bearer services */ + CISS_TELECOMM_SVC_MAX /**<52 : Max count */ } ciss_telecomm_svc_t; /** @@ -201,11 +201,11 @@ typedef enum { CISS_FLAVOR_BARRING_OUTGOING_INTERNATIONAL_CALLS_EXCEPT_HOME = 0x13, /**< bar all outgoing international calls except those to home country*/ CISS_FLAVOR_BARRING_ALL_INCOMING_CALLS = 0x14, /**< bar all incoming calls*/ CISS_FLAVOR_BARRING_INCOMING_CALLS_WHEN_ROAMING = 0x15, /**< bar all incoming calls when roaming*/ - CISS_FLAVOR_BARRING_ALL_FLAVORS = 0x16, /**< includes all other flavors. Used for Cancel All */ - CISS_FLAVOR_BARRING_OUTGOING = 0x17, /**< bar all outgoing flavors*/ - CISS_FLAVOR_BARRING_INCOMING = 0x18, /**< bar all incoming flavors*/ + CISS_FLAVOR_BARRING_ALL_FLAVORS = 0x16, /**< includes all other flavors. Used for Cancel All */ + CISS_FLAVOR_BARRING_OUTGOING = 0x17, /**< bar all outgoing flavors*/ + CISS_FLAVOR_BARRING_INCOMING = 0x18, /**< bar all incoming flavors*/ CISS_FLAVOR_BARRING_END = 0x19, /**< Barring end*/ - CISS_FLAVOR_BARRING_CANCELALL = 0x1A, /**< Cancel all barring*/ + CISS_FLAVOR_BARRING_CANCELALL = 0x1A, /**< Cancel all barring*/ CISS_FLAVOR_WAITING = 0x20, /**< added for auto-check feature enable/disable*/ CISS_FLAVOR_MAX = 0xFF /**< max*/ @@ -284,7 +284,7 @@ typedef enum { * This enumeration defines the ussd response type */ typedef enum { - CISS_USSD_RES_UNKNOWN_ALPHABET = 0x00, /**< unlnown alphabet */ + 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*/ @@ -294,52 +294,52 @@ typedef enum { * These are the four types of identity presentation / restriction services. */ typedef enum { - CISS_CC_VOICE_IDENTIFICATION_NONE = 0x00, /**< none */ + CISS_CC_VOICE_IDENTIFICATION_NONE = 0x00, /**< none */ CISS_CALLING_LINE_IDENTITY_PRESENTATION = 0x01, /**< identify the party calling this phone */ CISS_CALLING_LINE_IDENTITY_RESTRICTION = 0x02, /**< hide the identity of this phone when calling others */ - CISS_CONNECTED_LINE_IDENTITY_PRESENTATION = 0x03, /**< identify the party to whom the calling party (this phone) is connected */ + CISS_CONNECTED_LINE_IDENTITY_PRESENTATION = 0x03, /**< identify the party to whom the calling party (this phone) is connected */ CISS_CONNECTED_LINE_IDENTITY_RESTRICTION = 0x04, /**< restrict yourself from being identified by incoming calls, such as forwarded calls */ CISS_CALLED_LINE_IDENTITY_PRESENTATION = 0x05, /**< same as colr */ - CISS_CALLING_NAME_PRESENTATION = 0x06 /**< show the name of the calling party to the connected one */ + CISS_CALLING_NAME_PRESENTATION = 0x06 /**< show the name of the calling party to the connected one */ } ciss_cc_voice_identification_type_t; /** * The ussd data recieved from the network */ typedef struct { - ciss_ussd_ind_type_t ind_type; /**< the ussd indication type */ - unsigned char dcs; /**< the data coding scheme */ - int ussd_string_length; /**< Length of String */ - char ussd_string[CISS_USSD_DATA_SIZE_MAX]; /**< The USSD data string to be displayed to the user */ - int request_by; /**< The Engine information */ - int sat_command_id; /**< The Engine information */ + ciss_ussd_ind_type_t ind_type; /**< the ussd indication type */ + unsigned char dcs; /**< the data coding scheme */ + int ussd_string_length; /**< Length of String */ + char ussd_string[CISS_USSD_DATA_SIZE_MAX]; /**< The USSD data string to be displayed to the user */ + int request_by; /**< The Engine information */ + int sat_command_id; /**< The Engine information */ } ciss_ussd_record_t; /** * The ussd repsonse data sent to the network */ typedef struct { - ciss_ussd_response_type_t resp_type; /**< the ussd repsonse type */ - int length; /**< Length of String */ - char string[CISS_USSD_DATA_SIZE_MAX]; /**< The USSD data string to be sent to network */ - int request_by; /**< The Engine information */ - int sat_command_id; /**< The Engine information */ - int last_ussd_ind; /**< The Engine information */ + ciss_ussd_response_type_t resp_type; /**< the ussd repsonse type */ + int length; /**< Length of String */ + char string[CISS_USSD_DATA_SIZE_MAX]; /**< The USSD data string to be sent to network */ + int request_by; /**< The Engine information */ + int sat_command_id; /**< The Engine information */ + int last_ussd_ind; /**< The Engine information */ } ciss_ussd_response_record_t; /** * ss request data to be sent to network. */ typedef struct { - ciss_service_t service; /**< barring, forwarding, waiting, etc */ - ciss_telecomm_svc_t telecommSvc; /**< telecomm service */ - ciss_flavor_t flavor; /**< the flavor of the SS used in service*/ - ciss_action_type_t action; /**< the action to be performed on the SS */ - int nForwardWaitingTime; /**< the no reply timer */ - char szForwardedToNumber[CISS_NUMBER_LEN_MAX + 1]; /**< number to be forwarded to */ - char szBarringPasswd[CISS_MAX_PASSWORD_LEN + 1]; /**< the old barring pwd */ - char szBarringNewPasswd[CISS_MAX_PASSWORD_LEN + 1]; /**< the new barring pwd */ - char szBarringCnfPasswd[CISS_MAX_PASSWORD_LEN + 1]; /**< the cnf barring pwd */ + ciss_service_t service; /**< barring, forwarding, waiting, etc */ + ciss_telecomm_svc_t telecommSvc; /**< telecomm service */ + ciss_flavor_t flavor; /**< the flavor of the SS used in service*/ + ciss_action_type_t action; /**< the action to be performed on the SS */ + int nForwardWaitingTime; /**< the no reply timer */ + char szForwardedToNumber[CISS_NUMBER_LEN_MAX + 1]; /**< number to be forwarded to */ + char szBarringPasswd[CISS_MAX_PASSWORD_LEN + 1]; /**< the old barring pwd */ + char szBarringNewPasswd[CISS_MAX_PASSWORD_LEN + 1]; /**< the new barring pwd */ + char szBarringCnfPasswd[CISS_MAX_PASSWORD_LEN + 1]; /**< the cnf barring pwd */ } ciss_req_data_t; /** diff --git a/include/ciss-widget.h b/include/ciss-widget.h index 6270a46..90453c0 100644 --- a/include/ciss-widget.h +++ b/include/ciss-widget.h @@ -53,8 +53,8 @@ enum { }; void _ciss_view_popup_win_set_noti_type(void *data, int bwin_noti); -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_conformant(Evas_Object *parent); diff --git a/packaging/org.tizen.w-ciss.spec b/packaging/org.tizen.w-ciss.spec index 27b0331..a1ee231 100644 --- a/packaging/org.tizen.w-ciss.spec +++ b/packaging/org.tizen.w-ciss.spec @@ -1,6 +1,6 @@ %define major 0 %define minor 1 -%define patchlevel 0 +%define patchlevel 1 Name: org.tizen.w-ciss Summary: CISS-MMI application diff --git a/src/ciss-converter.c b/src/ciss-converter.c index c6329df..71c4635 100644 --- a/src/ciss-converter.c +++ b/src/ciss-converter.c @@ -51,62 +51,62 @@ static const sc_table_element_type sc_conversion_table_ss[] = { /* need to find mapping with the call type or forward type for call barring and call forwarding else not required */ static const bsg_table_element_type bsg_conversion_table[MAX_BSG_ENTRY] = { - {CISS_ENG_BSG_ALL, 0, TAPI_SS_CLASS_ALL_TELE_BEARER}, - {CISS_ENG_BSG_ALL_TS, TS_CODE, TAPI_SS_CLASS_ALL_TELE}, - {CISS_ENG_BSG_TELEPHONY, TS_CODE, TAPI_SS_CLASS_VOICE }, - {CISS_ENG_BSG_AUX_TELEPHONY, TS_CODE, TAPI_SS_CLASS_AUX_VOICE}, + {CISS_ENG_BSG_ALL, 0, TAPI_SS_CLASS_ALL_TELE_BEARER}, + {CISS_ENG_BSG_ALL_TS, TS_CODE, TAPI_SS_CLASS_ALL_TELE}, + {CISS_ENG_BSG_TELEPHONY, TS_CODE, TAPI_SS_CLASS_VOICE }, + {CISS_ENG_BSG_AUX_TELEPHONY, TS_CODE, TAPI_SS_CLASS_AUX_VOICE}, {CISS_ENG_BSG_ALL_DATA, TS_CODE, TAPI_SS_CLASS_ALL_DATA_TELE}, - {CISS_ENG_BSG_FAX, TS_CODE, TAPI_SS_CLASS_FAX}, - {CISS_ENG_BSG_SMS, TS_CODE, TAPI_SS_CLASS_SMS}, - {CISS_ENG_BSG_ALL_TELE_EX_SMS, TS_CODE, TAPI_SS_CLASS_ALL_TELE_EXPT_SMS}, - {CISS_ENG_BSG_PLMN_TELE_ALL, TS_CODE, TAPI_SS_CLASS_PLMN_TELE_ALL }, - {CISS_ENG_BSG_PLMN_TELE_1, TS_CODE, TAPI_SS_CLASS_PLMN_TELE_1}, - {CISS_ENG_BSG_PLMN_TELE_2, TS_CODE, TAPI_SS_CLASS_PLMN_TELE_2}, - {CISS_ENG_BSG_PLMN_TELE_3, TS_CODE, TAPI_SS_CLASS_PLMN_TELE_3}, - {CISS_ENG_BSG_PLMN_TELE_4, TS_CODE, TAPI_SS_CLASS_PLMN_TELE_4}, - {CISS_ENG_BSG_PLMN_TELE_5, TS_CODE, TAPI_SS_CLASS_PLMN_TELE_5}, - {CISS_ENG_BSG_PLMN_TELE_6, TS_CODE, TAPI_SS_CLASS_PLMN_TELE_6}, - {CISS_ENG_BSG_PLMN_TELE_7, TS_CODE, TAPI_SS_CLASS_PLMN_TELE_7}, - {CISS_ENG_BSG_PLMN_TELE_8, TS_CODE, TAPI_SS_CLASS_PLMN_TELE_8}, - {CISS_ENG_BSG_PLMN_TELE_9, TS_CODE, TAPI_SS_CLASS_PLMN_TELE_9}, - {CISS_ENG_BSG_PLMN_TELE_A, TS_CODE, TAPI_SS_CLASS_PLMN_TELE_A}, - {CISS_ENG_BSG_PLMN_TELE_B, TS_CODE, TAPI_SS_CLASS_PLMN_TELE_B}, - {CISS_ENG_BSG_PLMN_TELE_C, TS_CODE, TAPI_SS_CLASS_PLMN_TELE_C}, - {CISS_ENG_BSG_PLMN_TELE_D, TS_CODE, TAPI_SS_CLASS_PLMN_TELE_D}, - {CISS_ENG_BSG_PLMN_TELE_E, TS_CODE, TAPI_SS_CLASS_PLMN_TELE_E}, - {CISS_ENG_BSG_PLMN_TELE_F, TS_CODE, TAPI_SS_CLASS_PLMN_TELE_F}, - {CISS_ENG_BSG_ALL_BS, BS_CODE, TAPI_SS_CLASS_ALL_BEARER}, - {CISS_ENG_BSG_ALL_ASYNC, BS_CODE, TAPI_SS_CLASS_ALL_ASYNC}, - {CISS_ENG_BSG_ALL_SYNC, BS_CODE, TAPI_SS_CLASS_ALL_SYNC}, - {CISS_ENG_BSG_ALL_DC_SYNC, BS_CODE, TAPI_SS_CLASS_ALL_CS_SYNC}, - {CISS_ENG_BSG_ALL_DC_ASYNC, BS_CODE, TAPI_SS_CLASS_ALL_CS_ASYNC}, - {CISS_ENG_BSG_ALL_DED_PACKET, BS_CODE, TAPI_SS_CLASS_ALL_DEDI_PS}, - {CISS_ENG_BSG_ALL_DED_PAD, BS_CODE, TAPI_SS_CLASS_ALL_DEDI_PAD}, - {CISS_ENG_BSG_PLMN_BEAR_ALL, BS_CODE, TAPI_SS_CLASS_PLMN_BEAR_ALL}, - {CISS_ENG_BSG_PLMN_BEAR_1, BS_CODE, TAPI_SS_CLASS_PLMN_BEAR_1}, - {CISS_ENG_BSG_PLMN_BEAR_2, BS_CODE, TAPI_SS_CLASS_PLMN_BEAR_2}, - {CISS_ENG_BSG_PLMN_BEAR_3, BS_CODE, TAPI_SS_CLASS_PLMN_BEAR_3}, - {CISS_ENG_BSG_PLMN_BEAR_4, BS_CODE, TAPI_SS_CLASS_PLMN_BEAR_4}, - {CISS_ENG_BSG_PLMN_BEAR_5, BS_CODE, TAPI_SS_CLASS_PLMN_BEAR_5}, - {CISS_ENG_BSG_PLMN_BEAR_6, BS_CODE, TAPI_SS_CLASS_PLMN_BEAR_6}, - {CISS_ENG_BSG_PLMN_BEAR_7, BS_CODE, TAPI_SS_CLASS_PLMN_BEAR_7}, - {CISS_ENG_BSG_PLMN_BEAR_8, BS_CODE, TAPI_SS_CLASS_PLMN_BEAR_8}, - {CISS_ENG_BSG_PLMN_BEAR_9, BS_CODE, TAPI_SS_CLASS_PLMN_BEAR_9}, - {CISS_ENG_BSG_PLMN_BEAR_A, BS_CODE, TAPI_SS_CLASS_PLMN_BEAR_A}, - {CISS_ENG_BSG_PLMN_BEAR_B, BS_CODE, TAPI_SS_CLASS_PLMN_BEAR_B}, - {CISS_ENG_BSG_PLMN_BEAR_C, BS_CODE, TAPI_SS_CLASS_PLMN_BEAR_C}, - {CISS_ENG_BSG_PLMN_BEAR_D, BS_CODE, TAPI_SS_CLASS_PLMN_BEAR_D}, - {CISS_ENG_BSG_PLMN_BEAR_E, BS_CODE, TAPI_SS_CLASS_PLMN_BEAR_E}, - {CISS_ENG_BSG_PLMN_BEAR_F, BS_CODE, TAPI_SS_CLASS_PLMN_BEAR_F} + {CISS_ENG_BSG_FAX, TS_CODE, TAPI_SS_CLASS_FAX}, + {CISS_ENG_BSG_SMS, TS_CODE, TAPI_SS_CLASS_SMS}, + {CISS_ENG_BSG_ALL_TELE_EX_SMS, TS_CODE, TAPI_SS_CLASS_ALL_TELE_EXPT_SMS}, + {CISS_ENG_BSG_PLMN_TELE_ALL, TS_CODE, TAPI_SS_CLASS_PLMN_TELE_ALL }, + {CISS_ENG_BSG_PLMN_TELE_1, TS_CODE, TAPI_SS_CLASS_PLMN_TELE_1}, + {CISS_ENG_BSG_PLMN_TELE_2, TS_CODE, TAPI_SS_CLASS_PLMN_TELE_2}, + {CISS_ENG_BSG_PLMN_TELE_3, TS_CODE, TAPI_SS_CLASS_PLMN_TELE_3}, + {CISS_ENG_BSG_PLMN_TELE_4, TS_CODE, TAPI_SS_CLASS_PLMN_TELE_4}, + {CISS_ENG_BSG_PLMN_TELE_5, TS_CODE, TAPI_SS_CLASS_PLMN_TELE_5}, + {CISS_ENG_BSG_PLMN_TELE_6, TS_CODE, TAPI_SS_CLASS_PLMN_TELE_6}, + {CISS_ENG_BSG_PLMN_TELE_7, TS_CODE, TAPI_SS_CLASS_PLMN_TELE_7}, + {CISS_ENG_BSG_PLMN_TELE_8, TS_CODE, TAPI_SS_CLASS_PLMN_TELE_8}, + {CISS_ENG_BSG_PLMN_TELE_9, TS_CODE, TAPI_SS_CLASS_PLMN_TELE_9}, + {CISS_ENG_BSG_PLMN_TELE_A, TS_CODE, TAPI_SS_CLASS_PLMN_TELE_A}, + {CISS_ENG_BSG_PLMN_TELE_B, TS_CODE, TAPI_SS_CLASS_PLMN_TELE_B}, + {CISS_ENG_BSG_PLMN_TELE_C, TS_CODE, TAPI_SS_CLASS_PLMN_TELE_C}, + {CISS_ENG_BSG_PLMN_TELE_D, TS_CODE, TAPI_SS_CLASS_PLMN_TELE_D}, + {CISS_ENG_BSG_PLMN_TELE_E, TS_CODE, TAPI_SS_CLASS_PLMN_TELE_E}, + {CISS_ENG_BSG_PLMN_TELE_F, TS_CODE, TAPI_SS_CLASS_PLMN_TELE_F}, + {CISS_ENG_BSG_ALL_BS, BS_CODE, TAPI_SS_CLASS_ALL_BEARER}, + {CISS_ENG_BSG_ALL_ASYNC, BS_CODE, TAPI_SS_CLASS_ALL_ASYNC}, + {CISS_ENG_BSG_ALL_SYNC, BS_CODE, TAPI_SS_CLASS_ALL_SYNC}, + {CISS_ENG_BSG_ALL_DC_SYNC, BS_CODE, TAPI_SS_CLASS_ALL_CS_SYNC}, + {CISS_ENG_BSG_ALL_DC_ASYNC, BS_CODE, TAPI_SS_CLASS_ALL_CS_ASYNC}, + {CISS_ENG_BSG_ALL_DED_PACKET, BS_CODE, TAPI_SS_CLASS_ALL_DEDI_PS}, + {CISS_ENG_BSG_ALL_DED_PAD, BS_CODE, TAPI_SS_CLASS_ALL_DEDI_PAD}, + {CISS_ENG_BSG_PLMN_BEAR_ALL, BS_CODE, TAPI_SS_CLASS_PLMN_BEAR_ALL}, + {CISS_ENG_BSG_PLMN_BEAR_1, BS_CODE, TAPI_SS_CLASS_PLMN_BEAR_1}, + {CISS_ENG_BSG_PLMN_BEAR_2, BS_CODE, TAPI_SS_CLASS_PLMN_BEAR_2}, + {CISS_ENG_BSG_PLMN_BEAR_3, BS_CODE, TAPI_SS_CLASS_PLMN_BEAR_3}, + {CISS_ENG_BSG_PLMN_BEAR_4, BS_CODE, TAPI_SS_CLASS_PLMN_BEAR_4}, + {CISS_ENG_BSG_PLMN_BEAR_5, BS_CODE, TAPI_SS_CLASS_PLMN_BEAR_5}, + {CISS_ENG_BSG_PLMN_BEAR_6, BS_CODE, TAPI_SS_CLASS_PLMN_BEAR_6}, + {CISS_ENG_BSG_PLMN_BEAR_7, BS_CODE, TAPI_SS_CLASS_PLMN_BEAR_7}, + {CISS_ENG_BSG_PLMN_BEAR_8, BS_CODE, TAPI_SS_CLASS_PLMN_BEAR_8}, + {CISS_ENG_BSG_PLMN_BEAR_9, BS_CODE, TAPI_SS_CLASS_PLMN_BEAR_9}, + {CISS_ENG_BSG_PLMN_BEAR_A, BS_CODE, TAPI_SS_CLASS_PLMN_BEAR_A}, + {CISS_ENG_BSG_PLMN_BEAR_B, BS_CODE, TAPI_SS_CLASS_PLMN_BEAR_B}, + {CISS_ENG_BSG_PLMN_BEAR_C, BS_CODE, TAPI_SS_CLASS_PLMN_BEAR_C}, + {CISS_ENG_BSG_PLMN_BEAR_D, BS_CODE, TAPI_SS_CLASS_PLMN_BEAR_D}, + {CISS_ENG_BSG_PLMN_BEAR_E, BS_CODE, TAPI_SS_CLASS_PLMN_BEAR_E}, + {CISS_ENG_BSG_PLMN_BEAR_F, BS_CODE, TAPI_SS_CLASS_PLMN_BEAR_F} }; bool _ciss_convert_bsg_to_tapi_bsg(char *local_bsg, TelSsClass_t *tapi_bsg) { - retv_if(local_bsg==NULL, false); + retv_if(local_bsg == NULL, false); bool valid_bsg = false; int n = 0; - int local_bsg_len =0; + int local_bsg_len = 0; local_bsg_len = strlen(local_bsg); if (local_bsg_len > MAX_BSG_LEN) { diff --git a/src/ciss-main.c b/src/ciss-main.c index fd66c8f..e999604 100644 --- a/src/ciss-main.c +++ b/src/ciss-main.c @@ -120,21 +120,8 @@ static void __ciss_app_pause(void *data) ciss_appdata_t *ad = (ciss_appdata_t *)data; memset(ad->c_item, 0, sizeof(ad->c_item)); - content = elm_object_part_content_get( ad->layout_main, "elm.swallow.content" ); - elm_naviframe_item_pop( content ); - -/* - 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(); -*/ + content = elm_object_part_content_get(ad->layout_main, "elm.swallow.content"); + elm_naviframe_item_pop(content); } static void __ciss_app_resume(void *data) @@ -144,7 +131,7 @@ static void __ciss_app_resume(void *data) Evas_Object *content; ciss_appdata_t *ad = (ciss_appdata_t *)data; - if(ad->result != TAPI_SS_SUCCESS) { + if (ad->result != TAPI_SS_SUCCESS) { ciss_err_t ciss_err; _ciss_get_error_from_tapi_error(&ciss_err, ad->result); _ciss_create_error_popup(ad->layout_main, ciss_err, 2.0, ad); @@ -152,11 +139,11 @@ static void __ciss_app_resume(void *data) return; } - if(ad->popup) { + if (ad->popup) { const char *popup_text; popup_text = elm_object_translatable_part_text_get(ad->popup, "title,text"); DBG("popup_text = %s", popup_text); - if(g_strcmp0(gettext(popup_text), CISS_STR_INFORMATION) == 0) { + if (g_strcmp0(gettext(popup_text), CISS_STR_INFORMATION) == 0) { evas_object_show(ad->popup); return; } @@ -218,7 +205,7 @@ static void __ciss_app_language_changed(app_event_info_h event_info, void *data) DBG("Enter"); char *locale = vconf_get_str(VCONFKEY_LANGSET); - if ( locale ) { + if (locale) { DBG("locale : %s", locale); elm_language_set(locale); free(locale); @@ -342,13 +329,7 @@ static int __ciss_relaunch_handler(void *data) ad->layout_main = ly; evas_object_show(ly); } -/* - if (ad->indicator_bg == NULL) { - elm_win_indicator_mode_set(ad->win_main, ELM_WIN_INDICATOR_SHOW); - elm_win_indicator_opacity_set(ad->win_main, ELM_WIN_INDICATOR_OPAQUE); - ad->indicator_bg = _ciss_create_indicator_bg(ad->conformant); - } -*/ + int flight_mode = 0; int lpm_mode = 0; if (__ciss_get_flight_mode(&flight_mode) && flight_mode) { @@ -367,11 +348,11 @@ static int __ciss_relaunch_handler(void *data) g_free(req_string); return ret; - } else if (_ciss_get_lpm_mode(ad->tapi_handle ,&lpm_mode) && lpm_mode) { + } else if (_ciss_get_lpm_mode(ad->tapi_handle , &lpm_mode) && lpm_mode) { WARN("lpm mode on"); Evas_Object *popup = NULL; - popup = _ciss_create_lpm_mode_popup(ad->layout_main,ad); + popup = _ciss_create_lpm_mode_popup(ad->layout_main, ad); elm_object_focus_allow_set(popup, EINA_TRUE); elm_object_focus_set(popup, EINA_TRUE); ad->popup = popup; @@ -388,7 +369,7 @@ static int __ciss_relaunch_handler(void *data) _ciss_view_popup_win_set_noti_type(ad, TRUE); - ciss_mmi_context_t mmi_ctx; + ciss_mmi_context_t mmi_ctx; ciss_err_code = _ciss_parse_req_string(req_string, &mmi_ctx); @@ -401,8 +382,7 @@ static int __ciss_relaunch_handler(void *data) _ciss_create_error_popup(ad->layout_main, ciss_err_code, 2.0, ad); } } - } - else if (strncmp(launching_mode, "RESP", 4)== 0) { + } else if (strncmp(launching_mode, "RESP", 4) == 0) { err = app_control_get_extra_data(ad->app_control_handle, "KEY_EVENT_TYPE", &key_event_type); if (err != APP_CONTROL_ERROR_NONE) { DBG("app_control_get_extra_data for KEY_EVENT_TYPE failed - (%d)\n", err); @@ -456,28 +436,7 @@ static int __ciss_relaunch_handler(void *data) ret = -1; break; } - } -#if 0 // test purpose only.. - else if (strncmp(launching_mode, "USSD_TEST", 9)== 0) { - // test code for ussd - TelSsUssdResp_t test_info; - - memset(&test_info, 0, sizeof(TelSsUssdNoti_t)); - - test_info.Type = 0; - sprintf(test_info.szString, "%s", "The third time the shepherd boy cried for help, nobody bothered to help him any more and this time the wolf was real, it was not a joke, but the villagers didn't believe him any more."); - test_info.Length = strlen(test_info.szString); - - g_free(ad->tapi_data); - - ad->resp_ss_type = CISS_SERVICE_USSD; - ad->tapi_event.event_type = TAPI_EVENT_SS_USSD_RESP; - ad->tapi_data = g_memdup(&test_info, sizeof(TelSsUssdResp_t)); - - _ciss_tapi_ussd_resp_handle(TAPI_SS_SUCCESS, ad->tapi_data, ad); - } -#endif - else { + } else { ERR("wrong exec type"); ret = -1; } diff --git a/src/ciss-parser.c b/src/ciss-parser.c index 8aefbca..9cfdb52 100644 --- a/src/ciss-parser.c +++ b/src/ciss-parser.c @@ -112,78 +112,66 @@ static unsigned char __ciss_parse_mmi_string(ciss_mmi_context_t *mmi_ctx, int *e (memcmp(sups_str, "#31#", 4) == 0)) && (sups_str[ss_str_len - 1] != '#')) { return NULL_SS_OPERATION; - } - else if ((_ciss_util_is_salescode("INU")||_ciss_util_is_salescode("INS")) + } else if ((_ciss_util_is_salescode("INU") || _ciss_util_is_salescode("INS")) && ((memcmp(sups_str, "*333*27#", 8) == 0) || (memcmp(sups_str, "*333*64#", 8) == 0))) { // Booster Pack DBG("[CISS-ENGINE] processUnstructuredSS_Request. BOOSTER PACK!!"); return processUnstructuredSS_Request; - } - else if ((510 == _ciss_util_get_mcc()) && memcmp(sups_str, "*333#", 5) == 0) { // Indonesia specific + } else if ((510 == _ciss_util_get_mcc()) && memcmp(sups_str, "*333#", 5) == 0) { // Indonesia specific DBG("[CISS-ENGINE] processUnstructuredSS_Request. [INDONESIA SPECIFIC]"); return processUnstructuredSS_Request; - } - else if ((_ciss_util_is_salescode("CAM") || _ciss_util_is_salescode("THO")) + } else if ((_ciss_util_is_salescode("CAM") || _ciss_util_is_salescode("THO")) && ((memcmp(sups_str, "*333#", 5) == 0))) { // Thailand specific DBG("[CISS-ENGINE] processUnstructuredSS_Request. [THAILAND SPECIFIC]"); return processUnstructuredSS_Request; } if (sups_str[0] == '*') { - if (ISDIGIT(sups_str [1])) { + if (ISDIGIT(sups_str[1])) { if (!strncmp(sups_str, "*03*", strlen("*03*"))) { DBG("[CISS-ENGINE] registerPassword"); ss_operation = registerPassword; user_sc = sups_str + 4; - } - else { + } else { DBG("[CISS-ENGINE] activateSS"); ss_operation = activateSS; user_sc = sups_str + 1; } - } - else if ((sups_str[1] == '#') && ISDIGIT(sups_str[2])) { + } else if ((sups_str[1] == '#') && ISDIGIT(sups_str[2])) { DBG("[CISS-ENGINE] interrogateSS"); ss_operation = interrogateSS; user_sc = sups_str + 2; - } - else if (sups_str[1] == '*') { + } else if (sups_str[1] == '*') { if (ISDIGIT(sups_str[2])) { if (!strncmp(sups_str, "**03*", strlen("**03*"))) { DBG("[CISS-ENGINE] registerPassword"); ss_operation = registerPassword; user_sc = sups_str + 5; - } - else { + } else { DBG("[CISS-ENGINE] registerSS"); ss_operation = registerSS; user_sc = sups_str + 2; } } } - } - else if (sups_str[0] == '#') { + } else if (sups_str[0] == '#') { if (ISDIGIT(sups_str[1])) { DBG("[CISS-ENGINE] deactivateSS"); ss_operation = deactivateSS; user_sc = sups_str + 1; - } - else if ((sups_str[1] == '#') && (ISDIGIT(sups_str[2]))) { + } else if ((sups_str[1] == '#') && (ISDIGIT(sups_str[2]))) { DBG("[CISS-ENGINE] eraseSS"); ss_operation = eraseSS; user_sc = sups_str + 2; } - } - else if ((ss_str_len == 2) && (ISDIGIT(sups_str[0]) && ISDIGIT(sups_str[1]))) { + } else if ((ss_str_len == 2) && (ISDIGIT(sups_str[0]) && ISDIGIT(sups_str[1]))) { DBG("[CISS-ENGINE] processUnstructuredSS_Request"); ss_operation = processUnstructuredSS_Request; return ss_operation; - } - else if ((ss_str_len == 1) && (ISDIGIT(sups_str[0]))) { + } else if ((ss_str_len == 1) && (ISDIGIT(sups_str[0]))) { DBG("[CISS-ENGINE] processUnstructuredSS_Request"); ss_operation = processUnstructuredSS_Request; return ss_operation; - } - else if (sups_str[ss_str_len - 1] == '#') { + } else if (sups_str[ss_str_len - 1] == '#') { DBG("[CISS-ENGINE] processUnstructuredSS_Request"); ss_operation = processUnstructuredSS_Request; return ss_operation; @@ -192,7 +180,7 @@ static unsigned char __ciss_parse_mmi_string(ciss_mmi_context_t *mmi_ctx, int *e if (ss_operation != NULL_SS_OPERATION) { if (!__ciss_find_si_fields(user_sc, ss_code, sia, sib, sic)) { - if (strlen(ss_code)!= 0) { + if (strlen(ss_code) != 0) { if (!_ciss_convert_sc_to_tapi_flavor(ss_code, &tapi_flavor, &ss_type)) { ss_operation = NULL_SS_OPERATION; } else if (ss_type == CISS_SERVICE_BARRING) { @@ -220,12 +208,12 @@ static unsigned char __ciss_parse_mmi_string(ciss_mmi_context_t *mmi_ctx, int *e } if (ss_operation != NULL_SS_OPERATION) { - if ((ss_operation != registerPassword)&& - ((ss_type == CISS_SERVICE_FORWARDING)|| + if ((ss_operation != registerPassword) && + ((ss_type == CISS_SERVICE_FORWARDING) || (ss_type == CISS_SERVICE_BARRING))) { strncpy(bsg, sib, MAX_SIB_LEN); } else if (ss_type == CISS_SERVICE_WAITING) { - if ((sib[0] !=0) || (sic[0] != 0)) { + if ((sib[0] != 0) || (sic[0] != 0)) { ss_operation = NULL_SS_OPERATION; } else { strncpy(bsg, sia, MAX_SIA_LEN); @@ -288,12 +276,12 @@ static unsigned char __ciss_parse_mmi_string(ciss_mmi_context_t *mmi_ctx, int *e (ss_operation != registerPassword)) { if (ss_operation != interrogateSS) { if (strlen(sia) < 4) { - DBG("[CISS-ENGINE] Pwd Too Short : %d",strlen(sia)); + DBG("[CISS-ENGINE] Pwd Too Short : %d", strlen(sia)); ss_operation = NULL_SS_OPERATION; *error_code = CISS_ERR_CB_PWD_TOO_SORT; return ss_operation; } else if (strlen(sia) > 4) { - DBG("[CISS-ENGINE] Pwd Too long : %d",strlen(sia)); + DBG("[CISS-ENGINE] Pwd Too long : %d", strlen(sia)); ss_operation = NULL_SS_OPERATION; *error_code = CISS_ERR_CB_PWD_TOO_LONG; return ss_operation; @@ -310,18 +298,18 @@ static unsigned char __ciss_parse_mmi_string(ciss_mmi_context_t *mmi_ctx, int *e (strlen(sib) != 4) || (strlen(sic) != 4)) { DBG("[CISS-ENGINE] Pwd Length Incorrect : %d %d %d", strlen(sia), strlen(sib), strlen(sic)); - strncpy(mmi_ctx->ss_password,sia, CISS_MAX_PASSWORD_LEN); + strncpy(mmi_ctx->ss_password, sia, CISS_MAX_PASSWORD_LEN); mmi_ctx->ss_password[CISS_MAX_PASSWORD_LEN] = '\0'; - strncpy(mmi_ctx->ss_new_password,sib, CISS_MAX_PASSWORD_LEN); + strncpy(mmi_ctx->ss_new_password, sib, CISS_MAX_PASSWORD_LEN); mmi_ctx->ss_new_password[CISS_MAX_PASSWORD_LEN] = '\0'; - strncpy(mmi_ctx->ss_new_password2,sic, CISS_MAX_PASSWORD_LEN); + strncpy(mmi_ctx->ss_new_password2, sic, CISS_MAX_PASSWORD_LEN); mmi_ctx->ss_new_password2[CISS_MAX_PASSWORD_LEN] = '\0'; } else { - strncpy(mmi_ctx->ss_password,sia, CISS_MAX_PASSWORD_LEN); + strncpy(mmi_ctx->ss_password, sia, CISS_MAX_PASSWORD_LEN); mmi_ctx->ss_password[CISS_MAX_PASSWORD_LEN] = '\0'; - strncpy(mmi_ctx->ss_new_password,sib, CISS_MAX_PASSWORD_LEN); + strncpy(mmi_ctx->ss_new_password, sib, CISS_MAX_PASSWORD_LEN); mmi_ctx->ss_new_password[CISS_MAX_PASSWORD_LEN] = '\0'; - strncpy(mmi_ctx->ss_new_password2,sic, CISS_MAX_PASSWORD_LEN); + strncpy(mmi_ctx->ss_new_password2, sic, CISS_MAX_PASSWORD_LEN); mmi_ctx->ss_new_password2[CISS_MAX_PASSWORD_LEN] = '\0'; } } diff --git a/src/ciss-resp.c b/src/ciss-resp.c index 3341b99..02d0321 100644 --- a/src/ciss-resp.c +++ b/src/ciss-resp.c @@ -171,7 +171,7 @@ static void __ciss_create_cli_result_string(ciss_result_t *ciss_result /*out */, case TAPI_CALLING_LINE_IDENTITY_RESTRICTION: 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_TEMP_RESTRICTED ) { + if (ss_cli_info.Status == TAPI_CLI_STATUS_ACTIVATED || ss_cli_info.Status == TAPI_CLI_STATUS_TEMP_RESTRICTED) { ciss_result->szResult[0] = CISS_STATUS_ACTIVE; } else { ciss_result->szResult[0] = CISS_STATUS_NOTHING; @@ -241,7 +241,7 @@ static void __ciss_ui_mmi_create_cnap_result_string(ciss_result_t *result, char } break; case CISS_CALLING_LINE_IDENTITY_RESTRICTION: - if( vconf_get_int(VCONFKEY_TELEPHONY_SS_CLI_STATE, &cli_status) < 0 ) { + if (vconf_get_int(VCONFKEY_TELEPHONY_SS_CLI_STATE, &cli_status) < 0) { DBG("get_cli_status is failed (%d)", cli_status); } @@ -249,9 +249,9 @@ static void __ciss_ui_mmi_create_cnap_result_string(ciss_result_t *result, char case CISS_STATUS_ACTIVE: if ((ad->mmi_ctx.opcode == activateSS) || (ad->mmi_ctx.opcode == deactivateSS)) { strncpy(szResult, CISS_STR_MY_CALLER_ID_IS_NOT_SENT_WHEN_CALLING, CISS_USSD_DATA_SIZE_MAX - 1); - } else if(cli_status == VCONFKEY_TELEPHONY_SS_CLI_SHOW) { + } else if (cli_status == VCONFKEY_TELEPHONY_SS_CLI_SHOW) { strncpy(szResult, CISS_STR_CALLER_ID_DEFAULTS_TO_RESTRICTED_NEXT_CALL_C_NOT_RESTRICTED, CISS_USSD_DATA_SIZE_MAX - 1); - } else if(cli_status == VCONFKEY_TELEPHONY_SS_CLI_HIDE) { + } else if (cli_status == VCONFKEY_TELEPHONY_SS_CLI_HIDE) { strncpy(szResult, CISS_STR_CALLER_ID_DEFAULTS_TO_RESTRICTED_NEXT_CALL_C_RESTRICTED, CISS_USSD_DATA_SIZE_MAX - 1); } else { strncpy(szResult, CISS_STR_CALLER_ID_DEFAULTS_TO_RESTRICTED_NEXT_CALL_C_RESTRICTED, CISS_USSD_DATA_SIZE_MAX - 1); @@ -264,9 +264,9 @@ static void __ciss_ui_mmi_create_cnap_result_string(ciss_result_t *result, char default: if ((ad->mmi_ctx.opcode == activateSS) || (ad->mmi_ctx.opcode == deactivateSS)) { strncpy(szResult, CISS_STR_MY_CALLER_ID_WILL_BE_SENT_WHEN_CALLING, CISS_USSD_DATA_SIZE_MAX - 1); - } else if(cli_status == VCONFKEY_TELEPHONY_SS_CLI_SHOW) { + } else if (cli_status == VCONFKEY_TELEPHONY_SS_CLI_SHOW) { strncpy(szResult, CISS_STR_CALLER_ID_DEFAULTS_TO_NOT_RESTRICTED_NEXT_CALL_C_NOT_RESTRICTED, CISS_USSD_DATA_SIZE_MAX - 1); - } else if(cli_status == VCONFKEY_TELEPHONY_SS_CLI_HIDE) { + } else if (cli_status == VCONFKEY_TELEPHONY_SS_CLI_HIDE) { strncpy(szResult, CISS_STR_CALLER_ID_DEFAULTS_TO_NOT_RESTRICTED_NEXT_CALL_C_RESTRICTED, CISS_USSD_DATA_SIZE_MAX - 1); } else { strncpy(szResult, CISS_STR_CALLER_ID_DEFAULTS_TO_NOT_RESTRICTED_NEXT_CALL_C_NOT_RESTRICTED, CISS_USSD_DATA_SIZE_MAX - 1); @@ -428,7 +428,7 @@ static TelSsForwardResp_t* __ciss_tapi_handle_forward_cnf(ciss_result_t *ciss_re DBG("\n [CISS-ENGINE] this->ss_req_data.telecommSvc: %d\n, this->ss_req_data.action: %d \n", ciss_result->szBearer[0], ciss_result->szResult[0]); - out = g_new0( TelSsForwardResp_t, 1 ); + out = g_new0(TelSsForwardResp_t, 1); memcpy(out, tapi_data, sizeof(TelSsForwardResp_t)); return out; @@ -453,7 +453,7 @@ static TelSsBarringResp_t* __ciss_tapi_handle_barring_cnf(ciss_result_t *ciss_re _ciss_get_barring_flavor_type(ss_barring_info.record[0].Flavour, &(ciss_result->szFlavor)); __ciss_create_barring_result_string(ciss_result, ss_barring_info); - out = g_new0( TelSsBarringResp_t, 1 ); + out = g_new0(TelSsBarringResp_t, 1); memcpy(out, tapi_data, sizeof(TelSsBarringResp_t)); return out; @@ -476,7 +476,7 @@ static TelSsWaitingResp_t* __ciss_tapi_handle_waiting_cnf(ciss_result_t *ciss_re memset(ciss_result, 0, sizeof(ciss_result_t)); __ciss_create_waiting_result_string(ciss_result, ss_waiting_info); - out = g_new0( TelSsWaitingResp_t , 1 ); + out = g_new0(TelSsWaitingResp_t , 1); memcpy(out, tapi_data, sizeof(TelSsWaitingResp_t)); return out; @@ -501,7 +501,7 @@ static TelSsCliResp_t* __ciss_tapi_handle_call_id(ciss_result_t *ciss_result, vo __ciss_create_cli_result_string(ciss_result, ss_cli_info, ad); ciss_result->nRecordNum = 1; - out = g_new0( TelSsCliResp_t , 1 ); + out = g_new0(TelSsCliResp_t , 1); memcpy(out, tapi_data, sizeof(TelSsCliResp_t)); return out; @@ -548,8 +548,8 @@ static void __ciss_ssresp_view_quit_cb(void *data, Evas_Object *obj, void *event { ciss_appdata_t *ad = (ciss_appdata_t *)data; - if ( ad->tapi_data ) - g_free( ad->tapi_data ); + if (ad->tapi_data) + g_free(ad->tapi_data); ad->tapi_data = 0; @@ -598,8 +598,8 @@ Evas_Object *_ciss_create_ss_resp_view(Evas_Object *parent, void *tapi_data, voi return NULL; } - if ( old_data ) - g_free( old_data ); + if (old_data) + g_free(old_data); __ciss_create_ss_result_string(ss_result_string, &ciss_result, ad); @@ -637,23 +637,23 @@ Evas_Object *_ciss_create_ss_resp_view(Evas_Object *parent, void *tapi_data, voi navi_it = elm_naviframe_item_push(nf, CISS_STR_INFORMATION, NULL, NULL, genlist, NULL); - tb = elm_toolbar_add (nf); - elm_object_style_set (tb, "default"); - elm_toolbar_shrink_mode_set (tb, ELM_TOOLBAR_SHRINK_EXPAND); - elm_toolbar_transverse_expanded_set (tb, EINA_TRUE); - elm_toolbar_select_mode_set (tb, ELM_OBJECT_SELECT_MODE_DEFAULT); - tb_it = elm_toolbar_item_append (tb, NULL, CISS_STR_OK, + tb = elm_toolbar_add(nf); + elm_object_style_set(tb, "default"); + elm_toolbar_shrink_mode_set(tb, ELM_TOOLBAR_SHRINK_EXPAND); + elm_toolbar_transverse_expanded_set(tb, EINA_TRUE); + elm_toolbar_select_mode_set(tb, ELM_OBJECT_SELECT_MODE_DEFAULT); + tb_it = elm_toolbar_item_append(tb, NULL, CISS_STR_OK, __ciss_ssresp_view_quit_cb, ad); - if(tb_it == NULL) + if (tb_it == NULL) DBG("elm_toolbar_item_append returns NULL"); - elm_object_item_part_content_set (navi_it, "toolbar", tb); + elm_object_item_part_content_set(navi_it, "toolbar", tb); #else /* _CISS_HW_BACK_KEY */ l_button = elm_button_add(nf); evas_object_smart_callback_add(l_button, "clicked", __ciss_ssresp_view_quit_cb, NULL); navi_it = elm_naviframe_item_push(nf, CISS_STR_INFORMATION, l_button, NULL, genlist, NULL); - if(navi_it == NULL) + if (navi_it == NULL) DBG("elm_naviframe_item_push returns NULL"); elm_object_style_set(l_button, "naviframe/back_btn/default"); diff --git a/src/ciss-respnd.c b/src/ciss-respnd.c index 6dbfef7..df94207 100644 --- a/src/ciss-respnd.c +++ b/src/ciss-respnd.c @@ -384,7 +384,7 @@ void _ciss_create_respond_editfield_cb(void *data, Evas_Object *obj, void *event elm_entry_autocapital_type_set(entry, ELM_AUTOCAPITAL_TYPE_SENTENCE); elm_entry_input_panel_layout_set(entry, ELM_INPUT_PANEL_LAYOUT_NORMAL); elm_entry_input_panel_return_key_type_set(entry, ELM_INPUT_PANEL_RETURN_KEY_TYPE_DONE); - elm_entry_single_line_set (entry, EINA_TRUE); + elm_entry_single_line_set(entry, EINA_TRUE); elm_entry_scrollable_set(entry, EINA_TRUE); elm_entry_prediction_allow_set(entry, FALSE); diff --git a/src/ciss-tapi-request.c b/src/ciss-tapi-request.c index e1532b3..c216824 100644 --- a/src/ciss-tapi-request.c +++ b/src/ciss-tapi-request.c @@ -446,7 +446,7 @@ int _ciss_on_tapi_sat_ussd_event(void *tapi_data, void *data) 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); } ussd_info.Dcs = send_ussd_info.rawDcs; @@ -523,7 +523,7 @@ void __ciss_tapi_ss_information(TapiHandle *tapi_handle, const char *event_type, } /* create window */ - WARN("win=0x%p main=0x%p",ad->win_main, ad->layout_main); + WARN("win=0x%p main=0x%p", ad->win_main, ad->layout_main); if (ad->win_main == NULL) { Evas_Object *win; @@ -548,7 +548,7 @@ void __ciss_tapi_ss_information(TapiHandle *tapi_handle, const char *event_type, if (ad->layout_main == NULL) { ad->layout_main = _ciss_create_layout_main(ad->conformant); - ret_if(ad->layout_main== NULL); + ret_if(ad->layout_main == NULL); evas_object_show(ad->layout_main); } @@ -560,7 +560,7 @@ void __ciss_tapi_ss_information(TapiHandle *tapi_handle, const char *event_type, ciss_err_t ciss_err; - if( ss_information.SsType == TAPI_SS_TYPE_SEND_USSD ) { + if (ss_information.SsType == TAPI_SS_TYPE_SEND_USSD) { _ciss_create_error_popup(ad->layout_main, CISS_ERR_USSD_FAILED, 2.0, ad); } else { _ciss_get_error_from_tapi_error(&ciss_err, ss_information.Cause); @@ -683,7 +683,7 @@ static void __ciss_tapi_ss_resp_handle(int result, void *tapi_data, void *data) app_ret_info.appsRet.sendSs.resp = TAPI_SAT_R_SUCCESS; app_ret_info.appsRet.sendSs.ssCause = TAPI_SS_SUCCESS; app_ret_info.appsRet.sendSs.meProblem = TAPI_SAT_ME_PROBLEM_NO_SPECIFIC_CAUSE; - if (ad->sat_terminal_response.rel_comp_msg_length >0) { + 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); @@ -706,7 +706,7 @@ static void __ciss_tapi_ss_resp_handle(int result, void *tapi_data, void *data) /* create window */ Evas_Object *content; - DBG("win=0x%p main=0x%p",ad->win_main, ad->layout_main); + DBG("win=0x%p main=0x%p", ad->win_main, ad->layout_main); if (ad->win_main == NULL) { Evas_Object *win; @@ -730,7 +730,7 @@ static void __ciss_tapi_ss_resp_handle(int result, void *tapi_data, void *data) if (ad->layout_main == NULL) { ad->layout_main = _ciss_create_layout_main(ad->conformant); - ret_if(ad->layout_main== NULL); + ret_if(ad->layout_main == NULL); evas_object_show(ad->layout_main); } @@ -740,7 +740,7 @@ static void __ciss_tapi_ss_resp_handle(int result, void *tapi_data, void *data) ad->indicator_bg = _ciss_create_indicator_bg(ad->conformant); } - if (result == TAPI_SS_SUCCESS) { + if (result == TAPI_SS_SUCCESS) { if (ad->is_sat_request == EINA_FALSE) { DBG("win=0x%p main=0x%p", ad->win_main, ad->layout_main); @@ -821,7 +821,7 @@ void _ciss_tapi_ussd_resp_handle(int result, void *tapi_data, void *data) app_ret_info.appsRet.sendUssd.ssCause = TAPI_SS_SUCCESS; app_ret_info.appsRet.sendUssd.meProblem = TAPI_SAT_ME_PROBLEM_NO_SPECIFIC_CAUSE; app_ret_info.appsRet.sendUssd.ussdString.stringLen = ussd_info.Length; - if (ad->sat_terminal_response.rel_comp_msg_length >0) { + 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); @@ -840,7 +840,7 @@ void _ciss_tapi_ussd_resp_handle(int result, void *tapi_data, void *data) ad->is_sat_request = EINA_FALSE; } - if( ad->mmi_ctx.ussd_type == TAPI_SS_USSD_TYPE_USER_REL ) { + if (ad->mmi_ctx.ussd_type == TAPI_SS_USSD_TYPE_USER_REL) { DBG("TAPI_SS_USSD_TYPE_USER_REL"); return; } @@ -869,7 +869,7 @@ void _ciss_tapi_ussd_resp_handle(int result, void *tapi_data, void *data) if (ad->layout_main == NULL) { ad->layout_main = _ciss_create_layout_main(ad->conformant); - ret_if(ad->layout_main== NULL); + ret_if(ad->layout_main == NULL); evas_object_show(ad->layout_main); } @@ -893,7 +893,7 @@ void _ciss_tapi_ussd_resp_handle(int result, void *tapi_data, void *data) _ciss_create_error_popup(ad->layout_main, ciss_err, 2.0, ad); } - _ciss_util_feedback(); + _ciss_util_feedback(); _ciss_util_lcd_on(); DBG("Leave"); @@ -908,11 +908,11 @@ void _ciss_tapi_event_clean(ciss_appdata_t *ad) ussd.Type = TAPI_SS_USSD_TYPE_USER_REL; - if ( ad->resp_ss_type == CISS_SERVICE_USSD ) { + if (ad->resp_ss_type == CISS_SERVICE_USSD) { tel_send_ss_ussd_request(ad->tapi_handle, &ussd, __ciss_deregister_tel_event, 0); } else { - __ciss_deregister_tel_event(ad->tapi_handle, 0, 0, 0 ); + __ciss_deregister_tel_event(ad->tapi_handle, 0, 0, 0); } } @@ -1024,10 +1024,10 @@ void _ciss_tapi_disable_lpm_mode(TapiHandle *handle) DBG("Leave"); } -bool _ciss_tapi_get_network_status(TapiHandle *handle,TelNetworkServiceLevel_t *status) +bool _ciss_tapi_get_network_status(TapiHandle *handle, TelNetworkServiceLevel_t *status) { int cs_status = TAPI_NETWORK_SERVICE_LEVEL_NO; - int ret = tel_get_property_int( handle, TAPI_PROP_NETWORK_CIRCUIT_STATUS, &cs_status ); + int ret = tel_get_property_int(handle, TAPI_PROP_NETWORK_CIRCUIT_STATUS, &cs_status); if (ret != TAPI_API_SUCCESS) { DBG("tel_get_property_int failed"); return false; diff --git a/src/ciss-ussd.c b/src/ciss-ussd.c index 811c35c..66d9036 100644 --- a/src/ciss-ussd.c +++ b/src/ciss-ussd.c @@ -25,7 +25,7 @@ static int __ciss_get_ussd_string(char *ss_result_string, int length, char *szString) { DBG("Enter"); - retv_if(ss_result_string==NULL, -1); + retv_if(ss_result_string == NULL, -1); char *ptr = NULL; char *temp_ptr = NULL; @@ -55,7 +55,7 @@ void _ciss_ussd_quit_cb(void *data, Evas_Object *obj, void *event_info) Ecore_IMF_Context *imf_context; memset(ad->c_item, 0, sizeof(ad->c_item)); - if( ad->ussd_action_require == TRUE ) { + if (ad->ussd_action_require == TRUE) { imf_context = elm_entry_imf_context_get(ad->ef_entry); if (imf_context) { ecore_imf_context_input_panel_event_callback_del(imf_context, ECORE_IMF_INPUT_PANEL_STATE_EVENT, _ciss_input_panel_event_callback); @@ -114,7 +114,7 @@ Evas_Object *_ciss_create_ussd_view(Evas_Object *parent, void *tapi_data, void * memcpy(&ussd_resp_info, tapi_data, sizeof(TelSsUssdResp_t)); ussd_record.ind_type = ussd_resp_info.Status; - if(strcmp(ussd_resp_info.szString, "") != 0) { + if (strcmp(ussd_resp_info.szString, "") != 0) { ussd_record.ussd_string_length = ussd_resp_info.Length; memcpy(&ussd_record.ussd_string, &ussd_resp_info.szString, CISS_USSD_DATA_SIZE_MAX); } else { @@ -124,7 +124,7 @@ Evas_Object *_ciss_create_ussd_view(Evas_Object *parent, void *tapi_data, void * } Evas_Object *nf = elm_naviframe_add(parent); - if(nf == NULL) { + if (nf == NULL) { DBG("Fail to Naviframe add"); return NULL; } @@ -167,8 +167,7 @@ Evas_Object *_ciss_create_ussd_view(Evas_Object *parent, void *tapi_data, void * navi_it = elm_naviframe_item_push(nf, NULL, NULL, NULL, main_ly, "empty"); elm_naviframe_item_pop_cb_set(navi_it, __ciss_navi_it_pop_cb, ad); - } - else { + } else { eext_object_event_callback_add(nf, EEXT_CALLBACK_BACK, _ciss_ussd_quit_cb, ad); elm_naviframe_item_push(nf, NULL, NULL, NULL, main_ly, "empty"); } @@ -215,8 +214,7 @@ Evas_Object *_ciss_create_ussd_view(Evas_Object *parent, void *tapi_data, void * navi_it = elm_naviframe_item_push(nf, CISS_STR_INFORMATION, NULL, btn, box, NULL); elm_naviframe_item_pop_cb_set(navi_it, __ciss_navi_it_pop_cb, ad); - } - else { + } else { eext_object_event_callback_add(nf, EEXT_CALLBACK_BACK, _ciss_ussd_quit_cb, ad); elm_naviframe_item_push(nf, CISS_STR_INFORMATION, NULL, NULL, box, NULL); } diff --git a/src/ciss-util.c b/src/ciss-util.c index 79052e0..35eb6c5 100644 --- a/src/ciss-util.c +++ b/src/ciss-util.c @@ -183,10 +183,9 @@ bool _ciss_util_is_salescode(const char* input_str) } DBG("value : %s", value); - if (!g_strcmp0(value, input_str)){ + if (!g_strcmp0(value, input_str)) { result = true; - } - else { + } else { result = false; } @@ -229,7 +228,7 @@ void _ciss_util_lcd_on(void) int result = -1; result = device_display_change_state(DISPLAY_STATE_NORMAL); - if (result != 0 ) + if (result != 0) ERR("error LCD on : %d", result); } diff --git a/src/ciss-widget.c b/src/ciss-widget.c index c8c4c5f..1657ccc 100644 --- a/src/ciss-widget.c +++ b/src/ciss-widget.c @@ -97,7 +97,7 @@ Evas_Object *_ciss_create_popup(Evas_Object *parent, char *msg) elm_layout_theme_set(layout, "layout", "popup", "toast/circle"); //elm_object_part_text_set(layout, "elm.text.title", CISS_STR_INFORMATION); //elm_object_part_text_set(layout, "elm.text", gettext(msg)); - elm_object_text_set(layout,gettext(msg)); + elm_object_text_set(layout, gettext(msg)); elm_object_content_set(popup, layout); #else elm_object_domain_translatable_part_text_set(popup, "title,text", CISS_PACKAGE, "IDS_COM_BODY_INFORMATION"); @@ -146,7 +146,7 @@ static Eina_Bool __ciss_flight_mode_timer_cb(void *data) ecore_timer_del(ad->timer); ad->timer = NULL; } - ad->popup = _ciss_create_lpm_mode_popup(ad->layout_main,ad); + ad->popup = _ciss_create_lpm_mode_popup(ad->layout_main, ad); elm_object_focus_allow_set(ad->popup, EINA_TRUE); elm_object_focus_set(ad->popup, EINA_TRUE); } @@ -208,20 +208,20 @@ int _ciss_get_modem_auto_always_on() return result; } -static void __ciss_lpm_mode_svc_type_cb (keynode_t *key, void *data) +static void __ciss_lpm_mode_svc_type_cb(keynode_t *key, void *data) { int svc_type = 0; ciss_appdata_t *ad = (ciss_appdata_t *)data; svc_type = vconf_keynode_get_int(key); - DBG("svc_type(%d)",svc_type); + DBG("svc_type(%d)", svc_type); if (svc_type == VCONFKEY_TELEPHONY_SVCTYPE_2G || svc_type == VCONFKEY_TELEPHONY_SVCTYPE_2_5G || svc_type == VCONFKEY_TELEPHONY_SVCTYPE_2_5G_EDGE || svc_type == VCONFKEY_TELEPHONY_SVCTYPE_3G || svc_type == VCONFKEY_TELEPHONY_SVCTYPE_HSDPA || svc_type == VCONFKEY_TELEPHONY_SVCTYPE_LTE || svc_type == VCONFKEY_TELEPHONY_SVCTYPE_EMERGENCY) { - DBG("svc_type(%d)",svc_type); + DBG("svc_type(%d)", svc_type); if (ad->popup) { evas_object_del(ad->popup); ad->popup = NULL; @@ -259,37 +259,37 @@ static Eina_Bool __ciss_lpm_mode_disabled_check_timer_cb(void *data) } TelNetworkServiceLevel_t cs_status = TAPI_NETWORK_SERVICE_LEVEL_NO; - bool ret = _ciss_tapi_get_network_status(ad->tapi_handle,&cs_status); + bool ret = _ciss_tapi_get_network_status(ad->tapi_handle, &cs_status); if (!ret) DBG("failed to get current network status"); DBG("cs_status : %d (count : %d)", cs_status, timer_count); switch (cs_status) { - case TAPI_NETWORK_SERVICE_LEVEL_NO: //0 - { - timer_count++; - if (timer_count < TAPI_LEVEL_CHECK_COUNT) { - return ECORE_CALLBACK_RENEW; - } else { - if (ad->popup) { - evas_object_del(ad->popup); - ad->popup = NULL; - } - - _ciss_create_error_popup(ad->layout_main, CISS_ERR_TIMER_EXPIRE, 2.0, ad); - - goto return_end; + case TAPI_NETWORK_SERVICE_LEVEL_NO: //0 + { + timer_count++; + if (timer_count < TAPI_LEVEL_CHECK_COUNT) { + return ECORE_CALLBACK_RENEW; + } else { + if (ad->popup) { + evas_object_del(ad->popup); + ad->popup = NULL; } + + _ciss_create_error_popup(ad->layout_main, CISS_ERR_TIMER_EXPIRE, 2.0, ad); + + goto return_end; } - break; - case TAPI_NETWORK_SERVICE_LEVEL_EMERGENCY: //1 - case TAPI_NETWORK_SERVICE_LEVEL_SEARCH: //3 - case TAPI_NETWORK_SERVICE_LEVEL_FULL: //2 - { - DBG("FULL service available"); - } - break; + } + break; + case TAPI_NETWORK_SERVICE_LEVEL_EMERGENCY: //1 + case TAPI_NETWORK_SERVICE_LEVEL_SEARCH: //3 + case TAPI_NETWORK_SERVICE_LEVEL_FULL: //2 + { + DBG("FULL service available"); + } + break; } if (ad->popup) { @@ -322,13 +322,13 @@ return_end: static bool __ciss_disable_lpm_mode_to_dial(void *data) { - retv_if(data==NULL, false); + retv_if(data == NULL, false); Evas_Object *popup; ciss_appdata_t *ad = (ciss_appdata_t *)data; _ciss_tapi_disable_lpm_mode(ad->tapi_handle); - if(ad->popup) { + if (ad->popup) { evas_object_del(ad->popup); ad->popup = NULL; } @@ -336,7 +336,7 @@ static bool __ciss_disable_lpm_mode_to_dial(void *data) popup = _ciss_create_noti_popup(ad->layout_main, "IDS_CST_POP_REQUESTING_ING", NULL, POPUP_DISPLAY_DURATION, ad); ad->popup = popup; - if(ad->timer) { + if (ad->timer) { ecore_timer_del(ad->timer); ad->timer = NULL; } @@ -362,7 +362,7 @@ static Eina_Bool __ciss_flight_mode_enabled_check_timer_cb(void *data) /* check if call network is enabled - to send message l*/ - if( vconf_get_int(VCONFKEY_TELEPHONY_SVCTYPE, &network_status) < 0 ) { + if (vconf_get_int(VCONFKEY_TELEPHONY_SVCTYPE, &network_status) < 0) { DBG("get_network_status is failed (%d)", network_status); return ECORE_CALLBACK_RENEW; @@ -407,7 +407,7 @@ return_end: void __ciss_flight_mode_popup_ok_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info) { DBG("Enter"); - ret_if(data==NULL); + ret_if(data == NULL); ciss_appdata_t *ad = (ciss_appdata_t *)data; Evas_Object *popup = NULL; int lpm_mode = -1; @@ -419,7 +419,7 @@ void __ciss_flight_mode_popup_ok_btn_clicked_cb(void *data, Evas_Object *obj, vo return; } - if(ad->popup) { + if (ad->popup) { evas_object_del(ad->popup); ad->popup = NULL; } @@ -427,7 +427,7 @@ void __ciss_flight_mode_popup_ok_btn_clicked_cb(void *data, Evas_Object *obj, vo popup = _ciss_create_noti_popup(ad->layout_main, "IDS_CST_POP_REQUESTING_ING", NULL, POPUP_DISPLAY_DURATION, ad); ad->popup = popup; - if(ad->timer) { + if (ad->timer) { ecore_timer_del(ad->timer); ad->timer = NULL; } @@ -444,7 +444,7 @@ static void __ciss_popup_hide_cb(void *data, Evas_Object *obj, void *event_info) if (!ad) { return; } - if(!ad->popup) { + if (!ad->popup) { return; } @@ -472,20 +472,20 @@ Evas_Object *_ciss_create_2_btn_popup(Evas_Object *parent, const char *strmsg, E layout = elm_layout_add(popup); elm_layout_theme_set(layout, "layout", "popup", "content/circle/buttons2"); - left_btn = elm_button_add (popup); - elm_object_style_set (left_btn, "popup/circle/left"); - elm_object_part_content_set (popup, "button1", left_btn); - evas_object_smart_callback_add (left_btn, "clicked", func1, ad); + left_btn = elm_button_add(popup); + elm_object_style_set(left_btn, "popup/circle/left"); + elm_object_part_content_set(popup, "button1", left_btn); + evas_object_smart_callback_add(left_btn, "clicked", func1, ad); icon = elm_image_add(left_btn); elm_image_file_set(icon, PATH_EDJ, IMG_POPUP_CANCEL_BTN); evas_object_size_hint_weight_set(icon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); elm_object_part_content_set(left_btn, "elm.swallow.content", icon); - right_btn = elm_button_add (popup); - elm_object_style_set (right_btn, "popup/circle/right"); - elm_object_part_content_set (popup, "button2", right_btn); - evas_object_smart_callback_add (right_btn, "clicked", func2, ad); + right_btn = elm_button_add(popup); + elm_object_style_set(right_btn, "popup/circle/right"); + elm_object_part_content_set(popup, "button2", right_btn); + evas_object_smart_callback_add(right_btn, "clicked", func2, ad); icon = elm_image_add(right_btn); elm_image_file_set(icon, PATH_EDJ, IMG_POPUP_OK_BTN); @@ -502,17 +502,17 @@ Evas_Object *_ciss_create_2_btn_popup(Evas_Object *parent, const char *strmsg, E evas_object_show(popup); #else - left_btn = elm_button_add (popup); - elm_object_style_set (left_btn, CISS_POPUP_BTN); + left_btn = elm_button_add(popup); + elm_object_style_set(left_btn, CISS_POPUP_BTN); elm_object_domain_translatable_text_set(left_btn, CISS_PACKAGE, CISS_STR_CANCEL); - elm_object_part_content_set (popup, "button1", left_btn); - evas_object_smart_callback_add (left_btn, "clicked", func1, ad); + elm_object_part_content_set(popup, "button1", left_btn); + evas_object_smart_callback_add(left_btn, "clicked", func1, ad); - right_btn = elm_button_add (popup); - elm_object_style_set (right_btn, CISS_POPUP_BTN); - elm_object_domain_translatable_text_set (right_btn, CISS_PACKAGE, CISS_STR_OK); - elm_object_part_content_set (popup, "button2", right_btn); - evas_object_smart_callback_add (right_btn, "clicked", func2, ad); + right_btn = elm_button_add(popup); + elm_object_style_set(right_btn, CISS_POPUP_BTN); + elm_object_domain_translatable_text_set(right_btn, CISS_PACKAGE, CISS_STR_OK); + elm_object_part_content_set(popup, "button2", right_btn); + evas_object_smart_callback_add(right_btn, "clicked", func2, ad); elm_object_domain_translatable_part_text_set(popup, "title,text", CISS_PACKAGE, CISS_STR_INFORMATION); elm_object_translatable_text_set(popup, strmsg); @@ -540,11 +540,11 @@ Evas_Object *_ciss_create_flight_mode_popup(Evas_Object *parent, void *data) void __ciss_lpm_mode_popup_ok_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info) { DBG("Enter"); - ret_if(data==NULL); + ret_if(data == NULL); ciss_appdata_t *ad = (ciss_appdata_t *)data; Evas_Object *popup = NULL; - if(ad->popup) { + if (ad->popup) { evas_object_del(ad->popup); ad->popup = NULL; } @@ -564,11 +564,11 @@ void __ciss_lpm_mode_popup_ok_btn_clicked_cb(void *data, Evas_Object *obj, void Evas_Object *_ciss_create_lpm_mode_popup(Evas_Object *parent, void *data) { DBG("Enter"); - retv_if(data==NULL, NULL); + retv_if(data == NULL, NULL); Evas_Object *popup; ciss_appdata_t *ad = (ciss_appdata_t *)data; - if(ad->popup) { + if (ad->popup) { evas_object_del(ad->popup); ad->popup = NULL; } @@ -582,7 +582,7 @@ Evas_Object *_ciss_create_lpm_mode_popup(Evas_Object *parent, void *data) Evas_Object *_ciss_create_error_popup(Evas_Object *parent, ciss_err_t ciss_error, double t_timeout, void *data) { DBG("Enter"); - retv_if(data==NULL, NULL); + retv_if(data == NULL, NULL); Evas_Object *popup; Evas_Object *btn; @@ -685,11 +685,11 @@ Evas_Object *_ciss_create_error_popup(Evas_Object *parent, ciss_err_t ciss_error elm_object_text_set(btn, CISS_STR_OK); #else /* _CISS_WEARABLE_CIRCLE_UI */ - btn = elm_button_add (popup); - elm_object_style_set (btn, CISS_POPUP_BTN); - elm_object_domain_translatable_text_set (btn, CISS_PACKAGE, CISS_STR_OK); - elm_object_part_content_set (popup, "button1", btn); - evas_object_smart_callback_add (btn, "clicked", __ciss_err_cb, ad); + btn = elm_button_add(popup); + elm_object_style_set(btn, CISS_POPUP_BTN); + elm_object_domain_translatable_text_set(btn, CISS_PACKAGE, CISS_STR_OK); + elm_object_part_content_set(popup, "button1", btn); + evas_object_smart_callback_add(btn, "clicked", __ciss_err_cb, ad); elm_object_domain_translatable_part_text_set(popup, "title,text", CISS_PACKAGE, CISS_STR_INFORMATION); elm_object_translatable_text_set(popup, strmsg); @@ -718,7 +718,7 @@ Evas_Object *_ciss_create_noti_popup(Evas_Object *parent, char *strtitle, char * elm_object_style_set(popup, "circle"); progressbar = elm_progressbar_add(popup); - elm_object_style_set(progressbar, "process"); + elm_object_style_set(progressbar, "process"); elm_progressbar_horizontal_set(progressbar, EINA_TRUE); evas_object_size_hint_align_set(progressbar, EVAS_HINT_FILL, EVAS_HINT_FILL); evas_object_size_hint_weight_set(progressbar, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); @@ -1027,12 +1027,12 @@ static Evas_Object *__ciss_create_toolbar_btn(Evas_Object *parent, const char *t Evas_Object *_ciss_create_1_items_toolbar(ciss_appdata_t *ad, const char *label, Evas_Smart_Cb func) { - retv_if(ad==NULL, NULL); + retv_if(ad == NULL, NULL); Evas_Object *obj; /* create toolbar */ obj = elm_toolbar_add(ad->nf); - if(obj == NULL) return NULL; + if (obj == NULL) return NULL; elm_object_style_set(obj, "default"); elm_toolbar_shrink_mode_set(obj, ELM_TOOLBAR_SHRINK_EXPAND); elm_toolbar_transverse_expanded_set(obj, EINA_TRUE); @@ -1045,12 +1045,12 @@ Evas_Object *_ciss_create_1_items_toolbar(ciss_appdata_t *ad, const char *label, Evas_Object *_ciss_create_2_items_toolbar(ciss_appdata_t *ad, const char *label1, Evas_Smart_Cb func1, const char *label2, Evas_Smart_Cb func2) { - retv_if(ad==NULL, NULL); + retv_if(ad == NULL, NULL); Evas_Object *obj; /* create toolbar */ obj = elm_toolbar_add(ad->nf); - if(obj == NULL) return NULL; + if (obj == NULL) return NULL; elm_object_style_set(obj, "default"); elm_toolbar_shrink_mode_set(obj, ELM_TOOLBAR_SHRINK_EXPAND); elm_toolbar_transverse_expanded_set(obj, EINA_TRUE); @@ -1253,8 +1253,7 @@ void _ciss_create_genlist_separator_no_line(Evas_Object *genlist, void *data) ad->itc_seperator_no_line->func.content_get = NULL; ad->itc_seperator_no_line->func.state_get = NULL; ad->itc_seperator_no_line->func.del = NULL; - } - else { + } else { WARN("ad->itc_seperator_no_line is NULL"); } @@ -1280,8 +1279,7 @@ void _ciss_create_genlist_underline(Evas_Object *genlist, void *data) ad->itc_underline->func.content_get = NULL; ad->itc_underline->func.state_get = NULL; ad->itc_underline->func.del = NULL; - } - else { + } else { WARN("ad->itc_underline is NULL"); } |