kde-playground/pykde4/sip/kdecore/kuser.sip

108 lines
3.2 KiB
Text

//
// Copyright 2008 Jim Bublitz <jbublitz@nwinternet.com>
// Earlier copyrights 1998 - 2007 Jim Bublitz also apply
// Generated by twine
// This file is part of PyKDE4.
// PyKDE4 is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of
// the License, or (at your option) any later version.
// PyKDE4 is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
typedef uid_t K_UID;
%ModuleHeaderCode
#include <kuser.h>
%End
typedef gid_t K_GID;
class KUser
{
%TypeHeaderCode
#include <kuser.h>
%End
public:
enum UIDMode
{
UseEffectiveUID,
UseRealUserID
};
explicit KUser (KUser::UIDMode mode = KUser::UseEffectiveUID);
explicit KUser (K_UID uid);
explicit KUser (const QString& name);
explicit KUser (const char* name);
//ig explicit KUser (const passwd* p);
KUser (const KUser& user);
bool operator == (const KUser& user) const;
bool operator != (const KUser& user) const;
bool isValid () const;
K_UID uid () const;
K_GID gid () const;
bool isSuperUser () const;
QString loginName () const;
QString homeDir () const;
QString faceIconPath () const;
QString shell () const;
QList<KUserGroup> groups () const;
QStringList groupNames () const;
enum UserProperty
{
FullName,
RoomNumber,
WorkPhone,
HomePhone
};
QVariant property (KUser::UserProperty which) const;
static QList<KUser> allUsers ();
static QStringList allUserNames ();
~KUser ();
};
// KUser
class KUserGroup
{
%TypeHeaderCode
#include <kuser.h>
%End
public:
explicit KUserGroup (const QString& name);
explicit KUserGroup (const char* name);
explicit KUserGroup (KUser::UIDMode mode = KUser::UseEffectiveUID);
explicit KUserGroup (K_GID gid);
//ig explicit KUserGroup (const group* g);
KUserGroup (const KUserGroup& group);
bool operator == (const KUserGroup& group) const;
bool operator != (const KUserGroup& group) const;
bool isValid () const;
K_GID gid () const;
QString name () const;
QList<KUser> users () const;
QStringList userNames () const;
static QList<KUserGroup> allGroups ();
static QStringList allGroupNames ();
~KUserGroup ();
};
// KUserGroup