File indexing completed on 2025-02-02 05:08:36
0001 /* 0002 SPDX-FileCopyrightText: 2009 Volker Krause <vkrause@kde.org> 0003 SPDX-FileCopyrightText: 2023-2024 Laurent Montel <montel.org> 0004 0005 SPDX-License-Identifier: LGPL-2.0-or-later 0006 */ 0007 0008 #pragma once 0009 #include "libaccountwizard_private_export.h" 0010 #include "setupbase.h" 0011 0012 #include <QObject> 0013 0014 class LIBACCOUNTWIZARD_TESTS_EXPORT Transport : public SetupBase 0015 { 0016 Q_OBJECT 0017 public: 0018 struct TransportInfo { 0019 QString name; 0020 QString host; 0021 QString user; 0022 QString password; 0023 QString encrStr; 0024 QString authStr; 0025 int port = -1; 0026 }; 0027 explicit Transport(QObject *parent); 0028 ~Transport() override; 0029 void createTransport(); 0030 0031 [[nodiscard]] TransportInfo transportInfo() const; 0032 void setTransportInfo(const TransportInfo &newTransportInfo); 0033 0034 [[nodiscard]] int transportId() const; 0035 0036 private: 0037 TransportInfo mTransportInfo; 0038 int mTransportId = -1; 0039 }; 0040 QDebug operator<<(QDebug d, const Transport::TransportInfo &t); 0041 Q_DECLARE_TYPEINFO(Transport::TransportInfo, Q_RELOCATABLE_TYPE);