Rudiments: /home/dmuse/src/rudiments/include/rudiments/sharedmemory.h Source File

Rudiments

- Main Page
- Classes

sharedmemory.h
1 // Copyright (c) 1999-2002 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
9 class sharedmemoryprivate;
10
21 class RUDIMENTS_DLLSPEC sharedmemory {
22 public:
24 sharedmemory();
25
30 ~sharedmemory();
31
38 bool create(key_t key, size_t size, mode_t permissions);
39
42 bool attach(key_t key, size_t size);
43
48 bool createOrAttach(key_t key, size_t size,
49 mode_t permissions);
50
58 void dontRemove();
59
62 bool forceRemove();
63
66 int32_t getId() const;
67
71 void *getPointer() const;
72
80 bool setUserName(const char *username);
81
89 bool setGroupName(const char *groupname);
90
93 bool setUserId(uid_t uid);
94
97 bool setGroupId(gid_t gid);
98
101 bool setPermissions(mode_t permissions);
102
110 const char *getUserName();
111
119 const char *getGroupName();
120
123 uid_t getUserId();
124
127 gid_t getGroupId();
128
131 mode_t getPermissions();
132
133 #include <rudiments/private/sharedmemory.h>
134
135 };
136
137 #endif
sharedmemory
Definition: sharedmemory.h:21
permissions
Definition: permissions.h:28