libquentier 0.5.0
The library for rich desktop clients of Evernote service
Loading...
Searching...
No Matches
Signals | Public Member Functions | Protected Member Functions | List of all members
quentier::INoteStore Class Referenceabstract

INoteStore is the interface which provides methods required for the implementation of NoteStore part of Evernote EDAM sync protocol. More...

#include <INoteStore.h>

Inheritance diagram for quentier::INoteStore:
Inheritance graph
[legend]
Collaboration diagram for quentier::INoteStore:
Collaboration graph
[legend]

Signals

void getNoteAsyncFinished (qint32 errorCode, qevercloud::Note note, qint32 rateLimitSeconds, ErrorString errorDescription)
 
void getResourceAsyncFinished (qint32 errorCode, qevercloud::Resource resource, qint32 rateLimitSeconds, ErrorString errorDescription)
 

Public Member Functions

virtual INoteStorecreate () const =0
 
virtual QString noteStoreUrl () const =0
 
virtual void setNoteStoreUrl (QString noteStoreUrl)=0
 
virtual void setAuthData (QString authenticationToken, QList< QNetworkCookie > cookies)=0
 
virtual void stop ()=0
 
virtual qint32 createNotebook (Notebook &notebook, ErrorString &errorDescription, qint32 &rateLimitSeconds, QString linkedNotebookAuthToken={})=0
 
virtual qint32 updateNotebook (Notebook &notebook, ErrorString &errorDescription, qint32 &rateLimitSeconds, QString linkedNotebookAuthToken={})=0
 
virtual qint32 createNote (Note &note, ErrorString &errorDescription, qint32 &rateLimitSeconds, QString linkedNotebookAuthToken={})=0
 
virtual qint32 updateNote (Note &note, ErrorString &errorDescription, qint32 &rateLimitSeconds, QString linkedNotebookAuthToken={})=0
 
virtual qint32 createTag (Tag &tag, ErrorString &errorDescription, qint32 &rateLimitSeconds, QString linkedNotebookAuthToken={})=0
 
virtual qint32 updateTag (Tag &tag, ErrorString &errorDescription, qint32 &rateLimitSeconds, QString linkedNotebookAuthToken={})=0
 
virtual qint32 createSavedSearch (SavedSearch &savedSearch, ErrorString &errorDescription, qint32 &rateLimitSeconds)=0
 
virtual qint32 updateSavedSearch (SavedSearch &savedSearch, ErrorString &errorDescription, qint32 &rateLimitSeconds)=0
 
virtual qint32 getSyncState (qevercloud::SyncState &syncState, ErrorString &errorDescription, qint32 &rateLimitSeconds)=0
 
virtual qint32 getSyncChunk (const qint32 afterUSN, const qint32 maxEntries, const qevercloud::SyncChunkFilter &filter, qevercloud::SyncChunk &syncChunk, ErrorString &errorDescription, qint32 &rateLimitSeconds)=0
 
virtual qint32 getLinkedNotebookSyncState (const qevercloud::LinkedNotebook &linkedNotebook, const QString &authToken, qevercloud::SyncState &syncState, ErrorString &errorDescription, qint32 &rateLimitSeconds)=0
 
virtual qint32 getLinkedNotebookSyncChunk (const qevercloud::LinkedNotebook &linkedNotebook, const qint32 afterUSN, const qint32 maxEntries, const QString &linkedNotebookAuthToken, const bool fullSyncOnly, qevercloud::SyncChunk &syncChunk, ErrorString &errorDescription, qint32 &rateLimitSeconds)=0
 
virtual qint32 getNote (const bool withContent, const bool withResourcesData, const bool withResourcesRecognition, const bool withResourceAlternateData, Note &note, ErrorString &errorDescription, qint32 &rateLimitSeconds)=0
 
virtual bool getNoteAsync (const bool withContent, const bool withResourceData, const bool withResourcesRecognition, const bool withResourceAlternateData, const bool withSharedNotes, const bool withNoteAppDataValues, const bool withResourceAppDataValues, const bool withNoteLimits, const QString &noteGuid, const QString &authToken, ErrorString &errorDescription)=0
 
virtual qint32 getResource (const bool withDataBody, const bool withRecognitionDataBody, const bool withAlternateDataBody, const bool withAttributes, const QString &authToken, Resource &resource, ErrorString &errorDescription, qint32 &rateLimitSeconds)=0
 
