| 1 | /***************************************************************************** |
| 2 | ** Copyright (C) 2005 by Iulian M |
| 3 | ** [email protected] |
| 4 | ** |
| 5 | ** modifications by Piotr KrzemiĆski |
| 6 | ** Copyright (C) 2008-2017 |
| 7 | ** |
| 8 | ** This program is free software; you can redistribute it and/or modify |
| 9 | ** it under the terms of the GNU General Public License as published by |
| 10 | ** the Free Software Foundation; either version 2 of the License, or |
| 11 | ** (at your option) any later version. |
| 12 | ** |
| 13 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
| 14 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
| 15 | ** |
| 16 | *****************************************************************************/ |
| 17 | |
| 18 | #include "synchttp.h"cxx . . $ `<file>/libqnapi/src/utils/synchttp.h`/ |
| 19 | |
| 20 | SyncHTTPcxx . . $ SyncHTTP#::SyncHTTPcxx . . $ SyncHTTP#SyncHTTP(49f6e7a06ebc5aa8).() : managercxx . . $ SyncHTTP#manager.(this) {} |
| 21 | |
| 22 | QNetworkReplycxx . . $ QNetworkReply#* SyncHTTPcxx . . $ SyncHTTP#::syncGetcxx . . $ SyncHTTP#syncGet(d12587da35e4fcd1).(const QNetworkRequestcxx . . $ QNetworkRequest#& req) { |
| 23 | QNetworkReplycxx . . $ QNetworkReply#* reply = managercxx . . $ SyncHTTP#manager..getcxx . . $ QNetworkAccessManager#get(d12587da35e4fcd1).(req); |
| 24 | connectcxx . . $ QObject#connect(158df1d9a01a3410).(reply, SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(finished()), &loopcxx . . $ SyncHTTP#loop., SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(quit())); |
| 25 | connectcxx . . $ QObject#connect(158df1d9a01a3410).(reply, SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(error(QNetworkReply::NetworkError)), &loopcxx . . $ SyncHTTP#loop., |
| 26 | SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(quit())); |
| 27 | loopcxx . . $ SyncHTTP#loop..execcxx . . $ QEventLoop#exec(f981dedee5b32481).(); |
| 28 | return reply; |
| 29 | } |
| 30 | |
| 31 | QNetworkReplycxx . . $ QNetworkReply#* SyncHTTPcxx . . $ SyncHTTP#::syncPostcxx . . $ SyncHTTP#syncPost(7ed39bc32e459c39).(const QNetworkRequestcxx . . $ QNetworkRequest#& req, |
| 32 | const QByteArraycxx . . $ QByteArray#& data) { |
| 33 | QNetworkReplycxx . . $ QNetworkReply#* reply = managercxx . . $ SyncHTTP#manager..postcxx . . $ QNetworkAccessManager#post(7ed39bc32e459c39).(req, data); |
| 34 | connectcxx . . $ QObject#connect(158df1d9a01a3410).(reply, SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(finished()), &loopcxx . . $ SyncHTTP#loop., SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(quit())); |
| 35 | connectcxx . . $ QObject#connect(158df1d9a01a3410).(reply, SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(error(QNetworkReply::NetworkError)), &loopcxx . . $ SyncHTTP#loop., |
| 36 | SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(quit())); |
| 37 | loopcxx . . $ SyncHTTP#loop..execcxx . . $ QEventLoop#exec(f981dedee5b32481).(); |
| 38 | return reply; |
| 39 | } |