source: src-qt4/pc-installgui/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@…>, 18 months ago

Initial import of PC-BSD /current/ SVN repo

  • Property mode set to 100644
File size: 2.0 KB
Line 
1#ifndef BACKEND_H
2#define BACKEND_H
3
4#include <QStringListIterator>
5#include <QStringList>
6#include <QString>
7#include <QList>
8#include <QDebug>
9#include <QProcess>
10#include <QByteArray>
11#include <QWidget>
12
13#define PCSYSINSTALL    QString("/usr/local/sbin/pc-sysinstall")
14#define PCSYSINSTALLDIR QString("/usr/local/share/pc-sysinstall")
15#define PCSYSINSTALLCFG QString("/tmp/sys-install.cfg")
16#define TMPLANGFILE QString("/tmp/.SysInstallLang")
17
18// Set the minimum sizes for FBSD
19#define FBSD_MINSIZE 2500
20#define FBSD_MINROOT 1000
21#define FBSD_MINVAR 500
22#define FBSD_MINUSR 1000
23
24// Set the minimum sizes for PCBSD
25#define PCBSD_MINSIZE 3000
26#define PCBSD_MINROOT 1000
27#define PCBSD_MINVAR 500
28#define PCBSD_MINUSR 1500
29
30
31namespace Scripts {
32
33class Process : public QProcess {
34public:
35    Process(const QStringList &args) {
36        setReadChannel(QProcess::StandardOutput);
37        start(PCSYSINSTALL, args);
38    }
39};
40
41class Backend {
42public:
43    static void enableNic(QString Nic, QString IP, QString NetMask, QString DNS, QString Gate, bool fetchMirrors, QString IPv6="", QString IPv6Gate="", QString IPv6DNS="");
44    static void createErrorReport();
45    static void setupSSHKeys(QString Host, QString User, QString Port);
46    static QStringList languages();
47    static QStringList keyLayouts();
48    static QStringList keyModels();
49    static QStringList keyVariants(const QString &, QStringList &savedKeyVariants);
50    static QStringList bootableMedia();
51    static QStringList networkDevices();
52    static QStringList timezones();
53    static void changeKbMap(QString model, QString layout, QString variant);
54    static QList<QStringList> hardDrives();
55    static QList<QStringList> availComponents();
56    static int systemMemory();
57    static int deleteMBRPart(QString Slice, QString &output);
58    static int addMBRPart(QString Disk, int size, QString &output);
59    static QList<QStringList> getPackageData(bool &found, QString pkgset);
60    //static QList<QStringList> slices();
61
62};
63
64
65} //namespace Scripts
66
67
68#endif // BACKEND_H
Note: See TracBrowser for help on using the repository browser.