blob: f9dff680427c93e5d9c020b79827203936ae4020 [file] [log] [blame]
// Copyright 2018 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <memory>
#include <set>
#include <lib/fxl/strings/string_view.h>
#include "peridot/lib/convert/convert.h"
namespace p2p_sync {
// DeviceMesh is used by PageCommunicators to communicate with the device mesh.
class DeviceMesh {
using DeviceSet = std::set<std::string, convert::StringViewComparator>;
DeviceMesh() {}
virtual ~DeviceMesh() {}
// Returns the current active device set.
virtual DeviceSet GetDeviceList() = 0;
// Sends the given buffer to a connected device.
virtual void Send(fxl::StringView device_name,
convert::ExtendedStringView data) = 0;
} // namespace p2p_sync