~ubuntu-branches/ubuntu/intrepid/kdebluetooth/intrepid-proposed

« back to all changes in this revision

Viewing changes to src/obexsession/obexsession.h

  • Committer: Bazaar Package Importer
  • Author(s): Anthony Mercatante
  • Date: 2008-08-07 09:49:47 UTC
  • mto: This revision was merged to the branch mainline in revision 56.
  • Revision ID: james.westby@ubuntu.com-20080807094947-pj6q3uxwuv7l844q
Tags: upstream-0.1
ImportĀ upstreamĀ versionĀ 0.1

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
*/
 
24
 
 
25
#include <QtDBus>
 
26
#include <QtGui>
 
27
 
 
28
#include <QObject>
 
29
 
 
30
#ifndef OBEXSESSION_H
 
31
#define OBEXSESSION_H
 
32
 
 
33
class ObexSession : public QObject
 
34
{
 
35
Q_OBJECT
 
36
 
 
37
public:
 
38
        ObexSession(QObject* parent, const QString& addr, const QString& service);
 
39
        ~ObexSession();
 
40
 
 
41
        void connect();
 
42
        void disconnect();
 
43
        void close();
 
44
        bool isConnected();
 
45
        void changeCurrentFolder(const QString& path);
 
46
        void changeCurrentFolderBackward();
 
47
        void changeCurrentFolderToRoot();
 
48
        const QString& getCurrentPath();
 
49
        void copyRemoteFile(const QString& remote_filename, const QString& local_path);
 
50
        void createFolder(const QString& folder_name);
 
51
        QMap<QString,QVariant> retrieveFolderListing();
 
52
        QMap<QString,QVariant> getCapability();
 
53
        void sendFile(const QString& local_path);
 
54
        void deleteRemoteFile(const QString& remote_filename);
 
55
        QMap<QString,QVariant> getTransferInfo();
 
56
        bool isBusy();
 
57
        void cancel();
 
58
        
 
59
 
 
60
 
 
61
private:
 
62
        QDBusInterface* manager;
 
63
        QDBusInterface* session;
 
64
 
 
65
        QString sessionPath;    
 
66
        QString sessionIface;
 
67
        QString obexService;
 
68
 
 
69
public slots:
 
70
 
 
71
        void sessionCreated(QDBusObjectPath);
 
72
        void sessionCreatedError(QDBusError);
 
73
 
 
74
        void slotCancelled();
 
75
        void slotConnected();
 
76
        void slotDisconnected();
 
77
        void slotClosed();
 
78
        void slotTransferStarted(const QString& filename, const QString& local_path, qulonglong total_bytes);
 
79
        void slotTransferProgress(qulonglong bytes_transferred);
 
80
        void slotTransferCompleted();
 
81
        void slotErrorOccurred(const QString& error_name, const QString& error_message);
 
82
 
 
83
 
 
84
signals:
 
85
 
 
86
        void cancelled();
 
87
        void connected();
 
88
        void disconnected();
 
89
        void closed();
 
90
        void transferStarted(const QString& filename, const QString& local_path, qulonglong total_bytes);
 
91
        void transferProgress(qulonglong bytes_transferred);
 
92
        void transferCompleted();
 
93
        void errorOccurred(const QString& error_name, const QString& error_message);
 
94
        
 
95
 
 
96
};
 
97
 
 
98
#endif