File: device_mode.proto

package info (click to toggle)
fwupd 2.0.19-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 32,340 kB
  • sloc: ansic: 274,440; python: 11,468; xml: 9,432; sh: 1,625; makefile: 167; cpp: 19; asm: 11; javascript: 9
file content (191 lines) | stat: -rw-r--r-- 3,604 bytes parent folder | download | duplicates (2)
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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
/*
 * Copyright 1999-2023 Logitech, Inc.
 * All Rights Reserved
 *
 * SPDX-License-Identifier: LGPL-2.1-or-later
 */

syntax = "proto3";

package logi.device.proto;

option java_package = "com.logitech.vc.proto";

/**
 * Behavior change as of 1/28/2021 EE
 *   Kong sync-agent should not deprovision when this message is
 *   received.  If would just start forwarding events to PC when message is
 *   received.
 *
 * (Legacy)
 * Request to transition to device mode
 * Kong could be provisioned in Host mode.  This message
 * will ask Kong to deprovisioned/remove host mode provisioning
 * data.
 * This is to be included in UsbMsg

 * EXPECTED RESPONSE
 * TransitionToDeviceModeResponse
 */
message TransitionToDeviceModeRequest
{
	/**
	 * Unused. Reserved for future use.
	 */
	bool reserved = 1;

	/**
	 * The sender of request =>
	 * Possible values:
	 *  0 - PC (default)
	 *  1 - COS device
	 */
	int32 sender = 2;
}

/**
 * Request to transition to device mode response
 */
message TransitionToDeviceModeResponse
{
	/**
	 * boolean value to indicate Kong was able to transition to
	 * device mode.  If Kong is not provisioned, should just respond
	 * with true value.
	 * set to false if error was encountered during transition, and Kong
	 * wasn't able to transition (is this possible?)
	 */
	bool success = 1;

	/**
	 * the error in integer if success was false
	 */
	int32 error = 2;

	/**
	 * the error description
	 */
	string error_description = 3;
}

/**
 *  Added 1/28/2021 EE
 *  Request to deprovision Kong
 *  This request is sent by PC sync-agent when PC
 *   is provisioned.
 *  Kong sync-agent should deprovision (if provisioned)
 *
 * EXPECTED RESPONSE
 * SetDeprovisionResponse
 */
message SetDeprovisionRequest
{
	/**
	 * Unused. Reserved for future use.
	 */
	bool reserved = 1;
}

/**
 * Response to deprovision request
 */
message SetDeprovisionResponse
{
	/**
	 * boolean value to indicate Kong was able to deprovision Kong.
	 * If Kong is not provisioned, should just respond
	 * with true value.
	 * set to false if error was encountered during deprovisioning.
	 */
	bool success = 1;

	/**
	 * the error in integer if success was false
	 */
	int32 error = 2;

	/**
	 * the error description
	 */
	string error_description = 3;
}

/**
 *  Added 3/22/2021 EE
 *  For sending a certificate as data.  There are currently
 *   2 known certificate that will be transferred - Root CA, and 802.1x cert.
 *  Upon receipt, sync-agent should  verify using the supplied hash
 *   and write the data to the file system.
 *
 * EXPECTED RESPONSE
 * SendCertificateDataResponse
 */
message SendCertificateDataRequest
{
	/**
	 * The certificate type
	 */
	enum CertType {
		/**
		 * Reserved. Do not use.
		 */
		RESERVED = 0;
		/**
		 * Root CA
		 */
		ROOT_CA = 1;
		/**
		 * 802.1x cert
		 */
		NET_CONFIG = 2;
	}

	/**
	 * (REQUIRED)
	 * The certificate type
	 */
	CertType cert_type = 1;

	/**
	 * (REQUIRED)
	 * the certificate file name
	 */
	string file_name = 2;

	/**
	 * (REQUIRED)
	 * the certificate data
	 */
	bytes cert_data = 3;

	/**
	 * (REQUIRED)
	 * the certificate md5 hash
	 */
	string md5 = 4;
}

/**
 * Response to SendCertificateData Request
 */
message SendCertificateDataResponse
{
	/**
	 * (REQUIRED)
	 * boolean value to indicate data was received, hash verified .
	 * set to false if error was encountered during transfer and verification.
	 */
	bool success = 1;

	/**
	 * (OPTIONAL)
	 * the error in integer if success was false
	 */
	int32 error = 2;

	/**
	 * (OPTIONAL)
	 * the error description if there are errors
	 */
	string error_description = 3;
}