chromium/remoting/host/file_transfer/rtc_log_file_operations.cc

// Copyright 2020 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/host/file_transfer/rtc_log_file_operations.h"

#include <algorithm>

#include "base/files/file_path.h"
#include "base/functional/bind.h"
#include "base/i18n/time_formatting.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/notreached.h"
#include "base/strings/stringprintf.h"
#include "base/task/sequenced_task_runner.h"
#include "base/time/time.h"
#include "remoting/protocol/connection_to_client.h"
#include "remoting/protocol/file_transfer_helpers.h"
#include "remoting/protocol/webrtc_event_log_data.h"

namespace remoting {

namespace {

class RtcLogFileReader : public FileOperations::Reader {};

// This class simply returns a protocol error if the client attempts to upload
// a file to this FileOperations implementation. The RTC log is download-only,
// and the upload code-path is never intended to be executed. This class is
// intended to gracefully return an error instead of crashing the host process.
class RtcLogFileWriter : public FileOperations::Writer {};

RtcLogFileReader::RtcLogFileReader(protocol::ConnectionToClient* connection)
    :{}
RtcLogFileReader::~RtcLogFileReader() = default;

void RtcLogFileReader::Open(OpenCallback callback) {}

void RtcLogFileReader::ReadChunk(std::size_t size, ReadCallback callback) {}

const base::FilePath& RtcLogFileReader::filename() const {}

std::uint64_t RtcLogFileReader::size() const {}

FileOperations::State RtcLogFileReader::state() const {}

void RtcLogFileReader::DoOpen(OpenCallback callback) {}

void RtcLogFileReader::DoReadChunk(std::size_t size, ReadCallback callback) {}

int RtcLogFileReader::ReadPartially(int maximum_to_read,
                                    std::vector<std::uint8_t>& output) {}

void RtcLogFileWriter::Open(const base::FilePath& filename, Callback callback) {}

void RtcLogFileWriter::WriteChunk(std::vector<std::uint8_t> data,
                                  Callback callback) {}

void RtcLogFileWriter::Close(Callback callback) {}

FileOperations::State RtcLogFileWriter::state() const {}

}  // namespace

RtcLogFileOperations::RtcLogFileOperations(
    protocol::ConnectionToClient* connection)
    :{}

RtcLogFileOperations::~RtcLogFileOperations() = default;

std::unique_ptr<FileOperations::Reader> RtcLogFileOperations::CreateReader() {}

std::unique_ptr<FileOperations::Writer> RtcLogFileOperations::CreateWriter() {}

}  // namespace remoting