8#ifndef QEVERCLOUD_DURABLE_SERVICE_H
9#define QEVERCLOUD_DURABLE_SERVICE_H
36QT_FORWARD_DECLARE_CLASS(DurableServicePrivate)
41 using SyncResult = std::pair<QVariant,EverCloudExceptionDataPtr>;
54 m_description(std::move(description)),
55 m_call(std::move(call))
68 m_description(std::move(description)),
69 m_call(std::move(call))
#define QEVERCLOUD_EXPORT
Definition Export.h:19
Returned by asynchonous versions of functions.
Definition AsyncResult.h:54
Definition DurableService.h:39
std::function< AsyncResult *(IRequestContextPtr)> AsyncServiceCall
Definition DurableService.h:43
virtual SyncResult executeSyncRequest(SyncRequest &&syncRequest, IRequestContextPtr ctx)=0
std::function< SyncResult(IRequestContextPtr)> SyncServiceCall
Definition DurableService.h:42
virtual AsyncResult * executeAsyncRequest(AsyncRequest &&asyncRequest, IRequestContextPtr ctx)=0
std::pair< QVariant, EverCloudExceptionDataPtr > SyncResult
Definition DurableService.h:41
Definition AsyncResult.h:21
QEVERCLOUD_EXPORT IRetryPolicyPtr newRetryPolicy()
std::shared_ptr< EverCloudExceptionData > EverCloudExceptionDataPtr
Definition EverCloudException.h:149
std::shared_ptr< IRetryPolicy > IRetryPolicyPtr
Definition DurableService.h:32
QEVERCLOUD_EXPORT IRetryPolicyPtr nullRetryPolicy()
std::shared_ptr< IDurableService > IDurableServicePtr
Definition DurableService.h:81
std::shared_ptr< IRequestContext > IRequestContextPtr
Definition RequestContext.h:81
QEVERCLOUD_EXPORT IDurableServicePtr newDurableService(IRetryPolicyPtr={}, IRequestContextPtr={})
Definition DurableService.h:60
AsyncRequest(const char *name, QString description, AsyncServiceCall &&call)
Definition DurableService.h:65
const char * m_name
Definition DurableService.h:61
AsyncServiceCall m_call
Definition DurableService.h:63
QString m_description
Definition DurableService.h:62
Definition DurableService.h:46
SyncServiceCall m_call
Definition DurableService.h:49
const char * m_name
Definition DurableService.h:47
QString m_description
Definition DurableService.h:48
SyncRequest(const char *name, QString description, SyncServiceCall &&call)
Definition DurableService.h:51
Definition DurableService.h:27
virtual bool shouldRetry(const EverCloudExceptionDataPtr &exceptionData)=0