summaryrefslogtreecommitdiff
path: root/setting/include/email-setting.h
blob: 5536f5d1fc0ff75b235090009cf7892b9edb7663 (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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
/*
 * 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 __EMAIL_SETTING_H__
#define __EMIAL_SETTING_H__

#include <Elementary.h>
#include <Ecore_IMF.h>
#include <vconf.h>
#include <E_DBus.h>
#include <libintl.h>
#include <appcore-efl.h>
#undef _
#include <ui-gadget-module.h>
#include <bundle.h>
#include <status.h>

#include "email-types.h"
#include "email-api.h"

#include "email-engine.h"
#include "email-debug.h"
#include "email-locale.h"
#include "email-utils.h"
#include "email-common-types.h"
#include "email-setting-defines.h"
#include "email-setting-view.h"

#define SETTING_PACKAGE "email-setting"
#define EDJ_PATH EDJDIR
#define EV_THEME_PATH EDJ_PATH"/email-setting-theme.edj"
#define EFFECT_EDJ_PATH EDJ_PATH"/email-effect-layout.edj"

#define VIEW_ST_MAX 20		/* Maximum View Stack */

#define _EDJ(o) elm_layout_edje_get(o)

#define ACCOUNT_ICON_GMAIL IMGDIR"/M02_email_list_icon_gmail.png"
#define ACCOUNT_ICON_HOTMAIL IMGDIR"/M02_email_list_icon_hotmail.png"
#define ACCOUNT_ICON_YAHOO IMGDIR"/M02_email_list_icon_YahooMail.png"
#define ACCOUNT_ICON_AOL IMGDIR"/M02_email_list_icon_AOL.png"
#define ACCOUNT_ICON_OTHERS IMGDIR"/icon_email.png"

#define CBAR_ICON_ADD IMGDIR"/01_controlbar_icon_create_folder.png"
#define TITLE_ICON_REFRESH IMGDIR"/M02_email_icon_title_refresh.png"

typedef enum {
	HOTMAIL = 1,
	GMAIL,
	YAHOOMAIL,
	AOL,
	OTHERS
} AccountInfo;

typedef struct ug_data EmailSettingUGD;
struct ug_data {
	ui_gadget_h ug;
	ui_gadget_h ug_block;
	ui_gadget_h ug_cert;

	struct ug_cbs block_cbs;
	struct ug_cbs eas_cbs;
	struct ug_cbs eas_edit_cbs;
	struct ug_cbs cert_cbs;

	Evas *evas;
	Evas_Object *win;
	Evas_Object *layout_main;
	Evas_Object *base;
	Evas_Object *bg;
	Evas_Object *popup_one;
	Evas_Object *popup_validate;
	Evas_Object *popup_color;
	Evas_Object *small_noti;
	Evas_Object *small_noti_ly;
	Evas_Object *navi_bar;
	Evas_Object *ly_accounts;
	Evas_Object *effect_ly_block;
	Evas_Object *effect_ly_eas;
	Evas_Object *effect_ly_eas_edit;

	struct viewdata *vd[VIEW_END];
	Viewtype view_st[VIEW_ST_MAX];
	int view_top;

	char *start_view_type;

	/* view specified variables */
	AccountInfo account_info;
	email_account_t *new_account;
	email_account_t *account_list;

	int err_code;
	int account_count;
	int account_id;
	int myaccount_id;
	int check_interval;
	int email_size;
	int end_key_event;
	int cancel_event;
	int validation;
	int account_selected;
	int eas_validation_success;
	int eas_account_deleted;
	int eas_account_added;
	int eas_account_validation;
	int atomic_pop;
	int setup_mailbox;
	int navi_flag[16];
	int start_account_validation;
	int change_view_ing;
	int b_on_pause;
	int wds_account_creation;
	int manual_setup;

	unsigned int handle;

	Ecore_Timer *preset_vc_timer;
	Ecore_Timer *other_vc_timer;
	Ecore_Timer *edit_vc_timer;
	Ecore_Timer *del_timer;

	Evas_Object *account_list_view;
	Evas_Object *setting_main_view;

	Elm_Object_Item *selected_account_it;
	Elm_Object_Item *navi_main_it;
	Elm_Theme *theme;

	E_DBus_Connection *dbus_conn;
	E_DBus_Signal_Handler *signal_handler_network;
	E_DBus_Signal_Handler *signal_handler_storage;
};

#endif				/* __EMAIL_SETTING_H__ */

/* EOF */