Loading...
Searching...
No Matches
DiscordGatewayDataProvider.qc.dox.h
// -*- mode: c++; indent-tabs-mode: nil -*-
namespace DiscordDataProvider {
const EVENT_MESSAGE_CREATE = "MESSAGE_CREATE";
class DiscordGatewayDataProvider : public DataProvider::AbstractDataProvider, public DataProvider::DelayedObservable, public DataProvider::Observer {
public:
const ProviderInfo = ...;
const ConstructorOptions = ...;
protected:
*DiscordWebSocketClient::DiscordWebSocketConnection conn;
*DiscordWebSocketClient::DiscordWebSocketClient ws;
public:
constructor(*hash<auto> options);
constructor(DiscordWebSocketClient::DiscordWebSocketClient ws);
constructor(DiscordWebSocketClient::DiscordWebSocketConnection conn);
destructor();
bool reconnect();
update(string event_id, hash<auto> msg);
hash<auto> getWebSocketInfo();
observersReady();
stopEvents();
string getName();
*string getDesc();
setLogger(*LoggerInterface logger);
static DiscordWebSocketClient::DiscordWebSocketClient getWebSocketConnection(*hash<auto> options, *Logger::LoggerInterface logger);
protected:
*hash<DataProviderConnectionInfo> getConnectionInfoImpl();
public:
protected:
hash<string, hash<DataProviderMessageInfo>> getEventTypesImpl();
public:
protected:
hash<DataProvider::DataProviderInfo> getStaticInfoImpl();
public:
};
};
DiscordDataProvider::DiscordGatewayDataProvider
The Discord gateway data provider class.
Definition DiscordGatewayDataProvider.qc.dox.h:31
DiscordDataProvider::DiscordGatewayDataProvider::setLogger
setLogger(*LoggerInterface logger)
Accepts a LoggerInterface object for logging (or clears it)
DiscordDataProvider::DiscordGatewayDataProvider::getConnectionInfoImpl
*hash< DataProviderConnectionInfo > getConnectionInfoImpl()
Returns connection info.
DiscordDataProvider::DiscordGatewayDataProvider::getWebSocketConnection
static DiscordWebSocketClient::DiscordWebSocketClient getWebSocketConnection(*hash< auto > options, *Logger::LoggerInterface logger)
Returns a DiscordWebSocketClient connection from the options.
DiscordDataProvider::DiscordGatewayDataProvider::getName
string getName()
Returns the data provider name.
DiscordDataProvider::DiscordGatewayDataProvider::conn
*DiscordWebSocketClient::DiscordWebSocketConnection conn
The connection object used to create the REST client.
Definition DiscordGatewayDataProvider.qc.dox.h:44
DiscordDataProvider::DiscordGatewayDataProvider::stopEvents
stopEvents()
Called to stop generating events.
DiscordDataProvider::DiscordGatewayDataProvider::getStaticInfoImpl
hash< DataProvider::DataProviderInfo > getStaticInfoImpl()
Returns data provider static info.
DiscordDataProvider::DiscordGatewayDataProvider::ConstructorOptions
const ConstructorOptions
Constructor options.
Definition DiscordGatewayDataProvider.qc.dox.h:39
DiscordDataProvider::DiscordGatewayDataProvider::observersReady
observersReady()
Called when all observers have been added to the object.
DiscordDataProvider::DiscordGatewayDataProvider::constructor
constructor(DiscordWebSocketClient::DiscordWebSocketClient ws)
Creates the object from a DiscordWebSocketClient.
DiscordDataProvider::DiscordGatewayDataProvider::getWebSocketInfo
hash< auto > getWebSocketInfo()
Returns information about the connection.
DiscordDataProvider::DiscordGatewayDataProvider::constructor
constructor(DiscordWebSocketClient::DiscordWebSocketConnection conn)
Creates the object from a DiscordWebSocketConnection.
DiscordDataProvider::DiscordGatewayDataProvider::ws
*DiscordWebSocketClient::DiscordWebSocketClient ws
The WebSocket client object.
Definition DiscordGatewayDataProvider.qc.dox.h:47
DiscordDataProvider::DiscordGatewayDataProvider::constructor
constructor(*hash< auto > options)
Creates the object from constructor options.
DiscordDataProvider::DiscordGatewayDataProvider::ProviderInfo
const ProviderInfo
Provider info.
Definition DiscordGatewayDataProvider.qc.dox.h:35
DiscordDataProvider::DiscordGatewayDataProvider::destructor
destructor()
Deletes the object.
DiscordDataProvider::DiscordGatewayDataProvider::getDesc
*string getDesc()
Returns the data provider description.
DiscordDataProvider::DiscordGatewayDataProvider::reconnect
bool reconnect()
Reconnects with the gateway immediately.
DiscordDataProvider::DiscordGatewayDataProvider::getEventTypesImpl
hash< string, hash< DataProviderMessageInfo > > getEventTypesImpl()
Returns a hash of all supported event types.
DiscordDataProvider::DiscordGatewayDataProvider::update
update(string event_id, hash< auto > msg)
This method is called when an event is raised.
DiscordDataProvider
Qore DiscordDataProvider module definition.
Definition DiscordDataProvider.qc.dox.h:26
DiscordDataProvider::EVENT_MESSAGE_CREATE
const EVENT_MESSAGE_CREATE
Discord MESSAGE_CREATE event constant.
Definition DiscordGatewayDataProvider.qc.dox.h:28