pianod2
multisource multiuser scriptable networked music player
|
Pianod service, a customized FootballService for Pianod connections. More...
#include <connection.h>
Public Member Functions | |
~PianodService () | |
PianodService (const FB_SERVICE_OPTIONS &options, const std::string &room, const AudioSettings &audio, PianodService *parent, const Parsnip::ParserRef &parser, const PianodSchemaRef &schema) | |
AudioEngine * | audioEngine () |
void | serviceShutdown (void) |
When a service has been completely shut down, remove it from the service manager. More... | |
const std::string & | roomName (void) |
void | usersChangedNotification (void) |
void | announceToRoom (const Response &message) |
Send a message to all users in a room. More... | |
void | announceToRoom (const ResponseGroup &message) |
Send messages to all users in a room. More... | |
Public Member Functions inherited from Football::Service< PianodConnection > | |
Service (const FB_SERVICE_OPTIONS options, Service *parent=nullptr) | |
PianodConnection * | newConnectionFromFile (const std::string &filename) |
iterator | begin () |
const_iterator | begin () const |
iterator | end () |
const_iterator | end () const |
Public Member Functions inherited from Football::ServiceBase | |
void | close (void) |
Initiate shutdown of a service. More... | |
Connection * | newConnectionFromFile (const std::string &filename) |
Create a new "connection" that reads from a file. More... | |
Connection * | newLoopbackConnection (int *loopback) |
Create a new connection that loops back to the service. More... | |
virtual ssize_t | conditional_print (bool(*callback)(FB_CONNECTION *), const std::string &message) override |
Public Member Functions inherited from Football::Thingie | |
virtual | ~Thingie () |
ssize_t | print (const std::string &message) |
Add a string to the output queues. More... | |
ssize_t | conditional_broadcast (bool(*callback)(FB_CONNECTION *), const std::string &message) |
Send a message to some output queues depending on the callback function return value. More... | |
ssize_t | printf (const char *format,...) |
Add messages to output queues. More... | |
ssize_t | vprintf (const char *format, va_list parameters) |
ssize_t | bprintf (const char *format,...) |
ssize_t | bvprintf (const char *format, va_list parameters) |
ssize_t | cbprintf (bool(*callback)(FB_CONNECTION *), const char *format,...) |
ssize_t | cbvprintf (bool(*callback)(FB_CONNECTION *), const char *format, va_list parameters) |
virtual std::streamsize | xsputn (const char_type *data, std::streamsize count) override |
virtual int_type | overflow (int_type c) override |
Public Attributes | |
PianodDispatcher | dispatch |
Private Attributes | |
AudioEngine * | engine = nullptr |
const std::string | room_name |
Friends | |
class | ServiceManager |
Additional Inherited Members | |
Protected Member Functions inherited from Football::Service< PianodConnection > | |
virtual PianodConnection * | allocNewConnection () |
Factories for related types instead of generics. More... | |
Protected Member Functions inherited from Football::ServiceBase | |
virtual void * | myThingie (void) const final |
ServiceBase (FB_SERVICE_OPTIONS options, ServiceBase *parent=nullptr) | |
Create a new service with requested options. More... | |
virtual | ~ServiceBase () override |
Static Protected Member Functions inherited from Football::ServiceBase | |
static ServiceBase * | getFromOld (FB_SERVICE *service) |
Protected Attributes inherited from Football::ServiceBase | |
FB_SERVICE * | service |
Pointer to underlying Football service structure. More... | |
Pianod service, a customized FootballService for Pianod connections.
PianodService::~PianodService | ( | ) |
PianodService::PianodService | ( | const FB_SERVICE_OPTIONS & | options, |
const std::string & | room, | ||
const AudioSettings & | audio, | ||
PianodService * | parent, | ||
const Parsnip::ParserRef & | parser, | ||
const PianodSchemaRef & | schema | ||
) |
void PianodService::announceToRoom | ( | const Response & | announcement | ) |
Send a message to all users in a room.
announcement | The lone announcement to send. |
void PianodService::announceToRoom | ( | const ResponseGroup & | announcements | ) |
Send messages to all users in a room.
announcements | The announcements to send. |
|
inline |
|
inline |
|
virtual |
When a service has been completely shut down, remove it from the service manager.
Reimplemented from Football::ServiceBase.
void PianodService::usersChangedNotification | ( | void | ) |
|
friend |
PianodDispatcher PianodService::dispatch |
|
private |
|
private |