| 1 | /***************************************************************************** |
| 2 | ** QNapi |
| 3 | ** Copyright (C) 2008-2017 Piotr KrzemiĆski <[email protected]> |
| 4 | ** |
| 5 | ** This program is free software; you can redistribute it and/or modify |
| 6 | ** it under the terms of the GNU General Public License as published by |
| 7 | ** the Free Software Foundation; either version 2 of the License, or |
| 8 | ** (at your option) any later version. |
| 9 | ** |
| 10 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
| 11 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
| 12 | ** |
| 13 | *****************************************************************************/ |
| 14 | |
| 15 | #include "syncxmlrpc.h"cxx . . $ `<file>/libqnapi/src/utils/syncxmlrpc.h`/ |
| 16 | |
| 17 | SyncXmlRpccxx . . $ SyncXmlRpc#::SyncXmlRpccxx . . $ SyncXmlRpc#SyncXmlRpc(37355d2f77053a23).(const QUrlcxx . . $ QUrl# &endPoint) : rpccxx . . $ SyncXmlRpc#rpc.(endPointcxx . . $ QUrl#QUrl(37355d2f77053a23).) {} |
| 18 | |
| 19 | bool SyncXmlRpccxx . . $ SyncXmlRpc#::requestcxx . . $ SyncXmlRpc#request(de4f3e11efe038f9).(const QStringcxx . . $ QString# &method, const QVariantListcxx . . $ QVariantList# &args) { |
| 20 | rpccxx . . $ SyncXmlRpc#rpc..callcxx . . $ MaiaXmlRpcClient#call(cfc26a59135f3cb3).(methodcxx . . $ QString#QString(3520e46b33348bf6)., argscxx . . $ QList#QList(3d2301cfd89f773a)., this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(whenResponse(QVariant &)), this, |
| 21 | SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(whenFault(int, const QString &))); |
| 22 | loopcxx . . $ SyncXmlRpc#loop..execcxx . . $ QEventLoop#exec(f981dedee5b32481).(); |
| 23 | return resultcxx . . $ SyncXmlRpc#result.; |
| 24 | } |
| 25 | |
| 26 | QVariantcxx . . $ QVariant# SyncXmlRpccxx . . $ SyncXmlRpc#::getResponsecxx . . $ SyncXmlRpc#getResponse(23280f95d1ccaa1f).() const { return respcxx . . $ QVariant#QVariant(244511558b20107a).; } |
| 27 | |
| 28 | QVariantcxx . . $ QVariant# SyncXmlRpccxx . . $ SyncXmlRpc#::getErrorcxx . . $ SyncXmlRpc#getError(23280f95d1ccaa1f).() const { |
| 29 | returncxx . . $ QVariant#QVariant(7157b2bac2a9068). QStringcxx . . $ QVariant#QVariant(3520e46b33348bf6).::numbercxx . . $ QString#number(f4fd9db251ca774b).(errorcxx . . $ SyncXmlRpc#error.) +cxx . . $ operator+(3d22f08efddf8107). " " +cxx . . $ operator+(fab9b4f80031f353). messagecxx . . $ SyncXmlRpc#message.; |
| 30 | } |
| 31 | |
| 32 | void SyncXmlRpccxx . . $ SyncXmlRpc#::whenResponsecxx . . $ SyncXmlRpc#whenResponse(61eb226a9831f012).(QVariantcxx . . $ QVariant# &response) { |
| 33 | resultcxx . . $ SyncXmlRpc#result. = true; |
| 34 | respcxx . . $ SyncXmlRpc#resp. =cxx . . $ QVariant#`operator=`(b84532324b3fcc79). response; |
| 35 | loopcxx . . $ SyncXmlRpc#loop..exitcxx . . $ QEventLoop#exit(d4f767463ce0a6b3).(); |
| 36 | } |
| 37 | |
| 38 | void SyncXmlRpccxx . . $ SyncXmlRpc#::whenFaultcxx . . $ SyncXmlRpc#whenFault(4b11a7293b4ed91c).(int err, const QStringcxx . . $ QString# &msg) { |
| 39 | resultcxx . . $ SyncXmlRpc#result. = false; |
| 40 | errorcxx . . $ SyncXmlRpc#error. = err; |
| 41 | messagecxx . . $ SyncXmlRpc#message. =cxx . . $ QString#`operator=`(6a89d0b7f4d2681c). msg; |
| 42 | loopcxx . . $ SyncXmlRpc#loop..exitcxx . . $ QEventLoop#exit(d4f767463ce0a6b3).(); |
| 43 | } |