diff options
Diffstat (limited to 'include/util.h')
-rwxr-xr-x | include/util.h | 79 |
1 files changed, 43 insertions, 36 deletions
diff --git a/include/util.h b/include/util.h index 0700d02..3f30ab1 100755 --- a/include/util.h +++ b/include/util.h @@ -1,19 +1,21 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.0 (the License); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.tizenopensource.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - + * pwlock + * + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.tizenopensource.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ #ifndef __PWLOCK_UTIL_H__ #define __PWLOCK_UTIL_H__ @@ -30,6 +32,7 @@ #define ENABLE_LOG_SYSTEM +void pwlock_log(char *fmt, ...); void pwlock_log_t(char *fmt, ...); #ifdef ENABLE_LOG_SYSTEM @@ -50,14 +53,22 @@ void pwlock_log_t(char *fmt, ...); #define _DBG(...) #endif +#define PWLOCK_MEMFREE(ptr) \ + do { \ + if (ptr != NULL) { \ + free(ptr); \ + ptr = NULL; \ + } \ + } while(0); + enum { - IDS_COM_SK_SET = 0, - IDS_COM_SK_DONE, + IDS_COM_SK_DONE = 0, IDS_COM_BODY_ENTER_PASSWORD, IDS_COM_BODY_PREVIOUS, IDS_COM_SK_NEXT, IDS_COM_SK_OK, IDS_COM_SK_CANCEL, + IDS_COM_SK_START, IDS_PWLOCK_SYSTEM_STRING_MAX, }; @@ -65,7 +76,6 @@ enum { enum { IDS_IDLE_BODY_AUTOMATIC = IDS_PWLOCK_SYSTEM_STRING_MAX, IDS_IDLE_HEADER_NETWORK_LOCK, - IDS_IDLE_HEADER_PHONE_LOCK, IDS_IDLE_HEADER_PIN_LOCK, IDS_IDLE_HEADER_PUK_LOCK, IDS_IDLE_HEADER_SIM_BLOCKED, @@ -77,38 +87,33 @@ enum { IDS_IDLE_BODY_ENTER_PUK, IDS_IDLE_BODY_INCORRECT_PIN, IDS_IDLE_BODY_INCORRECT_PIN_TRY_AGAIN, - IDS_IDLE_BODY_INCORRECT_PUK, - IDS_IDLE_BODY_LANGUAGE_NOT_SUPPORTED, IDS_IDLE_BODY_NETWORK_PERSONALISATION_ON_ENTER_CONTROL_KEY, IDS_IDLE_BODY_NETWORK_SUBSET_PERSONALISATION_ON_ENTER_CONTROL_KEY, - IDS_IDLE_BODY_PASSWORD_MUST_BE_4_DIGITS_LONG, IDS_IDLE_BODY_PD_ATTEMPTS_LEFT, IDS_IDLE_BODY_SERVICE_PROVIDER_PERSONALISATION_ON_ENTER_CONTROL_KEY, IDS_IDLE_BODY_SIM_CARD_NOT_AVAILABLE_CONTACT_YOUR_SERVICE_PROVIDER, - IDS_IDLE_BODY_UNABLE_TO_READ_SIM_CARD_LANGUAGE, IDS_IDLE_BODY_WRONG_PASSWORD, - IDS_IDLE_BUTTON_CANCEL, IDS_IDLE_BUTTON_DIALER, IDS_IDLE_HEADER_DISPLAY_LANGUAGE, IDS_IDLE_BODY_DO_YOU_WANT_TO_SKIP_SETUPWIZARD, IDS_IDLE_BODY_PASSWORD_EMPTY, IDS_IDLE_BODY_PD_TO_PD_DIGITS_REQUIRED, - IDS_IDLE_BODY_NEW_PIN, - IDS_IDLE_BODY_PIN, - IDS_IDLE_BODY_PUK, - IDS_IDLE_POP_PIN_BLOCKED, - IDS_IDLE_POP_PIN_UNBLOCKED, - IDS_IDLE_BODY_CONFIRM_NEW_PIN, - IDS_IDLE_POP_INCORRECT_PIN_1_ATTEMPT_LEFT, - IDS_IDLE_POP_INCORRECT_PIN_PD_ATTEMPTS_LEFT, - IDS_IDLE_BODY_PD_TO_PD_DIGITS_OR_LETTERS_REQUIRED, IDS_IDLE_POP_PASSWORDS_NOT_MATCH, IDS_IDLE_POP_PIN_CHANGED, IDS_IDLE_POP_SIM_CARD_ERROR, - IDS_IDLE_BODY_TRY_LATER, - IDS_IDLE_BODY_INPUT_PASSWORD_AFTER_THIRTYSECONDS, - IDS_IDLE_BODY_CHECKING_SIM_STATUS, - + IDS_IDLE_POP_CHECKING_SIM_CARD_ING, + IDS_IDLE_BODY_GREETING_WELCOME, + IDS_SCM_BODY_WELCOME_E, + IDS_STU_BODY_SELECT_LANGUAGE, + IDS_ST_SK_EMERGENCY_CALL, + IDS_ST_BODY_TAP_TO_SET_UP, + IDS_IDLE_SK_SKIP, + IDS_ST_BODY_INSTALTAB_FINISH, + IDS_STU_BODY_DEVICE_IS_SET_UP_AND_READY_TO_USE, + IDS_STU_POP_SETUP_COMPLETE, + IDS_IDLE_HEADER_NOSIM, + IDS_STU_BODY_HOW_TO_INSERT_SIM_CARD_HELP_MSG, + IDS_ST_BUTTON_TRY_AGAIN_ABB, IDS_PWLOCK_APP_STRING_MAX, }; @@ -116,4 +121,6 @@ char *pwlock_get_string(int id); Evas_Object *create_win(const char *name); Evas_Object *load_edj(Evas_Object * parent, const char *file, const char *group); +int pwlock_get_model_number(char *buf, int max_size); +void pwlock_tolower(char *src, char *dest); #endif /* __PWLOCK_UTIL_H__ */ |