2023-12-17 03:29:08 -08:00
|
|
|
#pragma once
|
|
|
|
|
2023-12-17 15:00:08 -08:00
|
|
|
#include "EHS.h"
|
|
|
|
#include "Str.h"
|
2023-12-17 15:56:13 -08:00
|
|
|
#include "io/socket/TCP.h"
|
2023-12-17 03:29:08 -08:00
|
|
|
|
2023-12-17 15:56:13 -08:00
|
|
|
namespace ehs
|
2023-12-17 03:29:08 -08:00
|
|
|
{
|
|
|
|
class TwitchChat
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
TCP client;
|
|
|
|
Str_8 username;
|
|
|
|
Str_8 token;
|
|
|
|
Str_8 channel;
|
|
|
|
bool initialized;
|
|
|
|
|
|
|
|
public:
|
|
|
|
~TwitchChat();
|
|
|
|
|
|
|
|
TwitchChat();
|
|
|
|
|
|
|
|
TwitchChat(const Str_8& username);
|
|
|
|
|
|
|
|
TwitchChat(const Str_8& username, const Str_8& token);
|
|
|
|
|
|
|
|
TwitchChat(const TwitchChat& chat);
|
|
|
|
|
|
|
|
TwitchChat& operator=(const TwitchChat& chat);
|
|
|
|
|
|
|
|
void SetToken(const Str_8& newToken);
|
|
|
|
|
|
|
|
void Initialize();
|
|
|
|
|
|
|
|
void UnInitialize();
|
|
|
|
|
|
|
|
void JoinChannel(const Str_8& newChannel);
|
|
|
|
|
|
|
|
void LeaveChannel();
|
|
|
|
|
|
|
|
void SendPong();
|
|
|
|
|
|
|
|
void SendMsg(const Str_8& msg);
|
|
|
|
|
|
|
|
void WhisperMsg(const Str_8& user, const Str_8& msg);
|
|
|
|
|
|
|
|
Str_8 RecvMsg();
|
|
|
|
|
|
|
|
Str_8 GetUsername() const;
|
|
|
|
|
|
|
|
Str_8 GetChannel() const;
|
|
|
|
};
|
|
|
|
}
|