gwenhywfar
4.3.1
|
00001 /*************************************************************************** 00002 begin : Wed Feb 27 2008 00003 copyright : (C) 2008 by Martin Preuss 00004 email : martin@libchipcard.de 00005 00006 *************************************************************************** 00007 * * 00008 * This library is free software; you can redistribute it and/or * 00009 * modify it under the terms of the GNU Lesser General Public * 00010 * License as published by the Free Software Foundation; either * 00011 * version 2.1 of the License, or (at your option) any later version. * 00012 * * 00013 * This library is distributed in the hope that it will be useful, * 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 00016 * Lesser General Public License for more details. * 00017 * * 00018 * You should have received a copy of the GNU Lesser General Public * 00019 * License along with this library; if not, write to the Free Software * 00020 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * 00021 * MA 02111-1307 USA * 00022 * * 00023 ***************************************************************************/ 00024 00025 #ifndef GWENHYWFAR_XSDNODE_H 00026 #define GWENHYWFAR_XSDNODE_H 00027 00028 00029 typedef struct GWEN_XSD_NODE GWEN_XSD_NODE; 00030 00031 #include <gwenhywfar/inherit.h> 00032 #include <gwenhywfar/list1.h> 00033 00034 GWEN_INHERIT_FUNCTION_LIB_DEFS(GWEN_XSD_NODE, GWENHYWFAR_API) 00035 GWEN_LIST_FUNCTION_LIB_DEFS(GWEN_XSD_NODE, GWEN_XsdNode, GWENHYWFAR_API) 00036 00037 00038 #include <gwenhywfar/xml.h> 00039 #include <gwenhywfar/db.h> 00040 00041 00042 typedef enum { 00043 GWEN_Xsd_NodeType_Unknown=0, 00044 GWEN_Xsd_NodeType_Any, 00045 GWEN_Xsd_NodeType_Element, 00046 GWEN_Xsd_NodeType_Attribute, 00047 GWEN_Xsd_NodeType_ComplexType, 00048 GWEN_Xsd_NodeType_SimpleType, 00049 GWEN_Xsd_NodeType_Group, 00050 GWEN_Xsd_NodeType_AttributeGroup, 00051 GWEN_Xsd_NodeType_Facet 00052 } GWEN_XSD_NODETYPE; 00053 00054 00055 00056 GWEN_XSD_NODE *GWEN_XsdNode_new(GWEN_XSD_NODE *parent, 00057 GWEN_XSD_NODETYPE t, 00058 const char *name); 00059 void GWEN_XsdNode_free(GWEN_XSD_NODE *xsdNode); 00060 00061 00062 GWEN_XSD_NODETYPE GWEN_XsdNode_GetNodeType(const GWEN_XSD_NODE *xsdNode); 00063 const char *GWEN_XsdNode_GetName(const GWEN_XSD_NODE *xsdNode); 00064 00065 00066 GWEN_XSD_NODE *GWEN_XsdNode_GetParent(const GWEN_XSD_NODE *xsdNode); 00067 GWEN_XSD_NODE_LIST *GWEN_XsdNode_GetChildren(const GWEN_XSD_NODE *xsdNode); 00068 void GWEN_XsdNode_AddChild(GWEN_XSD_NODE *xsdNode, GWEN_XSD_NODE *newChild); 00069 void GWEN_XsdNode_Unlink(GWEN_XSD_NODE *xsdNode); 00070 00071 uint32_t GWEN_XsdNode_GetFlags(const GWEN_XSD_NODE *xsdNode); 00072 void GWEN_XsdNode_SetFlags(GWEN_XSD_NODE *xsdNode, uint32_t fl); 00073 void GWEN_XsdNode_AddFlags(GWEN_XSD_NODE *xsdNode, uint32_t fl); 00074 void GWEN_XsdNode_SubFlags(GWEN_XSD_NODE *xsdNode, uint32_t fl); 00075 00076 00077 int GWEN_XsdNode_Read(GWEN_XSD_NODE *xsdNode, 00078 GWEN_XMLNODE *xmlNode, 00079 GWEN_DB_NODE *db); 00080 00081 int GWEN_XsdNode_Write(GWEN_XSD_NODE *xsdNode, 00082 GWEN_XMLNODE *xmlNode, 00083 GWEN_DB_NODE *db); 00084 00085 00086 00087 #endif 00088