2016-02-17 10:11:00 +03:00
|
|
|
/***************************************************************************
|
|
|
|
* This file is part of the Lime Report project *
|
2021-08-18 20:21:36 +03:00
|
|
|
* Copyright (C) 2021 by Alexander Arin *
|
2016-02-17 10:11:00 +03:00
|
|
|
* arin_a@bk.ru *
|
|
|
|
* *
|
|
|
|
** GNU General Public License Usage **
|
|
|
|
* *
|
|
|
|
* This library is free software: you can redistribute it and/or modify *
|
|
|
|
* it under the terms of the GNU General Public License as published by *
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or *
|
|
|
|
* (at your option) any later version. *
|
|
|
|
* You should have received a copy of the GNU General Public License *
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
|
|
|
* *
|
|
|
|
** GNU Lesser General Public License **
|
|
|
|
* *
|
|
|
|
* This library is free software: you can redistribute it and/or modify *
|
|
|
|
* it under the terms of the GNU Lesser General Public License as *
|
|
|
|
* published by the Free Software Foundation, either version 3 of the *
|
|
|
|
* License, or (at your option) any later version. *
|
|
|
|
* You should have received a copy of the GNU Lesser General Public *
|
|
|
|
* License along with this library. *
|
|
|
|
* If not, see <http://www.gnu.org/licenses/>. *
|
|
|
|
* *
|
|
|
|
* This library is distributed in the hope that it will be useful, *
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
|
|
* GNU General Public License for more details. *
|
|
|
|
****************************************************************************/
|
|
|
|
#ifndef LRSTORAGEINTF_H
|
|
|
|
#define LRSTORAGEINTF_H
|
|
|
|
|
2022-10-30 20:44:59 +03:00
|
|
|
#include "lrglobal.h"
|
2024-09-04 17:31:16 +03:00
|
|
|
|
2016-02-17 10:11:00 +03:00
|
|
|
#include <QSharedPointer>
|
|
|
|
|
|
|
|
class QString;
|
|
|
|
class QObject;
|
|
|
|
|
2024-09-04 17:31:16 +03:00
|
|
|
namespace LimeReport {
|
2016-02-17 10:11:00 +03:00
|
|
|
|
2024-09-04 17:31:16 +03:00
|
|
|
class LIMEREPORT_EXPORT ObjectLoadingStateIntf {
|
2016-02-17 10:11:00 +03:00
|
|
|
public:
|
2017-02-16 04:11:39 +03:00
|
|
|
virtual bool isLoading() = 0;
|
|
|
|
virtual void objectLoadStarted() = 0;
|
|
|
|
virtual void objectLoadFinished() = 0;
|
2016-02-17 10:11:00 +03:00
|
|
|
};
|
|
|
|
|
2024-09-04 17:31:16 +03:00
|
|
|
class LIMEREPORT_EXPORT ItemsWriterIntf {
|
2016-02-17 10:11:00 +03:00
|
|
|
public:
|
2017-02-16 04:11:39 +03:00
|
|
|
virtual void putItem(QObject* item) = 0;
|
2016-02-17 10:11:00 +03:00
|
|
|
virtual bool saveToFile(QString fileName) = 0;
|
|
|
|
virtual QString saveToString() = 0;
|
2016-02-17 10:39:17 +03:00
|
|
|
virtual QByteArray saveToByteArray() = 0;
|
2017-02-16 04:11:39 +03:00
|
|
|
virtual void setPassPhrase(const QString& passPhrase) = 0;
|
2024-09-04 17:31:16 +03:00
|
|
|
virtual ~ItemsWriterIntf() { }
|
2016-02-17 10:11:00 +03:00
|
|
|
};
|
|
|
|
|
2024-09-04 17:31:16 +03:00
|
|
|
class LIMEREPORT_EXPORT ItemsReaderIntf {
|
2016-02-17 10:11:00 +03:00
|
|
|
public:
|
|
|
|
typedef QSharedPointer<ItemsReaderIntf> Ptr;
|
2017-02-16 04:11:39 +03:00
|
|
|
virtual bool first() = 0;
|
|
|
|
virtual bool next() = 0;
|
|
|
|
virtual bool prior() = 0;
|
|
|
|
virtual QString itemType() = 0;
|
|
|
|
virtual QString itemClassName() = 0;
|
2024-09-04 17:31:16 +03:00
|
|
|
virtual bool readItem(QObject* item) = 0;
|
2017-02-16 04:11:39 +03:00
|
|
|
virtual int firstLevelItemsCount() = 0;
|
|
|
|
virtual QString lastError() = 0;
|
|
|
|
virtual void setPassPhrase(const QString& passPhrase) = 0;
|
2024-09-04 17:31:16 +03:00
|
|
|
virtual ~ItemsReaderIntf() { }
|
2016-02-17 10:11:00 +03:00
|
|
|
};
|
|
|
|
|
2024-09-04 17:31:16 +03:00
|
|
|
} // namespace LimeReport
|
2016-02-17 10:11:00 +03:00
|
|
|
#endif // LRSTORAGEINTF_H
|