summaryrefslogtreecommitdiff
path: root/noncore/settings/aqpkg/datamgr.h
authordrw <drw>2003-04-29 02:28:16 (UTC)
committer drw <drw>2003-04-29 02:28:16 (UTC)
commite096c9d1f2be1ec74ede583fc4221871a56ef508 (patch) (unidiff)
tree1c6f49430179e2f262179951477bbe4bd7d32e71 /noncore/settings/aqpkg/datamgr.h
parent2f26f696ca6acd05aa615e15d891eede9907a1c0 (diff)
downloadopie-e096c9d1f2be1ec74ede583fc4221871a56ef508.zip
opie-e096c9d1f2be1ec74ede583fc4221871a56ef508.tar.gz
opie-e096c9d1f2be1ec74ede583fc4221871a56ef508.tar.bz2
Give aqpkg standard source headers and some minor code clean-up.
Diffstat (limited to 'noncore/settings/aqpkg/datamgr.h') (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/aqpkg/datamgr.h44
1 files changed, 28 insertions, 16 deletions
diff --git a/noncore/settings/aqpkg/datamgr.h b/noncore/settings/aqpkg/datamgr.h
index 7fa42c1..32a1e57 100644
--- a/noncore/settings/aqpkg/datamgr.h
+++ b/noncore/settings/aqpkg/datamgr.h
@@ -1,64 +1,76 @@
1/*************************************************************************** 1/*
2 datamgr.h - description 2                This file is part of the OPIE Project
3 ------------------- 3
4 begin : Thu Aug 29 2002 4 =. Copyright (c) 2002 Andy Qua <andy.qua@blueyonder.co.uk>
5 copyright : (C) 2002 by Andy Qua 5             .=l. Dan Williams <drw@handhelds.org>
6 email : andy.qua@blueyonder.co.uk 6           .>+-=
7 ***************************************************************************/ 7 _;:,     .>    :=|. This file is free software; you can
8 8.> <`_,   >  .   <= redistribute it and/or modify it under
9/*************************************************************************** 9:`=1 )Y*s>-.--   : the terms of the GNU General Public
10 * * 10.="- .-=="i,     .._ License as published by the Free Software
11 * This program is free software; you can redistribute it and/or modify * 11 - .   .-<_>     .<> Foundation; either version 2 of the License,
12 * it under the terms of the GNU General Public License as published by * 12     ._= =}       : or (at your option) any later version.
13 * the Free Software Foundation; either version 2 of the License, or * 13    .%`+i>       _;_.
14 * (at your option) any later version. * 14    .i_,=:_.      -<s. This file is distributed in the hope that
15 * * 15     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
16 ***************************************************************************/ 16    : ..    .:,     . . . without even the implied warranty of
17    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
18  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU General
19..}^=.=       =       ; Public License for more details.
20++=   -.     .`     .:
21 :     =  ...= . :.=- You should have received a copy of the GNU
22 -.   .:....=;==+<; General Public License along with this file;
23  -_. . .   )=.  = see the file COPYING. If not, write to the
24    --        :-=` Free Software Foundation, Inc.,
25 59 Temple Place - Suite 330,
26 Boston, MA 02111-1307, USA.
27
28*/
17 29
18#ifndef DATAMGR_H 30#ifndef DATAMGR_H
19#define DATAMGR_H 31#define DATAMGR_H
20 32
21#include <map> 33#include <map>
22using namespace std; 34using namespace std;
23 35
24#include <qlist.h> 36#include <qlist.h>
25#include <qobject.h> 37#include <qobject.h>
26#include <qstring.h> 38#include <qstring.h>
27 39
28#include "server.h" 40#include "server.h"
29#include "destination.h" 41#include "destination.h"
30 42
31 #define LOCAL_SERVER "Installed Pkgs" 43 #define LOCAL_SERVER "Installed Pkgs"
32 #define LOCAL_IPKGS "local IPKG" 44 #define LOCAL_IPKGS "local IPKG"
33 45
34/** 46/**
35 *@author Andy Qua 47 *@author Andy Qua
36 */ 48 */
37 49
38 50
39class DataManager : public QObject 51class DataManager : public QObject
40{ 52{
41 Q_OBJECT 53 Q_OBJECT
42public: 54public:
43 DataManager(); 55 DataManager();
44 ~DataManager(); 56 ~DataManager();
45 57
46 void setActiveServer( const QString &act ) { activeServer = act; } 58 void setActiveServer( const QString &act ) { activeServer = act; }
47 QString &getActiveServer( ) { return activeServer; } 59 QString &getActiveServer( ) { return activeServer; }
48 60
49 Server *getLocalServer() { return ( getServer( LOCAL_SERVER ) ); } 61 Server *getLocalServer() { return ( getServer( LOCAL_SERVER ) ); }
50 QList<Server> &getServerList() { return serverList; } 62 QList<Server> &getServerList() { return serverList; }
51 Server *getServer( const char *name ); 63 Server *getServer( const char *name );
52 64
53 QList<Destination> &getDestinationList() { return destList; } 65 QList<Destination> &getDestinationList() { return destList; }
54 Destination *getDestination( const char *name ); 66 Destination *getDestination( const char *name );
55 67
56 void loadServers(); 68 void loadServers();
57 void reloadServerData( ); 69 void reloadServerData( );
58 70
59 void writeOutIpkgConf(); 71 void writeOutIpkgConf();
60 72
61 static QString getAvailableCategories() { return availableCategories; } 73 static QString getAvailableCategories() { return availableCategories; }
62 static void setAvailableCategories( QString section ); 74 static void setAvailableCategories( QString section );
63 75
64 QString getHttpProxy() { return httpProxy; } 76 QString getHttpProxy() { return httpProxy; }