libquentier
0.5.0
The library for rich desktop clients of Evernote service
|
INoteStore is the interface for NoteStore used by SynchronizationManager: it provides signatures of methods required for the implementation of Evernote EDAM sync protocol. More...
#include <INoteStore.h>
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 | |
qevercloud::INoteStorePtr | getQecNoteStore () |
void | setQecNoteStore (const qevercloud::INoteStorePtr &pQecNoteStore) |
QString | noteStoreUrl () const |
void | setNoteStoreUrl (const QString ¬eStoreUrl) |
QString | authenticationToken () const |
void | setAuthenticationToken (const QString &authToken) |
virtual INoteStore * | create () const =0 |
virtual void | stop ()=0 |
virtual qint32 | createNotebook (Notebook ¬ebook, ErrorString &errorDescription, qint32 &rateLimitSeconds, const QString &linkedNotebookAuthToken=QString())=0 |
virtual qint32 | updateNotebook (Notebook ¬ebook, ErrorString &errorDescription, qint32 &rateLimitSeconds, const QString &linkedNotebookAuthToken=QString())=0 |
virtual qint32 | createNote (Note ¬e, ErrorString &errorDescription, qint32 &rateLimitSeconds, const QString &linkedNotebookAuthToken=QString())=0 |
virtual qint32 | updateNote (Note ¬e, ErrorString &errorDescription, qint32 &rateLimitSeconds, const QString &linkedNotebookAuthToken=QString())=0 |
virtual qint32 | createTag (Tag &tag, ErrorString &errorDescription, qint32 &rateLimitSeconds, const QString &linkedNotebookAuthToken=QString())=0 |
virtual qint32 | updateTag (Tag &tag, ErrorString &errorDescription, qint32 &rateLimitSeconds, const QString &linkedNotebookAuthToken=QString())=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 ¬e, 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 ¬eGuid, 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 (const qevercloud::INoteStorePtr &pQecNoteStore, QObject *parent=nullptr) | |
Protected Attributes | |
qevercloud::INoteStorePtr | m_pQecNoteStore |
QString | m_authenticationToken |
INoteStore is the interface for NoteStore used by SynchronizationManager: it provides signatures of methods required for the implementation of Evernote EDAM sync protocol.
By default SynchronizationManager within libquentier uses its own private implementation of INoteStore interface but another implementation can be injected at SynchronizationManager construction time. For one thing, such injection is used for testing of libquentier's synchronization logic, for other things, it can be used to implement custom synchronization with some alternative backends.
|
pure virtual |
Authenticate to shared notebook
shareKey | The shared notebook global identifier |
authResult | Output parameter, the result of authentication |
errorDescription | The textual description of the error if authentication to shared notebook could not be performed |
rateLimitSeconds | Output 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 |
|
pure virtual |
Factory method, create a new INoteStore subclass object
|
pure virtual |
Create note
note | Note to be created |
errorDescription | The textual description of the error in case note could not be created |
rateLimitSeconds | Output 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 |
linkedNotebookAuthToken | If 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 |
|
pure virtual |
Create notebook
notebook | Notebook to be created, must have name set and either "active" or "default notebook" fields may be set |
errorDescription | The textual description of the error in case notebook could not be created |
rateLimitSeconds | Output 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 |
linkedNotebookAuthToken | If 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 |
|
pure virtual |
Create saved search
savedSearch | Saved search to be created, must have name and query set, can also have search scope set |
errorDescription | The textual description of the error in case saved search could not be created |
rateLimitSeconds | Output 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 |
|
pure virtual |
Create tag
note | Tag to be created, must have name set, can also have parent guid set |
errorDescription | The textual description of the error in case tag could not be created |
rateLimitSeconds | Output 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 |
linkedNotebookAuthToken | If 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 |
|
pure virtual |
Get linked notebook sync chunk
linkedNotebook | The linked notebook for which the sync chunk is being retrieved, must contain identifying information and permissions to access the notebook in question |
afterUSN | The USN after which the sync chunks are being requested |
maxEntries | Max number of items within the sync chunk to be returned |
linkedNotebookAuthToken | The authentication token to use for the data from the linked notebook |
fullSyncOnly | If 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 |
syncChunk | Output parameter, the sync chunk |
errorDescription | The textual description of the error in case linked notebook sync chunk could not be retrieved |
rateLimitSeconds | Output 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 |
|
pure virtual |
Get linked notebook sync state
linkedNotebook | The linked notebook for which the sync state is being retrieved, must contain identifying information and permissions to access the notebook in question |
authToken | The authentication token to use for the data from the linked notebook |
syncState | Output parameter, the sync state |
errorDescription | The textual description of the error in case linked notebook sync state could not be retrieved |
rateLimitSeconds | Output 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 |
|
pure virtual |
Get note synchronously
withContent | If true, the returned note would include the content |
withResourcesData | If true, any resources the note might have would include their full data |
withResourcesRecognition | If true, any resources the note might have and which have Evernote supplied recognition would include their full recognition data |
withResourceAlternateData | If true, any resources the note might have would include their full alternate data |
note | Input and output parameter, the retrieved note, must have guid set |
errorDescription | The textual description of the error in case the note could not be retrieved |
rateLimitSeconds | Output 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 |
|
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.
withContent | If true, the returned note would include the content |
withResourcesData | If true, any resources the note might have would include their full data |
withResourcesRecognition | If true, any resources the note might have and which have Evernote supplied recognition would include their full recognition data |
withResourceAlternateData | If true, any resources the note might have would include their full alternate data |
withSharedNotes | If true, any shared notes contained within the note would be provided along with the asynchronously fetched result |
withNoteAppDataValues | If true, the asynchronously fetched note would contain the app data values |
withResourceAppDataValues | If true, the resources of asynchronously fetched note would contain the app data values |
withNoteLimits | If true, the asynchronously fetched note would contain note limits |
noteGuid | The guid of the note to be retrieved |
authToken | Authentication token to use for note retrieval |
errorDescription | The textual description of the error if the launch of async note retrieval has failed |
|
pure virtual |
Get resource synchronously
withDataBody | If true, the returned resource would include its data body |
withRecognitionDataBody | If true, the returned resource would include its recognition data body |
withAlternateDataBody | If true, the returned resource would include its alternate data body |
withAttributes | If true, the returned resource would include its attributes |
authToken | Authentication token to use for resource retrieval |
resource | Input and output parameter, the retrieved resource, must have guid set |
errorDescription | The textual description of the error in case the resource could not be retrieved |
rateLimitSeconds | Output 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 |
|
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.
withDataBody | If true, the returned resource would include its data body |
withRecognitionDataBody | If true, the returned resource would include its recognition data body |
withAlternateDataBody | If true, the returned resource would include its alternate data body |
withAttributes | If true, the returned resource would include its attributes |
resourceGuid | The guid of the resource to be retrieved |
authToken | Authentication token to use for resource retrieval |
errorDescription | The textual description of the error if the launch of async resource retrieval has failed |
|
pure virtual |
Get sync chunk
afterUSN | The USN after which the sync chunks are being requested |
maxEntries | Max number of items within the sync chunk to be returned |
filter | Filter for items to be returned within the sync chunks |
syncChunk | Output parameter, the sync chunk |
errorDescription | The textual description of the error in case sync chunk could not be retrieved |
rateLimitSeconds | Output 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 |
|
pure virtual |
Get sync state
syncState | Output parameter, the sync state |
errorDescription | The textual description of the error in case sync state could not be retrieved |
rateLimitSeconds | Output 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 |
|
pure virtual |
Stop the asynchronous queries for note or resource running at the moment
|
pure virtual |
Update note
note | Note to be updated, must have guid set |
errorDescription | The textual description of the error in case note could not be updated |
rateLimitSeconds | Output 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 |
linkedNotebookAuthToken | If 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 |
|
pure virtual |
Update notebook
notebook | Notebook to be updated, must have guid set |
errorDescription | The textual description of the error in case notebook could not be updated |
rateLimitSeconds | Output 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 |
linkedNotebookAuthToken | If 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 |
|
pure virtual |
Update saved search
savedSearch | Saved search to be updated, must have guid set |
errorDescription | The textual description of the error in case saved search could not be updated |
rateLimitSeconds | Output 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 |
|
pure virtual |
Update tag
tag | Tag to be updated, must have guid set |
errorDescription | The textual description of the error in case tag could not be updated |
rateLimitSeconds | Output 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 |
linkedNotebookAuthToken | If 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 |