summaryrefslogtreecommitdiff
path: root/x11/libqpe-x11/qt/qcopchannel_qws.h
blob: 94b199e4323af3d41a21a1d3b307c6bdbd41a065 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#ifndef OPIE_QCOP_CHANNEL_QWS_H
#define OPIE_QCOP_CHANNEL_QWS_H

#include <qobject.h>
#include <qcstring.h>
#include <qlist.h>

class OCOPClient;
class QCopChannel : public QObject {
    Q_OBJECT
public:
    QCopChannel( const QCString& channel, QObject* parent = 0,
                 const char* name = 0);
    virtual ~QCopChannel();

    QCString channel()const;

    static bool isRegistered( const QCString& channel );
    static bool send( const QCString& channel, const QCString& msg );
    static bool send( const QCString& channel, const QCString& msg,
                      const QByteArray& );
    static bool sendLocally( const QCString& chan, const QCString& msg,
                             const QByteArray& data );
    void receive( const QCString& msg, const QByteArray& ar );

signals:
    void received( const QCString& msg, const QByteArray& );

private slots:
    void rev( const QCString& chan, const QCString&, const QByteArray& );

private:
    void init();
    static QList<QCopChannel> *m_list;
    /* the channel */
    QCString m_chan;
    class Private;
    Private *d;

};

#endif