chromium/components/cloud_devices/common/printer_description.h

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

#ifndef COMPONENTS_CLOUD_DEVICES_COMMON_PRINTER_DESCRIPTION_H_
#define COMPONENTS_CLOUD_DEVICES_COMMON_PRINTER_DESCRIPTION_H_

#include <stdint.h>

#include <string>
#include <vector>

#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "components/cloud_devices/common/description_items.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/size.h"

// Defines printer options, CDD and CJT items.
// https://developers.google.com/cloud-print/docs/cdd

namespace cloud_devices {

namespace printer {

struct SelectVendorCapabilityOption;
class SelectVendorCapabilityTraits;
SelectVendorCapability;

ContentType;

struct Copies {};

enum class DocumentSheetBack {};

enum class PwgDocumentTypeSupported {};

struct PwgRasterConfig {};

class RangeVendorCapability {};

struct SelectVendorCapabilityOption {};

class TypedValueVendorCapability {};

class VendorCapability {};

struct VendorItem {};

enum class ColorType {};

struct Color {};

enum class DuplexType {};

enum class OrientationType {};

enum class MarginsType {};

struct Margins {};

struct Dpi {};

enum class FitToPageType {};

enum class MediaSize {};

struct Media {};

// Builds `Media` structs. The caller must call at least one method that sets
// the name, and follow any special requirements described by the methods below.
//
// Note that the build result can be invalid, e.g. If the caller passes in an
// empty size or forgets to specify the size.
//
// Note that there is no requirement that the size corresponds to the
// `MediaSize`. e.g. `MediaSize::NA_LETTER` and a size of 100x200 is considered
// valid.
class MediaBuilder {};

struct Interval {};

PageRange;

struct MediaType {};

class ContentTypeTraits;
class PwgRasterConfigTraits;
class VendorCapabilityTraits;
class ColorTraits;
class DuplexTraits;
class OrientationTraits;
class MarginsTraits;
class DpiTraits;
class FitToPageTraits;
class MediaTraits;
class MediaTypeTraits;
class PageRangeTraits;
class CollateTraits;
class CopiesCapabilityTraits;
class CopiesTicketItemTraits;
class VendorItemTraits;

ContentTypesCapability;
PwgRasterConfigCapability;
VendorCapabilities;
ColorCapability;
DuplexCapability;
OrientationCapability;
MarginsCapability;
DpiCapability;
FitToPageCapability;
MediaCapability;
MediaTypeCapability;
CopiesCapability;
PageRangeCapability;
CollateCapability;
ReverseCapability;
#if BUILDFLAG(IS_CHROMEOS)
// This capability is not a part of standard CDD description. It's used for
// providing PIN printing opportunity in Chrome OS native printing.
typedef ValueCapability<bool, class PinTraits> PinCapability;
#endif  // BUILDFLAG(IS_CHROMEOS)

PwgRasterConfigTicketItem;
ColorTicketItem;
DuplexTicketItem;
OrientationTicketItem;
MarginsTicketItem;
DpiTicketItem;
FitToPageTicketItem;
MediaTicketItem;
CopiesTicketItem;
PageRangeTicketItem;
CollateTicketItem;
ReverseTicketItem;
VendorTicketItems;

}  // namespace printer

}  // namespace cloud_devices

#endif  // COMPONENTS_CLOUD_DEVICES_COMMON_PRINTER_DESCRIPTION_H_