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>
30 #include <ui-gadget-module.h>
31 #include <package-manager.h>
33 #include <efl_extension.h>
39 #define LOG_TAG "MYACCOUNT"
47 #endif /* __cplusplus */
51 # define PREFIX "/usr"
54 #define MYACCOUNT_VERBOSE(fmt, arg...) \
55 LOGD(": [%s (%d)]" fmt , __FUNCTION__, __LINE__, ##arg);
56 #define MYACCOUNT_DBUG(fmt, arg...) \
57 LOGD(": [%s (%d)]" fmt , __FUNCTION__, __LINE__, ##arg);
58 #define MYACCOUNT_WARNING(fmt, arg...) \
59 LOGW(": [%s (%d)]" fmt , __FUNCTION__, __LINE__, ##arg);
60 #define MYACCOUNT_ERROR(fmt, arg...) \
61 LOGE(": [%s (%d)]" fmt , __FUNCTION__, __LINE__, ##arg);
62 #define MYACCOUNT_FATAL(fmt, arg...) \
63 LOGF(": [%s (%d)]" fmt , __FUNCTION__, __LINE__, ##arg);
65 #define MYACCOUNT_SLOGD(fmt, arg...) \
66 SECURE_LOGD(": [%s (%d)]" fmt , __FUNCTION__, __LINE__, ##arg);
67 #define MYACCOUNT_SLOGI(fmt, arg...) \
68 SECURE_LOGD(": [%s (%d)]" fmt , __FUNCTION__, __LINE__, ##arg);
69 #define MYACCOUNT_SLOGE(fmt, arg...) \
70 SECURE_LOGD(": [%s (%d)]" fmt , __FUNCTION__, __LINE__, ##arg);
72 #define _EDJ(obj) elm_layout_edje_get(obj)
73 /*#define dgettext_noop(s) (s) */
74 /*#define N_(s) dgettext_noop(s)*/
76 #define PACKAGE "myaccount"
77 //#define LOCALEDIR PREFIX"/usr/ug/res/locale"
79 //#define IMAGE_PATH "/usr/ug/res/images/ug-setting-myaccount-efl"
81 #define TIZEN_EMAIL_CSC_FILE_PATH "/opt/system/csc-default/data/csc-default-data-email-account.ini"
82 #define TIZEN_EMAIL_CSC_SP_COUNT_KEY "email_account:count"
83 #define TIZEN_EMAIL_CSC_SP_NAME_PREFIX "email_account:name_"
85 /*#define MYACCOUNT_EDJ_PATH PREFIX"/share/edje/"*/
86 //#define MYACCOUNT_EDJ_PATH PREFIX"/usr/ug/res/edje/myaccount"
87 //#define MYACCOUNT_EDJ_NAME MYACCOUNT_EDJ_PATH"/myaccount.edj"
88 #define MYACCOUNT_GRP_MAIN "main"
89 #define SAMSUNG_ACCOUNT_APPID "gr47by21a5.SamsungAccount"
90 #define TIZEN_ACCOUNT_APPID "t5ek35st3l.TizenAccount"
91 #define TIZEN_EMAIL_APPID "email-setting-efl"
92 #define EXCHANGE_UI_APPID "activesync-ui"
93 #define GOOGLE_ACCOUNT_APPID "com.samsung.google-service-account"
94 #define DROPBOX_APPID "com.samsung.dropbox"
97 eMYACCOUNT_ACCOUNT_LIST,
98 eMYACCOUNT_ADD_ACCOUNT,
102 typedef struct appdata {
106 Evas_Object *navi_bar;
107 Evas_Object *win_main;
108 Evas_Object *conformant;
109 Elm_Object_Item *navi_it;
110 myaccount_mode_e eMode;
111 Elm_Win_Indicator_Mode indi_mode;
112 Elm_Win_Indicator_Opacity_Mode indi_o_mode;
115 /* For accounts list*/
116 Evas_Object *layout_main;
117 Evas_Object *account_genlist;
118 Evas_Object *help_label;
119 Evas_Object *r_title_sk;
120 Evas_Object *modal_popup;
121 Ecore_Timer *progress_timer;
122 Evas_Object *auto_sync_check;
123 Evas_Object *refresh_btn;
124 Evas_Object *refresh_icon;
125 Evas_Object *cancel_sync_icon;
126 Elm_Object_Item *nf_it;
127 GList* account_info_list;
128 GList* sorted_account_list;
132 /* For addaccount view*/
133 Evas_Object *layout_addaccount;
135 Evas_Object *add_genlist;
136 bool item_selected_state;
137 GList* sorted_sp_list;
138 Elm_Object_Item *add_nf_it;
141 /* to hold info about key lock*/
144 ui_gadget_h ug_called;
145 Ecore_X_Window win_id;
147 /* For application launch */
148 Ecore_Timer *relaunch_timer;
149 app_control_h appsvc_handle;
151 /* to block fast double-click */
152 Ecore_Timer *clickblock_timer;
154 /* languuage state */
155 char* current_language;
157 /*package manager client handle */
160 /* extra data from ug caller */
161 char *capability_filter;
162 char *caller_userdata;
164 account_subscribe_h account_subscribe;
169 int myaccount_account_info_update(struct appdata *ad);
170 void myaccount_destroy_data();
173 #endif /* __cplusplus */
176 #endif /* _MYACCOUNT_H_ */