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::local_storage::IPatch Class Referenceabstract

The IPatch interface represents patches of the local storage. Each such patch somehow changes the layout of local storage persistence so that only compliant & corresponding versions of libquentier can be used to work with it. More...

#include <IPatch.h>

Public Member Functions

virtual int fromVersion () const noexcept=0
 
virtual int toVersion () const noexcept=0
 
virtual QString patchShortDescription () const =0
 
virtual QString patchLongDescription () const =0
 
virtual QFuture< voidbackupLocalStorage ()=0
 
virtual QFuture< voidrestoreLocalStorageFromBackup ()=0
 
virtual QFuture< voidremoveLocalStorageBackup ()=0
 
virtual QFuture< voidapply ()=0
 

Detailed Description

The IPatch interface represents patches of the local storage. Each such patch somehow changes the layout of local storage persistence so that only compliant & corresponding versions of libquentier can be used to work with it.

Member Function Documentation

◆ apply()

virtual QFuture< void > quentier::local_storage::IPatch::apply ( )
pure virtual

Apply the patch to local storage

Returns
Future which can be awaited for patch application. Contains exception if patch application fails.

◆ backupLocalStorage()

virtual QFuture< void > quentier::local_storage::IPatch::backupLocalStorage ( )
pure virtual

Backup either the entire local storage or its parts affected by the particular patch, should be called before applying the patch (but can be skipped if not desired).

Returns
Future which can be awaited for the backup completion. Contains exception if backup fails.

◆ fromVersion()

virtual int quentier::local_storage::IPatch::fromVersion ( ) const
pure virtualnoexcept
Returns
Version of local storage to which the patch needs to be applied

◆ patchLongDescription()

virtual QString quentier::local_storage::IPatch::patchLongDescription ( ) const
pure virtual
Returns
Long i.e. detailed description of the patch

◆ patchShortDescription()

virtual QString quentier::local_storage::IPatch::patchShortDescription ( ) const
pure virtual
Returns
Short description of the patch

◆ removeLocalStorageBackup()

virtual QFuture< void > quentier::local_storage::IPatch::removeLocalStorageBackup ( )
pure virtual

Remove the previously made backup of local storage, presumably after successful application of the patch so the backup is no longer needed. It won't work if no backup was made before applying a patch, obviously.

Returns
Future which can be awaited for local storage backup removal. Contains exception if backup removal fails.

◆ restoreLocalStorageFromBackup()

virtual QFuture< void > quentier::local_storage::IPatch::restoreLocalStorageFromBackup ( )
pure virtual

Restore local storage from previously made backup, presumably after the failed attempt to apply a patch. Won't work if no backup was made before applying a patch, obviously.

Returns
Future which can be awaited for the backup restoration completion. Contains exception if backup restoration fails.

◆ toVersion()

virtual int quentier::local_storage::IPatch::toVersion ( ) const
pure virtualnoexcept
Returns
Version of local storage to which the patch would upgrade the local storage