3
* KBluetooth4 - KDE Bluetooth Framework
5
* Copyright (C) 2008 Tom Patzig <tpatzig@suse.de>
7
* This file is part of kbluetooth4.
9
* kbluetooth4 is free software; you can redistribute it and/or modify
10
* it under the terms of the GNU General Public License as published by
11
* the Free Software Foundation; either version 2 of the License, or
12
* (at your option) any later version.
14
* kbluetooth4 is distributed in the hope that it will be useful,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
* GNU General Public License for more details.
19
* You should have received a copy of the GNU General Public License
20
* along with kbluetooth4; if not, write to the Free Software
21
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
1
/***************************************************************************
2
* Copyright (C) 2008 Tom Patzig <tpatzig@suse.de> *
3
* Copyright (C) 2008 Alex Fiestas <alex@eyeos.org> *
4
* This program is free software; you can redistribute it and/or modify *
5
* it under the terms of the GNU General Public License as published by *
6
* the Free Software Foundation; either version 2 of the License, or *
7
* (at your option) any later version. *
9
* This program is distributed in the hope that it will be useful, *
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12
* GNU General Public License for more details. *
14
* You should have received a copy of the GNU General Public License *
15
* along with this program; if not, write to the *
16
* Free Software Foundation, Inc., *
17
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
18
***************************************************************************/
30
23
#ifndef OBEXSESSION_H
31
24
#define OBEXSESSION_H
33
28
class ObexSession : public QObject
50
45
void createFolder(const QString& folder_name);
51
46
QMap<QString,QVariant> retrieveFolderListing();
52
47
QMap<QString,QVariant> getCapability();
53
void sendFile(const QString& local_path);
48
void sendFile(const QString& local_path, bool yes);
49
KJob* sendFile(const QString& localPath);
54
50
void deleteRemoteFile(const QString& remote_filename);
55
51
QMap<QString,QVariant> getTransferInfo();
55
QString targetAddress();
63
59
QDBusInterface* manager;
64
60
QDBusInterface* session;
66
61
QString sessionPath;
67
62
QString sessionIface;
68
63
QString obexService;
64
QString m_targetAddress;
72
67
void sessionCreated(QDBusObjectPath);
73
68
void sessionCreatedError(QDBusError);
75
69
void slotCancelled();
70
void slotConnected(QDBusObjectPath);
77
71
void slotDisconnected();
79
73
void slotTransferStarted(const QString& filename, const QString& local_path, qulonglong total_bytes);
80
74
void slotTransferProgress(qulonglong bytes_transferred);
81
75
void slotTransferCompleted();
82
76
void slotErrorOccurred(const QString& error_name, const QString& error_message);
77
void slotConnectError(QDBusObjectPath path, QString err_name, QString err_msg);
89
82
void disconnected();
91
85
void transferStarted(const QString& filename, const QString& local_path, qulonglong total_bytes);
92
86
void transferProgress(qulonglong bytes_transferred);
93
87
void transferCompleted();
94
88
void errorOccurred(const QString& error_name, const QString& error_message);