17 |
#include <qcstring.h> |
#include <qcstring.h> |
18 |
#include <qbitarray.h> |
#include <qbitarray.h> |
19 |
#include <qhttp.h> |
#include <qhttp.h> |
20 |
#include <qnetwork.h> |
#include <qeventloop.h> |
21 |
|
|
22 |
#include <stdlib.h> |
#include <stdlib.h> |
23 |
|
|
40 |
} |
} |
41 |
|
|
42 |
kio_kmdProtocol slave(argv[2], argv[3]); |
kio_kmdProtocol slave(argv[2], argv[3]); |
|
slave.dispatchLoop(); |
|
43 |
|
|
44 |
//QApplication::enter_loop(); |
slave.dispatchLoop(); |
45 |
|
|
46 |
return 0; |
return 0; |
47 |
} |
} |
51 |
: QObject(), SlaveBase("kio_kmd", pool_socket, app_socket) |
: QObject(), SlaveBase("kio_kmd", pool_socket, app_socket) |
52 |
{ |
{ |
53 |
kdDebug() << "kio_kmdProtocol::kio_kmdProtocol()" << endl; |
kdDebug() << "kio_kmdProtocol::kio_kmdProtocol()" << endl; |
54 |
|
loop = new QEventLoop(this); |
55 |
|
kdDebug() << "init finished" << endl; |
56 |
} |
} |
57 |
/* ---------------------------------------------------------------------------------- */ |
/* ---------------------------------------------------------------------------------- */ |
58 |
|
|
65 |
/* ---------------------------------------------------------------------------------- */ |
/* ---------------------------------------------------------------------------------- */ |
66 |
void kio_kmdProtocol::get(const KURL& url ) |
void kio_kmdProtocol::get(const KURL& url ) |
67 |
{ |
{ |
68 |
qInitNetworkProtocols (); |
isFinished = 0; |
69 |
|
|
70 |
kdDebug() << "kio_urn::get(const KURL& url)" << endl ; |
kdDebug() << "kio_urn::get(const KURL& url)" << endl ; |
71 |
|
|
86 |
http->setHost("www.trolltech.com"); |
http->setHost("www.trolltech.com"); |
87 |
requestNr = http->get("/index.html"); |
requestNr = http->get("/index.html"); |
88 |
kdDebug() << "request id: " << requestNr << endl; |
kdDebug() << "request id: " << requestNr << endl; |
89 |
|
while(!isFinished) |
90 |
|
loop->processEvents(QEventLoop::WaitForMore); |
91 |
} |
} |
92 |
|
|
93 |
|
|