xmlctx.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  $RCSfile$
00003  -------------------
00004  cvs         : $Id: xsd.h 898 2005-11-03 09:51:39Z cstim $
00005  begin       : Sat Jun 28 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_XMLCTX_H
00029 #define GWENHYWFAR_XMLCTX_H
00030 
00031 #include <gwenhywfar/gwenhywfarapi.h>
00032 #include <gwenhywfar/inherit.h>
00033 #include <stdio.h>
00034 
00035 #ifdef __cplusplus
00036 extern "C" {
00037 #endif
00038 
00039 typedef struct GWEN_XML_CONTEXT GWEN_XML_CONTEXT;
00040 GWEN_INHERIT_FUNCTION_LIB_DEFS(GWEN_XML_CONTEXT, GWENHYWFAR_API)
00041 
00042 
00043 #include <gwenhywfar/xml.h>
00044 
00045 
00046 
00047 typedef int (*GWEN_XMLCTX_STARTTAG_FN)(GWEN_XML_CONTEXT *ctx,
00048                                        const char *tagName);
00049 typedef int (*GWEN_XMLCTX_ENDTAG_FN)(GWEN_XML_CONTEXT *ctx, int closing);
00050 typedef int (*GWEN_XMLCTX_ADDDATA_FN)(GWEN_XML_CONTEXT *ctx,
00051                                       const char *data);
00052 typedef int (*GWEN_XMLCTX_ADDCOMMENT_FN)(GWEN_XML_CONTEXT *ctx,
00053                                          const char *data);
00054 typedef int (*GWEN_XMLCTX_ADDATTR_FN)(GWEN_XML_CONTEXT *ctx,
00055                                       const char *attrName,
00056                                       const char *attrData);
00057 
00058 
00059 
00060 GWENHYWFAR_API GWEN_XML_CONTEXT *GWEN_XmlCtx_new(uint32_t flags,
00061                                                  uint32_t guiid,
00062                                                  int timeout);
00063 GWENHYWFAR_API void GWEN_XmlCtx_free(GWEN_XML_CONTEXT *ctx);
00064 
00065 GWENHYWFAR_API
00066 uint32_t GWEN_XmlCtx_GetFlags(const GWEN_XML_CONTEXT *ctx);
00067 
00068 GWENHYWFAR_API
00069 void GWEN_XmlCtx_SetFlags(GWEN_XML_CONTEXT *ctx, uint32_t f);
00070 
00071 
00072 GWENHYWFAR_API
00073 uint32_t GWEN_XmlCtx_GetFinishedElement(const GWEN_XML_CONTEXT *ctx);
00074 
00075 GWENHYWFAR_API
00076 void GWEN_XmlCtx_IncFinishedElement(GWEN_XML_CONTEXT *ctx);
00077 
00078 GWENHYWFAR_API
00079 void GWEN_XmlCtx_ResetFinishedElement(GWEN_XML_CONTEXT *ctx);
00080 
00081 
00082 GWENHYWFAR_API
00083 int GWEN_XmlCtx_GetDepth(const GWEN_XML_CONTEXT *ctx);
00084 
00085 GWENHYWFAR_API
00086 void GWEN_XmlCtx_SetDepth(GWEN_XML_CONTEXT *ctx, int i);
00087 
00088 GWENHYWFAR_API
00089 void GWEN_XmlCtx_IncDepth(GWEN_XML_CONTEXT *ctx);
00090 
00091 GWENHYWFAR_API
00092 int GWEN_XmlCtx_DecDepth(GWEN_XML_CONTEXT *ctx);
00093 
00094 
00095 GWENHYWFAR_API
00096 uint32_t GWEN_XmlCtx_GetGuiId(const GWEN_XML_CONTEXT *ctx);
00097 
00098 GWENHYWFAR_API
00099 int GWEN_XmlCtx_GetTimeout(const GWEN_XML_CONTEXT *ctx);
00100 
00101 GWENHYWFAR_API 
00102 void GWEN_XmlCtx_SetCurrentNode(GWEN_XML_CONTEXT *ctx, GWEN_XMLNODE *n);
00103 
00104 GWENHYWFAR_API 
00105 GWEN_XMLNODE *GWEN_XmlCtx_GetCurrentNode(const GWEN_XML_CONTEXT *ctx);
00106 
00107 GWENHYWFAR_API 
00108 void GWEN_XmlCtx_SetCurrentHeader(GWEN_XML_CONTEXT *ctx, GWEN_XMLNODE *n);
00109 
00110 GWENHYWFAR_API 
00111 GWEN_XMLNODE *GWEN_XmlCtx_GetCurrentHeader(const GWEN_XML_CONTEXT *ctx);
00112 
00113 GWENHYWFAR_API 
00114 GWEN_XMLCTX_STARTTAG_FN GWEN_XmlCtx_SetStartTagFn(GWEN_XML_CONTEXT *ctx,
00115                                                   GWEN_XMLCTX_STARTTAG_FN f);
00116 
00117 GWENHYWFAR_API 
00118 GWEN_XMLCTX_ENDTAG_FN GWEN_XmlCtx_SetEndTagFn(GWEN_XML_CONTEXT *ctx,
00119                                               GWEN_XMLCTX_ENDTAG_FN f);
00120 
00121 GWENHYWFAR_API 
00122 GWEN_XMLCTX_ADDDATA_FN GWEN_XmlCtx_SetAddDataFn(GWEN_XML_CONTEXT *ctx,
00123                                                 GWEN_XMLCTX_ADDDATA_FN f);
00124 
00125 GWENHYWFAR_API 
00126 GWEN_XMLCTX_ADDCOMMENT_FN
00127   GWEN_XmlCtx_SetAddCommentFn(GWEN_XML_CONTEXT *ctx,
00128                               GWEN_XMLCTX_ADDCOMMENT_FN f);
00129 
00130 GWENHYWFAR_API 
00131 GWEN_XMLCTX_ADDATTR_FN GWEN_XmlCtx_SetAddAttrFn(GWEN_XML_CONTEXT *ctx,
00132                                                 GWEN_XMLCTX_ADDATTR_FN f);
00133 
00134 
00135 
00136 
00137 
00138 GWENHYWFAR_API 
00139 GWEN_XML_CONTEXT *GWEN_XmlCtxStore_new(GWEN_XMLNODE *n,
00140                                        uint32_t flags,
00141                                        uint32_t guiid,
00142                                        int timeout);
00143 
00144 
00145 #ifdef __cplusplus
00146 }
00147 #endif
00148 
00149 
00150 #endif
00151 

Generated by  doxygen 1.6.2