source: src-qt4/EasyPBI/modBuild.h @ 1620346

9.1-release9.2-releasereleng/10.0releng/10.0.1releng/10.0.2
Last change on this file since 1620346 was 1620346, checked in by Kris Moore <kris@…>, 15 months ago

Initial import of PC-BSD /current/ SVN repo

  • Property mode set to 100644
File size: 2.2 KB
Line 
1#ifndef _MODBUILD_H
2#define _MODBUILD_H
3
4#include <QString>
5#include <QStringList>
6#include <QDir>
7#include <QDebug>
8#include <QFile>
9#include <QDir>
10
11class ModBuild{
12       
13private:
14  //Internal variables
15  QStringList progStruct, mkStruct, serverStruct, menuStruct, desktopStruct, mimeStruct, linksStruct, portStruct;
16  QString modulePath, saveMenuFile, saveDesktopFile, saveMimeFile, savePortDir;
17  //Internal functions
18  QString assignPortMenuCategory(QString);
19  int readMakeFile(QString);
20  static bool emptyDirectory(QString);
21  QString getFilenameFromPath(QString);
22  QString checkYesNo(QString);
23
24public:
25  ModBuild();
26  ~ModBuild();
27  //Public variables
28  QStringList currentBins, currentMimeTypes, currentIcons, validMenuCategories;
29  bool isPortPBI, isLocalPBI;
30
31  // --Regular functions--
32    //Module startup functions
33  bool createNewModule(QString, QString, QString);
34  bool loadModule(QString);
35  bool readPortInformation(QString);
36    //pbi.conf functions
37  bool loadPBIconf();
38  bool writePBIconf();
39    //desktop entry functions
40  bool loadDesktop(QString);
41  bool writeDesktop();
42  bool removeDesktop();
43    //menu entry functions
44  bool loadMenu(QString);
45  bool writeMenu();
46  bool removeMenu();
47    //mime type functions
48  bool loadMime(QString);
49  bool writeMime();
50  bool removeMime();
51    //external-links functions
52  bool loadExternalLinks();
53  bool writeExternalLinks();
54  void addExternalLink(QString, QString, QStringList);
55  void removeExternalLink(QString, QString);
56  QStringList externalLinks();
57    //resources functions
58  bool addResource(bool, QString);
59  bool removeResource(QString);
60   //General purpose functions
61  QString path(){ return modulePath; } //get the current module path
62  QString readValue(QString); //get a variable from the module
63  bool writeValue(QString,QString); //set a variable in the module
64  QStringList filesAvailable(QString); //get the available files per category
65  void compressModule();  //package the module for distribution
66  bool createModuleDir();  //Create/overwrite module directory structure
67   //FreeNAS Plugins
68  bool writeSampleFreenasControl();
69  bool writeSampleFreenasTweakRC();
70 
71  // --Static functions--
72  static bool createFile(QString,QStringList);
73  static QStringList readFile(QString);
74 
75
76};
77
78#endif
79
Note: See TracBrowser for help on using the repository browser.