#include <kuser.h>
Public Member Functions | |
KUserGroup (KUser::UIDMode mode=KUser::UseEffectiveUID) | |
KUserGroup (long gid) | |
KUserGroup (const TQString &name) | |
KUserGroup (const char *name) | |
KUserGroup (struct group *g) | |
KUserGroup (const KUserGroup &group) | |
KUserGroup & | operator= (const KUserGroup &group) |
bool | operator== (const KUserGroup &group) const |
bool | operator!= (const KUserGroup &group) const |
bool | isValid () const |
long | gid () const |
TQString | name () const |
const TQValueList< KUser > & | users () const |
TQStringList | userNames () const |
~KUserGroup () | |
Static Public Member Functions | |
static TQValueList< KUserGroup > | allGroups () |
static TQStringList | allGroupNames () |
Detailed Description
Represents a group on your system.
This class represents a group on your system. You can either get information about the group of the current user, of fetch information about a group on the system. Instances of this class will be explicitly shared, so copying objects is very cheap and you can safely pass objects by value.
- Since
- 3.3
Constructor & Destructor Documentation
◆ KUserGroup() [1/6]
|
explicit |
Create an object from the group of the current user.
- Parameters
-
mode if KUser::UseEffectiveUID is passed the effective user will be used. If KUser::UseRealUserID is passed the real user will be used. The real UID will be different than the effective UID in setuid programs; in such a case use the effective UID for checking permissions, and the real UID for displaying information about the group associated with the user.
◆ KUserGroup() [2/6]
|
explicit |
◆ KUserGroup() [3/6]
|
explicit |
◆ KUserGroup() [4/6]
|
explicit |
◆ KUserGroup() [5/6]
|
explicit |
◆ KUserGroup() [6/6]
KUserGroup::KUserGroup | ( | const KUserGroup & | group | ) |
Creates a new KUserGroup instance from another KUserGroup object.
- Parameters
-
group the KUserGroup to copy
◆ ~KUserGroup()
Member Function Documentation
◆ allGroupNames()
|
static |
◆ allGroups()
|
static |
◆ gid()
long KUserGroup::gid | ( | ) | const |
◆ isValid()
bool KUserGroup::isValid | ( | ) | const |
Returns wether the group is valid.
A KUserGroup object can be invalid if it is created with a non-existing gid or name.
- Returns
- true if the group is valid
◆ name()
TQString KUserGroup::name | ( | ) | const |
◆ operator!=()
bool KUserGroup::operator!= | ( | const KUserGroup & | group | ) | const |
Two KUserGroup objects are not equal if either isValid() is not true or gid() are not identical.
- Returns
- true if the groups are not identical
◆ operator=()
KUserGroup & KUserGroup::operator= | ( | const KUserGroup & | group | ) |
◆ operator==()
bool KUserGroup::operator== | ( | const KUserGroup & | group | ) | const |
Two KUserGroup objects are equal if isValid() is true and gid() are identical.
- Returns
- true if the groups are identical
◆ userNames()
TQStringList KUserGroup::userNames | ( | ) | const |
◆ users()
const TQValueList< KUser > & KUserGroup::users | ( | ) | const |
The documentation for this class was generated from the following files: