mirror of
https://github.com/amigan/calls.git
synced 2024-11-21 12:29:47 -05:00
113 lines
2.1 KiB
Protocol Buffer
113 lines
2.1 KiB
Protocol Buffer
syntax = "proto3";
|
|
package stillbox;
|
|
option go_package = "./pb";
|
|
|
|
import "google/protobuf/timestamp.proto";
|
|
import "google/protobuf/struct.proto";
|
|
|
|
message Message {
|
|
oneof toClient_message {
|
|
CommandResponse response = 1;
|
|
Call call = 2;
|
|
Notification notification = 3;
|
|
UserPopup popup = 4;
|
|
Error error = 5;
|
|
Hello hello = 6;
|
|
}
|
|
}
|
|
|
|
message CommandResponse {
|
|
optional int64 command_id = 1;
|
|
oneof command_response {
|
|
TalkgroupInfo tg_info = 2;
|
|
}
|
|
}
|
|
|
|
message Call {
|
|
string audioName = 1;
|
|
string audioType = 2;
|
|
google.protobuf.Timestamp date_time = 3;
|
|
int32 system = 4;
|
|
int32 talkgroup = 5;
|
|
int32 source = 6;
|
|
int64 frequency = 7;
|
|
repeated int64 frequencies = 8;
|
|
repeated int32 patches = 9;
|
|
repeated int32 sources = 10;
|
|
optional int32 duration = 11;
|
|
bytes audio = 12;
|
|
}
|
|
|
|
message Hello {
|
|
Version version = 1;
|
|
}
|
|
|
|
message UserPopup {
|
|
string msg = 1;
|
|
}
|
|
|
|
message Error {
|
|
string error = 1;
|
|
Command command = 2;
|
|
}
|
|
|
|
message Notification {
|
|
google.protobuf.Timestamp date_time = 1;
|
|
string msg = 2;
|
|
string action_url = 3;
|
|
}
|
|
|
|
message Command {
|
|
optional int64 command_id = 1;
|
|
oneof command {
|
|
Live live_command = 2;
|
|
Search search_command = 3;
|
|
Talkgroup tg_command = 4;
|
|
}
|
|
}
|
|
|
|
message TalkgroupInfo {
|
|
Talkgroup tg = 1;
|
|
string system_name = 2;
|
|
optional string name = 3;
|
|
optional string group = 4;
|
|
optional string alpha_tag = 5;
|
|
optional int32 frequency = 6;
|
|
repeated string tags = 7;
|
|
optional google.protobuf.Struct metadata = 8;
|
|
bool learned = 9;
|
|
}
|
|
|
|
enum LiveState {
|
|
LS_STOPPED = 0;
|
|
LS_LIVE = 1;
|
|
LS_PAUSED = 2;
|
|
}
|
|
|
|
message Live {
|
|
optional LiveState state = 1;
|
|
optional Filter filter = 2;
|
|
}
|
|
|
|
message Talkgroup {
|
|
int32 system = 1;
|
|
int32 talkgroup = 2;
|
|
}
|
|
|
|
message Filter {
|
|
repeated Talkgroup talkgroups = 1;
|
|
repeated Talkgroup talkgroups_not = 2;
|
|
repeated string talkgroup_tags_all = 3;
|
|
repeated string talkgroup_tags_any = 4;
|
|
repeated string talkgroup_tags_not = 5;
|
|
}
|
|
|
|
message Search {
|
|
}
|
|
|
|
message Version {
|
|
string server_name = 1;
|
|
string version = 2;
|
|
string built = 3;
|
|
string platform = 4;
|
|
}
|