From a3205d9bf5570af8441ed81cd6d9eeadf22319c9 Mon Sep 17 00:00:00 2001 From: tille Date: Tue, 23 Apr 2002 11:16:45 +0000 Subject: ... mostly rewritten. --- (limited to 'noncore/unsupported/oipkg/packagelist.h') 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 +#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 packageList; + QDict origPackageList; + QDictIterator packageIter; + + bool empty; +#ifndef HACK + QString listsDir; + QString statusDir; +#endif + QString aktSection; + QString aktSubSection; + QStringList sections; + QDict subSections; + QDict sectionsDict; + + + void updateSections( Package* ); + void parseStatus(); + void parseList(); + void readFileEntries( QString ); +}; + + +#endif -- cgit v0.9.0.2