File: printscanmgr_service.proto

package info (click to toggle)
chromium 139.0.7258.127-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 6,122,068 kB
  • sloc: cpp: 35,100,771; ansic: 7,163,530; javascript: 4,103,002; python: 1,436,920; asm: 946,517; xml: 746,709; pascal: 187,653; perl: 88,691; sh: 88,436; objc: 79,953; sql: 51,488; cs: 44,583; fortran: 24,137; makefile: 22,147; tcl: 15,277; php: 13,980; yacc: 8,984; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (128 lines) | stat: -rw-r--r-- 4,726 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
// Copyright 2023 The ChromiumOS Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

syntax = "proto3";
option optimize_for = LITE_RUNTIME;

// This file defines messages used for interacting with printscanmgr, the
// printing and scanning daemon.
package printscanmgr;
option go_package = "go.chromium.org/chromiumos/system_api/printscanmgr_proto";

// CupsAdd* results.
enum AddPrinterResult {
  ADD_PRINTER_RESULT_UNSPECIFIED = 0;
  ADD_PRINTER_RESULT_SUCCESS = 1;
  ADD_PRINTER_RESULT_CUPS_FATAL = 2;
  ADD_PRINTER_RESULT_CUPS_INVALID_PPD = 3;
  ADD_PRINTER_RESULT_CUPS_LPADMIN_FAILURE = 4;
  ADD_PRINTER_RESULT_CUPS_AUTOCONF_FAILURE = 5;
  ADD_PRINTER_RESULT_CUPS_BAD_URI = 6;
  ADD_PRINTER_RESULT_CUPS_IO_ERROR = 7;
  ADD_PRINTER_RESULT_CUPS_MEMORY_ALLOC_ERROR = 8;
  ADD_PRINTER_RESULT_CUPS_PRINTER_UNREACHABLE = 9;
  ADD_PRINTER_RESULT_CUPS_PRINTER_WRONG_RESPONSE = 10;
  ADD_PRINTER_RESULT_CUPS_PRINTER_NOT_AUTOCONF = 11;
  ADD_PRINTER_RESULT_DBUS_GENERIC = 12;
  ADD_PRINTER_RESULT_DBUS_NO_REPLY = 13;
  ADD_PRINTER_RESULT_DBUS_TIMEOUT = 14;
  ADD_PRINTER_RESULT_DBUS_ENCODING_FAILURE = 15;
};

// Input for the org.chromium.printscanmgr.CupsAddAutoConfiguredPrinter D-Bus
// method. Details the printer to be added to CUPS. The printer must be able to
// be configured automatically.
message CupsAddAutoConfiguredPrinterRequest {
  // Name of the printer to be added to CUPS.
  string name = 1;
  // URI of the printer to be added to CUPS.
  string uri = 2;
  // The user's language, expressed in "ll", "ll-CC", or "ll_CC" format. UTF-8
  // will always be used as the text encoding for printing-related strings.
  string language = 3;
}

// Output for the org.chromium.printscanmgr.CupsAddAutoConfiguredPrinter D-Bus
// method.
message CupsAddAutoConfiguredPrinterResponse {
  reserved 1;
  // Must not be `ADD_PRINTER_RESULT_UNSPECIFIED`.
  AddPrinterResult result = 2;
}

// Input for the org.chromium.printscanmgr.CupsAddManuallyConfiguredPrinter
// D-Bus method. Details the printer to be added to CUPS.
message CupsAddManuallyConfiguredPrinterRequest {
  // Name of the printer to be added to CUPS.
  string name = 1;
  // URI of the printer to be added to CUPS.
  string uri = 2;
  // Contents of the CUPS Postscript Printer Driver for the printer to be added
  // to CUPS. Can optionally be gzip compressed.
  bytes ppd_contents = 3;
  // The user's language, expressed in "ll", "ll-CC", or "ll_CC" format. UTF-8
  // will always be used as the text encoding for printing-related strings.
  string language = 4;
}

// Output for the org.chromium.printscanmgr.CupsAddManuallyConfiguredPrinter
// D-Bus method.
message CupsAddManuallyConfiguredPrinterResponse {
  reserved 1;
  // Must not be `ADD_PRINTER_RESULT_UNSPECIFIED`.
  AddPrinterResult result = 2;
}

// Input for the org.chromium.printscanmgr.CupsRemovePrinter D-Bus method.
// Details the printer to be removed from CUPS.
message CupsRemovePrinterRequest {
  // Name of the printer to be removed from CUPS.
  string name = 1;
}

// Output for the org.chromium.printscanmgr.CupsRemovePrinter D-Bus method.
message CupsRemovePrinterResponse {
  // `result` will be true if the printer was successfully removed from CUPS,
  // and false if an error occurred while attempting to remove the printer.
  bool result = 1;
}

// Input for the org.chromium.printscanmgr.CupsRetrievePpd D-Bus method. Details
// the printer whose PPD will be returned.
message CupsRetrievePpdRequest {
  // Name of the printer whose PPD will be returned.
  string name = 1;
}

// Output for the org.chromium.printscanmgr.CupsRetrievePpd D-Bus method.
message CupsRetrievePpdResponse {
  // `ppd` will be empty if an error occurred while attempting to retrieve the
  // PPD.
  bytes ppd = 1;
}

// Input for the org.chromium.printscanmgr.PrintscanDebugSetCategories D-Bus
// method. Details which categories to collect debug logs for.
message PrintscanDebugSetCategoriesRequest {
  // The different categories of debug logging which can be enabled.
  enum DebugLogCategory {
    DEBUG_LOG_CATEGORY_UNSPECIFIED = 0;
    DEBUG_LOG_CATEGORY_PRINTING = 1;
    DEBUG_LOG_CATEGORY_SCANNING = 2;
  };

  // Categories to enable debug logging for. Must not be
  // `DEBUG_LOG_CATEGORY_UNSPECIFIED`.
  repeated DebugLogCategory categories = 1;
  // If `disable_logging` is true, then `categories` will be ignored and all
  // printing and scanning debug logging will be disabled.
  bool disable_logging = 2;
}

// Output for the org.chromium.printscanmgr.PrintscanDebugSetCategories D-Bus
// method.
message PrintscanDebugSetCategoriesResponse {
  // Whether or not the debug logging was set correctly.
  bool result = 1;
}