diff options
Diffstat (limited to 'include/pwlock.h')
-rwxr-xr-x | include/pwlock.h | 164 |
1 files changed, 164 insertions, 0 deletions
diff --git a/include/pwlock.h b/include/pwlock.h new file mode 100755 index 0000000..5af79c0 --- /dev/null +++ b/include/pwlock.h @@ -0,0 +1,164 @@ +/* + * 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://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#ifndef __PWLOCK_H__ +#define __PWLOCK_H__ + +#include <Elementary.h> +#include <glib.h> +#include <aul.h> +#include <openssl/sha.h> +#include <sysman.h> + +#include "tapi.h" +#include "ui-gadget.h" + +#if !defined(PACKAGE) +#define PACKAGE "org.tizen.pwlock" +#endif + +#if !defined(LOCALEDIR) +#define LOCALEDIR "/usr/apps/org.tizen.pwlock/res/locale" +#endif + +#if !defined(EDJDIR) +#define EDJDIR "/usr/apps/"PACKAGE"/res/edje" +#endif + +#if !defined(IMAGEDIR) +#define IMAGEDIR "/usr/apps/"PACKAGE"/res/images" +#endif + +#define EDJFILE EDJDIR"/"PACKAGE".edj" + +typedef enum _BUTTON_STATE { + BUTTON_STATE_NONE = 0, + BUTTON_STATE_NEXT_CLICKED = 1, + BUTTON_STATE_PREV_CLICKED = 2 +} BUTTON_STATE; + +struct appdata { + Evas_Object *win; + + Evas_Object *layout_main; + Evas_Object *layout_contents; + Evas_Object *layout_entry; + Evas_Object *layout_second_entry; + + Evas_Object *elm_bg; + Evas_Object *elm_navigation_frame; + Evas_Object *elm_button_dial; + Evas_Object *elm_button_done; + Evas_Object *elm_conform; + + int ui_type; + int previous_ui_type; + + int state; + TelSimLockType_t sub_state; /* for lock sub state */ + Ecore_Idler *idler; + + int is_first_boot; /* for checking first boot */ + int is_exec_after_bootup; /* for calling pwlock from other module */ + int is_no_sim; + int retry_cnt; + + int alpha_window_status; /* for alpha */ + int date_and_time_settings_loaded; + int language_settings_loaded; /* check the language ug first loaded or not */ + int lock_view_loaded; /* check the lock view loaded for sim card changed */ + int lock_app_launched; + + char *entry_str; + char *pin_str; /* only for new pin */ + char *msg; + Ecore_Timer *pTimerId; /* for vconf timer id */ + int pin_changed; + enum sim_stat sim_status; + struct tapi *t; + ui_gadget_h dialer_ug; + ui_gadget_h language_ug; + ui_gadget_h connection_ug; + ui_gadget_h date_ug; + ui_gadget_h current_ug; + Evas_Object *time_ug_layout; + Evas_Object *wifi_ug_layout; + int kill_ug; /* If 1 killed by "previous", else killed by "next" button */ + int date_and_time_previous; + int cancel_setup; /* 1 means not show setup wizard,0 means show */ + Evas_Object *popup; + Evas_Object *waiting_popup; + int win_type; /* it is set if pwlock is set to ECORE_X_WINDOW_TYPE_NOTIFICATION */ + int tapi_smc_sid; /* it is tapi resgistered sid for smc lab test */ + + BUTTON_STATE btn_evt_state; +}; + +enum { + STR_E_PW, /* 0 */ + STR_E_PIN, + STR_E_NEW, + STR_R_PIN, + STR_E_PUK, + STR_I_PUN, /* 5 */ + STR_I_PUK, + STR_A_LEFT, + STR_DONE, + STR_DIAL, + STR_W_PW, /* 10 */ + STR_N_MAT, + STR_LANG, + STR_SET, + STR_CANCEL, + STR_ERR_SIMLANG, /* 15 */ + STR_ERR_UNSUPP, + STR_BLOCK, + STR_SIM_LOCK, + STR_NETWORK_LOCK_NCK, + STR_NETWORK_LOCK_NSCK, /* 20 */ + STR_NETWORK_LOCK_SPCK, + STR_NETWORK_LOCK_CCK, + STR_PW_LENGTH, /* 23 */ +}; + +enum { + _ST_FIRST, + _ST_TAPI_INIT, + _ST_SIM, + _ST_SIM_PINCNF, + _ST_SIM_PUKCNF, + _ST_SIM_LOCKCNF, + _ST_NETWORK_LOCKCNF, + _ST_EXIT, + _ST_LANG, + _ST_NOSIM, + _ST_TIME, + _ST_GREETING, + _ST_CONNECTION, + _ST_TUTORIAL, + _ST_FINISH, + _ST_MAX, +}; + +extern const char *strtbl[]; +void set_win_prop(struct appdata *ad, int type); +void do_state(struct appdata *ad); +void do_state_directly(int state, void *data); + +#endif /* __PWLOCK_H__ */ |