Diffstat (limited to 'noncore/settings/aqpkg/datamgr.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/aqpkg/datamgr.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/noncore/settings/aqpkg/datamgr.h b/noncore/settings/aqpkg/datamgr.h index 8c6fb0d..3a64d92 100644 --- a/noncore/settings/aqpkg/datamgr.h +++ b/noncore/settings/aqpkg/datamgr.h | |||
@@ -1,64 +1,69 @@ | |||
1 | /*************************************************************************** | 1 | /*************************************************************************** |
2 | datamgr.h - description | 2 | datamgr.h - description |
3 | ------------------- | 3 | ------------------- |
4 | begin : Thu Aug 29 2002 | 4 | begin : Thu Aug 29 2002 |
5 | copyright : (C) 2002 by Andy Qua | 5 | copyright : (C) 2002 by Andy Qua |
6 | email : andy.qua@blueyonder.co.uk | 6 | email : andy.qua@blueyonder.co.uk |
7 | ***************************************************************************/ | 7 | ***************************************************************************/ |
8 | 8 | ||
9 | /*************************************************************************** | 9 | /*************************************************************************** |
10 | * * | 10 | * * |
11 | * This program is free software; you can redistribute it and/or modify * | 11 | * This program is free software; you can redistribute it and/or modify * |
12 | * it under the terms of the GNU General Public License as published by * | 12 | * it under the terms of the GNU General Public License as published by * |
13 | * the Free Software Foundation; either version 2 of the License, or * | 13 | * the Free Software Foundation; either version 2 of the License, or * |
14 | * (at your option) any later version. * | 14 | * (at your option) any later version. * |
15 | * * | 15 | * * |
16 | ***************************************************************************/ | 16 | ***************************************************************************/ |
17 | 17 | ||
18 | #ifndef DATAMGR_H | 18 | #ifndef DATAMGR_H |
19 | #define DATAMGR_H | 19 | #define DATAMGR_H |
20 | 20 | ||
21 | #include <map> | 21 | #include <map> |
22 | using namespace std; | 22 | using namespace std; |
23 | 23 | ||
24 | #include <qstring.h> | ||
25 | |||
24 | #include "server.h" | 26 | #include "server.h" |
25 | #include "destination.h" | 27 | #include "destination.h" |
26 | 28 | ||
27 | #define LOCAL_SERVER "Installed Pkgs" | 29 | #define LOCAL_SERVER "Installed Pkgs" |
28 | #define LOCAL_IPKGS "local IPKG" | 30 | #define LOCAL_IPKGS "local IPKG" |
29 | 31 | ||
30 | /** | 32 | /** |
31 | *@author Andy Qua | 33 | *@author Andy Qua |
32 | */ | 34 | */ |
33 | 35 | ||
34 | 36 | ||
35 | class DataManager | 37 | class DataManager |
36 | { | 38 | { |
37 | public: | 39 | public: |
38 | DataManager(); | 40 | DataManager(); |
39 | ~DataManager(); | 41 | ~DataManager(); |
40 | 42 | ||
41 | void setActiveServer( const QString &act ) { activeServer = act; } | 43 | void setActiveServer( const QString &act ) { activeServer = act; } |
42 | QString &getActiveServer( ) { return activeServer; } | 44 | QString &getActiveServer( ) { return activeServer; } |
43 | 45 | ||
44 | Server *getLocalServer() { return getServer( LOCAL_SERVER ); } | 46 | Server *getLocalServer() { return getServer( LOCAL_SERVER ); } |
45 | vector<Server> &getServerList() { return serverList; } | 47 | vector<Server> &getServerList() { return serverList; } |
46 | Server *getServer( const char *name ); | 48 | Server *getServer( const char *name ); |
47 | 49 | ||
48 | vector<Destination> &getDestinationList() { return destList; } | 50 | vector<Destination> &getDestinationList() { return destList; } |
49 | Destination *getDestination( const char *name ); | 51 | Destination *getDestination( const char *name ); |
50 | 52 | ||
51 | void loadServers(); | 53 | void loadServers(); |
52 | void reloadServerData( ); | 54 | void reloadServerData( ); |
53 | 55 | ||
54 | void writeOutIpkgConf(); | 56 | void writeOutIpkgConf(); |
55 | 57 | ||
58 | static QString getAvailableCategories() { return availableCategories; } | ||
59 | static void setAvailableCategories( QString section ); | ||
56 | 60 | ||
57 | private: | 61 | private: |
62 | static QString availableCategories; | ||
58 | QString activeServer; | 63 | QString activeServer; |
59 | 64 | ||
60 | vector<Server> serverList; | 65 | vector<Server> serverList; |
61 | vector<Destination> destList; | 66 | vector<Destination> destList; |
62 | }; | 67 | }; |
63 | 68 | ||
64 | #endif | 69 | #endif |