diff --git a/connections/clients/windows/listeners_w.h b/connections/clients/windows/listeners_w.h index dd3b62fb..cbda102b 100644 --- a/connections/clients/windows/listeners_w.h +++ b/connections/clients/windows/listeners_w.h @@ -36,17 +36,17 @@ namespace location::nearby { // Forward declarations namespace connections { struct ConnectionListener; -struct ConnectionListenerDeleter { +struct DLL_API ConnectionListenerDeleter { void operator()(connections::ConnectionListener* p); }; struct DiscoveryListener; -struct DiscoveryListenerDeleter { +struct DLL_API DiscoveryListenerDeleter { void operator()(connections::DiscoveryListener* p); }; struct PayloadListener; -struct PayloadListenerDeleter { +struct DLL_API PayloadListenerDeleter { void operator()(connections::PayloadListener* p); }; diff --git a/connections/clients/windows/strategy_w.cc b/connections/clients/windows/strategy_w.cc index d0836270..ee75f30e 100644 --- a/connections/clients/windows/strategy_w.cc +++ b/connections/clients/windows/strategy_w.cc @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include + #include "connections/clients/windows/strategy_w.h" namespace location::nearby::windows { @@ -26,6 +28,8 @@ const StrategyW StrategyW::kP2pPointToPoint{ StrategyW::ConnectionType::kPointToPoint, StrategyW::TopologyType::kOneToOne}; +constexpr StrategyW::StrategyW() : StrategyW(kNone) {} + bool StrategyW::IsNone() const { return *this == kNone; } bool StrategyW::IsValid() const { @@ -45,6 +49,8 @@ std::string StrategyW::GetName() const { return "UNKNOWN"; } +void StrategyW::Clear() { *this = kNone; } + bool operator==(const StrategyW& lhs, const StrategyW& rhs) { return lhs.connection_type_ == rhs.connection_type_ && lhs.topology_type_ == rhs.topology_type_; diff --git a/connections/clients/windows/strategy_w.h b/connections/clients/windows/strategy_w.h index 940dad48..02708c6a 100644 --- a/connections/clients/windows/strategy_w.h +++ b/connections/clients/windows/strategy_w.h @@ -28,7 +28,7 @@ class DLL_API StrategyW { static const StrategyW kP2pCluster; static const StrategyW kP2pStar; static const StrategyW kP2pPointToPoint; - constexpr StrategyW() : StrategyW(kNone) {} + constexpr StrategyW(); constexpr StrategyW(const StrategyW&) = default; constexpr StrategyW& operator=(const StrategyW&) = default; @@ -43,7 +43,7 @@ class DLL_API StrategyW { std::string GetName() const; // Undefine strategy. - void Clear() { *this = kNone; } + void Clear(); friend bool operator==(const StrategyW& lhs, const StrategyW& rhs); friend bool operator!=(const StrategyW& lhs, const StrategyW& rhs);