summaryrefslogtreecommitdiff
path: root/include/pwlock.h
blob: 8723156af7675f609e90cc21cda9350b5171c4df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
/*
  * 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_H__
#define __PWLOCK_H__

#include <Elementary.h>
#include <glib.h>
#include <aul.h>
#include <openssl/sha.h>
#include <sysman.h>

#include "tapi.h"

#if !defined(PACKAGE)
#define PACKAGE "org.tizen.pwlock"
#endif

#if !defined(LOCALEDIR)
#define LOCALEDIR "/opt/apps/org.tizen.pwlock/res/locale"
#endif

struct appdata {
	Evas_Object *win;
	Evas_Object *ly;
	Evas_Object *navi;
	Evas_Object *bg;

	int ui_type;
	int previous_ui_type;
	Evas_Object *ly_main;
	Evas_Object *entry_layout;
	Evas_Object *entry_second_layout;
	Evas_Object *button_dial;
	Evas_Object *button_done;
	int state;
	int sub_state;
	Ecore_Idler *idler;

	int first_boot;
	int running_status;
	int alpha_window_status;
	int keyboard_settings_loaded;
	int date_and_time_settings_loaded;
	int language_settings_loaded;
	int lock_view_loaded;
	int lock_app_launched;

	char *entry_str;
	char *pin_str;
	char *msg;
	Ecore_Timer *pTimerId;
	int sim_changed;
	int pin_changed;
	enum sim_stat sim_status;
	struct tapi *t;
	struct ui_gadget *dialer_ug;
	struct ui_gadget *language_ug;
	struct ui_gadget *keyboard_ug;
	struct ui_gadget *date_ug;
	struct ui_gadget *count_ug;
	struct ui_gadget *current_ug;
	int kill_ug;
	int date_and_time_previous;
	int cancel_setup;
	Evas_Object *popup;
	Evas_Object *waiting_popup;
	int win_type;
	int tapi_smc_sid;
};

void do_state(struct appdata *ad);

enum {
	STR_E_PW,
	STR_E_PIN,
	STR_E_NEW,
	STR_R_PIN,
	STR_E_PUK,
	STR_I_PUN,
	STR_I_PUK,
	STR_A_LEFT,
	STR_DONE,
	STR_DIAL,
	STR_W_PW,
	STR_N_MAT,
	STR_LANG,
	STR_SET,
	STR_CANCEL,
	STR_ERR_SIMLANG,
	STR_ERR_UNSUPP,
	STR_BLOCK,
	STR_SIM_LOCK,
	STR_NETWORK_LOCK_NCK,
	STR_NETWORK_LOCK_NSCK,
	STR_NETWORK_LOCK_SPCK,
	STR_NETWORK_LOCK_CCK,
	STR_PW_LENGTH,
};

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_TIME,
	_ST_KEYBOARD,
	_ST_MAX,
};

extern const char *strtbl[];
void set_win_prop(struct appdata *ad, int type);

#endif				/* __PWLOCK_H__ */