File indexing completed on 2024-12-01 12:29:50
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_OBEXMANAGER_P_H 0010 #define BLUEZQT_OBEXMANAGER_P_H 0011 0012 #include <QObject> 0013 #include <QTimer> 0014 0015 #include "dbusobjectmanager.h" 0016 #include "obexagentmanager1.h" 0017 #include "obexclient1.h" 0018 #include "types.h" 0019 0020 namespace BluezQt 0021 { 0022 typedef org::bluez::obex::Client1 ObexClient; 0023 typedef org::bluez::obex::AgentManager1 ObexAgentManager; 0024 typedef org::freedesktop::DBus::ObjectManager DBusObjectManager; 0025 0026 class ObexManager; 0027 0028 class ObexManagerPrivate : public QObject 0029 { 0030 Q_OBJECT 0031 0032 public: 0033 explicit ObexManagerPrivate(ObexManager *qq); 0034 0035 void init(); 0036 void nameHasOwnerFinished(QDBusPendingCallWatcher *watcher); 0037 void load(); 0038 void getManagedObjectsFinished(QDBusPendingCallWatcher *watcher); 0039 void clear(); 0040 0041 void serviceRegistered(); 0042 void serviceUnregistered(); 0043 void interfacesAdded(const QDBusObjectPath &objectPath, const QVariantMapMap &interfaces); 0044 void interfacesRemoved(const QDBusObjectPath &objectPath, const QStringList &interfaces); 0045 0046 void addSession(const QString &sessionPath, const QVariantMap &properties); 0047 void removeSession(const QString &sessionPath); 0048 0049 ObexManager *q; 0050 ObexClient *m_obexClient; 0051 ObexAgentManager *m_obexAgentManager; 0052 DBusObjectManager *m_dbusObjectManager; 0053 0054 QTimer m_timer; 0055 QHash<QString, ObexSessionPtr> m_sessions; 0056 0057 bool m_initialized; 0058 bool m_obexRunning; 0059 bool m_loaded; 0060 0061 Q_SIGNALS: 0062 void initError(const QString &errorText); 0063 void initFinished(); 0064 0065 private Q_SLOTS: 0066 void dummy(); 0067 }; 0068 0069 } // namespace BluezQt 0070 0071 #endif // BLUEZQT_OBEXMANAGER_P_H