/[projects]/infoscreen/httpwrapper.cpp
ViewVC logotype

Contents of /infoscreen/httpwrapper.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 904 - (show annotations) (download)
Fri Jun 25 13:52:07 2010 UTC (13 years, 10 months ago) by torben
File size: 423 byte(s)
pass by reference
1 #include "httpwrapper.h"
2
3 #include <QHttp>
4 #include <QApplication>
5 #include <QUrl>
6
7
8
9 HttpWrapper::HttpWrapper()
10 {
11 }
12
13 QByteArray HttpWrapper::getSyncData(QString& uri)
14 {
15 QHttp http;
16 QUrl url(uri);
17 http.setHost(url.host() );
18 http.get(url.path() + "?" + url.encodedQuery(), 0);
19
20 while (http.currentId() != 0 )
21 {
22 qApp->processEvents();
23 usleep(1000);
24 }
25
26 return http.readAll();
27 }

  ViewVC Help
Powered by ViewVC 1.1.20