Rudiments
sharedmemory.h
1// Copyright (c) 1999-2018 David Muse
2// See the COPYING file for more information.
3
4#ifndef RUDIMENTS_SHAREDMEMORY_H
5#define RUDIMENTS_SHAREDMEMORY_H
6
7#include <rudiments/private/sharedmemoryincludes.h>
8
19class RUDIMENTS_DLLSPEC sharedmemory : public object {
20 public:
23
29
34 bool create(key_t key, size_t size, mode_t permissions);
35
38 bool attach(key_t key, size_t size);
39
43 bool createOrAttach(key_t key, size_t size,
44 mode_t permissions);
45
66 void setRemove(bool remove);
67
70 bool getRemove();
71
75
79 void *getPointer();
80
88 bool setUserName(const char *username);
89
97 bool setGroupName(const char *groupname);
98
101 bool setUserId(uid_t uid);
102
105 bool setGroupId(gid_t gid);
106
110
118 const char *getUserName();
119
127 const char *getGroupName();
128
131 uid_t getUserId();
132
135 gid_t getGroupId();
136
140
143 static bool isSupported();
144
145 #include <rudiments/private/sharedmemory.h>
146};
147
148#endif
Definition avltree.h:11
Definition object.h:10
Definition permissions.h:28
Definition sharedmemory.h:19
const char * getUserName()
bool create(key_t key, size_t size, mode_t permissions)
bool attach(key_t key, size_t size)
bool setPermissions(mode_t permissions)
uid_t getUserId()
static bool isSupported()
bool setGroupId(gid_t gid)
bool setGroupName(const char *groupname)
bool setUserId(uid_t uid)
int32_t getId()
void * getPointer()
bool createOrAttach(key_t key, size_t size, mode_t permissions)
void setRemove(bool remove)
bool getRemove()
bool setUserName(const char *username)
gid_t getGroupId()
mode_t getPermissions()
const char * getGroupName()