wangzhibo
4 天以前 ae6f40460dcd56af6c5f60ba52c883854c3bac55
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
syntax = "proto2";
 
package garmin_vivomovehr;
 
option java_package = "nodomain.freeyourgadget.gadgetbridge.proto.garmin";
 
message HttpService {
  enum Method {
    UNKNOWN_METHOD = 0;
    GET = 1;
    PUT = 2;
    POST = 3;
    DELETE = 4;
    PATCH = 5;
    HEAD = 6;
  }
 
  enum Status {
    UNKNOWN_STATUS = 0;
    OK = 100;
    NETWORK_REQUEST_TIMED_OUT = 200;
    FILE_TOO_LARGE = 300;
    DATA_TRANSFER_ITEM_FAILURE = 400;
  }
 
  optional RawRequest rawRequest = 5;
  optional RawResponse rawResponse = 6;
 
  message RawRequest {
    required string url = 1;
    optional Method method = 3;
    repeated Header header = 5;
    optional bool useDataXfer = 6;
  }
 
  message RawResponse {
    optional Status status = 1;
    optional uint32 httpStatus = 2;
    optional bytes body = 3;
    optional DataTransferItem xferData = 4;
    repeated Header header = 5;
  }
 
  message DataTransferItem {
    required uint32 id = 1;
    required uint32 size = 2;
  }
 
  message Header {
    required string key = 1;
    required string value = 2;
  }
}