CatapultServer  v0.5.0.1 (Elephant)
AccountRestrictionNotifications.h
Go to the documentation of this file.
1 
21 #pragma once
25 
26 namespace catapult { namespace model {
27 
28  // region account restriction notification types
29 
31 #define DEFINE_ACCOUNT_RESTRICTION_NOTIFICATION(DESCRIPTION, CODE, CHANNEL) \
32  DEFINE_NOTIFICATION_TYPE(CHANNEL, RestrictionAccount, DESCRIPTION, CODE)
33 
35  DEFINE_ACCOUNT_RESTRICTION_NOTIFICATION(Type, 0x0001, Validator);
36 
38  DEFINE_ACCOUNT_RESTRICTION_NOTIFICATION(Address_Modification, 0x0010, All);
39 
41  DEFINE_ACCOUNT_RESTRICTION_NOTIFICATION(Mosaic_Modification, 0x0011, All);
42 
44  DEFINE_ACCOUNT_RESTRICTION_NOTIFICATION(Operation_Modification, 0x0012, All);
45 
47  DEFINE_ACCOUNT_RESTRICTION_NOTIFICATION(Address_Modifications, 0x0020, Validator);
48 
50  DEFINE_ACCOUNT_RESTRICTION_NOTIFICATION(Mosaic_Modifications, 0x0021, Validator);
51 
53  DEFINE_ACCOUNT_RESTRICTION_NOTIFICATION(Operation_Modifications, 0x0022, Validator);
54 
55 #undef DEFINE_ACCOUNT_RESTRICTION_NOTIFICATION
56 
57  // endregion
58 
59  // region AccountRestrictionTypeNotification
60 
63  public:
65  static constexpr auto Notification_Type = RestrictionAccount_Type_Notification;
66 
67  public:
71  , AccountRestrictionType(restrictionType)
72  {}
73 
74  public:
77  };
78 
79  // endregion
80 
81  // region ModifyAccountRestrictionValueNotification
82 
84  template<typename TRestrictionValue, NotificationType RestrictionAccount_Notification_Type>
86  public:
88  static constexpr auto Notification_Type = RestrictionAccount_Notification_Type;
89 
90  public:
93  const Key& key,
94  AccountRestrictionType restrictionType,
97  , Key(key)
98  , AccountRestrictionDescriptor(restrictionType)
99  , Modification(modification)
100  {}
101 
102  public:
105 
108 
112  };
113 
120 
121  // endregion
122 
123  // region ModifyAccountRestrictionNotification
124 
126  template<typename TRestrictionValue, NotificationType RestrictionAccount_Notification_Type>
128  public:
130  static constexpr auto Notification_Type = RestrictionAccount_Notification_Type;
131 
132  public:
135  const Key& key,
136  AccountRestrictionType restrictionType,
137  uint8_t modificationsCount,
140  , Key(key)
141  , AccountRestrictionDescriptor(restrictionType)
142  , ModificationsCount(modificationsCount)
143  , ModificationsPtr(pModifications)
144  {}
145 
146  public:
149 
152 
155 
158  };
159 
162  RestrictionAccount_Address_Modifications_Notification>;
165  RestrictionAccount_Mosaic_Modifications_Notification>;
167  EntityType,
168  RestrictionAccount_Operation_Modifications_Notification>;
169 
170  // endregion
171 }}
catapult::model::DEFINE_ACCOUNT_RESTRICTION_NOTIFICATION
DEFINE_ACCOUNT_RESTRICTION_NOTIFICATION(Type, 0x0001, Validator)
Account restriction type.
catapult::UnresolvedAddress
utils::ByteArray< Address_Decoded_Size, UnresolvedAddress_tag > UnresolvedAddress
Definition: src/catapult/types.h:66
catapult::model::ModifyAccountRestrictionValueNotification::ModifyAccountRestrictionValueNotification
ModifyAccountRestrictionValueNotification(const Key &key, AccountRestrictionType restrictionType, const AccountRestrictionModification< TRestrictionValue > &modification)
Creates a notification around key, restrictionType and modification.
Definition: AccountRestrictionNotifications.h:92
catapult::model::AccountRestrictionTypeNotification::AccountRestrictionTypeNotification
AccountRestrictionTypeNotification(model::AccountRestrictionType restrictionType)
Creates a notification around restrictionType.
Definition: AccountRestrictionNotifications.h:69
catapult::model::ModifyAccountRestrictionNotification::ModifyAccountRestrictionNotification
ModifyAccountRestrictionNotification(const Key &key, AccountRestrictionType restrictionType, uint8_t modificationsCount, const AccountRestrictionModification< TRestrictionValue > *pModifications)
Creates a notification around key, restrictionType, modificationsCount and pModifications.
Definition: AccountRestrictionNotifications.h:134
catapult::model::AccountRestrictionType
AccountRestrictionType
Account restriction types.
Definition: AccountRestrictionTypes.h:31
catapult::model::AccountRestrictionTypeNotification::AccountRestrictionType
model::AccountRestrictionType AccountRestrictionType
Account restriction type.
Definition: AccountRestrictionNotifications.h:76
catapult::state::AccountRestrictionDescriptor
Account restriction descriptor.
Definition: AccountRestrictionDescriptor.h:37
catapult::model::EntityType
EntityType
Enumeration of entity types.
Definition: EntityType.h:43
catapult::model::ModifyAccountRestrictionNotification::ModificationsPtr
const AccountRestrictionModification< TRestrictionValue > * ModificationsPtr
Const pointer to the first modification.
Definition: AccountRestrictionNotifications.h:157
catapult::model::ModifyAccountOperationRestrictionNotification
ModifyAccountRestrictionNotification< EntityType, RestrictionAccount_Operation_Modifications_Notification > ModifyAccountOperationRestrictionNotification
Definition: AccountRestrictionNotifications.h:168
catapult::UnresolvedMosaicId
utils::BaseValue< uint64_t, UnresolvedMosaicId_tag > UnresolvedMosaicId
Definition: src/catapult/types.h:82
catapult::model::ModifyAccountRestrictionNotification::ModificationsCount
uint8_t ModificationsCount
Number of modifications.
Definition: AccountRestrictionNotifications.h:154
catapult::model::ModifyAccountRestrictionValueNotification::Modification
AccountRestrictionModification< TRestrictionValue > Modification
Definition: AccountRestrictionNotifications.h:111
catapult::model::ModifyAccountRestrictionNotification::Key
catapult::Key Key
Account's public key.
Definition: AccountRestrictionNotifications.h:148
AccountRestrictionTypes.h
catapult::model::ModifyAccountMosaicRestrictionNotification
ModifyAccountRestrictionNotification< UnresolvedMosaicId, RestrictionAccount_Mosaic_Modifications_Notification > ModifyAccountMosaicRestrictionNotification
Definition: AccountRestrictionNotifications.h:165
catapult::model::ModifyAccountRestrictionNotification::AccountRestrictionDescriptor
state::AccountRestrictionDescriptor AccountRestrictionDescriptor
Account restriction descriptor.
Definition: AccountRestrictionNotifications.h:151
catapult::model::ModifyAccountRestrictionValueNotification
Notification of an account restriction value modification.
Definition: AccountRestrictionNotifications.h:85
catapult::model::ModifyAccountRestrictionNotification::Notification_Type
static constexpr auto Notification_Type
Matching notification type.
Definition: AccountRestrictionNotifications.h:130
catapult::model::ModifyAccountRestrictionValueNotification::Key
catapult::Key Key
Account's public key.
Definition: AccountRestrictionNotifications.h:104
catapult::model::ModifyAccountAddressRestrictionNotification
ModifyAccountRestrictionNotification< UnresolvedAddress, RestrictionAccount_Address_Modifications_Notification > ModifyAccountAddressRestrictionNotification
Definition: AccountRestrictionNotifications.h:162
Notifications.h
Validators.h
catapult::model::ModifyAccountRestrictionValueNotification::Notification_Type
static constexpr auto Notification_Type
Matching notification type.
Definition: AccountRestrictionNotifications.h:88
catapult::model::Notification
A basic notification.
Definition: Notifications.h:36
AccountRestrictionDescriptor.h
catapult::model::ModifyAccountRestrictionNotification
Notification of an account restriction modification.
Definition: AccountRestrictionNotifications.h:127
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::model::AccountRestrictionModification
Binary layout for an account restriction modification.
Definition: AccountRestrictionTypes.h:61
catapult::validators::DEFINE_ACCOUNT_RESTRICTION_MODIFICATION_TYPE_VALIDATOR
DEFINE_ACCOUNT_RESTRICTION_MODIFICATION_TYPE_VALIDATOR(AccountAddressRestrictionModificationTypes, model::ModifyAccountAddressRestrictionNotification, UnresolvedAddress) DEFINE_ACCOUNT_RESTRICTION_MODIFICATION_TYPE_VALIDATOR(AccountMosaicRestrictionModificationTypes
catapult::utils::ByteArray< Key_Size, Key_tag >
catapult::model::AccountRestrictionTypeNotification::Notification_Type
static constexpr auto Notification_Type
Matching notification type.
Definition: AccountRestrictionNotifications.h:65
catapult::model::CosignatoryModificationType::Del
Remove cosignatory.
catapult::model::AccountRestrictionTypeNotification
Notification of an account restriction type.
Definition: AccountRestrictionNotifications.h:62
catapult::model::ModifyAccountRestrictionValueNotification::AccountRestrictionDescriptor
state::AccountRestrictionDescriptor AccountRestrictionDescriptor
Account restriction descriptor.
Definition: AccountRestrictionNotifications.h:107
catapult::validators::UnresolvedMosaicId
UnresolvedMosaicId
Definition: AccountRestrictionRedundantModificationValidator.cpp:78