Chatterino
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
chatterino::SeventvEventAPI Class Reference

#include <SeventvEventAPI.hpp>

Inheritance diagram for chatterino::SeventvEventAPI:
[legend]
Collaboration diagram for chatterino::SeventvEventAPI:
[legend]

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)
 
- Public Member Functions inherited from chatterino::BasicPubSubManager< SeventvEventAPISubscription >
 BasicPubSubManager (QString host)
 
 BasicPubSubManager (const BasicPubSubManager &)=delete
 
 BasicPubSubManager (const BasicPubSubManager &&)=delete
 
virtual ~BasicPubSubManager ()=default
 
BasicPubSubManageroperator= (const BasicPubSubManager &)=delete
 
BasicPubSubManageroperator= (const BasicPubSubManager &&)=delete
 
void start ()
 
void stop ()
 

Public Attributes

struct {
   Signal< SeventvEventAPIEmoteAddDispatch >   emoteAdded
 
   Signal< SeventvEventAPIEmoteUpdateDispatch >   emoteUpdated
 
   Signal< SeventvEventAPIEmoteRemoveDispatch >   emoteRemoved
 
   Signal< SeventvEventAPIUserConnectionUpdateDispatch >   userUpdated
 
signals_
 
- Public Attributes inherited from chatterino::BasicPubSubManager< SeventvEventAPISubscription >
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
 
- Protected Member Functions inherited from chatterino::BasicPubSubManager< SeventvEventAPISubscription >
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

- Protected Types inherited from chatterino::BasicPubSubManager< SeventvEventAPISubscription >
using WebsocketMessagePtr = websocketpp::config::asio_tls_client::message_type::ptr
 
using WebsocketContextPtr = websocketpp::lib::shared_ptr< boost::asio::ssl::context >
 

Constructor & Destructor Documentation

◆ SeventvEventAPI()

chatterino::SeventvEventAPI::SeventvEventAPI ( QString  host,
std::chrono::milliseconds  defaultHeartbeatInterval = std::chrono::milliseconds(25000) 
)

Member Function Documentation

◆ createClient()

std::shared_ptr< BasicPubSubClient< SeventvEventAPISubscription > > chatterino::SeventvEventAPI::createClient ( liveupdates::WebsocketClient client,
websocketpp::connection_hdl  hdl 
)
overrideprotectedvirtual

◆ onMessage()

void chatterino::SeventvEventAPI::onMessage ( websocketpp::connection_hdl  hdl,
BasicPubSubManager< SeventvEventAPISubscription >::WebsocketMessagePtr  msg 
)
overrideprotected
Here is the call graph for this function:

◆ subscribeUser()

void chatterino::SeventvEventAPI::subscribeUser ( const QString &  userID,
const QString &  emoteSetID 
)

Subscribes to a user and emote-set if not already subscribed.

Parameters
userID7TV user-id, may be empty.
emoteSetID7TV emote-set-id, may be empty.
Here is the call graph for this function:

◆ unsubscribeEmoteSet()

void chatterino::SeventvEventAPI::unsubscribeEmoteSet ( const QString &  id)

Unsubscribes from an emote-set by its id

Here is the call graph for this function:

◆ unsubscribeUser()

void chatterino::SeventvEventAPI::unsubscribeUser ( const QString &  id)

Unsubscribes from a user by its 7TV user id

Here is the call graph for this function:

Member Data Documentation

◆ emoteAdded

Signal<SeventvEventAPIEmoteAddDispatch> chatterino::SeventvEventAPI::emoteAdded

◆ emoteRemoved

Signal<SeventvEventAPIEmoteRemoveDispatch> chatterino::SeventvEventAPI::emoteRemoved

◆ emoteUpdated

Signal<SeventvEventAPIEmoteUpdateDispatch> chatterino::SeventvEventAPI::emoteUpdated

◆ signals_

struct { ... } chatterino::SeventvEventAPI::signals_

◆ userUpdated

Signal<SeventvEventAPIUserConnectionUpdateDispatch> chatterino::SeventvEventAPI::userUpdated

The documentation for this class was generated from the following files: