source: src-qt4/pc-sysmanager/backend.h @ e9a3917

releng/10.0releng/10.0.1releng/10.0.2releng/10.0.3releng/10.1releng/10.1.1
Last change on this file since e9a3917 was e9a3917, checked in by Ken Moore <ken@…>, 13 months ago

Finish cleaning up the new system manager ports/source checkout functionality.
Also create a backend class that just contains a bunch of static functions for simple usage elsewhere (like generating ports update commands). This will make it easy to update the utility later if URL's or other system calls change (since we don't need to worry about all the GUI-specific stuff getting mixed in).

  • Property mode set to 100644
File size: 838 bytes
Line 
1#ifndef _SYSMAN_BACKEND_H
2#define _SYSMAN_BACKEND_H
3
4#include <QString>
5#include <QStringList>
6#include <QProcess>
7#include <QFile>
8#include <QCoreApplication>
9#include <QDir>
10#include <QDebug>
11
12class Backend{
13
14public:
15        //General CMD utilities
16        // - Run a command and return any output text
17        static QStringList shortCMD(QString dir, QString cmd, QStringList args = QStringList());
18        // - Run a command and return success/failure
19        static bool quickCMD(QString dir, QString cmd, QStringList args = QStringList());
20        // - Delete all the contents of a directory
21        static void emptyDir(QString dir);
22
23        //GIT-specific functions
24        static void generatePortsUpdateCMDS(QStringList &cmds, QStringList &dirs, QStringList &info);
25        static void generateSourceUpdateCMDS(QString branch, QStringList &cmds, QStringList &dirs, QStringList &info);
26
27};
28
29#endif
Note: See TracBrowser for help on using the repository browser.