Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CMailbox Class Reference

CMailbox. More...

#include <Mailbox.h>

List of all members.

Public Member Functions

 CMailbox ()
 CMailbox.
 ~CMailbox ()
 ~CMailbox
bool GetClientMsgAvail ()
 GetClientMsgAvail Check to see if there are client messages available for download.
bool GetHostMsgAvail ()
 GetClientMsgAvail Check to see if there are client messages available for download.
CMessageGetClientMsg ()
 GetClientMsg Download the oldest message sent TO the client.
CMessageGetHostMsg ()
 GetHostMsg Download the oldest message sent TO the host.
bool PostClientMsg (const CMessage *)
 PostClientMsg Send a client message.
bool PostHostMsg (const CMessage *)
 PostHostMsg Sends a host message TO the client associated with the mailbox.
void SetMute (bool bMute)
 SetMute.
bool GetMute () const
 GetMute.
void ClientCleanup ()
 ClientCleanup.
void HostCleanup ()
 HostCleanup.


Detailed Description

CMailbox.

Description: : The CMailBox class provides and interface between the the message dispatcher and the connected player.

Limitations: : None


Constructor & Destructor Documentation

CMailbox::CMailbox  ) 
 

CMailbox.

Description: This function initializes the internal class attributes.

Returns:
None
Limitations: None

CMailbox::~CMailbox  ) 
 

~CMailbox

Description: The destructor frees any memory allocated by the class.

Returns:
None
Limitations: None


Member Function Documentation

void CMailbox::ClientCleanup  ) 
 

ClientCleanup.

Description: Due to the possibility of memory corruption when sending messages between dll-resident object and the application, special memory deletion precautions must be taken. This function must be periodically called by the client (a CPlayer object) to clean up memory allocated in the client memory.

Returns:
void
Limitations: None

CMessage * CMailbox::GetClientMsg  ) 
 

GetClientMsg Download the oldest message sent TO the client.

Description: Attempts to retrieve the next message in the client-end queue. The returned message, if any, is a copy; it can be freely deleted.

Returns:
CMessage*: A pointer to the next available message. If no message was available, NULL is returned.
Limitations: None

bool CMailbox::GetClientMsgAvail  ) 
 

GetClientMsgAvail Check to see if there are client messages available for download.

Description: This function check to see if messages are available to be receive by the client end of the "pipe". Client messages are retrieved by calling the GetClientMsg funct.

Returns:
Bool: True if messages are available. False if their are no messages to be received.
Limitations: None

CMessage * CMailbox::GetHostMsg  ) 
 

GetHostMsg Download the oldest message sent TO the host.

Only the host should call this function.

bool CMailbox::GetHostMsgAvail  ) 
 

GetClientMsgAvail Check to see if there are client messages available for download.

Description: This function check to see if messages are available to be receive by the host end of the "pipe". Host messages are retrieved by calling the GetHostMsg funct.

Returns:
Bool: True if messages are available. False if their are no messages to be received.
Limitations: None

bool CMailbox::GetMute  )  const
 

GetMute.

Description: This function gets the mute status of the mailbox.

Returns:
bool: True if the mailbox is muted.
Limitations: None

void CMailbox::HostCleanup  ) 
 

HostCleanup.

Description: Due to the possibility of memory corruption when sending messages between dll-resident object and the application, special memory deletion precautions must be taken. This fucntion must be periodically called by the host (the dispatcher) to clean up memory allocated in the host memory.

Returns:
void
Limitations: None

bool CMailbox::PostClientMsg const CMessage  ) 
 

PostClientMsg Send a client message.

This function returns false if the mailbox is full.

bool CMailbox::PostHostMsg const CMessage  ) 
 

PostHostMsg Sends a host message TO the client associated with the mailbox.

This function returns false if the mailbox is full.

void CMailbox::SetMute bool  bMute  ) 
 

SetMute.

Description: This function stops the mailbox from sending or recieving any messages. Messages that are currently in the mailbox are stored until the mailbox becomes unmuted.

Parameters:
bMute,: Set to true to mute.
Returns:
void
Limitations: None


The documentation for this class was generated from the following files:
Copyright (c) 2005 Matt Bruns, Pat Hammond, Kevin Markussen, Travis Service, Brain Shaver

SourceForge.net Logo