|
pianod2
multisource multiuser scriptable networked music player
|
Send messages of various kinds to clients. More...
#include <config.h>#include <ctime>#include <string>#include <vector>#include <ostream>#include <exception>#include <memory>#include "fundamentals.h"#include "musictypes.h"#include "retainer.h"

Go to the source code of this file.
Classes | |
| class | Response |
Type combining RESPONSE_CODE with a value or explanation: More... | |
| class | ResponseGroup |
Container for multiple Responses. More... | |
| class | ResponseCollector |
| A response collector/aggregator. More... | |
| class | CommandReply |
| This class is derived from ResponseCollector and adds success/failure adder functions and a few variables to support this. More... | |
| class | DataResponse |
| This class is derived from ResponseCollector, and adds no member variables but adds data adder functions. More... | |
Namespaces | |
| Football | |
| Football C++ connections, services and parsers. | |
| Parsnip | |
| Serialization and parsing library. | |
| JSON | |
| JSON::Key | |
Functions | |
| const char * | ResponseText (RESPONSE_CODE code) |
| Retrieve the text for a success, failure, event or data message. More... | |
| const char * | JSONFieldName (RESPONSE_CODE code) |
| Retrieve the JSON text for a response. More... | |
| std::string | format_duration (time_t duration, int minute_places=1) |
| Format a duration as minutes and seconds. More... | |
| Football::Thingie & | operator<< (Football::Thingie &there, const Response &response) |
Use << as output operator for Response. More... | |
| Football::Thingie & | operator<< (Football::Thingie *there, const Response &response) |
Use << as output operator for Response. More... | |
| PianodConnection & | operator<< (PianodConnection &there, const Response &response) |
| Use << as output operator for responses. More... | |
| PianodConnection & | operator<< (PianodConnection *there, const Response &response) |
Use << as output operator for Response. More... | |
| class PianodConnection & | operator<< (class PianodConnection &there, const ResponseCollector &response) |
| class PianodConnection & | operator<< (class PianodConnection *there, const ResponseCollector &response) |
Use << as output operator for ResponseCollector. More... | |
| void | sendUpdatedRatings (PianodConnection &conn, const PianodSong *song, CommandReply *reply) |
| Send updated ratings. More... | |
Variables | |
| const char * | JSON::Key::PlayDuration = Music::Key::SongDuration |
| const char * | JSON::Key::PlayPoint = "timeIndex" |
| const char * | JSON::Key::PlayRemaining = "timeRemaining" |
Send messages of various kinds to clients.
| std::string format_duration | ( | time_t | duration, |
| int | minute_places | ||
| ) |
Format a duration as minutes and seconds.
| duration | The duration. |
| minute_places | The minimum number of digits to use for minutes. If less than this are required, the duration is zero-padded. |

| const char* JSONFieldName | ( | RESPONSE_CODE | code | ) |
Retrieve the JSON text for a response.
| code | The number of the response. For status or error text use ResponseText. |


| class PianodConnection& operator<< | ( | class PianodConnection & | there, |
| const ResponseCollector & | response | ||
| ) |
|
inline |
Use << as output operator for ResponseCollector.
|
inline |
|
inline |
| PianodConnection& operator<< | ( | PianodConnection & | there, |
| const Response & | response | ||
| ) |
Use << as output operator for responses.
| there | The place to send the response. |
| response | The response or data to send. |

|
inline |
Use << as output operator for Response.
| const char* ResponseText | ( | RESPONSE_CODE | response | ) |
Retrieve the text for a success, failure, event or data message.
| response | The number of the status or datum. |

| void sendUpdatedRatings | ( | PianodConnection & | conn, |
| const PianodSong * | song, | ||
| CommandReply * | response | ||
| ) |
Send updated ratings.
| conn | The connection initiating the ratings change. |
| song | The ratings to send. |
| response | The reply in which ratings are inserted. |

