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

9.2-releaseenter/10releng/10.0releng/10.0.1releng/10.0.2releng/10.0.3releng/10.1releng/10.1.1releng/10.1.2
Last change on this file since 87d35b7 was 87d35b7, checked in by Kris Moore <kris@…>, 23 months ago

Add ability to PEFS encrypt users home-directories when we
create a new user via the user-manager GUI

  • Property mode set to 100644
File size: 3.2 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#include <QFile>
27
28#ifndef INC_USER_H
29#define INC_USER_H
30
31class User {
32public:
33    User();
34    User(QString username, int uid, int gid, QString home, QString shell, QString fullname);
35    User(QString username, QString home, QString shell, QString fullname, QString password = "", int gid = -1, bool isNew = true, int uid = -1);
36    virtual ~User();
37    virtual QString getUsername();
38    virtual int getUid();
39    virtual int getGid();
40    virtual bool getEnc();
41    virtual void setEnc(bool Enc);
42    virtual QString getHome();
43    virtual QString getShell();
44    virtual QString getFullname();
45    virtual bool getChanges();
46    virtual void setChanges();
47    virtual void setGid(int gid);
48    virtual void setHome(QString home);
49    virtual void setShell(QString shell);
50    virtual void setFullname(QString fullname);
51    virtual bool getNew();
52    virtual void setNew();
53    virtual QString getClearPassword();
54    virtual QString getPassword();
55    virtual void setPassword(QString password);
56    virtual bool getDeleted();
57    virtual void setDeleted();
58    virtual uint getStatus();
59    virtual void setStatus(uint status);
60    virtual void setDeleteHome(bool deleteHome);
61    virtual bool getDeleteHome();
62   
63private:
64    QString username;
65    int uid;
66    int gid;
67    QString home;
68    QString shell;
69    QString fullname;
70    uint status; // 0 = No change, 1 = Changes, 2 = New, 3 = Deleted
71    QString password;
72    QString clearPass;
73    bool deleteHome;
74    bool enc;
75};
76
77#endif // INC_USER_H
Note: See TracBrowser for help on using the repository browser.