|
Twitch SDK (Internal)
|
#include <chatsession.h>
Public Member Functions | |
| ChatSession () | |
| ~ChatSession () | |
| void | SetWriter (std::shared_ptr< IChatWriteNetworkEvent > writer) |
| void | AddEventHandler (IChatReceiveNetworkEvent *handler) |
| void | RemoveEventHandler (IChatReceiveNetworkEvent *handler) |
| void | Cap (const std::string &subCommand, const std::string &capabilities) |
| Send a CAP REQ command to the server, capabilities is a space separated list. More... | |
| void | Pass (const std::string &pass) |
| Send a PASS command to the server. More... | |
| void | User (const std::string &nick, const std::string &name) |
| Send a USER command to the server. More... | |
| void | TwitchClient () |
| Send a TWITCHCLIENT command to the server. More... | |
| void | Nick (const std::string &nick) |
| Send a NICK command to the server. More... | |
| void | Join (const std::string &channel, const std::string &key=std::string()) |
| Send a JOIN command to the server. More... | |
| void | Part (const std::string &channel, const std::string &msg=std::string()) |
| Send a PART command to the server. More... | |
| void | Kick (const std::string &channel, const std::string &user, const std::string &reason=std::string()) |
| Send a KICK command to the server. More... | |
| void | Invite (const std::string &user, const std::string &channel) |
| Send an INVITE command to the server. More... | |
| void | Topic (const std::string &channel, const std::string &topic=std::string()) |
| Send a TOPIC command to the server. More... | |
| void | PrivMsg (const std::string &target, const std::string &msg) |
| Send a PRIVMSG command to the server. More... | |
| void | Action (const std::string &target, const std::string &msg) |
| Send an ACTION command to the server. More... | |
| void | Notice (const std::string &target, const std::string &msg) |
| Send a NOTICE command to the server. More... | |
| void | CTCP (const std::string &target, const std::string &cmd, const std::string &msg=std::string()) |
| void | CTCPReply (const std::string &target, const std::string &cmd, const std::string &msg=std::string()) |
| void | CTCPPing (const std::string &target) |
| void | Whois (const std::string &target) |
| void | Mode (const std::string &target, const std::string &modes) |
| void | UserHost (const std::string &user) |
| void | Quit (const std::string &msg) |
| Send a QUIT command to the server. More... | |
| void | Away (const std::string &msg) |
| void | Raw (const std::string &text) |
| void | Ping (const std::string &target) |
| Send a PING command to the server. More... | |
| void | Pong (const std::string &target) |
| Send a PONG command to the server. More... | |
| void | List () |
| const std::string & | GetNick () const |
| void | SetNick (const std::string &nick) |
| bool | IsMe (const std::string &nick) |
| bool | IsConnected () |
| uint64_t | GetIdleTime () |
| std::string | GetChannelTypes () |
| void | GetChannelUserModes (std::string *letters, std::string *symbols) |
| bool | HasServerCapability (const std::string &cap) |
| std::string | GetServerCapability (const std::string &cap) |
| virtual void | ReceiveEvent (const ChatNetworkEvent &evt) |
| Accept an incoming event. More... | |
Protected Member Functions | |
| void | ResetIdleCounter () |
| void | DispatchEvent (const ChatNetworkEvent &evt) |
| void | DoEvent (const ChatNetworkEvent &evt) |
| void | InitDefaultServerCapabilities () |
| void | OnConnect (const ChatNetworkEvent &evt) |
| void | OnDisconnect (const ChatNetworkEvent &evt) |
| void | OnJoin (const ChatNetworkEvent &evt) |
| void | OnPart (const ChatNetworkEvent &evt) |
| void | OnKick (const ChatNetworkEvent &evt) |
| void | OnNick (const ChatNetworkEvent &evt) |
| void | OnQuit (const ChatNetworkEvent &evt) |
| void | OnPing (const ChatNetworkEvent &evt) |
| void | OnMode (const ChatNetworkEvent &evt) |
| void | OnCTCPPing (const ChatNetworkEvent &evt) |
| void | OnCTCPVersion (const ChatNetworkEvent &evt) |
| void | OnCTCPRplPing (const ChatNetworkEvent &evt) |
| void | OnRplNamReply (const ChatNetworkEvent &evt) |
| void | OnRplWelcome (const ChatNetworkEvent &evt) |
| void | OnRplProtoCtl (const ChatNetworkEvent &evt) |
| void | OnRplListStart (const ChatNetworkEvent &evt) |
| void | OnRplList (const ChatNetworkEvent &evt) |
Private Attributes | |
| std::map< std::string, std::string > | m_mapServerCaps |
| std::string | mNick |
| std::vector< IChatReceiveNetworkEvent * > | mEventHandlers |
| The child event handlers for incoming chat events. More... | |
| std::shared_ptr< IChatWriteNetworkEvent > | mWriter |
| The stream writer. More... | |
| uint64_t | mLastActivity |
| bool | mConnected |
A session wraps the event processing for a single channel.
| ttv::chat::ChatSession::ChatSession | ( | ) |
| ttv::chat::ChatSession::~ChatSession | ( | ) |
| void ttv::chat::ChatSession::Action | ( | const std::string & | target, |
| const std::string & | msg | ||
| ) |
Send an ACTION command to the server.
| void ttv::chat::ChatSession::AddEventHandler | ( | IChatReceiveNetworkEvent * | handler | ) |
| void ttv::chat::ChatSession::Away | ( | const std::string & | msg | ) |
| void ttv::chat::ChatSession::Cap | ( | const std::string & | subCommand, |
| const std::string & | capabilities | ||
| ) |
Send a CAP REQ command to the server, capabilities is a space separated list.
| void ttv::chat::ChatSession::CTCP | ( | const std::string & | target, |
| const std::string & | cmd, | ||
| const std::string & | msg = std::string() |
||
| ) |
| void ttv::chat::ChatSession::CTCPPing | ( | const std::string & | target | ) |
| void ttv::chat::ChatSession::CTCPReply | ( | const std::string & | target, |
| const std::string & | cmd, | ||
| const std::string & | msg = std::string() |
||
| ) |
|
protected |
|
protected |
| std::string ttv::chat::ChatSession::GetChannelTypes | ( | ) |
| void ttv::chat::ChatSession::GetChannelUserModes | ( | std::string * | letters, |
| std::string * | symbols | ||
| ) |
| uint64_t ttv::chat::ChatSession::GetIdleTime | ( | ) |
| const std::string& ttv::chat::ChatSession::GetNick | ( | ) | const |
| std::string ttv::chat::ChatSession::GetServerCapability | ( | const std::string & | cap | ) |
| bool ttv::chat::ChatSession::HasServerCapability | ( | const std::string & | cap | ) |
|
protected |
| void ttv::chat::ChatSession::Invite | ( | const std::string & | user, |
| const std::string & | channel | ||
| ) |
Send an INVITE command to the server.
|
inline |
| bool ttv::chat::ChatSession::IsMe | ( | const std::string & | nick | ) |
| void ttv::chat::ChatSession::Join | ( | const std::string & | channel, |
| const std::string & | key = std::string() |
||
| ) |
Send a JOIN command to the server.
| void ttv::chat::ChatSession::Kick | ( | const std::string & | channel, |
| const std::string & | user, | ||
| const std::string & | reason = std::string() |
||
| ) |
Send a KICK command to the server.
| void ttv::chat::ChatSession::List | ( | ) |
| void ttv::chat::ChatSession::Mode | ( | const std::string & | target, |
| const std::string & | modes | ||
| ) |
| void ttv::chat::ChatSession::Nick | ( | const std::string & | nick | ) |
Send a NICK command to the server.
| void ttv::chat::ChatSession::Notice | ( | const std::string & | target, |
| const std::string & | msg | ||
| ) |
Send a NOTICE command to the server.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
| void ttv::chat::ChatSession::Part | ( | const std::string & | channel, |
| const std::string & | msg = std::string() |
||
| ) |
Send a PART command to the server.
| void ttv::chat::ChatSession::Pass | ( | const std::string & | pass | ) |
Send a PASS command to the server.
| void ttv::chat::ChatSession::Ping | ( | const std::string & | target | ) |
Send a PING command to the server.
| void ttv::chat::ChatSession::Pong | ( | const std::string & | target | ) |
Send a PONG command to the server.
| void ttv::chat::ChatSession::PrivMsg | ( | const std::string & | target, |
| const std::string & | msg | ||
| ) |
Send a PRIVMSG command to the server.
| void ttv::chat::ChatSession::Quit | ( | const std::string & | msg | ) |
Send a QUIT command to the server.
| void ttv::chat::ChatSession::Raw | ( | const std::string & | text | ) |
|
virtual |
Accept an incoming event.
Implements ttv::chat::IChatReceiveNetworkEvent.
| void ttv::chat::ChatSession::RemoveEventHandler | ( | IChatReceiveNetworkEvent * | handler | ) |
|
protected |
| void ttv::chat::ChatSession::SetNick | ( | const std::string & | nick | ) |
| void ttv::chat::ChatSession::SetWriter | ( | std::shared_ptr< IChatWriteNetworkEvent > | writer | ) |
| void ttv::chat::ChatSession::Topic | ( | const std::string & | channel, |
| const std::string & | topic = std::string() |
||
| ) |
Send a TOPIC command to the server.
| void ttv::chat::ChatSession::TwitchClient | ( | ) |
Send a TWITCHCLIENT command to the server.
| void ttv::chat::ChatSession::User | ( | const std::string & | nick, |
| const std::string & | name | ||
| ) |
Send a USER command to the server.
| void ttv::chat::ChatSession::UserHost | ( | const std::string & | user | ) |
| void ttv::chat::ChatSession::Whois | ( | const std::string & | target | ) |
|
private |
|
private |
|
private |
The child event handlers for incoming chat events.
|
private |
|
private |
|
private |
The stream writer.
1.8.13