SDK  2.1.4 [async]
CloudBackend Software Development Kit - SDK API for C++
All Classes Namespaces Functions Variables Typedefs Enumerations Friends Pages
ShareDelegate.h
1 #ifndef CBE__delegate__ShareDelegate_h__
2 #define CBE__delegate__ShareDelegate_h__
3 
4 #include "cbe/Types.h"
5 #include "cbe/delegate/Error.h"
6 #include "cbe/util/Context.h"
7 #include "cbe/util/ErrorInfo.h"
8 #include "cbe/util/Exception.h"
9 
10 namespace cbe {
11  namespace delegate {
12 class ShareSuccess;
21 public:
22  using Success = ShareSuccess;
30  virtual void onShareSuccess(cbe::ShareId shareId) = 0;
31 
32  using Error = delegate::Error;
36  virtual void onShareError(Error&& error,
37  cbe::util::Context&& context) = 0;
38 
43  using Base::Base; // Inherit base class' constructors
44  }; // struct ErrorInfo
45 
46 #ifndef CBE_NO_SYNC
55  struct Exception : cbe::util::ExceptionImpl<ErrorInfo> {
56  using Base::Base; // Inherit base class' constructors
57  }; // class struct CloudBackend::ShareException
58 #endif // #ifndef CBE_NO_SYNC
59 
60  virtual ~ShareDelegate();
61 }; // class ShareDelegate
62 
70 using ShareDelegatePtr = std::shared_ptr<ShareDelegate>;
71 
77 class ShareSuccess {
78 public:
79  cbe::ShareId shareId = 0;
80 
81  ShareSuccess();
83  ShareSuccess(cbe::ShareId shareId);
89  explicit operator bool() const;
90 }; // class ShareSuccess
91  } // namespace delegate
92 } // namespace cbe
93 #endif
Definition: Error.h:14
Definition: ShareDelegate.h:20
virtual void onShareSuccess(cbe::ShareId shareId)=0
virtual void onShareError(Error &&error, cbe::util::Context &&context)=0
Convenience type that bundles the parameter passed to method cbe::delegate::ShareDelegate::onShareSuc...
Definition: ShareDelegate.h:77
std::shared_ptr< ShareDelegate > ShareDelegatePtr
Definition: ShareDelegate.h:70
Root namespace for the CloudBackend SDK API.
Definition: Account.h:22
std::uint64_t ShareId
Uniquely identifies a sharing of a cbe::Container or cbe::Object.
Definition: Types.h:113
DefaultCtor
Default constructor marker.
Definition: Types.h:204
Definition: ShareDelegate.h:42
Definition: Context.h:11
Definition: ErrorInfo.h:27
Definition: Exception.h:38