File: update_engine.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 (168 lines) | stat: -rw-r--r-- 5,034 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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
// Copyright 2019 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;
option go_package = "go.chromium.org/chromiumos/system_api/update_engine_proto";

package update_engine;

// Keep in sync with:
// update_engine/client_library/include/update_engine/update_status.h
enum Operation {
  IDLE = 0;
  CHECKING_FOR_UPDATE = 1;
  UPDATE_AVAILABLE = 2;
  DOWNLOADING = 3;
  VERIFYING = 4;
  FINALIZING = 5;
  UPDATED_NEED_REBOOT = 6;
  REPORTING_ERROR_EVENT = 7;
  ATTEMPTING_ROLLBACK = 8;
  DISABLED = 9;
  NEED_PERMISSION_TO_UPDATE = 10;
  CLEANUP_PREVIOUS_UPDATE = 11;
  UPDATED_BUT_DEFERRED = 12;

  // ERROR is only used by Chrome and update_engine doesn't really use/set this
  // value as it is not the proper way to propagate errors. DO NOT use this
  // anywhere other than Chrome.
  // TODO(crbug.com/977320): Remove this from Chrome.
  ERROR = -1;
}

// Keep in sync with:
// update_engine/client_library/include/update_engine/update_status.h
enum UpdateUrgency {
  REGULAR = 0;
  CRITICAL = 1;
}

enum UpdateDoneAction {
  REBOOT = 0;
  SHUTDOWN = 1;
}

// This is the message transferred from other processes to update_engine for
// configuring the behavior of applying the deferred update.
message ApplyUpdateConfig {
  // The action to take after applying the deferred update.
  UpdateDoneAction done_action = 1;
}

message Feature {
  // The name of the feature.
  string name = 1;

  // Whether the feature is enabled or not.
  bool enabled = 2;
}

// This is the message transferred between update_engine and other processes
// about the current status of the update_engine. It is used either in
// |GetUpdateStatusAdvanced| DBus method or |StatusUpdateAdvanced| signal.
//
// NOTE: Keep this updated with:
// update_engine/client_library/include/update_engine/update_status.h
message StatusResult {
  // When the update_engine last checked for updates (time_t: seconds from Unix
  // epoch).
  int64 last_checked_time = 1;

  // The current progress (0.0f-1.0f).
  double progress = 2;

  // The current status/operation of the update_engine.
  Operation current_operation = 3;

  // The new product version.
  string new_version = 4;

  // The size of the update payload (bytes).
  int64 new_size = 5;

  // Whether the update is actually an enterprise rollback. The value is valid
  // only if the current_operation is passed |CHECKING_FOR_UPDATE|.
  bool is_enterprise_rollback = 6;

  // Indication of install for DLC(s).
  bool is_install = 7;

  // The end-of-life date of the device in the number of days since Unix Epoch.
  int64 eol_date = 8;

  // If true, the system will powerwash once the update is applied and the
  // system is rebooted. This value is reliable on |UPDATE_NEED_REBOOT|.
  bool will_powerwash_after_reboot = 9;

  // The last update/install attempt error.
  // Reference update_engine/dbus-constants.h for the errors that update_engine
  // will propagate into this field.
  int32 last_attempt_error = 10;

  // If true, the update is critical. DEPRECATED.
  // bool critical_update = 11;

  // Indicates how important an update is.
  UpdateUrgency update_urgency = 12;

  // List of features managed by update_engine.
  repeated Feature features = 13;

  // Whether the update is interactive.
  bool is_interactive = 14;

  // If true, the update will be downloaded but deferred.
  bool will_defer_update = 15;

  // The extended date of the device in the number of days since Unix Epoch.
  int64 extended_date = 16;

  // The extended opt in requirement for the device.
  bool extended_opt_in_required = 17;
}

// This is the message flags that influences how updates are performed.
message UpdateFlags {
  // Indicates if the update is interactive or not.
  bool non_interactive = 1;
}

// This is the message transferred into update_engine to perform updates in a
// certain manner.
message UpdateParams {
  // Version to update to. An empty string indicates that update engine should
  // pick the most recent image on the current channel.
  string app_version = 1;

  // The omaha URL to force. Usually leave empty.
  // Force update engine to look for updates from the given server. An empty
  // string indicates update engine should get this parameter from the release
  // file. This field will be ignored in production builds for security.
  string omaha_url = 2;

  // Additional fields that update_engine keeps track of during update requests.
  UpdateFlags update_flags = 3;

  // Checks for an update, but does not apply it.
  bool skip_applying = 4;

  // Forces a fw update with OS update.
  bool force_fw_update = 5;
}

message InstallParams {
  // ID of the DLC to install.
  string id = 1;

  // The Omaha URL to use. See `UpdateParams::omaha_url` for details.
  string omaha_url = 2;

  // Boolean indicating whether or not the DLC is scaled.
  bool scaled = 3;

  // Boolean indicating forced OTA installations.
  bool force_ota = 4;
}