16 * The Transport Manager Utility class provides the http/https transaction |
16 * The Transport Manager Utility class provides the http/https transaction |
17 * methods for the smf framework |
17 * methods for the smf framework |
18 * |
18 * |
19 */ |
19 */ |
20 |
20 |
|
21 |
21 // Include files |
22 // Include files |
22 #define EMULATORTESTING |
23 #define EMULATORTESTING |
23 |
24 |
24 #include <QNetworkAccessManager> |
25 #include <QNetworkAccessManager> |
25 #include <QNetworkReply> |
26 #include <QNetworkReply> |
67 m_settings->setValue("Sent Data", 0); |
68 m_settings->setValue("Sent Data", 0); |
68 if( !m_settings->contains("Received Data") ) |
69 if( !m_settings->contains("Received Data") ) |
69 m_settings->setValue("Received Data", 0); |
70 m_settings->setValue("Received Data", 0); |
70 |
71 |
71 #ifdef EMULATORTESTING |
72 #ifdef EMULATORTESTING |
72 qDebug()<<"Using PROXY SETTINGS!!!, change for device settings"; |
73 qDebug()<<"Using PROXY SETTINGS!!!, change for device testing"; |
73 |
74 |
74 // Reading the keys, CSM Stubbed - START |
75 // Reading the keys, CSM Stubbed - START |
75 QFile file("c:\\data\\DoNotShare.txt"); |
76 QFile winFile("c:\\data\\DoNotShare.txt"); |
76 if (!file.open(QIODevice::ReadOnly)) |
77 if (!winFile.open(QIODevice::ReadOnly)) |
77 { |
78 { |
78 qDebug()<<"File to read the windows username and password could not be opened, returning!!!"; |
79 qDebug()<<"File to read the windows username and password could not be opened, returning!!!"; |
79 return; |
80 return; |
80 } |
81 } |
81 |
82 |
82 QByteArray arr = file.readAll(); |
83 QByteArray winArr = winFile.readAll(); |
83 QList<QByteArray> list = arr.split(' '); |
84 QList<QByteArray> winList = winArr.split(' '); |
84 file.close(); |
85 winFile.close(); |
85 |
86 |
86 QString username(list[0]); |
87 QString httpUser(winList[0]); |
87 QString password(list[1]); |
88 QString httpPass(winList[1]); |
88 |
89 |
89 // For proxy settings on emulator only - REMOVE for device |
90 // For proxy settings on emulator only - REMOVE for device |
90 QString httpProxy = "10.1.0.224"; |
91 QString httpProxy = "10.1.0.214"; |
91 QString httpPort = "3148"; |
92 QString httpPort = "3128"; |
92 |
93 |
93 QString httpUser(username); |
|
94 QString httpPass(password); |
|
95 |
|
96 //==Classes used from Network Module== |
94 //==Classes used from Network Module== |
97 QNetworkProxy proxy; |
95 QNetworkProxy proxy; |
98 |
96 |
99 proxy.setType(QNetworkProxy::HttpProxy); |
97 proxy.setType(QNetworkProxy::HttpProxy); |
100 proxy.setHostName(httpProxy); |
98 proxy.setHostName(httpProxy); |