libquentier 0.8.0
The library for rich desktop clients of Evernote service
Loading...
Searching...
No Matches
Public Member Functions | List of all members
quentier::enml::IENMLTagsConverter Class Referenceabstract

The IENMLTagsConverter interfaces provides methods which convert Evernote-specific markup tags such as en-crypt, en-media etc. into their counterparts which should be used in the HTML representation of note content. More...

#include <IENMLTagsConverter.h>

Public Member Functions

virtual QString convertEnToDo (bool checked, quint32 index) const =0
 
virtual QString convertEncryptedText (const QString &encryptedText, const QString &hint, const QString &cipher, std::size_t keyLength, quint32 index) const =0
 
virtual QString convertDecryptedText (const QString &decryptedText, const QString &encryptedText, const QString &hint, const QString &cipher, std::size_t keyLength, quint32 index) const =0
 
virtual Result< QString, ErrorStringconvertResource (const qevercloud::Resource &resource) const =0
 

Detailed Description

The IENMLTagsConverter interfaces provides methods which convert Evernote-specific markup tags such as en-crypt, en-media etc. into their counterparts which should be used in the HTML representation of note content.

Member Function Documentation

◆ convertDecryptedText()

virtual QString quentier::enml::IENMLTagsConverter::convertDecryptedText ( const QString decryptedText,
const QString encryptedText,
const QString hint,
const QString cipher,
std::size_t  keyLength,
quint32  index 
) const
pure virtual

Converts already decrypted en-crypt tag into its HTML counterpart

Parameters
decryptedTextdecrypted text from en-crypt tag
encryptedTextencrypted text contained within en-crypt tag
hinthint to be displayed when user tries to decrypt the text
ciphercipher used to ecrypt the text
keyLengthlength of the key used to encrypt the text
indexindex of particular en-crypt tag within the note content so that different en-crypt tags can be differentiated
Returns
HTML representation of decrypted en-crypt tag

◆ convertEncryptedText()

virtual QString quentier::enml::IENMLTagsConverter::convertEncryptedText ( const QString encryptedText,
const QString hint,
const QString cipher,
std::size_t  keyLength,
quint32  index 
) const
pure virtual

Converts en-crypt tag into its HTML counterpart

Parameters
encryptedTextencrypted text contained within en-crypt tag
hinthint to be displayed when user tries to decrypt the text
ciphercipher used to ecrypt the text
keyLengthlength of the key used to encrypt the text
indexindex of particular en-crypt tag within the note content so that different en-crypt tags can be differentiated
Returns
HTML representation of en-crypt tag

◆ convertEnToDo()

virtual QString quentier::enml::IENMLTagsConverter::convertEnToDo ( bool  checked,
quint32  index 
) const
pure virtual

Converts en-todo tag into its HTML counterpart

Parameters
checkedindicates whether this todo is checked or not
indexindex of particular en-todo tag within the note content so that different todo tags can be differentiated
Returns
HTML representation of en-todo tag

◆ convertResource()

virtual Result< QString, ErrorString > quentier::enml::IENMLTagsConverter::convertResource ( const qevercloud::Resource &  resource) const
pure virtual

Converts en-media tag representing a resource into its HTML counterpart

Parameters
resourceresource corresponding to en-media tag
Returns
Result with valid HTML representing the resource/en-media tag in case of success or error string in case of failure