mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-16 15:36:12 -04:00
nearby: snapshot of cl/317978613
Signed-off-by: Alexey Polyudov <apolyudov@google.com> Change-Id: I4bf367877a986910bb03e1c54aa972b4bcd59942
This commit is contained in:
@@ -16,6 +16,20 @@ namespace location {
|
||||
namespace nearby {
|
||||
namespace connections {
|
||||
|
||||
inline Pcp StrategyToPcp(Strategy strategy) {
|
||||
if (strategy == Strategy::kP2pCluster) return Pcp::kP2pCluster;
|
||||
if (strategy == Strategy::kP2pStar) return Pcp::kP2pStar;
|
||||
if (strategy == Strategy::kP2pPointToPoint) return Pcp::kP2pPointToPoint;
|
||||
return Pcp::kUnknown;
|
||||
}
|
||||
|
||||
inline Strategy PcpToStrategy(Pcp pcp) {
|
||||
if (pcp == Pcp::kP2pCluster) return Strategy::kP2pCluster;
|
||||
if (pcp == Pcp::kP2pStar) return Strategy::kP2pStar;
|
||||
if (pcp == Pcp::kP2pPointToPoint) return Strategy::kP2pPointToPoint;
|
||||
return Strategy::kNone;
|
||||
}
|
||||
|
||||
// Defines the set of methods that need to be implemented to handle the
|
||||
// per-PCP-specific operations in the OfflineServiceController.
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user