Modern Apps git
git clone https://git.maproj.org/Modern-Apps.git
cov/c3 ▾

Modern-Apps.git / auto / protocol / src / main / proto / gal / notification.proto

notification.proto66 lines · 2.2 KiBRaw
1// Google Automotive Link messaging channel (service 14, NOTIFICATION).
2//
3// MA sender-defined DTOs: the teardown recovered the service descriptor slot
4// (`Service.notification`, field 13, `xjm`) but never the xjm channel message
5// IDs, so there is nothing exact to pin here. These messages frame the
6// Phase 7 set -- threads, body, reply, mark-read -- as proto2 channel payloads
7// behind the 2-byte type prefix, exactly like every other service channel.
8//
9// This is a DHU-tolerated stub by construction: an unknown ch14 payload earns
10// at worst a bare MessageError (0xff) on ch14 while video and the bring-up
11// carry on. If the teardown ever recovers the real xjm IDs, they replace the
12// MA-defined types in `GalMessage.Notification` and these DTOs get re-pinned
13// against them.
14
15syntax = "proto2";
16
17package gal;
18
19option java_package = "com.vayunmathur.auto.protocol.gal";
20option java_multiple_files = true;
21
22// One conversation. Phone -> head unit, inside THREADS.
23message MessagingThread {
24 required string thread_id = 1;
25 optional string title = 2;
26 optional string sender = 3;
27 optional int64 last_message_ms = 4;
28 optional uint32 unread_count = 5;
29}
30
31// A thread-list snapshot. Phone -> head unit (0x8001).
32message MessagingThreads {
33 repeated MessagingThread threads = 1;
34}
35
36// One message body posted. Phone -> head unit (0x8002).
37message MessagingMessage {
38 required string thread_id = 1;
39 required string message_id = 2;
40 optional string sender = 3;
41 required string body = 4;
42 optional int64 timestamp_ms = 5;
43}
44
45// A thread dismissed on the phone or read elsewhere.
46// Phone -> head unit (0x8003).
47message MessagingDismiss {
48 required string thread_id = 1;
49 optional string message_id = 2;
50}
51
52enum MessagingActionType {
53 // The user typed a reply on the head unit; `reply_text` carries it.
54 MESSAGE_REPLY = 1;
55 // The user marked the thread read on the head unit.
56 MESSAGE_MARK_READ = 2;
57 // The user asked to reply by voice: open a ch6 mic turn for this thread.
58 MESSAGE_VOICE_REPLY_BEGIN = 3;
59}
60
61// A user action on the head unit. HU -> phone (0x8004).
62message MessagingAction {
63 required string thread_id = 1;
64 required MessagingActionType action = 2;
65 optional string reply_text = 3;
66}