Planeshift
Public Types | Public Member Functions | Public Attributes

psStopSongMessage Class Reference

This message is used by both server and client to stop a song. More...

#include <messages.h>

List of all members.

Public Types

enum  { NO_SONG_ERROR = 1, ILLEGAL_SCORE, NO_INSTRUMENT }

Public Member Functions

 PSF_DECLARE_MSG_FACTORY ()
 psStopSongMessage ()
 Constructor used by the client to notice the song's interruption to the server.
 psStopSongMessage (uint32_t client, uint32_t songID, bool toPlayer, int8_t errorCode)
 Constructor used by the server to notice clients about stopped songs.
 psStopSongMessage (MsgEntry *me)
 Constructor from a MsgEntry.
virtual csString ToString (NetBase::AccessPointers *)
 Converts the message into human readable string.

Public Attributes

int8_t errorCode
uint32_t songID
bool toPlayer

Detailed Description

This message is used by both server and client to stop a song.

It can also be used by the server to report an error.

Definition at line 5550 of file messages.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
NO_SONG_ERROR 
ILLEGAL_SCORE 
NO_INSTRUMENT 

Definition at line 5554 of file messages.h.


Constructor & Destructor Documentation

psStopSongMessage::psStopSongMessage ( )

Constructor used by the client to notice the song's interruption to the server.

psStopSongMessage::psStopSongMessage ( uint32_t  client,
uint32_t  songID,
bool  toPlayer,
int8_t  errorCode 
)

Constructor used by the server to notice clients about stopped songs.

Parameters:
clientthe client's ID that will receive the message.
songIDthe song's ID to stop.
toPlayertrue if this message is directed to the player that plays the song.
errorCodecode used to comunicate failure to the client.
psStopSongMessage::psStopSongMessage ( MsgEntry me)

Constructor from a MsgEntry.

Parameters:
methe message entry.

Member Function Documentation

psStopSongMessage::PSF_DECLARE_MSG_FACTORY ( )
virtual csString psStopSongMessage::ToString ( NetBase::AccessPointers accessPointers) [inline, virtual]

Converts the message into human readable string.

Used when a message is Logged. Every message should implement a version of this function that print all data that was decoded when the message was initiated from a NetEntry. See psDRMessage::ToString for an example.

Parameters:
accessPointersA struct to a number of access pointers.
Returns:
Return a human readable string for the message.

Implements psMessageCracker.

Definition at line 5586 of file messages.h.


Member Data Documentation

Definition at line 5593 of file messages.h.

Definition at line 5591 of file messages.h.

Definition at line 5592 of file messages.h.


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