Krita Source Code Documentation
Loading...
Searching...
No Matches
qtlocalpeer.h
Go to the documentation of this file.
1// Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
2// SPDX-License-Identifier: BSD-3-Clause
3
4#ifndef QTLOCALPEER_H
5#define QTLOCALPEER_H
6
7#include <QLocalServer>
8#include <QLocalSocket>
9#include <QDir>
10#include <QVector>
11
12#include "qtlockedfile.h"
13
14class QtLocalPeer : public QObject
15{
16 Q_OBJECT
17
18public:
19 QtLocalPeer(QObject *parent = 0, const QString &appId = QString());
20 bool isClient();
21 bool sendMessage(const QString &message, int timeout);
22 QString applicationId() const
23 { return id; }
24 void setReady();
25
26Q_SIGNALS:
27 void sigMessageReceivedInternal(const QString &message);
28 void messageReceived(const QString &message);
29
30protected Q_SLOTS:
31 void receiveConnection();
32
33protected:
34 QString id;
35 QString socketName;
36 QLocalServer* server;
38
39private Q_SLOTS:
40 void slotHandleMessageInternal(const QString &message);
41
42private:
43 static const char* ack;
45 bool ready = false;
46};
47
48#endif // QTLOCALPEER_H
QVector< QString > queuedMessages
Definition qtlocalpeer.h:44
QString socketName
Definition qtlocalpeer.h:35
void sigMessageReceivedInternal(const QString &message)
void messageReceived(const QString &message)
bool isClient()
QtLocalPeer(QObject *parent=0, const QString &appId=QString())
static const char * ack
Definition qtlocalpeer.h:43
QString id
Definition qtlocalpeer.h:34
QString applicationId() const
Definition qtlocalpeer.h:22
bool sendMessage(const QString &message, int timeout)
void slotHandleMessageInternal(const QString &message)
QtLP_Private::QtLockedFile lockFile
Definition qtlocalpeer.h:37
QLocalServer * server
Definition qtlocalpeer.h:36
void receiveConnection()