forked from adaburrows/C---QT-Geoloqi-Client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnettracker.h
More file actions
41 lines (37 loc) · 923 Bytes
/
Copy pathnettracker.h
File metadata and controls
41 lines (37 loc) · 923 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#ifndef NETTRACKER_H
#define NETTRACKER_H
#include <QObject>
#include <QNetworkReply>
#include <QNetworkRequest>
#include <QString>
#include <QVariant>
#include <QUrl>
#include <qjson/parser.h>
#include "netmanager.h"
// debugging stuff remove later
#include <iostream>
#include <QTextStream>
// end debugging stuff
class NetManager; //Forward declaration
class NetTracker : public QObject
{
Q_OBJECT
public:
explicit NetTracker(QObject *parent = 0);
NetTracker(NetManager *,QObject *parent = 0);
NetManager *netManager;
QString _token;
bool emitString;
bool emitJson;
void setManager(NetManager*);
void setToken(QString);
QJson::Parser *parser;
signals:
void stringRecieved(QString);
void jsonRecieved(QVariant);
public slots:
void getUrl(QUrl);
void replyFinished(QNetworkReply*);
void sslErrors(QNetworkReply*, QList<QSslError>);
};
#endif // NETTRACKER_H