chromium/remoting/test/fake_connection_event_logger.cc

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

#include "remoting/test/fake_connection_event_logger.h"

#include <atomic>
#include <string>
#include <utility>

#include "base/functional/callback.h"
#include "base/memory/raw_ptr.h"
#include "base/time/time.h"
#include "remoting/proto/audio.pb.h"
#include "remoting/proto/control.pb.h"
#include "remoting/proto/video.pb.h"

namespace remoting {
namespace test {
namespace {

class MessageCounter {};

MessageCounter::MessageCounter(const char* name, const char* unit)
    :{}

MessageCounter::MessageCounter(const char* name)
    :{}

double MessageCounter::DurationSeconds() const {}

double MessageCounter::MessagesPerSecond() const {}
double MessageCounter::SizePerSecond() const {}

double MessageCounter::AverageMessageSize() const {}

void MessageCounter::LogMessage(
    const ::google::protobuf::MessageLite& message) {}

void MessageCounter::LogMessage(int size) {}

void MessageCounter::DisplayStatistics(std::ostream& os) {}

}  // namespace

// Analyzes messages from DeliverHostMessage function.
class FakeConnectionEventLogger::CounterClientStub
    : public protocol::ClientStub,
      public MessageCounter {};

FakeConnectionEventLogger::CounterClientStub::CounterClientStub()
    :{}

void FakeConnectionEventLogger::CounterClientStub::DeliverHostMessage(
    const protocol::ExtensionMessage& message) {}

// Analyzes messages from DeliverClientMessage function.
class FakeConnectionEventLogger::CounterHostStub : public protocol::HostStub,
                                                   public MessageCounter {};

FakeConnectionEventLogger::CounterHostStub::CounterHostStub()
    :{}

void FakeConnectionEventLogger::CounterHostStub::DeliverClientMessage(
    const protocol::ExtensionMessage& message) {}

// Analyzes messages from ProcessAudioPacket function.
class FakeConnectionEventLogger::CounterAudioStub : public protocol::AudioStub,
                                                    public MessageCounter {};

FakeConnectionEventLogger::CounterAudioStub::CounterAudioStub()
    :{}

void FakeConnectionEventLogger::CounterAudioStub::ProcessAudioPacket(
    std::unique_ptr<AudioPacket> audio_packet,
    base::OnceClosure done) {}

// Analyzes messages from ProcessVideoPacket function.
class FakeConnectionEventLogger::CounterVideoStub : public protocol::VideoStub,
                                                    public MessageCounter {};

FakeConnectionEventLogger::CounterVideoStub::CounterVideoStub(
    protocol::FakeConnectionToClient* connection)
    :{}

void FakeConnectionEventLogger::CounterVideoStub::DisplayStatistics(
    std::ostream& os) {}

void FakeConnectionEventLogger::CounterVideoStub::ProcessVideoPacket(
    std::unique_ptr<VideoPacket> video_packet,
    base::OnceClosure done) {}

FakeConnectionEventLogger::FakeConnectionEventLogger(
    protocol::FakeConnectionToClient* connection)
    :{}

FakeConnectionEventLogger::~FakeConnectionEventLogger() {}

protocol::ClientStub* FakeConnectionEventLogger::client_stub() {}

protocol::HostStub* FakeConnectionEventLogger::host_stub() {}

protocol::AudioStub* FakeConnectionEventLogger::audio_stub() {}

protocol::VideoStub* FakeConnectionEventLogger::video_stub() {}

std::ostream& operator<<(std::ostream& os,
                         const FakeConnectionEventLogger& logger) {}

}  // namespace test
}  // namespace remoting