Upgrade ofono to 1.2
[profile/ivi/ofono.git] / gatchat / gattty.h
1 /*
2  *
3  *  AT chat library with GLib integration
4  *
5  *  Copyright (C) 2008-2011  Intel Corporation. All rights reserved.
6  *
7  *  This program is free software; you can redistribute it and/or modify
8  *  it under the terms of the GNU General Public License version 2 as
9  *  published by the Free Software Foundation.
10  *
11  *  This program is distributed in the hope that it will be useful,
12  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  *  GNU General Public License for more details.
15  *
16  *  You should have received a copy of the GNU General Public License
17  *  along with this program; if not, write to the Free Software
18  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19  *
20  */
21
22 #ifndef __GATTTY_H
23 #define __GATTTY_H
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28
29 /*!
30  * Opens a serial port given by tty.  If options is NULL, then the serial port
31  * is opened in raw mode.  Otherwise the options are parsed and set accordingly
32  *
33  * The following keys / values are recognized (all strings)
34  *
35  * "Baud" - "300", "600", etc
36  * "Stopbits" - "1", "2"
37  * "Databits" - "7", "8"
38  * "Parity" - "none", "odd", "even"
39  * "XonXoff" - "on", "off"
40  * "RtsCts" - "on", "off"
41  * "Local" - "on", "off"
42  * "Read" - "on, "off"
43  */
44 GIOChannel *g_at_tty_open(const char *tty, GHashTable *options);
45
46 GIOChannel *g_at_tty_open_qcdm(const char *tty);
47
48 #ifdef __cplusplus
49 }
50 #endif
51
52 #endif /* __GATTTY_H */