Planeshift
psWriteBookMessage Class Reference

#include <messages.h>

Public Types

enum  { REQUEST, RESPONSE, SAVE, SAVERESPONSE }
 

Public Member Functions

 PSF_DECLARE_MSG_FACTORY ()
 
 psWriteBookMessage (int slotID, int containerID)
 'Request to Write' message, from client to server. More...
 
 psWriteBookMessage (int slotID, int containerID, csString &title, csString &content)
 'Request to Save' message, from client to server More...
 
 psWriteBookMessage (uint32_t clientNum, csString &title, csString &content, bool success, int slotID, int containerID)
 Response from server, if success is false then content is the error message. More...
 
 psWriteBookMessage (uint32_t clientNum, csString &title, bool success)
 Response to Save from server to client. More...
 
 psWriteBookMessage (MsgEntry *me)
 
virtual csString ToString (NetBase::AccessPointers *accessPointers)
 Converts the message into human readable string. More...
 
- Public Member Functions inherited from psMessageCracker
void FireEvent ()
 Publishes the message to the local program. More...
 
virtual csString GetMessageTypeName () const =0
 Gets the name of the message type. More...
 
void Multicast (csArray< PublishDestination > &multi, uint32_t except, float range)
 Multicasts the message to all current connections. More...
 
 psMessageCracker ()
 
void SendMessage ()
 Sends the message to the client/server. More...
 
virtual ~psMessageCracker ()
 

Public Attributes

int containerID
 
csString content
 
uint8_t messagetype
 
int slotID
 
bool success
 
csString title
 
- Public Attributes inherited from psMessageCracker
int filterNumber
 
csRef< MsgEntry > msg
 
bool valid
 

Additional Inherited Members

- Static Public Attributes inherited from psMessageCracker
static MsgHandler * msghandler
 

Detailed Description

Definition at line 4502 of file messages.h.

Member Enumeration Documentation

anonymous enum
Enumerator
REQUEST 
RESPONSE 
SAVE 
SAVERESPONSE 

Definition at line 4535 of file messages.h.

Constructor & Destructor Documentation

psWriteBookMessage::psWriteBookMessage ( int  slotID,
int  containerID 
)

'Request to Write' message, from client to server.

psWriteBookMessage::psWriteBookMessage ( int  slotID,
int  containerID,
csString &  title,
csString &  content 
)

'Request to Save' message, from client to server

psWriteBookMessage::psWriteBookMessage ( uint32_t  clientNum,
csString &  title,
csString &  content,
bool  success,
int  slotID,
int  containerID 
)

Response from server, if success is false then content is the error message.

psWriteBookMessage::psWriteBookMessage ( uint32_t  clientNum,
csString &  title,
bool  success 
)

Response to Save from server to client.

psWriteBookMessage::psWriteBookMessage ( MsgEntry *  me)

Member Function Documentation

psWriteBookMessage::PSF_DECLARE_MSG_FACTORY ( )
virtual csString psWriteBookMessage::ToString ( NetBase::AccessPointers *  accessPointers)
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.

Member Data Documentation

int psWriteBookMessage::containerID

Definition at line 4532 of file messages.h.

csString psWriteBookMessage::content

Definition at line 4530 of file messages.h.

uint8_t psWriteBookMessage::messagetype

Definition at line 4529 of file messages.h.

int psWriteBookMessage::slotID

Definition at line 4531 of file messages.h.

bool psWriteBookMessage::success

Definition at line 4533 of file messages.h.

csString psWriteBookMessage::title

Definition at line 4530 of file messages.h.


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