mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-14 14:46:12 -04:00
Fix link error when linking exe with core_adapter.dll.
PiperOrigin-RevId: 452222662
This commit is contained in:
@@ -12,10 +12,10 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "connections/clients/windows/strategy_w.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace location::nearby::windows {
|
||||
|
||||
const StrategyW StrategyW::kNone = {StrategyW::ConnectionType::kNone,
|
||||
@@ -28,6 +28,22 @@ const StrategyW StrategyW::kP2pPointToPoint{
|
||||
StrategyW::ConnectionType::kPointToPoint,
|
||||
StrategyW::TopologyType::kOneToOne};
|
||||
|
||||
// static
|
||||
const StrategyW& StrategyW::GetStrategyNone() { return StrategyW::kNone; }
|
||||
|
||||
// static
|
||||
const StrategyW& StrategyW::GetStrategyP2pCluster() {
|
||||
return StrategyW::kP2pCluster;
|
||||
}
|
||||
|
||||
// static
|
||||
const StrategyW& StrategyW::GetStrategyP2pStar() { return StrategyW::kP2pStar; }
|
||||
|
||||
// static
|
||||
const StrategyW& StrategyW::GetStrategyPointToPoint() {
|
||||
return StrategyW::kP2pPointToPoint;
|
||||
}
|
||||
|
||||
constexpr StrategyW::StrategyW() : StrategyW(kNone) {}
|
||||
|
||||
bool StrategyW::IsNone() const { return *this == kNone; }
|
||||
|
||||
@@ -32,6 +32,12 @@ class DLL_API StrategyW {
|
||||
constexpr StrategyW(const StrategyW&) = default;
|
||||
constexpr StrategyW& operator=(const StrategyW&) = default;
|
||||
|
||||
// Helper functions for exe to access static member variables in the dll.
|
||||
static const StrategyW& GetStrategyNone();
|
||||
static const StrategyW& GetStrategyP2pCluster();
|
||||
static const StrategyW& GetStrategyP2pStar();
|
||||
static const StrategyW& GetStrategyPointToPoint();
|
||||
|
||||
// Returns true, if strategy is kNone, false otherwise.
|
||||
bool IsNone() const;
|
||||
|
||||
@@ -42,7 +48,7 @@ class DLL_API StrategyW {
|
||||
// Returns a string representing given strategy, for every valid strategy.
|
||||
std::string GetName() const;
|
||||
|
||||
// Undefine strategy.
|
||||
// Undefined strategy.
|
||||
void Clear();
|
||||
friend bool operator==(const StrategyW& lhs, const StrategyW& rhs);
|
||||
friend bool operator!=(const StrategyW& lhs, const StrategyW& rhs);
|
||||
|
||||
Reference in New Issue
Block a user