• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KDECore

  • kdecore
  • util
kuser_wince.cpp
Go to the documentation of this file.
1/*
2 * KUser - represent a user/account (Windows)
3 * Copyright (C) 2010 Andreas Holzammer <andreas.holzammer@kdab.com>
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
14 *
15 * You should have received a copy of the GNU Library General Public License
16 * along with this library; see the file COPYING.LIB. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
19 */
20
21#include "kuser.h"
22
23#include <QStringList>
24
25
26class KUser::Private : public KShared
27{
28};
29
30KUser::KUser(UIDMode mode)
31 : d(0)
32{
33 Q_UNUSED(mode)
34}
35
36KUser::KUser(K_UID uid)
37 : d(0)
38{
39 Q_UNUSED(uid)
40}
41
42KUser::KUser(const QString &name)
43 : d(0)
44{
45}
46
47KUser::KUser(const char *name)
48 :d(0)
49{
50}
51
52KUser::KUser(const KUser &user)
53 : d(user.d)
54{
55}
56
57KUser &KUser::operator=(const KUser &user)
58{
59 d = user.d;
60 return *this;
61}
62
63bool KUser::operator==(const KUser &user) const
64{
65 if (!isValid() || !user.isValid())
66 return false;
67 return true;
68}
69
70bool KUser::operator !=(const KUser &user) const
71{
72 return !operator==(user);
73}
74
75bool KUser::isValid() const
76{
77 return true;
78}
79
80bool KUser::isSuperUser() const
81{
82 return true;
83}
84
85QString KUser::loginName() const
86{
87 return QString("default");
88}
89
90#ifndef KDE_NO_DEPRECATED
91QString KUser::fullName() const
92{
93 return QString("default");
94}
95#endif
96
97QString KUser::homeDir() const
98{
99 return QString("\\Documents and Settings\\default");
100}
101
102QString KUser::faceIconPath() const
103{
104 return QString();
105}
106
107QString KUser::shell() const
108{
109 return QString::fromLatin1("cmd.exe");
110}
111
112QList<KUserGroup> KUser::groups() const
113{
114 return QList<KUserGroup>();
115}
116
117QStringList KUser::groupNames() const
118{
119 return QStringList();
120}
121
122K_UID KUser::uid() const
123{
124 return (K_UID)100;
125}
126
127QVariant KUser::property(UserProperty which) const
128{
129 return QVariant();
130}
131
132QList<KUser> KUser::allUsers()
133{
134 QList<KUser> result;
135
136 result.append(KUser());
137
138 return result;
139}
140
141QStringList KUser::allUserNames()
142{
143 QStringList result;
144
145 result.append("wince");
146
147 return result;
148}
149
150KUser::~KUser()
151{
152}
153
154class KUserGroup::Private : public KShared
155{
156};
157
158KUserGroup::KUserGroup(const QString &_name)
159 : d(0)
160{
161}
162
163KUserGroup::KUserGroup(const char *_name)
164 : d(0)
165{
166}
167
168KUserGroup::KUserGroup(const KUserGroup &group)
169 : d(0)
170{
171}
172
173KUserGroup& KUserGroup::operator =(const KUserGroup &group)
174{
175 d = group.d;
176 return *this;
177}
178
179bool KUserGroup::operator==(const KUserGroup &group) const
180{
181
182 return true;
183}
184
185bool KUserGroup::operator!=(const KUserGroup &group) const
186{
187 return !operator==(group);
188}
189
190bool KUserGroup::isValid() const
191{
192 return true;
193}
194
195QString KUserGroup::name() const
196{
197 return QString("wince");
198}
199
200QList<KUser> KUserGroup::users() const
201{
202 QList<KUser> Result;
203
204 Result.append(KUser());
205
206 return Result;
207}
208
209QStringList KUserGroup::userNames() const
210{
211 QStringList result;
212
213 result.append("default");
214
215 return result;
216}
217
218QList<KUserGroup> KUserGroup::allGroups()
219{
220 QList<KUserGroup> result;
221
222 result.append(KUserGroup(""));
223
224 return result;
225}
226
227QStringList KUserGroup::allGroupNames()
228{
229 QStringList result;
230
231 result.append("wince");
232
233 return result;
234}
235
236KUserGroup::~KUserGroup()
237{
238}
KUserGroup
Represents a group on your system.
Definition: kuser.h:262
KUserGroup::users
QList< KUser > users() const
Returns a list of all users of the group.
Definition: kuser_unix.cpp:316
KUserGroup::name
QString name() const
The name of the group.
Definition: kuser_unix.cpp:312
KUserGroup::KUserGroup
KUserGroup(const QString &name)
Create an object from a group name.
Definition: kuser_unix.cpp:271
KUserGroup::isValid
bool isValid() const
Returns whether the group is valid.
Definition: kuser_unix.cpp:304
KUserGroup::operator!=
bool operator!=(const KUserGroup &group) const
Two KUserGroup objects are not equal if their gid()s are not identical.
Definition: kuser_unix.cpp:300
KUserGroup::operator==
bool operator==(const KUserGroup &group) const
Two KUserGroup objects are equal if their gid()s are identical.
Definition: kuser_unix.cpp:296
KUserGroup::allGroupNames
static QStringList allGroupNames()
Returns a list of all group names on this system.
Definition: kuser_unix.cpp:342
KUserGroup::allGroups
static QList< KUserGroup > allGroups()
Returns a list of all groups on this system.
Definition: kuser_unix.cpp:329
KUserGroup::~KUserGroup
~KUserGroup()
Destructor.
Definition: kuser_unix.cpp:355
KUserGroup::userNames
QStringList userNames() const
Returns a list of all user login names of the group.
Definition: kuser_unix.cpp:320
KUserGroup::operator=
KUserGroup & operator=(const KUserGroup &group)
Copies a group.
Definition: kuser_unix.cpp:291
KUser
Represents a user on your system.
Definition: kuser.h:59
KUser::faceIconPath
QString faceIconPath() const
The path to the user's face file.
Definition: kuser_unix.cpp:158
KUser::KUser
KUser(UIDMode mode=UseEffectiveUID)
Creates an object that contains information about the current user.
Definition: kuser_unix.cpp:74
KUser::homeDir
QString homeDir() const
The path to the user's home directory.
Definition: kuser_unix.cpp:154
KUser::groupNames
QStringList groupNames() const
Returns all group names of the user.
Definition: kuser_unix.cpp:186
KUser::property
QVariant property(UserProperty which) const
Returns an extended property.
Definition: kuser_unix.cpp:199
KUser::shell
QString shell() const
The path to the user's login shell.
Definition: kuser_unix.cpp:169
KUser::allUsers
static QList< KUser > allUsers()
Returns all users of the system.
Definition: kuser_unix.cpp:204
KUser::operator!=
bool operator!=(const KUser &user) const
Two KUser objects are not equal if uid() are not identical.
Definition: kuser_unix.cpp:124
KUser::allUserNames
static QStringList allUserNames()
Returns all user names of the system.
Definition: kuser_unix.cpp:218
KUser::~KUser
~KUser()
Destructor.
Definition: kuser_unix.cpp:231
KUser::groups
QList< KUserGroup > groups() const
Returns all groups of the user.
Definition: kuser_unix.cpp:173
KUser::operator==
bool operator==(const KUser &user) const
Two KUser objects are equal if the uid() are identical.
Definition: kuser_unix.cpp:120
KUser::uid
K_UID uid() const
Returns the user id of the user.
Definition: kuser_unix.cpp:132
KUser::loginName
QString loginName() const
The login name of the user.
Definition: kuser_unix.cpp:144
KUser::fullName
QString fullName() const
The full name of the user.
Definition: kuser_unix.cpp:149
KUser::isValid
bool isValid() const
Returns true if the user is valid.
Definition: kuser_unix.cpp:128
KUser::isSuperUser
bool isSuperUser() const
Checks whether the user is the super user (root).
Definition: kuser_unix.cpp:140
KUser::operator=
KUser & operator=(const KUser &user)
Copies a user.
Definition: kuser_unix.cpp:114
QList
Definition: kaboutdata.h:33
QStringList
QString
QVariant
operator==
bool operator==(const KEntry &k1, const KEntry &k2)
Definition: kconfigdata.h:72
KShared
QSharedData KShared
Definition: ksharedptr.h:38
kuser.h
K_UID
void * K_UID
Definition: kuser.h:36
KMacroExpander::group
@ group
Definition: kmacroexpander_unix.cpp:34
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDECore

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

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal