atrooney-online-2/include/aopacket.h
oldmud0 13942345c6 Run clang-format on entire project
Indentation fixed to 2 spaces per tab. Braces set to Stroustrup style.
Lines reflow at 80 characters. One-line method bodies are on the same
line as the signature. Space always after `//`. No indentation
on preprocessor macros. Includes are sorted lexicographically.

If you don't want to see this commit on blames, use the hidden
whitespace option on GitHub, or use `-w` in git-blame.
2020-04-17 21:57:16 -05:00

32 lines
589 B
C++

#ifndef AOPACKET_H
#define AOPACKET_H
#include <QDebug>
#include <QString>
#include <QStringList>
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