tethering: add protobuf messages for display feature
[sdk/emulator/qemu.git] / tizen / src / tethering / msg / tethering.proto
1 package tethering;
2
3 option java_package = "device.tethering.genmsg";
4
5 // define value
6
7 enum MessageResult {
8         SUCCESS = 1;
9         FAILURE = 2;
10         CANCEL = 3;
11 }
12
13 enum ConnectionState {
14         CONNECTED = 1;
15         DISCONNECTED = 2;
16         TERMINATED = 3;
17 }
18
19 enum EventType {
20         SENSOR = 1;
21         TOUCH = 2;
22 }
23
24 enum State {
25         ENABLED = 1;
26         DISABLED = 2;
27 }
28
29 enum SensorType{
30         ACCEL = 1;
31         MAGNETIC = 2;
32         GYROSCOPE = 3;
33         PROXIMITY = 4;
34         LIGHT = 5;
35 }
36
37 enum TouchState {
38         PRESSED = 1;
39         RELEASED = 2;
40 }
41
42 // define messages
43
44 message HandShakeReq {
45         required int32 key = 1;
46 }
47
48 message HandShakeAns {
49         required MessageResult result = 1;
50 }
51
52 message EmulatorState {
53         required ConnectionState state = 1;
54 }
55
56 message AppState {
57         required ConnectionState state = 1;
58 }
59
60 message StartReq {
61
62 }
63
64 message StartAns {
65         required MessageResult result = 1;
66 }
67
68 message SetEventStatus {
69         required EventType type = 1;
70         required State state = 2;
71 }
72
73 message EventMsg {
74         enum TYPE {
75                 START_REQ = 2;
76                 START_ANS = 3;
77                 TERMINATE = 4;
78                 EVENT_STATUS = 5;
79         }
80
81         required TYPE type = 1;
82         optional StartReq startReq = 2;
83         optional StartAns startAns = 3;
84         optional EventTerminate terminate = 4;
85         optional SetEventStatus setStatus = 5;
86 }
87
88 message EventTerminate {
89
90 }
91
92 message SetSensorStatus {
93         required SensorType type = 1;
94         required State state = 2;
95 }
96
97 message SensorData {
98         required SensorType sensor = 1;
99         optional string x = 2 [default = "0"];
100         optional string y = 3 [default = "0"];
101         optional string z = 4 [default = "0"];
102 }
103
104 message SensorMsg {
105         enum Type {
106                 START_REQ = 2;
107                 START_ANS = 3;
108                 TERMINATE = 4;
109                 SENSOR_STATUS = 5;
110                 SENSOR_DATA = 6;
111         }
112
113         required Type type = 1;
114         optional StartReq startReq= 2;
115         optional StartAns startAns= 3;
116         optional EventTerminate terminate = 4;
117         optional SetSensorStatus setStatus = 5;
118         optional SensorData data = 6;
119 }
120
121 message Resolution {
122         required int32 width = 1;
123         required int32 height = 2;
124 }
125
126 message DisplayMsg {
127         // required Resolution resolution = 1;
128         required bool onOff = 2;
129         optional int32 frameRate = 3;
130         optional bytes imageData = 4;
131 }
132
133 message MultiTouchMaxCount {
134         optional int32 max = 1 [default = 10];
135 }
136
137 message MultiTouchData {
138         optional int32 index = 1 [default = 0];
139         optional float xPoint = 2 [default = 0.0];
140         optional float yPoint = 3 [default = 0.0];
141         optional TouchState state = 4;
142 }
143
144 message MultiTouchMsg {
145         enum Type {
146                 START_REQ = 2;
147                 START_ANS = 3;
148                 TERMINATE = 4;
149                 MAX_COUNT = 5;
150                 TOUCH_DATA = 6;
151                 RESOLUTION = 7;
152                 DISPLAY = 8;
153         }
154         required Type type = 1;
155         optional StartReq startReq = 2;
156         optional StartAns startAns = 3;
157         optional EventTerminate terminate = 4;
158         optional MultiTouchMaxCount maxCount = 5;
159         optional MultiTouchData touchData = 6;
160         optional Resolution resolution = 7;
161         optional DisplayMsg display = 8;
162 }
163
164 message TetheringMsg {
165         enum Type {
166                 HANDSHAKE_REQ = 2;
167                 HANDSHAKE_ANS = 3;
168                 EMUL_STATE = 4;
169                 APP_STATE = 5;
170                 EVENT_MSG = 6;
171                 SENSOR_MSG = 7;
172                 TOUCH_MSG = 8;
173         }
174         required Type type = 1;
175         optional HandShakeReq handShakeReq = 2;
176         optional HandShakeAns handShakeAns = 3;
177         optional EmulatorState emulState = 4;
178         optional AppState appState = 5;
179         optional EventMsg eventMsg = 6;
180         optional SensorMsg sensorMsg = 7;
181         optional MultiTouchMsg touchMsg = 8;
182 }