Rudiments
|
00001 // Copyright (c) 2002 David Muse 00002 // See the COPYING file for more information. 00003 00004 #ifndef RUDIMENTS_GROUPENTRY_H 00005 #define RUDIMENTS_GROUPENTRY_H 00006 00007 #include <rudiments/private/groupentryincludes.h> 00008 00009 #ifdef RUDIMENTS_NAMESPACE 00010 namespace rudiments { 00011 #endif 00012 00013 class groupentryprivate; 00014 00017 class RUDIMENTS_DLLSPEC groupentry { 00018 public: 00019 00025 static bool getPassword(const char *groupname, 00026 char **password); 00027 00031 static bool getGroupId(const char *groupname, 00032 gid_t *groupid); 00033 00040 static bool getMembers(const char *groupname, 00041 char ***members); 00042 00048 static bool getName(gid_t groupid, char **name); 00049 00055 static bool getPassword(gid_t groupid, char **password); 00056 00063 static bool getMembers(gid_t groupid, char ***members); 00064 00065 00067 groupentry(); 00068 00071 groupentry(const groupentry &g); 00072 00075 groupentry &operator=(const groupentry &g); 00076 00078 ~groupentry(); 00079 00082 bool initialize(const char *groupname); 00083 00086 bool initialize(gid_t groupid); 00087 00089 const char *getName() const; 00090 00092 const char *getPassword() const; 00093 00095 gid_t getGroupId() const; 00096 00099 const char * const *getMembers() const; 00100 00101 00103 void print() const; 00104 00107 static bool needsMutex(); 00108 00112 static void setMutex(mutex *mtx); 00113 00114 #include <rudiments/private/groupentry.h> 00115 }; 00116 00117 #ifdef RUDIMENTS_NAMESPACE 00118 } 00119 #endif 00120 00121 #endif