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
|
//-*-c++-*-
/***************************************************************************
* Copyright (C) 2003 by Fred Schaettgen *
* [email protected] *
* *
* This program 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. *
***************************************************************************/
#ifndef _TDEIOBT_H_
#define _TDEIOBT_H_
#include <tdeio/forwardingslavebase.h>
#include <vector>
#include <adapterImpl.h>
#include <objectmanagerImpl.h>
class TDEioBluetooth : public TDEIO::ForwardingSlaveBase
{
Q_OBJECT
public:
TDEioBluetooth(const TQCString &protocol, const TQCString &pool_socket, const TQCString &app_socket);
virtual ~TDEioBluetooth();
virtual void closeConnection();
virtual void stat(const KURL &url);
virtual void listDir(const KURL &url);
protected:
virtual bool rewriteURL(const KURL &url, KURL &newUrl);
private:
void createTopLevelEntry(TDEIO::UDSEntry& entry);
bool listDevice(TDEIO::UDSEntry &entry, const TQString &path, const KURL &url);
bool listDevices(TQValueList<TDEIO::UDSEntry> &list, const KURL &url);
bool listServices(TQValueList<TDEIO::UDSEntry> &list, const KURL &url);
bool createDirEntry(TDEIO::UDSEntry &entry, const TQString &title,
const TQString &dir = TQString::null, const TQString &mimeType = "inode/directory");
void addAtom(TDEIO::UDSEntry &entry, TDEIO::UDSAtomTypes type, TQString s);
void addAtom(TDEIO::UDSEntry &entry, TDEIO::UDSAtomTypes type, long l);
TDEBluetooth::AdapterImpl *adapter;
TDEBluetooth::ObjectManagerImpl *manager;
private slots:
void slotAddDevice(const TQString &address);
void slotAddService(const KURL &url, const TQString uuid);
void slotRemoveDevice(const TQString &address);
void slotAdapterPowerOnChanged(const TQString & path, bool state) ;
};
#endif //TDEIOBT
|