Classes | Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes

mozilla::ipc::AsyncChannel Class Reference

#include <AsyncChannel.h>

Inheritance diagram for mozilla::ipc::AsyncChannel:
Collaboration diagram for mozilla::ipc::AsyncChannel:

List of all members.


class  AsyncListener

Public Types

typedef IPC::Channel Transport
typedef IPC::Message Message

Public Member Functions

 AsyncChannel (AsyncListener *aListener)
virtual ~AsyncChannel ()
bool Open (Transport *aTransport, MessageLoop *aIOLoop=0)
void Close ()
virtual bool Send (Message *msg)
void DispatchOnChannelConnected (int32 peer_pid)
virtual void OnMessageReceived (const Message &msg)
virtual void OnChannelConnected (int32 peer_pid)
virtual void OnChannelError ()

Protected Types

enum  ChannelState {
  ChannelClosed, ChannelOpening, ChannelConnected, ChannelTimeout,
  ChannelClosing, ChannelError
typedef mozilla::CondVar CondVar
typedef mozilla::Mutex Mutex

Protected Member Functions

void AssertWorkerThread () const
void AssertIOThread () const
bool Connected () const
void OnDispatchMessage (const Message &aMsg)
virtual bool OnSpecialMessage (uint16 id, const Message &msg)
void SendSpecialMessage (Message *msg) const
void SynchronouslyClose ()
bool MaybeHandleError (Result code, const char *channelName)
void ReportConnectionError (const char *channelName) const
void PrintErrorMessage (const char *channelName, const char *msg) const
void SendThroughTransport (Message *msg) const
void OnNotifyMaybeChannelError ()
virtual bool ShouldDeferNotifyMaybeError () const
void NotifyChannelClosed ()
void NotifyMaybeChannelError ()
virtual void Clear ()
void OnChannelOpened ()
void OnCloseChannel ()
void PostErrorNotifyTask ()
bool MaybeInterceptSpecialIOMessage (const Message &msg)
void ProcessGoodbyeMessage ()

Protected Attributes

ChannelState mChannelState
Mutex mMutex
CondVar mCvar
MessageLoop * mIOLoop
MessageLoop * mWorkerLoop
bool mChild
CancelableTask * mChannelErrorTask
IPC::Channel::Listener * mExistingListener

Member Typedef Documentation

Member Enumeration Documentation


Constructor & Destructor Documentation

mozilla::ipc::AsyncChannel::AsyncChannel ( AsyncListener aListener  ) 
virtual mozilla::ipc::AsyncChannel::~AsyncChannel (  )  [virtual]

Member Function Documentation

void mozilla::ipc::AsyncChannel::AssertIOThread (  )  const [inline, protected]
void mozilla::ipc::AsyncChannel::AssertWorkerThread (  )  const [inline, protected]
virtual void mozilla::ipc::AsyncChannel::Clear (  )  [protected, virtual]

Reimplemented in mozilla::ipc::RPCChannel.

void mozilla::ipc::AsyncChannel::Close (  ) 
bool mozilla::ipc::AsyncChannel::Connected (  )  const [inline, protected]
void mozilla::ipc::AsyncChannel::DispatchOnChannelConnected ( int32  peer_pid  ) 
bool mozilla::ipc::AsyncChannel::MaybeHandleError ( Result  code,
const char *  channelName 
) [protected]
bool mozilla::ipc::AsyncChannel::MaybeInterceptSpecialIOMessage ( const Message msg  )  [protected]
void mozilla::ipc::AsyncChannel::NotifyChannelClosed (  )  [protected]
void mozilla::ipc::AsyncChannel::NotifyMaybeChannelError (  )  [protected]
virtual void mozilla::ipc::AsyncChannel::OnChannelConnected ( int32  peer_pid  )  [virtual]
virtual void mozilla::ipc::AsyncChannel::OnChannelError (  )  [virtual]
void mozilla::ipc::AsyncChannel::OnChannelOpened (  )  [protected]
void mozilla::ipc::AsyncChannel::OnCloseChannel (  )  [protected]
void mozilla::ipc::AsyncChannel::OnDispatchMessage ( const Message aMsg  )  [protected]

Reimplemented in mozilla::ipc::SyncChannel.

virtual void mozilla::ipc::AsyncChannel::OnMessageReceived ( const Message msg  )  [virtual]
void mozilla::ipc::AsyncChannel::OnNotifyMaybeChannelError (  )  [protected]
virtual bool mozilla::ipc::AsyncChannel::OnSpecialMessage ( uint16  id,
const Message msg 
) [protected, virtual]
bool mozilla::ipc::AsyncChannel::Open ( Transport aTransport,
MessageLoop *  aIOLoop = 0 
void mozilla::ipc::AsyncChannel::PostErrorNotifyTask (  )  [protected]
void mozilla::ipc::AsyncChannel::PrintErrorMessage ( const char *  channelName,
const char *  msg 
) const [inline, protected]
void mozilla::ipc::AsyncChannel::ProcessGoodbyeMessage (  )  [protected]
void mozilla::ipc::AsyncChannel::ReportConnectionError ( const char *  channelName  )  const [protected]
virtual bool mozilla::ipc::AsyncChannel::Send ( Message msg  )  [virtual]
void mozilla::ipc::AsyncChannel::SendSpecialMessage ( Message msg  )  const [protected]
void mozilla::ipc::AsyncChannel::SendThroughTransport ( Message msg  )  const [protected]
virtual bool mozilla::ipc::AsyncChannel::ShouldDeferNotifyMaybeError (  )  const [inline, protected, virtual]
void mozilla::ipc::AsyncChannel::SynchronouslyClose (  )  [protected]

Member Data Documentation

CancelableTask* mozilla::ipc::AsyncChannel::mChannelErrorTask [protected]
IPC::Channel::Listener* mozilla::ipc::AsyncChannel::mExistingListener [protected]
MessageLoop* mozilla::ipc::AsyncChannel::mIOLoop [protected]
MessageLoop* mozilla::ipc::AsyncChannel::mWorkerLoop [protected]

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