#include <Group.h>
Inheritance diagram for clawsoft::Group:
Public Methods | |
Group () | |
This is the default constructor, it will initialize the internal groupid and groupname to the same one as the current executing process. | |
Group (int gid) | |
This will create a new Group object with groupid gid. | |
Group (const String &gname) | |
This will create a new Group object with groupname gname. | |
int | getGroupID () |
This will return the object's numeric group id. | |
const String & | toString () |
This will return the corresponding groupname as a string. | |
Static Public Methods | |
int | getCurrentGroupID () |
This will return the current process's group id. | |
int | getGroupID (const String &gname) |
This will return the numeric group id corresponding to the string gname. | |
int | getEffectiveGroupID () |
This will give the numeric effective group id. | |
void | setGroupID (int gid) |
This will set the current process group id to gid. | |
void | setGroupID (const String &gname) |
This will set the current process group name to gname. | |
void | setGroupID (const Group &grpobj) |
This will set the current process group to grpobj. | |
void | setEffectiveGroupID (int gid) |
This will set the current process effective group id to gid. | |
void | setEffectiveGroupID (const String &gname) |
This will set the current process effective group name to gname. | |
void | setEffectiveGroupID (const Group &grpobj) |
This will set the current process effective group to grpobj. | |
Protected Methods | |
char * | getGroupName (int gid) |
This method will return a groupname based on a numeric group id. | |
void | getKernelInfo () |
This method will update the name and information about the current running kernel. | |
const char * | getUnixName () |
Use this method to retreives the name of the UNIX version you are currently using. | |
const char * | getNodeName () |
This method will give you the nodename of your current host machine. | |
const char * | getKernelRelease () |
This will return your current kernel release string. | |
const char * | getKernelReleaseVersion () |
This will return your current kernel release version string. | |
const char * | getHostMachine () |
This will return your current architecture description. | |
void | setClassName (const char *n) |
Call this method when you need to set the name of the class you're creating, typically in it's constructor, remember that you must set the classname for every class you create, that way you can have more information while debugging. | |
const char * | getClassName () |
Returns the name of the current class. | |
Static Protected Methods | |
int | getuid () |
Obtains the current (running) user id. | |
int | getuid (const String &username) |
Obtain uid from username. | |
int | getgid () |
Obtains the current (running) user id. | |
int | getgid (const String &groupname) |
Obtain uid from username. | |
int | chown (const String &fname, int userid, int groupid=-1) |
Changes the owner of the file by its numeric userid. | |
int | chown (const String &fname, const String &owner) |
Changes the owner of the file by its username. | |
int | chgrp (const String &fname, int userid) |
Changes the group owner of the file by its numeric userid. | |
int | chgrp (const String &fname, const String &groupname) |
Changes the group owner of the file by its groupname. | |
int | installedCPUs () |
This will return how many CPUs are installed in the system. | |
double | cpuSpeed () |
This will return the CPU speed in megahertz. | |
int | totalMemory () |
Will return the total amount of system memory. | |
int | freeMemory () |
Will return the total amount of free system memory. | |
void | usleep (Uint32 usec) |
Will freeze the software for usec microseconds. | |
Protected Attributes | |
int | _groupid |
Internal numeric group id reference member. | |
String | _groupname |
Internal numeric group id reference member. | |
char * | sysname |
Pointer to system name. |
|
This is the default constructor, it will initialize the internal groupid and groupname to the same one as the current executing process.
|
|
This will create a new Group object with groupid gid.
|
|
This will create a new Group object with groupname gname.
|
|
Changes the group owner of the file by its groupname.
|
|
Changes the group owner of the file by its numeric userid.
|
|
Changes the owner of the file by its username.
|
|
Changes the owner of the file by its numeric userid.
|
|
This will return the CPU speed in megahertz.
|
|
Will return the total amount of free system memory.
|
|
Returns the name of the current class.
|
|
This will return the current process's group id.
|
|
This will give the numeric effective group id.
|
|
Obtain uid from username.
|
|
Obtains the current (running) user id.
|
|
This will return the numeric group id corresponding to the string gname.
|
|
This will return the object's numeric group id.
|
|
This method will return a groupname based on a numeric group id. BE CAREFULL WHEN USING THIS FUNCTION AND ALLWAYS RELEASE THE POINTER IT RETURN IN ORDER TO PREVENT MEMORY LEAKS |
|
This will return your current architecture description.
|
|
This method will update the name and information about the current running kernel.
|
|
This will return your current kernel release string.
|
|
This will return your current kernel release version string.
|
|
This method will give you the nodename of your current host machine.
|
|
Obtain uid from username.
|
|
Obtains the current (running) user id.
|
|
Use this method to retreives the name of the UNIX version you are currently using.
|
|
This will return how many CPUs are installed in the system.
|
|
Call this method when you need to set the name of the class you're creating, typically in it's constructor, remember that you must set the classname for every class you create, that way you can have more information while debugging.
|
|
This will set the current process effective group to grpobj.
|
|
This will set the current process effective group name to gname.
|
|
This will set the current process effective group id to gid.
|
|
This will set the current process group to grpobj.
|
|
This will set the current process group name to gname.
|
|
This will set the current process group id to gid.
|
|
This will return the corresponding groupname as a string.
|
|
Will return the total amount of system memory.
|
|
Will freeze the software for usec microseconds.
|
|
Internal numeric group id reference member.
|
|
Internal numeric group id reference member.
|
|
Pointer to system name.
|
Authors:
Juan V. Guerrero
Jannette C. Mejia
Juan C. Guevara
Powered by: