Upgrade ofono to 1.2
[profile/ivi/ofono.git] / gatchat / gsm0710.h
1 /*
2  *
3  *  AT chat library with GLib integration
4  *
5  *  Copyright (C) 2011  Intel Corporation. All rights reserved.
6  *  Copyright (C) 2009  Trolltech ASA.
7  *
8  *  This program is free software; you can redistribute it and/or modify
9  *  it under the terms of the GNU General Public License version 2 as
10  *  published by the Free Software Foundation.
11  *
12  *  This program is distributed in the hope that it will be useful,
13  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  *  GNU General Public License for more details.
16  *
17  *  You should have received a copy of the GNU General Public License
18  *  along with this program; if not, write to the Free Software
19  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
20  *
21  */
22
23 #ifndef __GSM0710_H
24 #define __GSM0710_H
25
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29
30 /* Frame types and subtypes */
31 #define GSM0710_OPEN_CHANNEL            0x3F
32 #define GSM0710_CLOSE_CHANNEL           0x53
33 #define GSM0710_DATA                    0xEF
34 #define GSM0710_DATA_ALT                0x03
35 #define GSM0710_STATUS_SET              0xE3
36 #define GSM0710_STATUS_ACK              0xE1
37
38 int gsm0710_basic_extract_frame(guint8 *data, int len,
39                                         guint8 *out_dlc, guint8 *out_type,
40                                         guint8 **frame, int *out_len);
41
42 int gsm0710_basic_fill_frame(guint8 *frame, guint8 dlc, guint8 type,
43                                 const guint8 *data, int len);
44
45 int gsm0710_advanced_extract_frame(guint8 *data, int len,
46                                         guint8 *out_dlc, guint8 *out_type,
47                                         guint8 **frame, int *out_len);
48
49 int gsm0710_advanced_fill_frame(guint8 *frame, guint8 dlc, guint8 type,
50                                         const guint8 *data, int len);
51 #ifdef __cplusplus
52 };
53 #endif
54
55 #endif