source: src-qt4/pc-softwaremanager/pbiDBAccess.h @ 2916111d

Last change on this file since 2916111d was 2916111d, checked in by Ken Moore <ken@…>, 13 months ago

Update the AppCafe? Installed tab to take advantage of the new info available for 10.x PBI's.
Changes Include:
1) Move currently installed app info to a seperate page, that can be opened by either double-clicking on an installed application or clicking the "details" button at the bottom of the main page.
2) Update the "actions" button to be actively enabled/disabled depending on whether any items are currently checked.
3) Add ability to start composing an email (in the DE's default email client) to the port maintainer for an installed PBI. This email template also includes all the important info regarding the PBI in question (build date, architecture, FreeBSD version, version number).
4) Fix a bug with setting/unsetting the "auto-update" status for a PBI.
5) Clean up application descriptions a bit better now (affects both installed and browser tabs).

  • Property mode set to 100644
File size: 2.1 KB
4#include <QString>
5#include <QStringList>
6#include <QDir>
7#include <QFile>
8#include <QFileInfo>
9#include <QTextStream>
10#include <QDebug>
11#include <QProcess>
12#include <QProcessEnvironment>
13#include <QDateTime>
15#include "extras.h"
17class PBIDBAccess{
20        PBIDBAccess(){
21          DBDir = new QDir();
22          proc = new QProcess;
23          proc->setProcessEnvironment( QProcessEnvironment::systemEnvironment() );
24          proc->setProcessChannelMode(QProcess::MergedChannels);
25        }
26        ~PBIDBAccess(){}
27        bool setDBPath(QString); //must be set before anything else!!
28        void setRootCMDPrefix(QString); //required to run any of the DB modification functions
29        //Repository Management
30        bool setRepo(QString repoNum);
31        bool currentRepoInvalid();
32        QString currentRepo(){ return currentRepoNumber; }
33        void reloadRepoList();
34        QStringList availableRepos(); //returns list of repoNumbers
35        QStringList repoInfo(QString repoNum);
36        QStringList repoMirrors(QString repoNum);
37        //Main access functions
38        QStringList installed(); // return list of ID strings for installed PBI's
39        QStringList installedPbiInfo(QString pbiID);
40        bool installedPbiNeedsRoot(QString pbiID);
41        bool installedPbiAutoUpdate(QString pbiID);
42        bool installedPbiHasXdgDesktop(QString installPath);
43        bool installedPbiHasXdgMenu(QString installPath);
44        QString indexFilePath();
45        QString metaFilePath();
46        QStringList parseIndexLine(QString line);
47        QStringList parseAppMetaLine(QString line);
48        QStringList parseCatMetaLine(QString line);
49        QString remoteToLocalIcon(QString name, QString remoteIconPath);
50        // Database Modification functions
51        bool addRepoFile(QString rpofilepath);
52        bool removeRepo(QString repoNum);
53        bool moveRepoUp(QString repoNum);
54        bool moveRepoDown(QString repoNum);
55        bool setRepoMirrors(QString repoNum, QStringList mirrors);
58        QString currentRepoNumber, currentRepoID, DBPath, cmdPrefix;
59        QStringList repoList;
60        QDir *DBDir;
61        QProcess *proc;
63        QString readOneLineFile(QString);
64        QString getIDFromNum(QString);
65        QString runCMD(QString);
66        QString cleanupDescription(QStringList tmp);
Note: See TracBrowser for help on using the repository browser.