1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
4 * Copyright (C) Naba Kumar 2005 <naba@gnome.org>
6 * gdbmi.c is free software.
8 * You may redistribute it and/or modify it under the terms of the
9 * GNU General Public License, as published by the Free Software
10 * Foundation; either version 2, or (at your option) any later version.
12 * gdbmi.c 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.
15 * See the GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with main.c. See the file "COPYING". If not,
19 * write to: The Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor,
21 * Boston, MA 02110-1301, USA.
39 typedef struct _GDBMIValue GDBMIValue
;
41 GDBMIValue
*gdbmi_value_new (GDBMIDataType data_type
, const gchar
*name
);
42 GDBMIValue
* gdbmi_value_literal_new (const gchar
*name
, const gchar
*data
);
43 void gdbmi_value_free (GDBMIValue
*val
);
45 const gchar
* gdbmi_value_get_name (const GDBMIValue
*val
);
46 void gdbmi_value_set_name (GDBMIValue
*val
, const gchar
*name
);
47 GDBMIDataType
gdbmi_value_get_type (const GDBMIValue
* val
);
48 gint
gdbmi_value_get_size (const GDBMIValue
* val
);
49 void gdbmi_value_foreach (const GDBMIValue
* val
, GFunc func
, gpointer user_data
);
51 /* Literal operations */
52 void gdbmi_value_literal_set (GDBMIValue
* val
, const gchar
*data
);
53 const gchar
* gdbmi_value_literal_get (const GDBMIValue
* val
);
56 void gdbmi_value_hash_insert (GDBMIValue
* val
, const gchar
*key
,
58 const GDBMIValue
* gdbmi_value_hash_lookup (const GDBMIValue
* val
, const gchar
*key
);
61 void gdbmi_value_list_append (GDBMIValue
* val
, GDBMIValue
*value
);
62 const GDBMIValue
* gdbmi_value_list_get_nth (const GDBMIValue
* val
, gint idx
);
64 /* Parser and dumper */
65 GDBMIValue
* gdbmi_value_parse (const gchar
*message
);
66 void gdbmi_value_dump (const GDBMIValue
*val
, gint indent_level
);