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