blob: 989c33c22f7eb1673dfd3f1ef7f19938d9de7d23 [file] [log] [blame]
[email protected]69f5b1e62011-09-01 06:34:041// Copyright (c) 2011 The Chromium Authors. All rights reserved.
license.botbf09a502008-08-24 00:55:552// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
initial.commit09911bf2008-07-26 23:55:294
[email protected]8ff1d422009-07-07 21:31:395#ifndef PRINTING_PAGE_RANGE_H_
6#define PRINTING_PAGE_RANGE_H_
initial.commit09911bf2008-07-26 23:55:297
8#include <vector>
9
[email protected]69f5b1e62011-09-01 06:34:0410#include "printing_export.h"
11
initial.commit09911bf2008-07-26 23:55:2912namespace printing {
13
14struct PageRange;
15
16typedef std::vector<PageRange> PageRanges;
17
18// Print range is inclusive. To select one page, set from == to.
[email protected]69f5b1e62011-09-01 06:34:0419struct PRINTING_EXPORT PageRange {
initial.commit09911bf2008-07-26 23:55:2920 int from;
21 int to;
22
23 bool operator==(const PageRange& rhs) const {
24 return from == rhs.from && to == rhs.to;
25 }
26
27 // Retrieves the sorted list of unique pages in the page ranges.
28 static std::vector<int> GetPages(const PageRanges& ranges);
29};
30
31} // namespace printing
32
[email protected]8ff1d422009-07-07 21:31:3933#endif // PRINTING_PAGE_RANGE_H_