# stringlist.h

Go to the documentation of this file.

    00001 /***************************************************************************
    00002  $RCSfile: stringlist.h,v $
    00003  -------------------
    00004  cvs         : $Id: stringlist.h,v 1.11 2005/01/14 17:32:28 aquamaniac Exp $
    00005  begin       : Thu Apr 03 2003
    00006  copyright   : (C) 2003 by Martin Preuss
    00007  email       : martin@libchipcard.de
    00008
    00009  ***************************************************************************
    00010  *                                                                         *
    00011  *   This library is free software; you can redistribute it and/or         *
    00012  *   modify it under the terms of the GNU Lesser General Public            *
    00013  *   License as published by the Free Software Foundation; either          *
    00014  *   version 2.1 of the License, or (at your option) any later version.    *
    00015  *                                                                         *
    00016  *   This library is distributed in the hope that it will be useful,       *
    00017  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
    00018  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
    00019  *   Lesser General Public License for more details.                       *
    00020  *                                                                         *
    00021  *   You should have received a copy of the GNU Lesser General Public      *
    00022  *   License along with this library; if not, write to the Free Software   *
    00023  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston,                 *
    00024  *   MA  02111-1307  USA                                                   *
    00025  *                                                                         *
    00026  ***************************************************************************/
    00027
    00028 #ifndef GWENHYWFAR_STRINGLIST_H
    00029 #define GWENHYWFAR_STRINGLIST_H
    00030
    00031 #include <gwenhywfar/gwenhywfarapi.h>
    00032
    00033
    00034 #ifdef __cplusplus
    00035 extern "C" {
    00036 #endif
    00037
    00038
    00039 typedef struct GWEN_STRINGLISTENTRYSTRUCT GWEN_STRINGLISTENTRY;
    00040
    00041
    00042 typedef struct GWEN_STRINGLISTSTRUCT GWEN_STRINGLIST;
    00043
    00044
    00045 GWENHYWFAR_API GWEN_STRINGLIST *GWEN_StringList_new();
    00046 GWENHYWFAR_API void GWEN_StringList_free(GWEN_STRINGLIST *sl);
    00047 GWENHYWFAR_API
    00048   GWEN_STRINGLIST *GWEN_StringList_dup(const GWEN_STRINGLIST *sl);
    00049 GWENHYWFAR_API void GWEN_StringList_Clear(GWEN_STRINGLIST *sl);
    00050
    00051 GWENHYWFAR_API
    00052   unsigned int GWEN_StringList_Count(const GWEN_STRINGLIST *sl);
    00053
    00054 GWENHYWFAR_API GWEN_STRINGLISTENTRY *GWEN_StringListEntry_new(const char *s,
    00055                                                               int take);
    00056 GWENHYWFAR_API void GWEN_StringListEntry_ReplaceString(GWEN_STRINGLISTENTRY *e,
    00057                                                        const char *s,
    00058                                                        int take);
    00059 GWENHYWFAR_API void GWEN_StringListEntry_free(GWEN_STRINGLISTENTRY *sl);
    00060 GWENHYWFAR_API void GWEN_StringList_AppendEntry(GWEN_STRINGLIST *sl,
    00061                                                 GWEN_STRINGLISTENTRY *se);
    00062 GWENHYWFAR_API void GWEN_StringList_RemoveEntry(GWEN_STRINGLIST *sl,
    00063                                                 GWEN_STRINGLISTENTRY *se);
    00064 GWENHYWFAR_API
    00065   GWEN_STRINGLISTENTRY *GWEN_StringList_FirstEntry(const GWEN_STRINGLIST *sl);
    00066 GWENHYWFAR_API
    00067   GWEN_STRINGLISTENTRY *GWEN_StringListEntry_Next(const GWEN_STRINGLISTENTRY *se);
    00068
    00069 GWENHYWFAR_API
    00070   const char *GWEN_StringListEntry_Data(const GWEN_STRINGLISTENTRY *se);
    00071
    00078 void GWEN_StringList_SetSenseCase(GWEN_STRINGLIST *sl, int i);
    00079
    00087 void GWEN_StringList_SetIgnoreRefCount(GWEN_STRINGLIST *sl, int i);
    00088
    00096 GWENHYWFAR_API int GWEN_StringList_AppendString(GWEN_STRINGLIST *sl,
    00097                                                 const char *s,
    00098                                                 int take,
    00099                                                 int checkDouble);
    00100
    00108 GWENHYWFAR_API int GWEN_StringList_InsertString(GWEN_STRINGLIST *sl,
    00109                                                 const char *s,
    00110                                                 int take,
    00111                                                 int checkDouble);
    00112
    00117 GWENHYWFAR_API int GWEN_StringList_RemoveString(GWEN_STRINGLIST *sl,
    00118                                                 const char *s);
    00119
    00125 GWENHYWFAR_API int GWEN_StringList_HasString(const GWEN_STRINGLIST *sl,
    00126                                              const char *s);
    00127
    00128
    00140 GWENHYWFAR_API
    00141 void *GWEN_StringList_ForEach(const GWEN_STRINGLIST *l,
    00142                               void *(*func)(const char *s, void *u),
    00143                               void *user_data);
    00144
    00145 GWENHYWFAR_API
    00146 const char *GWEN_StringList_FirstString(const GWEN_STRINGLIST *l);
    00147
    00148 #ifdef __cplusplus
    00149 }
    00150 #endif
    00151
    00152 #endif
    00153
    00154