libquentier  0.8.0
The library for rich desktop clients of Evernote service
IENMLTagsConverter.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/types/ErrorString.h>
22 #include <quentier/types/Result.h>
23 #include <quentier/utility/IEncryptor.h>
24 #include <quentier/utility/Linkage.h>
25 
26 #include <qevercloud/types/Fwd.h>
27 
28 #include <QString>
29 #include <QtGlobal>
30 
31 namespace quentier::enml {
32 
38 class QUENTIER_EXPORT IENMLTagsConverter
39 {
40 public:
41  virtual ~IENMLTagsConverter();
42 
50  [[nodiscard]] virtual QString convertEnToDo(
51  bool checked, quint32 index) const = 0;
52 
62  [[nodiscard]] virtual QString convertEncryptedText(
63  const QString & encryptedText, const QString & hint,
64  utility::IEncryptor::Cipher cipher, quint32 index) const = 0;
65 
76  [[nodiscard]] virtual QString convertDecryptedText(
77  const QString & decryptedText, const QString & encryptedText,
78  const QString & hint, utility::IEncryptor::Cipher cipher,
79  quint32 index) const = 0;
80 
87  [[nodiscard]] virtual Result<QString, ErrorString> convertResource(
88  const qevercloud::Resource & resource) const = 0;
89 };
90 
91 } // namespace quentier::enml
Cipher
Definition: IEncryptor.h:43
Definition: Result.h:33
The IENMLTagsConverter interfaces provides methods which convert Evernote-specific markup tags such a...
Definition: IENMLTagsConverter.h:38