Diffstat (limited to 'noncore/unsupported/oipkg/packagelist.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/unsupported/oipkg/packagelist.h | 63 |
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 @@ | |||
1 | #ifndef PACKAGELIST_H | ||
2 | #define PACKAGELIST_H | ||
3 | |||
4 | #include <qdict.h> | ||
5 | #include "package.h" | ||
6 | #include "pksettings.h" | ||
7 | #include "debug.h" | ||
8 | |||
9 | #define HACK | ||
10 | #ifdef HACK | ||
11 | static QString listsDir="/usr/lib/ipkg/"; | ||
12 | static QString statusDir="/usr/lib/ipkg/"; | ||
13 | #endif | ||
14 | |||
15 | class PackageList { | ||
16 | public: | ||
17 | PackageList(); | ||
18 | PackageList( PackageManagerSettings* ); | ||
19 | ~PackageList(); | ||
20 | void insertPackage( Package* ); | ||
21 | Package* find( QString ); | ||
22 | Package* next(); | ||
23 | Package* first(); | ||
24 | |||
25 | QStringList getSections(); | ||
26 | QStringList getSubSections(); | ||
27 | void setSettings( PackageManagerSettings* ); | ||
28 | void filterPackages(); | ||
29 | |||
30 | public slots: | ||
31 | void setSection(QString); | ||
32 | void setSubSection(QString); | ||
33 | void update(); | ||
34 | |||
35 | private: | ||
36 | int currentPackage; | ||
37 | int packageCount; | ||
38 | |||
39 | PackageManagerSettings *settings; | ||
40 | QDict<Package> packageList; | ||
41 | QDict<Package> origPackageList; | ||
42 | QDictIterator<Package> packageIter; | ||
43 | |||
44 | bool empty; | ||
45 | #ifndef HACK | ||
46 | QString listsDir; | ||
47 | QString statusDir; | ||
48 | #endif | ||
49 | QString aktSection; | ||
50 | QString aktSubSection; | ||
51 | QStringList sections; | ||
52 | QDict<QStringList> subSections; | ||
53 | QDict<bool> sectionsDict; | ||
54 | |||
55 | |||
56 | void updateSections( Package* ); | ||
57 | void parseStatus(); | ||
58 | void parseList(); | ||
59 | void readFileEntries( QString ); | ||
60 | }; | ||
61 | |||
62 | |||
63 | #endif | ||