blob: 9114a9228a7e6a1fe1d3e5e4c26d5b564ebf2428 [file] [log] [blame]
// Copyright (C) 2018 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
option java_multiple_files = true;
option java_package = "com.android.emulator";
option objc_class_prefix = "AEC";
package android.emulation.control;
import "google/protobuf/empty.proto";
import "snapshot.proto";
// The SnapshotService enables you to list, store, and retrieve snapshots.
// Currently the snapshot service is very limited, in the sense that you can:
//
// 1. Store only one snapshot. All existing snapshots will be deleted.
// 2. Cannot rename the snapshots.
// 3. There are no guarantees that you will be able to load the snapshot
service SnapshotService {
// Lists all the valid snapshots that are stored locally for the currently
// running avd.
rpc listSnapshots(google.protobuf.Empty) returns (SnapshotList) {}
// Pulls down the snapshot stored inside the AVD as a tar.gz stream
rpc pullSnapshot(Snapshot) returns (stream Snapshot) {}
// Push a tar.gz stream contain the snapshot.
rpc pushSnapshot(stream Snapshot) returns (Snapshot) {}
// Loads the given snapshot inside the emulator.
rpc loadSnapshot(Snapshot) returns (Snapshot) {}
// Create as a snapshot of the current state of the emulator.
rpc saveSnapshot(Snapshot) returns (Snapshot) {}
// Deletes the given snapshot from the avd.
rpc deleteSnapshot(Snapshot) returns (Snapshot) {}
}
message Snapshot {
// The identifier to the snapshot.
string snapshot_id = 1;
// A stream of bytes. Encoded as a zip file.
bytes payload = 2;
// status fields.
bool success = 3;
bytes err = 4;
}
message SnapshotDetails {
string snapshot_id = 1;
emulator_snapshot.Snapshot details = 2;
}
message SnapshotList {
repeated SnapshotDetails snapshots = 1;
}