#ifndef PRINTING_PAGE_RANGE_H_
#define PRINTING_PAGE_RANGE_H_
#include <stdint.h>
#include <limits>
#include <vector>
#include "base/component_export.h"
namespace printing {
struct PageRange;
using PageRanges = std::vector<PageRange>;
struct COMPONENT_EXPORT(PRINTING_SETTINGS) PageRange {
static constexpr uint32_t kMaxPage = std::numeric_limits<uint32_t>::max() - 1;
uint32_t from;
uint32_t to;
bool operator<(const PageRange& rhs) const {
return from < rhs.from || (from == rhs.from && to < rhs.to);
}
bool operator==(const PageRange& rhs) const {
return from == rhs.from && to == rhs.to;
}
static void Normalize(PageRanges& ranges);
};
}
#endif