Rudiments
groupentry.h
1 // Copyright (c) 2002 David Muse
2 // See the COPYING file for more information.
3 
4 #ifndef RUDIMENTS_GROUPENTRY_H
5 #define RUDIMENTS_GROUPENTRY_H
6 
7 #include <rudiments/private/groupentryincludes.h>
8 
9 class groupentryprivate;
10 
13 class RUDIMENTS_DLLSPEC groupentry {
14  public:
15 
17  groupentry();
18 
21  groupentry(const groupentry &g);
22 
25  groupentry &operator=(const groupentry &g);
26 
28  ~groupentry();
29 
32  bool initialize(const char *groupname);
33 
36  bool initialize(gid_t groupid);
37 
39  const char *getName() const;
40 
51  gid_t getGroupId() const;
52 
60  const char *getSid() const;
61 
64  const char * const *getMembers() const;
65 
71  static gid_t getGroupId(const char *groupname);
72 
80  static char *getName(gid_t groupid);
81 
91  static char *getSid(const char *groupname);
92 
98  static bool platformSupportsFormalSid();
99 
102  static bool needsMutex();
103 
107  static void setMutex(threadmutex *mtx);
108 
109  #include <rudiments/private/groupentry.h>
110 };
111 
112 #endif