| 1 | /* |
| 2 | * Copyright (C) 2014 Canonical Ltd. |
| 3 | * |
| 4 | * Contact: Alberto Mardegan <[email protected]> |
| 5 | * |
| 6 | * This file is part of lomiri-online-accounts-ui |
| 7 | * |
| 8 | * This program is free software: you can redistribute it and/or modify it |
| 9 | * under the terms of the GNU General Public License version 3, as published |
| 10 | * by the Free Software Foundation. |
| 11 | * |
| 12 | * This program is distributed in the hope that it will be useful, but |
| 13 | * WITHOUT ANY WARRANTY; without even the implied warranties of |
| 14 | * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR |
| 15 | * PURPOSE. See the GNU General Public License for more details. |
| 16 | * |
| 17 | * You should have received a copy of the GNU General Public License along |
| 18 | * with this program. If not, see <http://www.gnu.org/licenses/>. |
| 19 | */ |
| 20 | |
| 21 | #include <online-accounts-common/globals.h>cxx . . $ `<file>/online-accounts-common/globals.h`/ |
| 22 | #include "request-mock.h"cxx . . $ `<file>/tests/online-accounts-ui/mock/request-mock.h`/ |
| 23 | |
| 24 | #include <QDebug> |
| 25 | |
| 26 | using namespace OnlineAccountsUi; |
| 27 | |
| 28 | RequestPrivatecxx . . $ OnlineAccountsUi/RequestPrivate#::RequestPrivatecxx . . $ OnlineAccountsUi/RequestPrivate#RequestPrivate(2d74b039c48ee0c7).(const QStringcxx . . $ QString# &interface, |
| 29 | int id, |
| 30 | const QStringcxx . . $ QString# &clientProfile, |
| 31 | const QVariantMapcxx . . $ QVariantMap# ¶meters, |
| 32 | Requestcxx . . $ OnlineAccountsUi/Request# *request): |
| 33 | QObjectcxx . . $ QObject#QObject(749de1b6ae65bddd).(request), |
| 34 | q_ptrcxx . . $ OnlineAccountsUi/RequestPrivate#q_ptr.(request), |
| 35 | m_parameterscxx . . $ OnlineAccountsUi/RequestPrivate#m_parameters.(parameters), |
| 36 | m_clientApparmorProfilecxx . . $ OnlineAccountsUi/RequestPrivate#m_clientApparmorProfile.(clientProfile), |
| 37 | m_windowcxx . . $ OnlineAccountsUi/RequestPrivate#m_window.(0), |
| 38 | m_delaycxx . . $ OnlineAccountsUi/RequestPrivate#m_delay.(0), |
| 39 | m_inProgresscxx . . $ OnlineAccountsUi/RequestPrivate#m_inProgress.(false) |
| 40 | { |
| 41 | Q_UNUSEDcxx . . $ `<external>/15045578679651060896/qglobal.h:117:9`!(interface); |
| 42 | Q_UNUSEDcxx . . $ `<external>/15045578679651060896/qglobal.h:117:9`!(id); |
| 43 | } |
| 44 | |
| 45 | RequestPrivatecxx . . $ OnlineAccountsUi/RequestPrivate#::~cxx . . $ OnlineAccountsUi/RequestPrivate#`~RequestPrivate`(ced63f7c635d850d).RequestPrivatecxx . . $ OnlineAccountsUi/RequestPrivate#() |
| 46 | { |
| 47 | } |
| 48 | |
| 49 | Requestcxx . . $ OnlineAccountsUi/Request#::Requestcxx . . $ OnlineAccountsUi/Request#Request(6cdfba8807728f9f).(const QStringcxx . . $ QString# &interface, |
| 50 | int id, |
| 51 | const QStringcxx . . $ QString# &clientProfile, |
| 52 | const QVariantMapcxx . . $ QVariantMap# ¶meters, |
| 53 | QObjectcxx . . $ QObject# *parent): |
| 54 | QObjectcxx . . $ QObject#QObject(749de1b6ae65bddd).(parent), |
| 55 | d_ptrcxx . . $ OnlineAccountsUi/Request#d_ptr.(new RequestPrivatecxx . . $ OnlineAccountsUi/RequestPrivate#RequestPrivate(2d74b039c48ee0c7).(interface, id, clientProfile, parameters, this)) |
| 56 | { |
| 57 | } |
| 58 | |
| 59 | Requestcxx . . $ OnlineAccountsUi/Request#::~cxx . . $ OnlineAccountsUi/Request#`~Request`(ced63f7c635d850d).Requestcxx . . $ OnlineAccountsUi/Request#() |
| 60 | { |
| 61 | } |
| 62 | |
| 63 | void Requestcxx . . $ OnlineAccountsUi/Request#::setWindowcxx . . $ OnlineAccountsUi/Request#setWindow(35681b993d9a3c79).(QWindowcxx . . $ QWindow# *window) |
| 64 | { |
| 65 | Q_Dcxx . . $ `<external>/15045578679651060896/qglobal.h:1177:9`!(Request); |
| 66 | Q_EMITcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:95:10`! d->setWindowCalledcxx . . $ OnlineAccountsUi/RequestPrivate#setWindowCalled(35681b993d9a3c79).(window); |
| 67 | } |
| 68 | |
| 69 | WIdcxx . . $ WId# Requestcxx . . $ OnlineAccountsUi/Request#::windowIdcxx . . $ OnlineAccountsUi/Request#windowId(1c5fc1fd41a99ae7).() const |
| 70 | { |
| 71 | Q_Dcxx . . $ `<external>/15045578679651060896/qglobal.h:1177:9`!(const Request); |
| 72 | return d->m_parameterscxx . . $ OnlineAccountsUi/RequestPrivate#m_parameters.[cxx . . $ QMap#`operator[]`(bfda1f1f965926d4).OAU_KEY_WINDOW_IDcxx . . $ `online-accounts-common/globals.h:33:9`!].toUIntcxx . . $ QVariant#toUInt(870b63f89c7fb98).(); |
| 73 | } |
| 74 | |
| 75 | bool Requestcxx . . $ OnlineAccountsUi/Request#::isInProgresscxx . . $ OnlineAccountsUi/Request#isInProgress(50ce9a9e25b4a850).() const |
| 76 | { |
| 77 | Q_Dcxx . . $ `<external>/15045578679651060896/qglobal.h:1177:9`!(const Request); |
| 78 | return d->m_inProgresscxx . . $ OnlineAccountsUi/RequestPrivate#m_inProgress.; |
| 79 | } |
| 80 | |
| 81 | const QVariantMapcxx . . $ QVariantMap# &Requestcxx . . $ OnlineAccountsUi/Request#::parameterscxx . . $ OnlineAccountsUi/Request#parameters(9daa5a8a8d37773d).() const |
| 82 | { |
| 83 | Q_Dcxx . . $ `<external>/15045578679651060896/qglobal.h:1177:9`!(const Request); |
| 84 | return d->m_parameterscxx . . $ OnlineAccountsUi/RequestPrivate#m_parameters.; |
| 85 | } |
| 86 | |
| 87 | QStringcxx . . $ QString# Requestcxx . . $ OnlineAccountsUi/Request#::clientApparmorProfilecxx . . $ OnlineAccountsUi/Request#clientApparmorProfile(6ef7b6c27b00b43d).() const |
| 88 | { |
| 89 | Q_Dcxx . . $ `<external>/15045578679651060896/qglobal.h:1177:9`!(const Request); |
| 90 | return dcxx . . $ QString#QString(132dd6869045752b).->m_clientApparmorProfilecxx . . $ OnlineAccountsUi/RequestPrivate#m_clientApparmorProfile.; |
| 91 | } |
| 92 | |
| 93 | QWindowcxx . . $ QWindow# *Requestcxx . . $ OnlineAccountsUi/Request#::windowcxx . . $ OnlineAccountsUi/Request#window(d520c9a5ccf200dd).() const |
| 94 | { |
| 95 | Q_Dcxx . . $ `<external>/15045578679651060896/qglobal.h:1177:9`!(const Request); |
| 96 | return d->m_windowcxx . . $ OnlineAccountsUi/RequestPrivate#m_window.; |
| 97 | } |
| 98 | |
| 99 | void Requestcxx . . $ OnlineAccountsUi/Request#::setDelaycxx . . $ OnlineAccountsUi/Request#setDelay(d4f767463ce0a6b3).(int delay) |
| 100 | { |
| 101 | Q_Dcxx . . $ `<external>/15045578679651060896/qglobal.h:1177:9`!(Request); |
| 102 | d->m_delaycxx . . $ OnlineAccountsUi/RequestPrivate#m_delay. = delay; |
| 103 | } |
| 104 | |
| 105 | int Requestcxx . . $ OnlineAccountsUi/Request#::delaycxx . . $ OnlineAccountsUi/Request#delay(455f465bc33b4cdf).() const |
| 106 | { |
| 107 | Q_Dcxx . . $ `<external>/15045578679651060896/qglobal.h:1177:9`!(const Request); |
| 108 | return d->m_delaycxx . . $ OnlineAccountsUi/RequestPrivate#m_delay.; |
| 109 | } |
| 110 | |
| 111 | void Requestcxx . . $ OnlineAccountsUi/Request#::startcxx . . $ OnlineAccountsUi/Request#start(49f6e7a06ebc5aa8).() |
| 112 | { |
| 113 | Q_Dcxx . . $ `<external>/15045578679651060896/qglobal.h:1177:9`!(Request); |
| 114 | if (d->m_inProgresscxx . . $ OnlineAccountsUi/RequestPrivate#m_inProgress.) { |
| 115 | qWarningcxx . . $ `<external>/10450329605257866924/qlogging.h:166:9`!() <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "Request already started!"; |
| 116 | return; |
| 117 | } |
| 118 | d->m_inProgresscxx . . $ OnlineAccountsUi/RequestPrivate#m_inProgress. = true; |
| 119 | } |
| 120 | |
| 121 | void Requestcxx . . $ OnlineAccountsUi/Request#::cancelcxx . . $ OnlineAccountsUi/Request#cancel(49f6e7a06ebc5aa8).() |
| 122 | { |
| 123 | setCanceledcxx . . $ OnlineAccountsUi/Request#setCanceled(49f6e7a06ebc5aa8).(); |
| 124 | } |
| 125 | |
| 126 | void Requestcxx . . $ OnlineAccountsUi/Request#::failcxx . . $ OnlineAccountsUi/Request#fail(c1427772cd1877b0).(const QStringcxx . . $ QString# &name, const QStringcxx . . $ QString# &message) |
| 127 | { |
| 128 | Q_Dcxx . . $ `<external>/15045578679651060896/qglobal.h:1177:9`!(Request); |
| 129 | Q_EMITcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:95:10`! d->failCalledcxx . . $ OnlineAccountsUi/RequestPrivate#failCalled(c1427772cd1877b0).(name, message); |
| 130 | |
| 131 | Q_EMITcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:95:10`! completedcxx . . $ OnlineAccountsUi/Request#completed(49f6e7a06ebc5aa8).(); |
| 132 | } |
| 133 | |
| 134 | void Requestcxx . . $ OnlineAccountsUi/Request#::setCanceledcxx . . $ OnlineAccountsUi/Request#setCanceled(49f6e7a06ebc5aa8).() |
| 135 | { |
| 136 | Q_Dcxx . . $ `<external>/15045578679651060896/qglobal.h:1177:9`!(Request); |
| 137 | if (d->m_inProgresscxx . . $ OnlineAccountsUi/RequestPrivate#m_inProgress.) { |
| 138 | failcxx . . $ OnlineAccountsUi/Request#fail(c1427772cd1877b0).(OAU_ERROR_USER_CANCELEDcxx . . $ `online-accounts-common/globals.h:39:9`!, QStringLiteralcxx . . $ `<external>/2817157206922689722/qstringliteral.h:65:9`!("Canceled")); |
| 139 | d->m_inProgresscxx . . $ OnlineAccountsUi/RequestPrivate#m_inProgress. = false; |
| 140 | } |
| 141 | } |
| 142 | |
| 143 | void Requestcxx . . $ OnlineAccountsUi/Request#::setResultcxx . . $ OnlineAccountsUi/Request#setResult(3e95df3e31f2cce8).(const QVariantMapcxx . . $ QVariantMap# &result) |
| 144 | { |
| 145 | Q_Dcxx . . $ `<external>/15045578679651060896/qglobal.h:1177:9`!(Request); |
| 146 | if (d->m_inProgresscxx . . $ OnlineAccountsUi/RequestPrivate#m_inProgress.) { |
| 147 | Q_EMITcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:95:10`! d->setResultCalledcxx . . $ OnlineAccountsUi/RequestPrivate#setResultCalled(3e95df3e31f2cce8).(result); |
| 148 | |
| 149 | Q_EMITcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:95:10`! completedcxx . . $ OnlineAccountsUi/Request#completed(49f6e7a06ebc5aa8).(); |
| 150 | d->m_inProgresscxx . . $ OnlineAccountsUi/RequestPrivate#m_inProgress. = false; |
| 151 | } |
| 152 | } |
| 153 | |
| 154 | QStringcxx . . $ QString# Requestcxx . . $ OnlineAccountsUi/Request#::mountPointcxx . . $ OnlineAccountsUi/Request#mountPoint(6ef7b6c27b00b43d).() const |
| 155 | { |
| 156 | return ""cxx . . $ QString#QString(85c52e162fed56f9).; |
| 157 | } |