chromium/services/network/public/cpp/data_element.h

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

#ifndef SERVICES_NETWORK_PUBLIC_CPP_DATA_ELEMENT_H_
#define SERVICES_NETWORK_PUBLIC_CPP_DATA_ELEMENT_H_

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

#include <limits>
#include <memory>
#include <string_view>
#include <type_traits>
#include <utility>
#include <vector>

#include "base/component_export.h"
#include "base/files/file_path.h"
#include "base/notreached.h"
#include "base/time/time.h"
#include "base/types/strong_alias.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "services/network/public/mojom/chunked_data_pipe_getter.mojom-forward.h"
#include "services/network/public/mojom/data_pipe_getter.mojom-forward.h"
#include "services/network/public/mojom/url_request.mojom-shared.h"
#include "third_party/abseil-cpp/absl/types/variant.h"

namespace network {

// Represents a part of a request body consisting of bytes.
class COMPONENT_EXPORT(NETWORK_CPP_BASE) DataElementBytes final {};

// Represents a part of a request body consisting of a data pipe. This is
// typically used for blobs.
class COMPONENT_EXPORT(NETWORK_CPP_BASE) DataElementDataPipe final {};

// Represents a part of a request body consisting of a data pipe without a
// known size.
class COMPONENT_EXPORT(NETWORK_CPP_BASE) DataElementChunkedDataPipe final {};

// Represents a part of a request body consisting of (part of) a file.
class COMPONENT_EXPORT(NETWORK_CPP_BASE) DataElementFile final {};

// Represents part of an upload body. This is a union of various types defined
// above. See them for details.
class COMPONENT_EXPORT(NETWORK_CPP_BASE) DataElement {};

}  // namespace network

#endif  // SERVICES_NETWORK_PUBLIC_CPP_DATA_ELEMENT_H_