qTox
Version: nightly | Commit: bc751c8e1cac455f9690654fcfe0f560d2d7dfdd
|
Go to the documentation of this file.
25 #include <QSharedMemory>
32 #define IPC_PROTOCOL_VERSION "2"
34 class IPC :
public QObject
69 time_t
postEvent(
const QString& name,
const QByteArray& data = QByteArray(), uint32_t dest = 0);
IPCEvent events[IPC::EVENT_QUEUE_SIZE]
QSharedMemory globalMemory
void setProfileId(uint32_t profileId)
bool runEventHandler(IPCEventHandler handler, const QByteArray &arg)
static const int OWNERSHIP_TIMEOUT_S
bool waitUntilAccepted(time_t time, int32_t timeout=-1)
IPCEvent * fetchEvent()
Only called when global memory IS LOCKED.
void registerEventHandler(const QString &name, IPCEventHandler handler)
Register a handler for an IPC event.
static const int EVENT_TIMER_MS
bool isEventAccepted(time_t time)
static const int EVENT_GC_TIMEOUT
bool isCurrentOwnerNoLock()
Only called when global memory IS LOCKED.
QMap< QString, IPCEventHandler > eventHandlers
Inter-process communication.
time_t postEvent(const QString &name, const QByteArray &data=QByteArray(), uint32_t dest=0)
Post IPC event.
static const int EVENT_QUEUE_SIZE
std::function< bool(const QByteArray &)> IPCEventHandler