diff options
author | George Hazan <ghazan@miranda.im> | 2022-09-28 21:26:25 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2022-09-28 21:26:25 +0300 |
commit | cd30b43a4da9327cb5d7cb054b889350aedcf7e7 (patch) | |
tree | 24885fd24c0ecb77fe7f1bb782bd71f0549d62dc /protocols/WhatsAppWeb/src/utils.h | |
parent | 96b7e711d06d0a673daf76a12c2bff4de14b0502 (diff) |
code cleaning
Diffstat (limited to 'protocols/WhatsAppWeb/src/utils.h')
-rw-r--r-- | protocols/WhatsAppWeb/src/utils.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/protocols/WhatsAppWeb/src/utils.h b/protocols/WhatsAppWeb/src/utils.h index 72d69c96f0..dfa98705c6 100644 --- a/protocols/WhatsAppWeb/src/utils.h +++ b/protocols/WhatsAppWeb/src/utils.h @@ -41,6 +41,7 @@ class WANode // kinda XML public: WANode(); + WANode(const char *pszTitle); ~WANode(); void addAttr(const char *pszName, const char *pszValue); @@ -53,6 +54,12 @@ public: std::list<WANode*> children; }; +__forceinline WANode& operator<<(WANode &node, const CHAR_PARAM ¶m) +{ + node.addAttr(param.szName, param.szValue); + return node; +} + class WAReader { const BYTE *m_buf, *m_limit; @@ -91,8 +98,8 @@ class WAWriter void writeInt20(int value); void writeLength(int value); void writeListSize(int tag); - void writePacked(const CMStringA &str); - void writeString(const char *str, bool bRaw = false); + void writePacked(const CMStringA &str, int tag); + void writeString(const char *str); bool writeToken(const char *str); public: |