virtual bool getResourceAsync (const bool withDataBody, const bool withRecognitionDataBody, const bool withAlternateDataBody, const bool withAttributes, const QString &resourceGuid, const QString &authToken, ErrorString &errorDescription)=0
 
virtual qint32 authenticateToSharedNotebook (const QString &shareKey, qevercloud::AuthenticationResult &authResult, ErrorString &errorDescription, qint32 &rateLimitSeconds)=0
 

Protected Member Functions

 INoteStore (QObject *parent=nullptr)
 

Detailed Description

INoteStore is the interface which provides methods required for the implementation of NoteStore part of Evernote EDAM sync protocol.

Member Function Documentation

◆ authenticateToSharedNotebook()

virtual qint32 quentier::INoteStore::authenticateToSharedNotebook ( const QString &  shareKey,
qevercloud::AuthenticationResult &  authResult,
ErrorString errorDescription,
qint32 &  rateLimitSeconds 
)
pure virtual

Authenticate to shared notebook

Parameters
shareKeyThe shared notebook global identifier
authResultOutput parameter, the result of authentication
errorDescriptionThe textual description of the error if authentication to shared notebook could not be performed
rateLimitSecondsOutput parameter, the number of seconds the client needs to wait before attempting to call this method or any other method calling Evernote API again; only meaningful if returned value matches qevercloud::EDAMErrorCode::RATE_LIMIT_REACHED
Returns
Error code, 0 in case of successful authentication to shared notebook, other values corresponding to qevercloud::EDAMErrorCode enumeration instead

◆ createNote()

virtual qint32 quentier::INoteStore::createNote ( Note note,
ErrorString errorDescription,
qint32 &  rateLimitSeconds,
QString  linkedNotebookAuthToken = {} 
)
pure virtual

Create note

Parameters
noteNote to be created
errorDescriptionThe textual description of the error in case note could not be created
rateLimitSecondsOutput parameter, the number of seconds the client needs to wait before attempting to call this method or any other method calling Evernote API again; only meaningful if returned value matches qevercloud::EDAMErrorCode::RATE_LIMIT_REACHED
linkedNotebookAuthTokenIf a note is created within another user's account, the corresponding auth token should be set, otherwise the note would be created in user's own account
Returns
Error code, 0 in case of successful note creation, other values corresponding to qevercloud::EDAMErrorCode enumeration instead

◆ createNotebook()

virtual qint32 quentier::INoteStore::createNotebook ( Notebook notebook,
ErrorString errorDescription,
qint32 &  rateLimitSeconds,
QString  linkedNotebookAuthToken = {} 
)
pure virtual

Create notebook

Parameters
notebookNotebook to be created, must have name set and either "active" or "default notebook" fields may be set
errorDescriptionThe textual description of the error in case notebook could not be created
rateLimitSecondsOutput parameter, the number of seconds the client needs to wait before attempting to call this method or any other method calling Evernote API again; only meaningful if returned value matches qevercloud::EDAMErrorCode::RATE_LIMIT_REACHED
linkedNotebookAuthTokenIf a notebook is created within another user's account, the corresponding auth token should be set, otherwise the notebook would be created in user's own account
Returns
Error code, 0 in case of successful notebook creation, other values corresponding to qevercloud::EDAMErrorCode enumeration instead

◆ createSavedSearch()

virtual qint32 quentier::INoteStore::createSavedSearch ( SavedSearch savedSearch,
ErrorString errorDescription,
qint32 &  rateLimitSeconds 
)
pure virtual

Create saved search

Parameters
savedSearchSaved search to be created, must have name and query set, can also have search scope set
errorDescriptionThe textual description of the error in case saved search could not be created
rateLimitSecondsOutput parameter, the number of seconds the client needs to wait before attempting to call this method or any other method calling Evernote API again; only meaningful if returned value matches qevercloud::EDAMErrorCode::RATE_LIMIT_REACHED
Returns
Error code, 0 in case of successful saved search creation, other values corresponding to qevercloud::EDAMErrorCode enumeration instead

◆ createTag()

virtual qint32 quentier::INoteStore::createTag ( Tag tag,
ErrorString errorDescription,
qint32 &  rateLimitSeconds,
QString  linkedNotebookAuthToken = {} 
)
pure virtual

Create tag

Parameters
noteTag to be created, must have name set, can also have parent guid set
errorDescriptionThe textual description of the error in case tag could not be created
rateLimitSecondsOutput parameter, the number of seconds the client needs to wait before attempting to call this method or any other method calling Evernote API again; only meaningful if returned value matches qevercloud::EDAMErrorCode::RATE_LIMIT_REACHED
linkedNotebookAuthTokenIf a tag is created within another user's account, the corresponding auth token should be set, otherwise the tag would be created in user's own account
Returns
Error code, 0 in case of successful tag creation, other values corresponding to qevercloud::EDAMErrorCode enumeration instead

