summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qsharedmemory.h
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2022-10-07 21:37:54 -0700
committerThiago Macieira <thiago.macieira@intel.com>2023-01-22 13:01:53 -0300
commit53e8982434923162638365c486b7f3e68f3a46dc (patch)
tree1ed2b68fda4d4df5e816b588f6086f6419e52c2d /src/corelib/kernel/qsharedmemory.h
parent7689d4ad2f673317af432aae498da74d13703126 (diff)
IPC: Move QSharedMemory and QSystemSemaphore from kernel/ to ipc/
It's not a lot of files, but it's actually more in the same dir than mime/ does right now. I'm about to add two more files, though I'll also merge a few more later. Change-Id: Id8d5e3999fe94b03acc1fffd171bfe2ea36a35a7 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/corelib/kernel/qsharedmemory.h')
-rw-r--r--src/corelib/kernel/qsharedmemory.h84
1 files changed, 0 insertions, 84 deletions
diff --git a/src/corelib/kernel/qsharedmemory.h b/src/corelib/kernel/qsharedmemory.h
deleted file mode 100644
index 653fb1fb64..0000000000
--- a/src/corelib/kernel/qsharedmemory.h
+++ /dev/null
@@ -1,84 +0,0 @@
-// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-
-#ifndef QSHAREDMEMORY_H
-#define QSHAREDMEMORY_H
-
-#include <QtCore/qglobal.h>
-#ifndef QT_NO_QOBJECT
-# include <QtCore/qobject.h>
-#else
-# include <QtCore/qobjectdefs.h>
-# include <QtCore/qscopedpointer.h>
-# include <QtCore/qstring.h>
-#endif
-QT_BEGIN_NAMESPACE
-
-
-#if QT_CONFIG(sharedmemory)
-
-class QSharedMemoryPrivate;
-
-class Q_CORE_EXPORT QSharedMemory : public QObject
-{
- Q_OBJECT
- Q_DECLARE_PRIVATE(QSharedMemory)
-
-public:
- enum AccessMode
- {
- ReadOnly,
- ReadWrite
- };
-
- enum SharedMemoryError
- {
- NoError,
- PermissionDenied,
- InvalidSize,
- KeyError,
- AlreadyExists,
- NotFound,
- LockError,
- OutOfResources,
- UnknownError
- };
-
- QSharedMemory(QObject *parent = nullptr);
- QSharedMemory(const QString &key, QObject *parent = nullptr);
- ~QSharedMemory();
-
- void setKey(const QString &key);
- QString key() const;
- void setNativeKey(const QString &key);
- QString nativeKey() const;
-
- bool create(qsizetype size, AccessMode mode = ReadWrite);
- qsizetype size() const;
-
- bool attach(AccessMode mode = ReadWrite);
- bool isAttached() const;
- bool detach();
-
- void *data();
- const void* constData() const;
- const void *data() const;
-
-#if QT_CONFIG(systemsemaphore)
- bool lock();
- bool unlock();
-#endif
-
- SharedMemoryError error() const;
- QString errorString() const;
-
-private:
- Q_DISABLE_COPY(QSharedMemory)
-};
-
-#endif // QT_CONFIG(sharedmemory)
-
-QT_END_NAMESPACE
-
-#endif // QSHAREDMEMORY_H
-