1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
/*
*
* Obex Object Manager implementation of bluez5
*
* Copyright (C) 2018 Emanoil Kotsev <deloptes@gmail.com>
*
*
* This file is part of libtdebluez.
*
* libtdebluez is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* libtdebluez is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with kbluetooth; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#ifndef OBEXOBJECTMANAGERIMPL_H_INCLUDED
#define OBEXOBJECTMANAGERIMPL_H_INCLUDED
#include <tqdbusconnection.h>
#include <tdelocale.h>
#include "interfaces/propertiesProxy.h"
#include "interfaces/objectmanagerProxy.h"
#include "interfaces/agentmanager1Proxy.h"
#include "interfaces/client1Proxy.h"
#include "interfaces/session1Proxy.h"
#include "interfaces/filetransfer1Proxy.h"
namespace TDEObex
{
#define DBUS_CONN_NAME "TDEBluezObex"
class KDE_EXPORT ObexObjectManagerImpl: public org::freedesktop::DBus::ObjectManagerProxy
{
Q_OBJECT
public:
// ObexObjectManagerImpl(){}
ObexObjectManagerImpl(const TQString& service, const TQString& path, TQObject* parent = 0, const char* name = 0);
virtual ~ObexObjectManagerImpl();
// --- helper to get private members of the class --- //
//! to get information if TDEBluez is connected to D-Bus
bool isConnectedToDBUS();
//! pointer to the D-Bus connection
TQT_DBusConnection* getConnection();
//! to close the connection to D-Bus
bool close();
//
org::bluez::obex::AgentManager1Proxy* getAgentManager();
org::bluez::obex::Client1Proxy* getClient();
// ConnectionList listConnections(const TQString&);
private:
bool initDBUS();
void slotInterfacesAdded(const TQT_DBusObjectPath& object, const TQT_DBusDataMap<
TQString>& interfaces);
void slotInterfacesRemoved(const TQT_DBusObjectPath& object, const TQStringList& interfaces);
private:
//! TQt connection to D-Bus
TQT_DBusConnection dBusConn;
org::bluez::obex::AgentManager1Proxy* mAgentManager;
org::bluez::obex::Client1Proxy* mClient;
org::bluez::obex::Session1Proxy* mSession;
org::bluez::obex::FileTransfer1Proxy* mFileTransfer;
private slots:
bool reconnect();
};
// class ObexObjectManagerImpl
};
// namespace TDEObex
#endif //OBEXOBJECTMANAGERIMPL_H_INCLUDED
// End of File
|