Qt API | Qtopia API | Qtopia Documentation | ![]() |
The QCopEnvelope class encapsulates and sends QCop messages over QCopChannels. More...
#include <qtopia/qcopenvelope_qws.h>
Inherits QDataStream.
QCop messages allow applications to communicate with each other. These messages are sent using QCopEnvelope, and received by connecting to a QCopChannel.
To send a message, use the following protocol:
QCopEnvelope e(channelname, messagename); e << parameter1 << parameter2 << ...;
For messages without parameters, simply use:
QCopEnvelope e(channelname, messagename);
(Do not try to simplify this further as it may confuse some compilers.)
The channelname of channels within Qtopia all start with "QPE/". The messagename is a function identifier followed by a list of types in parentheses. There is no whitespace in the message name.
To receive a message, you will generally just use your application's predefined QPE/Application/appname channel (see QPEApplication::appMessage()), but you can make another channel and connect it to a slot like this:
myChannel = new QCopChannel( "QPE/FooBar", this ); connect( myChannel, SIGNAL(received(const QCString &, const QByteArray &)), this, SLOT(fooBarMessage( const QCString &, const QByteArray &)) );
See also, the list of Qtopia messages.
See also Qtopia Classes.
This file is part of the Qtopia , copyright © 1995-2002 Trolltech, all rights reserved.
Copyright © 2001-2002 Trolltech | Trademarks | Qtopia version 1.7.0
|