File indexing completed on 2024-09-15 04:48:49
0001 /************************************************************************************* 0002 * SPDX-FileCopyrightText: 2013 Alejandro Fiestas Fiestas <afiestas@kde.org> * 0003 * SPDX-FileCopyrightText: 2014-2015 David Rosca <nowrep@gmail.com> * 0004 * * 0005 * SPDX-License-Identifier: GPL-2.0-or-later 0006 *************************************************************************************/ 0007 0008 #pragma once 0009 0010 #include <BluezQt/ObexAgent> 0011 #include <QHash> 0012 class KJob; 0013 0014 class BlueDevilDaemon; 0015 0016 class ObexAgent : public BluezQt::ObexAgent 0017 { 0018 Q_OBJECT 0019 0020 public: 0021 explicit ObexAgent(BlueDevilDaemon *daemon); 0022 0023 BluezQt::Manager *manager() const; 0024 0025 bool shouldAutoAcceptTransfer(const QString &address) const; 0026 0027 QDBusObjectPath objectPath() const override; 0028 void authorizePush(BluezQt::ObexTransferPtr transfer, BluezQt::ObexSessionPtr session, const BluezQt::Request<QString> &request) override; 0029 0030 private Q_SLOTS: 0031 void receiveFileJobFinished(KJob *job); 0032 0033 private: 0034 BluezQt::Manager *const m_manager; 0035 QHash<QString, QDateTime> m_transferTimes; 0036 };