9 #ifndef TTVSDK_CHATSESSION_H 10 #define TTVSDK_CHATSESSION_H 36 void SetWriter(std::shared_ptr<IChatWriteNetworkEvent> writer);
41 void Cap(
const std::string& subCommand,
const std::string& capabilities);
42 void Pass(
const std::string& pass);
43 void User(
const std::string& nick,
const std::string& name);
45 void Nick(
const std::string& nick);
46 void Join(
const std::string& channel,
const std::string& key = std::string());
47 void Part(
const std::string& channel,
const std::string& msg = std::string());
48 void Kick(
const std::string& channel,
const std::string& user,
const std::string& reason = std::string());
49 void Invite(
const std::string& user,
const std::string& channel);
50 void Topic(
const std::string& channel,
const std::string& topic = std::string());
51 void PrivMsg(
const std::string& target,
const std::string& msg);
52 void Action(
const std::string& target,
const std::string& msg);
53 void Notice(
const std::string& target,
const std::string& msg);
54 void CTCP(
const std::string& target,
const std::string& cmd,
const std::string& msg = std::string());
55 void CTCPReply(
const std::string& target,
const std::string& cmd,
const std::string& msg = std::string());
56 void CTCPPing(
const std::string& target);
57 void Whois(
const std::string& target);
58 void Mode(
const std::string& target,
const std::string& modes);
59 void UserHost(
const std::string& user);
60 void Quit(
const std::string& msg);
61 void Away(
const std::string& msg);
62 void Raw(
const std::string& text);
63 void Ping(
const std::string& target);
64 void Pong(
const std::string& target);
67 const std::string&
GetNick()
const;
68 void SetNick(
const std::string& nick);
69 bool IsMe(
const std::string& nick);
122 std::shared_ptr<IChatWriteNetworkEvent>
mWriter;
128 #endif // TTVSDK_CHATSESSION_H void OnKick(const ChatNetworkEvent &evt)
void OnPart(const ChatNetworkEvent &evt)
void OnJoin(const ChatNetworkEvent &evt)
void OnRplNamReply(const ChatNetworkEvent &evt)
void OnCTCPVersion(const ChatNetworkEvent &evt)
void SetWriter(std::shared_ptr< IChatWriteNetworkEvent > writer)
bool HasServerCapability(const std::string &cap)
bool IsMe(const std::string &nick)
std::vector< IChatReceiveNetworkEvent * > mEventHandlers
The child event handlers for incoming chat events.
Definition: chatsession.h:120
const std::string & GetNick() const
void OnConnect(const ChatNetworkEvent &evt)
Definition: chatsession.h:30
void OnDisconnect(const ChatNetworkEvent &evt)
uint64_t mLastActivity
Definition: chatsession.h:124
void CTCP(const std::string &target, const std::string &cmd, const std::string &msg=std::string())
void OnCTCPRplPing(const ChatNetworkEvent &evt)
void Action(const std::string &target, const std::string &msg)
Send an ACTION command to the server.
void OnNick(const ChatNetworkEvent &evt)
JSON (JavaScript Object Notation).
Definition: adsapi.h:16
void OnCTCPPing(const ChatNetworkEvent &evt)
void PrivMsg(const std::string &target, const std::string &msg)
Send a PRIVMSG command to the server.
void Topic(const std::string &channel, const std::string &topic=std::string())
Send a TOPIC command to the server.
std::string GetChannelTypes()
std::string GetServerCapability(const std::string &cap)
void OnPing(const ChatNetworkEvent &evt)
void Kick(const std::string &channel, const std::string &user, const std::string &reason=std::string())
Send a KICK command to the server.
void Mode(const std::string &target, const std::string &modes)
void Whois(const std::string &target)
void OnRplProtoCtl(const ChatNetworkEvent &evt)
void Pong(const std::string &target)
Send a PONG command to the server.
void Ping(const std::string &target)
Send a PING command to the server.
void Pass(const std::string &pass)
Send a PASS command to the server.
void InitDefaultServerCapabilities()
void Away(const std::string &msg)
void RemoveEventHandler(IChatReceiveNetworkEvent *handler)
bool IsConnected()
Definition: chatsession.h:71
void Invite(const std::string &user, const std::string &channel)
Send an INVITE command to the server.
void Quit(const std::string &msg)
Send a QUIT command to the server.
void OnRplList(const ChatNetworkEvent &evt)
void CTCPReply(const std::string &target, const std::string &cmd, const std::string &msg=std::string())
void Nick(const std::string &nick)
Send a NICK command to the server.
void CTCPPing(const std::string &target)
std::shared_ptr< IChatWriteNetworkEvent > mWriter
The stream writer.
Definition: chatsession.h:122
void Cap(const std::string &subCommand, const std::string &capabilities)
Send a CAP REQ command to the server, capabilities is a space separated list.
void GetChannelUserModes(std::string *letters, std::string *symbols)
void DispatchEvent(const ChatNetworkEvent &evt)
void Join(const std::string &channel, const std::string &key=std::string())
Send a JOIN command to the server.
void OnRplWelcome(const ChatNetworkEvent &evt)
void Raw(const std::string &text)
void Part(const std::string &channel, const std::string &msg=std::string())
Send a PART command to the server.
void OnQuit(const ChatNetworkEvent &evt)
void User(const std::string &nick, const std::string &name)
Send a USER command to the server.
void AddEventHandler(IChatReceiveNetworkEvent *handler)
bool mConnected
Definition: chatsession.h:125
void SetNick(const std::string &nick)
Definition: chatnetworkevent.h:86
void DoEvent(const ChatNetworkEvent &evt)
std::string mNick
Definition: chatsession.h:119
void TwitchClient()
Send a TWITCHCLIENT command to the server.
Definition: chatnetworkevent.h:29
void OnMode(const ChatNetworkEvent &evt)
void UserHost(const std::string &user)
void OnRplListStart(const ChatNetworkEvent &evt)
std::map< std::string, std::string > m_mapServerCaps
Definition: chatsession.h:117
void Notice(const std::string &target, const std::string &msg)
Send a NOTICE command to the server.
virtual void ReceiveEvent(const ChatNetworkEvent &evt)
Accept an incoming event.