diff options
author | Anas Nashif <anas.nashif@intel.com> | 2013-09-20 04:45:41 -0400 |
---|---|---|
committer | Anas Nashif <anas.nashif@intel.com> | 2013-09-20 04:45:41 -0400 |
commit | 6b6383d52bc147134bb6b60b07e924b176c67e3a (patch) | |
tree | 9753a1ec40b1fbe2acfaa881af46e3c0f7da6401 /include/xmlsec/nodeset.h | |
parent | 07bb297329b9e9754d09dcb6d70417272a626619 (diff) | |
download | xmlsec1-6b6383d52bc147134bb6b60b07e924b176c67e3a.tar.gz xmlsec1-6b6383d52bc147134bb6b60b07e924b176c67e3a.tar.bz2 xmlsec1-6b6383d52bc147134bb6b60b07e924b176c67e3a.zip |
Imported Upstream version 1.2.19
Diffstat (limited to 'include/xmlsec/nodeset.h')
-rw-r--r-- | include/xmlsec/nodeset.h | 150 |
1 files changed, 75 insertions, 75 deletions
diff --git a/include/xmlsec/nodeset.h b/include/xmlsec/nodeset.h index 76304670..104e04fa 100644 --- a/include/xmlsec/nodeset.h +++ b/include/xmlsec/nodeset.h @@ -1,48 +1,48 @@ -/** +/** * XML Security Library (http://www.aleksey.com/xmlsec). * * Enchanced nodes Set * * This is free software; see Copyright file in the source * distribution for preciese wording. - * + * * Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com> */ #ifndef __XMLSEC_NODESET_H__ -#define __XMLSEC_NODESET_H__ +#define __XMLSEC_NODESET_H__ #ifdef __cplusplus extern "C" { -#endif /* __cplusplus */ +#endif /* __cplusplus */ #include <libxml/tree.h> #include <libxml/xpath.h> #include <xmlsec/xmlsec.h> -typedef struct _xmlSecNodeSet xmlSecNodeSet, *xmlSecNodeSetPtr; +typedef struct _xmlSecNodeSet xmlSecNodeSet, *xmlSecNodeSetPtr; -/** +/** * xmlSecNodeSetType: - * @xmlSecNodeSetNormal: nodes set = nodes in the list. - * @xmlSecNodeSetInvert: nodes set = all document nodes minus nodes in the list. - * @xmlSecNodeSetTree: nodes set = nodes in the list and all their subtress. - * @xmlSecNodeSetTreeWithoutComments: nodes set = nodes in the list and - * all their subtress but no comment nodes. - * @xmlSecNodeSetTreeInvert: nodes set = all document nodes minus nodes in the - * list and all their subtress. - * @xmlSecNodeSetTreeWithoutCommentsInvert: nodes set = all document nodes - * minus (nodes in the list and all their subtress - * plus all comment nodes). - * @xmlSecNodeSetList: nodes set = all nodes in the chidren list of nodes sets. - * + * @xmlSecNodeSetNormal: nodes set = nodes in the list. + * @xmlSecNodeSetInvert: nodes set = all document nodes minus nodes in the list. + * @xmlSecNodeSetTree: nodes set = nodes in the list and all their subtress. + * @xmlSecNodeSetTreeWithoutComments: nodes set = nodes in the list and + * all their subtress but no comment nodes. + * @xmlSecNodeSetTreeInvert: nodes set = all document nodes minus nodes in the + * list and all their subtress. + * @xmlSecNodeSetTreeWithoutCommentsInvert: nodes set = all document nodes + * minus (nodes in the list and all their subtress + * plus all comment nodes). + * @xmlSecNodeSetList: nodes set = all nodes in the chidren list of nodes sets. + * * The basic nodes sets types. */ typedef enum { xmlSecNodeSetNormal = 0, xmlSecNodeSetInvert, xmlSecNodeSetTree, - xmlSecNodeSetTreeWithoutComments, + xmlSecNodeSetTreeWithoutComments, xmlSecNodeSetTreeInvert, xmlSecNodeSetTreeWithoutCommentsInvert, xmlSecNodeSetList @@ -50,10 +50,10 @@ typedef enum { /** * xmlSecNodeSetOp: - * @xmlSecNodeSetIntersection: intersection. - * @xmlSecNodeSetSubtraction: subtraction. - * @xmlSecNodeSetUnion: union. - * + * @xmlSecNodeSetIntersection: intersection. + * @xmlSecNodeSetSubtraction: subtraction. + * @xmlSecNodeSetUnion: union. + * * The simple nodes sets operations. */ typedef enum { @@ -64,73 +64,73 @@ typedef enum { /** * xmlSecNodeSet: - * @nodes: the nodes list. - * @doc: the parent XML document. - * @destroyDoc: the flag: if set to 1 then @doc will - * be destroyed when node set is destroyed. - * @type: the nodes set type. - * @op: the operation type. - * @next: the next nodes set. - * @prev: the previous nodes set. - * @children: the children list (valid only if type - * equal to #xmlSecNodeSetList). + * @nodes: the nodes list. + * @doc: the parent XML document. + * @destroyDoc: the flag: if set to 1 then @doc will + * be destroyed when node set is destroyed. + * @type: the nodes set type. + * @op: the operation type. + * @next: the next nodes set. + * @prev: the previous nodes set. + * @children: the children list (valid only if type + * equal to #xmlSecNodeSetList). * * The enchanced nodes set. */ struct _xmlSecNodeSet { - xmlNodeSetPtr nodes; - xmlDocPtr doc; - int destroyDoc; - xmlSecNodeSetType type; - xmlSecNodeSetOp op; - xmlSecNodeSetPtr next; - xmlSecNodeSetPtr prev; - xmlSecNodeSetPtr children; + xmlNodeSetPtr nodes; + xmlDocPtr doc; + int destroyDoc; + xmlSecNodeSetType type; + xmlSecNodeSetOp op; + xmlSecNodeSetPtr next; + xmlSecNodeSetPtr prev; + xmlSecNodeSetPtr children; }; /** * xmlSecNodeSetWalkCallback: - * @nset: the pointer to #xmlSecNodeSet structure. - * @cur: the pointer current XML node. - * @parent: the pointer to the @cur parent node. - * @data: the pointer to application specific data. + * @nset: the pointer to #xmlSecNodeSet structure. + * @cur: the pointer current XML node. + * @parent: the pointer to the @cur parent node. + * @data: the pointer to application specific data. * * The callback function called once per each node in the nodes set. * * Returns: 0 on success or a negative value if an error occurs * an walk procedure should be interrupted. */ -typedef int (*xmlSecNodeSetWalkCallback) (xmlSecNodeSetPtr nset, - xmlNodePtr cur, - xmlNodePtr parent, - void* data); +typedef int (*xmlSecNodeSetWalkCallback) (xmlSecNodeSetPtr nset, + xmlNodePtr cur, + xmlNodePtr parent, + void* data); + +XMLSEC_EXPORT xmlSecNodeSetPtr xmlSecNodeSetCreate (xmlDocPtr doc, + xmlNodeSetPtr nodes, + xmlSecNodeSetType type); +XMLSEC_EXPORT void xmlSecNodeSetDestroy (xmlSecNodeSetPtr nset); +XMLSEC_EXPORT void xmlSecNodeSetDocDestroy (xmlSecNodeSetPtr nset); +XMLSEC_EXPORT int xmlSecNodeSetContains (xmlSecNodeSetPtr nset, + xmlNodePtr node, + xmlNodePtr parent); +XMLSEC_EXPORT xmlSecNodeSetPtr xmlSecNodeSetAdd (xmlSecNodeSetPtr nset, + xmlSecNodeSetPtr newNSet, + xmlSecNodeSetOp op); +XMLSEC_EXPORT xmlSecNodeSetPtr xmlSecNodeSetAddList (xmlSecNodeSetPtr nset, + xmlSecNodeSetPtr newNSet, + xmlSecNodeSetOp op); +XMLSEC_EXPORT xmlSecNodeSetPtr xmlSecNodeSetGetChildren(xmlDocPtr doc, + const xmlNodePtr parent, + int withComments, + int invert); +XMLSEC_EXPORT int xmlSecNodeSetWalk (xmlSecNodeSetPtr nset, + xmlSecNodeSetWalkCallback walkFunc, + void* data); +XMLSEC_EXPORT int xmlSecNodeSetDumpTextNodes(xmlSecNodeSetPtr nset, + xmlOutputBufferPtr out); +XMLSEC_EXPORT void xmlSecNodeSetDebugDump (xmlSecNodeSetPtr nset, + FILE *output); -XMLSEC_EXPORT xmlSecNodeSetPtr xmlSecNodeSetCreate (xmlDocPtr doc, - xmlNodeSetPtr nodes, - xmlSecNodeSetType type); -XMLSEC_EXPORT void xmlSecNodeSetDestroy (xmlSecNodeSetPtr nset); -XMLSEC_EXPORT void xmlSecNodeSetDocDestroy (xmlSecNodeSetPtr nset); -XMLSEC_EXPORT int xmlSecNodeSetContains (xmlSecNodeSetPtr nset, - xmlNodePtr node, - xmlNodePtr parent); -XMLSEC_EXPORT xmlSecNodeSetPtr xmlSecNodeSetAdd (xmlSecNodeSetPtr nset, - xmlSecNodeSetPtr newNSet, - xmlSecNodeSetOp op); -XMLSEC_EXPORT xmlSecNodeSetPtr xmlSecNodeSetAddList (xmlSecNodeSetPtr nset, - xmlSecNodeSetPtr newNSet, - xmlSecNodeSetOp op); -XMLSEC_EXPORT xmlSecNodeSetPtr xmlSecNodeSetGetChildren(xmlDocPtr doc, - const xmlNodePtr parent, - int withComments, - int invert); -XMLSEC_EXPORT int xmlSecNodeSetWalk (xmlSecNodeSetPtr nset, - xmlSecNodeSetWalkCallback walkFunc, - void* data); -XMLSEC_EXPORT int xmlSecNodeSetDumpTextNodes(xmlSecNodeSetPtr nset, - xmlOutputBufferPtr out); -XMLSEC_EXPORT void xmlSecNodeSetDebugDump (xmlSecNodeSetPtr nset, - FILE *output); - #ifdef __cplusplus } #endif /* __cplusplus */ |