libquentier 0.8.0
The library for rich desktop clients of Evernote service
Loading...
Searching...
No Matches
IConverter.h
1/*
2 * Copyright 2023-2024 Dmitry Ivanov
3 *
4 * This file is part of libquentier
5 *
6 * libquentier is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation, version 3 of the License.
9 *
10 * libquentier is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with libquentier. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#pragma once
20
21#include <quentier/enml/Fwd.h>
22#include <quentier/enml/conversion_rules/Fwd.h>
23#include <quentier/types/ErrorString.h>
24#include <quentier/types/Result.h>
25#include <quentier/utility/Linkage.h>
26
27#include <QList>
28#include <QStringList>
29#include <QTextDocument>
30
31#include <qevercloud/types/Note.h>
32
33namespace quentier::enml {
34
40{
41public:
42 virtual ~IConverter();
43
55
65 const QString & html, QTextDocument & doc,
67
75 const QString & html) const = 0;
76
84 const QString & html) const = 0;
85
94 const QString & enml,
96
104 const QString & enml) const = 0;
105
113 convertEnmlToWordsList(const QString & enml) const = 0;
114
121 const QString & plainText) const = 0;
122
130 const QString & enml) const = 0;
131
139 const QString & enml) const = 0;
140
145 enum class EnexExportTags
146 {
147 Yes = 0,
148 No
149 };
150
164 const QString & version = {}) const = 0;
165
175 importEnex(const QString & enex) const = 0;
176};
177
178} // namespace quentier::enml
The ErrorString class encapsulates two (or more) strings which are meant to contain translatable (bas...
Definition ErrorString.h:43
The Result template class represents the bare bones result monad implementation which either contains...
Definition Result.h:38
The IConverter interface encapsulates a set of methods performing conversions between ENML and other ...
Definition IConverter.h:40
virtual Result< QStringList, ErrorString > convertEnmlToWordsList(const QString &enml) const =0
EnexExportTags
The EnexExportTags enum allows to specify whether export of note(s) to ENEX should include the names ...
Definition IConverter.h:146
virtual Result< QString, ErrorString > validateAndFixupEnml(const QString &enml) const =0
virtual QStringList convertPlainTextToWordsList(const QString &plainText) const =0
virtual Result< QString, ErrorString > convertEnmlToPlainText(const QString &enml) const =0
virtual Result< void, ErrorString > validateEnml(const QString &enml) const =0
virtual Result< QString, ErrorString > convertHtmlToEnml(const QString &html, IDecryptedTextCache &decryptedTextCache, const QList< conversion_rules::ISkipRulePtr > &skipRules={}) const =0
virtual Result< void, ErrorString > convertHtmlToDoc(const QString &html, QTextDocument &doc, const QList< conversion_rules::ISkipRulePtr > &skipRules={}) const =0
virtual Result< IHtmlDataPtr, ErrorString > convertEnmlToHtml(const QString &enml, IDecryptedTextCache &decryptedTextCache) const =0
virtual Result< QList< qevercloud::Note >, ErrorString > importEnex(const QString &enex) const =0
virtual Result< QString, ErrorString > convertHtmlToXhtml(const QString &html) const =0
virtual Result< QString, ErrorString > convertHtmlToXml(const QString &html) const =0
virtual Result< QString, ErrorString > exportNotesToEnex(const QList< qevercloud::Note > &notes, const QHash< QString, QString > &tagNamesByTagLocalIds, EnexExportTags exportTagsOption, const QString &version={}) const =0
Definition IDecryptedTextCache.h:35