chromium/third_party/openscreen/src/cast/common/channel/message_util.cc

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

#include "cast/common/channel/message_util.h"

#include <sstream>
#include <utility>

#include "build/build_config.h"
#include "cast/common/channel/virtual_connection.h"
#include "util/enum_name_table.h"
#include "util/json/json_serialization.h"
#include "util/json/json_value.h"
#include "util/osp_logging.h"

#if BUILDFLAG(IS_APPLE)
#include <TargetConditionals.h>
#endif

namespace openscreen::cast {
namespace {

CastMessage;

// The value used for "sdkType" in a virtual CONNECT request. Historically, this
// value was used in Chrome's C++ impl even though "2" refers to the Media
// Router Extension.
constexpr int kVirtualConnectSdkType =;

// The value used for "connectionType" in a virtual CONNECT request. This value
// stands for CONNECTION_TYPE_LOCAL.
constexpr int kVirtualConnectTypeLocal =;

// The value to be set as the "platform" value in a virtual CONNECT request.
// Source (in Chromium source tree):
// src/third_party/metrics_proto/cast_logs.proto
enum VirtualConnectPlatformValue {};

constexpr VirtualConnectPlatformValue GetVirtualConnectPlatform() {}

CastMessage MakeConnectionMessage(const std::string& source_id,
                                  const std::string& destination_id) {}

}  // namespace

std::string ToString(AppAvailabilityResult availability) {}

CastMessage MakeSimpleUTF8Message(const std::string& namespace_,
                                  std::string payload) {}

CastMessage MakeConnectMessage(const std::string& source_id,
                               const std::string& destination_id) {}

CastMessage MakeCloseMessage(const std::string& source_id,
                             const std::string& destination_id) {}

std::string MakeUniqueSessionId(const char* prefix) {}

bool HasType(const Json::Value& object, CastMessageType type) {}

std::string ToString(const CastMessage& message) {}

constexpr EnumNameTable<CastMessageType, 25> kCastMessageTypeNames{};

const char* CastMessageTypeToString(CastMessageType type) {}

const std::string& GetPayload(const CastMessage& message) {}

}  // namespace openscreen::cast