~ubuntu-branches/ubuntu/utopic/kdebluetooth/utopic

« back to all changes in this revision

Viewing changes to src/obexsession/obexsession.h

  • Committer: Bazaar Package Importer
  • Author(s): Anthony Mercatante
  • Date: 2009-09-18 22:54:49 UTC
  • mfrom: (1.2.18 upstream)
  • Revision ID: james.westby@ubuntu.com-20090918225449-3iiojjiklo7sfoer
Tags: 1:0.4~beta1b-0ubuntu1
* New upstream beta release:
  - basically a bugfix release
* Fixed kblueplugd for binary name

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 *
3
 
 *  KBluetooth4 - KDE Bluetooth Framework
4
 
 *
5
 
 *  Copyright (C) 2008  Tom Patzig <tpatzig@suse.de>
6
 
 *
7
 
 *  This file is part of kbluetooth4.
8
 
 *
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.
13
 
 *
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.
18
 
 *
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
22
 
 *
23
 
*/
 
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.                                   *
 
8
 *                                                                         *
 
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.                          *
 
13
 *                                                                         *
 
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
 ***************************************************************************/
24
19
 
25
20
#include <QtDBus>
26
 
#include <QtGui>
27
 
 
28
21
#include <QObject>
29
22
 
30
23
#ifndef OBEXSESSION_H
31
24
#define OBEXSESSION_H
32
25
 
 
26
class KJob;
 
27
 
33
28
class ObexSession : public QObject
34
29
{
35
30
Q_OBJECT
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();
56
52
        bool isBusy();
57
53
        void cancel();
58
 
        
59
 
 
 
54
        bool error;
 
55
        QString targetAddress();
60
56
 
61
57
private:
62
 
        QObject* m_parent;
 
58
        QObject* m_parent;
63
59
        QDBusInterface* manager;
64
60
        QDBusInterface* session;
65
 
 
66
61
        QString sessionPath;    
67
62
        QString sessionIface;
68
63
        QString obexService;
 
64
        QString m_targetAddress;
69
65
 
70
66
public slots:
71
 
 
72
67
        void sessionCreated(QDBusObjectPath);
73
68
        void sessionCreatedError(QDBusError);
74
 
 
75
69
        void slotCancelled();
76
 
        void slotConnected();
 
70
        void slotConnected(QDBusObjectPath);
77
71
        void slotDisconnected();
78
72
        void slotClosed();
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);
83
 
 
 
77
        void slotConnectError(QDBusObjectPath path, QString err_name, QString err_msg);
84
78
 
85
79
signals:
86
 
 
87
80
        void cancelled();
88
81
        void connected();
89
82
        void disconnected();
90
83
        void closed();
 
84
        void openObexError();
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);
95
 
        
96
 
 
97
89
};
98
90
 
99
91
#endif