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

Annotation of /infoscreen/httpwrapper.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 528 - (hide annotations) (download)
Wed Jan 6 22:18:52 2010 UTC (14 years, 4 months ago) by torben
File size: 422 byte(s)
first functioning clientside xml-controlled switch
1 torben 528 #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