mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-02 19:17:10 +00:00
feat(proto): define driver v0.1 service contract
Eight RPCs needed for v0.1 per plan: Launch, Terminate, Tap, InputText, Screenshot, Hierarchy, WaitForIdle, Health. Defers Swipe/LongPress/OpenLink/etc until a spec needs them.
This commit is contained in:
1 parent
ee78371566
commit
9d62ba963d
1 file changed
+57
@@ -0,0 +1,57 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
package uatu.driver.v1;
|
||||||
|
|
||||||
|
option go_package = "github.com/priyanshujain/uatu/proto/driverpb;driverpb";
|
||||||
|
option java_package = "dev.uatu.driver.v1";
|
||||||
|
option java_multiple_files = true;
|
||||||
|
|
||||||
|
service Driver {
|
||||||
|
rpc Launch(LaunchRequest) returns (Empty);
|
||||||
|
rpc Terminate(Empty) returns (Empty);
|
||||||
|
|
||||||
|
rpc Tap(Point) returns (Empty);
|
||||||
|
rpc InputText(Text) returns (Empty);
|
||||||
|
|
||||||
|
rpc Screenshot(Empty) returns (Image);
|
||||||
|
rpc Hierarchy(Empty) returns (HierarchyJSON);
|
||||||
|
|
||||||
|
rpc WaitForIdle(Duration) returns (Empty);
|
||||||
|
rpc Health(Empty) returns (HealthStatus);
|
||||||
|
}
|
||||||
|
|
||||||
|
message Empty {}
|
||||||
|
|
||||||
|
message LaunchRequest {
|
||||||
|
string bundle_id = 1;
|
||||||
|
bool clear_state = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message Point {
|
||||||
|
int32 x = 1;
|
||||||
|
int32 y = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message Text {
|
||||||
|
string value = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message Image {
|
||||||
|
bytes png = 1;
|
||||||
|
int32 width = 2;
|
||||||
|
int32 height = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message HierarchyJSON {
|
||||||
|
string json = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message Duration {
|
||||||
|
int64 millis = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message HealthStatus {
|
||||||
|
bool ready = 1;
|
||||||
|
string version = 2;
|
||||||
|
string platform = 3;
|
||||||
|
}
|
||||||
Reference in new issue
Block a user