summaryrefslogtreecommitdiff
path: root/noncore/settings/aqpkg/server.cpp
Side-by-side diff
Diffstat (limited to 'noncore/settings/aqpkg/server.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/aqpkg/server.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/noncore/settings/aqpkg/server.cpp b/noncore/settings/aqpkg/server.cpp
index 539ebf0..7c3257b 100644
--- a/noncore/settings/aqpkg/server.cpp
+++ b/noncore/settings/aqpkg/server.cpp
@@ -19,24 +19,25 @@
***************************************************************************/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <iostream>
#include <fstream>
using namespace std;
#include "server.h"
+#include "datamgr.h"
#ifdef QWS
#include <qpe/global.h>
#include <qpe/applnk.h>
#include <qlist.h>
#endif
#include "utils.h"
#include "global.h"
Server :: Server( const char *name, const char *url )
@@ -202,24 +203,36 @@ void Server :: readPackageFile( Server *local, bool clearAll, bool installingToR
currPackage->setStatus( value );
}
else if ( key == "Description" )
{
if ( currPackage )
currPackage->setDescription( value );
}
else if ( key == "Filename" )
{
if ( currPackage )
currPackage->setFilename( value );
}
+ else if ( key == "Size" )
+ {
+ if ( currPackage )
+ currPackage->setPackageSize( value );
+ }
+ else if ( key == "Section" )
+ {
+ if ( currPackage )
+ currPackage->setSection( value );
+
+ DataManager::setAvailableCategories( value );
+ }
else if ( key == "" )
{
newPackage = true;
}
} while ( !in.eof() );
in.close();
// build local packages
buildLocalPackages( local );
}
@@ -261,19 +274,25 @@ Package *Server :: getPackage( const char *name )
QString Server :: toString()
{
QString ret = "Server\n name - " + serverName +
"\n url - " + serverUrl +
"\n";
for ( unsigned int i = 0 ; i < packageList.size() ; ++i )
ret += "\n " + packageList[i].toString();
return ret;
+} /*
+void addAvailableSection( QString section )
+{
+ if ( DataManager::availableCategories.find( value ) == -1 )
+// DataManager::availableCategories += "#" + value;
}
+*/
vector<Package> &Server::getPackageList()
{
return packageList;
}