◆ getLinkedNotebookSyncChunk()

virtual qint32 quentier::INoteStore::getLinkedNotebookSyncChunk ( const qevercloud::LinkedNotebook &  linkedNotebook,
const qint32  afterUSN,
const qint32  maxEntries,
const QString &  linkedNotebookAuthToken,
const bool  fullSyncOnly,
qevercloud::SyncChunk &  syncChunk,
ErrorString errorDescription,
qint32 &  rateLimitSeconds 
)
pure virtual

Get linked notebook sync chunk

Parameters
linkedNotebookThe linked notebook for which the sync chunk is being retrieved, must contain identifying information and permissions to access the notebook in question
afterUSNThe USN after which the sync chunks are being requested
maxEntriesMax number of items within the sync chunk to be returned
linkedNotebookAuthTokenThe authentication token to use for the data from the linked notebook
fullSyncOnlyIf true then client only wants initial data for a full sync. In this case Evernote service will not return any expunged objects and will not return any resources since these are also provided in their corresponding notes
syncChunkOutput parameter, the sync chunk
errorDescriptionThe textual description of the error in case linked notebook sync chunk could not be retrieved
rateLimitSecondsOutput parameter, the number of seconds the client needs to wait before attempting to call this method or any other method calling Evernote API again; only meaningful if returned value matches qevercloud::EDAMErrorCode::RATE_LIMIT_REACHED
Returns
Error code, 0 in case of successful linked notebook sync chunk retrieval, other values corresponding to qevercloud::EDAMErrorCode enumeration instead

◆ getLinkedNotebookSyncState()

virtual qint32 quentier::INoteStore::getLinkedNotebookSyncState ( const qevercloud::LinkedNotebook &  linkedNotebook,
const QString &  authToken,
qevercloud::SyncState &  syncState,
ErrorString errorDescription,
qint32 &  rateLimitSeconds 
)
pure virtual

Get linked notebook sync state

Parameters
linkedNotebookThe linked notebook for which the sync state is being retrieved, must contain identifying information and permissions to access the notebook in question
authTokenThe authentication token to use for the data from the linked notebook
syncStateOutput parameter, the sync state
errorDescriptionThe textual description of the error in case linked notebook sync state could not be retrieved
rateLimitSecondsOutput parameter, the number of seconds the client needs to wait before attempting to call this method or any other method calling Evernote API again; only meaningful if returned value matches qevercloud::EDAMErrorCode::RATE_LIMIT_REACHED
Returns
Error code, 0 in case of successful linked notebook sync state retrieval, other values corresponding to qevercloud::EDAMErrorCode enumeration instead

◆ getNote()

virtual qint32 quentier::INoteStore::getNote ( const bool  withContent,
const bool  withResourcesData,
const bool  withResourcesRecognition,
const bool  withResourceAlternateData,
Note note,
ErrorString errorDescription,
qint32 &  rateLimitSeconds 
)
pure virtual

Get note synchronously

Parameters
withContentIf true, the returned note would include the content
withResourcesDataIf true, any resources the note might have would include their full data
withResourcesRecognitionIf true, any resources the note might have and which have Evernote supplied recognition would include their full recognition data
withResourceAlternateDataIf true, any resources the note might have would include their full alternate data
noteInput and output parameter, the retrieved note, must have guid set
errorDescriptionThe textual description of the error in case the note could not be retrieved
rateLimitSecondsOutput parameter, the number of seconds the client needs to wait before attempting to call this method or any other method calling Evernote API again; only meaningful if returned value matches qevercloud::EDAMErrorCode::RATE_LIMIT_REACHED
Returns
Error code, 0 in case of successful note retrieval, other values corresponding to qevercloud::EDAMErrorCode enumeration instead

◆ getNoteAsync()

virtual bool quentier::INoteStore::getNoteAsync ( const bool  withContent,
const bool  withResourceData,
const bool  withResourcesRecognition,
const bool  withResourceAlternateData,
const bool  withSharedNotes,
const bool  withNoteAppDataValues,
const bool  withResourceAppDataValues,
const bool  withNoteLimits,
const QString &  noteGuid,
const QString &  authToken,
ErrorString errorDescription 
)
pure virtual

