diff options
author | deva <deva> | 2010-06-01 12:58:32 +0000 |
---|---|---|
committer | deva <deva> | 2010-06-01 12:58:32 +0000 |
commit | 74a28aa7125be6a603128ad600c98c4882f3b5c2 (patch) | |
tree | 1a9e4ab74f29d5ff10f2701e4e112f4525c0dcec /client/netcom.h | |
parent | 9b9c1e2dd3e5807ff7714b378b03b9ba31f42df7 (diff) |
From new_protocol branch.
Diffstat (limited to 'client/netcom.h')
-rw-r--r-- | client/netcom.h | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/client/netcom.h b/client/netcom.h index 35db221..88b604e 100644 --- a/client/netcom.h +++ b/client/netcom.h @@ -31,6 +31,10 @@ #include <QString> #include <QTcpSocket> #include <QDomDocument> +#include <QNetworkAccessManager> +#include <QNetworkRequest> + +//#define USE_SSL //#include "widgets/widget.h" class Widget; @@ -38,24 +42,33 @@ class Widget; class NetCom : public QObject { Q_OBJECT public: - NetCom(QString host, quint16 port, QString user, QString cpr); + NetCom(QString host, quint16 port); ~NetCom(); QDomDocument send(QString templ, QString macro = "", bool lockgui = true); - void send(QVector< Widget* > widgets, QString templ, QString macro, QString version); + QDomDocument send(QVector< Widget* > widgets, QString templ, QString macro, + QString version); + QDomDocument initConnection(); + QDomDocument commit(); + QDomDocument discard(); + + QString sessionid; + QString user; + QString patientid; public slots: - void readyRead(); + void replyFinished(QNetworkReply*); private: - volatile bool transmitting; - QTcpSocket socket; + QNetworkAccessManager *manager; + QNetworkRequest request; - QByteArray buffer; - QDomDocument res_doc; + // QString sessionid; - QString user; - QString cpr; + QMap<QNetworkReply *, bool> finished; + + QDomDocument makeTransfer(QDomDocument &dom, + bool commit, bool lockgui, bool discard = false); }; #endif/*__PRACRO_NETCOM_H__*/ |