chromium/third_party/inspector_protocol/crdtp/protocol_core.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 "protocol_core.h"

#include <algorithm>
#include <cassert>
#include <string>

namespace crdtp {

DeserializerState::DeserializerState(std::vector<uint8_t> bytes)
    :{}

DeserializerState::DeserializerState(Storage storage, span<uint8_t> span)
    :{}

void DeserializerState::RegisterError(Error error) {}

void DeserializerState::RegisterFieldPath(span<char> name) {}

std::string DeserializerState::ErrorMessage(span<char> message_name) const {}

Status DeserializerState::status() const {}

namespace {
constexpr int32_t GetMandatoryFieldMask(
    const DeserializerDescriptor::Field* fields,
    size_t count) {}
}  // namespace

DeserializerDescriptor::DeserializerDescriptor(const Field* fields,
                                               size_t field_count)
    :{}

bool DeserializerDescriptor::Deserialize(DeserializerState* state,
                                         void* obj) const {}

bool DeserializerDescriptor::DeserializeField(DeserializerState* state,
                                              span<char> name,
                                              int* seen_mandatory_fields,
                                              void* obj) const {}

bool ProtocolTypeTraits<bool>::Deserialize(DeserializerState* state,
                                           bool* value) {}

void ProtocolTypeTraits<bool>::Serialize(bool value,
                                         std::vector<uint8_t>* bytes) {}

bool ProtocolTypeTraits<int32_t>::Deserialize(DeserializerState* state,
                                              int32_t* value) {}

void ProtocolTypeTraits<int32_t>::Serialize(int32_t value,
                                            std::vector<uint8_t>* bytes) {}

ContainerSerializer::ContainerSerializer(std::vector<uint8_t>* bytes,
                                         uint8_t tag)
    :{}

void ContainerSerializer::EncodeStop() {}

ObjectSerializer::ObjectSerializer()
    :{}

ObjectSerializer::~ObjectSerializer() = default;

std::unique_ptr<Serializable> ObjectSerializer::Finish() {}

bool ProtocolTypeTraits<double>::Deserialize(DeserializerState* state,
                                             double* value) {}

void ProtocolTypeTraits<double>::Serialize(double value,
                                           std::vector<uint8_t>* bytes) {}

class IncomingDeferredMessage : public DeferredMessage {};

class OutgoingDeferredMessage : public DeferredMessage {};

// static
std::unique_ptr<DeferredMessage> DeferredMessage::FromSerializable(
    std::unique_ptr<Serializable> serializeable) {}

// static
std::unique_ptr<DeferredMessage> DeferredMessage::FromSpan(
    span<uint8_t> bytes) {}

bool ProtocolTypeTraits<std::unique_ptr<DeferredMessage>>::Deserialize(
    DeserializerState* state,
    std::unique_ptr<DeferredMessage>* value) {}

void ProtocolTypeTraits<std::unique_ptr<DeferredMessage>>::Serialize(
    const std::unique_ptr<DeferredMessage>& value,
    std::vector<uint8_t>* bytes) {}

}  // namespace crdtp