source: src-qt4/pc-usermanager/user.h @ 1620346

9.1-release9.2-releasereleng/10.0releng/10.0.1releng/10.0.2releng/10.0.3
Last change on this file since 1620346 was 1620346, checked in by Kris Moore <kris@…>, 17 months ago

Initial import of PC-BSD /current/ SVN repo

  • Property mode set to 100755
File size: 3.1 KB
Line 
1/***************************************************************************
2 *   Copyright (C) 2005, 2012 by Tim McCormick   *
3 *   tim@pcbsd.org   *
4 *                                                                         *
5 *   Permission is hereby granted, free of charge, to any person obtaining *
6 *   a copy of this software and associated documentation files (the       *
7 *   "Software"), to deal in the Software without restriction, including   *
8 *   without limitation the rights to use, copy, modify, merge, publish,   *
9 *   distribute, sublicense, and/or sell copies of the Software, and to    *
10 *   permit persons to whom the Software is furnished to do so, subject to *
11 *   the following conditions:                                             *
12 *                                                                         *
13 *   The above copyright notice and this permission notice shall be        *
14 *   included in all copies or substantial portions of the Software.       *
15 *                                                                         *
16 *   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,       *
17 *   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF    *
18 *   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
19 *   IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR     *
20 *   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, *
21 *   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR *
22 *   OTHER DEALINGS IN THE SOFTWARE.                                       *
23 ***************************************************************************/
24
25#include <qapplication.h>
26
27#ifndef INC_USER_H
28#define INC_USER_H
29
30class User {
31public:
32    User();
33    User(QString username, int uid, int gid, QString home, QString shell, QString fullname);
34    User(QString username, QString home, QString shell, QString fullname, QString password = "", int gid = -1, bool isNew = true, int uid = -1);
35    virtual ~User();
36    virtual QString getUsername();
37    virtual int getUid();
38    virtual int getGid();
39    virtual QString getHome();
40    virtual QString getShell();
41    virtual QString getFullname();
42    virtual bool getChanges();
43    virtual void setChanges();
44    virtual void setGid(int gid);
45    virtual void setHome(QString home);
46    virtual void setShell(QString shell);
47    virtual void setFullname(QString fullname);
48    virtual bool getNew();
49    virtual void setNew();
50    virtual QString getPassword();
51    virtual void setPassword(QString password);
52    virtual bool getDeleted();
53    virtual void setDeleted();
54    virtual uint getStatus();
55    virtual void setStatus(uint status);
56    virtual void setDeleteHome(bool deleteHome);
57    virtual bool getDeleteHome();
58   
59private:
60    QString username;
61    int uid;
62    int gid;
63    QString home;
64    QString shell;
65    QString fullname;
66    uint status; // 0 = No change, 1 = Changes, 2 = New, 3 = Deleted
67    QString password;
68    bool deleteHome;
69};
70
71#endif // INC_USER_H
Note: See TracBrowser for help on using the repository browser.