Chatterino
|
#include <SeventvEventAPI.hpp>
Public Member Functions | |
SeventvEventAPI (QString host, std::chrono::milliseconds defaultHeartbeatInterval=std::chrono::milliseconds(25000)) | |
void | subscribeUser (const QString &userID, const QString &emoteSetID) |
void | unsubscribeUser (const QString &id) |
void | unsubscribeEmoteSet (const QString &id) |
![]() | |
BasicPubSubManager (QString host) | |
BasicPubSubManager (const BasicPubSubManager &)=delete | |
BasicPubSubManager (const BasicPubSubManager &&)=delete | |
virtual | ~BasicPubSubManager ()=default |
BasicPubSubManager & | operator= (const BasicPubSubManager &)=delete |
BasicPubSubManager & | operator= (const BasicPubSubManager &&)=delete |
void | start () |
void | stop () |
Public Attributes | |
struct { | |
Signal< SeventvEventAPIEmoteAddDispatch > emoteAdded | |
Signal< SeventvEventAPIEmoteUpdateDispatch > emoteUpdated | |
Signal< SeventvEventAPIEmoteRemoveDispatch > emoteRemoved | |
Signal< SeventvEventAPIUserConnectionUpdateDispatch > userUpdated | |
} | signals_ |
![]() | |
std::atomic< uint32_t > | connectionsClosed |
std::atomic< uint32_t > | connectionsOpened |
std::atomic< uint32_t > | connectionsFailed |
struct { | |
std::atomic< uint32_t > connectionsClosed {0} | |
std::atomic< uint32_t > connectionsOpened {0} | |
std::atomic< uint32_t > connectionsFailed {0} | |
} | diag |
Protected Member Functions | |
std::shared_ptr< BasicPubSubClient< SeventvEventAPISubscription > > | createClient (liveupdates::WebsocketClient &client, websocketpp::connection_hdl hdl) override |
void | onMessage (websocketpp::connection_hdl hdl, BasicPubSubManager< SeventvEventAPISubscription >::WebsocketMessagePtr msg) override |
![]() | |
virtual void | onMessage (websocketpp::connection_hdl hdl, WebsocketMessagePtr msg)=0 |
std::shared_ptr< BasicPubSubClient< SeventvEventAPISubscription > > | findClient (websocketpp::connection_hdl hdl) |
void | unsubscribe (const SeventvEventAPISubscription &subscription) |
void | subscribe (const SeventvEventAPISubscription &subscription) |
Additional Inherited Members | |
![]() | |
using | WebsocketMessagePtr = websocketpp::config::asio_tls_client::message_type::ptr |
using | WebsocketContextPtr = websocketpp::lib::shared_ptr< boost::asio::ssl::context > |
chatterino::SeventvEventAPI::SeventvEventAPI | ( | QString | host, |
std::chrono::milliseconds | defaultHeartbeatInterval = std::chrono::milliseconds(25000) |
||
) |
|
overrideprotectedvirtual |
Reimplemented from chatterino::BasicPubSubManager< SeventvEventAPISubscription >.
|
overrideprotected |
void chatterino::SeventvEventAPI::subscribeUser | ( | const QString & | userID, |
const QString & | emoteSetID | ||
) |
Subscribes to a user and emote-set if not already subscribed.
userID | 7TV user-id, may be empty. |
emoteSetID | 7TV emote-set-id, may be empty. |
void chatterino::SeventvEventAPI::unsubscribeEmoteSet | ( | const QString & | id | ) |
Unsubscribes from an emote-set by its id
void chatterino::SeventvEventAPI::unsubscribeUser | ( | const QString & | id | ) |
Unsubscribes from a user by its 7TV user id
Signal<SeventvEventAPIEmoteAddDispatch> chatterino::SeventvEventAPI::emoteAdded |
Signal<SeventvEventAPIEmoteRemoveDispatch> chatterino::SeventvEventAPI::emoteRemoved |
Signal<SeventvEventAPIEmoteUpdateDispatch> chatterino::SeventvEventAPI::emoteUpdated |
struct { ... } chatterino::SeventvEventAPI::signals_ |
Signal<SeventvEventAPIUserConnectionUpdateDispatch> chatterino::SeventvEventAPI::userUpdated |