[M120 Migration][MM] Fix EME AD insert issue
[platform/framework/web/chromium-efl.git] / printing / printer_status.h
1 // Copyright 2020 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef PRINTING_PRINTER_STATUS_H_
6 #define PRINTING_PRINTER_STATUS_H_
7
8 #include <cups/cups.h>
9
10 #include <string>
11 #include <vector>
12
13 #include "base/component_export.h"
14
15 namespace printing {
16
17 // Represents the status of a printer containing the properties printer-state,
18 // printer-state-reasons, and printer-state-message.
19 struct COMPONENT_EXPORT(PRINTING_BASE) PrinterStatus {
20   struct PrinterReason {
21     // This enum is used to record UMA histogram values and should not be
22     // reordered. Please keep in sync with PrinterStatusReasons in
23     // src/tools/metrics/histograms/enums.xml.
24     enum class Reason {
25       kUnknownReason = 0,
26       kNone = 1,
27       kMediaNeeded = 2,
28       kMediaJam = 3,
29       kMovingToPaused = 4,
30       kPaused = 5,
31       kShutdown = 6,
32       kConnectingToDevice = 7,
33       kTimedOut = 8,
34       kStopping = 9,
35       kStoppedPartly = 10,
36       kTonerLow = 11,
37       kTonerEmpty = 12,
38       kSpoolAreaFull = 13,
39       kCoverOpen = 14,
40       kInterlockOpen = 15,
41       kDoorOpen = 16,
42       kInputTrayMissing = 17,
43       kMediaLow = 18,
44       kMediaEmpty = 19,
45       kOutputTrayMissing = 20,
46       kOutputAreaAlmostFull = 21,
47       kOutputAreaFull = 22,
48       kMarkerSupplyLow = 23,
49       kMarkerSupplyEmpty = 24,
50       kMarkerWasteAlmostFull = 25,
51       kMarkerWasteFull = 26,
52       kFuserOverTemp = 27,
53       kFuserUnderTemp = 28,
54       kOpcNearEol = 29,
55       kOpcLifeOver = 30,
56       kDeveloperLow = 31,
57       kDeveloperEmpty = 32,
58       kInterpreterResourceUnavailable = 33,
59       kCupsPkiExpired = 34,
60       kMaxValue = kCupsPkiExpired
61     };
62
63     // Severity of the state-reason.
64     enum class Severity {
65       kUnknownSeverity = 0,
66       kReport = 1,
67       kWarning = 2,
68       kError = 3,
69     };
70
71     Reason reason;
72     Severity severity;
73   };
74
75   PrinterStatus();
76   PrinterStatus(const PrinterStatus& other);
77   ~PrinterStatus();
78
79   // printer-state
80   ipp_pstate_t state;
81   // printer-state-reasons
82   std::vector<PrinterReason> reasons;
83   // printer-state-message
84   std::string message;
85 };
86
87 }  // namespace printing
88
89 #endif  // PRINTING_PRINTER_STATUS_H_