diff --git a/include/opendht/default_types.h b/include/opendht/default_types.h index 99fd70bebcc60e602d8360c0224e1b0bf0791805..74ebf23602d877e9c24297bd46afd103a5991f8c 100644 --- a/include/opendht/default_types.h +++ b/include/opendht/default_types.h @@ -227,20 +227,8 @@ private: }; -const std::array<std::reference_wrapper<const ValueType>, 5> -DEFAULT_TYPES -{ - ValueType::USER_DATA, - DhtMessage::TYPE, - ImMessage::TYPE, - IceCandidates::TYPE, - TrustRequest::TYPE -}; +extern const std::array<std::reference_wrapper<const ValueType>, 5> DEFAULT_TYPES; -const std::array<std::reference_wrapper<const ValueType>, 1> -DEFAULT_INSECURE_TYPES -{ - IpServiceAnnouncement::TYPE -}; +extern const std::array<std::reference_wrapper<const ValueType>, 1> DEFAULT_INSECURE_TYPES; } diff --git a/src/default_types.cpp b/src/default_types.cpp index 05a1d4184a433f8f792e1c65749e5e505e73bc9c..a8521d0a09551dccdb043df29601e0b19b592e94 100644 --- a/src/default_types.cpp +++ b/src/default_types.cpp @@ -100,4 +100,21 @@ const ValueType ImMessage::TYPE = {3, "IM message", std::chrono::minutes(5)}; const ValueType TrustRequest::TYPE = {4, "Certificate trust request", std::chrono::hours(24*7)}; const ValueType IceCandidates::TYPE = {5, "ICE candidates", std::chrono::minutes(5)}; + +const std::array<std::reference_wrapper<const ValueType>, 5> +DEFAULT_TYPES +{ + ValueType::USER_DATA, + DhtMessage::TYPE, + ImMessage::TYPE, + IceCandidates::TYPE, + TrustRequest::TYPE +}; + +const std::array<std::reference_wrapper<const ValueType>, 1> +DEFAULT_INSECURE_TYPES +{ + IpServiceAnnouncement::TYPE +}; + }