Planeshift
ClientSongManager Class Reference

This class connect the GUI and the server side of the instruments system to the sound plugin. More...

#include <clientsongmngr.h>

Public Member Functions

 ClientSongManager ()
 Constructor. More...
 
virtual void HandleMessage (MsgEntry *message)
 
void PlayMainPlayerSong (uint32_t itemID, const csString &musicalSheet)
 Makes the main player play the song in the given musical sheet and inform the server about it. More...
 
void StopMainPlayerSong (bool notifyServer)
 Stops the song played by the main player. More...
 
void Subscribe (iSongManagerListener *listener)
 Subscribe the given iSongManagerListener to this manager. More...
 
void Unsubscribe (iSongManagerListener *listener)
 Unsubscribe the given iSongManagerListener. More...
 
void Update ()
 This method handle the ended songs. More...
 
 ~ClientSongManager ()
 Destructor. More...
 
- Public Member Functions inherited from psClientNetSubscriber
virtual void HandleMessage (MsgEntry *msg, Client *)
 Interprets a received message and executes the command. More...
 
virtual bool Verify (MsgEntry *, unsigned int, Client *&)
 
virtual ~psClientNetSubscriber ()
 

Detailed Description

This class connect the GUI and the server side of the instruments system to the sound plugin.

It keeps and manage all the songs that are being played.

Definition at line 60 of file clientsongmngr.h.

Constructor & Destructor Documentation

ClientSongManager::ClientSongManager ( )

Constructor.

ClientSongManager::~ClientSongManager ( )

Destructor.

Member Function Documentation

virtual void ClientSongManager::HandleMessage ( MsgEntry message)
virtual

Implements psClientNetSubscriber.

void ClientSongManager::PlayMainPlayerSong ( uint32_t  itemID,
const csString &  musicalSheet 
)

Makes the main player play the song in the given musical sheet and inform the server about it.

Parameters
itemIDthe ID of the item that contains the musical sheet.
musicalSheetthe musical sheet into XML format.
void ClientSongManager::StopMainPlayerSong ( bool  notifyServer)

Stops the song played by the main player.

Parameters
notifyServertrue if the server must be notified about the stop.
void ClientSongManager::Subscribe ( iSongManagerListener listener)

Subscribe the given iSongManagerListener to this manager.

Parameters
listenerthe listener.
void ClientSongManager::Unsubscribe ( iSongManagerListener listener)

Unsubscribe the given iSongManagerListener.

Parameters
listenerthe listener.
void ClientSongManager::Update ( )

This method handle the ended songs.


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