Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

ocopclient.h

Go to the documentation of this file.
00001 #ifndef OPIE_OCOP_CLIENT_H
00002 #define OPIE_OCOP_CLIENT_H
00003 
00004 
00005 #include <qobject.h>
00006 #include <qcstring.h>
00007 #include <qmap.h>
00008 #include <qsignal.h>
00009 #include <qstring.h>
00010 #include <qsocketnotifier.h>
00011 
00012 
00019 class OCOPPacket;
00020 class OCOPClient : public QObject{
00021     Q_OBJECT
00022 public:
00023     /*
00024      * this is  the static
00025      * OCopClient
00026      */
00027     static OCOPClient* self();
00031     OCOPClient(const QString& pathToServer = QString::null, QObject* obj = 0l);
00032     ~OCOPClient();
00033 
00034     bool isRegistered( const QCString& )const;
00035     void send( const QCString& chan, const QCString&, const QByteArray& msg );
00036 
00042     void addChannel( const QCString& channel );
00043     void delChannel( const QCString& channel );
00044 
00045     /* make it singleton? */
00046     //static OCOPClient* self();
00047 /* no direct signals due the design */
00048 signals:
00049     void called(const QCString&, const QCString&, const QByteArray& );
00050 private slots:
00051     void init();
00052     void init(const QCString& pa);
00053     void newData();
00054 private:
00055     void startUP();
00056     OCOPPacket packet()const;
00057     void call( const OCOPPacket& );
00058 
00059     QSocketNotifier* m_notify;
00060     int m_socket;
00061     int m_tries;
00062 
00063     static OCOPClient*  m_self;
00064 };
00065 
00066 #endif

Generated on Sat Nov 5 16:18:35 2005 for OPIE by  doxygen 1.4.2