3 * AT chat library with GLib integration
5 * Copyright (C) 2008-2011 Intel Corporation. All rights reserved.
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.
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.
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
22 #ifndef __GATCHAT_RESULT_H
23 #define __GATCHAT_RESULT_H
34 typedef struct _GAtResult GAtResult;
36 #define G_AT_RESULT_LINE_LENGTH_MAX 2048
38 struct _GAtResultIter {
41 char buf[G_AT_RESULT_LINE_LENGTH_MAX + 1];
42 unsigned int line_pos;
46 typedef struct _GAtResultIter GAtResultIter;
48 void g_at_result_iter_init(GAtResultIter *iter, GAtResult *result);
50 gboolean g_at_result_iter_next(GAtResultIter *iter, const char *prefix);
51 gboolean g_at_result_iter_open_list(GAtResultIter *iter);
52 gboolean g_at_result_iter_close_list(GAtResultIter *iter);
54 gboolean g_at_result_iter_skip_next(GAtResultIter *iter);
56 gboolean g_at_result_iter_next_range(GAtResultIter *iter, gint *min, gint *max);
57 gboolean g_at_result_iter_next_string(GAtResultIter *iter, const char **str);
58 gboolean g_at_result_iter_next_unquoted_string(GAtResultIter *iter,
60 gboolean g_at_result_iter_next_number(GAtResultIter *iter, gint *number);
61 gboolean g_at_result_iter_next_number_default(GAtResultIter *iter, gint dflt,
63 gboolean g_at_result_iter_next_hexstring(GAtResultIter *iter,
64 const guint8 **str, gint *length);
66 const char *g_at_result_iter_raw_line(GAtResultIter *iter);
68 const char *g_at_result_final_response(GAtResult *result);
69 const char *g_at_result_pdu(GAtResult *result);
71 gint g_at_result_num_response_lines(GAtResult *result);
77 #endif /* __GATCHAT_RESULT_H */