fix build break
[apps/core/preloaded/email.git] / viewer / include / email-viewer-logic.h
1 /*
2  * Copyright 2012  Samsung Electronics Co., Ltd
3  *
4  * Licensed under the Flora License, Version 1.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *    http://www.tizenopensource.org/license
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 #ifndef __DEF_email_viewer_logic_H__
18 #define __DEF_email_viewer_logic_H__
19
20 #include <Elementary.h>
21 #include <glib.h>
22 #include <sys/time.h>
23 #include "email-api.h"
24 #include "email-types.h"
25
26 #define ATTACH_MAX                      65536
27 #define CONCAT_FORMAT(x, y, z) ((x<<16) | (y<<8) | z)
28
29 typedef struct _EmailViewerPrivate EmailViewerPrivate;
30 struct _EmailViewerPrivate {
31         int mailbox_id;
32         int mail_id;
33         int account_id;
34         gboolean download_mail;
35         gboolean multi_body;
36         gboolean b_att_open;
37         gboolean b_att_save;
38         gboolean b_all_att_save;
39         char *file_id;
40         char *att_file_id;
41         int file_size;
42         int attachment_id;
43         int email_handle;
44         int download_all_email_handle[ATTACH_MAX];
45         unsigned int download_all_cnt;
46         unsigned int download_all_fail_cnt;
47         email_mail_data_t *mail_info;
48         email_attachment_data_t *attachment_info;
49         email_address_info_list_t *addrs_info_list;
50         int attachment_count;
51 };
52
53 typedef struct _EmailViewerProp EmailViewerProp;
54 struct _EmailViewerProp {
55         int composer_type;
56         int account_id;
57         int mail_id;
58         int status;
59         email_mail_status_t status2;
60         email_mail_priority_t priority;
61         int att_len;
62         int real_att_len;
63
64         char *src_box;
65         char *sender;
66         char *sender_display_name;
67         char *recipient_to;
68         char *recipient_cc;
69         char *recipient_bcc;
70         char *from_contact_name;
71         char *to_contact_name;
72         char *cc_contact_name;
73         char *bcc_contact_name;
74
75         time_t mktime;
76
77         char *subject;
78         char *charset;
79         char *body;
80         char *body_uri;
81         GList *attachments;
82
83         gint64 total_att_size;
84
85         gboolean has_html;
86         gboolean has_attachment;
87         gboolean seen;
88         gboolean lock;
89         gboolean favorite;
90         gboolean request_report;
91         int body_download;
92 };
93
94 typedef struct _EmailAttachmentType EmailAttachmentType;
95 struct _EmailAttachmentType {
96         int attach_id;
97         int index;
98         char *name;
99         char *path;
100         gint64 size;
101         gboolean download_yn;
102         gboolean drm;
103         gboolean inline_content;
104 };
105
106 gboolean viewer_get_internal_mail_info(EmailViewerProp *prop, EmailViewerPrivate *email_data);
107 void viewer_make_internal_mail(EmailViewerProp *prop, EmailViewerPrivate *email_data);
108 void viewer_set_mail_seen(EmailViewerProp *prop, email_mail_data_t * mail_info);
109
110 #endif  /* __DEF_email_viewer_logic_H__ */
111
112 /* EOF */