File indexing completed on 2024-09-15 03:36:03
0001 /* 0002 * BluezQt - Asynchronous BlueZ wrapper library 0003 * 0004 * SPDX-FileCopyrightText: 2014-2015 David Rosca <nowrep@gmail.com> 0005 * 0006 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0007 */ 0008 0009 #ifndef BLUEZQT_INITMANAGERJOB_H 0010 #define BLUEZQT_INITMANAGERJOB_H 0011 0012 #include "bluezqt_export.h" 0013 #include "job.h" 0014 0015 #include <memory> 0016 0017 namespace BluezQt 0018 { 0019 class Manager; 0020 0021 /** 0022 * @class BluezQt::InitManagerJob initmanagerjob.h <BluezQt/InitManagerJob> 0023 * 0024 * Init manager job. 0025 * 0026 * This class represents a job that initializes Manager. 0027 */ 0028 class BLUEZQT_EXPORT InitManagerJob : public Job 0029 { 0030 Q_OBJECT 0031 Q_PROPERTY(Manager *manager READ manager) 0032 0033 public: 0034 /** 0035 * Destroys an InitManagerJob object. 0036 */ 0037 ~InitManagerJob() override; 0038 0039 /** 0040 * Returns a manager that is being initialized. 0041 * 0042 * @return manager 0043 */ 0044 Manager *manager() const; 0045 0046 Q_SIGNALS: 0047 /** 0048 * Indicates that the job have finished. 0049 */ 0050 void result(InitManagerJob *job); 0051 0052 private: 0053 explicit InitManagerJob(Manager *manager); 0054 0055 void doStart() override; 0056 void doEmitResult() override; 0057 0058 std::unique_ptr<class InitManagerJobPrivate> const d; 0059 0060 friend class InitManagerJobPrivate; 0061 friend class Manager; 0062 }; 0063 0064 } // namespace BluezQt 0065 0066 #endif // BLUEZQT_INITMANAGERJOB_H