summaryrefslogtreecommitdiff
authortille <tille>2002-07-06 14:02:05 (UTC)
committer tille <tille>2002-07-06 14:02:05 (UTC)
commit2d2eda28dd68bb989c3af8bb7f95d8255e886dda (patch) (side-by-side diff)
tree0552811f070bed9a0ebd5faa53ffd93a32e3b7e9
parentac76e913d1930cdf7903fed344bd7bcc1b7545c0 (diff)
downloadopie-2d2eda28dd68bb989c3af8bb7f95d8255e886dda.zip
opie-2d2eda28dd68bb989c3af8bb7f95d8255e886dda.tar.gz
opie-2d2eda28dd68bb989c3af8bb7f95d8255e886dda.tar.bz2
query killefiz.de
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
@@ -8,12 +8,13 @@
***************************************************************************/
// (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)
{
@@ -37,22 +38,34 @@ void PackageListRemote::query(QString 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" );
}