Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_meta_data_io_backend.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2007 Cyrille Berger <cberger@cberger.net>
3 * SPDX-FileCopyrightText: 2021 L. E. Segovia <amy@amyspark.me>
4 *
5 * SPDX-License-Identifier: LGPL-2.1-or-later
6 */
7
8#ifndef _KIS_META_DATA_IO_BACKEND_H_
9#define _KIS_META_DATA_IO_BACKEND_H_
10
11#include <kritametadata_export.h>
12
13class QIODevice;
14class QString;
15
16namespace KisMetaData
17{
18class Store;
24class KRITAMETADATA_EXPORT IOBackend
25{
26public:
31 enum BackendType { Binary, Text };
32
35 JpegHeader
36 };
37
38public:
39 virtual ~IOBackend(){};
40
41 virtual QString id() const = 0;
42
43 virtual QString name() const = 0;
44
48 virtual BackendType type() const = 0;
49
53 virtual bool supportSaving() const = 0;
54
62 virtual bool saveTo(const Store *store, QIODevice *ioDevice, HeaderType headerType = NoHeader) const = 0;
63
69 virtual bool canSaveAllEntries(Store *store) const = 0;
70
74 virtual bool supportLoading() const = 0;
75
81 virtual bool loadFrom(Store *store, QIODevice *ioDevice) const = 0;
82};
83}
84
85#endif
virtual QString name() const =0
@ NoHeader
Don't append any header.
virtual bool supportLoading() const =0
virtual bool canSaveAllEntries(Store *store) const =0
virtual bool loadFrom(Store *store, QIODevice *ioDevice) const =0
virtual bool saveTo(const Store *store, QIODevice *ioDevice, HeaderType headerType=NoHeader) const =0
virtual QString id() const =0
virtual BackendType type() const =0
virtual bool supportSaving() const =0