syntax = "proto3";
import "google/protobuf/empty.proto";
package wam_ipc;

service WebAppManagerService {
  rpc Launch(LaunchRequest) returns (google.protobuf.Empty) {}
  rpc Activate(ActivateRequest) returns (google.protobuf.Empty) {}
  rpc Kill(KillRequest) returns (google.protobuf.Empty) {}
}

message LaunchRequest {
  string app_id = 1;
  string uri = 2;

  enum SurfaceType {
    NONE = 0;
    BACKGROUND = 1;
    PANEL = 2;
  }
  SurfaceType surface_type = 3;

  enum PanelEdge {
    NOT_FOUND = 0;
    TOP = 1;
    BOTTOM = 2;
    LEFT = 3;
    RIGHT = 4;
  };
  PanelEdge panel_edge = 4;

  int32 width = 5;
  int32 height = 6;
}

message ActivateRequest {
  string app_id = 1;
}

message KillRequest {
  string app_id = 1;
}
