summaryrefslogtreecommitdiff
path: root/library/qcopenvelope_qws.cpp
Unidiff
Diffstat (limited to 'library/qcopenvelope_qws.cpp') (more/less context) (show whitespace changes)
-rw-r--r--library/qcopenvelope_qws.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/library/qcopenvelope_qws.cpp b/library/qcopenvelope_qws.cpp
index 0aac32b..8f58787 100644
--- a/library/qcopenvelope_qws.cpp
+++ b/library/qcopenvelope_qws.cpp
@@ -1,74 +1,72 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of the Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#ifndef QT_NO_COP 21#ifndef QT_NO_COP
22#include "qcopenvelope_qws.h" 22#include "qcopenvelope_qws.h"
23#endif 23#endif
24#include "global.h"
25#include <qbuffer.h> 24#include <qbuffer.h>
26#include <qdatastream.h>
27#include <qfile.h> 25#include <qfile.h>
28#include <unistd.h> 26#include <unistd.h>
29#include <errno.h> 27#include <errno.h>
30#include <sys/file.h> 28#include <sys/file.h>
31#include <sys/types.h> 29#include <sys/types.h>
32#include <sys/stat.h> 30#include <sys/stat.h>
33#include <time.h> 31#include <time.h>
34 32
35#ifndef QT_NO_COP 33#ifndef QT_NO_COP
36 34
37/*! 35/*!
38 \class QCopEnvelope qcopenvelope_qws.h 36 \class QCopEnvelope qcopenvelope_qws.h
39 \brief The QCopEnvelope class encapsulates and sends QCop messages 37 \brief The QCopEnvelope class encapsulates and sends QCop messages
40 over QCopChannels. 38 over QCopChannels.
41 39
42 QCop messages allow applications to communicate with each other. 40 QCop messages allow applications to communicate with each other.
43 These messages are sent using QCopEnvelope, and received by connecting 41 These messages are sent using QCopEnvelope, and received by connecting
44 to a QCopChannel. 42 to a QCopChannel.
45 43
46 To send a message, use the following protocol: 44 To send a message, use the following protocol:
47 45
48 \code 46 \code
49 QCopEnvelope e(channelname, messagename); 47 QCopEnvelope e(channelname, messagename);
50 e << parameter1 << parameter2 << ...; 48 e << parameter1 << parameter2 << ...;
51 \endcode 49 \endcode
52 50
53 For messages without parameters, simply use: 51 For messages without parameters, simply use:
54 52
55 \code 53 \code
56 QCopEnvelope e(channelname, messagename); 54 QCopEnvelope e(channelname, messagename);
57 \endcode 55 \endcode
58 56
59 (Do not try to simplify this further as it may confuse some 57 (Do not try to simplify this further as it may confuse some
60 compilers.) 58 compilers.)
61 59
62 The \c{channelname} of channels within Qtopia all start with "QPE/". 60 The \c{channelname} of channels within Qtopia all start with "QPE/".
63 The \c{messagename} is a function identifier followed by a list of types 61 The \c{messagename} is a function identifier followed by a list of types
64 in parentheses. There is no whitespace in the message name. 62 in parentheses. There is no whitespace in the message name.
65 63
66 To receive a message, you will generally just use your application's 64 To receive a message, you will generally just use your application's
67 predefined QPE/Application/\e{appname} channel 65 predefined QPE/Application/\e{appname} channel
68 (see QPEApplication::appMessage()), but you can make another channel 66 (see QPEApplication::appMessage()), but you can make another channel
69 and connect it to a slot like this: 67 and connect it to a slot like this:
70 68
71 \code 69 \code
72 myChannel = new QCopChannel( "QPE/FooBar", this ); 70 myChannel = new QCopChannel( "QPE/FooBar", this );
73 connect( myChannel, SIGNAL(received(const QCString &, const QByteArray &)), 71 connect( myChannel, SIGNAL(received(const QCString &, const QByteArray &)),
74 this, SLOT(fooBarMessage( const QCString &, const QByteArray &)) ); 72 this, SLOT(fooBarMessage( const QCString &, const QByteArray &)) );