SDK  2.1.4 [async]
CloudBackend Software Development Kit - SDK API for C++
DownloadBinaryDelegate.h
1 #ifndef CBE__delegate__DownloadBinaryDelegate_h__
2 #define CBE__delegate__DownloadBinaryDelegate_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 DownloadBinarySuccess;
25 public:
38  virtual void onDownloadBinarySuccess(cbe::Object&& object,
39  std::unique_ptr<char[]> data) = 0;
40 
41  using Error = TransferError;
45  virtual void onDownloadBinaryError(
46  cbe::delegate::TransferError&& transferError,
47  cbe::util::Context&& context) = 0;
48 
49 
57  virtual void onChunkReceived(cbe::Object&& object,
58  std::uint64_t received,
59  std::uint64_t total);
64  using Base::Base; // Inherit base class' constructors
65  }; // struct ErrorInfo
66 
67 #ifndef CBE_NO_SYNC
73  struct Exception : cbe::util::ExceptionImpl<ErrorInfo> {
74  using Base::Base; // Inherit base class' constructors
75  }; // class struct CloudBackend::DownloadException
76 #endif // #ifndef CBE_NO_SYNC
77 
78  virtual ~DownloadBinaryDelegate();
79 }; // class DownloadBinaryDelegate
80 
87 using DownloadBinaryDelegatePtr = std::shared_ptr<DownloadBinaryDelegate>;
88 
89  } // namespace delegate
90 } // namespace cbe
91 
92 #endif // !CBE__delegate__DownloadBinaryDelegate_h__
Holder of a set of data, can represent a table row.
Definition: Object.h:64
Definition: DownloadBinaryDelegate.h:24
virtual void onDownloadBinarySuccess(cbe::Object &&object, std::unique_ptr< char[]> data)=0
virtual void onChunkReceived(cbe::Object &&object, std::uint64_t received, std::uint64_t total)
virtual void onDownloadBinaryError(cbe::delegate::TransferError &&transferError, cbe::util::Context &&context)=0
Convenience type that bundles all parameters passed to method cbe::delegate::DownloadBinaryDelegate::...
Definition: DownloadBinarySuccess.h:17
Definition: TransferError.h:18
std::shared_ptr< DownloadBinaryDelegate > DownloadBinaryDelegatePtr
Definition: DownloadBinaryDelegate.h:87
Root namespace for the CloudBackend SDK API.
Definition: Account.h:22
Definition: DownloadBinaryDelegate.h:63
Definition: Context.h:11
Definition: ErrorInfo.h:27
Definition: Exception.h:38