Fix wrong return value of model name
[platform/core/connectivity/bluetooth-agent.git] / map-agent / map_bmessage.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  *               Girishashok Joshi <girish.joshi@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 __BMSG_H
25 #define __BMSG_H
26
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30
31 struct bmsg_vcard {
32         gchar *version;
33         gchar *n;
34         gchar *fn;
35         gchar *tel;
36         gchar *email;
37 };
38
39 struct bmsg_bbody {
40         guint16 part_id;
41         gchar *encoding;
42         gchar *charset;
43         gchar *language;
44         guint64 length;
45         gchar *msg;
46 };
47
48 struct benv_data {
49         guint8 encapsulation_level;
50         GSList *recipient_vcard;
51         struct bmsg_bbody *body_content;
52 };
53
54 struct bmsg_envelope {
55         GSList *env_data;       /* Add benv_data here*/
56 };
57
58 struct bmsg_data {
59         gchar *version;
60         gchar *status;
61         gchar *type;
62         gchar *folder;
63         struct bmsg_vcard *originator_vcard_data;
64         struct bmsg_envelope *envelope_data;
65 };
66
67 struct bmsg_data * bmsg_parse(gchar *buf);
68 char *bmsg_get_msg_folder(struct bmsg_data *bmsg);
69 char *bmsg_get_msg_body(struct bmsg_data *bmsg, gboolean utf);
70 GSList *bmsg_get_msg_recepients(struct bmsg_data *bmsg, int msg_type);
71 gboolean bmsg_parse_msg_body(const char *message,
72                         char **body, char **subject);
73 void bmsg_free_bmsg(struct bmsg_data *bmsg);
74
75 #ifdef __cplusplus
76 }
77 #endif
78
79 #endif /* __BMSG_H */