~ubuntu-branches/ubuntu/maverick/bluedevil/maverick-proposed

« back to all changes in this revision

Viewing changes to src/monolithic/monolithic.h

  • Committer: Bazaar Package Importer
  • Author(s): Mark Purcell
  • Date: 2010-08-07 09:04:19 UTC
  • Revision ID: james.westby@ubuntu.com-20100807090419-68k54ucso2htcf5z
Tags: upstream-1.0~rc2
Import upstream version 1.0~rc2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
    Copyright (C) 2010 Alejandro Fiestas Olivares  <alex@ufocoders.com>
 
3
    Copyright (C) 2010 Rafael Fernández López <ereslibre@kde.org>
 
4
 
 
5
    This program is free software: you can redistribute it and/or modify
 
6
    it under the terms of the GNU General Public License as published by
 
7
    the Free Software Foundation, either version 3 of the License, or
 
8
    (at your option) any later version.
 
9
 
 
10
    This program is distributed in the hope that it will be useful,
 
11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
    GNU General Public License for more details.
 
14
 
 
15
    You should have received a copy of the GNU General Public License
 
16
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
17
*/
 
18
 
 
19
 
 
20
#ifndef MONOLITHIC_H
 
21
#define MONOLITHIC_H
 
22
 
 
23
#include <QtCore/QMultiMap>
 
24
 
 
25
#include <kstatusnotifieritem.h>
 
26
 
 
27
namespace BlueDevil {
 
28
    class Adapter;
 
29
    class Device;
 
30
}
 
31
 
 
32
class QAction;
 
33
class KAction;
 
34
 
 
35
using namespace BlueDevil;
 
36
 
 
37
class Monolithic
 
38
    : public KStatusNotifierItem
 
39
{
 
40
 
 
41
Q_OBJECT
 
42
public:
 
43
    Monolithic(QObject* parent = 0);
 
44
 
 
45
    struct EntryInfo {
 
46
        Device *device;
 
47
        QString service;
 
48
        void   *dbusService;
 
49
    };
 
50
 
 
51
public Q_SLOTS:
 
52
    void noAdapters(Adapter *adapter);
 
53
    void adapterAdded();
 
54
 
 
55
    void generateDeviceEntries();
 
56
 
 
57
    void sendFile();
 
58
    void browseDevices();
 
59
    void addDevice();
 
60
    void configReceive();
 
61
    void deviceManager();
 
62
    void configAdapter();
 
63
 
 
64
private Q_SLOTS:
 
65
    void browseTriggered();
 
66
    void sendTriggered();
 
67
    void connectTriggered();
 
68
    void disconnectTriggered();
 
69
    void propertyChanged(const QString &key, const QDBusVariant &value);
 
70
    void UUIDsChanged(const QStringList &UUIDs);
 
71
    void addDevice(Device *device);
 
72
    void removeDevice(Device *device);
 
73
 
 
74
private:
 
75
    void onlineMode();
 
76
    void offlineMode();
 
77
 
 
78
private:
 
79
    QMap<void*, KAction*> m_interfaceMap;
 
80
    QAction              *m_noKnownDevices;
 
81
    QList<QAction*>       m_actions;
 
82
    QAction              *m_lastAction;
 
83
};
 
84
 
 
85
Q_DECLARE_METATYPE(Monolithic::EntryInfo)
 
86
 
 
87
#endif // MONOLITHIC_H