Get note asynchronously

If the method returned true, the actual result of the method invokation would be returned via the emission of getNoteAsyncFinished signal.

Parameters
withContentIf true, the returned note would include the content
withResourcesDataIf true, any resources the note might have would include their full data
withResourcesRecognitionIf true, any resources the note might have and which have Evernote supplied recognition would include their full recognition data
withResourceAlternateDataIf true, any resources the note might have would include their full alternate data
withSharedNotesIf true, any shared notes contained within the note would be provided along with the asynchronously fetched result
withNoteAppDataValuesIf true, the asynchronously fetched note would contain the app data values
withResourceAppDataValuesIf true, the resources of asynchronously fetched note would contain the app data values
withNoteLimitsIf true, the asynchronously fetched note would contain note limits
noteGuidThe guid of the note to be retrieved
authTokenAuthentication token to use for note retrieval
errorDescriptionThe textual description of the error if the launch of async note retrieval has failed
Returns
True if the launch of async note retrieval was successful, false otherwise

◆ getResource()

virtual qint32 quentier::INoteStore::getResource ( const bool  withDataBody,
const bool  withRecognitionDataBody,
const bool  withAlternateDataBody,
const bool  withAttributes,
const QString &  authToken,
Resource resource,
ErrorString errorDescription,
qint32 &  rateLimitSeconds 
)
pure virtual

Get resource synchronously

Parameters
withDataBodyIf true, the returned resource would include its data body
withRecognitionDataBodyIf true, the returned resource would include its recognition data body
withAlternateDataBodyIf true, the returned resource would include its alternate data body
withAttributesIf true, the returned resource would include its attributes
authTokenAuthentication token to use for resource retrieval
resourceInput and output parameter, the retrieved resource, must have guid set
errorDescriptionThe textual description of the error in case the resource could not be retrieved
rateLimitSecondsOutput parameter, the number of seconds the client needs to wait before attempting to call this method or any other method calling Evernote API again; only meaningful if returned value matches qevercloud::EDAMErrorCode::RATE_LIMIT_REACHED
Returns
Error code, 0 in case of successful resource retrieval, other values corresponding to qevercloud::EDAMErrorCode enumeration instead

◆ getResourceAsync()

virtual bool quentier::INoteStore::getResourceAsync ( const bool  withDataBody,
const bool  withRecognitionDataBody,
const bool  withAlternateDataBody,
const bool  withAttributes,
const QString &  resourceGuid,
const QString &  authToken,
ErrorString errorDescription 
)
pure virtual

Get resource asynchronously

If the method returned true, the actual result of the method invokation would be returned via the emission of getResourceAsyncFinished signal.

Parameters
withDataBodyIf true, the returned resource would include its data body
withRecognitionDataBodyIf true, the returned resource would include its recognition data body
withAlternateDataBodyIf true, the returned resource would include its alternate data body
withAttributesIf true, the returned resource would include its attributes
resourceGuidThe guid of the resource to be retrieved
authTokenAuthentication token to use for resource retrieval
errorDescriptionThe textual description of the error if the launch of async resource retrieval has failed
Returns
True if the launch of async resource retrieval was successful, false otherwise

◆ getSyncChunk()

virtual qint32 quentier::INoteStore::getSyncChunk ( const qint32  afterUSN,
const qint32  maxEntries,
const qevercloud::SyncChunkFilter &  filter,
qevercloud::SyncChunk &  syncChunk,
ErrorString errorDescription,
qint32 &  rateLimitSeconds 
)
pure virtual

Get sync chunk

Parameters
afterUSNThe USN after which the sync chunks are being requested
maxEntriesMax number of items within the sync chunk to be returned
filterFilter for items to be returned within the sync chunks
syncChunkOutput parameter, the sync chunk
errorDescriptionThe textual description of the error in case sync chunk could not be retrieved
rateLimitSecondsOutput parameter, the number of seconds the client needs to wait before attempting to call this method or any other method calling Evernote API again; only meaningful if returned value matches qevercloud::EDAMErrorCode::RATE_LIMIT_REACHED
Returns
Error code, 0 in case of successful sync chunk retrieval, other values corresponding to qevercloud::EDAMErrorCode enumeration instead

◆ getSyncState()

virtual qint32 quentier::INoteStore::getSyncState ( qevercloud::SyncState &  syncState,
ErrorString errorDescription,
qint32 &  rateLimitSeconds 
)
pure virtual

Get sync state

