SDK  2.1.4 [async]
CloudBackend Software Development Kit - SDK API for C++
UploadDelegate.h
1 #ifndef CBE__delegate__UploadDelegate_h__
2 #define CBE__delegate__UploadDelegate_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 
29 public:
30  using Success = cbe::Object;
35  virtual void onUploadSuccess(cbe::Object&& object) = 0;
36 
37  using Error = TransferError;
41  virtual void onUploadError(cbe::delegate::TransferError&& transferError,
42  cbe::util::Context&& context) = 0;
43 
51  virtual void onChunkSent(cbe::Object&& object,
52  std::uint64_t sent,
53  std::uint64_t total);
58  using Base::Base; // Inherit base class' constructors
59  }; // struct ErrorInfo
60 
61 #ifndef CBE_NO_SYNC
68  struct Exception : cbe::util::ExceptionImpl<ErrorInfo> {
69  using Base::Base; // Inherit base class' constructors
70  }; // class struct CloudBackend::UploadException
71 #endif // #ifndef CBE_NO_SYNC
72  virtual ~UploadDelegate();
73 }; // class UploadDelegate
74 
83 using UploadDelegatePtr = std::shared_ptr<UploadDelegate>;
84 
85  } // namespace delegate
86 } // namespace cbe
87 
88 #endif // !CBE__delegate__UploadDelegate_h__
Holder of a set of data, can represent a table row.
Definition: Object.h:64
Definition: TransferError.h:18
Definition: UploadDelegate.h:28
virtual void onUploadSuccess(cbe::Object &&object)=0
virtual void onChunkSent(cbe::Object &&object, std::uint64_t sent, std::uint64_t total)
virtual void onUploadError(cbe::delegate::TransferError &&transferError, cbe::util::Context &&context)=0
std::shared_ptr< UploadDelegate > UploadDelegatePtr
Definition: UploadDelegate.h:83
Root namespace for the CloudBackend SDK API.
Definition: Account.h:22
Definition: UploadDelegate.h:57
Definition: Context.h:11
Definition: ErrorInfo.h:27
Definition: Exception.h:38