4#ifndef QSYSTEMSEMAPHORE_H
5#define QSYSTEMSEMAPHORE_H
7#include <QtCore/qcoreapplication.h>
8#include <QtCore/qtipccommon.h>
9#include <QtCore/qstring.h>
10#include <QtCore/qscopedpointer.h>
14#if QT_CONFIG(systemsemaphore)
16class QSystemSemaphorePrivate;
18class Q_CORE_EXPORT QSystemSemaphore
30 enum SystemSemaphoreError
41 QSystemSemaphore(
const QNativeIpcKey &
key,
int initialValue = 0, AccessMode = Open);
44 void setNativeKey(
const QNativeIpcKey &
key,
int initialValue = 0, AccessMode = Open);
45 void setNativeKey(
const QString &
key,
int initialValue = 0, AccessMode
mode = Open,
46 QNativeIpcKey::Type
type = QNativeIpcKey::legacyDefaultTypeForOs())
47 { setNativeKey({
key,
type }, initialValue,
mode); }
48 QNativeIpcKey nativeIpcKey()
const;
50 QSystemSemaphore(
const QString &
key,
int initialValue = 0, AccessMode
mode = Open);
57 SystemSemaphoreError
error()
const;
61 static QNativeIpcKey platformSafeKey(
const QString &
key,
62 QNativeIpcKey::Type
type = QNativeIpcKey::DefaultTypeForOs);
63 static QNativeIpcKey legacyNativeKey(
const QString &
key,
64 QNativeIpcKey::Type
type = QNativeIpcKey::legacyDefaultTypeForOs());
67 Q_DISABLE_COPY(QSystemSemaphore)
68 QScopedPointer<QSystemSemaphorePrivate>
d;
\macro QT_RESTRICTED_CAST_FROM_ASCII
Combined button and popup list for selecting options.
#define Q_DECL_CONST_FUNCTION
#define Q_DECLARE_TR_FUNCTIONS(context)
DBusConnection const char DBusError * error