blob: 6e04956d386afefd7086c841c7cafb48ed122c4e (
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
|
#ifndef STORAGEMANAGER_H
#define STORAGEMANAGER_H
#include "toqmanager.h"
class StorageManager : public QObject, public ToqManager::EndpointHandler
{
Q_OBJECT
public:
explicit StorageManager(ObexConnection *obex, ToqManager *toq);
void handleMessage(const ToqConnection::Message &msg) Q_DECL_OVERRIDE;
void updateStore(const QString &store, const QJsonObject &json);
private:
void handleGetStoreStatusMessage(const ToqConnection::Message &msg);
void handleGetStoreMessage(const ToqConnection::Message &msg);
struct Store {
QByteArray contents;
quint32 checksum;
};
private slots:
void handleObexFinished();
void handleObexError(int resp);
private:
ObexConnection *_obex;
ToqManager *_toq;
QMap<QString, Store> _stores;
};
#endif // STORAGEMANAGER_H
|