bootstrap: Delete Sync Command
[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    repeated ReqFindElement children = 18;
161 }
162 message RspFindElement {
163    RspStatus status = 1;
164    repeated Element elements = 2;
165 }
166
167 // ------------------------------------ //
168
169 message ReqGetValue {
170    string elementId = 1;
171    // TODO : text, widgetstyle, widgettype, automationid
172 }
173 message RspGetValue {
174    RspStatus status = 1;
175    ParamType type  = 2;
176    oneof params {
177       string stringValue = 3;
178       int32 intValue = 4;
179       double doubleValue = 5;
180       bool boolValue = 6;
181    }
182 }
183
184 message ReqSetValue {
185    string elementId = 1;
186    ParamType type  = 2;
187    oneof params {
188       string stringValue = 3;
189       int32 intValue = 4;
190       double doubleValue = 5;
191       bool boolValue = 6;
192    }
193 }
194 message RspSetValue {
195    RspStatus status = 1;
196 }
197
198 message ReqGetSize{
199    string elementId = 1;
200 }
201 message RspGetSize{
202    RspStatus status = 1;
203    Rect size = 2;
204 }
205
206 message ReqClear{
207    string elementId = 1;
208 }
209 message RspClear{
210    RspStatus status = 1;
211 }
212
213 message ReqGetAttribute {
214    enum RequestType {
215       VISIBLE     = 0;
216       FOCUSABLE   = 1;
217       FOCUSED     = 2;
218       ENABLED     = 3;
219       CLICKABLE   = 4;
220       SCROLLABLE  = 5;
221       CHECKABLE   = 6;
222       CHECKED     = 7;
223       SELECTED    = 8;
224       SELECTABLE  = 9;
225       SHOWING     = 10;
226       ACTIVE      = 11;
227    }
228    string elementId = 1;
229    RequestType attribute = 2;
230 }
231 message RspGetAttribute {
232    RspStatus status = 1;
233    ParamType type = 2;
234    oneof params {
235       string stringValue = 3;
236       int32 intValue = 4;
237       double doubleValue = 5;
238       bool boolValue = 6;
239    }
240 }
241
242 // ------------------------------------ //
243
244 message ReqClick{
245    enum RequestType {
246       ELEMENTID = 0;
247       COORD = 1;
248       ATSPI = 2;
249    }
250    RequestType type  = 1;
251    oneof params {
252       string elementId = 2;
253       Point coordination = 3;
254    }
255 }
256 message RspClick{
257    RspStatus status = 1;
258 }
259
260 message ReqFlick{
261    Point startPoint = 1;
262    Point endPoint = 2;
263    int32 durationMs = 3;
264 }
265 message RspFlick{
266    RspStatus status = 1;
267 }
268
269 message ReqTouchDown{
270    Point coordination = 1;
271 }
272 message RspTouchDown{
273    RspStatus status = 1;
274    int32 seqId = 2;
275 }
276
277 message ReqTouchMove{
278    int32 seqId = 1;
279    Point coordination = 2;
280 }
281 message RspTouchMove{
282    RspStatus status = 1;
283 }
284
285 message ReqTouchUp{
286    int32 seqId = 1;
287    Point coordination = 2;
288 }
289 message RspTouchUp{
290    RspStatus status = 1;
291 }
292
293 // ------------------------------------ //
294
295 message ReqInstallApp{
296    bytes package = 1;
297 }
298 message RspInstallApp{
299    RspStatus status = 1;
300 }
301
302 message ReqRemoveApp{
303    string packageName = 1;
304 }
305 message RspRemoveApp{
306    RspStatus status = 1;
307 }
308
309 message ReqGetAppInfo{
310    string packageName = 1;
311 }
312 message RspGetAppInfo {
313    RspStatus status = 1;
314    bool isInstalled = 2;
315    bool isRunning = 3;
316    bool isFocused = 4;
317 }
318
319 message ReqLaunchApp{
320    string packageName = 1;
321 }
322 message RspLaunchApp{
323    RspStatus status = 1;
324 }
325
326 message ReqCloseApp{
327    string packageName = 1;
328 }
329 message RspCloseApp{
330    RspStatus status = 1;
331 }
332
333 // ------------------------------------ //
334
335 message ReqGetDeviceTime{
336    enum TimeType {
337       WALLCLOCK= 0;
338       SYSTEM = 1;
339    }
340    TimeType type = 1;
341 }
342 message RspGetDeviceTime{
343    RspStatus status = 1;
344    int64 timestampUTC = 2;
345    string localeDatetime = 3;
346 }
347
348 message ReqGetLocation{
349 }
350 message RspGetLocation{
351    RspStatus status = 1;
352    double alt = 2;
353    double lat = 3;
354 }
355
356 message ReqKey{
357    enum KeyType{
358       BACK = 0;
359       MENU = 1;
360       HOME = 2;
361       VOLUP = 3;
362       VOLDOWN = 4;
363       POWER = 5;
364       //KEY = 6;
365       XF86 = 7;
366       WHEELUP = 8;
367       WHEELDOWN = 9;
368    }
369    enum KeyActionType{
370       STROKE = 0;
371       LONG_STROKE = 1;
372       PRESS = 2;
373       RELEASE = 3;
374    }
375    KeyType type = 1;
376    KeyActionType actionType = 2;
377    //oneof keys {
378       //uint32 keyCode = 3;
379    string XF86keyCode = 4;
380    //}
381 }
382 message RspKey{
383    RspStatus status = 1;
384 }
385
386 message ReqTakeScreenshot{
387 }
388 message RspTakeScreenshot{
389    bytes image = 1;
390 }
391
392 // ------------------------------------ //
393
394 message ReqEmpty {
395 }
396 message RspEmpty {
397 }
398
399 // ------------------------------------ //
400
401 message ReqDumpObjectTree {
402    string elementId = 1;
403 }
404
405 message RspDumpObjectTree {
406    RspStatus status = 1;
407    repeated Element roots = 2;
408 }