From 89f3cf8bbb9dc1fa0fe72f6af6638ac086c7e011 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Wed, 29 Nov 2017 09:33:41 +0300 Subject: libevent, telegram, whatsapp moved to deprecated coz doesn't work --- .../WhatsApp/src/WhatsAPI++/ProtocolTreeNode.h | 81 ---------------------- 1 file changed, 81 deletions(-) delete mode 100644 protocols/WhatsApp/src/WhatsAPI++/ProtocolTreeNode.h (limited to 'protocols/WhatsApp/src/WhatsAPI++/ProtocolTreeNode.h') diff --git a/protocols/WhatsApp/src/WhatsAPI++/ProtocolTreeNode.h b/protocols/WhatsApp/src/WhatsAPI++/ProtocolTreeNode.h deleted file mode 100644 index 50e0f4033d..0000000000 --- a/protocols/WhatsApp/src/WhatsAPI++/ProtocolTreeNode.h +++ /dev/null @@ -1,81 +0,0 @@ -/* -* ProtocolTreeNode.h -* -* Created on: 26/06/2012 -* Author: Antonio -*/ - -#if !defined(PROTOCOLNODE_H) -#define PROTOCOLNODE_H - -#include -#include -#include - -using namespace std; - -struct XATTR -{ - __forceinline XATTR(const char *_name, const char *_value) : - name(_name), value(_value) - {} - - __forceinline XATTR(const char *_name, const std::string &_value) : - name(_name), value(_value.c_str()) - {} - - __forceinline XATTR(const std::string &_name, const std::string &_value) : - name(_name.c_str()), value(_value.c_str()) - {} - - const char *name, *value; -}; - -struct XATTRI -{ - __forceinline XATTRI(const char *_name, int _value) : - name(_name), value(_value) - {} - - __forceinline XATTRI(const std::string &_name, int _value) : - name(_name.c_str()), value(_value) - {} - - const char *name; - int value; -}; - -class ProtocolTreeNode -{ - ProtocolTreeNode(const ProtocolTreeNode&); // to prevent copying - -public: - vector* data; - string tag; - map *attributes; - vector *children; - - ProtocolTreeNode(const string &tag, ProtocolTreeNode *child); - ProtocolTreeNode(const string &tag, vector *data = NULL, vector *children = NULL); - ~ProtocolTreeNode(); - - string toString() const; - ProtocolTreeNode* getChild(const string &id); - ProtocolTreeNode* getChild(size_t id); - const string& getAttributeValue(const string &attribute); - - vector getAllChildren(); - vector getAllChildren(const string &tag); - std::string getDataAsString() const; - - static bool tagEquals(ProtocolTreeNode *node, const string &tag); - static void require(ProtocolTreeNode *node, const string &tag); -}; - -ProtocolTreeNode& operator<<(ProtocolTreeNode&, const XATTR&); -ProtocolTreeNode* operator<<(ProtocolTreeNode*, const XATTR&); - -ProtocolTreeNode& operator<<(ProtocolTreeNode&, const XATTRI&); -ProtocolTreeNode* operator<<(ProtocolTreeNode*, const XATTRI&); - -#endif /* PROTOCOLNODE_H_ */ \ No newline at end of file -- cgit v1.2.3