KCoreAddons

#include <kuser.h>

Inheritance diagram for KUserId:

Public Member Functions

 KUserId ()
 
 KUserId (const KUserId &other)
 
 KUserId (K_UID uid)
 
- Public Member Functions inherited from KUserOrGroupId< K_UID >
bool isValid () const
 
bool isValid () const
 
NativeType nativeId () const
 
void * nativeId () const
 
bool operator!= (const KUserOrGroupId &other) const
 
bool operator!= (const KUserOrGroupId< void * > &other) const
 
bool operator== (const KUserOrGroupId &other) const
 
bool operator== (const KUserOrGroupId< void * > &other) const
 
QString toString () const
 
QString toString () const
 

Static Public Member Functions

static KUserId currentEffectiveUserId ()
 
static KUserId currentUserId ()
 
static KUserId fromName (const QString &name)
 

Additional Inherited Members

- Public Types inherited from KUserOrGroupId< K_UID >
typedef K_UID NativeType
 
- Protected Member Functions inherited from KUserOrGroupId< K_UID >
 KUserOrGroupId ()
 
 KUserOrGroupId (const KUserOrGroupId< K_UID > &other)
 
 KUserOrGroupId (const KUserOrGroupId< void * > &other)
 
 KUserOrGroupId (NativeType nativeId)
 
 KUserOrGroupId (void *nativeId)
 
KUserOrGroupIdoperator= (const KUserOrGroupId< K_UID > &other)
 
KUserOrGroupId< void * > & operator= (const KUserOrGroupId< void * > &other)
 

Detailed Description

A platform independent user ID.

See also
KUserOrGroupId
Since
5.0
Author
Alex Richardson arich.nosp@m.ards.nosp@m.on.kd.nosp@m.e@gm.nosp@m.ail.c.nosp@m.om

Definition at line 133 of file kuser.h.

Constructor & Destructor Documentation

◆ KUserId() [1/3]

KUserId::KUserId ( )
inline

Creates an invalid KUserId.

Definition at line 135 of file kuser.h.

◆ KUserId() [2/3]

KUserId::KUserId ( K_UID uid)
inlineexplicit

Creates an KUserId from the native user ID type.

Definition at line 139 of file kuser.h.

◆ KUserId() [3/3]

KUserId::KUserId ( const KUserId & other)
inline

Definition at line 143 of file kuser.h.

◆ ~KUserId()

KUserId::~KUserId ( )
inline

Definition at line 147 of file kuser.h.

Member Function Documentation

◆ currentEffectiveUserId()

KUserId KUserId::currentEffectiveUserId ( )
static
Returns
a KUserId for the current effective user. This is like geteuid() on UNIX.
Note
Windows does not have setuid binaries, so on Windows this will always be the same as KUserId::currentUserId()

Definition at line 620 of file kuser_unix.cpp.

◆ currentUserId()

KUserId KUserId::currentUserId ( )
static
Returns
a KUserId for the current user. This is like getuid() on UNIX.

Definition at line 615 of file kuser_unix.cpp.

◆ fromName()

KUserId KUserId::fromName ( const QString & name)
static
Returns
a KUserId for the user with name name, or an invalid KUserId if no user with this name was found on the system

Definition at line 587 of file kuser_unix.cpp.


The documentation for this struct was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jun 14 2024 11:58:27 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.