source: src-qt4/PCDM/src/pcdm-backend.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 100644
File size: 1.6 KB
Line 
1/* PCDM Login Manager:
2*  Written by Ken Moore (ken@pcbsd.org) 2012/2013
3*  Copyright(c) 2013 by the PC-BSD Project
4*  Available under the 3-clause BSD license
5*/
6
7#ifndef PCDM_BACKEND_H
8#define PCDM_BACKEND_H
9
10#include <QStringList>
11#include <QString>
12#include <QDebug>
13#include <QDir>
14#include <QProcess>
15
16#include "pcdm-config.h"
17#include "pcbsd-utils.h"
18
19#define PCSYSINSTALL    QString("/usr/sbin/pc-sysinstall")
20
21class Process : public QProcess {
22public:
23    Process(const QStringList &args) {
24        setReadChannel(QProcess::StandardOutput);
25        start(PCSYSINSTALL, args);
26    }
27};
28
29class Backend {
30public:
31    static QStringList getAvailableDesktops();
32    static QString getDesktopComment(QString);
33    static QString getDesktopIcon(QString);
34    static QString getDesktopBinary(QString);
35    static QStringList getSystemUsers();
36    static QString getUsernameFromDisplayname(QString);
37    static QStringList keyModels();
38    static QStringList keyLayouts();
39    static QStringList keyVariants(const QString &layout, QStringList &savedKeyVariants);
40    static void changeKbMap(QString model, QString layout, QString variant);
41    static QStringList languages();
42    static void openLogFile(QString);
43    static void log(QString); 
44    static QString getUserHomeDir(QString);
45    static void checkLocalDirs();
46
47    static QString getALUsername();
48    static QString getALDesktopCmd();
49    static QString getALPassword();
50   
51private:       
52    static void loadXSessionsData();
53    static QStringList readXSessionsFile(QString, QString);
54    static void readSystemUsers();
55 
56   
57};
58
59
60#endif // PCDM_BACKEND_H
Note: See TracBrowser for help on using the repository browser.