SDK  2.1.4 [async]
CloudBackend Software Development Kit - SDK API for C++
DownloadDelegate.h
1 #ifndef CBE__delegate__DownloadDelegate_h__
2 #define CBE__delegate__DownloadDelegate_h__
3 
4 #include "cbe/QueryResult.h"
5 #include "cbe/Types.h"
6 
7 #include "cbe/delegate/TransferError.h"
8 
9 #include "cbe/util/Context.h"
10 #include "cbe/util/ErrorInfo.h"
11 #include "cbe/util/Exception.h"
12 
13 #include <memory>
14 
15 namespace cbe {
16  namespace delegate {
17 class DownloadSuccess;
26 public:
27  using Success = DownloadSuccess;
33  virtual void onDownloadSuccess(cbe::Object&& object, std::string path) = 0;
34 
39  virtual void onDownloadError(cbe::delegate::TransferError&& transferError,
40  cbe::util::Context&& context) = 0;
41 
49  virtual void onChunkReceived(cbe::Object&& object,
50  std::uint64_t received,
51  std::uint64_t total);
52 
57  using Base::Base; // Inherit base class' constructors
58  }; // struct ErrorInfo
59 
60 #ifndef CBE_NO_SYNC
69  struct Exception : cbe::util::ExceptionImpl<ErrorInfo> {
70  using Base::Base; // Inherit base class' constructors
71  }; // class struct CloudBackend::DownloadException
72 #endif // #ifndef CBE_NO_SYNC
73 
74  virtual ~DownloadDelegate();
75 }; // class DownloadDelegate
76 
84 using DownloadDelegatePtr = std::shared_ptr<DownloadDelegate>;
85 
86  } // namespace delegate
87 } // namespace cbe
88 
89 #endif // !CBE__delegate__DownloadDelegate_h__
Holder of a set of data, can represent a table row.
Definition: Object.h:64
Definition: DownloadDelegate.h:25
virtual void onChunkReceived(cbe::Object &&object, std::uint64_t received, std::uint64_t total)
virtual void onDownloadSuccess(cbe::Object &&object, std::string path)=0
virtual void onDownloadError(cbe::delegate::TransferError &&transferError, cbe::util::Context &&context)=0
Convenience type that bundles all parameters passed to method cbe::delegate::DownloadDelegate::onDown...
Definition: DownloadSuccess.h:16
Definition: TransferError.h:18
std::shared_ptr< DownloadDelegate > DownloadDelegatePtr
Definition: DownloadDelegate.h:84
Root namespace for the CloudBackend SDK API.
Definition: Account.h:22
Definition: DownloadDelegate.h:56
Definition: Context.h:11
Definition: ErrorInfo.h:27
Definition: Exception.h:38