File indexing completed on 2023-05-30 11:40:08
0001 /* 0002 * Copyright (C) 2011 Collabora Ltd. <http://www.collabora.co.uk/> 0003 * @author Andre Moreira Magalhaes <andre.magalhaes@collabora.co.uk> 0004 * Copyright (C) 2011 David Edmundson <kde@davidedmundson.co.uk> 0005 * 0006 * This library is free software; you can redistribute it and/or 0007 * modify it under the terms of the GNU Lesser General Public 0008 * License as published by the Free Software Foundation; either 0009 * version 2.1 of the License, or (at your option) any later version. 0010 * 0011 * This library is distributed in the hope that it will be useful, 0012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0014 * Lesser General Public License for more details. 0015 * 0016 * You should have received a copy of the GNU Lesser General Public 0017 * License along with this library; if not, write to the Free Software 0018 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 0019 */ 0020 0021 #ifndef SASL_AUTH_OP_H 0022 #define SASL_AUTH_OP_H 0023 0024 #include <TelepathyQt/Connection> 0025 #include <TelepathyQt/PendingOperation> 0026 #include <TelepathyQt/Types> 0027 0028 namespace KTp { 0029 class WalletInterface; 0030 } 0031 0032 class SaslAuthOp : public Tp::PendingOperation 0033 { 0034 Q_OBJECT 0035 0036 public: 0037 SaslAuthOp(const Tp::AccountPtr &account, 0038 const Tp::ChannelPtr &channel); 0039 ~SaslAuthOp(); 0040 0041 Q_SIGNALS: 0042 void ready(Tp::PendingOperation *self); 0043 0044 private Q_SLOTS: 0045 void gotProperties(Tp::PendingOperation *op); 0046 void onAuthOperationFinished(Tp::PendingOperation *op); 0047 void onGetAccountStorageFetched(Tp::PendingOperation *op); 0048 0049 private: 0050 void setReady(); 0051 KTp::WalletInterface *m_walletInterface; 0052 Tp::AccountPtr m_account; 0053 Tp::ChannelPtr m_channel; 0054 Tp::Client::ChannelInterfaceSASLAuthenticationInterface *m_saslIface; 0055 int m_accountStorageId; 0056 QStringList m_mechanisms; 0057 QVariantMap m_properties; 0058 }; 0059 0060 #endif // SASL_AUTH_OP_H