4cfd2979166b1dc63b4c05fab3cbe1135f3afbaa
[platform/core/connectivity/bluetooth-agent.git] / map-agent / bluetooth_map_types.h
1 /*
2  * Bluetooth-agent
3  *
4  * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact:  Hocheol Seo <hocheol.seo@samsung.com>
7  *               Syam Sidhardhan <s.syam@samsung.com>
8  *               Chanyeol Park <chanyeol.park@samsung.com>
9  *
10  * Licensed under the Apache License, Version 2.0 (the "License");
11  * you may not use this file except in compliance with the License.
12  * You may obtain a copy of the License at
13  *
14  *              http://www.apache.org/licenses/LICENSE-2.0
15  *
16  * Unless required by applicable law or agreed to in writing, software
17  * distributed under the License is distributed on an "AS IS" BASIS,
18  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19  * See the License for the specific language governing permissions and
20  * limitations under the License.
21  *
22  */
23
24 #ifndef BLUETOOTH_MAP_TYPES_H_
25 #define BLUETOOTH_MAP_TYPES_H_
26
27 #define FOLDER_COUNT 5 /* INBOX, OUTBOX, SENT, DRAFT, DELETED*/
28 #define MSG_TYPES 2 /* GSM_SMS, EMAIL*/
29 #define BT_MAP_SUBJECT_MAX_LEN 50
30
31 #define FILTER_TYPE_SMS_GSM             0x01
32 #define FILTER_TYPE_SMS_CDMA    0x02
33 #define FILTER_TYPE_EMAIL               0x04
34 #define FILTER_TYPE_MMS                 0x08
35
36 #define FILTER_READ_STATUS_ALL          0x00
37 #define FILTER_READ_STATUS_UNREAD       0x01
38 #define FILTER_READ_STATUS_READ         0x02
39
40 #define FILTER_PRIORITY_ALL             0x00
41 #define FILTER_PRIORITY_HIGH    0x01
42 #define FILTER_PRIORITY_LOW             0x02
43
44 typedef struct  {
45         char *handle;
46         char *subject;
47         char *datetime;
48         char *sender_name;
49         char *sender_addressing;
50         char *recipient_name;
51         char *recipient_addressing;
52         char *type;
53         char *size;
54         char *reception_status;
55         char *attachment_size;
56         char *replyto_addressing;
57         gboolean text;
58         gboolean priority;
59         gboolean read;
60         gboolean sent;
61         gboolean protect;
62         time_t time; /* for sorting */
63 } message_info_t;
64
65 typedef enum {
66         BT_MSG_INBOX = 0,
67         BT_MSG_SENT,
68         BT_MSG_OUTBOX,
69         BT_MSG_DRAFT,
70         BT_MSG_DELETED
71 } folders_t;
72
73 typedef enum {
74         BT_MSG_SOURCE_SMS = 0,
75         BT_MSG_SOURCE_EMAIL
76 } source_t;
77
78 typedef enum {
79         BT_MAP_ID_SMS,
80         BT_MAP_ID_EMAIL
81 } bt_msg_t;
82
83 typedef struct {
84         gboolean save_copy;
85         gboolean retry_send;
86         gboolean native;
87 } msg_send_option_t;
88
89
90 typedef struct {
91         guint32 parameter_mask;
92         guint8 type;
93         char *period_begin;
94         char *period_end;
95         guint8 read_status;
96         char *recipient;
97         char *originator;
98         guint8 priority;
99 } map_msg_filter_t;
100 #endif /* BLUETOOTH_MAP_TYPES_H_ */