summaryrefslogtreecommitdiff
path: root/include/m_xml.h
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-06-18 20:53:59 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-06-18 20:53:59 +0000
commit3f23417a1099f73dc28ec1b7d6ec2a1a7fc2b7a2 (patch)
tree3e0bcd88c55dad310da0dc980e252bf9fbfa6dc5 /include/m_xml.h
parent537b94169bf2483798a651ee3b96f7904eebe7b4 (diff)
- PLUGININFO structure removed at all;
- Options_AddPage & UserInfo_AddPage replaced MS_OPT_ADDPAGE & MS_USERINFO_ADDPAGE services respectively - total internal redesign of options' translation - code reformatting git-svn-id: http://svn.miranda-ng.org/main/trunk@477 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'include/m_xml.h')
-rw-r--r--include/m_xml.h120
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__