nearby: snapshot of cl/317978613

Signed-off-by: Alexey Polyudov <apolyudov@google.com>
Change-Id: I4bf367877a986910bb03e1c54aa972b4bcd59942
This commit is contained in:
Alexey Polyudov
2020-06-23 19:52:26 -07:00
parent 32828732ff
commit 6b27a508ed
164 changed files with 8663 additions and 1212 deletions
+14
View File
@@ -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.
//