forked from kdudkov/goatak
-
Notifications
You must be signed in to change notification settings - Fork 0
/
detail.proto
72 lines (63 loc) · 2.69 KB
/
detail.proto
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
syntax = "proto3";
option optimize_for = LITE_RUNTIME;
option go_package = "github.com/kdudkov/goatak/cotproto";
import "contact.proto";
import "group.proto";
import "precisionlocation.proto";
import "status.proto";
import "takv.proto";
import "track.proto";
// CotEvent detail
// The strong typed message fields are optional. If used, they *MUST* adhere
// to the requirements of the message (see their proto file) and
// their XML source element used to populate the message MUST
// be omitted from the xmlDetail.
// WHOLE ELEMENTS MUST BE CONVERTED TO MESSAGES. Do not try to
// put part of the data from a given element into one of the messages
// and put other parts of the data in an element of xmlDetail! This applies
// especially if you add new things to the XML representation which do not
// have a place in the equivalent protobuf message. Instead, omit the
// message and put the entire element in xmlDetail!
//
// xmlDetail is optional. If omitted, all Detail data has been
// converted to the strongly typed message fields.
// If present, this contains any remaining detail data that has NOT been
// included in one of the strongly typed message fields. To process the
// xmlDetail, the following rules MUST be followed:
// Senders of this message MUST:
// 1. Remove all child elements used to populate the other message
// fields
// 2. If no child elements under <detail> remain, STOP - do not populate
// xmlDetail
// 3. Serialize the remaining XML tree under <detail>....</detail>
// as XML in UTF-8 encoding
// 4. Remove the <detail> and </detail> element tags
// 5. Remove the XML header
// Receivers of this message MUST do the equivalent of the following:
// 1. If the field is not present (zero length), stop - do nothing
// 2. Prepend <detail> and append </detail>
// 3. Prepend an XML header for UTF-8 encoding, version 1.0
// (<?xml version="1.0" encoding="UTF-8"?> or similar)
// 4. Read the result, expecting a valid XML document with a document
// root of <detail>
// 5. Merge in XML equivalents of each of the strongly typed
// messages present in this Detail message.
// In the event that a sending application does not follow
// sending rule #1 above properly and data for the same element
// appears in xmlDetail, the data in xmlDetail should be left alone
// and the data in the equivalent message should ignored.
message Detail {
string xmlDetail = 1;
// <contact>
Contact contact = 2;
// <__group>
Group group = 3;
// <precisionlocation>
PrecisionLocation precisionLocation = 4;
// <status>
Status status = 5;
// <takv>
Takv takv = 6;
// <track>
Track track = 7;
}