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
|
/*
* pwlock
*
* Copyright 2012 Samsung Electronics Co., Ltd
*
* Licensed under the Flora License, Version 1.1 (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_UTIL_H__
#define __PWLOCK_UTIL_H__
#include<dlog.h>
#include<Elementary.h>
#ifdef LOG_TAG
#undef LOG_TAG
#endif
#define LOG_TAG "pwlock"
#define LOGFILE "/tmp/pwlock.log"
#define ENABLE_LOG_SYSTEM
void pwlock_log(char *fmt, ...);
void pwlock_log_t(char *fmt, ...);
#ifdef ENABLE_LOG_SYSTEM
#define PWLOCK_ERR(fmt, arg...) LOGE("["LOG_TAG"%s:%d:E] "fmt, __FILE__, __LINE__, ##arg)
#define PWLOCK_DBG(fmt, arg...) LOGD("["LOG_TAG"%s:%d:D] "fmt, __FILE__, __LINE__, ##arg)
#define PWLOCK_WARN(fmt, arg...) LOGW("["LOG_TAG"%s:%d:D] "fmt, __FILE__, __LINE__, ##arg)
#else
#define PWLOCK_ERR(fmt, arg...)
#define PWLOCK_DBG(fmt, arg...)
#define PWLOCK_WARN(fmt, arg...)
#endif
#ifdef ENABLE_LOG_SYSTEM
#define _ERR(fmt, arg...) do { PWLOCK_ERR(fmt, ##arg); pwlock_log_t("["LOG_TAG":%d:E] "fmt, __LINE__, ##arg); } while (0)
#define _DBG(fmt, arg...) do { PWLOCK_DBG(fmt, ##arg); pwlock_log_t("["LOG_TAG":%d:D] "fmt, __LINE__, ##arg); } while (0)
#else
#define _ERR(...)
#define _DBG(...)
#endif
#define PWLOCK_MEMFREE(ptr) \
do { \
if (ptr != NULL) { \
free(ptr); \
ptr = NULL; \
} \
} while(0);
enum {
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,
};
enum {
IDS_IDLE_BODY_AUTOMATIC = IDS_PWLOCK_SYSTEM_STRING_MAX,
IDS_IDLE_HEADER_NETWORK_LOCK,
IDS_IDLE_HEADER_PIN_LOCK,
IDS_IDLE_HEADER_PUK_LOCK,
IDS_IDLE_HEADER_SIM_BLOCKED,
IDS_IDLE_HEADER_SIM_LOCK,
IDS_IDLE_BODY_1_ATTEMPT_LEFT,
IDS_IDLE_BODY_CORPORATE_PERSONALISATION_ON_ENTER_CONTROL_KEY,
IDS_IDLE_BODY_ENTER_NEW_PIN,
IDS_IDLE_BODY_ENTER_PIN,
IDS_IDLE_BODY_ENTER_PUK,
IDS_IDLE_BODY_INCORRECT_PIN,
IDS_IDLE_BODY_INCORRECT_PIN_TRY_AGAIN,
IDS_IDLE_BODY_NETWORK_PERSONALISATION_ON_ENTER_CONTROL_KEY,
IDS_IDLE_BODY_NETWORK_SUBSET_PERSONALISATION_ON_ENTER_CONTROL_KEY,
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_WRONG_PASSWORD,
IDS_IDLE_BUTTON_DIALER,
IDS_IDLE_HEADER_DISPLAY_LANGUAGE,
IDS_IDLE_BODY_PASSWORD_EMPTY,
IDS_IDLE_BODY_PD_TO_PD_DIGITS_REQUIRED,
IDS_IDLE_POP_PASSWORDS_NOT_MATCH,
IDS_IDLE_POP_PIN_CHANGED,
IDS_IDLE_POP_SIM_CARD_ERROR,
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_COM_SK_SKIP,
IDS_ST_BODY_INSTALTAB_FINISH,
IDS_STU_BODY_DEVICE_IS_SET_UP_AND_READY_TO_USE,
IDS_STU_POP_SETUP_COMPLETE,
IDS_COM_BODY_NO_SIM_CARD_IN_DEVICE,
IDS_STU_BODY_HOW_TO_INSERT_SIM_CARD_HELP_MSG,
IDS_ST_BUTTON_TRY_AGAIN_ABB,
IDS_PWLOCK_APP_STRING_MAX,
};
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);
void pwlock_tolower(char *src, char *dest);
#endif /* __PWLOCK_UTIL_H__ */
|