SDK  2.1.4 [async]
CloudBackend Software Development Kit - SDK API for C++
KickDelegate.h
1 #ifndef CBE__delegate__KickDelegate_h__
2 #define CBE__delegate__KickDelegate_h__
3 
4 #include "cbe/QueryResult.h"
5 #include "cbe/Types.h"
6 
7 #include "cbe/delegate/Error.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 KickSuccess;
24 class KickDelegate {
25 public:
26  using Success = KickSuccess;
32  virtual void onKickSuccess(std::string&& memberName,
33  cbe::MemberId memberId) = 0;
34 
35  using Error = delegate::Error;
39  virtual void onKickError(Error&& error,
40  cbe::util::Context&& context) = 0;
41 
46  using Base::Base; // Inherit base class' constructors
47  }; // struct ErrorInfo
48 
49 #ifndef CBE_NO_SYNC
55  struct Exception : cbe::util::ExceptionImpl<ErrorInfo> {
56  using Base::Base; // Inherit base class' constructors
57  }; // struct CloudBackend::KickException
58 #endif // #ifndef CBE_NO_SYNC
59 
60  virtual ~KickDelegate();
61 }; // class KickDelegate
62 
69 using KickDelegatePtr = std::shared_ptr<KickDelegate>;
70 
76 class KickSuccess {
77 public:
78  std::string memberName{};
79  cbe::MemberId memberId{};
80 
81  KickSuccess();
83  KickSuccess(std::string&& memberName,
84  cbe::MemberId memberId);
85 };
86  } // namespace delegate
87 } // namespace cbe
88 
89 #endif // !CBE__delegate__KickDelegate_h__
Definition: Error.h:14
Definition: KickDelegate.h:24
virtual void onKickSuccess(std::string &&memberName, cbe::MemberId memberId)=0
virtual void onKickError(Error &&error, cbe::util::Context &&context)=0
Convenience type that bundles all parameters passed to method cbe::delegate::KickDelegate::onKickSucc...
Definition: KickDelegate.h:76
std::shared_ptr< KickDelegate > KickDelegatePtr
Definition: KickDelegate.h:69
Root namespace for the CloudBackend SDK API.
Definition: Account.h:22
DefaultCtor
Default constructor marker.
Definition: Types.h:204
std::uint64_t MemberId
Represents the cbe::Group membership id.
Definition: Types.h:92
Definition: KickDelegate.h:45
Definition: Context.h:11
Definition: ErrorInfo.h:27
Definition: Exception.h:38