ssukickstarter.h 1.07 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14
/**
 * @file ssukickstarter.h
 * @copyright 2013 Jolla Ltd.
 * @author Bernd Wachter <bwachter@lart.info>
 * @date 2013
 */

#ifndef _SSUKICKSTARTER_H
#define _SSUKICKSTARTER_H

#include <QObject>
#include <QSettings>
#include <QHash>

15 16
#include "libssu/ssudeviceinfo.h"
#include "libssu/ssu.h"
17 18 19

class SsuKickstarter {
  public:
20
    SsuKickstarter();
21
    void setRepoParameters(QHash<QString, QString> parameters);
22
    bool write(QString kickstart="");
23

24 25 26 27 28 29 30
    enum ScriptletFlags {
      /// Chroot is not useful, but helps in making the code more readable
      Chroot         = 0,
      NoChroot       = 0x1,
      DeviceSpecific = 0x2,
    };

31 32 33 34 35 36
  private:
    QHash<QString, QString> repoOverride;
    Ssu ssu;
    bool rndMode;
    QString deviceModel;
    QStringList commands();
37 38
    /// read a command section from file system
    QStringList commandSection(const QString &section, const QString &description="");
39
    QStringList packages();
40
    QString replaceSpaces(const QString &value);
41
    QStringList repos();
42
    QStringList scriptletSection(QString name, int flags=Chroot);
43 44 45
};

#endif