Regenerated TS RPC for daemon fork

This commit is contained in:
Christian Weichel 2019-05-07 09:35:54 +02:00
parent 45a17bc0f5
commit 95ed43c9c4
31 changed files with 14033 additions and 26 deletions

View File

@ -1 +0,0 @@
src/node/cli-protocol

View File

@ -1,7 +1,5 @@
#!/bin/bash
SCRIPT=`realpath -s $0`
SCRIPTPATH=`dirname $SCRIPT`
WORKDIR=/tmp/arduino-cli-protoc
echo "Working in $WORKDIR"
@ -9,7 +7,7 @@ echo "Working in $WORKDIR"
mkdir -p $WORKDIR
pushd $WORKDIR
if [ ! -d arduino-cli ]; then
git clone https://github.com/cmaglie/arduino-cli
git clone https://github.com/typefox/arduino-cli
cd arduino-cli
git checkout daemon
cd -

View File

@ -1,7 +1,7 @@
import * as React from 'react';
// TODO: make this `async`.
// import { Async } from 'react-select/lib/Async';
import { BoardsService, Board } from '../../common/protocol/boards-service';
import { BoardsService, AttachedBoard } from '../../common/protocol/boards-service';
export class ConnectedBoards extends React.Component<ConnectedBoards.Props, ConnectedBoards.State> {
@ -14,16 +14,13 @@ export class ConnectedBoards extends React.Component<ConnectedBoards.Props, Conn
}
componentDidMount(): void {
this.props.boardsService.connectedBoards().then(result => {
const { boards, current } = result;
this.setState({
boards,
current
})
this.props.boardsService.attachedBoards().then(result => {
const { boards } = result;
this.setState({ boards });
});
}
private select(boards: Board[] | undefined, current: Board | undefined): React.ReactNode {
private select(boards: AttachedBoard[] | undefined, current: AttachedBoard | undefined): React.ReactNode {
// Initial pessimistic.
const options = [<option>Loading...</option>];
if (boards) {
@ -52,8 +49,8 @@ export namespace ConnectedBoards {
}
export interface State {
boards?: Board[];
current?: Board;
boards?: AttachedBoard[];
current?: AttachedBoard;
}
export namespace Styles {

View File

@ -3,7 +3,7 @@ import { ArduinoComponent } from "./arduino-component";
export const BoardsServicePath = '/services/boards-service';
export const BoardsService = Symbol('BoardsService');
export interface BoardsService {
connectedBoards(): Promise<{ boards: Board[], current?: Board }>;
attachedBoards(): Promise<{ boards: AttachedBoard[] }>;
search(options: { query?: string }): Promise<{ items: Board[] }>;
install(board: Board): Promise<void>;
}
@ -11,3 +11,39 @@ export interface BoardsService {
export interface Board extends ArduinoComponent {
id: string;
}
export interface AttachedBoard {
name: string
fqbn?: string
}
export interface AttachedSerialBoard extends AttachedBoard {
port: string;
serialNumber: string;
productID: string;
vendorID: string;
}
export namespace AttachedSerialBoard {
export function is(b: AttachedBoard): b is AttachedSerialBoard {
return 'port' in b
&& 'serialNumber' in b
&& 'productID' in b
&& 'vendorID' in b;
}
}
export interface AttachedNetworkBoard extends AttachedBoard {
info: string;
address: string;
port: number;
}
export namespace AttachedNetworkBoard {
export function is(b: AttachedBoard): b is AttachedNetworkBoard {
return 'name' in b
&& 'info' in b
&& 'address' in b
&& 'port' in b;
}
}

View File

@ -1,7 +1,8 @@
import { injectable, inject } from 'inversify';
import { BoardsService, Board } from '../common/protocol/boards-service';
import { BoardsService, Board, AttachedBoard, AttachedSerialBoard, AttachedNetworkBoard } from '../common/protocol/boards-service';
import { PlatformSearchReq, PlatformSearchResp, PlatformInstallReq, PlatformInstallResp, PlatformListReq, PlatformListResp } from './cli-protocol/core_pb';
import { CoreClientProvider } from './core-client-provider';
import { BoardListReq, BoardListResp } from './cli-protocol/board_pb';
@injectable()
export class BoardsServiceImpl implements BoardsService {
@ -9,8 +10,30 @@ export class BoardsServiceImpl implements BoardsService {
@inject(CoreClientProvider)
protected readonly coreClientProvider: CoreClientProvider;
async connectedBoards(): Promise<{ boards: Board[], current?: Board }> {
return { boards: [] };
public async attachedBoards(): Promise<{ boards: AttachedBoard[] }> {
const { client, instance } = await this.coreClientProvider.getClient();
const req = new BoardListReq();
req.setInstance(instance);
const resp = await new Promise<BoardListResp>((resolve, reject) => client.boardList(req, (err, resp) => (!!err ? reject : resolve)(!!err ? err : resp)));
const serialBoards: AttachedBoard[] = resp.getSerialList().map(b => <AttachedSerialBoard>{
name: b.getName() || "unknown",
fqbn: b.getFqbn(),
port: b.getPort(),
serialNumber: b.getSerialnumber(),
productID: b.getProductid(),
vendorID: b.getVendorid()
});
const networkBoards: AttachedBoard[] = resp.getNetworkList().map(b => <AttachedNetworkBoard>{
name: b.getName(),
fqbn: b.getFqbn(),
address: b.getAddress(),
info: b.getInfo(),
port: b.getPort(),
});
return { boards: serialBoards.concat(networkBoards) };
}
async search(options: { query?: string }): Promise<{ items: Board[] }> {

View File

@ -0,0 +1 @@
// GENERATED CODE -- NO SERVICES IN PROTO

View File

@ -0,0 +1,288 @@
// package: arduino
// file: board.proto
/* tslint:disable */
import * as jspb from "google-protobuf";
import * as common_pb from "./common_pb";
export class BoardDetailsReq extends jspb.Message {
hasInstance(): boolean;
clearInstance(): void;
getInstance(): common_pb.Instance | undefined;
setInstance(value?: common_pb.Instance): void;
getFqbn(): string;
setFqbn(value: string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): BoardDetailsReq.AsObject;
static toObject(includeInstance: boolean, msg: BoardDetailsReq): BoardDetailsReq.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: BoardDetailsReq, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): BoardDetailsReq;
static deserializeBinaryFromReader(message: BoardDetailsReq, reader: jspb.BinaryReader): BoardDetailsReq;
}
export namespace BoardDetailsReq {
export type AsObject = {
instance?: common_pb.Instance.AsObject,
fqbn: string,
}
}
export class BoardDetailsResp extends jspb.Message {
getName(): string;
setName(value: string): void;
clearConfigOptionsList(): void;
getConfigOptionsList(): Array<ConfigOption>;
setConfigOptionsList(value: Array<ConfigOption>): void;
addConfigOptions(value?: ConfigOption, index?: number): ConfigOption;
clearRequiredToolsList(): void;
getRequiredToolsList(): Array<RequiredTool>;
setRequiredToolsList(value: Array<RequiredTool>): void;
addRequiredTools(value?: RequiredTool, index?: number): RequiredTool;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): BoardDetailsResp.AsObject;
static toObject(includeInstance: boolean, msg: BoardDetailsResp): BoardDetailsResp.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: BoardDetailsResp, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): BoardDetailsResp;
static deserializeBinaryFromReader(message: BoardDetailsResp, reader: jspb.BinaryReader): BoardDetailsResp;
}
export namespace BoardDetailsResp {
export type AsObject = {
name: string,
configOptionsList: Array<ConfigOption.AsObject>,
requiredToolsList: Array<RequiredTool.AsObject>,
}
}
export class ConfigOption extends jspb.Message {
getOption(): string;
setOption(value: string): void;
getOptionLabel(): string;
setOptionLabel(value: string): void;
clearValuesList(): void;
getValuesList(): Array<ConfigValue>;
setValuesList(value: Array<ConfigValue>): void;
addValues(value?: ConfigValue, index?: number): ConfigValue;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): ConfigOption.AsObject;
static toObject(includeInstance: boolean, msg: ConfigOption): ConfigOption.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: ConfigOption, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): ConfigOption;
static deserializeBinaryFromReader(message: ConfigOption, reader: jspb.BinaryReader): ConfigOption;
}
export namespace ConfigOption {
export type AsObject = {
option: string,
optionLabel: string,
valuesList: Array<ConfigValue.AsObject>,
}
}
export class ConfigValue extends jspb.Message {
getValue(): string;
setValue(value: string): void;
getValueLabel(): string;
setValueLabel(value: string): void;
getSelected(): boolean;
setSelected(value: boolean): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): ConfigValue.AsObject;
static toObject(includeInstance: boolean, msg: ConfigValue): ConfigValue.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: ConfigValue, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): ConfigValue;
static deserializeBinaryFromReader(message: ConfigValue, reader: jspb.BinaryReader): ConfigValue;
}
export namespace ConfigValue {
export type AsObject = {
value: string,
valueLabel: string,
selected: boolean,
}
}
export class RequiredTool extends jspb.Message {
getName(): string;
setName(value: string): void;
getVersion(): string;
setVersion(value: string): void;
getPackager(): string;
setPackager(value: string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): RequiredTool.AsObject;
static toObject(includeInstance: boolean, msg: RequiredTool): RequiredTool.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: RequiredTool, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): RequiredTool;
static deserializeBinaryFromReader(message: RequiredTool, reader: jspb.BinaryReader): RequiredTool;
}
export namespace RequiredTool {
export type AsObject = {
name: string,
version: string,
packager: string,
}
}
export class BoardListReq extends jspb.Message {
hasInstance(): boolean;
clearInstance(): void;
getInstance(): common_pb.Instance | undefined;
setInstance(value?: common_pb.Instance): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): BoardListReq.AsObject;
static toObject(includeInstance: boolean, msg: BoardListReq): BoardListReq.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: BoardListReq, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): BoardListReq;
static deserializeBinaryFromReader(message: BoardListReq, reader: jspb.BinaryReader): BoardListReq;
}
export namespace BoardListReq {
export type AsObject = {
instance?: common_pb.Instance.AsObject,
}
}
export class BoardListResp extends jspb.Message {
clearSerialList(): void;
getSerialList(): Array<AttachedSerialBoard>;
setSerialList(value: Array<AttachedSerialBoard>): void;
addSerial(value?: AttachedSerialBoard, index?: number): AttachedSerialBoard;
clearNetworkList(): void;
getNetworkList(): Array<AttachedNetworkBoard>;
setNetworkList(value: Array<AttachedNetworkBoard>): void;
addNetwork(value?: AttachedNetworkBoard, index?: number): AttachedNetworkBoard;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): BoardListResp.AsObject;
static toObject(includeInstance: boolean, msg: BoardListResp): BoardListResp.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: BoardListResp, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): BoardListResp;
static deserializeBinaryFromReader(message: BoardListResp, reader: jspb.BinaryReader): BoardListResp;
}
export namespace BoardListResp {
export type AsObject = {
serialList: Array<AttachedSerialBoard.AsObject>,
networkList: Array<AttachedNetworkBoard.AsObject>,
}
}
export class AttachedNetworkBoard extends jspb.Message {
getName(): string;
setName(value: string): void;
getFqbn(): string;
setFqbn(value: string): void;
getInfo(): string;
setInfo(value: string): void;
getAddress(): string;
setAddress(value: string): void;
getPort(): number;
setPort(value: number): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): AttachedNetworkBoard.AsObject;
static toObject(includeInstance: boolean, msg: AttachedNetworkBoard): AttachedNetworkBoard.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: AttachedNetworkBoard, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): AttachedNetworkBoard;
static deserializeBinaryFromReader(message: AttachedNetworkBoard, reader: jspb.BinaryReader): AttachedNetworkBoard;
}
export namespace AttachedNetworkBoard {
export type AsObject = {
name: string,
fqbn: string,
info: string,
address: string,
port: number,
}
}
export class AttachedSerialBoard extends jspb.Message {
getName(): string;
setName(value: string): void;
getFqbn(): string;
setFqbn(value: string): void;
getPort(): string;
setPort(value: string): void;
getSerialnumber(): string;
setSerialnumber(value: string): void;
getProductid(): string;
setProductid(value: string): void;
getVendorid(): string;
setVendorid(value: string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): AttachedSerialBoard.AsObject;
static toObject(includeInstance: boolean, msg: AttachedSerialBoard): AttachedSerialBoard.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: AttachedSerialBoard, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): AttachedSerialBoard;
static deserializeBinaryFromReader(message: AttachedSerialBoard, reader: jspb.BinaryReader): AttachedSerialBoard;
}
export namespace AttachedSerialBoard {
export type AsObject = {
name: string,
fqbn: string,
port: string,
serialnumber: string,
productid: string,
vendorid: string,
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,330 @@
// package: arduino
// file: commands.proto
/* tslint:disable */
import * as grpc from "grpc";
import * as commands_pb from "./commands_pb";
import * as common_pb from "./common_pb";
import * as board_pb from "./board_pb";
import * as compile_pb from "./compile_pb";
import * as core_pb from "./core_pb";
import * as upload_pb from "./upload_pb";
import * as lib_pb from "./lib_pb";
interface IArduinoCoreService extends grpc.ServiceDefinition<grpc.UntypedServiceImplementation> {
init: IArduinoCoreService_IInit;
destroy: IArduinoCoreService_IDestroy;
rescan: IArduinoCoreService_IRescan;
updateIndex: IArduinoCoreService_IUpdateIndex;
boardList: IArduinoCoreService_IBoardList;
boardDetails: IArduinoCoreService_IBoardDetails;
compile: IArduinoCoreService_ICompile;
platformInstall: IArduinoCoreService_IPlatformInstall;
platformDownload: IArduinoCoreService_IPlatformDownload;
platformUninstall: IArduinoCoreService_IPlatformUninstall;
platformUpgrade: IArduinoCoreService_IPlatformUpgrade;
upload: IArduinoCoreService_IUpload;
platformSearch: IArduinoCoreService_IPlatformSearch;
platformList: IArduinoCoreService_IPlatformList;
libraryDownload: IArduinoCoreService_ILibraryDownload;
libraryInstall: IArduinoCoreService_ILibraryInstall;
libraryUninstall: IArduinoCoreService_ILibraryUninstall;
libraryUpgradeAll: IArduinoCoreService_ILibraryUpgradeAll;
librarySearch: IArduinoCoreService_ILibrarySearch;
}
interface IArduinoCoreService_IInit extends grpc.MethodDefinition<commands_pb.InitReq, commands_pb.InitResp> {
path: string; // "/arduino.ArduinoCore/Init"
requestStream: boolean; // false
responseStream: boolean; // false
requestSerialize: grpc.serialize<commands_pb.InitReq>;
requestDeserialize: grpc.deserialize<commands_pb.InitReq>;
responseSerialize: grpc.serialize<commands_pb.InitResp>;
responseDeserialize: grpc.deserialize<commands_pb.InitResp>;
}
interface IArduinoCoreService_IDestroy extends grpc.MethodDefinition<commands_pb.DestroyReq, commands_pb.DestroyResp> {
path: string; // "/arduino.ArduinoCore/Destroy"
requestStream: boolean; // false
responseStream: boolean; // false
requestSerialize: grpc.serialize<commands_pb.DestroyReq>;
requestDeserialize: grpc.deserialize<commands_pb.DestroyReq>;
responseSerialize: grpc.serialize<commands_pb.DestroyResp>;
responseDeserialize: grpc.deserialize<commands_pb.DestroyResp>;
}
interface IArduinoCoreService_IRescan extends grpc.MethodDefinition<commands_pb.RescanReq, commands_pb.RescanResp> {
path: string; // "/arduino.ArduinoCore/Rescan"
requestStream: boolean; // false
responseStream: boolean; // false
requestSerialize: grpc.serialize<commands_pb.RescanReq>;
requestDeserialize: grpc.deserialize<commands_pb.RescanReq>;
responseSerialize: grpc.serialize<commands_pb.RescanResp>;
responseDeserialize: grpc.deserialize<commands_pb.RescanResp>;
}
interface IArduinoCoreService_IUpdateIndex extends grpc.MethodDefinition<commands_pb.UpdateIndexReq, commands_pb.UpdateIndexResp> {
path: string; // "/arduino.ArduinoCore/UpdateIndex"
requestStream: boolean; // false
responseStream: boolean; // true
requestSerialize: grpc.serialize<commands_pb.UpdateIndexReq>;
requestDeserialize: grpc.deserialize<commands_pb.UpdateIndexReq>;
responseSerialize: grpc.serialize<commands_pb.UpdateIndexResp>;
responseDeserialize: grpc.deserialize<commands_pb.UpdateIndexResp>;
}
interface IArduinoCoreService_IBoardList extends grpc.MethodDefinition<board_pb.BoardListReq, board_pb.BoardListResp> {
path: string; // "/arduino.ArduinoCore/BoardList"
requestStream: boolean; // false
responseStream: boolean; // false
requestSerialize: grpc.serialize<board_pb.BoardListReq>;
requestDeserialize: grpc.deserialize<board_pb.BoardListReq>;
responseSerialize: grpc.serialize<board_pb.BoardListResp>;
responseDeserialize: grpc.deserialize<board_pb.BoardListResp>;
}
interface IArduinoCoreService_IBoardDetails extends grpc.MethodDefinition<board_pb.BoardDetailsReq, board_pb.BoardDetailsResp> {
path: string; // "/arduino.ArduinoCore/BoardDetails"
requestStream: boolean; // false
responseStream: boolean; // false
requestSerialize: grpc.serialize<board_pb.BoardDetailsReq>;
requestDeserialize: grpc.deserialize<board_pb.BoardDetailsReq>;
responseSerialize: grpc.serialize<board_pb.BoardDetailsResp>;
responseDeserialize: grpc.deserialize<board_pb.BoardDetailsResp>;
}
interface IArduinoCoreService_ICompile extends grpc.MethodDefinition<compile_pb.CompileReq, compile_pb.CompileResp> {
path: string; // "/arduino.ArduinoCore/Compile"
requestStream: boolean; // false
responseStream: boolean; // true
requestSerialize: grpc.serialize<compile_pb.CompileReq>;
requestDeserialize: grpc.deserialize<compile_pb.CompileReq>;
responseSerialize: grpc.serialize<compile_pb.CompileResp>;
responseDeserialize: grpc.deserialize<compile_pb.CompileResp>;
}
interface IArduinoCoreService_IPlatformInstall extends grpc.MethodDefinition<core_pb.PlatformInstallReq, core_pb.PlatformInstallResp> {
path: string; // "/arduino.ArduinoCore/PlatformInstall"
requestStream: boolean; // false
responseStream: boolean; // true
requestSerialize: grpc.serialize<core_pb.PlatformInstallReq>;
requestDeserialize: grpc.deserialize<core_pb.PlatformInstallReq>;
responseSerialize: grpc.serialize<core_pb.PlatformInstallResp>;
responseDeserialize: grpc.deserialize<core_pb.PlatformInstallResp>;
}
interface IArduinoCoreService_IPlatformDownload extends grpc.MethodDefinition<core_pb.PlatformDownloadReq, core_pb.PlatformDownloadResp> {
path: string; // "/arduino.ArduinoCore/PlatformDownload"
requestStream: boolean; // false
responseStream: boolean; // true
requestSerialize: grpc.serialize<core_pb.PlatformDownloadReq>;
requestDeserialize: grpc.deserialize<core_pb.PlatformDownloadReq>;
responseSerialize: grpc.serialize<core_pb.PlatformDownloadResp>;
responseDeserialize: grpc.deserialize<core_pb.PlatformDownloadResp>;
}
interface IArduinoCoreService_IPlatformUninstall extends grpc.MethodDefinition<core_pb.PlatformUninstallReq, core_pb.PlatformUninstallResp> {
path: string; // "/arduino.ArduinoCore/PlatformUninstall"
requestStream: boolean; // false
responseStream: boolean; // true
requestSerialize: grpc.serialize<core_pb.PlatformUninstallReq>;
requestDeserialize: grpc.deserialize<core_pb.PlatformUninstallReq>;
responseSerialize: grpc.serialize<core_pb.PlatformUninstallResp>;
responseDeserialize: grpc.deserialize<core_pb.PlatformUninstallResp>;
}
interface IArduinoCoreService_IPlatformUpgrade extends grpc.MethodDefinition<core_pb.PlatformUpgradeReq, core_pb.PlatformUpgradeResp> {
path: string; // "/arduino.ArduinoCore/PlatformUpgrade"
requestStream: boolean; // false
responseStream: boolean; // true
requestSerialize: grpc.serialize<core_pb.PlatformUpgradeReq>;
requestDeserialize: grpc.deserialize<core_pb.PlatformUpgradeReq>;
responseSerialize: grpc.serialize<core_pb.PlatformUpgradeResp>;
responseDeserialize: grpc.deserialize<core_pb.PlatformUpgradeResp>;
}
interface IArduinoCoreService_IUpload extends grpc.MethodDefinition<upload_pb.UploadReq, upload_pb.UploadResp> {
path: string; // "/arduino.ArduinoCore/Upload"
requestStream: boolean; // false
responseStream: boolean; // true
requestSerialize: grpc.serialize<upload_pb.UploadReq>;
requestDeserialize: grpc.deserialize<upload_pb.UploadReq>;
responseSerialize: grpc.serialize<upload_pb.UploadResp>;
responseDeserialize: grpc.deserialize<upload_pb.UploadResp>;
}
interface IArduinoCoreService_IPlatformSearch extends grpc.MethodDefinition<core_pb.PlatformSearchReq, core_pb.PlatformSearchResp> {
path: string; // "/arduino.ArduinoCore/PlatformSearch"
requestStream: boolean; // false
responseStream: boolean; // false
requestSerialize: grpc.serialize<core_pb.PlatformSearchReq>;
requestDeserialize: grpc.deserialize<core_pb.PlatformSearchReq>;
responseSerialize: grpc.serialize<core_pb.PlatformSearchResp>;
responseDeserialize: grpc.deserialize<core_pb.PlatformSearchResp>;
}
interface IArduinoCoreService_IPlatformList extends grpc.MethodDefinition<core_pb.PlatformListReq, core_pb.PlatformListResp> {
path: string; // "/arduino.ArduinoCore/PlatformList"
requestStream: boolean; // false
responseStream: boolean; // false
requestSerialize: grpc.serialize<core_pb.PlatformListReq>;
requestDeserialize: grpc.deserialize<core_pb.PlatformListReq>;
responseSerialize: grpc.serialize<core_pb.PlatformListResp>;
responseDeserialize: grpc.deserialize<core_pb.PlatformListResp>;
}
interface IArduinoCoreService_ILibraryDownload extends grpc.MethodDefinition<lib_pb.LibraryDownloadReq, lib_pb.LibraryDownloadResp> {
path: string; // "/arduino.ArduinoCore/LibraryDownload"
requestStream: boolean; // false
responseStream: boolean; // true
requestSerialize: grpc.serialize<lib_pb.LibraryDownloadReq>;
requestDeserialize: grpc.deserialize<lib_pb.LibraryDownloadReq>;
responseSerialize: grpc.serialize<lib_pb.LibraryDownloadResp>;
responseDeserialize: grpc.deserialize<lib_pb.LibraryDownloadResp>;
}
interface IArduinoCoreService_ILibraryInstall extends grpc.MethodDefinition<lib_pb.LibraryInstallReq, lib_pb.LibraryInstallResp> {
path: string; // "/arduino.ArduinoCore/LibraryInstall"
requestStream: boolean; // false
responseStream: boolean; // true
requestSerialize: grpc.serialize<lib_pb.LibraryInstallReq>;
requestDeserialize: grpc.deserialize<lib_pb.LibraryInstallReq>;
responseSerialize: grpc.serialize<lib_pb.LibraryInstallResp>;
responseDeserialize: grpc.deserialize<lib_pb.LibraryInstallResp>;
}
interface IArduinoCoreService_ILibraryUninstall extends grpc.MethodDefinition<lib_pb.LibraryUninstallReq, lib_pb.LibraryUninstallResp> {
path: string; // "/arduino.ArduinoCore/LibraryUninstall"
requestStream: boolean; // false
responseStream: boolean; // true
requestSerialize: grpc.serialize<lib_pb.LibraryUninstallReq>;
requestDeserialize: grpc.deserialize<lib_pb.LibraryUninstallReq>;
responseSerialize: grpc.serialize<lib_pb.LibraryUninstallResp>;
responseDeserialize: grpc.deserialize<lib_pb.LibraryUninstallResp>;
}
interface IArduinoCoreService_ILibraryUpgradeAll extends grpc.MethodDefinition<lib_pb.LibraryUpgradeAllReq, lib_pb.LibraryUpgradeAllResp> {
path: string; // "/arduino.ArduinoCore/LibraryUpgradeAll"
requestStream: boolean; // false
responseStream: boolean; // true
requestSerialize: grpc.serialize<lib_pb.LibraryUpgradeAllReq>;
requestDeserialize: grpc.deserialize<lib_pb.LibraryUpgradeAllReq>;
responseSerialize: grpc.serialize<lib_pb.LibraryUpgradeAllResp>;
responseDeserialize: grpc.deserialize<lib_pb.LibraryUpgradeAllResp>;
}
interface IArduinoCoreService_ILibrarySearch extends grpc.MethodDefinition<lib_pb.LibrarySearchReq, lib_pb.LibrarySearchResp> {
path: string; // "/arduino.ArduinoCore/LibrarySearch"
requestStream: boolean; // false
responseStream: boolean; // false
requestSerialize: grpc.serialize<lib_pb.LibrarySearchReq>;
requestDeserialize: grpc.deserialize<lib_pb.LibrarySearchReq>;
responseSerialize: grpc.serialize<lib_pb.LibrarySearchResp>;
responseDeserialize: grpc.deserialize<lib_pb.LibrarySearchResp>;
}
export const ArduinoCoreService: IArduinoCoreService;
export interface IArduinoCoreServer {
init: grpc.handleUnaryCall<commands_pb.InitReq, commands_pb.InitResp>;
destroy: grpc.handleUnaryCall<commands_pb.DestroyReq, commands_pb.DestroyResp>;
rescan: grpc.handleUnaryCall<commands_pb.RescanReq, commands_pb.RescanResp>;
updateIndex: grpc.handleServerStreamingCall<commands_pb.UpdateIndexReq, commands_pb.UpdateIndexResp>;
boardList: grpc.handleUnaryCall<board_pb.BoardListReq, board_pb.BoardListResp>;
boardDetails: grpc.handleUnaryCall<board_pb.BoardDetailsReq, board_pb.BoardDetailsResp>;
compile: grpc.handleServerStreamingCall<compile_pb.CompileReq, compile_pb.CompileResp>;
platformInstall: grpc.handleServerStreamingCall<core_pb.PlatformInstallReq, core_pb.PlatformInstallResp>;
platformDownload: grpc.handleServerStreamingCall<core_pb.PlatformDownloadReq, core_pb.PlatformDownloadResp>;
platformUninstall: grpc.handleServerStreamingCall<core_pb.PlatformUninstallReq, core_pb.PlatformUninstallResp>;
platformUpgrade: grpc.handleServerStreamingCall<core_pb.PlatformUpgradeReq, core_pb.PlatformUpgradeResp>;
upload: grpc.handleServerStreamingCall<upload_pb.UploadReq, upload_pb.UploadResp>;
platformSearch: grpc.handleUnaryCall<core_pb.PlatformSearchReq, core_pb.PlatformSearchResp>;
platformList: grpc.handleUnaryCall<core_pb.PlatformListReq, core_pb.PlatformListResp>;
libraryDownload: grpc.handleServerStreamingCall<lib_pb.LibraryDownloadReq, lib_pb.LibraryDownloadResp>;
libraryInstall: grpc.handleServerStreamingCall<lib_pb.LibraryInstallReq, lib_pb.LibraryInstallResp>;
libraryUninstall: grpc.handleServerStreamingCall<lib_pb.LibraryUninstallReq, lib_pb.LibraryUninstallResp>;
libraryUpgradeAll: grpc.handleServerStreamingCall<lib_pb.LibraryUpgradeAllReq, lib_pb.LibraryUpgradeAllResp>;
librarySearch: grpc.handleUnaryCall<lib_pb.LibrarySearchReq, lib_pb.LibrarySearchResp>;
}
export interface IArduinoCoreClient {
init(request: commands_pb.InitReq, callback: (error: grpc.ServiceError | null, response: commands_pb.InitResp) => void): grpc.ClientUnaryCall;
init(request: commands_pb.InitReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_pb.InitResp) => void): grpc.ClientUnaryCall;
init(request: commands_pb.InitReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: commands_pb.InitResp) => void): grpc.ClientUnaryCall;
destroy(request: commands_pb.DestroyReq, callback: (error: grpc.ServiceError | null, response: commands_pb.DestroyResp) => void): grpc.ClientUnaryCall;
destroy(request: commands_pb.DestroyReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_pb.DestroyResp) => void): grpc.ClientUnaryCall;
destroy(request: commands_pb.DestroyReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: commands_pb.DestroyResp) => void): grpc.ClientUnaryCall;
rescan(request: commands_pb.RescanReq, callback: (error: grpc.ServiceError | null, response: commands_pb.RescanResp) => void): grpc.ClientUnaryCall;
rescan(request: commands_pb.RescanReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_pb.RescanResp) => void): grpc.ClientUnaryCall;
rescan(request: commands_pb.RescanReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: commands_pb.RescanResp) => void): grpc.ClientUnaryCall;
updateIndex(request: commands_pb.UpdateIndexReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_pb.UpdateIndexResp>;
updateIndex(request: commands_pb.UpdateIndexReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_pb.UpdateIndexResp>;
boardList(request: board_pb.BoardListReq, callback: (error: grpc.ServiceError | null, response: board_pb.BoardListResp) => void): grpc.ClientUnaryCall;
boardList(request: board_pb.BoardListReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: board_pb.BoardListResp) => void): grpc.ClientUnaryCall;
boardList(request: board_pb.BoardListReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: board_pb.BoardListResp) => void): grpc.ClientUnaryCall;
boardDetails(request: board_pb.BoardDetailsReq, callback: (error: grpc.ServiceError | null, response: board_pb.BoardDetailsResp) => void): grpc.ClientUnaryCall;
boardDetails(request: board_pb.BoardDetailsReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: board_pb.BoardDetailsResp) => void): grpc.ClientUnaryCall;
boardDetails(request: board_pb.BoardDetailsReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: board_pb.BoardDetailsResp) => void): grpc.ClientUnaryCall;
compile(request: compile_pb.CompileReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<compile_pb.CompileResp>;
compile(request: compile_pb.CompileReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<compile_pb.CompileResp>;
platformInstall(request: core_pb.PlatformInstallReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<core_pb.PlatformInstallResp>;
platformInstall(request: core_pb.PlatformInstallReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<core_pb.PlatformInstallResp>;
platformDownload(request: core_pb.PlatformDownloadReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<core_pb.PlatformDownloadResp>;
platformDownload(request: core_pb.PlatformDownloadReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<core_pb.PlatformDownloadResp>;
platformUninstall(request: core_pb.PlatformUninstallReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<core_pb.PlatformUninstallResp>;
platformUninstall(request: core_pb.PlatformUninstallReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<core_pb.PlatformUninstallResp>;
platformUpgrade(request: core_pb.PlatformUpgradeReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<core_pb.PlatformUpgradeResp>;
platformUpgrade(request: core_pb.PlatformUpgradeReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<core_pb.PlatformUpgradeResp>;
upload(request: upload_pb.UploadReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<upload_pb.UploadResp>;
upload(request: upload_pb.UploadReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<upload_pb.UploadResp>;
platformSearch(request: core_pb.PlatformSearchReq, callback: (error: grpc.ServiceError | null, response: core_pb.PlatformSearchResp) => void): grpc.ClientUnaryCall;
platformSearch(request: core_pb.PlatformSearchReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: core_pb.PlatformSearchResp) => void): grpc.ClientUnaryCall;
platformSearch(request: core_pb.PlatformSearchReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: core_pb.PlatformSearchResp) => void): grpc.ClientUnaryCall;
platformList(request: core_pb.PlatformListReq, callback: (error: grpc.ServiceError | null, response: core_pb.PlatformListResp) => void): grpc.ClientUnaryCall;
platformList(request: core_pb.PlatformListReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: core_pb.PlatformListResp) => void): grpc.ClientUnaryCall;
platformList(request: core_pb.PlatformListReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: core_pb.PlatformListResp) => void): grpc.ClientUnaryCall;
libraryDownload(request: lib_pb.LibraryDownloadReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<lib_pb.LibraryDownloadResp>;
libraryDownload(request: lib_pb.LibraryDownloadReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<lib_pb.LibraryDownloadResp>;
libraryInstall(request: lib_pb.LibraryInstallReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<lib_pb.LibraryInstallResp>;
libraryInstall(request: lib_pb.LibraryInstallReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<lib_pb.LibraryInstallResp>;
libraryUninstall(request: lib_pb.LibraryUninstallReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<lib_pb.LibraryUninstallResp>;
libraryUninstall(request: lib_pb.LibraryUninstallReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<lib_pb.LibraryUninstallResp>;
libraryUpgradeAll(request: lib_pb.LibraryUpgradeAllReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<lib_pb.LibraryUpgradeAllResp>;
libraryUpgradeAll(request: lib_pb.LibraryUpgradeAllReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<lib_pb.LibraryUpgradeAllResp>;
librarySearch(request: lib_pb.LibrarySearchReq, callback: (error: grpc.ServiceError | null, response: lib_pb.LibrarySearchResp) => void): grpc.ClientUnaryCall;
librarySearch(request: lib_pb.LibrarySearchReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lib_pb.LibrarySearchResp) => void): grpc.ClientUnaryCall;
librarySearch(request: lib_pb.LibrarySearchReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: lib_pb.LibrarySearchResp) => void): grpc.ClientUnaryCall;
}
export class ArduinoCoreClient extends grpc.Client implements IArduinoCoreClient {
constructor(address: string, credentials: grpc.ChannelCredentials, options?: object);
public init(request: commands_pb.InitReq, callback: (error: grpc.ServiceError | null, response: commands_pb.InitResp) => void): grpc.ClientUnaryCall;
public init(request: commands_pb.InitReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_pb.InitResp) => void): grpc.ClientUnaryCall;
public init(request: commands_pb.InitReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: commands_pb.InitResp) => void): grpc.ClientUnaryCall;
public destroy(request: commands_pb.DestroyReq, callback: (error: grpc.ServiceError | null, response: commands_pb.DestroyResp) => void): grpc.ClientUnaryCall;
public destroy(request: commands_pb.DestroyReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_pb.DestroyResp) => void): grpc.ClientUnaryCall;
public destroy(request: commands_pb.DestroyReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: commands_pb.DestroyResp) => void): grpc.ClientUnaryCall;
public rescan(request: commands_pb.RescanReq, callback: (error: grpc.ServiceError | null, response: commands_pb.RescanResp) => void): grpc.ClientUnaryCall;
public rescan(request: commands_pb.RescanReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_pb.RescanResp) => void): grpc.ClientUnaryCall;
public rescan(request: commands_pb.RescanReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: commands_pb.RescanResp) => void): grpc.ClientUnaryCall;
public updateIndex(request: commands_pb.UpdateIndexReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_pb.UpdateIndexResp>;
public updateIndex(request: commands_pb.UpdateIndexReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_pb.UpdateIndexResp>;
public boardList(request: board_pb.BoardListReq, callback: (error: grpc.ServiceError | null, response: board_pb.BoardListResp) => void): grpc.ClientUnaryCall;
public boardList(request: board_pb.BoardListReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: board_pb.BoardListResp) => void): grpc.ClientUnaryCall;
public boardList(request: board_pb.BoardListReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: board_pb.BoardListResp) => void): grpc.ClientUnaryCall;
public boardDetails(request: board_pb.BoardDetailsReq, callback: (error: grpc.ServiceError | null, response: board_pb.BoardDetailsResp) => void): grpc.ClientUnaryCall;
public boardDetails(request: board_pb.BoardDetailsReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: board_pb.BoardDetailsResp) => void): grpc.ClientUnaryCall;
public boardDetails(request: board_pb.BoardDetailsReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: board_pb.BoardDetailsResp) => void): grpc.ClientUnaryCall;
public compile(request: compile_pb.CompileReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<compile_pb.CompileResp>;
public compile(request: compile_pb.CompileReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<compile_pb.CompileResp>;
public platformInstall(request: core_pb.PlatformInstallReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<core_pb.PlatformInstallResp>;
public platformInstall(request: core_pb.PlatformInstallReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<core_pb.PlatformInstallResp>;
public platformDownload(request: core_pb.PlatformDownloadReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<core_pb.PlatformDownloadResp>;
public platformDownload(request: core_pb.PlatformDownloadReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<core_pb.PlatformDownloadResp>;
public platformUninstall(request: core_pb.PlatformUninstallReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<core_pb.PlatformUninstallResp>;
public platformUninstall(request: core_pb.PlatformUninstallReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<core_pb.PlatformUninstallResp>;
public platformUpgrade(request: core_pb.PlatformUpgradeReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<core_pb.PlatformUpgradeResp>;
public platformUpgrade(request: core_pb.PlatformUpgradeReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<core_pb.PlatformUpgradeResp>;
public upload(request: upload_pb.UploadReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<upload_pb.UploadResp>;
public upload(request: upload_pb.UploadReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<upload_pb.UploadResp>;
public platformSearch(request: core_pb.PlatformSearchReq, callback: (error: grpc.ServiceError | null, response: core_pb.PlatformSearchResp) => void): grpc.ClientUnaryCall;
public platformSearch(request: core_pb.PlatformSearchReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: core_pb.PlatformSearchResp) => void): grpc.ClientUnaryCall;
public platformSearch(request: core_pb.PlatformSearchReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: core_pb.PlatformSearchResp) => void): grpc.ClientUnaryCall;
public platformList(request: core_pb.PlatformListReq, callback: (error: grpc.ServiceError | null, response: core_pb.PlatformListResp) => void): grpc.ClientUnaryCall;
public platformList(request: core_pb.PlatformListReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: core_pb.PlatformListResp) => void): grpc.ClientUnaryCall;
public platformList(request: core_pb.PlatformListReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: core_pb.PlatformListResp) => void): grpc.ClientUnaryCall;
public libraryDownload(request: lib_pb.LibraryDownloadReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<lib_pb.LibraryDownloadResp>;
public libraryDownload(request: lib_pb.LibraryDownloadReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<lib_pb.LibraryDownloadResp>;
public libraryInstall(request: lib_pb.LibraryInstallReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<lib_pb.LibraryInstallResp>;
public libraryInstall(request: lib_pb.LibraryInstallReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<lib_pb.LibraryInstallResp>;
public libraryUninstall(request: lib_pb.LibraryUninstallReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<lib_pb.LibraryUninstallResp>;
public libraryUninstall(request: lib_pb.LibraryUninstallReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<lib_pb.LibraryUninstallResp>;
public libraryUpgradeAll(request: lib_pb.LibraryUpgradeAllReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<lib_pb.LibraryUpgradeAllResp>;
public libraryUpgradeAll(request: lib_pb.LibraryUpgradeAllReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<lib_pb.LibraryUpgradeAllResp>;
public librarySearch(request: lib_pb.LibrarySearchReq, callback: (error: grpc.ServiceError | null, response: lib_pb.LibrarySearchResp) => void): grpc.ClientUnaryCall;
public librarySearch(request: lib_pb.LibrarySearchReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lib_pb.LibrarySearchResp) => void): grpc.ClientUnaryCall;
public librarySearch(request: lib_pb.LibrarySearchReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: lib_pb.LibrarySearchResp) => void): grpc.ClientUnaryCall;
}

View File

@ -0,0 +1,673 @@
// GENERATED CODE -- DO NOT EDIT!
// Original file comments:
//
// This file is part of arduino-cli.
//
// Copyright 2018 ARDUINO SA (http://www.arduino.cc/)
//
// This software is released under the GNU General Public License version 3,
// which covers the main part of arduino-cli.
// The terms of this license can be found at:
// https://www.gnu.org/licenses/gpl-3.0.en.html
//
// You can be released from the requirements of the above licenses by purchasing
// a commercial license. Buying such a license is mandatory if you want to modify or
// otherwise use the software for commercial activities involving the Arduino
// software without disclosing the source code of your own applications. To purchase
// a commercial license, send an email to license@arduino.cc.
//
//
'use strict';
var grpc = require('grpc');
var commands_pb = require('./commands_pb.js');
var common_pb = require('./common_pb.js');
var board_pb = require('./board_pb.js');
var compile_pb = require('./compile_pb.js');
var core_pb = require('./core_pb.js');
var upload_pb = require('./upload_pb.js');
var lib_pb = require('./lib_pb.js');
function serialize_arduino_BoardDetailsReq(arg) {
if (!(arg instanceof board_pb.BoardDetailsReq)) {
throw new Error('Expected argument of type arduino.BoardDetailsReq');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_BoardDetailsReq(buffer_arg) {
return board_pb.BoardDetailsReq.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_BoardDetailsResp(arg) {
if (!(arg instanceof board_pb.BoardDetailsResp)) {
throw new Error('Expected argument of type arduino.BoardDetailsResp');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_BoardDetailsResp(buffer_arg) {
return board_pb.BoardDetailsResp.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_BoardListReq(arg) {
if (!(arg instanceof board_pb.BoardListReq)) {
throw new Error('Expected argument of type arduino.BoardListReq');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_BoardListReq(buffer_arg) {
return board_pb.BoardListReq.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_BoardListResp(arg) {
if (!(arg instanceof board_pb.BoardListResp)) {
throw new Error('Expected argument of type arduino.BoardListResp');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_BoardListResp(buffer_arg) {
return board_pb.BoardListResp.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_CompileReq(arg) {
if (!(arg instanceof compile_pb.CompileReq)) {
throw new Error('Expected argument of type arduino.CompileReq');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_CompileReq(buffer_arg) {
return compile_pb.CompileReq.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_CompileResp(arg) {
if (!(arg instanceof compile_pb.CompileResp)) {
throw new Error('Expected argument of type arduino.CompileResp');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_CompileResp(buffer_arg) {
return compile_pb.CompileResp.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_DestroyReq(arg) {
if (!(arg instanceof commands_pb.DestroyReq)) {
throw new Error('Expected argument of type arduino.DestroyReq');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_DestroyReq(buffer_arg) {
return commands_pb.DestroyReq.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_DestroyResp(arg) {
if (!(arg instanceof commands_pb.DestroyResp)) {
throw new Error('Expected argument of type arduino.DestroyResp');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_DestroyResp(buffer_arg) {
return commands_pb.DestroyResp.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_InitReq(arg) {
if (!(arg instanceof commands_pb.InitReq)) {
throw new Error('Expected argument of type arduino.InitReq');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_InitReq(buffer_arg) {
return commands_pb.InitReq.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_InitResp(arg) {
if (!(arg instanceof commands_pb.InitResp)) {
throw new Error('Expected argument of type arduino.InitResp');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_InitResp(buffer_arg) {
return commands_pb.InitResp.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_LibraryDownloadReq(arg) {
if (!(arg instanceof lib_pb.LibraryDownloadReq)) {
throw new Error('Expected argument of type arduino.LibraryDownloadReq');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_LibraryDownloadReq(buffer_arg) {
return lib_pb.LibraryDownloadReq.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_LibraryDownloadResp(arg) {
if (!(arg instanceof lib_pb.LibraryDownloadResp)) {
throw new Error('Expected argument of type arduino.LibraryDownloadResp');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_LibraryDownloadResp(buffer_arg) {
return lib_pb.LibraryDownloadResp.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_LibraryInstallReq(arg) {
if (!(arg instanceof lib_pb.LibraryInstallReq)) {
throw new Error('Expected argument of type arduino.LibraryInstallReq');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_LibraryInstallReq(buffer_arg) {
return lib_pb.LibraryInstallReq.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_LibraryInstallResp(arg) {
if (!(arg instanceof lib_pb.LibraryInstallResp)) {
throw new Error('Expected argument of type arduino.LibraryInstallResp');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_LibraryInstallResp(buffer_arg) {
return lib_pb.LibraryInstallResp.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_LibrarySearchReq(arg) {
if (!(arg instanceof lib_pb.LibrarySearchReq)) {
throw new Error('Expected argument of type arduino.LibrarySearchReq');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_LibrarySearchReq(buffer_arg) {
return lib_pb.LibrarySearchReq.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_LibrarySearchResp(arg) {
if (!(arg instanceof lib_pb.LibrarySearchResp)) {
throw new Error('Expected argument of type arduino.LibrarySearchResp');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_LibrarySearchResp(buffer_arg) {
return lib_pb.LibrarySearchResp.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_LibraryUninstallReq(arg) {
if (!(arg instanceof lib_pb.LibraryUninstallReq)) {
throw new Error('Expected argument of type arduino.LibraryUninstallReq');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_LibraryUninstallReq(buffer_arg) {
return lib_pb.LibraryUninstallReq.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_LibraryUninstallResp(arg) {
if (!(arg instanceof lib_pb.LibraryUninstallResp)) {
throw new Error('Expected argument of type arduino.LibraryUninstallResp');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_LibraryUninstallResp(buffer_arg) {
return lib_pb.LibraryUninstallResp.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_LibraryUpgradeAllReq(arg) {
if (!(arg instanceof lib_pb.LibraryUpgradeAllReq)) {
throw new Error('Expected argument of type arduino.LibraryUpgradeAllReq');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_LibraryUpgradeAllReq(buffer_arg) {
return lib_pb.LibraryUpgradeAllReq.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_LibraryUpgradeAllResp(arg) {
if (!(arg instanceof lib_pb.LibraryUpgradeAllResp)) {
throw new Error('Expected argument of type arduino.LibraryUpgradeAllResp');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_LibraryUpgradeAllResp(buffer_arg) {
return lib_pb.LibraryUpgradeAllResp.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_PlatformDownloadReq(arg) {
if (!(arg instanceof core_pb.PlatformDownloadReq)) {
throw new Error('Expected argument of type arduino.PlatformDownloadReq');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_PlatformDownloadReq(buffer_arg) {
return core_pb.PlatformDownloadReq.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_PlatformDownloadResp(arg) {
if (!(arg instanceof core_pb.PlatformDownloadResp)) {
throw new Error('Expected argument of type arduino.PlatformDownloadResp');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_PlatformDownloadResp(buffer_arg) {
return core_pb.PlatformDownloadResp.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_PlatformInstallReq(arg) {
if (!(arg instanceof core_pb.PlatformInstallReq)) {
throw new Error('Expected argument of type arduino.PlatformInstallReq');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_PlatformInstallReq(buffer_arg) {
return core_pb.PlatformInstallReq.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_PlatformInstallResp(arg) {
if (!(arg instanceof core_pb.PlatformInstallResp)) {
throw new Error('Expected argument of type arduino.PlatformInstallResp');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_PlatformInstallResp(buffer_arg) {
return core_pb.PlatformInstallResp.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_PlatformListReq(arg) {
if (!(arg instanceof core_pb.PlatformListReq)) {
throw new Error('Expected argument of type arduino.PlatformListReq');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_PlatformListReq(buffer_arg) {
return core_pb.PlatformListReq.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_PlatformListResp(arg) {
if (!(arg instanceof core_pb.PlatformListResp)) {
throw new Error('Expected argument of type arduino.PlatformListResp');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_PlatformListResp(buffer_arg) {
return core_pb.PlatformListResp.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_PlatformSearchReq(arg) {
if (!(arg instanceof core_pb.PlatformSearchReq)) {
throw new Error('Expected argument of type arduino.PlatformSearchReq');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_PlatformSearchReq(buffer_arg) {
return core_pb.PlatformSearchReq.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_PlatformSearchResp(arg) {
if (!(arg instanceof core_pb.PlatformSearchResp)) {
throw new Error('Expected argument of type arduino.PlatformSearchResp');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_PlatformSearchResp(buffer_arg) {
return core_pb.PlatformSearchResp.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_PlatformUninstallReq(arg) {
if (!(arg instanceof core_pb.PlatformUninstallReq)) {
throw new Error('Expected argument of type arduino.PlatformUninstallReq');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_PlatformUninstallReq(buffer_arg) {
return core_pb.PlatformUninstallReq.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_PlatformUninstallResp(arg) {
if (!(arg instanceof core_pb.PlatformUninstallResp)) {
throw new Error('Expected argument of type arduino.PlatformUninstallResp');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_PlatformUninstallResp(buffer_arg) {
return core_pb.PlatformUninstallResp.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_PlatformUpgradeReq(arg) {
if (!(arg instanceof core_pb.PlatformUpgradeReq)) {
throw new Error('Expected argument of type arduino.PlatformUpgradeReq');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_PlatformUpgradeReq(buffer_arg) {
return core_pb.PlatformUpgradeReq.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_PlatformUpgradeResp(arg) {
if (!(arg instanceof core_pb.PlatformUpgradeResp)) {
throw new Error('Expected argument of type arduino.PlatformUpgradeResp');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_PlatformUpgradeResp(buffer_arg) {
return core_pb.PlatformUpgradeResp.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_RescanReq(arg) {
if (!(arg instanceof commands_pb.RescanReq)) {
throw new Error('Expected argument of type arduino.RescanReq');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_RescanReq(buffer_arg) {
return commands_pb.RescanReq.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_RescanResp(arg) {
if (!(arg instanceof commands_pb.RescanResp)) {
throw new Error('Expected argument of type arduino.RescanResp');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_RescanResp(buffer_arg) {
return commands_pb.RescanResp.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_UpdateIndexReq(arg) {
if (!(arg instanceof commands_pb.UpdateIndexReq)) {
throw new Error('Expected argument of type arduino.UpdateIndexReq');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_UpdateIndexReq(buffer_arg) {
return commands_pb.UpdateIndexReq.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_UpdateIndexResp(arg) {
if (!(arg instanceof commands_pb.UpdateIndexResp)) {
throw new Error('Expected argument of type arduino.UpdateIndexResp');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_UpdateIndexResp(buffer_arg) {
return commands_pb.UpdateIndexResp.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_UploadReq(arg) {
if (!(arg instanceof upload_pb.UploadReq)) {
throw new Error('Expected argument of type arduino.UploadReq');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_UploadReq(buffer_arg) {
return upload_pb.UploadReq.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_UploadResp(arg) {
if (!(arg instanceof upload_pb.UploadResp)) {
throw new Error('Expected argument of type arduino.UploadResp');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_UploadResp(buffer_arg) {
return upload_pb.UploadResp.deserializeBinary(new Uint8Array(buffer_arg));
}
// The main Arduino Platform Service
var ArduinoCoreService = exports.ArduinoCoreService = {
// Start a new instance of the Arduino Core Service
init: {
path: '/arduino.ArduinoCore/Init',
requestStream: false,
responseStream: false,
requestType: commands_pb.InitReq,
responseType: commands_pb.InitResp,
requestSerialize: serialize_arduino_InitReq,
requestDeserialize: deserialize_arduino_InitReq,
responseSerialize: serialize_arduino_InitResp,
responseDeserialize: deserialize_arduino_InitResp,
},
// Destroy an instance of the Arduino Core Service
destroy: {
path: '/arduino.ArduinoCore/Destroy',
requestStream: false,
responseStream: false,
requestType: commands_pb.DestroyReq,
responseType: commands_pb.DestroyResp,
requestSerialize: serialize_arduino_DestroyReq,
requestDeserialize: deserialize_arduino_DestroyReq,
responseSerialize: serialize_arduino_DestroyResp,
responseDeserialize: deserialize_arduino_DestroyResp,
},
// Rescan instance of the Arduino Core Service
rescan: {
path: '/arduino.ArduinoCore/Rescan',
requestStream: false,
responseStream: false,
requestType: commands_pb.RescanReq,
responseType: commands_pb.RescanResp,
requestSerialize: serialize_arduino_RescanReq,
requestDeserialize: deserialize_arduino_RescanReq,
responseSerialize: serialize_arduino_RescanResp,
responseDeserialize: deserialize_arduino_RescanResp,
},
// Update package index of the Arduino Core Service
updateIndex: {
path: '/arduino.ArduinoCore/UpdateIndex',
requestStream: false,
responseStream: true,
requestType: commands_pb.UpdateIndexReq,
responseType: commands_pb.UpdateIndexResp,
requestSerialize: serialize_arduino_UpdateIndexReq,
requestDeserialize: deserialize_arduino_UpdateIndexReq,
responseSerialize: serialize_arduino_UpdateIndexResp,
responseDeserialize: deserialize_arduino_UpdateIndexResp,
},
// BOARD COMMANDS
// --------------
//
boardList: {
path: '/arduino.ArduinoCore/BoardList',
requestStream: false,
responseStream: false,
requestType: board_pb.BoardListReq,
responseType: board_pb.BoardListResp,
requestSerialize: serialize_arduino_BoardListReq,
requestDeserialize: deserialize_arduino_BoardListReq,
responseSerialize: serialize_arduino_BoardListResp,
responseDeserialize: deserialize_arduino_BoardListResp,
},
// Requests details about a board
boardDetails: {
path: '/arduino.ArduinoCore/BoardDetails',
requestStream: false,
responseStream: false,
requestType: board_pb.BoardDetailsReq,
responseType: board_pb.BoardDetailsResp,
requestSerialize: serialize_arduino_BoardDetailsReq,
requestDeserialize: deserialize_arduino_BoardDetailsReq,
responseSerialize: serialize_arduino_BoardDetailsResp,
responseDeserialize: deserialize_arduino_BoardDetailsResp,
},
compile: {
path: '/arduino.ArduinoCore/Compile',
requestStream: false,
responseStream: true,
requestType: compile_pb.CompileReq,
responseType: compile_pb.CompileResp,
requestSerialize: serialize_arduino_CompileReq,
requestDeserialize: deserialize_arduino_CompileReq,
responseSerialize: serialize_arduino_CompileResp,
responseDeserialize: deserialize_arduino_CompileResp,
},
platformInstall: {
path: '/arduino.ArduinoCore/PlatformInstall',
requestStream: false,
responseStream: true,
requestType: core_pb.PlatformInstallReq,
responseType: core_pb.PlatformInstallResp,
requestSerialize: serialize_arduino_PlatformInstallReq,
requestDeserialize: deserialize_arduino_PlatformInstallReq,
responseSerialize: serialize_arduino_PlatformInstallResp,
responseDeserialize: deserialize_arduino_PlatformInstallResp,
},
platformDownload: {
path: '/arduino.ArduinoCore/PlatformDownload',
requestStream: false,
responseStream: true,
requestType: core_pb.PlatformDownloadReq,
responseType: core_pb.PlatformDownloadResp,
requestSerialize: serialize_arduino_PlatformDownloadReq,
requestDeserialize: deserialize_arduino_PlatformDownloadReq,
responseSerialize: serialize_arduino_PlatformDownloadResp,
responseDeserialize: deserialize_arduino_PlatformDownloadResp,
},
platformUninstall: {
path: '/arduino.ArduinoCore/PlatformUninstall',
requestStream: false,
responseStream: true,
requestType: core_pb.PlatformUninstallReq,
responseType: core_pb.PlatformUninstallResp,
requestSerialize: serialize_arduino_PlatformUninstallReq,
requestDeserialize: deserialize_arduino_PlatformUninstallReq,
responseSerialize: serialize_arduino_PlatformUninstallResp,
responseDeserialize: deserialize_arduino_PlatformUninstallResp,
},
platformUpgrade: {
path: '/arduino.ArduinoCore/PlatformUpgrade',
requestStream: false,
responseStream: true,
requestType: core_pb.PlatformUpgradeReq,
responseType: core_pb.PlatformUpgradeResp,
requestSerialize: serialize_arduino_PlatformUpgradeReq,
requestDeserialize: deserialize_arduino_PlatformUpgradeReq,
responseSerialize: serialize_arduino_PlatformUpgradeResp,
responseDeserialize: deserialize_arduino_PlatformUpgradeResp,
},
upload: {
path: '/arduino.ArduinoCore/Upload',
requestStream: false,
responseStream: true,
requestType: upload_pb.UploadReq,
responseType: upload_pb.UploadResp,
requestSerialize: serialize_arduino_UploadReq,
requestDeserialize: deserialize_arduino_UploadReq,
responseSerialize: serialize_arduino_UploadResp,
responseDeserialize: deserialize_arduino_UploadResp,
},
platformSearch: {
path: '/arduino.ArduinoCore/PlatformSearch',
requestStream: false,
responseStream: false,
requestType: core_pb.PlatformSearchReq,
responseType: core_pb.PlatformSearchResp,
requestSerialize: serialize_arduino_PlatformSearchReq,
requestDeserialize: deserialize_arduino_PlatformSearchReq,
responseSerialize: serialize_arduino_PlatformSearchResp,
responseDeserialize: deserialize_arduino_PlatformSearchResp,
},
platformList: {
path: '/arduino.ArduinoCore/PlatformList',
requestStream: false,
responseStream: false,
requestType: core_pb.PlatformListReq,
responseType: core_pb.PlatformListResp,
requestSerialize: serialize_arduino_PlatformListReq,
requestDeserialize: deserialize_arduino_PlatformListReq,
responseSerialize: serialize_arduino_PlatformListResp,
responseDeserialize: deserialize_arduino_PlatformListResp,
},
libraryDownload: {
path: '/arduino.ArduinoCore/LibraryDownload',
requestStream: false,
responseStream: true,
requestType: lib_pb.LibraryDownloadReq,
responseType: lib_pb.LibraryDownloadResp,
requestSerialize: serialize_arduino_LibraryDownloadReq,
requestDeserialize: deserialize_arduino_LibraryDownloadReq,
responseSerialize: serialize_arduino_LibraryDownloadResp,
responseDeserialize: deserialize_arduino_LibraryDownloadResp,
},
libraryInstall: {
path: '/arduino.ArduinoCore/LibraryInstall',
requestStream: false,
responseStream: true,
requestType: lib_pb.LibraryInstallReq,
responseType: lib_pb.LibraryInstallResp,
requestSerialize: serialize_arduino_LibraryInstallReq,
requestDeserialize: deserialize_arduino_LibraryInstallReq,
responseSerialize: serialize_arduino_LibraryInstallResp,
responseDeserialize: deserialize_arduino_LibraryInstallResp,
},
libraryUninstall: {
path: '/arduino.ArduinoCore/LibraryUninstall',
requestStream: false,
responseStream: true,
requestType: lib_pb.LibraryUninstallReq,
responseType: lib_pb.LibraryUninstallResp,
requestSerialize: serialize_arduino_LibraryUninstallReq,
requestDeserialize: deserialize_arduino_LibraryUninstallReq,
responseSerialize: serialize_arduino_LibraryUninstallResp,
responseDeserialize: deserialize_arduino_LibraryUninstallResp,
},
libraryUpgradeAll: {
path: '/arduino.ArduinoCore/LibraryUpgradeAll',
requestStream: false,
responseStream: true,
requestType: lib_pb.LibraryUpgradeAllReq,
responseType: lib_pb.LibraryUpgradeAllResp,
requestSerialize: serialize_arduino_LibraryUpgradeAllReq,
requestDeserialize: deserialize_arduino_LibraryUpgradeAllReq,
responseSerialize: serialize_arduino_LibraryUpgradeAllResp,
responseDeserialize: deserialize_arduino_LibraryUpgradeAllResp,
},
librarySearch: {
path: '/arduino.ArduinoCore/LibrarySearch',
requestStream: false,
responseStream: false,
requestType: lib_pb.LibrarySearchReq,
responseType: lib_pb.LibrarySearchResp,
requestSerialize: serialize_arduino_LibrarySearchReq,
requestDeserialize: deserialize_arduino_LibrarySearchReq,
responseSerialize: serialize_arduino_LibrarySearchResp,
responseDeserialize: deserialize_arduino_LibrarySearchResp,
},
};
exports.ArduinoCoreClient = grpc.makeGenericClientConstructor(ArduinoCoreService);
// BOOTSTRAP COMMANDS
// -------------------

View File

@ -0,0 +1,249 @@
// package: arduino
// file: commands.proto
/* tslint:disable */
import * as jspb from "google-protobuf";
import * as common_pb from "./common_pb";
import * as board_pb from "./board_pb";
import * as compile_pb from "./compile_pb";
import * as core_pb from "./core_pb";
import * as upload_pb from "./upload_pb";
import * as lib_pb from "./lib_pb";
export class Configuration extends jspb.Message {
getDatadir(): string;
setDatadir(value: string): void;
getSketchbookdir(): string;
setSketchbookdir(value: string): void;
getDownloadsdir(): string;
setDownloadsdir(value: string): void;
clearBoardmanageradditionalurlsList(): void;
getBoardmanageradditionalurlsList(): Array<string>;
setBoardmanageradditionalurlsList(value: Array<string>): void;
addBoardmanageradditionalurls(value: string, index?: number): string;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): Configuration.AsObject;
static toObject(includeInstance: boolean, msg: Configuration): Configuration.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: Configuration, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): Configuration;
static deserializeBinaryFromReader(message: Configuration, reader: jspb.BinaryReader): Configuration;
}
export namespace Configuration {
export type AsObject = {
datadir: string,
sketchbookdir: string,
downloadsdir: string,
boardmanageradditionalurlsList: Array<string>,
}
}
export class InitReq extends jspb.Message {
hasConfiguration(): boolean;
clearConfiguration(): void;
getConfiguration(): Configuration | undefined;
setConfiguration(value?: Configuration): void;
getLibraryManagerOnly(): boolean;
setLibraryManagerOnly(value: boolean): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): InitReq.AsObject;
static toObject(includeInstance: boolean, msg: InitReq): InitReq.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: InitReq, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): InitReq;
static deserializeBinaryFromReader(message: InitReq, reader: jspb.BinaryReader): InitReq;
}
export namespace InitReq {
export type AsObject = {
configuration?: Configuration.AsObject,
libraryManagerOnly: boolean,
}
}
export class InitResp extends jspb.Message {
hasInstance(): boolean;
clearInstance(): void;
getInstance(): common_pb.Instance | undefined;
setInstance(value?: common_pb.Instance): void;
clearPlatformsIndexErrorsList(): void;
getPlatformsIndexErrorsList(): Array<string>;
setPlatformsIndexErrorsList(value: Array<string>): void;
addPlatformsIndexErrors(value: string, index?: number): string;
getLibrariesIndexError(): string;
setLibrariesIndexError(value: string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): InitResp.AsObject;
static toObject(includeInstance: boolean, msg: InitResp): InitResp.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: InitResp, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): InitResp;
static deserializeBinaryFromReader(message: InitResp, reader: jspb.BinaryReader): InitResp;
}
export namespace InitResp {
export type AsObject = {
instance?: common_pb.Instance.AsObject,
platformsIndexErrorsList: Array<string>,
librariesIndexError: string,
}
}
export class DestroyReq extends jspb.Message {
hasInstance(): boolean;
clearInstance(): void;
getInstance(): common_pb.Instance | undefined;
setInstance(value?: common_pb.Instance): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): DestroyReq.AsObject;
static toObject(includeInstance: boolean, msg: DestroyReq): DestroyReq.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: DestroyReq, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): DestroyReq;
static deserializeBinaryFromReader(message: DestroyReq, reader: jspb.BinaryReader): DestroyReq;
}
export namespace DestroyReq {
export type AsObject = {
instance?: common_pb.Instance.AsObject,
}
}
export class DestroyResp extends jspb.Message {
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): DestroyResp.AsObject;
static toObject(includeInstance: boolean, msg: DestroyResp): DestroyResp.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: DestroyResp, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): DestroyResp;
static deserializeBinaryFromReader(message: DestroyResp, reader: jspb.BinaryReader): DestroyResp;
}
export namespace DestroyResp {
export type AsObject = {
}
}
export class RescanReq extends jspb.Message {
hasInstance(): boolean;
clearInstance(): void;
getInstance(): common_pb.Instance | undefined;
setInstance(value?: common_pb.Instance): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): RescanReq.AsObject;
static toObject(includeInstance: boolean, msg: RescanReq): RescanReq.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: RescanReq, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): RescanReq;
static deserializeBinaryFromReader(message: RescanReq, reader: jspb.BinaryReader): RescanReq;
}
export namespace RescanReq {
export type AsObject = {
instance?: common_pb.Instance.AsObject,
}
}
export class RescanResp extends jspb.Message {
clearPlatformsIndexErrorsList(): void;
getPlatformsIndexErrorsList(): Array<string>;
setPlatformsIndexErrorsList(value: Array<string>): void;
addPlatformsIndexErrors(value: string, index?: number): string;
getLibrariesIndexError(): string;
setLibrariesIndexError(value: string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): RescanResp.AsObject;
static toObject(includeInstance: boolean, msg: RescanResp): RescanResp.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: RescanResp, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): RescanResp;
static deserializeBinaryFromReader(message: RescanResp, reader: jspb.BinaryReader): RescanResp;
}
export namespace RescanResp {
export type AsObject = {
platformsIndexErrorsList: Array<string>,
librariesIndexError: string,
}
}
export class UpdateIndexReq extends jspb.Message {
hasInstance(): boolean;
clearInstance(): void;
getInstance(): common_pb.Instance | undefined;
setInstance(value?: common_pb.Instance): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): UpdateIndexReq.AsObject;
static toObject(includeInstance: boolean, msg: UpdateIndexReq): UpdateIndexReq.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: UpdateIndexReq, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): UpdateIndexReq;
static deserializeBinaryFromReader(message: UpdateIndexReq, reader: jspb.BinaryReader): UpdateIndexReq;
}
export namespace UpdateIndexReq {
export type AsObject = {
instance?: common_pb.Instance.AsObject,
}
}
export class UpdateIndexResp extends jspb.Message {
hasDownloadProgress(): boolean;
clearDownloadProgress(): void;
getDownloadProgress(): common_pb.DownloadProgress | undefined;
setDownloadProgress(value?: common_pb.DownloadProgress): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): UpdateIndexResp.AsObject;
static toObject(includeInstance: boolean, msg: UpdateIndexResp): UpdateIndexResp.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: UpdateIndexResp, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): UpdateIndexResp;
static deserializeBinaryFromReader(message: UpdateIndexResp, reader: jspb.BinaryReader): UpdateIndexResp;
}
export namespace UpdateIndexResp {
export type AsObject = {
downloadProgress?: common_pb.DownloadProgress.AsObject,
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1 @@
// GENERATED CODE -- NO SERVICES IN PROTO

View File

@ -0,0 +1,93 @@
// package: arduino
// file: common.proto
/* tslint:disable */
import * as jspb from "google-protobuf";
export class Instance extends jspb.Message {
getId(): number;
setId(value: number): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): Instance.AsObject;
static toObject(includeInstance: boolean, msg: Instance): Instance.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: Instance, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): Instance;
static deserializeBinaryFromReader(message: Instance, reader: jspb.BinaryReader): Instance;
}
export namespace Instance {
export type AsObject = {
id: number,
}
}
export class DownloadProgress extends jspb.Message {
getUrl(): string;
setUrl(value: string): void;
getFile(): string;
setFile(value: string): void;
getTotalSize(): number;
setTotalSize(value: number): void;
getDownloaded(): number;
setDownloaded(value: number): void;
getCompleted(): boolean;
setCompleted(value: boolean): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): DownloadProgress.AsObject;
static toObject(includeInstance: boolean, msg: DownloadProgress): DownloadProgress.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: DownloadProgress, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): DownloadProgress;
static deserializeBinaryFromReader(message: DownloadProgress, reader: jspb.BinaryReader): DownloadProgress;
}
export namespace DownloadProgress {
export type AsObject = {
url: string,
file: string,
totalSize: number,
downloaded: number,
completed: boolean,
}
}
export class TaskProgress extends jspb.Message {
getName(): string;
setName(value: string): void;
getMessage(): string;
setMessage(value: string): void;
getCompleted(): boolean;
setCompleted(value: boolean): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): TaskProgress.AsObject;
static toObject(includeInstance: boolean, msg: TaskProgress): TaskProgress.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: TaskProgress, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): TaskProgress;
static deserializeBinaryFromReader(message: TaskProgress, reader: jspb.BinaryReader): TaskProgress;
}
export namespace TaskProgress {
export type AsObject = {
name: string,
message: string,
completed: boolean,
}
}

View File

@ -0,0 +1,609 @@
/**
* @fileoverview
* @enhanceable
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
goog.exportSymbol('proto.arduino.DownloadProgress', null, global);
goog.exportSymbol('proto.arduino.Instance', null, global);
goog.exportSymbol('proto.arduino.TaskProgress', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.arduino.Instance = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.arduino.Instance, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.arduino.Instance.displayName = 'proto.arduino.Instance';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.arduino.Instance.prototype.toObject = function(opt_includeInstance) {
return proto.arduino.Instance.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.arduino.Instance} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.arduino.Instance.toObject = function(includeInstance, msg) {
var f, obj = {
id: jspb.Message.getFieldWithDefault(msg, 1, 0)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.arduino.Instance}
*/
proto.arduino.Instance.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.arduino.Instance;
return proto.arduino.Instance.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.arduino.Instance} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.arduino.Instance}
*/
proto.arduino.Instance.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {number} */ (reader.readInt32());
msg.setId(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.arduino.Instance.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.arduino.Instance.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.arduino.Instance} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.arduino.Instance.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getId();
if (f !== 0) {
writer.writeInt32(
1,
f
);
}
};
/**
* optional int32 id = 1;
* @return {number}
*/
proto.arduino.Instance.prototype.getId = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/** @param {number} value */
proto.arduino.Instance.prototype.setId = function(value) {
jspb.Message.setProto3IntField(this, 1, value);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.arduino.DownloadProgress = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.arduino.DownloadProgress, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.arduino.DownloadProgress.displayName = 'proto.arduino.DownloadProgress';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.arduino.DownloadProgress.prototype.toObject = function(opt_includeInstance) {
return proto.arduino.DownloadProgress.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.arduino.DownloadProgress} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.arduino.DownloadProgress.toObject = function(includeInstance, msg) {
var f, obj = {
url: jspb.Message.getFieldWithDefault(msg, 1, ""),
file: jspb.Message.getFieldWithDefault(msg, 2, ""),
totalSize: jspb.Message.getFieldWithDefault(msg, 3, 0),
downloaded: jspb.Message.getFieldWithDefault(msg, 4, 0),
completed: jspb.Message.getFieldWithDefault(msg, 5, false)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.arduino.DownloadProgress}
*/
proto.arduino.DownloadProgress.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.arduino.DownloadProgress;
return proto.arduino.DownloadProgress.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.arduino.DownloadProgress} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.arduino.DownloadProgress}
*/
proto.arduino.DownloadProgress.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setUrl(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setFile(value);
break;
case 3:
var value = /** @type {number} */ (reader.readInt64());
msg.setTotalSize(value);
break;
case 4:
var value = /** @type {number} */ (reader.readInt64());
msg.setDownloaded(value);
break;
case 5:
var value = /** @type {boolean} */ (reader.readBool());
msg.setCompleted(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.arduino.DownloadProgress.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.arduino.DownloadProgress.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.arduino.DownloadProgress} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.arduino.DownloadProgress.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getUrl();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getFile();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getTotalSize();
if (f !== 0) {
writer.writeInt64(
3,
f
);
}
f = message.getDownloaded();
if (f !== 0) {
writer.writeInt64(
4,
f
);
}
f = message.getCompleted();
if (f) {
writer.writeBool(
5,
f
);
}
};
/**
* optional string url = 1;
* @return {string}
*/
proto.arduino.DownloadProgress.prototype.getUrl = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
proto.arduino.DownloadProgress.prototype.setUrl = function(value) {
jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string file = 2;
* @return {string}
*/
proto.arduino.DownloadProgress.prototype.getFile = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/** @param {string} value */
proto.arduino.DownloadProgress.prototype.setFile = function(value) {
jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional int64 total_size = 3;
* @return {number}
*/
proto.arduino.DownloadProgress.prototype.getTotalSize = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};
/** @param {number} value */
proto.arduino.DownloadProgress.prototype.setTotalSize = function(value) {
jspb.Message.setProto3IntField(this, 3, value);
};
/**
* optional int64 downloaded = 4;
* @return {number}
*/
proto.arduino.DownloadProgress.prototype.getDownloaded = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
};
/** @param {number} value */
proto.arduino.DownloadProgress.prototype.setDownloaded = function(value) {
jspb.Message.setProto3IntField(this, 4, value);
};
/**
* optional bool completed = 5;
* Note that Boolean fields may be set to 0/1 when serialized from a Java server.
* You should avoid comparisons like {@code val === true/false} in those cases.
* @return {boolean}
*/
proto.arduino.DownloadProgress.prototype.getCompleted = function() {
return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 5, false));
};
/** @param {boolean} value */
proto.arduino.DownloadProgress.prototype.setCompleted = function(value) {
jspb.Message.setProto3BooleanField(this, 5, value);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.arduino.TaskProgress = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.arduino.TaskProgress, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.arduino.TaskProgress.displayName = 'proto.arduino.TaskProgress';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.arduino.TaskProgress.prototype.toObject = function(opt_includeInstance) {
return proto.arduino.TaskProgress.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.arduino.TaskProgress} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.arduino.TaskProgress.toObject = function(includeInstance, msg) {
var f, obj = {
name: jspb.Message.getFieldWithDefault(msg, 1, ""),
message: jspb.Message.getFieldWithDefault(msg, 2, ""),
completed: jspb.Message.getFieldWithDefault(msg, 3, false)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.arduino.TaskProgress}
*/
proto.arduino.TaskProgress.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.arduino.TaskProgress;
return proto.arduino.TaskProgress.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.arduino.TaskProgress} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.arduino.TaskProgress}
*/
proto.arduino.TaskProgress.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setName(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setMessage(value);
break;
case 3:
var value = /** @type {boolean} */ (reader.readBool());
msg.setCompleted(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.arduino.TaskProgress.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.arduino.TaskProgress.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.arduino.TaskProgress} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.arduino.TaskProgress.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getName();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getMessage();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getCompleted();
if (f) {
writer.writeBool(
3,
f
);
}
};
/**
* optional string name = 1;
* @return {string}
*/
proto.arduino.TaskProgress.prototype.getName = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
proto.arduino.TaskProgress.prototype.setName = function(value) {
jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string message = 2;
* @return {string}
*/
proto.arduino.TaskProgress.prototype.getMessage = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/** @param {string} value */
proto.arduino.TaskProgress.prototype.setMessage = function(value) {
jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional bool completed = 3;
* Note that Boolean fields may be set to 0/1 when serialized from a Java server.
* You should avoid comparisons like {@code val === true/false} in those cases.
* @return {boolean}
*/
proto.arduino.TaskProgress.prototype.getCompleted = function() {
return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 3, false));
};
/** @param {boolean} value */
proto.arduino.TaskProgress.prototype.setCompleted = function(value) {
jspb.Message.setProto3BooleanField(this, 3, value);
};
goog.object.extend(exports, proto.arduino);

View File

@ -0,0 +1 @@
// GENERATED CODE -- NO SERVICES IN PROTO

View File

@ -0,0 +1,124 @@
// package: arduino
// file: compile.proto
/* tslint:disable */
import * as jspb from "google-protobuf";
import * as common_pb from "./common_pb";
export class CompileReq extends jspb.Message {
hasInstance(): boolean;
clearInstance(): void;
getInstance(): common_pb.Instance | undefined;
setInstance(value?: common_pb.Instance): void;
getFqbn(): string;
setFqbn(value: string): void;
getSketchpath(): string;
setSketchpath(value: string): void;
getShowproperties(): boolean;
setShowproperties(value: boolean): void;
getPreprocess(): boolean;
setPreprocess(value: boolean): void;
getBuildcachepath(): string;
setBuildcachepath(value: string): void;
getBuildpath(): string;
setBuildpath(value: string): void;
clearBuildpropertiesList(): void;
getBuildpropertiesList(): Array<string>;
setBuildpropertiesList(value: Array<string>): void;
addBuildproperties(value: string, index?: number): string;
getWarnings(): string;
setWarnings(value: string): void;
getVerbose(): boolean;
setVerbose(value: boolean): void;
getQuiet(): boolean;
setQuiet(value: boolean): void;
getVidpid(): string;
setVidpid(value: string): void;
getExportfile(): string;
setExportfile(value: string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): CompileReq.AsObject;
static toObject(includeInstance: boolean, msg: CompileReq): CompileReq.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: CompileReq, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): CompileReq;
static deserializeBinaryFromReader(message: CompileReq, reader: jspb.BinaryReader): CompileReq;
}
export namespace CompileReq {
export type AsObject = {
instance?: common_pb.Instance.AsObject,
fqbn: string,
sketchpath: string,
showproperties: boolean,
preprocess: boolean,
buildcachepath: string,
buildpath: string,
buildpropertiesList: Array<string>,
warnings: string,
verbose: boolean,
quiet: boolean,
vidpid: string,
exportfile: string,
}
}
export class CompileResp extends jspb.Message {
getOutStream(): Uint8Array | string;
getOutStream_asU8(): Uint8Array;
getOutStream_asB64(): string;
setOutStream(value: Uint8Array | string): void;
getErrStream(): Uint8Array | string;
getErrStream_asU8(): Uint8Array;
getErrStream_asB64(): string;
setErrStream(value: Uint8Array | string): void;
hasDownloadProgress(): boolean;
clearDownloadProgress(): void;
getDownloadProgress(): common_pb.DownloadProgress | undefined;
setDownloadProgress(value?: common_pb.DownloadProgress): void;
hasTaskProgress(): boolean;
clearTaskProgress(): void;
getTaskProgress(): common_pb.TaskProgress | undefined;
setTaskProgress(value?: common_pb.TaskProgress): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): CompileResp.AsObject;
static toObject(includeInstance: boolean, msg: CompileResp): CompileResp.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: CompileResp, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): CompileResp;
static deserializeBinaryFromReader(message: CompileResp, reader: jspb.BinaryReader): CompileResp;
}
export namespace CompileResp {
export type AsObject = {
outStream: Uint8Array | string,
errStream: Uint8Array | string,
downloadProgress?: common_pb.DownloadProgress.AsObject,
taskProgress?: common_pb.TaskProgress.AsObject,
}
}

View File

@ -0,0 +1,835 @@
/**
* @fileoverview
* @enhanceable
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
var common_pb = require('./common_pb.js');
goog.object.extend(proto, common_pb);
goog.exportSymbol('proto.arduino.CompileReq', null, global);
goog.exportSymbol('proto.arduino.CompileResp', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.arduino.CompileReq = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.arduino.CompileReq.repeatedFields_, null);
};
goog.inherits(proto.arduino.CompileReq, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.arduino.CompileReq.displayName = 'proto.arduino.CompileReq';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.arduino.CompileReq.repeatedFields_ = [8];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.arduino.CompileReq.prototype.toObject = function(opt_includeInstance) {
return proto.arduino.CompileReq.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.arduino.CompileReq} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.arduino.CompileReq.toObject = function(includeInstance, msg) {
var f, obj = {
instance: (f = msg.getInstance()) && common_pb.Instance.toObject(includeInstance, f),
fqbn: jspb.Message.getFieldWithDefault(msg, 2, ""),
sketchpath: jspb.Message.getFieldWithDefault(msg, 3, ""),
showproperties: jspb.Message.getFieldWithDefault(msg, 4, false),
preprocess: jspb.Message.getFieldWithDefault(msg, 5, false),
buildcachepath: jspb.Message.getFieldWithDefault(msg, 6, ""),
buildpath: jspb.Message.getFieldWithDefault(msg, 7, ""),
buildpropertiesList: jspb.Message.getRepeatedField(msg, 8),
warnings: jspb.Message.getFieldWithDefault(msg, 9, ""),
verbose: jspb.Message.getFieldWithDefault(msg, 10, false),
quiet: jspb.Message.getFieldWithDefault(msg, 11, false),
vidpid: jspb.Message.getFieldWithDefault(msg, 12, ""),
exportfile: jspb.Message.getFieldWithDefault(msg, 13, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.arduino.CompileReq}
*/
proto.arduino.CompileReq.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.arduino.CompileReq;
return proto.arduino.CompileReq.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.arduino.CompileReq} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.arduino.CompileReq}
*/
proto.arduino.CompileReq.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new common_pb.Instance;
reader.readMessage(value,common_pb.Instance.deserializeBinaryFromReader);
msg.setInstance(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setFqbn(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setSketchpath(value);
break;
case 4:
var value = /** @type {boolean} */ (reader.readBool());
msg.setShowproperties(value);
break;
case 5:
var value = /** @type {boolean} */ (reader.readBool());
msg.setPreprocess(value);
break;
case 6:
var value = /** @type {string} */ (reader.readString());
msg.setBuildcachepath(value);
break;
case 7:
var value = /** @type {string} */ (reader.readString());
msg.setBuildpath(value);
break;
case 8:
var value = /** @type {string} */ (reader.readString());
msg.addBuildproperties(value);
break;
case 9:
var value = /** @type {string} */ (reader.readString());
msg.setWarnings(value);
break;
case 10:
var value = /** @type {boolean} */ (reader.readBool());
msg.setVerbose(value);
break;
case 11:
var value = /** @type {boolean} */ (reader.readBool());
msg.setQuiet(value);
break;
case 12:
var value = /** @type {string} */ (reader.readString());
msg.setVidpid(value);
break;
case 13:
var value = /** @type {string} */ (reader.readString());
msg.setExportfile(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.arduino.CompileReq.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.arduino.CompileReq.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.arduino.CompileReq} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.arduino.CompileReq.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getInstance();
if (f != null) {
writer.writeMessage(
1,
f,
common_pb.Instance.serializeBinaryToWriter
);
}
f = message.getFqbn();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getSketchpath();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
f = message.getShowproperties();
if (f) {
writer.writeBool(
4,
f
);
}
f = message.getPreprocess();
if (f) {
writer.writeBool(
5,
f
);
}
f = message.getBuildcachepath();
if (f.length > 0) {
writer.writeString(
6,
f
);
}
f = message.getBuildpath();
if (f.length > 0) {
writer.writeString(
7,
f
);
}
f = message.getBuildpropertiesList();
if (f.length > 0) {
writer.writeRepeatedString(
8,
f
);
}
f = message.getWarnings();
if (f.length > 0) {
writer.writeString(
9,
f
);
}
f = message.getVerbose();
if (f) {
writer.writeBool(
10,
f
);
}
f = message.getQuiet();
if (f) {
writer.writeBool(
11,
f
);
}
f = message.getVidpid();
if (f.length > 0) {
writer.writeString(
12,
f
);
}
f = message.getExportfile();
if (f.length > 0) {
writer.writeString(
13,
f
);
}
};
/**
* optional Instance instance = 1;
* @return {?proto.arduino.Instance}
*/
proto.arduino.CompileReq.prototype.getInstance = function() {
return /** @type{?proto.arduino.Instance} */ (
jspb.Message.getWrapperField(this, common_pb.Instance, 1));
};
/** @param {?proto.arduino.Instance|undefined} value */
proto.arduino.CompileReq.prototype.setInstance = function(value) {
jspb.Message.setWrapperField(this, 1, value);
};
proto.arduino.CompileReq.prototype.clearInstance = function() {
this.setInstance(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.arduino.CompileReq.prototype.hasInstance = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional string fqbn = 2;
* @return {string}
*/
proto.arduino.CompileReq.prototype.getFqbn = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/** @param {string} value */
proto.arduino.CompileReq.prototype.setFqbn = function(value) {
jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional string sketchPath = 3;
* @return {string}
*/
proto.arduino.CompileReq.prototype.getSketchpath = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/** @param {string} value */
proto.arduino.CompileReq.prototype.setSketchpath = function(value) {
jspb.Message.setProto3StringField(this, 3, value);
};
/**
* optional bool showProperties = 4;
* Note that Boolean fields may be set to 0/1 when serialized from a Java server.
* You should avoid comparisons like {@code val === true/false} in those cases.
* @return {boolean}
*/
proto.arduino.CompileReq.prototype.getShowproperties = function() {
return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 4, false));
};
/** @param {boolean} value */
proto.arduino.CompileReq.prototype.setShowproperties = function(value) {
jspb.Message.setProto3BooleanField(this, 4, value);
};
/**
* optional bool preprocess = 5;
* Note that Boolean fields may be set to 0/1 when serialized from a Java server.
* You should avoid comparisons like {@code val === true/false} in those cases.
* @return {boolean}
*/
proto.arduino.CompileReq.prototype.getPreprocess = function() {
return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 5, false));
};
/** @param {boolean} value */
proto.arduino.CompileReq.prototype.setPreprocess = function(value) {
jspb.Message.setProto3BooleanField(this, 5, value);
};
/**
* optional string buildCachePath = 6;
* @return {string}
*/
proto.arduino.CompileReq.prototype.getBuildcachepath = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
};
/** @param {string} value */
proto.arduino.CompileReq.prototype.setBuildcachepath = function(value) {
jspb.Message.setProto3StringField(this, 6, value);
};
/**
* optional string buildPath = 7;
* @return {string}
*/
proto.arduino.CompileReq.prototype.getBuildpath = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
};
/** @param {string} value */
proto.arduino.CompileReq.prototype.setBuildpath = function(value) {
jspb.Message.setProto3StringField(this, 7, value);
};
/**
* repeated string buildProperties = 8;
* @return {!Array<string>}
*/
proto.arduino.CompileReq.prototype.getBuildpropertiesList = function() {
return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 8));
};
/** @param {!Array<string>} value */
proto.arduino.CompileReq.prototype.setBuildpropertiesList = function(value) {
jspb.Message.setField(this, 8, value || []);
};
/**
* @param {string} value
* @param {number=} opt_index
*/
proto.arduino.CompileReq.prototype.addBuildproperties = function(value, opt_index) {
jspb.Message.addToRepeatedField(this, 8, value, opt_index);
};
proto.arduino.CompileReq.prototype.clearBuildpropertiesList = function() {
this.setBuildpropertiesList([]);
};
/**
* optional string warnings = 9;
* @return {string}
*/
proto.arduino.CompileReq.prototype.getWarnings = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, ""));
};
/** @param {string} value */
proto.arduino.CompileReq.prototype.setWarnings = function(value) {
jspb.Message.setProto3StringField(this, 9, value);
};
/**
* optional bool verbose = 10;
* Note that Boolean fields may be set to 0/1 when serialized from a Java server.
* You should avoid comparisons like {@code val === true/false} in those cases.
* @return {boolean}
*/
proto.arduino.CompileReq.prototype.getVerbose = function() {
return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 10, false));
};
/** @param {boolean} value */
proto.arduino.CompileReq.prototype.setVerbose = function(value) {
jspb.Message.setProto3BooleanField(this, 10, value);
};
/**
* optional bool quiet = 11;
* Note that Boolean fields may be set to 0/1 when serialized from a Java server.
* You should avoid comparisons like {@code val === true/false} in those cases.
* @return {boolean}
*/
proto.arduino.CompileReq.prototype.getQuiet = function() {
return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 11, false));
};
/** @param {boolean} value */
proto.arduino.CompileReq.prototype.setQuiet = function(value) {
jspb.Message.setProto3BooleanField(this, 11, value);
};
/**
* optional string vidPid = 12;
* @return {string}
*/
proto.arduino.CompileReq.prototype.getVidpid = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, ""));
};
/** @param {string} value */
proto.arduino.CompileReq.prototype.setVidpid = function(value) {
jspb.Message.setProto3StringField(this, 12, value);
};
/**
* optional string exportFile = 13;
* @return {string}
*/
proto.arduino.CompileReq.prototype.getExportfile = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 13, ""));
};
/** @param {string} value */
proto.arduino.CompileReq.prototype.setExportfile = function(value) {
jspb.Message.setProto3StringField(this, 13, value);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.arduino.CompileResp = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.arduino.CompileResp, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.arduino.CompileResp.displayName = 'proto.arduino.CompileResp';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.arduino.CompileResp.prototype.toObject = function(opt_includeInstance) {
return proto.arduino.CompileResp.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.arduino.CompileResp} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.arduino.CompileResp.toObject = function(includeInstance, msg) {
var f, obj = {
outStream: msg.getOutStream_asB64(),
errStream: msg.getErrStream_asB64(),
downloadProgress: (f = msg.getDownloadProgress()) && common_pb.DownloadProgress.toObject(includeInstance, f),
taskProgress: (f = msg.getTaskProgress()) && common_pb.TaskProgress.toObject(includeInstance, f)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.arduino.CompileResp}
*/
proto.arduino.CompileResp.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.arduino.CompileResp;
return proto.arduino.CompileResp.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.arduino.CompileResp} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.arduino.CompileResp}
*/
proto.arduino.CompileResp.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setOutStream(value);
break;
case 2:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setErrStream(value);
break;
case 3:
var value = new common_pb.DownloadProgress;
reader.readMessage(value,common_pb.DownloadProgress.deserializeBinaryFromReader);
msg.setDownloadProgress(value);
break;
case 4:
var value = new common_pb.TaskProgress;
reader.readMessage(value,common_pb.TaskProgress.deserializeBinaryFromReader);
msg.setTaskProgress(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.arduino.CompileResp.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.arduino.CompileResp.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.arduino.CompileResp} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.arduino.CompileResp.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getOutStream_asU8();
if (f.length > 0) {
writer.writeBytes(
1,
f
);
}
f = message.getErrStream_asU8();
if (f.length > 0) {
writer.writeBytes(
2,
f
);
}
f = message.getDownloadProgress();
if (f != null) {
writer.writeMessage(
3,
f,
common_pb.DownloadProgress.serializeBinaryToWriter
);
}
f = message.getTaskProgress();
if (f != null) {
writer.writeMessage(
4,
f,
common_pb.TaskProgress.serializeBinaryToWriter
);
}
};
/**
* optional bytes out_stream = 1;
* @return {!(string|Uint8Array)}
*/
proto.arduino.CompileResp.prototype.getOutStream = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* optional bytes out_stream = 1;
* This is a type-conversion wrapper around `getOutStream()`
* @return {string}
*/
proto.arduino.CompileResp.prototype.getOutStream_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getOutStream()));
};
/**
* optional bytes out_stream = 1;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getOutStream()`
* @return {!Uint8Array}
*/
proto.arduino.CompileResp.prototype.getOutStream_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getOutStream()));
};
/** @param {!(string|Uint8Array)} value */
proto.arduino.CompileResp.prototype.setOutStream = function(value) {
jspb.Message.setProto3BytesField(this, 1, value);
};
/**
* optional bytes err_stream = 2;
* @return {!(string|Uint8Array)}
*/
proto.arduino.CompileResp.prototype.getErrStream = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* optional bytes err_stream = 2;
* This is a type-conversion wrapper around `getErrStream()`
* @return {string}
*/
proto.arduino.CompileResp.prototype.getErrStream_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getErrStream()));
};
/**
* optional bytes err_stream = 2;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getErrStream()`
* @return {!Uint8Array}
*/
proto.arduino.CompileResp.prototype.getErrStream_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getErrStream()));
};
/** @param {!(string|Uint8Array)} value */
proto.arduino.CompileResp.prototype.setErrStream = function(value) {
jspb.Message.setProto3BytesField(this, 2, value);
};
/**
* optional DownloadProgress download_progress = 3;
* @return {?proto.arduino.DownloadProgress}
*/
proto.arduino.CompileResp.prototype.getDownloadProgress = function() {
return /** @type{?proto.arduino.DownloadProgress} */ (
jspb.Message.getWrapperField(this, common_pb.DownloadProgress, 3));
};
/** @param {?proto.arduino.DownloadProgress|undefined} value */
proto.arduino.CompileResp.prototype.setDownloadProgress = function(value) {
jspb.Message.setWrapperField(this, 3, value);
};
proto.arduino.CompileResp.prototype.clearDownloadProgress = function() {
this.setDownloadProgress(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.arduino.CompileResp.prototype.hasDownloadProgress = function() {
return jspb.Message.getField(this, 3) != null;
};
/**
* optional TaskProgress task_progress = 4;
* @return {?proto.arduino.TaskProgress}
*/
proto.arduino.CompileResp.prototype.getTaskProgress = function() {
return /** @type{?proto.arduino.TaskProgress} */ (
jspb.Message.getWrapperField(this, common_pb.TaskProgress, 4));
};
/** @param {?proto.arduino.TaskProgress|undefined} value */
proto.arduino.CompileResp.prototype.setTaskProgress = function(value) {
jspb.Message.setWrapperField(this, 4, value);
};
proto.arduino.CompileResp.prototype.clearTaskProgress = function() {
this.setTaskProgress(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.arduino.CompileResp.prototype.hasTaskProgress = function() {
return jspb.Message.getField(this, 4) != null;
};
goog.object.extend(exports, proto.arduino);

View File

@ -0,0 +1 @@
// GENERATED CODE -- NO SERVICES IN PROTO

View File

@ -0,0 +1,421 @@
// package: arduino
// file: core.proto
/* tslint:disable */
import * as jspb from "google-protobuf";
import * as common_pb from "./common_pb";
export class PlatformInstallReq extends jspb.Message {
hasInstance(): boolean;
clearInstance(): void;
getInstance(): common_pb.Instance | undefined;
setInstance(value?: common_pb.Instance): void;
getPlatformPackage(): string;
setPlatformPackage(value: string): void;
getArchitecture(): string;
setArchitecture(value: string): void;
getVersion(): string;
setVersion(value: string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): PlatformInstallReq.AsObject;
static toObject(includeInstance: boolean, msg: PlatformInstallReq): PlatformInstallReq.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: PlatformInstallReq, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): PlatformInstallReq;
static deserializeBinaryFromReader(message: PlatformInstallReq, reader: jspb.BinaryReader): PlatformInstallReq;
}
export namespace PlatformInstallReq {
export type AsObject = {
instance?: common_pb.Instance.AsObject,
platformPackage: string,
architecture: string,
version: string,
}
}
export class PlatformInstallResp extends jspb.Message {
hasProgress(): boolean;
clearProgress(): void;
getProgress(): common_pb.DownloadProgress | undefined;
setProgress(value?: common_pb.DownloadProgress): void;
hasTaskProgress(): boolean;
clearTaskProgress(): void;
getTaskProgress(): common_pb.TaskProgress | undefined;
setTaskProgress(value?: common_pb.TaskProgress): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): PlatformInstallResp.AsObject;
static toObject(includeInstance: boolean, msg: PlatformInstallResp): PlatformInstallResp.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: PlatformInstallResp, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): PlatformInstallResp;
static deserializeBinaryFromReader(message: PlatformInstallResp, reader: jspb.BinaryReader): PlatformInstallResp;
}
export namespace PlatformInstallResp {
export type AsObject = {
progress?: common_pb.DownloadProgress.AsObject,
taskProgress?: common_pb.TaskProgress.AsObject,
}
}
export class PlatformDownloadReq extends jspb.Message {
hasInstance(): boolean;
clearInstance(): void;
getInstance(): common_pb.Instance | undefined;
setInstance(value?: common_pb.Instance): void;
getPlatformPackage(): string;
setPlatformPackage(value: string): void;
getArchitecture(): string;
setArchitecture(value: string): void;
getVersion(): string;
setVersion(value: string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): PlatformDownloadReq.AsObject;
static toObject(includeInstance: boolean, msg: PlatformDownloadReq): PlatformDownloadReq.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: PlatformDownloadReq, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): PlatformDownloadReq;
static deserializeBinaryFromReader(message: PlatformDownloadReq, reader: jspb.BinaryReader): PlatformDownloadReq;
}
export namespace PlatformDownloadReq {
export type AsObject = {
instance?: common_pb.Instance.AsObject,
platformPackage: string,
architecture: string,
version: string,
}
}
export class PlatformDownloadResp extends jspb.Message {
hasProgress(): boolean;
clearProgress(): void;
getProgress(): common_pb.DownloadProgress | undefined;
setProgress(value?: common_pb.DownloadProgress): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): PlatformDownloadResp.AsObject;
static toObject(includeInstance: boolean, msg: PlatformDownloadResp): PlatformDownloadResp.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: PlatformDownloadResp, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): PlatformDownloadResp;
static deserializeBinaryFromReader(message: PlatformDownloadResp, reader: jspb.BinaryReader): PlatformDownloadResp;
}
export namespace PlatformDownloadResp {
export type AsObject = {
progress?: common_pb.DownloadProgress.AsObject,
}
}
export class PlatformUninstallReq extends jspb.Message {
hasInstance(): boolean;
clearInstance(): void;
getInstance(): common_pb.Instance | undefined;
setInstance(value?: common_pb.Instance): void;
getPlatformPackage(): string;
setPlatformPackage(value: string): void;
getArchitecture(): string;
setArchitecture(value: string): void;
getVersion(): string;
setVersion(value: string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): PlatformUninstallReq.AsObject;
static toObject(includeInstance: boolean, msg: PlatformUninstallReq): PlatformUninstallReq.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: PlatformUninstallReq, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): PlatformUninstallReq;
static deserializeBinaryFromReader(message: PlatformUninstallReq, reader: jspb.BinaryReader): PlatformUninstallReq;
}
export namespace PlatformUninstallReq {
export type AsObject = {
instance?: common_pb.Instance.AsObject,
platformPackage: string,
architecture: string,
version: string,
}
}
export class PlatformUninstallResp extends jspb.Message {
hasTaskProgress(): boolean;
clearTaskProgress(): void;
getTaskProgress(): common_pb.TaskProgress | undefined;
setTaskProgress(value?: common_pb.TaskProgress): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): PlatformUninstallResp.AsObject;
static toObject(includeInstance: boolean, msg: PlatformUninstallResp): PlatformUninstallResp.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: PlatformUninstallResp, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): PlatformUninstallResp;
static deserializeBinaryFromReader(message: PlatformUninstallResp, reader: jspb.BinaryReader): PlatformUninstallResp;
}
export namespace PlatformUninstallResp {
export type AsObject = {
taskProgress?: common_pb.TaskProgress.AsObject,
}
}
export class PlatformUpgradeReq extends jspb.Message {
hasInstance(): boolean;
clearInstance(): void;
getInstance(): common_pb.Instance | undefined;
setInstance(value?: common_pb.Instance): void;
getPlatformPackage(): string;
setPlatformPackage(value: string): void;
getArchitecture(): string;
setArchitecture(value: string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): PlatformUpgradeReq.AsObject;
static toObject(includeInstance: boolean, msg: PlatformUpgradeReq): PlatformUpgradeReq.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: PlatformUpgradeReq, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): PlatformUpgradeReq;
static deserializeBinaryFromReader(message: PlatformUpgradeReq, reader: jspb.BinaryReader): PlatformUpgradeReq;
}
export namespace PlatformUpgradeReq {
export type AsObject = {
instance?: common_pb.Instance.AsObject,
platformPackage: string,
architecture: string,
}
}
export class PlatformUpgradeResp extends jspb.Message {
hasProgress(): boolean;
clearProgress(): void;
getProgress(): common_pb.DownloadProgress | undefined;
setProgress(value?: common_pb.DownloadProgress): void;
hasTaskProgress(): boolean;
clearTaskProgress(): void;
getTaskProgress(): common_pb.TaskProgress | undefined;
setTaskProgress(value?: common_pb.TaskProgress): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): PlatformUpgradeResp.AsObject;
static toObject(includeInstance: boolean, msg: PlatformUpgradeResp): PlatformUpgradeResp.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: PlatformUpgradeResp, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): PlatformUpgradeResp;
static deserializeBinaryFromReader(message: PlatformUpgradeResp, reader: jspb.BinaryReader): PlatformUpgradeResp;
}
export namespace PlatformUpgradeResp {
export type AsObject = {
progress?: common_pb.DownloadProgress.AsObject,
taskProgress?: common_pb.TaskProgress.AsObject,
}
}
export class PlatformSearchReq extends jspb.Message {
hasInstance(): boolean;
clearInstance(): void;
getInstance(): common_pb.Instance | undefined;
setInstance(value?: common_pb.Instance): void;
getSearchArgs(): string;
setSearchArgs(value: string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): PlatformSearchReq.AsObject;
static toObject(includeInstance: boolean, msg: PlatformSearchReq): PlatformSearchReq.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: PlatformSearchReq, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): PlatformSearchReq;
static deserializeBinaryFromReader(message: PlatformSearchReq, reader: jspb.BinaryReader): PlatformSearchReq;
}
export namespace PlatformSearchReq {
export type AsObject = {
instance?: common_pb.Instance.AsObject,
searchArgs: string,
}
}
export class PlatformSearchResp extends jspb.Message {
clearSearchOutputList(): void;
getSearchOutputList(): Array<SearchOutput>;
setSearchOutputList(value: Array<SearchOutput>): void;
addSearchOutput(value?: SearchOutput, index?: number): SearchOutput;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): PlatformSearchResp.AsObject;
static toObject(includeInstance: boolean, msg: PlatformSearchResp): PlatformSearchResp.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: PlatformSearchResp, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): PlatformSearchResp;
static deserializeBinaryFromReader(message: PlatformSearchResp, reader: jspb.BinaryReader): PlatformSearchResp;
}
export namespace PlatformSearchResp {
export type AsObject = {
searchOutputList: Array<SearchOutput.AsObject>,
}
}
export class SearchOutput extends jspb.Message {
getId(): string;
setId(value: string): void;
getVersion(): string;
setVersion(value: string): void;
getName(): string;
setName(value: string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): SearchOutput.AsObject;
static toObject(includeInstance: boolean, msg: SearchOutput): SearchOutput.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: SearchOutput, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): SearchOutput;
static deserializeBinaryFromReader(message: SearchOutput, reader: jspb.BinaryReader): SearchOutput;
}
export namespace SearchOutput {
export type AsObject = {
id: string,
version: string,
name: string,
}
}
export class PlatformListReq extends jspb.Message {
hasInstance(): boolean;
clearInstance(): void;
getInstance(): common_pb.Instance | undefined;
setInstance(value?: common_pb.Instance): void;
getUpdatableOnly(): boolean;
setUpdatableOnly(value: boolean): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): PlatformListReq.AsObject;
static toObject(includeInstance: boolean, msg: PlatformListReq): PlatformListReq.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: PlatformListReq, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): PlatformListReq;
static deserializeBinaryFromReader(message: PlatformListReq, reader: jspb.BinaryReader): PlatformListReq;
}
export namespace PlatformListReq {
export type AsObject = {
instance?: common_pb.Instance.AsObject,
updatableOnly: boolean,
}
}
export class PlatformListResp extends jspb.Message {
clearInstalledPlatformList(): void;
getInstalledPlatformList(): Array<InstalledPlatform>;
setInstalledPlatformList(value: Array<InstalledPlatform>): void;
addInstalledPlatform(value?: InstalledPlatform, index?: number): InstalledPlatform;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): PlatformListResp.AsObject;
static toObject(includeInstance: boolean, msg: PlatformListResp): PlatformListResp.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: PlatformListResp, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): PlatformListResp;
static deserializeBinaryFromReader(message: PlatformListResp, reader: jspb.BinaryReader): PlatformListResp;
}
export namespace PlatformListResp {
export type AsObject = {
installedPlatformList: Array<InstalledPlatform.AsObject>,
}
}
export class InstalledPlatform extends jspb.Message {
getId(): string;
setId(value: string): void;
getInstalled(): string;
setInstalled(value: string): void;
getLatest(): string;
setLatest(value: string): void;
getName(): string;
setName(value: string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): InstalledPlatform.AsObject;
static toObject(includeInstance: boolean, msg: InstalledPlatform): InstalledPlatform.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: InstalledPlatform, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): InstalledPlatform;
static deserializeBinaryFromReader(message: InstalledPlatform, reader: jspb.BinaryReader): InstalledPlatform;
}
export namespace InstalledPlatform {
export type AsObject = {
id: string,
installed: string,
latest: string,
name: string,
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1 @@
// GENERATED CODE -- NO SERVICES IN PROTO

View File

@ -0,0 +1,427 @@
// package: arduino
// file: lib.proto
/* tslint:disable */
import * as jspb from "google-protobuf";
import * as common_pb from "./common_pb";
export class LibraryDownloadReq extends jspb.Message {
hasInstance(): boolean;
clearInstance(): void;
getInstance(): common_pb.Instance | undefined;
setInstance(value?: common_pb.Instance): void;
getName(): string;
setName(value: string): void;
getVersion(): string;
setVersion(value: string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): LibraryDownloadReq.AsObject;
static toObject(includeInstance: boolean, msg: LibraryDownloadReq): LibraryDownloadReq.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: LibraryDownloadReq, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): LibraryDownloadReq;
static deserializeBinaryFromReader(message: LibraryDownloadReq, reader: jspb.BinaryReader): LibraryDownloadReq;
}
export namespace LibraryDownloadReq {
export type AsObject = {
instance?: common_pb.Instance.AsObject,
name: string,
version: string,
}
}
export class LibraryDownloadResp extends jspb.Message {
hasProgress(): boolean;
clearProgress(): void;
getProgress(): common_pb.DownloadProgress | undefined;
setProgress(value?: common_pb.DownloadProgress): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): LibraryDownloadResp.AsObject;
static toObject(includeInstance: boolean, msg: LibraryDownloadResp): LibraryDownloadResp.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: LibraryDownloadResp, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): LibraryDownloadResp;
static deserializeBinaryFromReader(message: LibraryDownloadResp, reader: jspb.BinaryReader): LibraryDownloadResp;
}
export namespace LibraryDownloadResp {
export type AsObject = {
progress?: common_pb.DownloadProgress.AsObject,
}
}
export class LibraryInstallReq extends jspb.Message {
hasInstance(): boolean;
clearInstance(): void;
getInstance(): common_pb.Instance | undefined;
setInstance(value?: common_pb.Instance): void;
getName(): string;
setName(value: string): void;
getVersion(): string;
setVersion(value: string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): LibraryInstallReq.AsObject;
static toObject(includeInstance: boolean, msg: LibraryInstallReq): LibraryInstallReq.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: LibraryInstallReq, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): LibraryInstallReq;
static deserializeBinaryFromReader(message: LibraryInstallReq, reader: jspb.BinaryReader): LibraryInstallReq;
}
export namespace LibraryInstallReq {
export type AsObject = {
instance?: common_pb.Instance.AsObject,
name: string,
version: string,
}
}
export class LibraryInstallResp extends jspb.Message {
hasProgress(): boolean;
clearProgress(): void;
getProgress(): common_pb.DownloadProgress | undefined;
setProgress(value?: common_pb.DownloadProgress): void;
hasTaskProgress(): boolean;
clearTaskProgress(): void;
getTaskProgress(): common_pb.TaskProgress | undefined;
setTaskProgress(value?: common_pb.TaskProgress): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): LibraryInstallResp.AsObject;
static toObject(includeInstance: boolean, msg: LibraryInstallResp): LibraryInstallResp.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: LibraryInstallResp, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): LibraryInstallResp;
static deserializeBinaryFromReader(message: LibraryInstallResp, reader: jspb.BinaryReader): LibraryInstallResp;
}
export namespace LibraryInstallResp {
export type AsObject = {
progress?: common_pb.DownloadProgress.AsObject,
taskProgress?: common_pb.TaskProgress.AsObject,
}
}
export class LibraryUninstallReq extends jspb.Message {
hasInstance(): boolean;
clearInstance(): void;
getInstance(): common_pb.Instance | undefined;
setInstance(value?: common_pb.Instance): void;
getName(): string;
setName(value: string): void;
getVersion(): string;
setVersion(value: string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): LibraryUninstallReq.AsObject;
static toObject(includeInstance: boolean, msg: LibraryUninstallReq): LibraryUninstallReq.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: LibraryUninstallReq, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): LibraryUninstallReq;
static deserializeBinaryFromReader(message: LibraryUninstallReq, reader: jspb.BinaryReader): LibraryUninstallReq;
}
export namespace LibraryUninstallReq {
export type AsObject = {
instance?: common_pb.Instance.AsObject,
name: string,
version: string,
}
}
export class LibraryUninstallResp extends jspb.Message {
hasTaskProgress(): boolean;
clearTaskProgress(): void;
getTaskProgress(): common_pb.TaskProgress | undefined;
setTaskProgress(value?: common_pb.TaskProgress): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): LibraryUninstallResp.AsObject;
static toObject(includeInstance: boolean, msg: LibraryUninstallResp): LibraryUninstallResp.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: LibraryUninstallResp, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): LibraryUninstallResp;
static deserializeBinaryFromReader(message: LibraryUninstallResp, reader: jspb.BinaryReader): LibraryUninstallResp;
}
export namespace LibraryUninstallResp {
export type AsObject = {
taskProgress?: common_pb.TaskProgress.AsObject,
}
}
export class LibraryUpgradeAllReq extends jspb.Message {
hasInstance(): boolean;
clearInstance(): void;
getInstance(): common_pb.Instance | undefined;
setInstance(value?: common_pb.Instance): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): LibraryUpgradeAllReq.AsObject;
static toObject(includeInstance: boolean, msg: LibraryUpgradeAllReq): LibraryUpgradeAllReq.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: LibraryUpgradeAllReq, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): LibraryUpgradeAllReq;
static deserializeBinaryFromReader(message: LibraryUpgradeAllReq, reader: jspb.BinaryReader): LibraryUpgradeAllReq;
}
export namespace LibraryUpgradeAllReq {
export type AsObject = {
instance?: common_pb.Instance.AsObject,
}
}
export class LibraryUpgradeAllResp extends jspb.Message {
hasProgress(): boolean;
clearProgress(): void;
getProgress(): common_pb.DownloadProgress | undefined;
setProgress(value?: common_pb.DownloadProgress): void;
hasTaskProgress(): boolean;
clearTaskProgress(): void;
getTaskProgress(): common_pb.TaskProgress | undefined;
setTaskProgress(value?: common_pb.TaskProgress): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): LibraryUpgradeAllResp.AsObject;
static toObject(includeInstance: boolean, msg: LibraryUpgradeAllResp): LibraryUpgradeAllResp.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: LibraryUpgradeAllResp, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): LibraryUpgradeAllResp;
static deserializeBinaryFromReader(message: LibraryUpgradeAllResp, reader: jspb.BinaryReader): LibraryUpgradeAllResp;
}
export namespace LibraryUpgradeAllResp {
export type AsObject = {
progress?: common_pb.DownloadProgress.AsObject,
taskProgress?: common_pb.TaskProgress.AsObject,
}
}
export class LibrarySearchReq extends jspb.Message {
hasInstance(): boolean;
clearInstance(): void;
getInstance(): common_pb.Instance | undefined;
setInstance(value?: common_pb.Instance): void;
getNames(): boolean;
setNames(value: boolean): void;
getQuery(): string;
setQuery(value: string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): LibrarySearchReq.AsObject;
static toObject(includeInstance: boolean, msg: LibrarySearchReq): LibrarySearchReq.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: LibrarySearchReq, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): LibrarySearchReq;
static deserializeBinaryFromReader(message: LibrarySearchReq, reader: jspb.BinaryReader): LibrarySearchReq;
}
export namespace LibrarySearchReq {
export type AsObject = {
instance?: common_pb.Instance.AsObject,
names: boolean,
query: string,
}
}
export class LibrarySearchResp extends jspb.Message {
clearSearchOutputList(): void;
getSearchOutputList(): Array<SearchLibraryOutput>;
setSearchOutputList(value: Array<SearchLibraryOutput>): void;
addSearchOutput(value?: SearchLibraryOutput, index?: number): SearchLibraryOutput;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): LibrarySearchResp.AsObject;
static toObject(includeInstance: boolean, msg: LibrarySearchResp): LibrarySearchResp.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: LibrarySearchResp, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): LibrarySearchResp;
static deserializeBinaryFromReader(message: LibrarySearchResp, reader: jspb.BinaryReader): LibrarySearchResp;
}
export namespace LibrarySearchResp {
export type AsObject = {
searchOutputList: Array<SearchLibraryOutput.AsObject>,
}
}
export class SearchLibraryOutput extends jspb.Message {
getName(): string;
setName(value: string): void;
getReleasesMap(): jspb.Map<string, LibraryRelease>;
clearReleasesMap(): void;
hasLatest(): boolean;
clearLatest(): void;
getLatest(): LibraryRelease | undefined;
setLatest(value?: LibraryRelease): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): SearchLibraryOutput.AsObject;
static toObject(includeInstance: boolean, msg: SearchLibraryOutput): SearchLibraryOutput.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: SearchLibraryOutput, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): SearchLibraryOutput;
static deserializeBinaryFromReader(message: SearchLibraryOutput, reader: jspb.BinaryReader): SearchLibraryOutput;
}
export namespace SearchLibraryOutput {
export type AsObject = {
name: string,
releasesMap: Array<[string, LibraryRelease.AsObject]>,
latest?: LibraryRelease.AsObject,
}
}
export class LibraryRelease extends jspb.Message {
getAuthor(): string;
setAuthor(value: string): void;
getVersion(): string;
setVersion(value: string): void;
getMaintainer(): string;
setMaintainer(value: string): void;
getSentence(): string;
setSentence(value: string): void;
getParagraph(): string;
setParagraph(value: string): void;
getWebsite(): string;
setWebsite(value: string): void;
getCategory(): string;
setCategory(value: string): void;
clearArchitecturesList(): void;
getArchitecturesList(): Array<string>;
setArchitecturesList(value: Array<string>): void;
addArchitectures(value: string, index?: number): string;
clearTypesList(): void;
getTypesList(): Array<string>;
setTypesList(value: Array<string>): void;
addTypes(value: string, index?: number): string;
hasResources(): boolean;
clearResources(): void;
getResources(): DownloadResource | undefined;
setResources(value?: DownloadResource): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): LibraryRelease.AsObject;
static toObject(includeInstance: boolean, msg: LibraryRelease): LibraryRelease.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: LibraryRelease, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): LibraryRelease;
static deserializeBinaryFromReader(message: LibraryRelease, reader: jspb.BinaryReader): LibraryRelease;
}
export namespace LibraryRelease {
export type AsObject = {
author: string,
version: string,
maintainer: string,
sentence: string,
paragraph: string,
website: string,
category: string,
architecturesList: Array<string>,
typesList: Array<string>,
resources?: DownloadResource.AsObject,
}
}
export class DownloadResource extends jspb.Message {
getUrl(): string;
setUrl(value: string): void;
getArchivefilename(): string;
setArchivefilename(value: string): void;
getChecksum(): string;
setChecksum(value: string): void;
getSize(): number;
setSize(value: number): void;
getCachepath(): string;
setCachepath(value: string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): DownloadResource.AsObject;
static toObject(includeInstance: boolean, msg: DownloadResource): DownloadResource.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: DownloadResource, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): DownloadResource;
static deserializeBinaryFromReader(message: DownloadResource, reader: jspb.BinaryReader): DownloadResource;
}
export namespace DownloadResource {
export type AsObject = {
url: string,
archivefilename: string,
checksum: string,
size: number,
cachepath: string,
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1 @@
// GENERATED CODE -- NO SERVICES IN PROTO

View File

@ -0,0 +1,84 @@
// package: arduino
// file: upload.proto
/* tslint:disable */
import * as jspb from "google-protobuf";
import * as common_pb from "./common_pb";
export class UploadReq extends jspb.Message {
hasInstance(): boolean;
clearInstance(): void;
getInstance(): common_pb.Instance | undefined;
setInstance(value?: common_pb.Instance): void;
getFqbn(): string;
setFqbn(value: string): void;
getSketchPath(): string;
setSketchPath(value: string): void;
getPort(): string;
setPort(value: string): void;
getVerbose(): boolean;
setVerbose(value: boolean): void;
getVerify(): boolean;
setVerify(value: boolean): void;
getImportFile(): string;
setImportFile(value: string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): UploadReq.AsObject;
static toObject(includeInstance: boolean, msg: UploadReq): UploadReq.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: UploadReq, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): UploadReq;
static deserializeBinaryFromReader(message: UploadReq, reader: jspb.BinaryReader): UploadReq;
}
export namespace UploadReq {
export type AsObject = {
instance?: common_pb.Instance.AsObject,
fqbn: string,
sketchPath: string,
port: string,
verbose: boolean,
verify: boolean,
importFile: string,
}
}
export class UploadResp extends jspb.Message {
getOutStream(): Uint8Array | string;
getOutStream_asU8(): Uint8Array;
getOutStream_asB64(): string;
setOutStream(value: Uint8Array | string): void;
getErrStream(): Uint8Array | string;
getErrStream_asU8(): Uint8Array;
getErrStream_asB64(): string;
setErrStream(value: Uint8Array | string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): UploadResp.AsObject;
static toObject(includeInstance: boolean, msg: UploadResp): UploadResp.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: UploadResp, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): UploadResp;
static deserializeBinaryFromReader(message: UploadResp, reader: jspb.BinaryReader): UploadResp;
}
export namespace UploadResp {
export type AsObject = {
outStream: Uint8Array | string,
errStream: Uint8Array | string,
}
}

View File

@ -0,0 +1,560 @@
/**
* @fileoverview
* @enhanceable
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
var common_pb = require('./common_pb.js');
goog.object.extend(proto, common_pb);
goog.exportSymbol('proto.arduino.UploadReq', null, global);
goog.exportSymbol('proto.arduino.UploadResp', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.arduino.UploadReq = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.arduino.UploadReq, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.arduino.UploadReq.displayName = 'proto.arduino.UploadReq';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.arduino.UploadReq.prototype.toObject = function(opt_includeInstance) {
return proto.arduino.UploadReq.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.arduino.UploadReq} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.arduino.UploadReq.toObject = function(includeInstance, msg) {
var f, obj = {
instance: (f = msg.getInstance()) && common_pb.Instance.toObject(includeInstance, f),
fqbn: jspb.Message.getFieldWithDefault(msg, 2, ""),
sketchPath: jspb.Message.getFieldWithDefault(msg, 3, ""),
port: jspb.Message.getFieldWithDefault(msg, 4, ""),
verbose: jspb.Message.getFieldWithDefault(msg, 5, false),
verify: jspb.Message.getFieldWithDefault(msg, 6, false),
importFile: jspb.Message.getFieldWithDefault(msg, 7, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.arduino.UploadReq}
*/
proto.arduino.UploadReq.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.arduino.UploadReq;
return proto.arduino.UploadReq.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.arduino.UploadReq} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.arduino.UploadReq}
*/
proto.arduino.UploadReq.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new common_pb.Instance;
reader.readMessage(value,common_pb.Instance.deserializeBinaryFromReader);
msg.setInstance(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setFqbn(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setSketchPath(value);
break;
case 4:
var value = /** @type {string} */ (reader.readString());
msg.setPort(value);
break;
case 5:
var value = /** @type {boolean} */ (reader.readBool());
msg.setVerbose(value);
break;
case 6:
var value = /** @type {boolean} */ (reader.readBool());
msg.setVerify(value);
break;
case 7:
var value = /** @type {string} */ (reader.readString());
msg.setImportFile(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.arduino.UploadReq.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.arduino.UploadReq.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.arduino.UploadReq} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.arduino.UploadReq.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getInstance();
if (f != null) {
writer.writeMessage(
1,
f,
common_pb.Instance.serializeBinaryToWriter
);
}
f = message.getFqbn();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getSketchPath();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
f = message.getPort();
if (f.length > 0) {
writer.writeString(
4,
f
);
}
f = message.getVerbose();
if (f) {
writer.writeBool(
5,
f
);
}
f = message.getVerify();
if (f) {
writer.writeBool(
6,
f
);
}
f = message.getImportFile();
if (f.length > 0) {
writer.writeString(
7,
f
);
}
};
/**
* optional Instance instance = 1;
* @return {?proto.arduino.Instance}
*/
proto.arduino.UploadReq.prototype.getInstance = function() {
return /** @type{?proto.arduino.Instance} */ (
jspb.Message.getWrapperField(this, common_pb.Instance, 1));
};
/** @param {?proto.arduino.Instance|undefined} value */
proto.arduino.UploadReq.prototype.setInstance = function(value) {
jspb.Message.setWrapperField(this, 1, value);
};
proto.arduino.UploadReq.prototype.clearInstance = function() {
this.setInstance(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.arduino.UploadReq.prototype.hasInstance = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional string fqbn = 2;
* @return {string}
*/
proto.arduino.UploadReq.prototype.getFqbn = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/** @param {string} value */
proto.arduino.UploadReq.prototype.setFqbn = function(value) {
jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional string sketch_path = 3;
* @return {string}
*/
proto.arduino.UploadReq.prototype.getSketchPath = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/** @param {string} value */
proto.arduino.UploadReq.prototype.setSketchPath = function(value) {
jspb.Message.setProto3StringField(this, 3, value);
};
/**
* optional string port = 4;
* @return {string}
*/
proto.arduino.UploadReq.prototype.getPort = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};
/** @param {string} value */
proto.arduino.UploadReq.prototype.setPort = function(value) {
jspb.Message.setProto3StringField(this, 4, value);
};
/**
* optional bool verbose = 5;
* Note that Boolean fields may be set to 0/1 when serialized from a Java server.
* You should avoid comparisons like {@code val === true/false} in those cases.
* @return {boolean}
*/
proto.arduino.UploadReq.prototype.getVerbose = function() {
return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 5, false));
};
/** @param {boolean} value */
proto.arduino.UploadReq.prototype.setVerbose = function(value) {
jspb.Message.setProto3BooleanField(this, 5, value);
};
/**
* optional bool verify = 6;
* Note that Boolean fields may be set to 0/1 when serialized from a Java server.
* You should avoid comparisons like {@code val === true/false} in those cases.
* @return {boolean}
*/
proto.arduino.UploadReq.prototype.getVerify = function() {
return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 6, false));
};
/** @param {boolean} value */
proto.arduino.UploadReq.prototype.setVerify = function(value) {
jspb.Message.setProto3BooleanField(this, 6, value);
};
/**
* optional string import_file = 7;
* @return {string}
*/
proto.arduino.UploadReq.prototype.getImportFile = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
};
/** @param {string} value */
proto.arduino.UploadReq.prototype.setImportFile = function(value) {
jspb.Message.setProto3StringField(this, 7, value);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.arduino.UploadResp = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.arduino.UploadResp, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.arduino.UploadResp.displayName = 'proto.arduino.UploadResp';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.arduino.UploadResp.prototype.toObject = function(opt_includeInstance) {
return proto.arduino.UploadResp.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.arduino.UploadResp} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.arduino.UploadResp.toObject = function(includeInstance, msg) {
var f, obj = {
outStream: msg.getOutStream_asB64(),
errStream: msg.getErrStream_asB64()
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.arduino.UploadResp}
*/
proto.arduino.UploadResp.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.arduino.UploadResp;
return proto.arduino.UploadResp.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.arduino.UploadResp} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.arduino.UploadResp}
*/
proto.arduino.UploadResp.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setOutStream(value);
break;
case 2:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setErrStream(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.arduino.UploadResp.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.arduino.UploadResp.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.arduino.UploadResp} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.arduino.UploadResp.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getOutStream_asU8();
if (f.length > 0) {
writer.writeBytes(
1,
f
);
}
f = message.getErrStream_asU8();
if (f.length > 0) {
writer.writeBytes(
2,
f
);
}
};
/**
* optional bytes out_stream = 1;
* @return {!(string|Uint8Array)}
*/
proto.arduino.UploadResp.prototype.getOutStream = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* optional bytes out_stream = 1;
* This is a type-conversion wrapper around `getOutStream()`
* @return {string}
*/
proto.arduino.UploadResp.prototype.getOutStream_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getOutStream()));
};
/**
* optional bytes out_stream = 1;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getOutStream()`
* @return {!Uint8Array}
*/
proto.arduino.UploadResp.prototype.getOutStream_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getOutStream()));
};
/** @param {!(string|Uint8Array)} value */
proto.arduino.UploadResp.prototype.setOutStream = function(value) {
jspb.Message.setProto3BytesField(this, 1, value);
};
/**
* optional bytes err_stream = 2;
* @return {!(string|Uint8Array)}
*/
proto.arduino.UploadResp.prototype.getErrStream = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* optional bytes err_stream = 2;
* This is a type-conversion wrapper around `getErrStream()`
* @return {string}
*/
proto.arduino.UploadResp.prototype.getErrStream_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getErrStream()));
};
/**
* optional bytes err_stream = 2;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getErrStream()`
* @return {!Uint8Array}
*/
proto.arduino.UploadResp.prototype.getErrStream_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getErrStream()));
};
/** @param {!(string|Uint8Array)} value */
proto.arduino.UploadResp.prototype.setErrStream = function(value) {
jspb.Message.setProto3BytesField(this, 2, value);
};
goog.object.extend(exports, proto.arduino);

View File

@ -42,17 +42,9 @@ export class CoreServiceImpl implements CoreService {
compilerReq.setInstance(instance);
compilerReq.setSketchpath(sketchpath);
compilerReq.setFqbn('arduino:avr:uno'/*boards.current.name*/);
// request.setShowproperties(false);
compilerReq.setPreprocess(false);
// request.setBuildcachepath('');
// compilerReq.setBuildpath('/tmp/build');
// compilerReq.setShowproperties(true);
// request.setBuildpropertiesList([]);
// request.setWarnings('none');
compilerReq.setVerbose(true);
compilerReq.setQuiet(false);
// request.setVidpid('');
// request.setExportfile('');
const result = client.compile(compilerReq);
return new Promise<void>((resolve, reject) => {