chromium/third_party/ipcz/src/ipcz/local_router_link.cc

// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "ipcz/local_router_link.h"

#include <sstream>
#include <utility>

#include "ipcz/link_side.h"
#include "ipcz/link_type.h"
#include "ipcz/router.h"
#include "ipcz/router_link_state.h"
#include "third_party/abseil-cpp/absl/synchronization/mutex.h"
#include "util/ref_counted.h"

namespace ipcz {

// This object is shared between the two Routers on either end of a
// LocalRouterLink. The Routers access each other through references owned by
// this object.
class LocalRouterLink::SharedState
    : public RefCounted<LocalRouterLink::SharedState> {};

// static
RouterLink::Pair LocalRouterLink::CreatePair(LinkType type,
                                             const Router::Pair& routers,
                                             InitialState initial_state) {}

LocalRouterLink::LocalRouterLink(LinkSide side, Ref<SharedState> state)
    :{}

LocalRouterLink::~LocalRouterLink() = default;

LinkType LocalRouterLink::GetType() const {}

RouterLinkState* LocalRouterLink::GetLinkState() const {}

void LocalRouterLink::WaitForLinkStateAsync(std::function<void()> callback) {}

Ref<Router> LocalRouterLink::GetLocalPeer() {}

RemoteRouterLink* LocalRouterLink::AsRemoteRouterLink() {}

void LocalRouterLink::AllocateParcelData(size_t num_bytes,
                                         bool allow_partial,
                                         Parcel& parcel) {}

void LocalRouterLink::AcceptParcel(std::unique_ptr<Parcel> parcel) {}

void LocalRouterLink::AcceptRouteClosure(SequenceNumber sequence_length) {}

void LocalRouterLink::AcceptRouteDisconnected() {}

void LocalRouterLink::MarkSideStable() {}

bool LocalRouterLink::TryLockForBypass(const NodeName& bypass_request_source) {}

bool LocalRouterLink::TryLockForClosure() {}

void LocalRouterLink::Unlock() {}

bool LocalRouterLink::FlushOtherSideIfWaiting() {}

bool LocalRouterLink::CanNodeRequestBypass(
    const NodeName& bypass_request_source) {}

void LocalRouterLink::BypassPeer(const NodeName& bypass_target_node,
                                 SublinkId bypass_target_sublink) {}

void LocalRouterLink::StopProxying(SequenceNumber inbound_sequence_length,
                                   SequenceNumber outbound_sequence_length) {}

void LocalRouterLink::ProxyWillStop(SequenceNumber inbound_sequence_length) {}

void LocalRouterLink::BypassPeerWithLink(
    SublinkId new_sublink,
    FragmentRef<RouterLinkState> new_link_state,
    SequenceNumber inbound_sequence_length) {}

void LocalRouterLink::StopProxyingToLocalPeer(
    SequenceNumber outbound_sequence_length) {}

void LocalRouterLink::Deactivate() {}

std::string LocalRouterLink::Describe() const {}

}  // namespace ipcz