proto: Delete an invalid type values
[platform/core/uifw/aurum.git] / protocol / aurum.proto
1 syntax = "proto3";
2 package aurum;
3
4 /**
5   * @page protocol Protocol
6   * Here is a page with some descriptions about protocol explained
7   */
8 service Bootstrap {
9    rpc killServer(ReqEmpty) returns (RspEmpty) {}
10    rpc findElement(ReqFindElement) returns (RspFindElement) {}
11    rpc getValue(ReqGetValue) returns (RspGetValue) {}
12    rpc setValue(ReqSetValue) returns (RspSetValue) {}
13    rpc getSize(ReqGetSize) returns (RspGetSize) {}
14    rpc clear(ReqClear) returns (RspClear) {}
15    rpc getAttribute(ReqGetAttribute) returns (RspGetAttribute) {}
16    rpc click(ReqClick) returns (RspClick) {}
17    rpc longClick(ReqClick) returns (RspClick) {}
18    rpc flick(ReqFlick) returns (RspFlick) {}
19    rpc touchDown(ReqTouchDown) returns (RspTouchDown) {}
20    rpc touchMove(ReqTouchMove) returns (RspTouchMove) {}
21    rpc touchUp(ReqTouchUp) returns (RspTouchUp) {}
22    rpc installApp(stream ReqInstallApp) returns (RspInstallApp) {}
23    rpc removeApp(ReqRemoveApp) returns (RspRemoveApp) {}
24    rpc getAppInfo(ReqGetAppInfo) returns (RspGetAppInfo) {}
25    rpc launchApp(ReqLaunchApp) returns (RspLaunchApp) {}
26    rpc closeApp(ReqCloseApp) returns (RspCloseApp) {}
27    rpc getDeviceTime(ReqGetDeviceTime) returns (RspGetDeviceTime) {}
28    rpc getLocation(ReqGetLocation) returns (RspGetLocation) {}
29    rpc sendKey(ReqKey) returns (RspKey) {}
30    rpc takeScreenshot(ReqTakeScreenshot) returns (stream RspTakeScreenshot) {}
31    rpc dumpObjectTree(ReqDumpObjectTree) returns (RspDumpObjectTree) {}
32 }
33
34 // ------------------------------------ //
35
36 enum RspStatus {
37    OK = 0;
38    NA = 1;
39    ERROR = 2;
40 }
41
42 enum ParamType {
43    STRING = 0;
44    INT = 1;
45    DOUBLE = 2;
46    BOOL = 3;
47 }
48
49 message Element {
50    string elementId = 1;
51    repeated Element child = 2;
52
53    Rect geometry = 3;
54
55    string widget_type = 4;
56    string widget_style = 5;
57
58    string text = 6;
59    string id = 7;
60    string automationId = 8;
61    string package = 9;
62    string role = 10;
63
64    bool isChecked = 11;
65    bool isCheckable = 12;
66    bool isClickable = 13;
67    bool isEnabled = 14;
68    bool isFocused = 15;
69    bool isFocusable = 16;
70    bool isScrollable = 17;
71    bool isSelected = 18;
72    bool isShowing = 19;
73    bool isActive = 20;
74    bool isVisible = 21;
75    bool isSelectable = 22;
76 }
77
78 message Point {
79    int32 x = 1;
80    int32 y = 2;
81 }
82
83 message Rect {
84    int32 x = 1;
85    int32 y = 2;
86    int32 width = 3;
87    int32 height = 4;
88 }
89
90 // ------------------------------------ //
91
92 message ReqFindElement {
93    oneof _elementid {
94       string elementId = 1;
95    }
96
97    oneof _automationid {
98       string automationId = 2;
99    }
100
101    oneof _textfield {
102       string textField = 3;
103    }
104
105    oneof _widgettype {
106       string widgetType = 4;
107    }
108
109    oneof _widgetstyle {
110       string widgetStyle = 5;
111    }
112
113    oneof _ischecked {
114       bool isChecked = 6;
115    }
116
117    oneof _ischeckable {
118       bool isCheckable= 7;
119    }
120
121    oneof _isclickable {
122       bool isClickable = 8;
123    }
124
125    oneof _isenabled {
126       bool isEnabled = 9;
127    }
128
129    oneof _isfocused {
130       bool isFocused = 10;
131    }
132
133    oneof _isfocusable {
134       bool isFocusable = 11;
135    }
136
137    oneof _isscrollable {
138       bool isScrollable = 12;
139    }
140
141    oneof _isselected {
142       bool isSelected = 13;
143    }
144
145    oneof _isshowing {
146       bool isShowing = 14;
147    }
148
149    oneof _isactive {
150       bool isActive = 15;
151    }
152    oneof _mindepth {
153       int32 minDepth = 16;
154    }
155
156    oneof _maxdepth {
157       int32 maxDepth = 17;
158    }
159
160    oneof _packagename {
161       string packageName = 18;
162    }
163
164    repeated ReqFindElement children = 19;
165 }
166 message RspFindElement {
167    RspStatus status = 1;
168    repeated Element elements = 2;
169 }
170
171 // ------------------------------------ //
172
173 message ReqGetValue {
174    string elementId = 1;
175    // TODO : text, widgetstyle, widgettype, automationid
176 }
177 message RspGetValue {
178    RspStatus status = 1;
179    ParamType type  = 2;
180    oneof params {
181       string stringValue = 3;
182       int32 intValue = 4;
183       double doubleValue = 5;
184       bool boolValue = 6;
185    }
186 }
187
188 message ReqSetValue {
189    string elementId = 1;
190    ParamType type  = 2;
191    oneof params {
192       string stringValue = 3;
193       int32 intValue = 4;
194       double doubleValue = 5;
195       bool boolValue = 6;
196    }
197 }
198 message RspSetValue {
199    RspStatus status = 1;
200 }
201
202 message ReqGetSize{
203    string elementId = 1;
204 }
205 message RspGetSize{
206    RspStatus status = 1;
207    Rect size = 2;
208 }
209
210 message ReqClear{
211    string elementId = 1;
212 }
213 message RspClear{
214    RspStatus status = 1;
215 }
216
217 message ReqGetAttribute {
218    enum RequestType {
219       VISIBLE     = 0;
220       FOCUSABLE   = 1;
221       FOCUSED     = 2;
222       ENABLED     = 3;
223       CLICKABLE   = 4;
224       SCROLLABLE  = 5;
225       CHECKABLE   = 6;
226       CHECKED     = 7;
227       SELECTED    = 8;
228       SELECTABLE  = 9;
229       SHOWING     = 10;
230       ACTIVE      = 11;
231    }
232    string elementId = 1;
233    RequestType attribute = 2;
234 }
235 message RspGetAttribute {
236    RspStatus status = 1;
237    bool boolValue = 2;
238 }
239
240 // ------------------------------------ //
241
242 message ReqClick{
243    enum RequestType {
244       ELEMENTID = 0;
245       COORD = 1;
246       ATSPI = 2;
247    }
248    RequestType type  = 1;
249    oneof params {
250       string elementId = 2;
251       Point coordination = 3;
252    }
253 }
254 message RspClick{
255    RspStatus status = 1;
256 }
257
258 message ReqFlick{
259    Point startPoint = 1;
260    Point endPoint = 2;
261    int32 durationMs = 3;
262 }
263 message RspFlick{
264    RspStatus status = 1;
265 }
266
267 message ReqTouchDown{
268    Point coordination = 1;
269 }
270 message RspTouchDown{
271    RspStatus status = 1;
272    int32 seqId = 2;
273 }
274
275 message ReqTouchMove{
276    int32 seqId = 1;
277    Point coordination = 2;
278 }
279 message RspTouchMove{
280    RspStatus status = 1;
281 }
282
283 message ReqTouchUp{
284    int32 seqId = 1;
285    Point coordination = 2;
286 }
287 message RspTouchUp{
288    RspStatus status = 1;
289 }
290
291 // ------------------------------------ //
292
293 message ReqInstallApp{
294    bytes package = 1;
295 }
296 message RspInstallApp{
297    RspStatus status = 1;
298 }
299
300 message ReqRemoveApp{
301    string packageName = 1;
302 }
303 message RspRemoveApp{
304    RspStatus status = 1;
305 }
306
307 message ReqGetAppInfo{
308    string packageName = 1;
309 }
310 message RspGetAppInfo {
311    RspStatus status = 1;
312    bool isInstalled = 2;
313    bool isRunning = 3;
314    bool isFocused = 4;
315 }
316
317 message ReqLaunchApp{
318    string packageName = 1;
319 }
320 message RspLaunchApp{
321    RspStatus status = 1;
322 }
323
324 message ReqCloseApp{
325    string packageName = 1;
326 }
327 message RspCloseApp{
328    RspStatus status = 1;
329 }
330
331 // ------------------------------------ //
332
333 message ReqGetDeviceTime{
334    enum TimeType {
335       WALLCLOCK= 0;
336       SYSTEM = 1;
337    }
338    TimeType type = 1;
339 }
340 message RspGetDeviceTime{
341    RspStatus status = 1;
342    int64 timestampUTC = 2;
343    string localeDatetime = 3;
344 }
345
346 message ReqGetLocation{
347 }
348 message RspGetLocation{
349    RspStatus status = 1;
350    double alt = 2;
351    double lat = 3;
352 }
353
354 message ReqKey{
355    enum KeyType{
356       BACK = 0;
357       MENU = 1;
358       HOME = 2;
359       VOLUP = 3;
360       VOLDOWN = 4;
361       POWER = 5;
362       //KEY = 6;
363       XF86 = 7;
364       WHEELUP = 8;
365       WHEELDOWN = 9;
366    }
367    enum KeyActionType{
368       STROKE = 0;
369       LONG_STROKE = 1;
370       PRESS = 2;
371       RELEASE = 3;
372    }
373    KeyType type = 1;
374    KeyActionType actionType = 2;
375    //oneof keys {
376       //uint32 keyCode = 3;
377    string XF86keyCode = 4;
378    //}
379 }
380 message RspKey{
381    RspStatus status = 1;
382 }
383
384 message ReqTakeScreenshot{
385 }
386 message RspTakeScreenshot{
387    bytes image = 1;
388 }
389
390 // ------------------------------------ //
391
392 message ReqEmpty {
393 }
394 message RspEmpty {
395 }
396
397 // ------------------------------------ //
398
399 message ReqDumpObjectTree {
400    string elementId = 1;
401 }
402
403 message RspDumpObjectTree {
404    RspStatus status = 1;
405    repeated Element roots = 2;
406 }