|
pianod2
multisource multiuser scriptable networked music player
|
Type combining RESPONSE_CODE with a value or explanation:
More...
#include <response.h>

Public Types | |
| using | List = std::vector< std::string > |
Public Member Functions | |
| bool | isStatusChange () const |
| bool | isDataField () const |
| bool | isSuccess () const |
| bool | isCommandError () const |
| bool | isServerFailure () const |
| bool | isUserAction () const |
| void | bindUser (const class User *u) const |
| Associate a user triggering the response (for user actions & yells). More... | |
| void | transmitLine (Football::Thingie &there, int offset=TransmitUnaltered) const |
| Transmit a response using line protocol. More... | |
| Parsnip::Data | serialize () const |
| Format a response for JSON protocol. More... | |
| Response ()=default | |
| Response (const Response &)=default | |
| Response (Response &&)=default | |
| Response & | operator= (const Response &)=default |
| Response & | operator= (Response &&)=default |
| Response (RESPONSE_CODE msg) | |
| Response (RESPONSE_CODE msg, const std::string &details) | |
| Response (RESPONSE_CODE msg, long details) | |
| Response (RESPONSE_CODE msg, double details, int precision) | |
| Response (RESPONSE_CODE msg, List &&details, Parsnip::Data &&json_details) | |
| Response (const std::string ®ard, RESPONSE_CODE msg) | |
| Response (const std::string ®ard, RESPONSE_CODE msg, const std::string &details) | |
| Response (const std::string ®ard, RESPONSE_CODE msg, long details) | |
| Response (const std::string ®ard, RESPONSE_CODE msg, double details, int precision) | |
| Response (const std::string ®ard, RESPONSE_CODE msg, List &&details, Parsnip::Data &&json_details) | |
| Response (Retainer< MusicThingie * > rel, RESPONSE_CODE msg) | |
| Response (Retainer< MusicThingie * > rel, RESPONSE_CODE msg, const std::string &details) | |
| Response (Retainer< MusicThingie * > rel, RESPONSE_CODE msg, long details) | |
| Response (Retainer< MusicThingie * > rel, RESPONSE_CODE msg, double details, int precision) | |
| Response (Retainer< MusicThingie * > rel, RESPONSE_CODE msg, List &&details, Parsnip::Data &&json_details) | |
| Response (const CommandError &err) | |
| Response (const std::string ®ard, const CommandError &err) | |
| Response (Retainer< MusicThingie * > rel, const CommandError &err) | |
Static Public Attributes | |
| static constexpr int | TransmitUnaltered = 0 |
| Transmit data as stored. More... | |
| static constexpr int | TransmitAsDiagnostic = -100 |
| Transform command errors to diagnostic codes. More... | |
| static Parsnip::Data | NoJsonData { nullptr } |
Private Types | |
| enum class | Type { EMPTY , STRING , LONG , DOUBLE , WORDLIST } |
Private Attributes | |
| RESPONSE_CODE | message = NO_REPLY |
| Message code, initialized to "empty" value. More... | |
| Type | type { Type::EMPTY } |
| Type of additional data stored herein. More... | |
| std::string | value |
| long | long_value |
| double | double_value |
| int | double_precision |
| List | list |
| std::shared_ptr< Parsnip::Data > | json_data |
| Parsnip data to be used for JSON replies. More... | |
| std::string | regarding |
| ID or name of item response is in regards to. More... | |
| Retainer< MusicThingie * > | related |
| Music item to send, or in regards to. More... | |
| const class User * | user = nullptr |
| User triggering the response. More... | |
Friends | |
| class | ResponseCollector |
| class | ResponseGroup |
| class | CommandReply |
Type combining RESPONSE_CODE with a value or explanation:
| using Response::List = std::vector<std::string> |
|
strongprivate |
|
default |
|
default |
|
default |
| Response::Response | ( | RESPONSE_CODE | msg | ) |
| Response::Response | ( | RESPONSE_CODE | msg, |
| const std::string & | details | ||
| ) |
| Response::Response | ( | RESPONSE_CODE | msg, |
| long | details | ||
| ) |
| Response::Response | ( | RESPONSE_CODE | msg, |
| double | details, | ||
| int | precision | ||
| ) |
| Response::Response | ( | RESPONSE_CODE | msg, |
| List && | details, | ||
| Parsnip::Data && | json_details | ||
| ) |
| Response::Response | ( | const std::string & | regard, |
| RESPONSE_CODE | msg | ||
| ) |
| Response::Response | ( | const std::string & | regard, |
| RESPONSE_CODE | msg, | ||
| const std::string & | details | ||
| ) |
| Response::Response | ( | const std::string & | regard, |
| RESPONSE_CODE | msg, | ||
| long | details | ||
| ) |
| Response::Response | ( | const std::string & | regard, |
| RESPONSE_CODE | msg, | ||
| double | details, | ||
| int | precision | ||
| ) |
| Response::Response | ( | const std::string & | regard, |
| RESPONSE_CODE | msg, | ||
| List && | details, | ||
| Parsnip::Data && | json_details | ||
| ) |
| Response::Response | ( | Retainer< MusicThingie * > | rel, |
| RESPONSE_CODE | msg | ||
| ) |
| Response::Response | ( | Retainer< MusicThingie * > | rel, |
| RESPONSE_CODE | msg, | ||
| const std::string & | details | ||
| ) |
| Response::Response | ( | Retainer< MusicThingie * > | rel, |
| RESPONSE_CODE | msg, | ||
| long | details | ||
| ) |
| Response::Response | ( | Retainer< MusicThingie * > | rel, |
| RESPONSE_CODE | msg, | ||
| double | details, | ||
| int | precision | ||
| ) |
| Response::Response | ( | Retainer< MusicThingie * > | rel, |
| RESPONSE_CODE | msg, | ||
| List && | details, | ||
| Parsnip::Data && | json_details | ||
| ) |
| Response::Response | ( | const CommandError & | err | ) |
| Response::Response | ( | const std::string & | regard, |
| const CommandError & | err | ||
| ) |
| Response::Response | ( | Retainer< MusicThingie * > | rel, |
| const CommandError & | err | ||
| ) |
|
inline |
Associate a user triggering the response (for user actions & yells).
|
inline |


|
inline |


|
inline |


|
inline |


|
inline |


|
inline |


| Parsnip::Data Response::serialize | ( | ) | const |
Format a response for JSON protocol.


| void Response::transmitLine | ( | Football::Thingie & | destination, |
| int | offset = TransmitUnaltered |
||
| ) | const |
Transmit a response using line protocol.
| destination | The place to send it. |
| offset | If unspecified, sends messages as-is. Set to TransmitAsDiagnostic to send command error messages as diagnostics. |
< Assemble message before tranmission so we can log it too.


|
friend |
|
friend |
|
friend |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Message code, initialized to "empty" value.
|
static |
|
private |
ID or name of item response is in regards to.
|
private |
Music item to send, or in regards to.
|
staticconstexpr |
Transform command errors to diagnostic codes.
|
staticconstexpr |
Transmit data as stored.
|
private |
Type of additional data stored herein.
|
private |