pianod2
multisource multiuser scriptable networked music player
Public Member Functions | Public Attributes | Private Attributes | Friends | List of all members
PianodService Class Reference

Pianod service, a customized FootballService for Pianod connections. More...

#include <connection.h>

Inheritance diagram for PianodService:
Inheritance graph
[legend]
Collaboration diagram for PianodService:
Collaboration graph
[legend]

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)
 
AudioEngineaudioEngine ()
 
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)
 
PianodConnectionnewConnectionFromFile (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...
 
ConnectionnewConnectionFromFile (const std::string &filename)
 Create a new "connection" that reads from a file. More...
 
ConnectionnewLoopbackConnection (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

AudioEngineengine = nullptr
 
const std::string room_name
 

Friends

class ServiceManager
 

Additional Inherited Members

- Protected Member Functions inherited from Football::Service< PianodConnection >
virtual PianodConnectionallocNewConnection ()
 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 ServiceBasegetFromOld (FB_SERVICE *service)
 
- Protected Attributes inherited from Football::ServiceBase
FB_SERVICEservice
 Pointer to underlying Football service structure. More...
 

Detailed Description

Pianod service, a customized FootballService for Pianod connections.

Constructor & Destructor Documentation

◆ ~PianodService()

PianodService::~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 
)
Here is the call graph for this function:

Member Function Documentation

◆ announceToRoom() [1/2]

void PianodService::announceToRoom ( const Response announcement)

Send a message to all users in a room.

Parameters
announcementThe lone announcement to send.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ announceToRoom() [2/2]

void PianodService::announceToRoom ( const ResponseGroup announcements)

Send messages to all users in a room.

Parameters
announcementsThe announcements to send.
Here is the call graph for this function:

◆ audioEngine()

AudioEngine* PianodService::audioEngine ( )
inline
Here is the caller graph for this function:

◆ roomName()

const std::string& PianodService::roomName ( void  )
inline
Here is the caller graph for this function:

◆ serviceShutdown()

void PianodService::serviceShutdown ( void  )
virtual

When a service has been completely shut down, remove it from the service manager.

Reimplemented from Football::ServiceBase.

Here is the call graph for this function:

◆ usersChangedNotification()

void PianodService::usersChangedNotification ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

Friends And Related Function Documentation

◆ ServiceManager

friend class ServiceManager
friend

Member Data Documentation

◆ dispatch

PianodDispatcher PianodService::dispatch

◆ engine

AudioEngine* PianodService::engine = nullptr
private

◆ room_name

const std::string PianodService::room_name
private

The documentation for this class was generated from the following files: