#include <apiwebsocketevent.h>
|
| APIWebSocketEvent (const std::string &name, const WebSocketConnection &connection, WebSocketInterface &wsInterface) |
|
| APIWebSocketEvent (std::string &&name, const WebSocketConnection &connection, WebSocketInterface &wsInterface) |
|
| APIWebSocketEvent (const std::string &name, const std::string &id, const WebSocketConnection &connection, WebSocketInterface &wsInterface) |
|
| APIWebSocketEvent (std::string &&name, std::string &&id, const WebSocketConnection &connection, WebSocketInterface &wsInterface) |
|
const WebSocketConnection & | getConnection () const |
|
WebSocketInterface & | getInterface () |
|
const WebSocketInterface & | getInterface () const |
|
| APIEvent (const std::string &name) |
|
| APIEvent (std::string &&name) |
|
| APIEvent (const std::string &name, const std::string &id) |
|
| APIEvent (std::string &&name, std::string &&id) |
|
const std::string & | getName () const |
|
const std::string & | getID () const |
|
template<typename T , typename... Args> |
APIArgument * | addArgument (const std::string &name, Args &&... args) |
|
APIArgument * | addArgument (std::unique_ptr< APIBaseValue > value) |
|
int | getCount () const |
|
const ArgumentConstIterator | getArguments () const |
|
const APIArgument * | getArgument (int index) const |
|
APIArgument * | getArgument (int index) |
|
const APIArgument * | getArgumentByName (std::string &&name) const |
|
APIArgument * | getArgumentByName (std::string &&name) |
|
bool | matches (const nap::APISignature &signature) const |
|
template<typename T > |
const T & | to () const |
|
template<typename T > |
T & | to () |
|
APIArgument & | operator[] (std::size_t idx) |
|
const APIArgument & | operator[] (std::size_t idx) const |
|
virtual | ~Event ()=default |
|
| Event ()=default |
|
| Event (const Event &)=delete |
|
Event & | operator= (const Event &)=delete |
|
◆ APIWebSocketEvent() [1/4]
Constructs a new web socket event with the given name and web-socket connection. A unique id is generated for this event.
- Parameters
-
name | the name of this call |
connection | the web-socket endpoint connection. |
wsInterface | interface this event originated from (client or server) |
◆ APIWebSocketEvent() [2/4]
Constructs a new web socket event with the given name and web-socket connection. A unique id is generated for this event.
- Parameters
-
name | the name of this call |
connection | the web-socket endpoint connection. |
wsInterface | interface this event originated from (client or server) |
◆ APIWebSocketEvent() [3/4]
Constructs a new web socket event with the given name, unique id and web-socket connection. Use this constructor to form a reply based on a previously received client request. The uuid should match the uuid of the request. This allows the client to match call id's.
- Parameters
-
name | the name of this call |
id | unique identifier of this call |
connection | the web-socket endpoint connection. |
wsInterface | interface this event originated from (client or server) |
◆ APIWebSocketEvent() [4/4]
Constructs a new web socket event with the given name, unique id and web-socket connection. Use this constructor to form a reply based on a previously received client request. The uuid should match the uuid of the request. This allows the client to match call id's.
- Parameters
-
name | the name of this call |
id | unique identifier of this call |
connection | the web-socket endpoint connection. |
wsInterface | interface this event originated from (client or server) |
◆ getConnection()
- Returns
- The web-socket connection associated with this event
◆ getInterface() [1/2]
Returns the interface that created this web-socket event. The interface is either an api server or client of type: APIWebSocketClient or APIWebSocketServer.
- Returns
- The web-socket interface associated with this event.
◆ getInterface() [2/2]
Returns the interface that created this web-socket event. The interface is either an api server or client of type: APIWebSocketClient or APIWebSocketServer.
- Returns
- The web-socket interface associated with this event.