~xavi-garcia-mena/keeper/one-drive-provider

« back to all changes in this revision

Viewing changes to src/service/manifest.h

  • Committer: Xavi Garcia Mena
  • Date: 2016-11-02 14:01:23 UTC
  • mfrom: (115.1.2 devel)
  • Revision ID: xavi.garcia.mena@canonical.com-20161102140123-9sb6gvjfqbgte39p
mergeĀ lp:~xavi-garcia-mena/keeper/manifest-file-creation

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2016 Canonical, Ltd.
 
3
 *
 
4
 * This program is free software: you can redistribute it and/or modify it
 
5
 * under the terms of the GNU General Public License version 3, as published
 
6
 * by the Free Software Foundation.
 
7
 *
 
8
 * This program is distributed in the hope that it will be useful, but
 
9
 * WITHOUT ANY WARRANTY; without even the implied warranties of
 
10
 * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
 
11
 * PURPOSE.  See the GNU General Public License for more details.
 
12
 *
 
13
 * You should have received a copy of the GNU General Public License along
 
14
 * with this program.  If not, see <http://www.gnu.org/licenses/>.
 
15
 *
 
16
 * Authors:
 
17
 *   Xavi Garcia Mena <xavi.garcia.mena@canonical.com>
 
18
 */
 
19
 
 
20
#pragma once
 
21
 
 
22
#include <helper/metadata.h>
 
23
 
 
24
#include <QObject>
 
25
 
 
26
class ManifestPrivate;
 
27
class StorageFrameworkClient;
 
28
 
 
29
class Manifest : public QObject
 
30
{
 
31
    Q_OBJECT
 
32
    Q_DECLARE_PRIVATE(Manifest)
 
33
public:
 
34
    Manifest(QSharedPointer<StorageFrameworkClient> const & storage, QString const & dir, QObject * parent = nullptr);
 
35
    virtual ~Manifest();
 
36
    Q_DISABLE_COPY(Manifest)
 
37
 
 
38
    void add_entry(Metadata const & entry);
 
39
    void store();
 
40
 
 
41
    void read();
 
42
    QVector<Metadata> get_entries();
 
43
 
 
44
    QString error() const;
 
45
 
 
46
Q_SIGNALS:
 
47
    void finished(bool success);
 
48
 
 
49
private:
 
50
    QScopedPointer<ManifestPrivate> const d_ptr;
 
51
};