Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

os::Messenger Class Reference

#include <messenger.h>

List of all members.

Public Methods

 Messenger ()
 Messenger (const Handler *pcHandler, const Looper *pcLooper=NULL)
 Messenger (const Messenger &cMessenger)
 Messenger (port_id hPort)
 ~Messenger ()
HandlerGetTarget (Looper **ppcLooper) const
bool IsTargetLocal (void) const
bool IsValid (void) const
status_t LockTarget (void) const
status_t SendMessage (Message *pcMessage, Message *pcReply, bigtime_t nSendTimeOut=INFINITE_TIMEOUT, bigtime_t nReplyTimeOut=INFINITE_TIMEOUT) const
 Deliver a message syncronously. More...

status_t SendMessage (Message *pcMessage, Handler *pcReplyHandler=NULL, bigtime_t nTimeOut=INFINITE_TIMEOUT) const
 Deliver message asyncronously. More...

status_t SendMessage (int nCode, Message *pcReply=NULL) const
status_t SendMessage (int nCode, Handler *pcReplyHandler) const
Messenger& operator= (const Messenger &cMessenger)
bool operator== (const Messenger &cMessenger) const

Friends

class  Message
class  SrvWidget
class  SrvWindow
class  SrvApplication
class  NodeMonitor


Detailed Description

Description:
See also:
Author(s):
Kurt Skauen (kurt@atheos.cx)


Constructor & Destructor Documentation

Messenger::Messenger ( )
 

Messenger::Messenger ( const Handler * pcHandler,
const Looper * pcLooper = NULL )
 

Messenger::Messenger ( const Messenger & cMessenger )
 

Messenger::Messenger ( port_id hPort )
 

Messenger::~Messenger ( )
 


Member Function Documentation

Handler * Messenger::GetTarget ( Looper ** ppcLooper ) const
 

bool Messenger::IsTargetLocal ( void ) const
 

bool Messenger::IsValid ( void ) const
 

status_t Messenger::LockTarget ( void ) const
 

status_t Messenger::SendMessage ( int nCode,
Handler * pcReplyHandler ) const
 

status_t Messenger::SendMessage ( int nCode,
Message * pcReply = NULL ) const
 

status_t Messenger::SendMessage ( Message * pcMsg,
Handler * pcReplyHandler = NULL,
bigtime_t nTimeOut = INFINITE_TIMEOUT ) const
 

Deliver message asyncronously.

Description:
The message is delivered to the target, and this member returns imediatly. If pcReplyHandler is not NULL the following reply will be directed to that handler in a asyncronous manner through the Handler's Looper thread.
Bugs:
The timeout value is currently ignored, and is always interpreted as INFINITE_TIMEOUT
Parameters:
pcMsg   - The message to deliver.
pcReplyHandler   - The handler that should handle the reply or NULL if no reply is required.
nTimeOut   - Time to wait for a free slot in the receiving port before failing with errno = ETIMEDOUT
Returns:
0 if the Message was delivered, a negative number if something when wrong (Error code in errno)
See also:
Message::SendReply(), os::Message
Author(s):
Kurt Skauen (kurt.skauen@c2i.net)

status_t Messenger::SendMessage ( Message * pcMsg,
Message * pcReply,
bigtime_t nSendTimeOut = INFINITE_TIMEOUT,
bigtime_t nReplyTimeOut = INFINITE_TIMEOUT ) const
 

Deliver a message syncronously.

Description:
Send a message to the target, and optionally wait for a reply. If the pcReply argument is not NULL, this function will not return until we receive a reply from the target, or the nReplyTimeOut occure. The messenger will create a temporary message port from which it receives the reply. If pcReply is NULL the member will return as soon as the pcMsg message is delivered.
Bugs:
The timeout values is currently ignored, and is always interpreted as INFINITE_TIMEOUT
Parameters:
pcMsg   - The message to be delivered.
pcReply   - The message to fill out with the reply, or NULL to skip waiting for a reply.
nSendTimeOut   - Time to wait for a free slot in the receiving port before failing with errno = ETIMEDOUT
nReplyTimeOut   - Time to wait for reply before failing with errno=ETIMEDOUT
Returns:
0 if the Message was delivered, a negative number if something when wrong (Error code in errno)
See also:
Message::SendReply(), os::Message
Author(s):
Kurt Skauen (kurt.skauen@c2i.net)

Messenger & Messenger::operator= ( const Messenger & cMessenger )
 

bool Messenger::operator== ( const Messenger & cMessenger ) const
 


Friends And Related Function Documentation

class Message [friend]
 

class NodeMonitor [friend]
 

class SrvApplication [friend]
 

class SrvWidget [friend]
 

class SrvWindow [friend]
 


The documentation for this class was generated from the following files:
Generated at Sat Apr 7 16:11:38 2001 for AtheOS higlevel API by doxygen1.2.5 written by Dimitri van Heesch, © 1997-2001