summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_xml.h
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-11-15 21:18:48 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-11-15 21:18:48 +0000
commit7ebaebba8520e457bf374ca245f52332fbb008be (patch)
tree55cf960e4981d9413befb1bf275a3fd067bf2534 /protocols/JabberG/src/jabber_xml.h
parent8353de363fc22940685b334cbb38c0378e9c1b71 (diff)
bye-bye old coding style in Jabber
git-svn-id: http://svn.miranda-ng.org/main/trunk@2322 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_xml.h')
-rw-r--r--protocols/JabberG/src/jabber_xml.h146
1 files changed, 73 insertions, 73 deletions
diff --git a/protocols/JabberG/src/jabber_xml.h b/protocols/JabberG/src/jabber_xml.h
index 0a1b41e511..c034e001cb 100644
--- a/protocols/JabberG/src/jabber_xml.h
+++ b/protocols/JabberG/src/jabber_xml.h
@@ -1,14 +1,14 @@
/*
Jabber Protocol Plugin for Miranda IM
-Copyright ( C ) 2002-04 Santithorn Bunchua
-Copyright ( C ) 2005-12 George Hazan
-Copyright ( C ) 2007 Maxim Mluhov
+Copyright (C) 2002-04 Santithorn Bunchua
+Copyright (C) 2005-12 George Hazan
+Copyright (C) 2007 Maxim Mluhov
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
-of the License, or ( at your option ) any later version.
+of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -26,48 +26,48 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_xml.h>
-void __fastcall xmlAddChild( HXML, HXML );
-HXML __fastcall xmlAddChild( HXML, LPCTSTR pszName );
-HXML __fastcall xmlAddChild( HXML, LPCTSTR pszName, LPCTSTR ptszValue );
-HXML __fastcall xmlAddChild( HXML, LPCTSTR pszName, int iValue );
-
-LPCTSTR __fastcall xmlGetAttrValue( HXML, LPCTSTR key );
-HXML __fastcall xmlGetChild( HXML, int n = 0 );
-HXML __fastcall xmlGetChild( HXML, LPCSTR key );
-HXML __fastcall xmlGetChild( HXML, LPCTSTR key );
-int __fastcall xmlGetChildCount( HXML );
-HXML __fastcall xmlGetChildByTag( HXML, LPCTSTR key, LPCTSTR attrName, LPCTSTR attrValue );
-HXML __fastcall xmlGetChildByTag( HXML, LPCSTR key, LPCSTR attrName, LPCTSTR attrValue );
-HXML __fastcall xmlGetNthChild( HXML, LPCTSTR key, int n = 0 );
-
-LPCTSTR __fastcall xmlGetName( HXML );
-LPCTSTR __fastcall xmlGetText( HXML );
-
-void __fastcall xmlAddAttr( HXML, LPCTSTR pszName, LPCTSTR ptszValue );
-void __fastcall xmlAddAttr( HXML, LPCTSTR pszName, int value );
-void __fastcall xmlAddAttr( HXML hXml, LPCTSTR pszName, unsigned __int64 value );
-void __fastcall xmlAddAttrID( HXML, int id );
-
-int __fastcall xmlGetAttrCount( HXML );
-LPCTSTR __fastcall xmlGetAttr( HXML, int n );
-LPCTSTR __fastcall xmlGetAttrName( HXML, int n );
-LPCTSTR __fastcall xmlGetAttrValue( HXML, LPCTSTR key );
+void __fastcall xmlAddChild(HXML, HXML);
+HXML __fastcall xmlAddChild(HXML, LPCTSTR pszName);
+HXML __fastcall xmlAddChild(HXML, LPCTSTR pszName, LPCTSTR ptszValue);
+HXML __fastcall xmlAddChild(HXML, LPCTSTR pszName, int iValue);
+
+LPCTSTR __fastcall xmlGetAttrValue(HXML, LPCTSTR key);
+HXML __fastcall xmlGetChild(HXML, int n = 0);
+HXML __fastcall xmlGetChild(HXML, LPCSTR key);
+HXML __fastcall xmlGetChild(HXML, LPCTSTR key);
+int __fastcall xmlGetChildCount(HXML);
+HXML __fastcall xmlGetChildByTag(HXML, LPCTSTR key, LPCTSTR attrName, LPCTSTR attrValue);
+HXML __fastcall xmlGetChildByTag(HXML, LPCSTR key, LPCSTR attrName, LPCTSTR attrValue);
+HXML __fastcall xmlGetNthChild(HXML, LPCTSTR key, int n = 0);
+
+LPCTSTR __fastcall xmlGetName(HXML);
+LPCTSTR __fastcall xmlGetText(HXML);
+
+void __fastcall xmlAddAttr(HXML, LPCTSTR pszName, LPCTSTR ptszValue);
+void __fastcall xmlAddAttr(HXML, LPCTSTR pszName, int value);
+void __fastcall xmlAddAttr(HXML hXml, LPCTSTR pszName, unsigned __int64 value);
+void __fastcall xmlAddAttrID(HXML, int id);
+
+int __fastcall xmlGetAttrCount(HXML);
+LPCTSTR __fastcall xmlGetAttr(HXML, int n);
+LPCTSTR __fastcall xmlGetAttrName(HXML, int n);
+LPCTSTR __fastcall xmlGetAttrValue(HXML, LPCTSTR key);
struct XmlNode
{
__forceinline XmlNode() { m_hXml = NULL; }
- __forceinline XmlNode( LPCTSTR pszString, int* numBytes, LPCTSTR ptszTag )
+ __forceinline XmlNode(LPCTSTR pszString, int* numBytes, LPCTSTR ptszTag)
{
- m_hXml = xi.parseString( pszString, numBytes, ptszTag );
+ m_hXml = xi.parseString(pszString, numBytes, ptszTag);
}
- XmlNode( const XmlNode& n );
- XmlNode( LPCTSTR name );
- XmlNode( LPCTSTR pszName, LPCTSTR ptszText );
+ XmlNode(const XmlNode& n);
+ XmlNode(LPCTSTR name);
+ XmlNode(LPCTSTR pszName, LPCTSTR ptszText);
~XmlNode();
- XmlNode& operator =( const XmlNode& n );
+ XmlNode& operator =(const XmlNode& n);
__forceinline operator HXML() const
{ return m_hXml;
@@ -81,16 +81,16 @@ class CJabberIqInfo;
struct XmlNodeIq : public XmlNode
{
- XmlNodeIq( const TCHAR* type, int id = -1, const TCHAR* to = NULL );
- XmlNodeIq( const TCHAR* type, const TCHAR* idStr, const TCHAR* to );
- XmlNodeIq( const TCHAR* type, HXML node, const TCHAR* to );
+ XmlNodeIq(const TCHAR *type, int id = -1, const TCHAR *to = NULL);
+ XmlNodeIq(const TCHAR *type, const TCHAR *idStr, const TCHAR *to);
+ XmlNodeIq(const TCHAR *type, HXML node, const TCHAR *to);
// new request
- XmlNodeIq( CJabberIqInfo* pInfo );
+ XmlNodeIq(CJabberIqInfo* pInfo);
// answer to request
- XmlNodeIq( const TCHAR* type, CJabberIqInfo* pInfo );
+ XmlNodeIq(const TCHAR *type, CJabberIqInfo* pInfo);
};
-typedef void ( *JABBER_XML_CALLBACK )( HXML, void* );
+typedef void (*JABBER_XML_CALLBACK)(HXML, void*);
/////////////////////////////////////////////////////////////////////////////////////////
@@ -98,14 +98,14 @@ struct XATTR
{
LPCTSTR name, value;
- __forceinline XATTR( LPCTSTR _name, LPCTSTR _value ) :
- name( _name ),
- value( _value )
+ __forceinline XATTR(LPCTSTR _name, LPCTSTR _value) :
+ name(_name),
+ value(_value)
{}
};
-HXML __forceinline operator<<( HXML node, const XATTR& attr )
-{ xmlAddAttr( node, attr.name, attr.value );
+HXML __forceinline operator<<(HXML node, const XATTR& attr)
+{ xmlAddAttr(node, attr.name, attr.value);
return node;
}
@@ -116,14 +116,14 @@ struct XATTRI
LPCTSTR name;
int value;
- __forceinline XATTRI( LPCTSTR _name, int _value ) :
- name( _name ),
- value( _value )
+ __forceinline XATTRI(LPCTSTR _name, int _value) :
+ name(_name),
+ value(_value)
{}
};
-HXML __forceinline operator<<( HXML node, const XATTRI& attr )
-{ xmlAddAttr( node, attr.name, attr.value );
+HXML __forceinline operator<<(HXML node, const XATTRI& attr)
+{ xmlAddAttr(node, attr.name, attr.value);
return node;
}
@@ -134,14 +134,14 @@ struct XATTRI64
LPCTSTR name;
unsigned __int64 value;
- __forceinline XATTRI64( LPCTSTR _name, unsigned __int64 _value ) :
- name( _name ),
- value( _value )
+ __forceinline XATTRI64(LPCTSTR _name, unsigned __int64 _value) :
+ name(_name),
+ value(_value)
{}
};
-HXML __forceinline operator<<( HXML node, const XATTRI64& attr )
-{ xmlAddAttr( node, attr.name, attr.value );
+HXML __forceinline operator<<(HXML node, const XATTRI64& attr)
+{ xmlAddAttr(node, attr.name, attr.value);
return node;
}
@@ -151,13 +151,13 @@ struct XATTRID
{
int id;
- __forceinline XATTRID( int _value ) :
- id( _value )
+ __forceinline XATTRID(int _value) :
+ id(_value)
{}
};
-HXML __forceinline operator<<( HXML node, const XATTRID& attr )
-{ xmlAddAttrID( node, attr.id );
+HXML __forceinline operator<<(HXML node, const XATTRID& attr)
+{ xmlAddAttrID(node, attr.id);
return node;
}
@@ -167,14 +167,14 @@ struct XCHILD
{
LPCTSTR name, value;
- __forceinline XCHILD( LPCTSTR _name, LPCTSTR _value = NULL ) :
- name( _name ),
- value( _value )
+ __forceinline XCHILD(LPCTSTR _name, LPCTSTR _value = NULL) :
+ name(_name),
+ value(_value)
{}
};
-HXML __forceinline operator<<( HXML node, const XCHILD& child )
-{ return xmlAddChild( node, child.name, child.value );
+HXML __forceinline operator<<(HXML node, const XCHILD& child)
+{ return xmlAddChild(node, child.name, child.value);
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -183,13 +183,13 @@ struct XCHILDNS
{
LPCTSTR name, ns;
- __forceinline XCHILDNS( LPCTSTR _name, LPCTSTR _ns = NULL ) :
- name( _name ),
- ns( _ns )
+ __forceinline XCHILDNS(LPCTSTR _name, LPCTSTR _ns = NULL) :
+ name(_name),
+ ns(_ns)
{}
};
-HXML __fastcall operator<<( HXML node, const XCHILDNS& child );
+HXML __fastcall operator<<(HXML node, const XCHILDNS& child);
/////////////////////////////////////////////////////////////////////////////////////////
@@ -197,12 +197,12 @@ struct XQUERY
{
LPCTSTR ns;
- __forceinline XQUERY( LPCTSTR _ns ) :
- ns( _ns )
+ __forceinline XQUERY(LPCTSTR _ns) :
+ ns(_ns)
{}
};
-HXML __fastcall operator<<( HXML node, const XQUERY& child );
+HXML __fastcall operator<<(HXML node, const XQUERY& child);
/////////////////////////////////////////////////////////////////////////////////////////
// Limited XPath support