CatapultServer  v0.5.0.1 (Elephant)
ConnectionSecurityMode.h
Go to the documentation of this file.
1 
21 #pragma once
23 #include <iosfwd>
24 
25 namespace catapult { namespace ionet {
26 
27 #define CONNECTION_SECURITY_MODE_LIST \
28  /* Connection allows regular packets. */ \
29  ENUM_VALUE(None, 1) \
30  \
31  /* Connection only allows signed packets. */ \
32  ENUM_VALUE(Signed, 2)
33 
34 #define ENUM_VALUE(LABEL, VALUE) LABEL = VALUE,
35  enum class ConnectionSecurityMode : uint8_t {
38  };
39 #undef ENUM_VALUE
40 
42 
43 
44  std::ostream& operator<<(std::ostream& out, ConnectionSecurityMode value);
45 
47  bool TryParseValue(const std::string& str, ConnectionSecurityMode& modes);
48 }}
MAKE_BITWISE_ENUM
#define MAKE_BITWISE_ENUM(ENUM_TYPE)
Defines bitwise helpers for ENUM_TYPE.
Definition: BitwiseEnum.h:25
catapult::ionet::ConnectionSecurityMode
ConnectionSecurityMode
Possible connection security modes.
Definition: ConnectionSecurityMode.h:36
BitwiseEnum.h
catapult::ionet::ConnectionSecurityMode::CONNECTION_SECURITY_MODE_LIST
catapult::ionet::operator<<
std::ostream & operator<<(std::ostream &out, ConnectionSecurityMode value)
Insertion operator for outputting value to out.
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::ionet::TryParseValue
bool TryParseValue(const std::string &str, ConnectionSecurityMode &modes)
Tries to parse str into connection security modes.
Definition: IoEnums.cpp:72