[svn r328] Some fixes on program info, and some memory clean ups.
4 * @file gmyth/gmyth_stringlist.h
6 * @brief <p> This component contains functions for dealing with the stringlist
7 * format of the mythprotocol.
9 * Copyright (C) 2006 INdT - Instituto Nokia de Tecnologia.
10 * @author Hallyson Luiz de Morais Melo <hallyson.melo@indt.org.br>
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License as published by
16 * the Free Software Foundation; either version 2 of the License, or
17 * (at your option) any later version.
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
24 * You should have received a copy of the GNU Lesser General Public License
25 * along with this program; if not, write to the Free Software
26 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 #ifndef GMYTH_STRING_LIST_H_
30 #define GMYTH_STRING_LIST_H_
32 #include <glib-object.h>
38 #include <sys/socket.h>
43 #define GMYTH_STRING_LIST_TYPE (gmyth_string_list_get_type ())
44 #define GMYTH_STRING_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_STRING_LIST_TYPE, GMythStringList))
45 #define GMYTH_STRING_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_STRING_LIST_TYPE, GMythStringListClass))
46 #define IS_GMYTH_STRING_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_STRING_LIST_TYPE))
47 #define IS_GMYTH_STRING_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_STRING_LIST_TYPE))
48 #define GMYTH_STRING_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GMYTH_STRING_LIST_TYPE, GMythStringListClass))
51 typedef struct _GMythStringList GMythStringList;
52 typedef struct _GMythStringListClass GMythStringListClass;
54 struct _GMythStringListClass
56 GObjectClass parent_class;
62 struct _GMythStringList
71 GType gmyth_string_list_get_type (void);
73 GMythStringList * gmyth_string_list_new (void);
75 void gmyth_string_list_clear_all (GMythStringList *strlist);
76 int gmyth_string_list_length (GMythStringList *strlist);
78 GString * gmyth_string_list_append_int (GMythStringList *strlist,
80 GString * gmyth_string_list_append_uint64 (GMythStringList *strlist,
83 GString * gmyth_string_list_append_int64 (GMythStringList *strlist,
86 GString * gmyth_string_list_append_char_array (GMythStringList *strlist,
88 GString * gmyth_string_list_append_string (GMythStringList *strlist,
91 int gmyth_string_list_get_int (GMythStringList *strlist, const gint index);
92 guint64 gmyth_string_list_get_uint64 (GMythStringList *strlist, const gint index);
93 gint64 gmyth_string_list_get_int64 (GMythStringList *strlist, const gint index);
94 GString * gmyth_string_list_get_string (GMythStringList *strlist, const gint index);
96 #define gmyth_string_list_get_char_array(strlist, index) \
97 (gmyth_string_list_get_string(strlist, index))->str
101 #endif /*GMYTH_STRING_LIST_H_*/