chromium/ipc/ipc_message.cc

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

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "ipc/ipc_message.h"

#include <limits.h>
#include <stddef.h>
#include <stdint.h>

#include "base/atomic_sequence_num.h"
#include "base/containers/span.h"
#include "base/logging.h"
#include "base/pickle.h"
#include "base/trace_event/trace_event.h"
#include "build/build_config.h"
#include "ipc/ipc_message_attachment.h"
#include "ipc/ipc_message_attachment_set.h"

#if BUILDFLAG(IS_POSIX)
#include "base/file_descriptor_posix.h"
#include "ipc/ipc_platform_file_attachment_posix.h"
#endif

namespace {

base::AtomicSequenceNumber g_ref_num;

// Create a reference number for identifying IPC messages in traces. The return
// values has the reference number stored in the upper 24 bits, leaving the low
// 8 bits set to 0 for use as flags.
inline uint32_t GetRefNumUpper24() {}

}  // namespace

namespace IPC {

//------------------------------------------------------------------------------

Message::~Message() = default;

Message::Message() :{}

Message::Message(int32_t routing_id, uint32_t type, PriorityValue priority)
    :{}

Message::Message(const char* data, size_t data_len)
    :{}

Message::Message(const Message& other) :{}

void Message::Init() {}

Message& Message::operator=(const Message& other) {}

void Message::SetHeaderValues(int32_t routing, uint32_t type, uint32_t flags) {}

void Message::EnsureMessageAttachmentSet() {}

#if BUILDFLAG(IPC_MESSAGE_LOG_ENABLED)
void Message::set_sent_time(int64_t time) {}

int64_t Message::sent_time() const {}

void Message::set_received_time(int64_t time) const {}
#endif  // BUILDFLAG(IPC_MESSAGE_LOG_ENABLED)

Message::NextMessageInfo::NextMessageInfo()
    :{}
Message::NextMessageInfo::~NextMessageInfo() = default;

// static
void Message::FindNext(const char* range_start,
                       const char* range_end,
                       NextMessageInfo* info) {}

bool Message::WriteAttachment(
    scoped_refptr<base::Pickle::Attachment> attachment) {}

bool Message::ReadAttachment(
    base::PickleIterator* iter,
    scoped_refptr<base::Pickle::Attachment>* attachment) const {}

bool Message::HasAttachments() const {}

}  // namespace IPC