00001 /* 00002 * $Id: Unix.h,v 1.5 2003/07/27 21:21:03 mindstorm2600 Exp $ 00003 * 00004 * Juan V. Guerrero <mindstorm2600@users.sourceforge.net> 00005 */ 00006 #ifndef __CLAW_UNIX_H__ 00007 #define __CLAW_UNIX_H__ 00008 #include<System.h> 00009 #include<Mutex.h> 00010 #include<String.h> 00011 00012 namespace clawsoft{ 00013 00015 class Unix:public System{ 00016 protected: 00018 char *sysname; 00019 char *nodename; 00020 char *release; 00021 char *k_version; 00022 char *machine; 00023 //static Mutex OSMutex; 00024 Mutex OSMutex; 00025 void destroyAll(); 00026 public: 00027 Unix(); 00028 ~Unix(); 00029 00031 static int getuid(); 00032 00034 static int getuid(const String &username); 00035 00043 static int getgid(); 00044 00046 static int getgid(const String &groupname); 00047 00055 static int chown(const String &fname, int userid, int groupid = -1); 00057 static int chown(const String &fname, const String &owner); 00059 static int chgrp(const String &fname, int userid); 00061 static int chgrp(const String &fname, const String &groupname); 00062 00063 00064 00066 00067 00069 void getKernelInfo(); 00071 const char *getUnixName(); 00073 const char *getNodeName(); 00075 const char *getKernelRelease(); 00077 const char *getKernelReleaseVersion(); 00079 const char *getHostMachine(); 00080 }; 00081 00082 //extern Unix *OS; 00083 }; 00084 00085 #endif
Authors:
Juan V. Guerrero
Jannette C. Mejia
Juan C. Guevara
Powered by: