summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/oipkg/packagelistremote.cpp29
1 files changed, 21 insertions, 8 deletions
diff --git a/noncore/unsupported/oipkg/packagelistremote.cpp b/noncore/unsupported/oipkg/packagelistremote.cpp
index b4b6979..39bbac2 100644
--- a/noncore/unsupported/oipkg/packagelistremote.cpp
+++ b/noncore/unsupported/oipkg/packagelistremote.cpp
@@ -2,24 +2,25 @@
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
// (c) 2002 Patrick S. Vogt <tille@handhelds.org>
#include "packagelistremote.h"
#include <qstring.h>
+#include <qfile.h>
#include <stdlib.h>
#include <unistd.h>
PackageListRemote::PackageListRemote(PackageManagerSettings* s)
: PackageList(s)
{
PackageListRemote();
}
PackageListRemote::PackageListRemote()
: PackageList()
{
@@ -31,28 +32,40 @@ PackageListRemote::~PackageListRemote()
void PackageListRemote::query(QString s)
{
pvDebug(4,"set query "+s);
searchString = s;
}
void PackageListRemote::update()
{
pvDebug(2,"PackageListRemote::update");
if (searchString.isEmpty()) return;
int r=0;
- QString cmd = "wget";
+ QString cmdQuery;
+ QString cmdWget = "wget";
QString redirect = "/tmp/oipkg.query";
// use file for output
- cmd += " --output-document="+redirect;
+ cmdWget += " --output-document="+redirect;
//http://ipkgfind.handhelds.org/packages.phtml?format=pda&query=ipkg&searchtype=package&section=
QString server="http://ipkgfind.handhelds.org/";
- cmd += " \""+server+"/packages.phtml";
- cmd += "?format=pda&searchtype=package&section=";
- cmd += "&query="+searchString;
- cmd += "\"";
+ cmdQuery = cmdWget+" \""+server+"packages.phtml?";
+ cmdQuery += "format=pda&searchtype=package&section=";
+ cmdQuery += "&query="+searchString;
+ cmdQuery += "\"";
- pvDebug(4,"search :"+cmd);
- r = system(cmd.latin1());
+ pvDebug(4,"search :"+cmdQuery);
+ r = system(cmdQuery.latin1());
+ readFileEntries( redirect, "remote" );
+
+//[15:30:38] <killefiz> http://killefiz.de/zaurus/oipkg.php?query=puzzle
+ QFile::remove(redirect);
+ server="http://killefiz.de/";
+ cmdQuery = cmdWget+" \""+server+"zaurus/oipkg.php?";
+ cmdQuery += "query="+searchString;
+ cmdQuery += "\"";
+
+ pvDebug(4,"search :"+cmdQuery);
+ r = system(cmdQuery.latin1());
readFileEntries( redirect, "remote" );
}