4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Wonyoung Lee <wy1115.lee@samsung.com>, Tarun Kumar <tarun.kr@samsung.com>
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
27 #include <Elementary.h>
29 #include <vconf-keys.h>
31 #include <ui-gadget-module.h>
32 #include <package-manager.h>
34 #include <efl_assist.h>
40 #define LOG_TAG "MYACCOUNT"
48 #endif /* __cplusplus */
52 # define PREFIX "/usr"
55 #define MYACCOUNT_VERBOSE(fmt, arg...) \
56 LOGD(": [%s (%d)]" fmt , __FUNCTION__, __LINE__, ##arg);
57 #define MYACCOUNT_DBUG(fmt, arg...) \
58 LOGD(": [%s (%d)]" fmt , __FUNCTION__, __LINE__, ##arg);
59 #define MYACCOUNT_WARNING(fmt, arg...) \
60 LOGW(": [%s (%d)]" fmt , __FUNCTION__, __LINE__, ##arg);
61 #define MYACCOUNT_ERROR(fmt, arg...) \
62 LOGE(": [%s (%d)]" fmt , __FUNCTION__, __LINE__, ##arg);
63 #define MYACCOUNT_FATAL(fmt, arg...) \
64 LOGF(": [%s (%d)]" fmt , __FUNCTION__, __LINE__, ##arg);
66 #define MYACCOUNT_SLOGD(fmt, arg...) \
67 SECURE_LOGD(": [%s (%d)]" fmt , __FUNCTION__, __LINE__, ##arg);
68 #define MYACCOUNT_SLOGI(fmt, arg...) \
69 SECURE_LOGD(": [%s (%d)]" fmt , __FUNCTION__, __LINE__, ##arg);
70 #define MYACCOUNT_SLOGE(fmt, arg...) \
71 SECURE_LOGD(": [%s (%d)]" fmt , __FUNCTION__, __LINE__, ##arg);
73 #define _EDJ(obj) elm_layout_edje_get(obj)
74 /*#define dgettext_noop(s) (s) */
75 /*#define N_(s) dgettext_noop(s)*/
77 #define PACKAGE "myaccount"
78 //#define LOCALEDIR PREFIX"/usr/ug/res/locale"
80 //#define IMAGE_PATH "/usr/ug/res/images/ug-setting-myaccount-efl"
82 #define TIZEN_EMAIL_CSC_FILE_PATH "/opt/system/csc-default/data/csc-default-data-email-account.ini"
83 #define TIZEN_EMAIL_CSC_SP_COUNT_KEY "email_account:count"
84 #define TIZEN_EMAIL_CSC_SP_NAME_PREFIX "email_account:name_"
86 /*#define MYACCOUNT_EDJ_PATH PREFIX"/share/edje/"*/
87 //#define MYACCOUNT_EDJ_PATH PREFIX"/usr/ug/res/edje/myaccount"
88 //#define MYACCOUNT_EDJ_NAME MYACCOUNT_EDJ_PATH"/myaccount.edj"
89 #define MYACCOUNT_GRP_MAIN "main"
90 #define SAMSUNG_ACCOUNT_APPID "gr47by21a5.SamsungAccount"
91 #define TIZEN_ACCOUNT_APPID "t5ek35st3l.TizenAccount"
92 #define TIZEN_EMAIL_APPID "email-setting-efl"
93 #define EXCHANGE_UI_APPID "activesync-ui"
94 #define GOOGLE_ACCOUNT_APPID "com.samsung.google-service-account"
95 #define DROPBOX_APPID "com.samsung.dropbox"
98 eMYACCOUNT_ACCOUNT_LIST,
99 eMYACCOUNT_ADD_ACCOUNT,
103 typedef struct appdata {
107 Evas_Object *navi_bar;
108 Evas_Object *win_main;
109 Evas_Object *conformant;
110 Elm_Object_Item *navi_it;
111 myaccount_mode_e eMode;
112 Elm_Win_Indicator_Mode indi_mode;
113 Elm_Win_Indicator_Opacity_Mode indi_o_mode;
116 /* For accounts list*/
117 Evas_Object *layout_main;
118 Evas_Object *account_genlist;
119 Evas_Object *help_label;
120 Evas_Object *r_title_sk;
121 Evas_Object *modal_popup;
122 Ecore_Timer *progress_timer;
123 Evas_Object *auto_sync_check;
124 Evas_Object *refresh_btn;
125 Evas_Object *refresh_icon;
126 Evas_Object *cancel_sync_icon;
127 Elm_Object_Item *nf_it;
128 GList* account_info_list;
129 GList* sorted_account_list;
133 /* For addaccount view*/
134 Evas_Object *layout_addaccount;
136 Evas_Object *add_genlist;
137 bool item_selected_state;
138 GList* sorted_sp_list;
139 Elm_Object_Item *add_nf_it;
142 /* to hold info about key lock*/
145 ui_gadget_h ug_called;
146 Ecore_X_Window win_id;
148 /* For application launch */
149 Ecore_Timer *relaunch_timer;
150 app_control_h appsvc_handle;
152 /* to block fast double-click */
153 Ecore_Timer *clickblock_timer;
155 /* languuage state */
156 char* current_language;
158 /*package manager client handle */
161 /* extra data from ug caller */
162 char *capability_filter;
163 char *caller_userdata;
165 account_subscribe_h account_subscribe;
167 Ea_Theme_Color_Table *color_table;
168 Eina_List *font_table;
172 int myaccount_account_info_update(struct appdata *ad);
173 void myaccount_destroy_data();
176 #endif /* __cplusplus */
179 #endif /* _MYACCOUNT_H_ */