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

KDECore

  • sources
  • kde-4.14
  • kdelibs
  • 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 
26 class KUser::Private : public KShared
27 {
28 };
29 
30 KUser::KUser(UIDMode mode)
31  : d(0)
32 {
33  Q_UNUSED(mode)
34 }
35 
36 KUser::KUser(K_UID uid)
37  : d(0)
38 {
39  Q_UNUSED(uid)
40 }
41 
42 KUser::KUser(const QString &name)
43  : d(0)
44 {
45 }
46 
47 KUser::KUser(const char *name)
48  :d(0)
49 {
50 }
51 
52 KUser::KUser(const KUser &user)
53  : d(user.d)
54 {
55 }
56 
57 KUser &KUser::operator=(const KUser &user)
58 {
59  d = user.d;
60  return *this;
61 }
62 
63 bool KUser::operator==(const KUser &user) const
64 {
65  if (!isValid() || !user.isValid())
66  return false;
67  return true;
68 }
69 
70 bool KUser::operator !=(const KUser &user) const
71 {
72  return !operator==(user);
73 }
74 
75 bool KUser::isValid() const
76 {
77  return true;
78 }
79 
80 bool KUser::isSuperUser() const
81 {
82  return true;
83 }
84 
85 QString KUser::loginName() const
86 {
87  return QString("default");
88 }
89 
90 #ifndef KDE_NO_DEPRECATED
91 QString KUser::fullName() const
92 {
93  return QString("default");
94 }
95 #endif
96 
97 QString KUser::homeDir() const
98 {
99  return QString("\\Documents and Settings\\default");
100 }
101 
102 QString KUser::faceIconPath() const
103 {
104  return QString();
105 }
106 
107 QString KUser::shell() const
108 {
109  return QString::fromLatin1("cmd.exe");
110 }
111 
112 QList<KUserGroup> KUser::groups() const
113 {
114  return QList<KUserGroup>();
115 }
116 
117 QStringList KUser::groupNames() const
118 {
119  return QStringList();
120 }
121 
122 K_UID KUser::uid() const
123 {
124  return (K_UID)100;
125 }
126 
127 QVariant KUser::property(UserProperty which) const
128 {
129  return QVariant();
130 }
131 
132 QList<KUser> KUser::allUsers()
133 {
134  QList<KUser> result;
135 
136  result.append(KUser());
137 
138  return result;
139 }
140 
141 QStringList KUser::allUserNames()
142 {
143  QStringList result;
144 
145  result.append("wince");
146 
147  return result;
148 }
149 
150 KUser::~KUser()
151 {
152 }
153 
154 class KUserGroup::Private : public KShared
155 {
156 };
157 
158 KUserGroup::KUserGroup(const QString &_name)
159  : d(0)
160 {
161 }
162 
163 KUserGroup::KUserGroup(const char *_name)
164  : d(0)
165 {
166 }
167 
168 KUserGroup::KUserGroup(const KUserGroup &group)
169  : d(0)
170 {
171 }
172 
173 KUserGroup& KUserGroup::operator =(const KUserGroup &group)
174 {
175  d = group.d;
176  return *this;
177 }
178 
179 bool KUserGroup::operator==(const KUserGroup &group) const
180 {
181 
182  return true;
183 }
184 
185 bool KUserGroup::operator!=(const KUserGroup &group) const
186 {
187  return !operator==(group);
188 }
189 
190 bool KUserGroup::isValid() const
191 {
192  return true;
193 }
194 
195 QString KUserGroup::name() const
196 {
197  return QString("wince");
198 }
199 
200 QList<KUser> KUserGroup::users() const
201 {
202  QList<KUser> Result;
203 
204  Result.append(KUser());
205 
206  return Result;
207 }
208 
209 QStringList KUserGroup::userNames() const
210 {
211  QStringList result;
212 
213  result.append("default");
214 
215  return result;
216 }
217 
218 QList<KUserGroup> KUserGroup::allGroups()
219 {
220  QList<KUserGroup> result;
221 
222  result.append(KUserGroup(""));
223 
224  return result;
225 }
226 
227 QStringList KUserGroup::allGroupNames()
228 {
229  QStringList result;
230 
231  result.append("wince");
232 
233  return result;
234 }
235 
236 KUserGroup::~KUserGroup()
237 {
238 }
KUserGroup::KUserGroup
KUserGroup(const QString &name)
Create an object from a group name.
Definition: kuser_unix.cpp:271
KUserGroup::allGroupNames
static QStringList allGroupNames()
Returns a list of all group names on this system.
Definition: kuser_unix.cpp:342
kuser.h
KUserGroup::users
QList< KUser > users() const
Returns a list of all users of the group.
Definition: kuser_unix.cpp:316
KUserGroup::isValid
bool isValid() const
Returns whether the group is valid.
Definition: kuser_unix.cpp:304
KUserGroup::name
QString name() const
The name of the group.
Definition: kuser_unix.cpp:312
KUser::uid
K_UID uid() const
Returns the user id of the user.
Definition: kuser_unix.cpp:132
KMacroExpander::group
Definition: kmacroexpander_unix.cpp:34
KUser::property
QVariant property(UserProperty which) const
Returns an extended property.
Definition: kuser_unix.cpp:199
KUserGroup
Represents a group on your system.
Definition: kuser.h:262
KUser::allUsers
static QList< KUser > allUsers()
Returns all users of the system.
Definition: kuser_unix.cpp:204
KUser::fullName
QString fullName() const
The full name of the user.
Definition: kuser_unix.cpp:149
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
Represents a user on your system.
Definition: kuser.h:59
KUser::operator==
bool operator==(const KUser &user) const
Two KUser objects are equal if the uid() are identical.
Definition: kuser_unix.cpp:120
QSharedData
QList::append
void append(const T &value)
KUser::allUserNames
static QStringList allUserNames()
Returns all user names of the system.
Definition: kuser_unix.cpp:218
KUser::loginName
QString loginName() const
The login name of the user.
Definition: kuser_unix.cpp:144
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::operator=
KUserGroup & operator=(const KUserGroup &group)
Copies a group.
Definition: kuser_unix.cpp:291
KUser::groupNames
QStringList groupNames() const
Returns all group names of the user.
Definition: kuser_unix.cpp:186
QString
QList
Definition: kaboutdata.h:33
QStringList
KUserGroup::userNames
QStringList userNames() const
Returns a list of all user login names of the group.
Definition: kuser_unix.cpp:320
KUser::homeDir
QString homeDir() const
The path to the user's home directory.
Definition: kuser_unix.cpp:154
KUser::shell
QString shell() const
The path to the user's login shell.
Definition: kuser_unix.cpp:169
KUser::isSuperUser
bool isSuperUser() const
Checks whether the user is the super user (root).
Definition: kuser_unix.cpp:140
KUserGroup::~KUserGroup
~KUserGroup()
Destructor.
Definition: kuser_unix.cpp:355
K_UID
void * K_UID
Definition: kuser.h:33
KUser::~KUser
~KUser()
Destructor.
Definition: kuser_unix.cpp:231
QString::fromLatin1
QString fromLatin1(const char *str, int size)
KUser::groups
QList< KUserGroup > groups() const
Returns all groups of the user.
Definition: kuser_unix.cpp:173
KUser::operator=
KUser & operator=(const KUser &user)
Copies a user.
Definition: kuser_unix.cpp:114
KUser::isValid
bool isValid() const
Returns true if the user is valid.
Definition: kuser_unix.cpp:128
KUserGroup::allGroups
static QList< KUserGroup > allGroups()
Returns a list of all groups on this system.
Definition: kuser_unix.cpp:329
KUser::KUser
KUser(UIDMode mode=UseEffectiveUID)
Creates an object that contains information about the current user.
Definition: kuser_unix.cpp:74
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
KUser::faceIconPath
QString faceIconPath() const
The path to the user's face file.
Definition: kuser_unix.cpp:158
QVariant
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:22:12 by doxygen 1.8.7 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 API Reference

Skip menu "kdelibs 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

Search



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