renatofilho@320: /** renatofilho@320: * GMyth Library renatofilho@320: * renatofilho@320: * @file gmyth/gmyth_stringlist.h renatofilho@320: * renatofilho@320: * @brief

This component contains functions for dealing with the stringlist renatofilho@320: * format of the mythprotocol. renatofilho@320: * renatofilho@320: * Copyright (C) 2006 INdT - Instituto Nokia de Tecnologia. renatofilho@320: * @author Hallyson Luiz de Morais Melo renatofilho@320: * renatofilho@320: *//* renatofilho@320: * renatofilho@320: * This program is free software; you can redistribute it and/or modify renatofilho@320: * it under the terms of the GNU Lesser General Public License as published by renatofilho@320: * the Free Software Foundation; either version 2 of the License, or renatofilho@320: * (at your option) any later version. renatofilho@320: * renatofilho@320: * This program is distributed in the hope that it will be useful, renatofilho@320: * but WITHOUT ANY WARRANTY; without even the implied warranty of renatofilho@320: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the renatofilho@320: * GNU General Public License for more details. renatofilho@320: * renatofilho@320: * You should have received a copy of the GNU Lesser General Public License renatofilho@320: * along with this program; if not, write to the Free Software renatofilho@320: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA renatofilho@320: */ renatofilho@320: renatofilho@320: #ifndef GMYTH_STRING_LIST_H_ renatofilho@320: #define GMYTH_STRING_LIST_H_ renatofilho@320: renatofilho@320: #include renatofilho@320: renatofilho@320: #include renatofilho@320: #include renatofilho@320: #include renatofilho@320: #include renatofilho@320: #include renatofilho@320: #include renatofilho@320: renatofilho@320: G_BEGIN_DECLS renatofilho@320: renatofilho@320: #define GMYTH_STRING_LIST_TYPE (gmyth_string_list_get_type ()) renatofilho@320: #define GMYTH_STRING_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_STRING_LIST_TYPE, GMythStringList)) renatofilho@320: #define GMYTH_STRING_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_STRING_LIST_TYPE, GMythStringListClass)) renatofilho@320: #define IS_GMYTH_STRING_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_STRING_LIST_TYPE)) renatofilho@320: #define IS_GMYTH_STRING_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_STRING_LIST_TYPE)) renatofilho@320: #define GMYTH_STRING_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GMYTH_STRING_LIST_TYPE, GMythStringListClass)) renatofilho@320: renatofilho@320: renatofilho@320: typedef struct _GMythStringList GMythStringList; renatofilho@320: typedef struct _GMythStringListClass GMythStringListClass; renatofilho@320: renatofilho@320: struct _GMythStringListClass renatofilho@320: { renatofilho@320: GObjectClass parent_class; renatofilho@320: renatofilho@320: /* callbacks */ renatofilho@320: /* no one for now */ renatofilho@320: }; renatofilho@320: renatofilho@320: struct _GMythStringList renatofilho@320: { renatofilho@320: GObject parent; renatofilho@320: renatofilho@320: /* string list */ renatofilho@320: GList *glist; renatofilho@320: }; renatofilho@320: renatofilho@320: renatofilho@320: GType gmyth_string_list_get_type (void); renatofilho@320: renatofilho@320: GMythStringList * gmyth_string_list_new (void); renatofilho@320: renatofilho@320: void gmyth_string_list_clear_all (GMythStringList *strlist); renatofilho@320: int gmyth_string_list_length (GMythStringList *strlist); renatofilho@320: renatofilho@320: GString * gmyth_string_list_append_int (GMythStringList *strlist, renatofilho@320: const gint value); renatofilho@320: GString * gmyth_string_list_append_uint64 (GMythStringList *strlist, renatofilho@320: const guint64 value); renatofilho@320: renatofilho@320: GString * gmyth_string_list_append_int64 (GMythStringList *strlist, renatofilho@320: const gint64 value); renatofilho@320: renatofilho@320: GString * gmyth_string_list_append_char_array (GMythStringList *strlist, renatofilho@320: const char* value); renatofilho@320: GString * gmyth_string_list_append_string (GMythStringList *strlist, renatofilho@320: GString *value); renatofilho@320: renatofilho@320: int gmyth_string_list_get_int (GMythStringList *strlist, const gint index); renatofilho@320: guint64 gmyth_string_list_get_uint64 (GMythStringList *strlist, const gint index); renatofilho@320: gint64 gmyth_string_list_get_int64 (GMythStringList *strlist, const gint index); renatofilho@320: GString * gmyth_string_list_get_string (GMythStringList *strlist, const gint index); renatofilho@320: renatofilho@320: #define gmyth_string_list_get_char_array(strlist, index) \ renatofilho@320: (gmyth_string_list_get_string(strlist, index))->str renatofilho@320: renatofilho@320: G_END_DECLS renatofilho@320: renatofilho@320: #endif /*GMYTH_STRING_LIST_H_*/