summaryrefslogtreecommitdiff
Unidiff
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 @@
8 ***************************************************************************/ 8 ***************************************************************************/
9// (c) 2002 Patrick S. Vogt <tille@handhelds.org> 9// (c) 2002 Patrick S. Vogt <tille@handhelds.org>
10 10
11#include "packagelistremote.h" 11#include "packagelistremote.h"
12 12
13#include <qstring.h> 13#include <qstring.h>
14#include <qfile.h>
14#include <stdlib.h> 15#include <stdlib.h>
15#include <unistd.h> 16#include <unistd.h>
16 17
17PackageListRemote::PackageListRemote(PackageManagerSettings* s) 18PackageListRemote::PackageListRemote(PackageManagerSettings* s)
18 : PackageList(s) 19 : PackageList(s)
19{ 20{
@@ -37,22 +38,34 @@ void PackageListRemote::query(QString s)
37 38
38void PackageListRemote::update() 39void PackageListRemote::update()
39{ 40{
40 pvDebug(2,"PackageListRemote::update"); 41 pvDebug(2,"PackageListRemote::update");
41 if (searchString.isEmpty()) return; 42 if (searchString.isEmpty()) return;
42 int r=0; 43 int r=0;
43 QString cmd = "wget"; 44 QString cmdQuery;
45 QString cmdWget = "wget";
44 QString redirect = "/tmp/oipkg.query"; 46 QString redirect = "/tmp/oipkg.query";
45 47
46 // use file for output 48 // use file for output
47 cmd += " --output-document="+redirect; 49 cmdWget += " --output-document="+redirect;
48//http://ipkgfind.handhelds.org/packages.phtml?format=pda&query=ipkg&searchtype=package&section= 50//http://ipkgfind.handhelds.org/packages.phtml?format=pda&query=ipkg&searchtype=package&section=
49 QString server="http://ipkgfind.handhelds.org/"; 51 QString server="http://ipkgfind.handhelds.org/";
50 cmd += " \""+server+"/packages.phtml"; 52 cmdQuery = cmdWget+" \""+server+"packages.phtml?";
51 cmd += "?format=pda&searchtype=package&section="; 53 cmdQuery += "format=pda&searchtype=package&section=";
52 cmd += "&query="+searchString; 54 cmdQuery += "&query="+searchString;
53 cmd += "\""; 55 cmdQuery += "\"";
54 56
55 pvDebug(4,"search :"+cmd); 57 pvDebug(4,"search :"+cmdQuery);
56 r = system(cmd.latin1()); 58 r = system(cmdQuery.latin1());
59 readFileEntries( redirect, "remote" );
60
61//[15:30:38] <killefiz> http://killefiz.de/zaurus/oipkg.php?query=puzzle
62 QFile::remove(redirect);
63 server="http://killefiz.de/";
64 cmdQuery = cmdWget+" \""+server+"zaurus/oipkg.php?";
65 cmdQuery += "query="+searchString;
66 cmdQuery += "\"";
67
68 pvDebug(4,"search :"+cmdQuery);
69 r = system(cmdQuery.latin1());
57 readFileEntries( redirect, "remote" ); 70 readFileEntries( redirect, "remote" );
58} 71}