SDK  2.1.4 [async]
CloudBackend Software Development Kit - SDK API for C++
UnBanDelegate.h
1 #ifndef CBE__delegate__UnBanDelegate_h__
2 #define CBE__delegate__UnBanDelegate_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 UnBanSuccess;
25 public:
26  using Success = UnBanSuccess;
32  virtual void onUnBanSuccess(std::string&& memberName,
33  cbe::MemberId memberId) = 0;
34 
35  using Error = delegate::Error;
39  virtual void onUnBanError(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  }; // class struct CloudBackend::UnBanException
58 #endif // #ifndef CBE_NO_SYNC
59 
60  virtual ~UnBanDelegate();
61 }; // class UnBanDelegate
68 using UnBanDelegatePtr = std::shared_ptr<UnBanDelegate>;
69 
75 class UnBanSuccess {
76 public:
77  std::string memberName{};
78  cbe::MemberId memberId{};
79 
80  UnBanSuccess();
82  UnBanSuccess(std::string&& memberName,
83  cbe::MemberId memberId);
84 };
85 
86  } // namespace delegate
87 } // namespace cbe
88 
89 #endif // !CBE__delegate__UnBanDelegate_h__
Definition: Error.h:14
Definition: UnBanDelegate.h:24
virtual void onUnBanError(Error &&error, cbe::util::Context &&context)=0
virtual void onUnBanSuccess(std::string &&memberName, cbe::MemberId memberId)=0
Convenience type that bundles all parameters passed to method cbe::delegate::UnBanDelegate::onUnBanSu...
Definition: UnBanDelegate.h:75
std::shared_ptr< UnBanDelegate > UnBanDelegatePtr
Definition: UnBanDelegate.h:68
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: UnBanDelegate.h:45
Definition: Context.h:11
Definition: ErrorInfo.h:27
Definition: Exception.h:38