diff options
Diffstat (limited to 'include/m_xml.h')
-rw-r--r-- | include/m_xml.h | 120 |
1 files changed, 60 insertions, 60 deletions
diff --git a/include/m_xml.h b/include/m_xml.h index 0ad119d326..fe6932a41c 100644 --- a/include/m_xml.h +++ b/include/m_xml.h @@ -43,55 +43,55 @@ typedef struct {
size_t cbSize;
- HXML ( *createNode )( LPCTSTR name, LPCTSTR text, char isDeclaration );
- void ( *destroyNode )( HXML node );
-
- HXML ( *parseString )( LPCTSTR string, int* datalen, LPCTSTR tag );
- LPTSTR ( *toString )( HXML node, int* datalen );
-
- HXML ( *addChild )( HXML parent, LPCTSTR name, LPCTSTR text );
- void ( *addChild2 )( HXML child, HXML parent );
- HXML ( *copyNode )( HXML parent );
- HXML ( *getChild )( HXML parent, int number );
- int ( *getChildCount )( HXML );
- HXML ( *getChildByAttrValue )( HXML parent, LPCTSTR name, LPCTSTR attrName, LPCTSTR attrValue );
- HXML ( *getFirstChild )( HXML parent );
- HXML ( *getNthChild )( HXML parent, LPCTSTR name, int i );
- HXML ( *getNextChild )( HXML parent, LPCTSTR name, int *i );
- HXML ( *getChildByPath )( HXML parent, LPCTSTR path, char createNodeIfMissing );
- HXML ( *getNextNode )( HXML node );
- LPCTSTR ( *getName )( HXML );
- HXML ( *getParent )( HXML );
- LPCTSTR ( *getText )( HXML ); // = getTextByIndex(HXML, 0)
- void ( *setText )( HXML, LPCTSTR ); // = setTextByIndex(HXML, LPCTSTR, 0)
-
- LPCTSTR ( *getAttr )( HXML, int i );
- LPCTSTR ( *getAttrName )( HXML, int i );
- LPCTSTR ( *getAttrValue )( HXML, LPCTSTR attrName );
- int ( *getAttrCount )( HXML );
- void ( *addAttr )( HXML, LPCTSTR attrName, LPCTSTR attrValue );
- void ( *addAttrInt )( HXML, LPCTSTR attrName, int attrValue );
-
- void ( *freeMem )( void* );
+ HXML (*createNode)(LPCTSTR name, LPCTSTR text, char isDeclaration);
+ void (*destroyNode)(HXML node);
+
+ HXML (*parseString)(LPCTSTR string, int* datalen, LPCTSTR tag);
+ LPTSTR (*toString)(HXML node, int* datalen);
+
+ HXML (*addChild)(HXML parent, LPCTSTR name, LPCTSTR text);
+ void (*addChild2)(HXML child, HXML parent);
+ HXML (*copyNode)(HXML parent);
+ HXML (*getChild)(HXML parent, int number);
+ int (*getChildCount)(HXML);
+ HXML (*getChildByAttrValue)(HXML parent, LPCTSTR name, LPCTSTR attrName, LPCTSTR attrValue);
+ HXML (*getFirstChild)(HXML parent);
+ HXML (*getNthChild)(HXML parent, LPCTSTR name, int i);
+ HXML (*getNextChild)(HXML parent, LPCTSTR name, int *i);
+ HXML (*getChildByPath)(HXML parent, LPCTSTR path, char createNodeIfMissing);
+ HXML (*getNextNode)(HXML node);
+ LPCTSTR (*getName)(HXML);
+ HXML (*getParent)(HXML);
+ LPCTSTR (*getText)(HXML); // = getTextByIndex(HXML, 0)
+ void (*setText)(HXML, LPCTSTR); // = setTextByIndex(HXML, LPCTSTR, 0)
+
+ LPCTSTR (*getAttr)(HXML, int i);
+ LPCTSTR (*getAttrName)(HXML, int i);
+ LPCTSTR (*getAttrValue)(HXML, LPCTSTR attrName);
+ int (*getAttrCount)(HXML);
+ void (*addAttr)(HXML, LPCTSTR attrName, LPCTSTR attrValue);
+ void (*addAttrInt)(HXML, LPCTSTR attrName, int attrValue);
+
+ void (*freeMem)(void*);
// methods added in XML API v2
- char ( *isDeclaration )( HXML );
- LPTSTR ( *toStringWithFormatting )( HXML node, int* datalen );
- HXML ( *deepCopy )( HXML );
- void ( *setAttrByIndex )( HXML, int i, LPCTSTR value );
- void ( *setAttrByName )( HXML, LPCTSTR name, LPCTSTR value );
- HXML ( *addChildEx )( HXML parent, LPCTSTR name, char isDeclaration, XML_ELEMENT_POS n );
- void ( *addChildEx2 )( HXML child, HXML parent, XML_ELEMENT_POS n );
- int ( *getTextCount )( HXML );
- LPCTSTR ( *getTextByIndex )( HXML, int i );
- void ( *addText )( HXML, LPCTSTR, XML_ELEMENT_POS n );
- void ( *setTextByIndex )( HXML, int i, LPCTSTR );
- int ( *getClearCount )( HXML );
- LPCTSTR ( *getClear )( HXML, int i, LPCTSTR *openTag, LPCTSTR *closeTag );
- void ( *addClear )( HXML, LPCTSTR lpszValue, LPCTSTR openTag, LPCTSTR closeTag, XML_ELEMENT_POS n );
- void ( *setClear )( HXML, int i, LPCTSTR lpszValue );
- int ( *getElementCount )( HXML );
- int ( *getElement )( HXML, XML_ELEMENT_POS n, XML_ELEMENT_TYPE *type, HXML *child, LPCTSTR *value, LPCTSTR *name, LPCTSTR *openTag, LPCTSTR *closeTag );
+ char (*isDeclaration)(HXML);
+ LPTSTR (*toStringWithFormatting)(HXML node, int* datalen);
+ HXML (*deepCopy)(HXML);
+ void (*setAttrByIndex)(HXML, int i, LPCTSTR value);
+ void (*setAttrByName)(HXML, LPCTSTR name, LPCTSTR value);
+ HXML (*addChildEx)(HXML parent, LPCTSTR name, char isDeclaration, XML_ELEMENT_POS n);
+ void (*addChildEx2)(HXML child, HXML parent, XML_ELEMENT_POS n);
+ int (*getTextCount)(HXML);
+ LPCTSTR (*getTextByIndex)(HXML, int i);
+ void (*addText)(HXML, LPCTSTR, XML_ELEMENT_POS n);
+ void (*setTextByIndex)(HXML, int i, LPCTSTR);
+ int (*getClearCount)(HXML);
+ LPCTSTR (*getClear)(HXML, int i, LPCTSTR *openTag, LPCTSTR *closeTag);
+ void (*addClear)(HXML, LPCTSTR lpszValue, LPCTSTR openTag, LPCTSTR closeTag, XML_ELEMENT_POS n);
+ void (*setClear)(HXML, int i, LPCTSTR lpszValue);
+ int (*getElementCount)(HXML);
+ int (*getElement)(HXML, XML_ELEMENT_POS n, XML_ELEMENT_TYPE *type, HXML *child, LPCTSTR *value, LPCTSTR *name, LPCTSTR *openTag, LPCTSTR *closeTag);
// With getElement() it's possible to enumerate all the different contents (attribute, child, text, clear) of the current node. The order is reflecting the order of the original file/string. NOTE: 0 <= i < getElementCount().
// type, child, value, name, openTag, closeTag will be filled on return, depending on type:
// for XML_ELEM_TYPE_CHILD, child is valid;
@@ -99,17 +99,17 @@ typedef struct // for XML_ELEM_TYPE_TEXT, value is valid;
// for XML_ELEM_TYPE_CLEAR, value, openTag and closeTag are valid.
- void ( *deleteNodeContent )( HXML ); // forces the deletion of the content of this node and the subtree
- void ( *deleteAttrByIndex )( HXML, int i );
- void ( *deleteAttrByName )( HXML, LPCTSTR name );
- void ( *deleteText )( HXML, int i );
- void ( *deleteClear )( HXML, int i );
-
- XML_ELEMENT_POS ( *positionOfChildByIndex )( HXML, int i );
- XML_ELEMENT_POS ( *positionOfChildByNode )( HXML, HXML );
- XML_ELEMENT_POS ( *positionOfChildByName )( HXML, LPCTSTR name, int i );
- XML_ELEMENT_POS ( *positionOfText )( HXML, int i );
- XML_ELEMENT_POS ( *positionOfClear )( HXML, int i );
+ void (*deleteNodeContent)(HXML); // forces the deletion of the content of this node and the subtree
+ void (*deleteAttrByIndex)(HXML, int i);
+ void (*deleteAttrByName)(HXML, LPCTSTR name);
+ void (*deleteText)(HXML, int i);
+ void (*deleteClear)(HXML, int i);
+
+ XML_ELEMENT_POS (*positionOfChildByIndex)(HXML, int i);
+ XML_ELEMENT_POS (*positionOfChildByNode)(HXML, HXML);
+ XML_ELEMENT_POS (*positionOfChildByName)(HXML, LPCTSTR name, int i);
+ XML_ELEMENT_POS (*positionOfText)(HXML, int i);
+ XML_ELEMENT_POS (*positionOfClear)(HXML, int i);
}
XML_API;
@@ -129,10 +129,10 @@ returns TRUE if all is Ok, and FALSE otherwise #define MS_SYSTEM_GET_XI "Miranda/System/GetXmlApi"
-__forceinline int mir_getXI( XML_API* dest )
+__forceinline int mir_getXI(XML_API* dest)
{
dest->cbSize = sizeof(*dest);
- return CallService( MS_SYSTEM_GET_XI, 0, (LPARAM)dest );
+ return CallService(MS_SYSTEM_GET_XI, 0, (LPARAM)dest);
}
#endif // M_XML_H__
|