SDK  2.1.4 [async]
CloudBackend Software Development Kit - SDK API for C++
UnPublishDelegate.h
1 #ifndef CBE__delegate__UnPublishDelegate_h__
2 #define CBE__delegate__UnPublishDelegate_h__
3 
4 #include "cbe/Types.h"
5 #include "cbe/util/Context.h"
6 #include "cbe/delegate/Error.h"
7 #include "cbe/util/ErrorInfo.h"
8 #include "cbe/util/Exception.h"
9 
10 namespace cbe {
11  namespace delegate {
12 class UnPublishSuccess;
21 public:
22  using Success = UnPublishSuccess;
29  virtual void onUnPublishSuccess(cbe::PublishId publishId,
30  cbe::ItemId itemId) = 0;
31 
32  using Error = delegate::Error;
36  virtual void onUnPublishError(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::UnPublishException
58 #endif // #ifndef CBE_NO_SYNC
59 
60  virtual ~UnPublishDelegate();
61 }; // class UnPublishDelegate
62 
70 using UnPublishDelegatePtr = std::shared_ptr<UnPublishDelegate>;
71 
78 public:
79  cbe::PublishId publishId{};
80  cbe::ItemId itemId{};
81 
85  cbe::ItemId itemId);
91  explicit operator bool() const;
92 };
93 
94  } // namespace delegate
95 } // namespace cbe
96 
97 #endif // #ifndef CBE__delegate__UnPublishDelegate_h__
Definition: Error.h:14
Definition: UnPublishDelegate.h:20
virtual void onUnPublishSuccess(cbe::PublishId publishId, cbe::ItemId itemId)=0
virtual void onUnPublishError(Error &&error, cbe::util::Context &&context)=0
Convenience type that bundles all parameters passed to method cbe::delegate::UnPublishDelegate::onUnP...
Definition: UnPublishDelegate.h:77
std::shared_ptr< UnPublishDelegate > UnPublishDelegatePtr
Definition: UnPublishDelegate.h:70
Root namespace for the CloudBackend SDK API.
Definition: Account.h:22
std::uint64_t ItemId
Id of a cbe::Container or cbe::Object.
Definition: Types.h:88
DefaultCtor
Default constructor marker.
Definition: Types.h:204
std::uint64_t PublishId
Id of a subscribed cbe::Container or cbe::Object.
Definition: Types.h:104
Definition: UnPublishDelegate.h:42
Definition: Context.h:11
Definition: ErrorInfo.h:27
Definition: Exception.h:38