Parameters
syncStateOutput parameter, the sync state
errorDescriptionThe textual description of the error in case sync state could not be retrieved
rateLimitSecondsOutput parameter, the number of seconds the client needs to wait before attempting to call this method or any other method calling Evernote API again; only meaningful if returned value matches qevercloud::EDAMErrorCode::RATE_LIMIT_REACHED
Returns
Error code, 0 in case of successful sync state retrieval, other values corresponding to qevercloud::EDAMErrorCode enumeration instead

◆ noteStoreUrl()

virtual QString quentier::INoteStore::noteStoreUrl ( ) const
pure virtual

Provide note store URL used by this INoteStore instance

◆ setAuthData()

virtual void quentier::INoteStore::setAuthData ( QString  authenticationToken,
QList< QNetworkCookie >  cookies 
)
pure virtual

Set authentication data to be used by this INoteStore instance

◆ setNoteStoreUrl()

virtual void quentier::INoteStore::setNoteStoreUrl ( QString  noteStoreUrl)
pure virtual

Set note store URL to be used by this INoteStore instance

◆ stop()

virtual void quentier::INoteStore::stop ( )
pure virtual

Stop asynchronous queries for notes or resources which might be running at the moment

◆ updateNote()

virtual qint32 quentier::INoteStore::updateNote ( Note note,
ErrorString errorDescription,
qint32 &  rateLimitSeconds,
QString  linkedNotebookAuthToken = {} 
)
pure virtual

Update note

Parameters
noteNote to be updated, must have guid set
errorDescriptionThe textual description of the error in case note could not be updated
rateLimitSecondsOutput parameter, the number of seconds the client needs to wait before attempting to call this method or any other method calling Evernote API again; only meaningful if returned value matches qevercloud::EDAMErrorCode::RATE_LIMIT_REACHED
linkedNotebookAuthTokenIf a note is updated within another user's account, the corresponding auth token should be set, otherwise the note would be updated within user's own account
Returns
Error code, 0 in case of successful note update, other values corresponding to qevercloud::EDAMErrorCode enumeration instead

◆ updateNotebook()

virtual qint32 quentier::INoteStore::updateNotebook ( Notebook notebook,
ErrorString errorDescription,
qint32 &  rateLimitSeconds,
QString  linkedNotebookAuthToken = {} 
)
pure virtual

Update notebook

Parameters
notebookNotebook to be updated, must have guid set
errorDescriptionThe textual description of the error in case notebook could not be updated
rateLimitSecondsOutput parameter, the number of seconds the client needs to wait before attempting to call this method or any other method calling Evernote API again; only meaningful if returned value matches qevercloud::EDAMErrorCode::RATE_LIMIT_REACHED
linkedNotebookAuthTokenIf a notebook is updated within another user's account, the corresponding auth token should be set, otherwise the notebook would be updated within user's own account
Returns
Error code, 0 in case of successful notebook update, other values corresponding to qevercloud::EDAMErrorCode enumeration instead

◆ updateSavedSearch()

virtual qint32 quentier::INoteStore::updateSavedSearch ( SavedSearch savedSearch,
ErrorString errorDescription,
qint32 &  rateLimitSeconds 
)
pure virtual

Update saved search

Parameters
savedSearchSaved search to be updated, must have guid set
errorDescriptionThe textual description of the error in case saved search could not be updated
rateLimitSecondsOutput parameter, the number of seconds the client needs to wait before attempting to call this method or any other method calling Evernote API again; only meaningful if returned value matches qevercloud::EDAMErrorCode::RATE_LIMIT_REACHED
Returns
Error code, 0 in case of successful saved search update, other values corresponding to qevercloud::EDAMErrorCode enumeration instead

◆ updateTag()

virtual qint32 quentier::INoteStore::updateTag ( Tag tag,
ErrorString errorDescription,
qint32 &  rateLimitSeconds,
QString  linkedNotebookAuthToken = {} 
)
pure virtual

Update tag

Parameters
tagTag to be updated, must have guid set
errorDescriptionThe textual description of the error in case tag could not be updated
rateLimitSecondsOutput parameter, the number of seconds the client needs to wait before attempting to call this method or any other method calling Evernote API again; only meaningful if returned value matches qevercloud::EDAMErrorCode::RATE_LIMIT_REACHED
linkedNotebookAuthTokenIf a tag is updated within another user's account, the corresponding auth token should be set, otherwise the tag would be updated within user's own account
Returns
Error code, 0 in case of successful tag update, other values corresponding to qevercloud::EDAMErrorCode enumeration instead