1- // This file is part of arduino-flasher-cli.
2- //
3- // Copyright 2025 ARDUINO SA (http://www.arduino.cc/)
4- //
5- // This software is released under the GNU General Public License version 3,
6- // which covers the main part of arduino-flasher-cli.
7- // The terms of this license can be found at:
8- // https://www.gnu.org/licenses/gpl-3.0.en.html
9- //
10- // You can be released from the requirements of the above licenses by purchasing
11- // a commercial license. Buying such a license is mandatory if you want to
12- // modify or otherwise use the software for commercial activities involving the
13- // Arduino software without disclosing the source code of your own applications.
14- // To purchase a commercial license, send an email to license@arduino.cc.
15-
16- syntax = "proto3" ;
17-
18- package cc.arduino.flasher.v1 ;
19-
20- import "cc/arduino/flasher/v1/common.proto" ;
21-
22- option go_package = "github.com/arduino/arduino-flasher-cli/rpc/cc/arduino/flasher/v1;flasher" ;
23-
24- service Flasher {
25- rpc List (ListRequest ) returns (ListResponse ) {};
26- rpc Download (DownloadRequest ) returns (stream DownloadResponse );
27- rpc Flash (FlashRequest ) returns (stream FlashResponse );
28- }
29-
30- message ListRequest {}
31-
32- message ListResponse {
33- repeated Release releases = 1 ;
34- }
35-
36- message Release {
37- string build_id = 1 ;
38- bool latest = 2 ;
39- }
40-
41- message DownloadRequest {
42- // The version of the Debian image to download.
43- // Use "latest" to download the latest.
44- string version = 1 ;
45- // The path in which the image will be downloaded.
46- string download_path = 2 ;
47- }
48-
49- message DownloadResponse {
50- message Result {
51- // Empty message, reserved for future expansion.
52- }
53- oneof message {
54- // Progress of the download.
55- DownloadProgress progress = 1 ;
56- // Download result.
57- Result result = 2 ;
58- }
59- }
60-
61- message FlashRequest {
62- // The version of the Debian image to download.
63- string version = 1 ;
64- // The path in which the image will be downloaded and extracted.
65- string temp_path = 2 ;
66- // Preserve user partition if possible.
67- bool preserve_user = 3 ;
68- }
69-
70- message FlashResponse {
71- message Result {
72- // Empty message, reserved for future expansion.
73- }
74- oneof message {
75- // Progress of the download.
76- DownloadProgress download_progress = 1 ;
77- // Progress of the extraction.
78- TaskProgress extraction_progress = 2 ;
79- // Progress of qdl flashing.
80- TaskProgress flash_progress = 3 ;
81- // Flashing result.
82- Result result = 4 ;
83- }
84- }
1+ // This file is part of arduino-flasher-cli.
2+ //
3+ // Copyright 2025 ARDUINO SA (http://www.arduino.cc/)
4+ //
5+ // This software is released under the GNU General Public License version 3,
6+ // which covers the main part of arduino-flasher-cli.
7+ // The terms of this license can be found at:
8+ // https://www.gnu.org/licenses/gpl-3.0.en.html
9+ //
10+ // You can be released from the requirements of the above licenses by purchasing
11+ // a commercial license. Buying such a license is mandatory if you want to
12+ // modify or otherwise use the software for commercial activities involving the
13+ // Arduino software without disclosing the source code of your own applications.
14+ // To purchase a commercial license, send an email to license@arduino.cc.
15+
16+ syntax = "proto3" ;
17+
18+ package cc.arduino.flasher.v1 ;
19+
20+ import "cc/arduino/flasher/v1/common.proto" ;
21+
22+ option go_package = "github.com/arduino/arduino-flasher-cli/rpc/cc/arduino/flasher/v1;flasher" ;
23+
24+ service Flasher {
25+ rpc List (ListRequest ) returns (ListResponse ) {};
26+ rpc Download (DownloadRequest ) returns (stream DownloadResponse );
27+ rpc Flash (FlashRequest ) returns (stream FlashResponse );
28+ }
29+
30+ message ListRequest {}
31+
32+ message ListResponse {
33+ repeated Release releases = 1 ;
34+ }
35+
36+ message Release {
37+ string build_id = 1 ;
38+ bool latest = 2 ;
39+ }
40+
41+ message DownloadRequest {
42+ // The version of the Debian image to download.
43+ // Use "latest" to download the latest.
44+ string version = 1 ;
45+ // The path in which the image will be downloaded.
46+ string download_path = 2 ;
47+ }
48+
49+ message DownloadResponse {
50+ message Result {
51+ // Empty message, reserved for future expansion.
52+ }
53+ oneof message {
54+ // Progress of the download.
55+ DownloadProgress progress = 1 ;
56+ // Download result.
57+ Result result = 2 ;
58+ }
59+ }
60+
61+ message FlashRequest {
62+ // The version of the Debian image to download.
63+ string version = 1 ;
64+ // The path in which the image will be downloaded and extracted.
65+ string temp_path = 2 ;
66+ // Preserve user partition if possible.
67+ bool preserve_user = 3 ;
68+ }
69+
70+ message FlashResponse {
71+ message Result {
72+ // Empty message, reserved for future expansion.
73+ }
74+ oneof message {
75+ // Progress of the download.
76+ DownloadProgress download_progress = 1 ;
77+ // Progress of the extraction.
78+ TaskProgress extraction_progress = 2 ;
79+ // Progress of qdl flashing.
80+ TaskProgress flash_progress = 3 ;
81+ // Flashing result.
82+ Result result = 4 ;
83+ }
84+ }
0 commit comments