chromium/mojo/public/cpp/system/message.h

// 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.

#ifndef MOJO_PUBLIC_CPP_SYSTEM_MESSAGE_H_
#define MOJO_PUBLIC_CPP_SYSTEM_MESSAGE_H_

#include <limits>
#include <string_view>
#include <vector>

#include "base/numerics/safe_conversions.h"
#include "mojo/public/c/system/message_pipe.h"
#include "mojo/public/cpp/system/handle.h"

namespace mojo {

const MojoMessageHandle kInvalidMessageHandleValue =;

// Handle wrapper base class for a |MojoMessageHandle|.
class MessageHandle {};

ScopedMessageHandle;

inline MojoResult CreateMessage(ScopedMessageHandle* handle,
                                MojoCreateMessageFlags flags) {}

inline MojoResult GetMessageData(MessageHandle message,
                                 void** buffer,
                                 uint32_t* num_bytes,
                                 std::vector<ScopedHandle>* handles,
                                 MojoGetMessageDataFlags flags) {}

inline MojoResult NotifyBadMessage(MessageHandle message,
                                   const std::string_view& error) {}

}  // namespace mojo

#endif  // MOJO_PUBLIC_CPP_SYSTEM_MESSAGE_H_