summaryrefslogtreecommitdiff
path: root/noncore/unsupported/oipkg/packagelist.h
authortille <tille>2002-04-23 11:16:45 (UTC)
committer tille <tille>2002-04-23 11:16:45 (UTC)
commita3205d9bf5570af8441ed81cd6d9eeadf22319c9 (patch) (side-by-side diff)
treee2403e5dcc46906570cb070b852ee83d9a8af0b8 /noncore/unsupported/oipkg/packagelist.h
parent7e8db7f310d7a43326337a7960e59d9e313b8534 (diff)
downloadopie-a3205d9bf5570af8441ed81cd6d9eeadf22319c9.zip
opie-a3205d9bf5570af8441ed81cd6d9eeadf22319c9.tar.gz
opie-a3205d9bf5570af8441ed81cd6d9eeadf22319c9.tar.bz2
... mostly rewritten.
Diffstat (limited to 'noncore/unsupported/oipkg/packagelist.h') (more/less context) (show whitespace changes)
-rw-r--r--noncore/unsupported/oipkg/packagelist.h63
1 files changed, 63 insertions, 0 deletions
diff --git a/noncore/unsupported/oipkg/packagelist.h b/noncore/unsupported/oipkg/packagelist.h
new file mode 100644
index 0000000..eda8d22
--- a/dev/null
+++ b/noncore/unsupported/oipkg/packagelist.h
@@ -0,0 +1,63 @@
+#ifndef PACKAGELIST_H
+#define PACKAGELIST_H
+
+#include <qdict.h>
+#include "package.h"
+#include "pksettings.h"
+#include "debug.h"
+
+#define HACK
+#ifdef HACK
+ static QString listsDir="/usr/lib/ipkg/";
+ static QString statusDir="/usr/lib/ipkg/";
+#endif
+
+class PackageList {
+public:
+ PackageList();
+ PackageList( PackageManagerSettings* );
+ ~PackageList();
+ void insertPackage( Package* );
+ Package* find( QString );
+ Package* next();
+ Package* first();
+
+ QStringList getSections();
+ QStringList getSubSections();
+ void setSettings( PackageManagerSettings* );
+ void filterPackages();
+
+public slots:
+ void setSection(QString);
+ void setSubSection(QString);
+ void update();
+
+private:
+ int currentPackage;
+ int packageCount;
+
+ PackageManagerSettings *settings;
+ QDict<Package> packageList;
+ QDict<Package> origPackageList;
+ QDictIterator<Package> packageIter;
+
+ bool empty;
+#ifndef HACK
+ QString listsDir;
+ QString statusDir;
+#endif
+ QString aktSection;
+ QString aktSubSection;
+ QStringList sections;
+ QDict<QStringList> subSections;
+ QDict<bool> sectionsDict;
+
+
+ void updateSections( Package* );
+ void parseStatus();
+ void parseList();
+ void readFileEntries( QString );
+};
+
+
+#endif