// Copyright 2023 The ChromiumOS Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
syntax = "proto2";
option optimize_for = LITE_RUNTIME;
package remote_commands;
option go_package = "chromium/policy/enterprise_management_proto";
import "device_management_backend.proto";
message SendRemoteCommandRequest {
optional enterprise_management.RemoteCommand remote_command = 1;
}
message SendRemoteCommandResponse {
optional int64 command_id = 1;
}
message WaitRemoteCommandResultRequest {
// A command_id that has been previously returned by SendRemoteCommand.
optional int64 command_id = 1;
}
message WaitRemoteCommandResultResponse {
optional enterprise_management.RemoteCommandResult result = 1;
}
message WaitRemoteCommandAckedRequest {
// A command_id that has been previously returned by SendRemoteCommand.
optional int64 command_id = 1;
}
message WaitRemoteCommandAckedResponse {}
// RemoteCommands provides functions to send remote commands and get the
// results.
service RemoteCommandsService {
// Creates a new remote command and returns the id of the command that can be
// used to get the result.
rpc SendRemoteCommand(SendRemoteCommandRequest)
returns (SendRemoteCommandResponse) {}
// Gets the command id as argument, and returns when the remote command result
// is available.
rpc WaitRemoteCommandResult(WaitRemoteCommandResultRequest)
returns (WaitRemoteCommandResultResponse) {}
// Gets the command id as argument, and returns when the remote command is
// acknowledged. "acknowledge" means that the client has sent a message
// confirming that the fake DMServer has received the remote command.
rpc WaitRemoteCommandAcked(WaitRemoteCommandAckedRequest)
returns (WaitRemoteCommandAckedResponse) {}
}