homescreenapp/hsdomainmodel/inc/hsipcserver.h
changeset 35 f9ce957a272c
equal deleted inserted replaced
5:c743ef5928ba 35:f9ce957a272c
       
     1 #ifndef HSIPCSERVER_H
       
     2 #define HSIPCSERVER_H
       
     3 
       
     4 #include <QObject>
       
     5 #include <QQueue>
       
     6 #include "hsdomainmodel_global.h"
       
     7 
       
     8 class QLocalServer;
       
     9 class HsIpcChannelHost;
       
    10 
       
    11 class HSDOMAINMODEL_EXPORT HsIpcServer: public QObject
       
    12 {
       
    13     Q_OBJECT
       
    14 public:
       
    15     HsIpcServer(QObject *parent = 0);
       
    16     ~HsIpcServer();
       
    17 
       
    18     bool startServer(const QString &serverName);
       
    19     void stopServer();
       
    20     
       
    21     HsIpcChannelHost* takeConnection();
       
    22 signals:
       
    23     void newConnection();
       
    24 private slots:
       
    25     void onNewConnection();
       
    26 
       
    27 private:
       
    28     QLocalServer *mServer;
       
    29     QQueue<HsIpcChannelHost*> mConnections;
       
    30 };
       
    31 
       
    32 #endif // HSIPCSERVER_H