CatapultServer  v0.5.0.1 (Elephant)
AccountLinkNotifications.h
Go to the documentation of this file.
1 
21 #pragma once
22 #include "AccountLinkAction.h"
23 #include "catapult/model/Mosaic.h"
25 
26 namespace catapult { namespace model {
27 
28  // region account link notification types
29 
31 #define DEFINE_ACCOUNT_LINK_NOTIFICATION(DESCRIPTION, CODE, CHANNEL) DEFINE_NOTIFICATION_TYPE(CHANNEL, AccountLink, DESCRIPTION, CODE)
32 
34  DEFINE_ACCOUNT_LINK_NOTIFICATION(Remote, 0x001, All);
35 
37  DEFINE_ACCOUNT_LINK_NOTIFICATION(New_Remote_Account, 0x002, Validator);
38 
39 #undef DEFINE_ACCOUNTLINK_NOTIFICATION
40 
41  // endregion
42 
43  // region RemoteAccountLinkNotification
44 
47  public:
49  static constexpr auto Notification_Type = AccountLink_Remote_Notification;
50 
51  public:
53  RemoteAccountLinkNotification(const Key& mainAccountKey, const Key& remoteAccountKey, AccountLinkAction linkAction)
55  , MainAccountKey(mainAccountKey)
56  , RemoteAccountKey(remoteAccountKey)
57  , LinkAction(linkAction)
58  {}
59 
60  public:
63 
66 
69  };
70 
71  // endregion
72 
73  // region NewRemoteAccountNotification
74 
77  public:
79  static constexpr auto Notification_Type = AccountLink_New_Remote_Account_Notification;
80 
81  public:
83  explicit NewRemoteAccountNotification(const Key& remoteAccountKey)
85  , RemoteAccountKey(remoteAccountKey)
86  {}
87 
88  public:
91  };
92 
93  // endregion
94 }}
Mosaic.h
catapult::model::NewRemoteAccountNotification::Notification_Type
static constexpr auto Notification_Type
Matching notification type.
Definition: AccountLinkNotifications.h:79
catapult::model::RemoteAccountLinkNotification::MainAccountKey
const Key & MainAccountKey
Main account key.
Definition: AccountLinkNotifications.h:62
catapult::model::RemoteAccountLinkNotification
Notification of a remote account link.
Definition: AccountLinkNotifications.h:46
catapult::model::DEFINE_ACCOUNT_LINK_NOTIFICATION
DEFINE_ACCOUNT_LINK_NOTIFICATION(Remote, 0x001, All)
Remote account was un/linked.
catapult::model::NewRemoteAccountNotification
Notification of a new remote account.
Definition: AccountLinkNotifications.h:76
catapult::model::NewRemoteAccountNotification::NewRemoteAccountNotification
NewRemoteAccountNotification(const Key &remoteAccountKey)
Creates a notification around remoteAccountKey.
Definition: AccountLinkNotifications.h:83
catapult::model::RemoteAccountLinkNotification::RemoteAccountLinkNotification
RemoteAccountLinkNotification(const Key &mainAccountKey, const Key &remoteAccountKey, AccountLinkAction linkAction)
Creates a notification around mainAccountKey, remoteAccountKey and linkAction.
Definition: AccountLinkNotifications.h:53
catapult::model::NewRemoteAccountNotification::RemoteAccountKey
const Key & RemoteAccountKey
Remote account key.
Definition: AccountLinkNotifications.h:90
catapult::model::RemoteAccountLinkNotification::RemoteAccountKey
const Key & RemoteAccountKey
Remote account key.
Definition: AccountLinkNotifications.h:65
Notifications.h
catapult::model::Notification
A basic notification.
Definition: Notifications.h:36
catapult::model::RemoteAccountLinkNotification::Notification_Type
static constexpr auto Notification_Type
Matching notification type.
Definition: AccountLinkNotifications.h:49
AccountLinkAction.h
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::model::AccountLinkAction
AccountLinkAction
Account link transaction action.
Definition: AccountLinkAction.h:27
catapult::utils::ByteArray< Key_Size, Key_tag >
catapult::model::RemoteAccountLinkNotification::LinkAction
AccountLinkAction LinkAction
Account link action.
Definition: AccountLinkNotifications.h:68