SDK  2.1.4 [async]
CloudBackend Software Development Kit - SDK API for C++
CreateAccountDelegate.h
1 #ifndef CBE__delegate__CreateAccountDelegate_h__
2 #define CBE__delegate__CreateAccountDelegate_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 {
24 public:
25  using Success = UserId;
29  virtual void onCreateAccountSuccess(UserId&& userId) = 0;
30 
31  using Error = delegate::Error;
38  virtual void onCreateAccountError(Error&& error,
39  cbe::util::Context&& context) = 0;
40 
45  using Base::Base; // Inherit base class' constructors
46  }; // struct ErrorInfo
47 
48 #ifndef CBE_NO_SYNC
54  struct Exception : cbe::util::ExceptionImpl<ErrorInfo> {
55  using Base::Base; // Inherit base class' constructors
56  }; // class struct CloudBackend::CreateAccountException
57 #endif // #ifndef CBE_NO_SYNC
58 
59  virtual ~CreateAccountDelegate();
60 }; // class CreateAccountDelegate
61 
66 using CreateAccountDelegatePtr = std::shared_ptr<CreateAccountDelegate>;
67  } // namespace delegate
68 } // namespace cbe
69 
70 #endif // !CBE__delegate__CreateAccountDelegate_h__
Definition: CreateAccountDelegate.h:23
virtual void onCreateAccountSuccess(UserId &&userId)=0
virtual void onCreateAccountError(Error &&error, cbe::util::Context &&context)=0
Definition: Error.h:14
std::shared_ptr< CreateAccountDelegate > CreateAccountDelegatePtr
Definition: CreateAccountDelegate.h:66
Root namespace for the CloudBackend SDK API.
Definition: Account.h:22
std::uint64_t UserId
Uniquely identifies the CBE user number.
Definition: Types.h:126
Definition: CreateAccountDelegate.h:44
Definition: Context.h:11
Definition: ErrorInfo.h:27
Definition: Exception.h:38