blob: 28729b95f9c28538564d5450f1046295fd81a443 (
plain)
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
|
#ifndef BANKMANAGER_H
#define BANKMANAGER_H
#include "watchconnector.h"
#include "appmanager.h"
class BankManager : public QObject
{
Q_OBJECT
LOG4QT_DECLARE_QCLASS_LOGGER
public:
explicit BankManager(WatchConnector *watch, AppManager *apps, QObject *parent = 0);
int numSlots() const;
signals:
void slotsChanged();
public slots:
bool uploadApp(const QUuid &uuid, int slot = -1);
bool unloadApp(int slot);
void refresh();
private:
int findUnusedSlot() const;
private slots:
void handleWatchConnected();
private:
WatchConnector *watch;
AppManager *apps;
struct SlotInfo {
bool used;
quint32 id;
QString name;
QString company;
quint32 flags;
quint16 version;
QUuid uuid;
};
QVector<SlotInfo> _slots;
};
#endif // BANKMANAGER_H
|