Go to the
documentation of this file.
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 #ifndef QCOPCHANNEL_QWS_H
00043 #define QCOPCHANNEL_QWS_H
00044
00045 #include <QtCore/qobject.h>
00046
00047 QT_BEGIN_HEADER
00048
00049 QT_BEGIN_NAMESPACE
00050
00051 QT_MODULE(Gui)
00052
00053 #ifndef QT_NO_COP
00054
00055 class QWSClient;
00056 class QCopChannelPrivate;
00057
00058 class Q_GUI_EXPORT QCopChannel : public QObject
00059 {
00060 Q_OBJECT
00061 public:
00062 explicit QCopChannel(const QString& channel, QObject *parent=0);
00063 #ifdef QT3_SUPPORT
00064 QT3_SUPPORT_CONSTRUCTOR QCopChannel(const QString& channel, QObject *parent, const char *name);
00065 #endif
00066 virtual ~QCopChannel();
00067
00068 QString channel() const;
00069
00070 static bool isRegistered(const QString& channel);
00071 static bool send(const QString& channel, const QString& msg);
00072 static bool send(const QString& channel, const QString& msg,
00073 const QByteArray &data);
00074
00075 static bool flush();
00076
00077 static void sendLocally( const QString& ch, const QString& msg,
00078 const QByteArray &data);
00079 static void reregisterAll();
00080
00081 virtual void receive(const QString& msg, const QByteArray &data);
00082
00083 Q_SIGNALS:
00084 void received(const QString& msg, const QByteArray &data);
00085
00086 private:
00087 void init(const QString& channel);
00088
00089
00090 static void registerChannel(const QString& ch, QWSClient *cl);
00091 static void detach(QWSClient *cl);
00092 static void answer(QWSClient *cl, const QString& ch,
00093 const QString& msg, const QByteArray &data);
00094
00095 QCopChannelPrivate* d;
00096
00097 friend class QWSServer;
00098 friend class QWSServerPrivate;
00099 friend class QApplication;
00100 };
00101
00102 #endif // QT_NO_COP
00103
00104 QT_END_NAMESPACE
00105
00106 QT_END_HEADER
00107
00108 #endif // QCOPCHANNEL_QWS_H