• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdecore
 

tdecore

Public Member Functions | Static Public Member Functions

KUserGroup Class Reference

Represents a group on your system. More...

#include <kuser.h>

List of all members.

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.

Author:
Jan Schaefer <j_schaef@informatik.uni-kl.de>
Since:
3.3

Definition at line 256 of file kuser.h.


Constructor & Destructor Documentation

KUserGroup::KUserGroup ( KUser::UIDMode  mode = KUser::UseEffectiveUID  )  [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.

Definition at line 293 of file kuser.cpp.

KUserGroup::KUserGroup ( long  gid  )  [explicit]

Create an object from a group id.

If the group does not exist, isValid() will return false.

Parameters:
gid the group id

Definition at line 298 of file kuser.cpp.

KUserGroup::KUserGroup ( const TQString &  name  )  [explicit]

Create an object from a group name.

If the group does not exist, isValid() will return false.

Parameters:
name the name of the group

Definition at line 302 of file kuser.cpp.

KUserGroup::KUserGroup ( const char *  name  )  [explicit]

Create an object from a group name.

If the group does not exist, isValid() will return false.

Parameters:
name the name of the group

Definition at line 306 of file kuser.cpp.

KUserGroup::KUserGroup ( struct group *  g  )  [explicit]

Creates an object from a group structure.

If the pointer is null, isValid() will return false.

Parameters:
g the group structure to create the group from.

Definition at line 310 of file kuser.cpp.

KUserGroup::KUserGroup ( const KUserGroup &  group  ) 

Creates a new KUserGroup instance from another KUserGroup object.

Parameters:
group the KUserGroup to copy

Definition at line 315 of file kuser.cpp.

KUserGroup::~KUserGroup (  ) 

Destructor.

Definition at line 423 of file kuser.cpp.


Member Function Documentation

TQStringList KUserGroup::allGroupNames (  )  [static]

Returns a list of all group names on this system.

Definition at line 409 of file kuser.cpp.

TQValueList< KUserGroup > KUserGroup::allGroups (  )  [static]

Returns a list of all groups on this system.

Definition at line 396 of file kuser.cpp.

long KUserGroup::gid (  )  const

Returns the group id of the group.

Returns:
the group id of the group or -1 if the group is invalid

Definition at line 367 of file kuser.cpp.

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

Definition at line 363 of file kuser.cpp.

TQString KUserGroup::name (  )  const

The name of the group.

Returns:
the name of the group

Definition at line 374 of file kuser.cpp.

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

Definition at line 334 of file kuser.cpp.

KUserGroup & KUserGroup::operator= ( const KUserGroup &  group  ) 

Copies a group.

Parameters:
group the group that should be copied
Returns:
this group

Definition at line 320 of file kuser.cpp.

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

Definition at line 325 of file kuser.cpp.

TQStringList KUserGroup::userNames (  )  const

Returns a list of all user login names of the group.

Returns:
a list of all user login names of the group

Definition at line 385 of file kuser.cpp.

const TQValueList< KUser > & KUserGroup::users (  )  const

Returns a list of all users of the group.

Returns:
a list of all users of the group

Definition at line 381 of file kuser.cpp.


The documentation for this class was generated from the following files:
  • kuser.h
  • kuser.cpp

tdecore

Skip menu "tdecore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdecore

Skip menu "tdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdecore by doxygen 1.7.1
This website is maintained by Timothy Pearson.