HomeHome

ClassesAnnotated - TreeFunctionsHomeStructure

QCopChannel Class Reference


This class provides communication capabilities between several clients. More...

#include <qwsdisplay_qws.h>

List of all member functions.

Public Members

Static Public Members


Detailed Description

This class provides communication capabilities between several clients.

The Qt Cop (QCOP) is a COmmunication Protocol, allowing clients to communicate inside of the same address space or between different processes.

Currently, this facility is only available on Qt/Embedded as on X11 and Windows we are exploring the use of existing standard such as DCOP and COM.

QCopChannel is an abstract base class. Important functions like send() and isRegistered() are static and therefore usable without an object. In order to listen to the traffic on channel you have to subclass from QCopChannel and provide an implementation for receive().


Member Function Documentation

QCopChannel::QCopChannel ( const QCString & channel )

Constructs a QCop channel and registers it with the server under the name channel.

QCopChannel::~QCopChannel () [virtual]

Destructs the client's side end of the channel and notifies the server about the closing. The server itself keeps the channel open until the last registered client detaches.

QCString QCopChannel::channel () const

Returns the name of the channel.

bool QCopChannel::isRegistered ( const QCString & channel ) [static]

Queries the server for the existance of channel.

Returns TRUE if channel is registered.

void QCopChannel::receive ( const QCString & msg, const QByteArray & data ) [virtual]

This abstract virtual function allows subclasses of QCopChannel to process data received from their channel. Note that the format of data has to be well defined in order to demarshall the contained information.

See also send().

bool QCopChannel::send ( const QCString & channel, const QCString & msg ) [static]

Send the message msg on channel. The message will be distributed to all clients subscribed to the channel.

See also receive().

bool QCopChannel::send ( const QCString & channel, const QCString & msg, const QByteArray & data ) [static]

Same as above function except the additional data parameter. QDataStream provides a convenient way to fill the byte array with auxiliary data.


Search the documentation, FAQ, qt-interest archive and more (uses www.trolltech.com):


This file is part of the Qt toolkit, copyright © 1995-2000 Trolltech, all rights reserved.


Copyright © 2000 TrolltechTrademarks
Qt version 2.2.3