summaryrefslogtreecommitdiff
path: root/protocols/WhatsApp/src/WhatsAPI++/ProtocolTreeNode.h
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/WhatsApp/src/WhatsAPI++/ProtocolTreeNode.h')
-rw-r--r--protocols/WhatsApp/src/WhatsAPI++/ProtocolTreeNode.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/protocols/WhatsApp/src/WhatsAPI++/ProtocolTreeNode.h b/protocols/WhatsApp/src/WhatsAPI++/ProtocolTreeNode.h
index 6be09cef8d..aeb1b6e18e 100644
--- a/protocols/WhatsApp/src/WhatsAPI++/ProtocolTreeNode.h
+++ b/protocols/WhatsApp/src/WhatsAPI++/ProtocolTreeNode.h
@@ -45,15 +45,20 @@ struct XATTRI
int value;
};
-class ProtocolTreeNode {
+class ProtocolTreeNode
+{
+ ProtocolTreeNode(const ProtocolTreeNode&); // to prevent copying
+
public:
- vector<unsigned char>* data;
+ vector<unsigned char>* data;
string tag;
map<string, string> *attributes;
vector<ProtocolTreeNode*> *children;
ProtocolTreeNode(const string& tag, ProtocolTreeNode* child);
ProtocolTreeNode(const string& tag, vector<unsigned char>* data = NULL, vector<ProtocolTreeNode*> *children = NULL);
+ ~ProtocolTreeNode();
+
string toString() const;
ProtocolTreeNode* getChild(const string& id);
ProtocolTreeNode* getChild(size_t id);
@@ -65,8 +70,6 @@ public:
static bool tagEquals(ProtocolTreeNode *node, const string& tag);
static void require(ProtocolTreeNode *node, const string& tag);
-
- virtual ~ProtocolTreeNode();
};
ProtocolTreeNode& operator<<(ProtocolTreeNode&, const XATTR&);