atrooney-online-2/include/aopacket.h
Crystalwarrior c8e12558cd Clang-ify the code with this styling using Visual Studio Code:
{ BasedOnStyle: LLVM, UseTab: Never, IndentWidth: 4, TabWidth: 4, BreakBeforeBraces: Stroustrup, AllowShortIfStatementsOnASingleLine: false, IndentCaseLabels: false, ColumnLimit: 0, AccessModifierOffset: -4, NamespaceIndentation: All }
(this is the Visual Studio preset with only "BreakBeforeBraces" changed from Allman to Stroustrup)
2020-05-22 01:18:24 +03:00

32 lines
615 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