summaryrefslogtreecommitdiffstats
path: root/libraries/LocalPeer/include
diff options
context:
space:
mode:
authorThomas Groman <tgroman@nuegia.net>2019-09-19 00:41:48 -0700
committerThomas Groman <tgroman@nuegia.net>2019-09-19 00:41:48 -0700
commit32b3ed0a1362a4b0798ad71fac3450fb77cb7e41 (patch)
tree7be7a2f602e6a5af7bc2db86bef9cf2a659c3d3d /libraries/LocalPeer/include
parent5fb2c6334e7d5237db11695b4c0ec0f2d1e47c88 (diff)
downloadMultiMC-32b3ed0a1362a4b0798ad71fac3450fb77cb7e41.tar
MultiMC-32b3ed0a1362a4b0798ad71fac3450fb77cb7e41.tar.gz
MultiMC-32b3ed0a1362a4b0798ad71fac3450fb77cb7e41.tar.lz
MultiMC-32b3ed0a1362a4b0798ad71fac3450fb77cb7e41.tar.xz
MultiMC-32b3ed0a1362a4b0798ad71fac3450fb77cb7e41.zip
merged from 0.6.7 codebase
Diffstat (limited to 'libraries/LocalPeer/include')
-rw-r--r--libraries/LocalPeer/include/LocalPeer.h58
1 files changed, 29 insertions, 29 deletions
diff --git a/libraries/LocalPeer/include/LocalPeer.h b/libraries/LocalPeer/include/LocalPeer.h
index 7558f18e..a24e4775 100644
--- a/libraries/LocalPeer/include/LocalPeer.h
+++ b/libraries/LocalPeer/include/LocalPeer.h
@@ -50,51 +50,51 @@ class LockedFile;
class ApplicationId
{
public: /* methods */
- // traditional app = installed system wide and used in a multi-user environment
- static ApplicationId fromTraditionalApp();
- // ID based on a path with all the application data (no two instances with the same data path should run)
- static ApplicationId fromPathAndVersion(const QString & dataPath, const QString & version);
- // custom ID
- static ApplicationId fromCustomId(const QString & id);
- // custom ID, based on a raw string previously acquired from 'toString'
- static ApplicationId fromRawString(const QString & id);
+ // traditional app = installed system wide and used in a multi-user environment
+ static ApplicationId fromTraditionalApp();
+ // ID based on a path with all the application data (no two instances with the same data path should run)
+ static ApplicationId fromPathAndVersion(const QString & dataPath, const QString & version);
+ // custom ID
+ static ApplicationId fromCustomId(const QString & id);
+ // custom ID, based on a raw string previously acquired from 'toString'
+ static ApplicationId fromRawString(const QString & id);
- QString toString()
- {
- return m_id;
- }
+ QString toString()
+ {
+ return m_id;
+ }
private: /* methods */
- ApplicationId(const QString & value)
- {
- m_id = value;
- }
+ ApplicationId(const QString & value)
+ {
+ m_id = value;
+ }
private: /* data */
- QString m_id;
+ QString m_id;
};
class LocalPeer : public QObject
{
- Q_OBJECT
+ Q_OBJECT
public:
- LocalPeer(QObject *parent, const ApplicationId &appId);
- ~LocalPeer();
- bool isClient();
- bool sendMessage(const QString &message, int timeout);
- ApplicationId applicationId() const;
+ LocalPeer(QObject *parent, const ApplicationId &appId);
+ ~LocalPeer();
+ bool isClient();
+ bool sendMessage(const QString &message, int timeout);
+ ApplicationId applicationId() const;
Q_SIGNALS:
- void messageReceived(const QString &message);
+ void messageReceived(const QString &message);
protected Q_SLOTS:
- void receiveConnection();
+ void receiveConnection();
protected:
- ApplicationId id;
- QString socketName;
- std::unique_ptr<QLocalServer> server;
- std::unique_ptr<LockedFile> lockFile;
+ ApplicationId id;
+ QString socketName;
+ std::unique_ptr<QLocalServer> server;
+ std::unique_ptr<LockedFile> lockFile;
};