Home · All Classes · Main Classes · Deprecated
Signals | Public Member Functions | Protected Attributes

MAppletCommunicator Class Reference

Inherits QObject.

Inherited by MAppletClient, and MAppletServer.

List of all members.

Signals

void connectionEstablished ()
void connectionLost ()
void messageReceived (const MAppletMessage &message)

Public Member Functions

 MAppletCommunicator ()
virtual ~MAppletCommunicator ()
virtual void closeConnection ()=0
bool sendMessage (const MAppletMessage &message)
bool isConnected () const

Protected Attributes

QLocalSocketsocket
QDataStreamstream

Detailed Description

The MAppletCommunicator is a base class for implementing interprocess communication between two processes (a host application and an applet).


Constructor & Destructor Documentation

MAppletCommunicator::MAppletCommunicator (  ) 

Constructs an MAppletCommunicator.

MAppletCommunicator::~MAppletCommunicator (  )  [virtual]

Destroys the MAppletCommunicator.


Member Function Documentation

virtual void MAppletCommunicator::closeConnection (  )  [pure virtual]

Closes the connection.

Implemented in MAppletClient, and MAppletServer.

void MAppletCommunicator::connectionEstablished (  )  [signal]

A signal that is emitted when this communicator has successfully established a connection.

void MAppletCommunicator::connectionLost (  )  [signal]

A signal that is emitted when there's an error in communication. That usually means the reading of messages fails because the other end has crashed or otherwise closed the communication channel.

bool MAppletCommunicator::isConnected (  )  const

Queries if this communicator is currently connected.

Returns:
true if connected, false if not.
void MAppletCommunicator::messageReceived ( const MAppletMessage message  )  [signal]

A signal that is emitted when this communicator has received a new message.

Parameters:
message the message that was received
bool MAppletCommunicator::sendMessage ( const MAppletMessage message  ) 

Sends a MAppletMessage.

Parameters:
message the MAppletMessage to send
Returns:
the result of the operation: true if sending was successful and false otherwise.

Member Data Documentation

The socket for IPC communication, created by subclasses.

Stream for reading and writing from the socket, created by subclasses.


Copyright © 2010 Nokia Corporation
MeeGo Touch