Rudiments
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 
19 class RUDIMENTS_DLLSPEC sharedmemory {
20  public:
22  sharedmemory();
23 
28  ~sharedmemory();
29 
36  bool create(key_t key, size_t size, mode_t permissions);
37 
40  bool attach(key_t key, size_t size);
41 
46  bool createOrAttach(key_t key, size_t size,
47  mode_t permissions);
48 
56  void dontRemove();
57 
60  bool forceRemove();
61 
64  int32_t getId() const;
65 
69  void *getPointer() const;
70 
78  bool setUserName(const char *username);
79 
87  bool setGroupName(const char *groupname);
88 
91  bool setUserId(uid_t uid);
92 
95  bool setGroupId(gid_t gid);
96 
99  bool setPermissions(mode_t permissions);
100 
108  const char *getUserName();
109 
117  const char *getGroupName();
118 
121  uid_t getUserId();
122 
125  gid_t getGroupId();
126 
129  mode_t getPermissions();
130 
133  static bool supported();
134 
135  #include <rudiments/private/sharedmemory.h>
136 };
137 
138 #endif
Definition: sharedmemory.h:19
Definition: permissions.h:28