aboutsummaryrefslogtreecommitdiff
path: root/include/aopacket.h
diff options
context:
space:
mode:
authoroldmud0 <oldmud0@users.noreply.github.com>2019-01-02 09:40:38 -0600
committerGitHub <noreply@github.com>2019-01-02 09:40:38 -0600
commit4d93f059c01664ad074cf467e79a63b85e86beb0 (patch)
tree57b8a9760796937e66e393b3bc00f4bee4337bdf /include/aopacket.h
parent6f1bce5882676ea7affe717a2f5a00b8c3b7fe12 (diff)
parentec1057b5d7e1d39963275bc2cbd79a53cf6f3f5c (diff)
Merge pull request #54 from OmniTroid/master
Restructuring + better cross-platform support
Diffstat (limited to 'include/aopacket.h')
-rw-r--r--include/aopacket.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/include/aopacket.h b/include/aopacket.h
new file mode 100644
index 0000000..21f6e0f
--- /dev/null
+++ b/include/aopacket.h
@@ -0,0 +1,32 @@
+#ifndef AOPACKET_H
+#define AOPACKET_H
+
+#include <QString>
+#include <QStringList>
+#include <QDebug>
+
+class AOPacket
+{
+public:
+ AOPacket(QString p_packet_string);
+ AOPacket(QString header, QStringList &p_contents);
+ ~AOPacket();
+
+ QString get_header() {return m_header;}
+ QStringList &get_contents() {return m_contents;}
+ QString to_string();
+
+ void encrypt_header(unsigned int p_key);
+ void decrypt_header(unsigned int p_key);
+
+ void net_encode();
+ void net_decode();
+
+private:
+ bool encrypted = false;
+
+ QString m_header;
+ QStringList m_contents;
+};
+
+#endif // AOPACKET_H