summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--demo#3/common/agl-service-homescreen/CMakeLists.txt38
-rw-r--r--demo#3/common/agl-service-homescreen/Doxyfile2473
-rw-r--r--demo#3/common/agl-service-homescreen/LICENSE54
-rw-r--r--demo#3/common/agl-service-homescreen/README44
-rw-r--r--demo#3/common/agl-service-homescreen/doc/ApplicationGuide.md319
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/.keep0
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/annotated.html79
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/bc_s.pngbin0 -> 676 bytes
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/bdwn.pngbin0 -> 147 bytes
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/classes.html83
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/closed.pngbin0 -> 132 bytes
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/d0/d1e/homescreen_8c.html832
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/d0/d1e/homescreen_8c_source.html108
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/d0/d8a/libhomescreen_8cpp.html377
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/d0/d8a/libhomescreen_8cpp_source.html111
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/d3/d3d/hs-helper_8h.html473
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/d3/d3d/hs-helper_8h_source.html91
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/d7/df4/class_lib_home_screen-members.html101
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/dd/d1d/hs-helper_8c.html361
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/dd/d1d/hs-helper_8c_source.html91
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/dd/d86/structevent-members.html78
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/de/dd0/class_lib_home_screen.html844
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/df/d43/libhomescreen_8hpp.html96
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/df/d43/libhomescreen_8hpp_source.html102
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/df/d76/hmi-debug_8h.html435
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/df/d76/hmi-debug_8h_source.html87
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/df/d7d/structevent.html123
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/df/dac/test_8cpp.html334
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/df/dac/test_8cpp_source.html95
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/dir_0f70dc74e67ded1ed6ea12b5a24cac83.html83
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/dir_65f76d62445e9e84c0450b12bf77c3bc.html85
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html87
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/dir_a01af9eb3c502936dfd53c3f8e45721d.html87
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/dir_d44c64559bbebec7f509842c48db8b23.html85
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/doc.pngbin0 -> 746 bytes
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/doxygen.css1596
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/doxygen.pngbin0 -> 3779 bytes
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/dynsections.js104
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/files.html87
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/folderclosed.pngbin0 -> 616 bytes
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/folderopen.pngbin0 -> 597 bytes
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/functions.html146
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/functions_enum.html74
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/functions_eval.html80
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/functions_func.html119
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/functions_type.html74
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/functions_vars.html83
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/globals.html343
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/globals_defs.html99
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/globals_enum.html77
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/globals_eval.html104
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/globals_func.html211
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/globals_type.html74
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/globals_vars.html116
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/index.html73
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/jquery.js87
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/menu.js26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/menudata.js51
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/nav_f.pngbin0 -> 153 bytes
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/nav_g.pngbin0 -> 95 bytes
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/nav_h.pngbin0 -> 98 bytes
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/open.pngbin0 -> 123 bytes
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_0.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_0.js13
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_1.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_1.js7
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_10.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_10.js4
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_11.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_11.js4
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_12.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_12.js4
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_2.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_2.js6
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_3.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_3.js17
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_4.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_4.js6
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_5.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_5.js19
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_6.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_6.js4
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_7.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_7.js14
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_8.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_8.js4
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_9.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_9.js5
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_a.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_a.js16
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_b.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_b.js5
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_c.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_c.js7
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_d.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_d.js6
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_e.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_e.js6
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_f.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_f.js5
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/classes_0.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/classes_0.js4
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/classes_1.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/classes_1.js4
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/close.pngbin0 -> 273 bytes
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/defines_0.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/defines_0.js4
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/defines_1.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/defines_1.js4
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/defines_2.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/defines_2.js4
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/defines_3.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/defines_3.js4
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/defines_4.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/defines_4.js8
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enums_0.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enums_0.js4
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enums_1.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enums_1.js4
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enums_2.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enums_2.js4
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enumvalues_0.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enumvalues_0.js6
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enumvalues_1.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enumvalues_1.js10
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enumvalues_2.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enumvalues_2.js4
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enumvalues_3.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enumvalues_3.js4
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enumvalues_4.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enumvalues_4.js5
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/files_0.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/files_0.js7
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/files_1.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/files_1.js5
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/files_2.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/files_2.js4
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_0.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_0.js8
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_1.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_1.js5
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_2.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_2.js4
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_3.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_3.js6
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_4.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_4.js8
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_5.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_5.js4
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_6.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_6.js4
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_7.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_7.js4
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_8.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_8.js15
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_9.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_9.js5
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_a.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_a.js4
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_b.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_b.js6
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_c.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_c.js5
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_d.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_d.js5
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_e.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_e.js4
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/mag_sel.pngbin0 -> 563 bytes
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/nomatches.html12
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/search.css271
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/search.js791
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/search_l.pngbin0 -> 604 bytes
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/search_m.pngbin0 -> 158 bytes
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/search_r.pngbin0 -> 612 bytes
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/searchdata.js39
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/typedefs_0.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/typedefs_0.js4
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/typedefs_1.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/typedefs_1.js4
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/variables_0.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/variables_0.js7
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/variables_1.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/variables_1.js6
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/variables_2.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/variables_2.js11
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/variables_3.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/variables_3.js4
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/variables_4.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/variables_4.js4
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/variables_5.html26
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/search/variables_5.js4
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/splitbar.pngbin0 -> 314 bytes
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/sync_off.pngbin0 -> 853 bytes
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/sync_on.pngbin0 -> 845 bytes
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/tab_a.pngbin0 -> 142 bytes
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/tab_b.pngbin0 -> 169 bytes
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/tab_h.pngbin0 -> 177 bytes
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/tab_s.pngbin0 -> 184 bytes
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/html/tabs.css1
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/latex/annotated.tex5
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/latex/d0/d1e/homescreen_8c.tex599
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/latex/d0/d8a/libhomescreen_8cpp.tex157
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/latex/d3/d3d/hs-helper_8h.tex345
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/latex/dd/d1d/hs-helper_8c.tex238
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/latex/de/dd0/class_lib_home_screen.tex732
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/latex/df/d43/libhomescreen_8hpp.tex16
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/latex/df/d76/hmi-debug_8h.tex202
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/latex/df/d7d/structevent.tex44
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/latex/df/dac/test_8cpp.tex275
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/latex/dir_0f70dc74e67ded1ed6ea12b5a24cac83.tex7
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/latex/dir_65f76d62445e9e84c0450b12bf77c3bc.tex9
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/latex/dir_68267d1309a1af8e8297ef4c3efbcdba.tex11
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/latex/dir_a01af9eb3c502936dfd53c3f8e45721d.tex11
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/latex/dir_d44c64559bbebec7f509842c48db8b23.tex9
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/latex/doxygen.sty503
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/latex/files.tex10
-rw-r--r--demo#3/common/agl-service-homescreen/doc/api-ref/latex/refman.tex166
-rw-r--r--demo#3/common/agl-service-homescreen/doc/parts/.keep0
-rw-r--r--demo#3/common/agl-service-homescreen/doc/parts/initialize-registercallback.svg29
-rw-r--r--demo#3/common/agl-service-homescreen/doc/parts/initialize-set-event-handler.svg27
-rw-r--r--demo#3/common/agl-service-homescreen/doc/parts/initialize.svg34
-rw-r--r--demo#3/common/agl-service-homescreen/doc/parts/on_screen_message.svg36
-rw-r--r--demo#3/common/agl-service-homescreen/doc/parts/software-stack.pngbin0 -> 197208 bytes
-rw-r--r--demo#3/common/agl-service-homescreen/doc/parts/tap_shortcut.svg26
-rw-r--r--demo#3/common/agl-service-homescreen/package/root/config.xml20
-rw-r--r--demo#3/common/agl-service-homescreen/package/root/icon.svg283
-rw-r--r--demo#3/common/agl-service-homescreen/src/CMakeLists.txt69
-rw-r--r--demo#3/common/agl-service-homescreen/src/export.map1
-rw-r--r--demo#3/common/agl-service-homescreen/src/hmi-debug.h77
-rw-r--r--demo#3/common/agl-service-homescreen/src/homescreen.cpp449
-rw-r--r--demo#3/common/agl-service-homescreen/src/hs-client.cpp255
-rw-r--r--demo#3/common/agl-service-homescreen/src/hs-client.h52
-rw-r--r--demo#3/common/agl-service-homescreen/src/hs-clientmanager.cpp219
-rw-r--r--demo#3/common/agl-service-homescreen/src/hs-clientmanager.h66
-rw-r--r--demo#3/common/agl-service-homescreen/src/hs-helper.cpp246
-rw-r--r--demo#3/common/agl-service-homescreen/src/hs-helper.h48
-rw-r--r--demo#3/common/agl-service-windowmanager/CMakeLists.txt68
-rw-r--r--demo#3/common/agl-service-windowmanager/LICENSE177
-rw-r--r--demo#3/common/agl-service-windowmanager/LICENSE.MIT20
-rw-r--r--demo#3/common/agl-service-windowmanager/README.md14
-rwxr-xr-xdemo#3/common/agl-service-windowmanager/change_to_slave_mode.sh5
-rw-r--r--demo#3/common/agl-service-windowmanager/doc/ApplicationGuide.md757
-rw-r--r--demo#3/common/agl-service-windowmanager/export.map1
-rw-r--r--demo#3/common/agl-service-windowmanager/layers.json47
-rw-r--r--demo#3/common/agl-service-windowmanager/layers_setting.json69
-rw-r--r--demo#3/common/agl-service-windowmanager/package/root/config.xml21
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/CMakeLists.txt104
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/config/layouts.json371
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/config/roles.json52
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/config/roles.json.zipc52
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/config/roles.json.zipc.split151
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/policy_manager.cpp1677
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/policy_manager.hpp174
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/stm.c176
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/stm.h233
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/stub/CMakeLists.txt44
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/stub/stm_inner.c185
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/stub/stm_inner.h27
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/CMakeLists.txt95
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/Common/Event.h6
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/Common/MisraCType.h16
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/Common/ZCommonInclude.h16
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/AccelPedal/ZACCEL_AccelPedal.c117
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/AccelPedal/ZACCEL_AccelPedal.h41
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/AccelPedal/ZACCEL_AccelPedalState_func.c45
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/AccelPedal/ZACCEL_AccelPedalState_func.h14
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/AppsLayer/ZAPL_AppsLayer.c1991
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/AppsLayer/ZAPL_AppsLayer.h123
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/AppsLayer/ZAPL_Apps_func.c128
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/AppsLayer/ZAPL_Apps_func.h22
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/CarState/ZCAR_CarState.c154
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/CarState/ZCAR_CarState.h45
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/CarState/ZCAR_CarState_func.c45
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/CarState/ZCAR_CarState_func.h14
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/HomeScreenLayer/ZHSL_HomeScreen.c112
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/HomeScreenLayer/ZHSL_HomeScreen.h39
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/HomeScreenLayer/ZHSL_HomeScreen_func.c45
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/HomeScreenLayer/ZHSL_HomeScreen_func.h14
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/LightStatusBrake/ZLIGHT_LightstatusBrake.c117
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/LightStatusBrake/ZLIGHT_LightstatusBrake.h41
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/LightStatusBrake/ZLIGHT_LightstatusBrakeStatus_func.c45
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/LightStatusBrake/ZLIGHT_LightstatusBrakeStatus_func.h14
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/NearHomeScreen/ZNHL_NearHomeScreen_func.c65
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/NearHomeScreen/ZNHL_NearHomeScreen_func.h16
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/NearHomeScreen/ZNHL_NearHomescreen.c220
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/NearHomeScreen/ZNHL_NearHomescreen.h53
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/OnScreenlayer/ZOSL_OnScreen_func.c72
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/OnScreenlayer/ZOSL_OnScreen_func.h17
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/OnScreenlayer/ZOSL_OslMain.c718
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/OnScreenlayer/ZOSL_OslMain.h82
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/RestrictionLayer/ZREL_RelMain.c1003
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/RestrictionLayer/ZREL_RelMain.h94
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/RestrictionLayer/ZREL_Restriction_func.c81
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/RestrictionLayer/ZREL_Restriction_func.h18
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/RestrictionMode/ZREM_RestrictionMode.c117
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/RestrictionMode/ZREM_RestrictionMode.h41
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/RestrictionMode/ZREM_RestrictionMode_func.c45
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/RestrictionMode/ZREM_RestrictionMode_func.h14
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/ZST_StateTransitionor_def.h15
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/ZST_StateTransitionor_func.c178
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/ZST_StateTransitionor_func.h13
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/ZST_StateTransitionor_var.c56
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/ZST_StateTransitionor_var.h20
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/ZST_include.h39
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/master/layer/apps/Zmaster_apps_apps_main.c1456
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/master/layer/apps/Zmaster_apps_apps_main.h111
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/master/layer/apps/Zmaster_apps_master_apps_def.h15
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/master/layer/remote/Zmaster_remote_master_remote_def.h15
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/master/layer/remote/Zmaster_remote_remote.c206
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/master/layer/remote/Zmaster_remote_remote.h45
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/stm_inner.h22
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/stm_master_apps.c63
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/stm_master_apps.h11
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/stm_master_remote.c29
-rw-r--r--demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/stm_master_remote.h4
-rw-r--r--demo#3/common/agl-service-windowmanager/protocol/ivi-wm.xml608
-rw-r--r--demo#3/common/agl-service-windowmanager/src/CMakeLists.txt124
-rw-r--r--demo#3/common/agl-service-windowmanager/src/applist.cpp635
-rw-r--r--demo#3/common/agl-service-windowmanager/src/applist.hpp99
-rw-r--r--demo#3/common/agl-service-windowmanager/src/config/areas.json204
-rw-r--r--demo#3/common/agl-service-windowmanager/src/config/connection.json5
-rw-r--r--demo#3/common/agl-service-windowmanager/src/config/old_roles.json68
-rw-r--r--demo#3/common/agl-service-windowmanager/src/controller_hooks.hpp42
-rw-r--r--demo#3/common/agl-service-windowmanager/src/json_helper.cpp149
-rw-r--r--demo#3/common/agl-service-windowmanager/src/json_helper.hpp34
-rw-r--r--demo#3/common/agl-service-windowmanager/src/layers.cpp382
-rw-r--r--demo#3/common/agl-service-windowmanager/src/layers.hpp174
-rw-r--r--demo#3/common/agl-service-windowmanager/src/low_can_client.cpp187
-rw-r--r--demo#3/common/agl-service-windowmanager/src/low_can_client.hpp113
-rw-r--r--demo#3/common/agl-service-windowmanager/src/main.cpp844
-rw-r--r--demo#3/common/agl-service-windowmanager/src/pm_wrapper.cpp439
-rw-r--r--demo#3/common/agl-service-windowmanager/src/pm_wrapper.hpp76
-rw-r--r--demo#3/common/agl-service-windowmanager/src/request.cpp51
-rw-r--r--demo#3/common/agl-service-windowmanager/src/request.hpp109
-rw-r--r--demo#3/common/agl-service-windowmanager/src/result.hpp86
-rw-r--r--demo#3/common/agl-service-windowmanager/src/util.cpp172
-rw-r--r--demo#3/common/agl-service-windowmanager/src/util.hpp125
-rw-r--r--demo#3/common/agl-service-windowmanager/src/wayland_ivi_wm.cpp724
-rw-r--r--demo#3/common/agl-service-windowmanager/src/wayland_ivi_wm.hpp327
-rw-r--r--demo#3/common/agl-service-windowmanager/src/window_manager.cpp2326
-rw-r--r--demo#3/common/agl-service-windowmanager/src/window_manager.hpp346
-rw-r--r--demo#3/common/agl-service-windowmanager/src/wm_client.cpp271
-rw-r--r--demo#3/common/agl-service-windowmanager/src/wm_client.hpp92
-rw-r--r--demo#3/common/agl-service-windowmanager/src/wm_connection.cpp457
-rw-r--r--demo#3/common/agl-service-windowmanager/src/wm_connection.hpp64
-rw-r--r--demo#3/common/agl-service-windowmanager/src/wm_error.cpp46
-rw-r--r--demo#3/common/agl-service-windowmanager/src/wm_error.hpp41
-rw-r--r--demo#3/common/agl-service-windowmanager/src/wm_layer.cpp271
-rw-r--r--demo#3/common/agl-service-windowmanager/src/wm_layer.hpp104
-rw-r--r--demo#3/common/agl-service-windowmanager/src/wm_layer_control.cpp911
-rw-r--r--demo#3/common/agl-service-windowmanager/src/wm_layer_control.hpp118
-rw-r--r--demo#3/common/agl-service-windowmanager/tests/wm-request74
-rw-r--r--demo#3/common/libhomescreen/CMakeLists.txt43
-rw-r--r--demo#3/common/libhomescreen/LICENSE54
-rw-r--r--demo#3/common/libhomescreen/README.md29
-rw-r--r--demo#3/common/libhomescreen/include/CMakeLists.txt19
-rw-r--r--demo#3/common/libhomescreen/include/hmi-debug.h70
-rw-r--r--demo#3/common/libhomescreen/include/libhomescreen.hpp101
-rw-r--r--demo#3/common/libhomescreen/libhomescreen.pc.in12
-rw-r--r--demo#3/common/libhomescreen/sample/simple-egl/CMakeLists.txt70
-rw-r--r--demo#3/common/libhomescreen/sample/simple-egl/LICENSE.APL-2.0204
-rw-r--r--demo#3/common/libhomescreen/sample/simple-egl/LICENSE.MIT23
-rw-r--r--demo#3/common/libhomescreen/sample/simple-egl/README.md27
-rw-r--r--demo#3/common/libhomescreen/sample/simple-egl/include/hmi-debug.h70
-rw-r--r--demo#3/common/libhomescreen/sample/simple-egl/include/platform.h115
-rw-r--r--demo#3/common/libhomescreen/sample/simple-egl/package/hvac/config.xml16
-rw-r--r--demo#3/common/libhomescreen/sample/simple-egl/package/hvac/icon.svg279
-rw-r--r--demo#3/common/libhomescreen/sample/simple-egl/package/navi/config.xml16
-rw-r--r--demo#3/common/libhomescreen/sample/simple-egl/package/navi/icon.svg279
-rw-r--r--demo#3/common/libhomescreen/sample/simple-egl/package/root/config.xml16
-rw-r--r--demo#3/common/libhomescreen/sample/simple-egl/package/root/icon.svg279
-rw-r--r--demo#3/common/libhomescreen/sample/simple-egl/src/simple-egl.cpp681
-rw-r--r--demo#3/common/libhomescreen/sample/template/LICENSE.APL-2.0204
-rw-r--r--demo#3/common/libhomescreen/sample/template/README.md25
-rw-r--r--demo#3/common/libhomescreen/sample/template/main.cpp225
-rw-r--r--demo#3/common/libhomescreen/sample/template/smhandler.cpp157
-rw-r--r--demo#3/common/libhomescreen/sample/template/smhandler.h58
-rw-r--r--demo#3/common/libhomescreen/sample/template/wmhandler.cpp39
-rw-r--r--demo#3/common/libhomescreen/sample/template/wmhandler.h47
-rw-r--r--demo#3/common/libhomescreen/src/CMakeLists.txt48
-rw-r--r--demo#3/common/libhomescreen/src/libhomescreen.cpp643
-rw-r--r--demo#3/common/libqthomescreen/LICENSE177
-rw-r--r--demo#3/common/libqthomescreen/qlibhomescreen.pro17
-rw-r--r--demo#3/common/libqthomescreen/src/hmi-debug.h70
-rw-r--r--demo#3/common/libqthomescreen/src/qlibhomescreen.cpp252
-rw-r--r--demo#3/common/libqthomescreen/src/qlibhomescreen.h61
-rw-r--r--demo#3/common/libqthomescreen/src/src.pro41
-rw-r--r--demo#3/common/libqtwindowmanager/LICENSE177
-rw-r--r--demo#3/common/libqtwindowmanager/qlibwindowmanager.pro17
-rw-r--r--demo#3/common/libqtwindowmanager/src/qlibwindowmanager.cpp126
-rw-r--r--demo#3/common/libqtwindowmanager/src/qlibwindowmanager.h131
-rw-r--r--demo#3/common/libqtwindowmanager/src/src.pro41
-rw-r--r--demo#3/common/libwindowmanager/CMakeLists.txt46
-rw-r--r--demo#3/common/libwindowmanager/LICENSE177
-rw-r--r--demo#3/common/libwindowmanager/libwindowmanager.pc.in11
-rw-r--r--demo#3/common/libwindowmanager/src/CMakeLists.txt80
-rw-r--r--demo#3/common/libwindowmanager/src/hmi-debug.h70
-rw-r--r--demo#3/common/libwindowmanager/src/libwindowmanager.cpp1218
-rw-r--r--demo#3/common/libwindowmanager/src/libwindowmanager.h168
399 files changed, 50507 insertions, 0 deletions
diff --git a/demo#3/common/agl-service-homescreen/CMakeLists.txt b/demo#3/common/agl-service-homescreen/CMakeLists.txt
new file mode 100644
index 0000000..a854b43
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/CMakeLists.txt
@@ -0,0 +1,38 @@
+#
+# Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+project(HomeScreenService C CXX)
+
+cmake_minimum_required(VERSION 3.0)
+
+set(PROJECT_NAME "HomeScreen Service 2017")
+set(PROJECT_VERSION "1.0")
+set(PROJECT_PRETTY_NAME "HM")
+set(PROJECT_DESCRIPTION "HomeScreen Service 2017")
+set(PROJECT_INCLUDEDIR ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR})
+set(PROJECT_LIBDIR ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR})
+set(binding_install_dir ${PREFIX}/lib/homescreen)
+set(PROJECT_BINDINGDIR ${binding_install_dir})
+
+# get pkgconfig
+INCLUDE(FindPkgConfig)
+link_libraries(-Wl,--as-needed -Wl,--gc-sections -Wl,--no-undefined)
+
+set(CMAKE_BUILD_TYPE Debug)
+set(DEBUGMODE "1")
+add_definitions(-DDEBUGMODE)
+
+add_subdirectory(src)
diff --git a/demo#3/common/agl-service-homescreen/Doxyfile b/demo#3/common/agl-service-homescreen/Doxyfile
new file mode 100644
index 0000000..8f33ce1
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/Doxyfile
@@ -0,0 +1,2473 @@
+# Doxyfile 1.8.13
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project.
+#
+# All text after a double hash (##) is considered a comment and is placed in
+# front of the TAG it is preceding.
+#
+# All text after a single hash (#) is considered a comment and will be ignored.
+# The format is:
+# TAG = value [value, ...]
+# For lists, items can also be appended using:
+# TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (\" \").
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the config file
+# that follow. The default is UTF-8 which is also the encoding used for all text
+# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv
+# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
+# for the list of possible encodings.
+# The default value is: UTF-8.
+
+DOXYFILE_ENCODING = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by
+# double-quotes, unless you are using Doxywizard) that should identify the
+# project for which the documentation is generated. This name is used in the
+# title of most generated pages and in a few other places.
+# The default value is: My Project.
+
+PROJECT_NAME = "HomeScreenBinding"
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
+# could be handy for archiving the generated documentation or if some version
+# control system is used.
+
+PROJECT_NUMBER =
+
+# Using the PROJECT_BRIEF tag one can provide an optional one line description
+# for a project that appears at the top of each page and should give viewer a
+# quick idea about the purpose of the project. Keep the description short.
+
+PROJECT_BRIEF =
+
+# With the PROJECT_LOGO tag one can specify a logo or an icon that is included
+# in the documentation. The maximum height of the logo should not exceed 55
+# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
+# the logo to the output directory.
+
+PROJECT_LOGO =
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
+# into which the generated documentation will be written. If a relative path is
+# entered, it will be relative to the location where doxygen was started. If
+# left blank the current directory will be used.
+
+OUTPUT_DIRECTORY = ./doc/api-ref
+
+# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
+# directories (in 2 levels) under the output directory of each output format and
+# will distribute the generated files over these directories. Enabling this
+# option can be useful when feeding doxygen a huge amount of source files, where
+# putting all generated files in the same directory would otherwise causes
+# performance problems for the file system.
+# The default value is: NO.
+
+CREATE_SUBDIRS = YES
+
+# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII
+# characters to appear in the names of generated files. If set to NO, non-ASCII
+# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode
+# U+3044.
+# The default value is: NO.
+
+ALLOW_UNICODE_NAMES = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese,
+# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States),
+# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian,
+# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages),
+# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian,
+# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian,
+# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish,
+# Ukrainian and Vietnamese.
+# The default value is: English.
+
+OUTPUT_LANGUAGE = English
+
+# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member
+# descriptions after the members that are listed in the file and class
+# documentation (similar to Javadoc). Set to NO to disable this.
+# The default value is: YES.
+
+BRIEF_MEMBER_DESC = YES
+
+# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief
+# description of a member or function before the detailed description
+#
+# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
+# The default value is: YES.
+
+REPEAT_BRIEF = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator that is
+# used to form the text in various listings. Each string in this list, if found
+# as the leading text of the brief description, will be stripped from the text
+# and the result, after processing the whole list, is used as the annotated
+# text. Otherwise, the brief description is used as-is. If left blank, the
+# following values are used ($name is automatically replaced with the name of
+# the entity):The $name class, The $name widget, The $name file, is, provides,
+# specifies, contains, represents, a, an and the.
+
+ABBREVIATE_BRIEF = "The $name class" \
+ "The $name widget" \
+ "The $name file" \
+ is \
+ provides \
+ specifies \
+ contains \
+ represents \
+ a \
+ an \
+ the
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# doxygen will generate a detailed section even if there is only a brief
+# description.
+# The default value is: NO.
+
+ALWAYS_DETAILED_SEC = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
+# inherited members of a class in the documentation of that class as if those
+# members were ordinary class members. Constructors, destructors and assignment
+# operators of the base classes will not be shown.
+# The default value is: NO.
+
+INLINE_INHERITED_MEMB = NO
+
+# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path
+# before files name in the file list and in the header files. If set to NO the
+# shortest path that makes the file name unique will be used
+# The default value is: YES.
+
+FULL_PATH_NAMES = YES
+
+# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
+# Stripping is only done if one of the specified strings matches the left-hand
+# part of the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the path to
+# strip.
+#
+# Note that you can specify absolute paths here, but also relative paths, which
+# will be relative from the directory where doxygen is started.
+# This tag requires that the tag FULL_PATH_NAMES is set to YES.
+
+STRIP_FROM_PATH =
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
+# path mentioned in the documentation of a class, which tells the reader which
+# header file to include in order to use a class. If left blank only the name of
+# the header file containing the class definition is used. Otherwise one should
+# specify the list of include paths that are normally passed to the compiler
+# using the -I flag.
+
+STRIP_FROM_INC_PATH =
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
+# less readable) file names. This can be useful is your file systems doesn't
+# support long names like on DOS, Mac, or CD-ROM.
+# The default value is: NO.
+
+SHORT_NAMES = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the
+# first line (until the first dot) of a Javadoc-style comment as the brief
+# description. If set to NO, the Javadoc-style will behave just like regular Qt-
+# style comments (thus requiring an explicit @brief command for a brief
+# description.)
+# The default value is: NO.
+
+JAVADOC_AUTOBRIEF = NO
+
+# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
+# line (until the first dot) of a Qt-style comment as the brief description. If
+# set to NO, the Qt-style will behave just like regular Qt-style comments (thus
+# requiring an explicit \brief command for a brief description.)
+# The default value is: NO.
+
+QT_AUTOBRIEF = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a
+# multi-line C++ special comment block (i.e. a block of //! or /// comments) as
+# a brief description. This used to be the default behavior. The new default is
+# to treat a multi-line C++ comment block as a detailed description. Set this
+# tag to YES if you prefer the old behavior instead.
+#
+# Note that setting this tag to YES also means that rational rose comments are
+# not recognized any more.
+# The default value is: NO.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the
+# documentation from any documented member that it re-implements.
+# The default value is: YES.
+
+INHERIT_DOCS = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new
+# page for each member. If set to NO, the documentation of a member will be part
+# of the file/class/namespace that contains it.
+# The default value is: NO.
+
+SEPARATE_MEMBER_PAGES = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen
+# uses this value to replace tabs by spaces in code fragments.
+# Minimum value: 1, maximum value: 16, default value: 4.
+
+TAB_SIZE = 4
+
+# This tag can be used to specify a number of aliases that act as commands in
+# the documentation. An alias has the form:
+# name=value
+# For example adding
+# "sideeffect=@par Side Effects:\n"
+# will allow you to put the command \sideeffect (or @sideeffect) in the
+# documentation, which will result in a user-defined paragraph with heading
+# "Side Effects:". You can put \n's in the value part of an alias to insert
+# newlines.
+
+ALIASES =
+
+# This tag can be used to specify a number of word-keyword mappings (TCL only).
+# A mapping has the form "name=value". For example adding "class=itcl::class"
+# will allow you to use the command class in the itcl::class meaning.
+
+TCL_SUBST =
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
+# only. Doxygen will then generate output that is more tailored for C. For
+# instance, some of the names that are used will be different. The list of all
+# members will be omitted, etc.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_FOR_C = NO
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or
+# Python sources only. Doxygen will then generate output that is more tailored
+# for that language. For instance, namespaces will be presented as packages,
+# qualified scopes will look different, etc.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_JAVA = NO
+
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
+# sources. Doxygen will then generate output that is tailored for Fortran.
+# The default value is: NO.
+
+OPTIMIZE_FOR_FORTRAN = NO
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
+# sources. Doxygen will then generate output that is tailored for VHDL.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_VHDL = NO
+
+# Doxygen selects the parser to use depending on the extension of the files it
+# parses. With this tag you can assign which parser to use for a given
+# extension. Doxygen has a built-in mapping, but you can override or extend it
+# using this tag. The format is ext=language, where ext is a file extension, and
+# language is one of the parsers supported by doxygen: IDL, Java, Javascript,
+# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran:
+# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran:
+# Fortran. In the later case the parser tries to guess whether the code is fixed
+# or free formatted code, this is the default for Fortran type files), VHDL. For
+# instance to make doxygen treat .inc files as Fortran files (default is PHP),
+# and .f files as C (default is Fortran), use: inc=Fortran f=C.
+#
+# Note: For files without extension you can use no_extension as a placeholder.
+#
+# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
+# the files are not read by doxygen.
+
+EXTENSION_MAPPING =
+
+# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
+# according to the Markdown format, which allows for more readable
+# documentation. See http://daringfireball.net/projects/markdown/ for details.
+# The output of markdown processing is further processed by doxygen, so you can
+# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
+# case of backward compatibilities issues.
+# The default value is: YES.
+
+MARKDOWN_SUPPORT = YES
+
+# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up
+# to that level are automatically included in the table of contents, even if
+# they do not have an id attribute.
+# Note: This feature currently applies only to Markdown headings.
+# Minimum value: 0, maximum value: 99, default value: 0.
+# This tag requires that the tag MARKDOWN_SUPPORT is set to YES.
+
+TOC_INCLUDE_HEADINGS = 0
+
+# When enabled doxygen tries to link words that correspond to documented
+# classes, or namespaces to their corresponding documentation. Such a link can
+# be prevented in individual cases by putting a % sign in front of the word or
+# globally by setting AUTOLINK_SUPPORT to NO.
+# The default value is: YES.
+
+AUTOLINK_SUPPORT = YES
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
+# to include (a tag file for) the STL sources as input, then you should set this
+# tag to YES in order to let doxygen match functions declarations and
+# definitions whose arguments contain STL classes (e.g. func(std::string);
+# versus func(std::string) {}). This also make the inheritance and collaboration
+# diagrams that involve STL classes more complete and accurate.
+# The default value is: NO.
+
+BUILTIN_STL_SUPPORT = NO
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to
+# enable parsing support.
+# The default value is: NO.
+
+CPP_CLI_SUPPORT = NO
+
+# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
+# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
+# will parse them like normal C++ but will assume all classes use public instead
+# of private inheritance when no explicit protection keyword is present.
+# The default value is: NO.
+
+SIP_SUPPORT = NO
+
+# For Microsoft's IDL there are propget and propput attributes to indicate
+# getter and setter methods for a property. Setting this option to YES will make
+# doxygen to replace the get and set methods by a property in the documentation.
+# This will only work if the methods are indeed getting or setting a simple
+# type. If this is not the case, or you want to show the methods anyway, you
+# should set this option to NO.
+# The default value is: YES.
+
+IDL_PROPERTY_SUPPORT = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+# The default value is: NO.
+
+DISTRIBUTE_GROUP_DOC = NO
+
+# If one adds a struct or class to a group and this option is enabled, then also
+# any nested class or struct is added to the same group. By default this option
+# is disabled and one has to add nested compounds explicitly via \ingroup.
+# The default value is: NO.
+
+GROUP_NESTED_COMPOUNDS = NO
+
+# Set the SUBGROUPING tag to YES to allow class member groups of the same type
+# (for instance a group of public functions) to be put as a subgroup of that
+# type (e.g. under the Public Functions section). Set it to NO to prevent
+# subgrouping. Alternatively, this can be done per class using the
+# \nosubgrouping command.
+# The default value is: YES.
+
+SUBGROUPING = YES
+
+# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions
+# are shown inside the group in which they are included (e.g. using \ingroup)
+# instead of on a separate page (for HTML and Man pages) or section (for LaTeX
+# and RTF).
+#
+# Note that this feature does not work in combination with
+# SEPARATE_MEMBER_PAGES.
+# The default value is: NO.
+
+INLINE_GROUPED_CLASSES = NO
+
+# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions
+# with only public data fields or simple typedef fields will be shown inline in
+# the documentation of the scope in which they are defined (i.e. file,
+# namespace, or group documentation), provided this scope is documented. If set
+# to NO, structs, classes, and unions are shown on a separate page (for HTML and
+# Man pages) or section (for LaTeX and RTF).
+# The default value is: NO.
+
+INLINE_SIMPLE_STRUCTS = NO
+
+# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or
+# enum is documented as struct, union, or enum with the name of the typedef. So
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
+# with name TypeT. When disabled the typedef will appear as a member of a file,
+# namespace, or class. And the struct will be named TypeS. This can typically be
+# useful for C code in case the coding convention dictates that all compound
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+# The default value is: NO.
+
+TYPEDEF_HIDES_STRUCT = NO
+
+# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This
+# cache is used to resolve symbols given their name and scope. Since this can be
+# an expensive process and often the same symbol appears multiple times in the
+# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small
+# doxygen will become slower. If the cache is too large, memory is wasted. The
+# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range
+# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536
+# symbols. At the end of a run doxygen will report the cache usage and suggest
+# the optimal cache size from a speed point of view.
+# Minimum value: 0, maximum value: 9, default value: 0.
+
+LOOKUP_CACHE_SIZE = 0
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in
+# documentation are documented, even if no documentation was available. Private
+# class members and static file members will be hidden unless the
+# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES.
+# Note: This will also disable the warnings about undocumented members that are
+# normally produced when WARNINGS is set to YES.
+# The default value is: NO.
+
+EXTRACT_ALL = YES
+
+# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will
+# be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PRIVATE = NO
+
+# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal
+# scope will be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PACKAGE = NO
+
+# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be
+# included in the documentation.
+# The default value is: NO.
+
+EXTRACT_STATIC = YES
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined
+# locally in source files will be included in the documentation. If set to NO,
+# only classes defined in header files are included. Does not have any effect
+# for Java sources.
+# The default value is: YES.
+
+EXTRACT_LOCAL_CLASSES = YES
+
+# This flag is only useful for Objective-C code. If set to YES, local methods,
+# which are defined in the implementation section but not in the interface are
+# included in the documentation. If set to NO, only methods in the interface are
+# included.
+# The default value is: NO.
+
+EXTRACT_LOCAL_METHODS = NO
+
+# If this flag is set to YES, the members of anonymous namespaces will be
+# extracted and appear in the documentation as a namespace called
+# 'anonymous_namespace{file}', where file will be replaced with the base name of
+# the file that contains the anonymous namespace. By default anonymous namespace
+# are hidden.
+# The default value is: NO.
+
+EXTRACT_ANON_NSPACES = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
+# undocumented members inside documented classes or files. If set to NO these
+# members will be included in the various overviews, but no documentation
+# section is generated. This option has no effect if EXTRACT_ALL is enabled.
+# The default value is: NO.
+
+HIDE_UNDOC_MEMBERS = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy. If set
+# to NO, these classes will be included in the various overviews. This option
+# has no effect if EXTRACT_ALL is enabled.
+# The default value is: NO.
+
+HIDE_UNDOC_CLASSES = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
+# (class|struct|union) declarations. If set to NO, these declarations will be
+# included in the documentation.
+# The default value is: NO.
+
+HIDE_FRIEND_COMPOUNDS = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any
+# documentation blocks found inside the body of a function. If set to NO, these
+# blocks will be appended to the function's detailed documentation block.
+# The default value is: NO.
+
+HIDE_IN_BODY_DOCS = NO
+
+# The INTERNAL_DOCS tag determines if documentation that is typed after a
+# \internal command is included. If the tag is set to NO then the documentation
+# will be excluded. Set it to YES to include the internal documentation.
+# The default value is: NO.
+
+INTERNAL_DOCS = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file
+# names in lower-case letters. If set to YES, upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
+# and Mac users are advised to set this option to NO.
+# The default value is: system dependent.
+
+CASE_SENSE_NAMES = NO
+
+# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with
+# their full class and namespace scopes in the documentation. If set to YES, the
+# scope will be hidden.
+# The default value is: NO.
+
+HIDE_SCOPE_NAMES = NO
+
+# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will
+# append additional text to a page's title, such as Class Reference. If set to
+# YES the compound reference will be hidden.
+# The default value is: NO.
+
+HIDE_COMPOUND_REFERENCE= NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of
+# the files that are included by a file in the documentation of that file.
+# The default value is: YES.
+
+SHOW_INCLUDE_FILES = YES
+
+# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each
+# grouped member an include statement to the documentation, telling the reader
+# which file to include in order to use the member.
+# The default value is: NO.
+
+SHOW_GROUPED_MEMB_INC = NO
+
+# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include
+# files with double quotes in the documentation rather than with sharp brackets.
+# The default value is: NO.
+
+FORCE_LOCAL_INCLUDES = NO
+
+# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the
+# documentation for inline members.
+# The default value is: YES.
+
+INLINE_INFO = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the
+# (detailed) documentation of file and class members alphabetically by member
+# name. If set to NO, the members will appear in declaration order.
+# The default value is: YES.
+
+SORT_MEMBER_DOCS = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
+# descriptions of file, namespace and class members alphabetically by member
+# name. If set to NO, the members will appear in declaration order. Note that
+# this will also influence the order of the classes in the class list.
+# The default value is: NO.
+
+SORT_BRIEF_DOCS = NO
+
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the
+# (brief and detailed) documentation of class members so that constructors and
+# destructors are listed first. If set to NO the constructors will appear in the
+# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS.
+# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief
+# member documentation.
+# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting
+# detailed member documentation.
+# The default value is: NO.
+
+SORT_MEMBERS_CTORS_1ST = NO
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy
+# of group names into alphabetical order. If set to NO the group names will
+# appear in their defined order.
+# The default value is: NO.
+
+SORT_GROUP_NAMES = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by
+# fully-qualified names, including namespaces. If set to NO, the class list will
+# be sorted only by class name, not including the namespace part.
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the alphabetical
+# list.
+# The default value is: NO.
+
+SORT_BY_SCOPE_NAME = NO
+
+# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper
+# type resolution of all parameters of a function it will reject a match between
+# the prototype and the implementation of a member function even if there is
+# only one candidate or it is obvious which candidate to choose by doing a
+# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still
+# accept a match between prototype and implementation in such cases.
+# The default value is: NO.
+
+STRICT_PROTO_MATCHING = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo
+# list. This list is created by putting \todo commands in the documentation.
+# The default value is: YES.
+
+GENERATE_TODOLIST = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test
+# list. This list is created by putting \test commands in the documentation.
+# The default value is: YES.
+
+GENERATE_TESTLIST = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug
+# list. This list is created by putting \bug commands in the documentation.
+# The default value is: YES.
+
+GENERATE_BUGLIST = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO)
+# the deprecated list. This list is created by putting \deprecated commands in
+# the documentation.
+# The default value is: YES.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional documentation
+# sections, marked by \if <section_label> ... \endif and \cond <section_label>
+# ... \endcond blocks.
+
+ENABLED_SECTIONS =
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the
+# initial value of a variable or macro / define can have for it to appear in the
+# documentation. If the initializer consists of more lines than specified here
+# it will be hidden. Use a value of 0 to hide initializers completely. The
+# appearance of the value of individual variables and macros / defines can be
+# controlled using \showinitializer or \hideinitializer command in the
+# documentation regardless of this setting.
+# Minimum value: 0, maximum value: 10000, default value: 30.
+
+MAX_INITIALIZER_LINES = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at
+# the bottom of the documentation of classes and structs. If set to YES, the
+# list will mention the files that were used to generate the documentation.
+# The default value is: YES.
+
+SHOW_USED_FILES = YES
+
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This
+# will remove the Files entry from the Quick Index and from the Folder Tree View
+# (if specified).
+# The default value is: YES.
+
+SHOW_FILES = YES
+
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces
+# page. This will remove the Namespaces entry from the Quick Index and from the
+# Folder Tree View (if specified).
+# The default value is: YES.
+
+SHOW_NAMESPACES = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that
+# doxygen should invoke to get the current version for each file (typically from
+# the version control system). Doxygen will invoke the program by executing (via
+# popen()) the command command input-file, where command is the value of the
+# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided
+# by doxygen. Whatever the program writes to standard output is used as the file
+# version. For an example see the documentation.
+
+FILE_VERSION_FILTER =
+
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
+# by doxygen. The layout file controls the global structure of the generated
+# output files in an output format independent way. To create the layout file
+# that represents doxygen's defaults, run doxygen with the -l option. You can
+# optionally specify a file name after the option, if omitted DoxygenLayout.xml
+# will be used as the name of the layout file.
+#
+# Note that if you run doxygen from a directory containing a file called
+# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
+# tag is left empty.
+
+LAYOUT_FILE =
+
+# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
+# the reference definitions. This must be a list of .bib files. The .bib
+# extension is automatically appended if omitted. This requires the bibtex tool
+# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info.
+# For LaTeX the style of the bibliography can be controlled using
+# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
+# search path. See also \cite for info how to create references.
+
+CITE_BIB_FILES =
+
+#---------------------------------------------------------------------------
+# Configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated to
+# standard output by doxygen. If QUIET is set to YES this implies that the
+# messages are off.
+# The default value is: NO.
+
+QUIET = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES
+# this implies that the warnings are on.
+#
+# Tip: Turn warnings on while writing the documentation.
+# The default value is: YES.
+
+WARNINGS = YES
+
+# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate
+# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag
+# will automatically be disabled.
+# The default value is: YES.
+
+WARN_IF_UNDOCUMENTED = YES
+
+# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some parameters
+# in a documented function, or documenting parameters that don't exist or using
+# markup commands wrongly.
+# The default value is: YES.
+
+WARN_IF_DOC_ERROR = YES
+
+# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
+# are documented, but have no documentation for their parameters or return
+# value. If set to NO, doxygen will only warn about wrong or incomplete
+# parameter documentation, but not about the absence of documentation.
+# The default value is: NO.
+
+WARN_NO_PARAMDOC = NO
+
+# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when
+# a warning is encountered.
+# The default value is: NO.
+
+WARN_AS_ERROR = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that doxygen
+# can produce. The string should contain the $file, $line, and $text tags, which
+# will be replaced by the file and line number from which the warning originated
+# and the warning text. Optionally the format may contain $version, which will
+# be replaced by the version of the file (if it could be obtained via
+# FILE_VERSION_FILTER)
+# The default value is: $file:$line: $text.
+
+WARN_FORMAT = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning and error
+# messages should be written. If left blank the output is written to standard
+# error (stderr).
+
+WARN_LOGFILE =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag is used to specify the files and/or directories that contain
+# documented source files. You may enter file names like myfile.cpp or
+# directories like /usr/src/myproject. Separate the files or directories with
+# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
+# Note: If this tag is empty the current directory is searched.
+
+INPUT = ./include ./libhomescreen ./src
+
+# This tag can be used to specify the character encoding of the source files
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
+# libiconv (or the iconv built into libc) for the transcoding. See the libiconv
+# documentation (see: http://www.gnu.org/software/libiconv) for the list of
+# possible encodings.
+# The default value is: UTF-8.
+
+INPUT_ENCODING = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and
+# *.h) to filter out the source-files in the directories.
+#
+# Note that for custom extensions or not directly supported extensions you also
+# need to set EXTENSION_MAPPING for the extension otherwise the files are not
+# read by doxygen.
+#
+# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp,
+# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h,
+# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc,
+# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f95, *.f03, *.f08,
+# *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf and *.qsf.
+
+FILE_PATTERNS = *.c \
+ *.cc \
+ *.cxx \
+ *.cpp \
+ *.c++ \
+ *.java \
+ *.ii \
+ *.ixx \
+ *.ipp \
+ *.i++ \
+ *.inl \
+ *.idl \
+ *.ddl \
+ *.odl \
+ *.h \
+ *.hh \
+ *.hxx \
+ *.hpp \
+ *.h++ \
+ *.cs \
+ *.d \
+ *.php \
+ *.php4 \
+ *.php5 \
+ *.phtml \
+ *.inc \
+ *.m \
+ *.markdown \
+ *.md \
+ *.mm \
+ *.dox \
+ *.py \
+ *.pyw \
+ *.f90 \
+ *.f95 \
+ *.f03 \
+ *.f08 \
+ *.f \
+ *.for \
+ *.tcl \
+ *.vhd \
+ *.vhdl \
+ *.ucf \
+ *.qsf
+
+# The RECURSIVE tag can be used to specify whether or not subdirectories should
+# be searched for input files as well.
+# The default value is: NO.
+
+RECURSIVE = YES
+
+# The EXCLUDE tag can be used to specify files and/or directories that should be
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+#
+# Note that relative paths are relative to the directory from which doxygen is
+# run.
+
+EXCLUDE =
+
+# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
+# directories that are symbolic links (a Unix file system feature) are excluded
+# from the input.
+# The default value is: NO.
+
+EXCLUDE_SYMLINKS = NO
+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories.
+#
+# Note that the wildcards are matched against the file with absolute path, so to
+# exclude all test directories for example use the pattern */test/*
+
+EXCLUDE_PATTERNS =
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
+# (namespaces, classes, functions, etc.) that should be excluded from the
+# output. The symbol name can be a fully qualified name, a word, or if the
+# wildcard * is used, a substring. Examples: ANamespace, AClass,
+# AClass::ANamespace, ANamespace::*Test
+#
+# Note that the wildcards are matched against the file with absolute path, so to
+# exclude all test directories use the pattern */test/*
+
+EXCLUDE_SYMBOLS =
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or directories
+# that contain example code fragments that are included (see the \include
+# command).
+
+EXAMPLE_PATH =
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
+# *.h) to filter out the source-files in the directories. If left blank all
+# files are included.
+
+EXAMPLE_PATTERNS = *
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude commands
+# irrespective of the value of the RECURSIVE tag.
+# The default value is: NO.
+
+EXAMPLE_RECURSIVE = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or directories
+# that contain images that are to be included in the documentation (see the
+# \image command).
+
+IMAGE_PATH =
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command:
+#
+# <filter> <input-file>
+#
+# where <filter> is the value of the INPUT_FILTER tag, and <input-file> is the
+# name of an input file. Doxygen will then use the output that the filter
+# program writes to standard output. If FILTER_PATTERNS is specified, this tag
+# will be ignored.
+#
+# Note that the filter must not add or remove lines; it is applied before the
+# code is scanned, but not when the output code is generated. If lines are added
+# or removed, the anchors will not be placed correctly.
+#
+# Note that for custom extensions or not directly supported extensions you also
+# need to set EXTENSION_MAPPING for the extension otherwise the files are not
+# properly processed by doxygen.
+
+INPUT_FILTER =
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+# basis. Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match. The filters are a list of the form: pattern=filter
+# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how
+# filters are used. If the FILTER_PATTERNS tag is empty or if none of the
+# patterns match the file name, INPUT_FILTER is applied.
+#
+# Note that for custom extensions or not directly supported extensions you also
+# need to set EXTENSION_MAPPING for the extension otherwise the files are not
+# properly processed by doxygen.
+
+FILTER_PATTERNS =
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER) will also be used to filter the input files that are used for
+# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES).
+# The default value is: NO.
+
+FILTER_SOURCE_FILES = NO
+
+# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
+# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and
+# it is also possible to disable source filtering for a specific pattern using
+# *.ext= (so without naming a filter).
+# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
+
+FILTER_SOURCE_PATTERNS =
+
+# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that
+# is part of the input, its contents will be placed on the main page
+# (index.html). This can be useful if you have a project on for instance GitHub
+# and want to reuse the introduction page also for the doxygen output.
+
+USE_MDFILE_AS_MAINPAGE =
+
+#---------------------------------------------------------------------------
+# Configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will be
+# generated. Documented entities will be cross-referenced with these sources.
+#
+# Note: To get rid of all source code in the generated output, make sure that
+# also VERBATIM_HEADERS is set to NO.
+# The default value is: NO.
+
+SOURCE_BROWSER = YES
+
+# Setting the INLINE_SOURCES tag to YES will include the body of functions,
+# classes and enums directly into the documentation.
+# The default value is: NO.
+
+INLINE_SOURCES = YES
+
+# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any
+# special comment blocks from generated source code fragments. Normal C, C++ and
+# Fortran comments will always remain visible.
+# The default value is: YES.
+
+STRIP_CODE_COMMENTS = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES then for each documented
+# function all documented functions referencing it will be listed.
+# The default value is: NO.
+
+REFERENCED_BY_RELATION = NO
+
+# If the REFERENCES_RELATION tag is set to YES then for each documented function
+# all documented entities called/used by that function will be listed.
+# The default value is: NO.
+
+REFERENCES_RELATION = NO
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set
+# to YES then the hyperlinks from functions in REFERENCES_RELATION and
+# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will
+# link to the documentation.
+# The default value is: YES.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the
+# source code will show a tooltip with additional information such as prototype,
+# brief description and links to the definition and documentation. Since this
+# will make the HTML file larger and loading of large files a bit slower, you
+# can opt to disable this feature.
+# The default value is: YES.
+# This tag requires that the tag SOURCE_BROWSER is set to YES.
+
+SOURCE_TOOLTIPS = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code will
+# point to the HTML generated by the htags(1) tool instead of doxygen built-in
+# source browser. The htags tool is part of GNU's global source tagging system
+# (see http://www.gnu.org/software/global/global.html). You will need version
+# 4.8.6 or higher.
+#
+# To use it do the following:
+# - Install the latest version of global
+# - Enable SOURCE_BROWSER and USE_HTAGS in the config file
+# - Make sure the INPUT points to the root of the source tree
+# - Run doxygen as normal
+#
+# Doxygen will invoke htags (and that will in turn invoke gtags), so these
+# tools must be available from the command line (i.e. in the search path).
+#
+# The result: instead of the source browser generated by doxygen, the links to
+# source code will now point to the output of htags.
+# The default value is: NO.
+# This tag requires that the tag SOURCE_BROWSER is set to YES.
+
+USE_HTAGS = NO
+
+# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a
+# verbatim copy of the header file for each class for which an include is
+# specified. Set to NO to disable this.
+# See also: Section \class.
+# The default value is: YES.
+
+VERBATIM_HEADERS = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all
+# compounds will be generated. Enable this if the project contains a lot of
+# classes, structs, unions or interfaces.
+# The default value is: YES.
+
+ALPHABETICAL_INDEX = YES
+
+# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in
+# which the alphabetical index list will be split.
+# Minimum value: 1, maximum value: 20, default value: 5.
+# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
+
+COLS_IN_ALPHA_INDEX = 5
+
+# In case all classes in a project start with a common prefix, all classes will
+# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag
+# can be used to specify a prefix (or a list of prefixes) that should be ignored
+# while generating the index headers.
+# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
+
+IGNORE_PREFIX =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output
+# The default value is: YES.
+
+GENERATE_HTML = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: html.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_OUTPUT = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
+# generated HTML page (for example: .htm, .php, .asp).
+# The default value is: .html.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_FILE_EXTENSION = .html
+
+# The HTML_HEADER tag can be used to specify a user-defined HTML header file for
+# each generated HTML page. If the tag is left blank doxygen will generate a
+# standard header.
+#
+# To get valid HTML the header file that includes any scripts and style sheets
+# that doxygen needs, which is dependent on the configuration options used (e.g.
+# the setting GENERATE_TREEVIEW). It is highly recommended to start with a
+# default header using
+# doxygen -w html new_header.html new_footer.html new_stylesheet.css
+# YourConfigFile
+# and then modify the file new_header.html. See also section "Doxygen usage"
+# for information on how to generate the default header that doxygen normally
+# uses.
+# Note: The header is subject to change so you typically have to regenerate the
+# default header when upgrading to a newer version of doxygen. For a description
+# of the possible markers and block names see the documentation.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_HEADER =
+
+# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
+# generated HTML page. If the tag is left blank doxygen will generate a standard
+# footer. See HTML_HEADER for more information on how to generate a default
+# footer and what special commands can be used inside the footer. See also
+# section "Doxygen usage" for information on how to generate the default footer
+# that doxygen normally uses.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_FOOTER =
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
+# sheet that is used by each HTML page. It can be used to fine-tune the look of
+# the HTML output. If left blank doxygen will generate a default style sheet.
+# See also section "Doxygen usage" for information on how to generate the style
+# sheet that doxygen normally uses.
+# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as
+# it is more robust and this tag (HTML_STYLESHEET) will in the future become
+# obsolete.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_STYLESHEET =
+
+# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined
+# cascading style sheets that are included after the standard style sheets
+# created by doxygen. Using this option one can overrule certain style aspects.
+# This is preferred over using HTML_STYLESHEET since it does not replace the
+# standard style sheet and is therefore more robust against future updates.
+# Doxygen will copy the style sheet files to the output directory.
+# Note: The order of the extra style sheet files is of importance (e.g. the last
+# style sheet in the list overrules the setting of the previous ones in the
+# list). For an example see the documentation.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_EXTRA_STYLESHEET =
+
+# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
+# other source files which should be copied to the HTML output directory. Note
+# that these files will be copied to the base HTML output directory. Use the
+# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
+# files. In the HTML_STYLESHEET file, use the file name only. Also note that the
+# files will be copied as-is; there are no commands or markers available.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_EXTRA_FILES =
+
+# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
+# will adjust the colors in the style sheet and background images according to
+# this color. Hue is specified as an angle on a colorwheel, see
+# http://en.wikipedia.org/wiki/Hue for more information. For instance the value
+# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
+# purple, and 360 is red again.
+# Minimum value: 0, maximum value: 359, default value: 220.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_HUE = 220
+
+# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors
+# in the HTML output. For a value of 0 the output will use grayscales only. A
+# value of 255 will produce the most vivid colors.
+# Minimum value: 0, maximum value: 255, default value: 100.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_SAT = 100
+
+# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the
+# luminance component of the colors in the HTML output. Values below 100
+# gradually make the output lighter, whereas values above 100 make the output
+# darker. The value divided by 100 is the actual gamma applied, so 80 represents
+# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not
+# change the gamma.
+# Minimum value: 40, maximum value: 240, default value: 80.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_GAMMA = 80
+
+# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
+# page will contain the date and time when the page was generated. Setting this
+# to YES can help to show when doxygen was last run and thus if the
+# documentation is up to date.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_TIMESTAMP = NO
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
+# documentation will contain sections that can be hidden and shown after the
+# page has loaded.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_DYNAMIC_SECTIONS = NO
+
+# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries
+# shown in the various tree structured indices initially; the user can expand
+# and collapse entries dynamically later on. Doxygen will expand the tree to
+# such a level that at most the specified number of entries are visible (unless
+# a fully collapsed tree already exceeds this amount). So setting the number of
+# entries 1 will produce a full collapsed tree by default. 0 is a special value
+# representing an infinite number of entries and will result in a full expanded
+# tree by default.
+# Minimum value: 0, maximum value: 9999, default value: 100.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_INDEX_NUM_ENTRIES = 100
+
+# If the GENERATE_DOCSET tag is set to YES, additional index files will be
+# generated that can be used as input for Apple's Xcode 3 integrated development
+# environment (see: http://developer.apple.com/tools/xcode/), introduced with
+# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a
+# Makefile in the HTML output directory. Running make will produce the docset in
+# that directory and running make install will install the docset in
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
+# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
+# for more information.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_DOCSET = NO
+
+# This tag determines the name of the docset feed. A documentation feed provides
+# an umbrella under which multiple documentation sets from a single provider
+# (such as a company or product suite) can be grouped.
+# The default value is: Doxygen generated docs.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_FEEDNAME = "Doxygen generated docs"
+
+# This tag specifies a string that should uniquely identify the documentation
+# set bundle. This should be a reverse domain-name style string, e.g.
+# com.mycompany.MyDocSet. Doxygen will append .docset to the name.
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_BUNDLE_ID = org.doxygen.Project
+
+# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify
+# the documentation publisher. This should be a reverse domain-name style
+# string, e.g. com.mycompany.MyDocSet.documentation.
+# The default value is: org.doxygen.Publisher.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_PUBLISHER_ID = org.doxygen.Publisher
+
+# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.
+# The default value is: Publisher.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_PUBLISHER_NAME = Publisher
+
+# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
+# additional HTML index files: index.hhp, index.hhc, and index.hhk. The
+# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
+# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on
+# Windows.
+#
+# The HTML Help Workshop contains a compiler that can convert all HTML output
+# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML
+# files are now used as the Windows 98 help format, and will replace the old
+# Windows help format (.hlp) on all Windows platforms in the future. Compressed
+# HTML files also contain an index, a table of contents, and you can search for
+# words in the documentation. The HTML workshop also contains a viewer for
+# compressed HTML files.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_HTMLHELP = NO
+
+# The CHM_FILE tag can be used to specify the file name of the resulting .chm
+# file. You can add a path in front of the file if the result should not be
+# written to the html output directory.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+CHM_FILE =
+
+# The HHC_LOCATION tag can be used to specify the location (absolute path
+# including file name) of the HTML help compiler (hhc.exe). If non-empty,
+# doxygen will try to run the HTML help compiler on the generated index.hhp.
+# The file has to be specified with full path.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+HHC_LOCATION =
+
+# The GENERATE_CHI flag controls if a separate .chi index file is generated
+# (YES) or that it should be included in the master .chm file (NO).
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+GENERATE_CHI = NO
+
+# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc)
+# and project file content.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+CHM_INDEX_ENCODING =
+
+# The BINARY_TOC flag controls whether a binary table of contents is generated
+# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it
+# enables the Previous and Next buttons.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+BINARY_TOC = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members to
+# the table of contents of the HTML help documentation and to the tree view.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+TOC_EXPAND = NO
+
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
+# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that
+# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help
+# (.qch) of the generated HTML documentation.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_QHP = NO
+
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify
+# the file name of the resulting .qch file. The path specified is relative to
+# the HTML output folder.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QCH_FILE =
+
+# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
+# Project output. For more information please see Qt Help Project / Namespace
+# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_NAMESPACE = org.doxygen.Project
+
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
+# Help Project output. For more information please see Qt Help Project / Virtual
+# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
+# folders).
+# The default value is: doc.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_VIRTUAL_FOLDER = doc
+
+# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
+# filter to add. For more information please see Qt Help Project / Custom
+# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# filters).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_CUST_FILTER_NAME =
+
+# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
+# custom filter to add. For more information please see Qt Help Project / Custom
+# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# filters).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_CUST_FILTER_ATTRS =
+
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
+# project's filter section matches. Qt Help Project / Filter Attributes (see:
+# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_SECT_FILTER_ATTRS =
+
+# The QHG_LOCATION tag can be used to specify the location of Qt's
+# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the
+# generated .qhp file.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHG_LOCATION =
+
+# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be
+# generated, together with the HTML files, they form an Eclipse help plugin. To
+# install this plugin and make it available under the help contents menu in
+# Eclipse, the contents of the directory containing the HTML and XML files needs
+# to be copied into the plugins directory of eclipse. The name of the directory
+# within the plugins directory should be the same as the ECLIPSE_DOC_ID value.
+# After copying Eclipse needs to be restarted before the help appears.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_ECLIPSEHELP = NO
+
+# A unique identifier for the Eclipse help plugin. When installing the plugin
+# the directory name containing the HTML and XML files should also have this
+# name. Each documentation set should have its own identifier.
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES.
+
+ECLIPSE_DOC_ID = org.doxygen.Project
+
+# If you want full control over the layout of the generated HTML pages it might
+# be necessary to disable the index and replace it with your own. The
+# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top
+# of each HTML page. A value of NO enables the index and the value YES disables
+# it. Since the tabs in the index contain the same information as the navigation
+# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+DISABLE_INDEX = NO
+
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
+# structure should be generated to display hierarchical information. If the tag
+# value is set to YES, a side panel will be generated containing a tree-like
+# index structure (just like the one that is generated for HTML Help). For this
+# to work a browser that supports JavaScript, DHTML, CSS and frames is required
+# (i.e. any modern browser). Windows users are probably better off using the
+# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can
+# further fine-tune the look of the index. As an example, the default style
+# sheet generated by doxygen has an example that shows how to put an image at
+# the root of the tree instead of the PROJECT_NAME. Since the tree basically has
+# the same information as the tab index, you could consider setting
+# DISABLE_INDEX to YES when enabling this option.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_TREEVIEW = NO
+
+# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that
+# doxygen will group on one line in the generated HTML documentation.
+#
+# Note that a value of 0 will completely suppress the enum values from appearing
+# in the overview section.
+# Minimum value: 0, maximum value: 20, default value: 4.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+ENUM_VALUES_PER_LINE = 4
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used
+# to set the initial width (in pixels) of the frame in which the tree is shown.
+# Minimum value: 0, maximum value: 1500, default value: 250.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+TREEVIEW_WIDTH = 250
+
+# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to
+# external symbols imported via tag files in a separate window.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+EXT_LINKS_IN_WINDOW = NO
+
+# Use this tag to change the font size of LaTeX formulas included as images in
+# the HTML documentation. When you change the font size after a successful
+# doxygen run you need to manually remove any form_*.png images from the HTML
+# output directory to force them to be regenerated.
+# Minimum value: 8, maximum value: 50, default value: 10.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+FORMULA_FONTSIZE = 10
+
+# Use the FORMULA_TRANPARENT tag to determine whether or not the images
+# generated for formulas are transparent PNGs. Transparent PNGs are not
+# supported properly for IE 6.0, but are supported on all modern browsers.
+#
+# Note that when changing this option you need to delete any form_*.png files in
+# the HTML output directory before the changes have effect.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+FORMULA_TRANSPARENT = YES
+
+# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
+# http://www.mathjax.org) which uses client side Javascript for the rendering
+# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX
+# installed or if you want to formulas look prettier in the HTML output. When
+# enabled you may also need to install MathJax separately and configure the path
+# to it using the MATHJAX_RELPATH option.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+USE_MATHJAX = NO
+
+# When MathJax is enabled you can set the default output format to be used for
+# the MathJax output. See the MathJax site (see:
+# http://docs.mathjax.org/en/latest/output.html) for more details.
+# Possible values are: HTML-CSS (which is slower, but has the best
+# compatibility), NativeMML (i.e. MathML) and SVG.
+# The default value is: HTML-CSS.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_FORMAT = HTML-CSS
+
+# When MathJax is enabled you need to specify the location relative to the HTML
+# output directory using the MATHJAX_RELPATH option. The destination directory
+# should contain the MathJax.js script. For instance, if the mathjax directory
+# is located at the same level as the HTML output directory, then
+# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
+# Content Delivery Network so you can quickly see the result without installing
+# MathJax. However, it is strongly recommended to install a local copy of
+# MathJax from http://www.mathjax.org before deployment.
+# The default value is: http://cdn.mathjax.org/mathjax/latest.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
+
+# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax
+# extension names that should be enabled during MathJax rendering. For example
+# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_EXTENSIONS =
+
+# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
+# of code that will be used on startup of the MathJax code. See the MathJax site
+# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an
+# example see the documentation.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_CODEFILE =
+
+# When the SEARCHENGINE tag is enabled doxygen will generate a search box for
+# the HTML output. The underlying search engine uses javascript and DHTML and
+# should work on any modern browser. Note that when using HTML help
+# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET)
+# there is already a search function so this one should typically be disabled.
+# For large projects the javascript based search engine can be slow, then
+# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to
+# search using the keyboard; to jump to the search box use <access key> + S
+# (what the <access key> is depends on the OS and browser, but it is typically
+# <CTRL>, <ALT>/<option>, or both). Inside the search box use the <cursor down
+# key> to jump into the search results window, the results can be navigated
+# using the <cursor keys>. Press <Enter> to select an item or <escape> to cancel
+# the search. The filter options can be selected when the cursor is inside the
+# search box by pressing <Shift>+<cursor down>. Also here use the <cursor keys>
+# to select a filter and <Enter> or <escape> to activate or cancel the filter
+# option.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+SEARCHENGINE = YES
+
+# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
+# implemented using a web server instead of a web client using Javascript. There
+# are two flavors of web server based searching depending on the EXTERNAL_SEARCH
+# setting. When disabled, doxygen will generate a PHP script for searching and
+# an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing
+# and searching needs to be provided by external tools. See the section
+# "External Indexing and Searching" for details.
+# The default value is: NO.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SERVER_BASED_SEARCH = NO
+
+# When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP
+# script for searching. Instead the search results are written to an XML file
+# which needs to be processed by an external indexer. Doxygen will invoke an
+# external search engine pointed to by the SEARCHENGINE_URL option to obtain the
+# search results.
+#
+# Doxygen ships with an example indexer (doxyindexer) and search engine
+# (doxysearch.cgi) which are based on the open source search engine library
+# Xapian (see: http://xapian.org/).
+#
+# See the section "External Indexing and Searching" for details.
+# The default value is: NO.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTERNAL_SEARCH = NO
+
+# The SEARCHENGINE_URL should point to a search engine hosted by a web server
+# which will return the search results when EXTERNAL_SEARCH is enabled.
+#
+# Doxygen ships with an example indexer (doxyindexer) and search engine
+# (doxysearch.cgi) which are based on the open source search engine library
+# Xapian (see: http://xapian.org/). See the section "External Indexing and
+# Searching" for details.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SEARCHENGINE_URL =
+
+# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed
+# search data is written to a file for indexing by an external tool. With the
+# SEARCHDATA_FILE tag the name of this file can be specified.
+# The default file is: searchdata.xml.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SEARCHDATA_FILE = searchdata.xml
+
+# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the
+# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is
+# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple
+# projects and redirect the results back to the right project.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTERNAL_SEARCH_ID =
+
+# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen
+# projects other than the one defined by this configuration file, but that are
+# all added to the same external search index. Each project needs to have a
+# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id of
+# to a relative location where the documentation can be found. The format is:
+# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTRA_SEARCH_MAPPINGS =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output.
+# The default value is: YES.
+
+GENERATE_LATEX = YES
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: latex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_OUTPUT = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# invoked.
+#
+# Note that when enabling USE_PDFLATEX this option is only used for generating
+# bitmaps for formulas in the HTML output, but not in the Makefile that is
+# written to the output directory.
+# The default file is: latex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_CMD_NAME = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate
+# index for LaTeX.
+# The default file is: makeindex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+MAKEINDEX_CMD_NAME = makeindex
+
+# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX
+# documents. This may be useful for small projects and may help to save some
+# trees in general.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+COMPACT_LATEX = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used by the
+# printer.
+# Possible values are: a4 (210 x 297 mm), letter (8.5 x 11 inches), legal (8.5 x
+# 14 inches) and executive (7.25 x 10.5 inches).
+# The default value is: a4.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+PAPER_TYPE = a4
+
+# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
+# that should be included in the LaTeX output. The package can be specified just
+# by its name or with the correct syntax as to be used with the LaTeX
+# \usepackage command. To get the times font for instance you can specify :
+# EXTRA_PACKAGES=times or EXTRA_PACKAGES={times}
+# To use the option intlimits with the amsmath package you can specify:
+# EXTRA_PACKAGES=[intlimits]{amsmath}
+# If left blank no extra packages will be included.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+EXTRA_PACKAGES =
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for the
+# generated LaTeX document. The header should contain everything until the first
+# chapter. If it is left blank doxygen will generate a standard header. See
+# section "Doxygen usage" for information on how to let doxygen write the
+# default header to a separate file.
+#
+# Note: Only use a user-defined header if you know what you are doing! The
+# following commands have a special meaning inside the header: $title,
+# $datetime, $date, $doxygenversion, $projectname, $projectnumber,
+# $projectbrief, $projectlogo. Doxygen will replace $title with the empty
+# string, for the replacement values of the other commands the user is referred
+# to HTML_HEADER.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_HEADER =
+
+# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the
+# generated LaTeX document. The footer should contain everything after the last
+# chapter. If it is left blank doxygen will generate a standard footer. See
+# LATEX_HEADER for more information on how to generate a default footer and what
+# special commands can be used inside the footer.
+#
+# Note: Only use a user-defined footer if you know what you are doing!
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_FOOTER =
+
+# The LATEX_EXTRA_STYLESHEET tag can be used to specify additional user-defined
+# LaTeX style sheets that are included after the standard style sheets created
+# by doxygen. Using this option one can overrule certain style aspects. Doxygen
+# will copy the style sheet files to the output directory.
+# Note: The order of the extra style sheet files is of importance (e.g. the last
+# style sheet in the list overrules the setting of the previous ones in the
+# list).
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_EXTRA_STYLESHEET =
+
+# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or
+# other source files which should be copied to the LATEX_OUTPUT output
+# directory. Note that the files will be copied as-is; there are no commands or
+# markers available.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_EXTRA_FILES =
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is
+# prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will
+# contain links (just like the HTML output) instead of page references. This
+# makes the output suitable for online browsing using a PDF viewer.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+PDF_HYPERLINKS = YES
+
+# If the USE_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate
+# the PDF file directly from the LaTeX files. Set this option to YES, to get a
+# higher quality PDF documentation.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+USE_PDFLATEX = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode
+# command to the generated LaTeX files. This will instruct LaTeX to keep running
+# if errors occur, instead of asking the user for help. This option is also used
+# when generating formulas in HTML.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_BATCHMODE = NO
+
+# If the LATEX_HIDE_INDICES tag is set to YES then doxygen will not include the
+# index chapters (such as File Index, Compound Index, etc.) in the output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_HIDE_INDICES = NO
+
+# If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source
+# code with syntax highlighting in the LaTeX output.
+#
+# Note that which sources are shown also depends on other settings such as
+# SOURCE_BROWSER.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_SOURCE_CODE = NO
+
+# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
+# bibliography, e.g. plainnat, or ieeetr. See
+# http://en.wikipedia.org/wiki/BibTeX and \cite for more info.
+# The default value is: plain.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_BIB_STYLE = plain
+
+# If the LATEX_TIMESTAMP tag is set to YES then the footer of each generated
+# page will contain the date and time when the page was generated. Setting this
+# to NO can help when comparing the output of multiple runs.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_TIMESTAMP = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES, doxygen will generate RTF output. The
+# RTF output is optimized for Word 97 and may not look too pretty with other RTF
+# readers/editors.
+# The default value is: NO.
+
+GENERATE_RTF = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: rtf.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_OUTPUT = rtf
+
+# If the COMPACT_RTF tag is set to YES, doxygen generates more compact RTF
+# documents. This may be useful for small projects and may help to save some
+# trees in general.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+COMPACT_RTF = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated will
+# contain hyperlink fields. The RTF file will contain links (just like the HTML
+# output) instead of page references. This makes the output suitable for online
+# browsing using Word or some other Word compatible readers that support those
+# fields.
+#
+# Note: WordPad (write) and others do not support links.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_HYPERLINKS = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's config
+# file, i.e. a series of assignments. You only have to provide replacements,
+# missing definitions are set to their default value.
+#
+# See also section "Doxygen usage" for information on how to generate the
+# default style sheet that doxygen normally uses.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_STYLESHEET_FILE =
+
+# Set optional variables used in the generation of an RTF document. Syntax is
+# similar to doxygen's config file. A template extensions file can be generated
+# using doxygen -e rtf extensionFile.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_EXTENSIONS_FILE =
+
+# If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code
+# with syntax highlighting in the RTF output.
+#
+# Note that which sources are shown also depends on other settings such as
+# SOURCE_BROWSER.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_SOURCE_CODE = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES, doxygen will generate man pages for
+# classes and files.
+# The default value is: NO.
+
+GENERATE_MAN = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it. A directory man3 will be created inside the directory specified by
+# MAN_OUTPUT.
+# The default directory is: man.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_OUTPUT = man
+
+# The MAN_EXTENSION tag determines the extension that is added to the generated
+# man pages. In case the manual section does not start with a number, the number
+# 3 is prepended. The dot (.) at the beginning of the MAN_EXTENSION tag is
+# optional.
+# The default value is: .3.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_EXTENSION = .3
+
+# The MAN_SUBDIR tag determines the name of the directory created within
+# MAN_OUTPUT in which the man pages are placed. If defaults to man followed by
+# MAN_EXTENSION with the initial . removed.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_SUBDIR =
+
+# If the MAN_LINKS tag is set to YES and doxygen generates man output, then it
+# will generate one additional man file for each entity documented in the real
+# man page(s). These additional files only source the real man page, but without
+# them the man command would be unable to find the correct page.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_LINKS = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES, doxygen will generate an XML file that
+# captures the structure of the code including all documentation.
+# The default value is: NO.
+
+GENERATE_XML = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: xml.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_OUTPUT = xml
+
+# If the XML_PROGRAMLISTING tag is set to YES, doxygen will dump the program
+# listings (including syntax highlighting and cross-referencing information) to
+# the XML output. Note that enabling this will significantly increase the size
+# of the XML output.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_PROGRAMLISTING = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to the DOCBOOK output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_DOCBOOK tag is set to YES, doxygen will generate Docbook files
+# that can be used to generate PDF.
+# The default value is: NO.
+
+GENERATE_DOCBOOK = NO
+
+# The DOCBOOK_OUTPUT tag is used to specify where the Docbook pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be put in
+# front of it.
+# The default directory is: docbook.
+# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
+
+DOCBOOK_OUTPUT = docbook
+
+# If the DOCBOOK_PROGRAMLISTING tag is set to YES, doxygen will include the
+# program listings (including syntax highlighting and cross-referencing
+# information) to the DOCBOOK output. Note that enabling this will significantly
+# increase the size of the DOCBOOK output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
+
+DOCBOOK_PROGRAMLISTING = NO
+
+#---------------------------------------------------------------------------
+# Configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an
+# AutoGen Definitions (see http://autogen.sf.net) file that captures the
+# structure of the code including all documentation. Note that this feature is
+# still experimental and incomplete at the moment.
+# The default value is: NO.
+
+GENERATE_AUTOGEN_DEF = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES, doxygen will generate a Perl module
+# file that captures the structure of the code including all documentation.
+#
+# Note that this feature is still experimental and incomplete at the moment.
+# The default value is: NO.
+
+GENERATE_PERLMOD = NO
+
+# If the PERLMOD_LATEX tag is set to YES, doxygen will generate the necessary
+# Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI
+# output from the Perl module output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_LATEX = NO
+
+# If the PERLMOD_PRETTY tag is set to YES, the Perl module output will be nicely
+# formatted so it can be parsed by a human reader. This is useful if you want to
+# understand what is going on. On the other hand, if this tag is set to NO, the
+# size of the Perl module output will be much smaller and Perl will parse it
+# just the same.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_PRETTY = YES
+
+# The names of the make variables in the generated doxyrules.make file are
+# prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. This is useful
+# so different doxyrules.make files included by the same Makefile don't
+# overwrite each other's variables.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_MAKEVAR_PREFIX =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES, doxygen will evaluate all
+# C-preprocessor directives found in the sources and include files.
+# The default value is: YES.
+
+ENABLE_PREPROCESSING = YES
+
+# If the MACRO_EXPANSION tag is set to YES, doxygen will expand all macro names
+# in the source code. If set to NO, only conditional compilation will be
+# performed. Macro expansion can be done in a controlled way by setting
+# EXPAND_ONLY_PREDEF to YES.
+# The default value is: NO.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+MACRO_EXPANSION = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then
+# the macro expansion is limited to the macros specified with the PREDEFINED and
+# EXPAND_AS_DEFINED tags.
+# The default value is: NO.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+EXPAND_ONLY_PREDEF = NO
+
+# If the SEARCH_INCLUDES tag is set to YES, the include files in the
+# INCLUDE_PATH will be searched if a #include is found.
+# The default value is: YES.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+SEARCH_INCLUDES = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by the
+# preprocessor.
+# This tag requires that the tag SEARCH_INCLUDES is set to YES.
+
+INCLUDE_PATH =
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will be
+# used.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+INCLUDE_FILE_PATTERNS =
+
+# The PREDEFINED tag can be used to specify one or more macro names that are
+# defined before the preprocessor is started (similar to the -D option of e.g.
+# gcc). The argument of the tag is a list of macros of the form: name or
+# name=definition (no spaces). If the definition and the "=" are omitted, "=1"
+# is assumed. To prevent a macro definition from being undefined via #undef or
+# recursively expanded use the := operator instead of the = operator.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+PREDEFINED =
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
+# tag can be used to specify a list of macro names that should be expanded. The
+# macro definition that is found in the sources will be used. Use the PREDEFINED
+# tag if you want to use a different macro definition that overrules the
+# definition found in the source code.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+EXPAND_AS_DEFINED =
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will
+# remove all references to function-like macros that are alone on a line, have
+# an all uppercase name, and do not end with a semicolon. Such function macros
+# are typically used for boiler-plate code, and will confuse the parser if not
+# removed.
+# The default value is: YES.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+SKIP_FUNCTION_MACROS = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES tag can be used to specify one or more tag files. For each tag
+# file the location of the external documentation should be added. The format of
+# a tag file without this location is as follows:
+# TAGFILES = file1 file2 ...
+# Adding location for the tag files is done as follows:
+# TAGFILES = file1=loc1 "file2 = loc2" ...
+# where loc1 and loc2 can be relative or absolute paths or URLs. See the
+# section "Linking to external documentation" for more information about the use
+# of tag files.
+# Note: Each tag file must have a unique name (where the name does NOT include
+# the path). If a tag file is not located in the directory in which doxygen is
+# run, you must also specify the path to the tagfile here.
+
+TAGFILES =
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create a
+# tag file that is based on the input files it reads. See section "Linking to
+# external documentation" for more information about the usage of tag files.
+
+GENERATE_TAGFILE =
+
+# If the ALLEXTERNALS tag is set to YES, all external class will be listed in
+# the class index. If set to NO, only the inherited external classes will be
+# listed.
+# The default value is: NO.
+
+ALLEXTERNALS = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES, all external groups will be listed
+# in the modules index. If set to NO, only the current project's groups will be
+# listed.
+# The default value is: YES.
+
+EXTERNAL_GROUPS = YES
+
+# If the EXTERNAL_PAGES tag is set to YES, all external pages will be listed in
+# the related pages index. If set to NO, only the current project's pages will
+# be listed.
+# The default value is: YES.
+
+EXTERNAL_PAGES = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script
+# interpreter (i.e. the result of 'which perl').
+# The default file (with absolute path) is: /usr/bin/perl.
+
+PERL_PATH = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES, doxygen will generate a class diagram
+# (in HTML and LaTeX) for classes with base or super classes. Setting the tag to
+# NO turns the diagrams off. Note that this option also works with HAVE_DOT
+# disabled, but it is recommended to install and use dot, since it yields more
+# powerful graphs.
+# The default value is: YES.
+
+CLASS_DIAGRAMS = YES
+
+# You can define message sequence charts within doxygen comments using the \msc
+# command. Doxygen will then run the mscgen tool (see:
+# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the
+# documentation. The MSCGEN_PATH tag allows you to specify the directory where
+# the mscgen tool resides. If left empty the tool is assumed to be found in the
+# default search path.
+
+MSCGEN_PATH =
+
+# You can include diagrams made with dia in doxygen documentation. Doxygen will
+# then run dia to produce the diagram and insert it in the documentation. The
+# DIA_PATH tag allows you to specify the directory where the dia binary resides.
+# If left empty dia is assumed to be found in the default search path.
+
+DIA_PATH =
+
+# If set to YES the inheritance and collaboration graphs will hide inheritance
+# and usage relations if the target is undocumented or is not a class.
+# The default value is: YES.
+
+HIDE_UNDOC_RELATIONS = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz (see:
+# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
+# Bell Labs. The other options in this section have no effect if this option is
+# set to NO
+# The default value is: NO.
+
+HAVE_DOT = NO
+
+# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
+# to run in parallel. When set to 0 doxygen will base this on the number of
+# processors available in the system. You can set it explicitly to a value
+# larger than 0 to get control over the balance between CPU load and processing
+# speed.
+# Minimum value: 0, maximum value: 32, default value: 0.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_NUM_THREADS = 0
+
+# When you want a differently looking font in the dot files that doxygen
+# generates you can specify the font name using DOT_FONTNAME. You need to make
+# sure dot is able to find the font, which can be done by putting it in a
+# standard location or by setting the DOTFONTPATH environment variable or by
+# setting DOT_FONTPATH to the directory containing the font.
+# The default value is: Helvetica.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTNAME = Helvetica
+
+# The DOT_FONTSIZE tag can be used to set the size (in points) of the font of
+# dot graphs.
+# Minimum value: 4, maximum value: 24, default value: 10.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTSIZE = 10
+
+# By default doxygen will tell dot to use the default font as specified with
+# DOT_FONTNAME. If you specify a different font using DOT_FONTNAME you can set
+# the path where dot can find it using this tag.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTPATH =
+
+# If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for
+# each documented class showing the direct and indirect inheritance relations.
+# Setting this tag to YES will force the CLASS_DIAGRAMS tag to NO.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CLASS_GRAPH = YES
+
+# If the COLLABORATION_GRAPH tag is set to YES then doxygen will generate a
+# graph for each documented class showing the direct and indirect implementation
+# dependencies (inheritance, containment, and class references variables) of the
+# class with other documented classes.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+COLLABORATION_GRAPH = YES
+
+# If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for
+# groups, showing the direct groups dependencies.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GROUP_GRAPHS = YES
+
+# If the UML_LOOK tag is set to YES, doxygen will generate inheritance and
+# collaboration diagrams in a style similar to the OMG's Unified Modeling
+# Language.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+UML_LOOK = NO
+
+# If the UML_LOOK tag is enabled, the fields and methods are shown inside the
+# class node. If there are many fields or methods and many nodes the graph may
+# become too big to be useful. The UML_LIMIT_NUM_FIELDS threshold limits the
+# number of items for each type to make the size more manageable. Set this to 0
+# for no limit. Note that the threshold may be exceeded by 50% before the limit
+# is enforced. So when you set the threshold to 10, up to 15 fields may appear,
+# but if the number exceeds 15, the total amount of fields shown is limited to
+# 10.
+# Minimum value: 0, maximum value: 100, default value: 10.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+UML_LIMIT_NUM_FIELDS = 10
+
+# If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and
+# collaboration graphs will show the relations between templates and their
+# instances.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+TEMPLATE_RELATIONS = NO
+
+# If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to
+# YES then doxygen will generate a graph for each documented file showing the
+# direct and indirect include dependencies of the file with other documented
+# files.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INCLUDE_GRAPH = YES
+
+# If the INCLUDED_BY_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are
+# set to YES then doxygen will generate a graph for each documented file showing
+# the direct and indirect include dependencies of the file with other documented
+# files.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INCLUDED_BY_GRAPH = YES
+
+# If the CALL_GRAPH tag is set to YES then doxygen will generate a call
+# dependency graph for every global function or class method.
+#
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable call graphs for selected
+# functions only using the \callgraph command. Disabling a call graph can be
+# accomplished by means of the command \hidecallgraph.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CALL_GRAPH = NO
+
+# If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller
+# dependency graph for every global function or class method.
+#
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable caller graphs for selected
+# functions only using the \callergraph command. Disabling a caller graph can be
+# accomplished by means of the command \hidecallergraph.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CALLER_GRAPH = NO
+
+# If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical
+# hierarchy of all classes instead of a textual one.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GRAPHICAL_HIERARCHY = YES
+
+# If the DIRECTORY_GRAPH tag is set to YES then doxygen will show the
+# dependencies a directory has on other directories in a graphical way. The
+# dependency relations are determined by the #include relations between the
+# files in the directories.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DIRECTORY_GRAPH = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
+# generated by dot. For an explanation of the image formats see the section
+# output formats in the documentation of the dot tool (Graphviz (see:
+# http://www.graphviz.org/)).
+# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order
+# to make the SVG files visible in IE 9+ (other browsers do not have this
+# requirement).
+# Possible values are: png, jpg, gif, svg, png:gd, png:gd:gd, png:cairo,
+# png:cairo:gd, png:cairo:cairo, png:cairo:gdiplus, png:gdiplus and
+# png:gdiplus:gdiplus.
+# The default value is: png.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_IMAGE_FORMAT = png
+
+# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
+# enable generation of interactive SVG images that allow zooming and panning.
+#
+# Note that this requires a modern browser other than Internet Explorer. Tested
+# and working are Firefox, Chrome, Safari, and Opera.
+# Note: For IE 9+ you need to set HTML_FILE_EXTENSION to xhtml in order to make
+# the SVG files visible. Older versions of IE do not have SVG support.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INTERACTIVE_SVG = NO
+
+# The DOT_PATH tag can be used to specify the path where the dot tool can be
+# found. If left blank, it is assumed the dot tool can be found in the path.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_PATH =
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that
+# contain dot files that are included in the documentation (see the \dotfile
+# command).
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOTFILE_DIRS =
+
+# The MSCFILE_DIRS tag can be used to specify one or more directories that
+# contain msc files that are included in the documentation (see the \mscfile
+# command).
+
+MSCFILE_DIRS =
+
+# The DIAFILE_DIRS tag can be used to specify one or more directories that
+# contain dia files that are included in the documentation (see the \diafile
+# command).
+
+DIAFILE_DIRS =
+
+# When using plantuml, the PLANTUML_JAR_PATH tag should be used to specify the
+# path where java can find the plantuml.jar file. If left blank, it is assumed
+# PlantUML is not used or called during a preprocessing step. Doxygen will
+# generate a warning when it encounters a \startuml command in this case and
+# will not generate output for the diagram.
+
+PLANTUML_JAR_PATH =
+
+# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
+# configuration file for plantuml.
+
+PLANTUML_CFG_FILE =
+
+# When using plantuml, the specified paths are searched for files specified by
+# the !include statement in a plantuml block.
+
+PLANTUML_INCLUDE_PATH =
+
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes
+# that will be shown in the graph. If the number of nodes in a graph becomes
+# larger than this value, doxygen will truncate the graph, which is visualized
+# by representing a node as a red box. Note that doxygen if the number of direct
+# children of the root node in a graph is already larger than
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note that
+# the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+# Minimum value: 0, maximum value: 10000, default value: 50.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_GRAPH_MAX_NODES = 50
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs
+# generated by dot. A depth value of 3 means that only nodes reachable from the
+# root by following a path via at most 3 edges will be shown. Nodes that lay
+# further from the root node will be omitted. Note that setting this option to 1
+# or 2 may greatly reduce the computation time needed for large code bases. Also
+# note that the size of a graph can be further restricted by
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+# Minimum value: 0, maximum value: 1000, default value: 0.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+MAX_DOT_GRAPH_DEPTH = 0
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
+# background. This is disabled by default, because dot on Windows does not seem
+# to support this out of the box.
+#
+# Warning: Depending on the platform used, enabling this option may lead to
+# badly anti-aliased labels on the edges of a graph (i.e. they become hard to
+# read).
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_TRANSPARENT = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output
+# files in one run (i.e. multiple -o and -T options on the command line). This
+# makes dot run faster, but since only newer versions of dot (>1.8.10) support
+# this, this feature is disabled by default.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_MULTI_TARGETS = NO
+
+# If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page
+# explaining the meaning of the various boxes and arrows in the dot generated
+# graphs.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GENERATE_LEGEND = YES
+
+# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate dot
+# files that are used to generate the various graphs.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_CLEANUP = YES
diff --git a/demo#3/common/agl-service-homescreen/LICENSE b/demo#3/common/agl-service-homescreen/LICENSE
new file mode 100644
index 0000000..31c692a
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/LICENSE
@@ -0,0 +1,54 @@
+Apache License
+
+Version 2.0, January 2004
+
+http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
+
+"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
+
+"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
+
+"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
+
+"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
+
+"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
+
+2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
+
+ You must give any other recipients of the Work or Derivative Works a copy of this License; and
+ You must cause any modified files to carry prominent notices stating that You changed the files; and
+ You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
+ If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
diff --git a/demo#3/common/agl-service-homescreen/README b/demo#3/common/agl-service-homescreen/README
new file mode 100644
index 0000000..aeb9b06
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/README
@@ -0,0 +1,44 @@
+=============================
+How to build
+=============================
+
+cmake
+make
+
+=============================
+Launch Binder
+=============================
+
+file
+/home/root/HomeScreenBinding/src/homescreen-service.so
+/usr/lib/libhomescreen.so
+
+command
+/usr/bin/afb-daemon --ldpaths=/home/root/HomeScreenBinding/src --verbose --port=2000 --token=hs
+
+=============================
+Binding Function List
+=============================
+
+(What can do)
+ - Call required API for HomeScreen
+ * tap_shortcut
+ * on_screen_message
+ * subscribe
+ * unsubscribe
+
+ - Subscribe/Unsubscribe event from HomeScreen
+ * tap_shortcut
+ * on_screen_message
+
+=============================
+libhomescreen Function List
+=============================
+(What can do)
+ - registerCallback
+ - tapShortcut
+ - Call api with json argument
+ - Subscribe event from HomeScreen
+
+(What can't do)
+ - Call api as function
diff --git a/demo#3/common/agl-service-homescreen/doc/ApplicationGuide.md b/demo#3/common/agl-service-homescreen/doc/ApplicationGuide.md
new file mode 100644
index 0000000..5bbf234
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/ApplicationGuide.md
@@ -0,0 +1,319 @@
+**HomeScreen GUI Application / HomeScreen Service Guide**
+====
+<div align="right">Revision: 0.1</div>
+<div align="right">TOYOTA MOTOR CORPORATION</div>
+<div align="right">Advanced Driver Information Technology</div>
+<div align="right">26th/Sep/2017</div>
+
+* * *
+
+<div id="Table\ of\ content"></div>
+
+## Table of content
+- [Target reader of this document](#Target\ reader\ of\ this\ document)
+- [Overview](#Overview)
+- [Getting Start](#Getting\ Start)
+ - [Supported environment](#Supported\ environment)
+ - [Build](#Build)
+ - [Configuring](#Configuring)
+ - [How to call HomeScreen APIs from your Application?](#How\ to\ call\ HomeScreen\ APIs\ from\ your\ Application?)
+- [Supported usecase](#Supported\ usecase)
+- [Software Architecture](#Software\ Architecture)
+- [API reference](#API\ reference)
+- [Sequence](#Sequence)
+ - [Initialize](#InitializeSequence)
+ - [Tap Shortcut](#TapShortcutSequence)
+ - [On Screen Message / Reply Sequence](#OnScreenMessageSequence)
+- [Sample code](#Sample\ code)
+- [Limitation](#Limitation)
+- [Next Plan](#Next\ Plan)
+
+* * *
+
+<div id="Target\ reader\ of\ this\ document"></div>
+
+## Target reader of this document
+Application developer whose software uses HomeScreen.
+
+* * *
+
+<div id="Overview"></div>
+
+## Overview
+HomeScreen is built with a GUI application created with Qt(referred as HomeScreenGUI), and a service running on afb-daemon (referred as HomeScreenBinder).
+HomeScreen can start/switch applications run in AGL, also displays information such as onscreen messages.
+
+You can find these projects in AGL gerrit.
+
+homescreen-2017(HomeScreenGUI):
+ https://gerrit.automotivelinux.org/gerrit/#/admin/projects/staging/homescreen-2017
+agl-service-homescreen-2017(HomeScreenBinder's binding library):
+ https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/agl-service-homescreen-2017
+libhomescreen(library for application to communication with HomeScreenBinder):
+ https://gerrit.automotivelinux.org/gerrit/#/admin/projects/src/libhomescreen
+
+Also HomeScreenGUI is using libwindowmanager.
+
+<div id="Getting\ Start"></div>
+
+## Getting Start
+
+<div id="Supported\ environment"></div>
+
+### Supported environment
+
+| Item | Description |
+|:------------|:----------------------------------|
+| AGL version | Electric Eel |
+| Hardware | Renesas R-Car Starter Kit Pro(M3) |
+
+
+<div id="Build"></div>
+
+### Build
+
+**Download recipe**
+
+```
+$ mkdir WORK
+$ cd WORK
+$ repo init -u https://gerrit.automotivelinux.org/gerrit/AGL/AGL-repo
+$ repo sync
+
+```
+
+Then you can find the following recipes.
+
+* `meta-agl-devel/meta-hmi-framework/homescreen-2017`
+
+* `meta-agl-devel/meta-hmi-framework/agl-service-homescreen-2017`
+
+* `meta-agl-demo/recipes-demo-hmi/libhomescreen`
+
+
+**Bitbake**
+
+```
+$ source meta-agl/scripts/aglsetup.sh -m m3ulcb agl-demo agl-devel agl-appfw-smack agl-hmi-framework
+$ bitbake agl-demo-platform
+```
+
+
+* * *
+
+<div id="Configuring"></div>
+
+### Configuring
+To use HomeScreen API, an application shall paste the following configuration definition into "config.xml" of application.
+
+```
+<feature name="urn:AGL:widget:required-api">
+ <param name="homescreen" value="ws" />
+</feature>
+```
+
+* * *
+
+<div id="How\ to\ call\ HomeScreen\ APIs\ from\ your\ Application?"></div>
+
+### How to call HomeScreen APIs from your Application?
+HomeScreen provides a library which is called "libhomescreen".
+This library treats "json format" as API calling.
+For example, if an application wants to call "tap_shortcut()" API, the you should implement as below.
+
+At first the application should create the instance of libhomescreen.
+
+```
+LibHomeScreen* libhs;
+libhs = new LibHomeScreen();
+libhs->init(port, token);
+```
+
+The port and token is provided by Application Framework
+
+Execute the "tapShortcut()" function.
+
+```
+libhs->tapShortcut("application_name");
+```
+
+Regarding the detail of tap_shortcut() API, please refer [this](#HomeScreen\ API) section.
+The first parameter is the name of API, so in this case "tap_shortcut" is proper string.
+And the second parameter corresponds to arguments of "connect()" API.
+
+
+See also our [Sample code](#Sample\ code).
+
+
+<br />
+
+* * *
+
+<div id="Supported\ usecase"></div>
+
+## Supported usecase
+1. HomeScreenGUI sending ShortCut Icon tapped event to applications
+ - Applications using libhomescreen to subscribe the tapShortcut event,
+ HomeScreenGUI will send ShortCut Icon tapped event to applications.
+2. Display OnScreen messages
+ - Applications sending OnScreen messages to homescreen-service, and OnScreenAPP
+ will get these message and display.
+3. Get OnSreen Reply event
+ - When OnScreen messages is displaying, OnScreenAPP will send a reply event to applications.
+
+* * *
+
+<div id="Software\ Architecture"></div>
+
+## Software Architecture
+The architecture of HomeScreen is shown below.
+HomeScreen is the service designed to be used by multiple applications.
+Therefore HomeScreen framework consists on two binder layers. Please refer the following figure.
+The upper binder is for application side security context for applications. The lower binder is for servide side security context.
+Usually application side binder has some business logic for each application, so the number of binders depend on the number of applications which use HomeScreen.
+On the other hand, regarding lower binder there is only one module in the system. This binder receives all messages from multiple applications (in detail, it comes from upper layer binder).
+
+The communication protocols between libhomescreen and upper binder, upper binder and lower binder, lower binder (homescreen-binding) are WebSocket.
+
+![software-stack.png](parts/software-stack.png)
+
+* * *
+
+<div id="API%20reference"></div>
+
+## API reference
+"libhomescreen" and "agl-service-homescreen-2017" provides several kinds of APIs.
+
+<div id="Home\ Screen\ Specific\ API"></div>
+
+### HomeScreen Specific API
+
+- [LibHomeScreen ()](api-ref/html/de/dd0/class_lib_home_screen.html#a724bd949c4154fad041f96a15ef0f5dc)
+- [init (const int port, const std::string &token)](api-ref/html/de/dd0/class_lib_home_screen.html#a6a57b573cc767725762ba9beab032220)
+- [tapShortcut(const char *application_name)](api-ref/html/de/dd0/class_lib_home_screen.html#afb571c9577087b47065eb23e7fdbc903)
+- [onScreenMessage(const char *display_message)](api-ref/html/de/dd0/class_lib_home_screen.html#ac336482036a72b51a822725f1929523c)
+- [onScreenReply(const char *reply_message)](api-ref/html/de/dd0/class_lib_home_screen.html#a6c065f41f2c5d1f58d2763bfb4da9c37)
+- [registerCallback (void(*event_cb)(const std::string &event, struct json_object *event_contents), void(*reply_cb)(struct json_object *reply_contents), void(*hangup_cb)(void)=nullptr)](api-ref/html/de/dd0/class_lib_home_screen.html#a2789e8a5372202cc36f48e71dbb9b7cf)
+- [set\_event\_handler(enum EventType et, handler_func f)](api-ref/html/de/dd0/class_lib_home_screen.html#ab1b0e08bf35415de9064afed899e9f85)
+- [call (const string& verb, struct json_object* arg)](api-ref/html/de/dd0/class_lib_home_screen.html#a527b49dcfe581be6275d0eb2236ba37f)
+- [call (const char* verb, struct json_object* arg)](api-ref/html/de/dd0/class_lib_home_screen.html#ab5e8e8ab7d53e0f114e9e907fcbb7643)
+- [subscribe (const string& event_name)](api-ref/html/de/dd0/class_lib_home_screen.html#aa4c189807b75d070f567967f0d690738)
+- [unsubscribe (const string& event_name)](api-ref/html/de/dd0/class_lib_home_screen.html#aac03a45cbd453ba69ddb00c1016930a6)
+
+* * *
+
+<div id="Sequence"></div>
+
+## Sequence
+
+<div id="InitializeSequence"></div>
+
+### Initialize Sequence
+![initialize-registercallback.svg](parts/initialize-registercallback.svg) * deprecated
+![initialize-set-event-handler](parts/initialize-set-event-handler.svg)
+
+<div id="TapShortcutSequence"></div>
+
+### Tap Shortcut Sequence
+![tap_shortcut.svg](parts/tap_shortcut.svg)
+
+<div id="OnScreenMessageSequence"></div>
+
+### On Screen Message / Reply Sequence
+![on_screen_message.svg](parts/on_screen_message.svg)
+
+
+<div id="Sample\ code"></div>
+
+# Sample code
+You can find sample implementation of HomeScreen as below.
+
+* `libhomescreen/sample/simple-egl`
+
+* `libhomescreen/sample/template`
+
+### Appendix
+
+```
+@startuml
+title Application initialization phase (ex. registerCallback)
+entity App
+entity HomeScreenBinder
+entity HomeScreenGUI
+App->HomeScreenBinder: init(port, token)
+App->HomeScreenBinder: subscribe()
+
+note over HomeScreenBinder
+ Register the event the App wishes to receive
+ ・tap_shortcut
+ ・on_screen_message
+ ・on_screen_reply
+end note
+
+App->HomeScreenBinder: registerCallback()
+
+@enduml
+```
+
+```
+@startuml
+title Application initialization phase (ex. set_event_handler)
+entity App
+entity HomeScreenBinder
+entity HomeScreenGUI
+App->HomeScreenBinder: init(port, token)
+App->HomeScreenBinder: set_event_handler()
+
+note over HomeScreenBinder
+ setup event handler the App wishes to receive
+ ・LibHomeScreen::Event_TapShortcut
+ ・LibHomeScreen::Event_OnScreenMessage
+ ・LibHomeScreen::Event_OnScreenReply
+end note
+
+@enduml
+```
+
+```
+@startuml
+title Application Callback Event TapShortcut phase
+entity App
+entity HomeScreenBinder
+entity HomeScreenGUI
+App->HomeScreenBinder: set_event_handler()
+
+note over App
+ LibHomeScreen::Event_TapShortcut
+end note
+
+HomeScreenGUI->HomeScreenBinder: tapShortcut(application_name)
+HomeScreenBinder->App: event_handler(application_name)
+@enduml
+```
+
+```
+@startuml
+title Application Callback Event On Screen Message / Reply phase
+entity App
+entity HomeScreenBinder
+entity HomeScreenGUI
+
+HomeScreenGUI->HomeScreenBinder: set_event_handler()
+
+note over HomeScreenGUI
+ LibHomeScreen::Event_OnScreenMessage
+end note
+
+
+App->HomeScreenBinder: set_event_handler()
+
+note over App
+ LibHomeScreen::Event_OnScreenReply
+end note
+
+App->HomeScreenBinder: onScreenMessage(display_message)
+HomeScreenBinder->HomeScreenGUI: event_handler(display_message)
+HomeScreenGUI->HomeScreenBinder: onScreenReply(reply_message)
+HomeScreenBinder->App: event_handler(reply_message)
+@enduml
+```
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/.keep b/demo#3/common/agl-service-homescreen/doc/api-ref/.keep
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/.keep
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/annotated.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/annotated.html
new file mode 100644
index 0000000..8e5887a
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/annotated.html
@@ -0,0 +1,79 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>HomeScreenBinding: Class List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+ <td id="projectalign" style="padding-left: 0.5em;">
+ <div id="projectname">HomeScreenBinding
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.13 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+$(function() {
+ initMenu('',true,false,'search.php','Search');
+ $(document).ready(function() { init_search(); });
+});
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+ onmouseover="return searchBox.OnSearchSelectShow()"
+ onmouseout="return searchBox.OnSearchSelectHide()"
+ onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0"
+ name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div class="header">
+ <div class="headertitle">
+<div class="title">Class List</div> </div>
+</div><!--header-->
+<div class="contents">
+<div class="textblock">Here are the classes, structs, unions and interfaces with brief descriptions:</div><div class="directory">
+<table class="directory">
+<tr id="row_0_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="df/d7d/structevent.html" target="_self">event</a></td><td class="desc"></td></tr>
+<tr id="row_1_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="de/dd0/class_lib_home_screen.html" target="_self">LibHomeScreen</a></td><td class="desc"></td></tr>
+</table>
+</div><!-- directory -->
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/>
+</a> 1.8.13
+</small></address>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/bc_s.png b/demo#3/common/agl-service-homescreen/doc/api-ref/html/bc_s.png
new file mode 100644
index 0000000..224b29a
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/bc_s.png
Binary files differ
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/bdwn.png b/demo#3/common/agl-service-homescreen/doc/api-ref/html/bdwn.png
new file mode 100644
index 0000000..940a0b9
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/bdwn.png
Binary files differ
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/classes.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/classes.html
new file mode 100644
index 0000000..1d0c8c0
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/classes.html
@@ -0,0 +1,83 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>HomeScreenBinding: Class Index</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+ <td id="projectalign" style="padding-left: 0.5em;">
+ <div id="projectname">HomeScreenBinding
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.13 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+$(function() {
+ initMenu('',true,false,'search.php','Search');
+ $(document).ready(function() { init_search(); });
+});
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+ onmouseover="return searchBox.OnSearchSelectShow()"
+ onmouseout="return searchBox.OnSearchSelectHide()"
+ onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0"
+ name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div class="header">
+ <div class="headertitle">
+<div class="title">Class Index</div> </div>
+</div><!--header-->
+<div class="contents">
+<div class="qindex"><a class="qindex" href="#letter_e">e</a>&#160;|&#160;<a class="qindex" href="#letter_l">l</a></div>
+<table class="classindex">
+<tr><td rowspan="2" valign="bottom"><a name="letter_e"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;e&#160;&#160;</div></td></tr></table>
+</td><td rowspan="2" valign="bottom"><a name="letter_l"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;l&#160;&#160;</div></td></tr></table>
+</td><td></td></tr>
+<tr><td></td></tr>
+<tr><td valign="top"><a class="el" href="df/d7d/structevent.html">event</a>&#160;&#160;&#160;</td><td valign="top"><a class="el" href="de/dd0/class_lib_home_screen.html">LibHomeScreen</a>&#160;&#160;&#160;</td><td></td></tr>
+<tr><td></td><td></td><td></td></tr>
+</table>
+<div class="qindex"><a class="qindex" href="#letter_e">e</a>&#160;|&#160;<a class="qindex" href="#letter_l">l</a></div>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/>
+</a> 1.8.13
+</small></address>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/closed.png b/demo#3/common/agl-service-homescreen/doc/api-ref/html/closed.png
new file mode 100644
index 0000000..98cc2c9
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/closed.png
Binary files differ
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/d0/d1e/homescreen_8c.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/d0/d1e/homescreen_8c.html
new file mode 100644
index 0000000..2ea52e3
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/d0/d1e/homescreen_8c.html
@@ -0,0 +1,832 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>HomeScreenBinding: src/homescreen.c File Reference</title>
+<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="../../jquery.js"></script>
+<script type="text/javascript" src="../../dynsections.js"></script>
+<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="../../search/searchdata.js"></script>
+<script type="text/javascript" src="../../search/search.js"></script>
+<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+ <td id="projectalign" style="padding-left: 0.5em;">
+ <div id="projectname">HomeScreenBinding
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.13 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
+</script>
+<script type="text/javascript" src="../../menudata.js"></script>
+<script type="text/javascript" src="../../menu.js"></script>
+<script type="text/javascript">
+$(function() {
+ initMenu('../../',true,false,'search.php','Search');
+ $(document).ready(function() { init_search(); });
+});
+</script>
+<div id="main-nav"></div>
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+ onmouseover="return searchBox.OnSearchSelectShow()"
+ onmouseout="return searchBox.OnSearchSelectHide()"
+ onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0"
+ name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div id="nav-path" class="navpath">
+ <ul>
+<li class="navelem"><a class="el" href="../../dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li> </ul>
+</div>
+</div><!-- top -->
+<div class="header">
+ <div class="summary">
+<a href="#nested-classes">Classes</a> &#124;
+<a href="#define-members">Macros</a> &#124;
+<a href="#func-members">Functions</a> &#124;
+<a href="#var-members">Variables</a> </div>
+ <div class="headertitle">
+<div class="title">homescreen.c File Reference</div> </div>
+</div><!--header-->
+<div class="contents">
+<div class="textblock"><code>#include &lt;afb/afb-binding.h&gt;</code><br />
+<code>#include &lt;stdio.h&gt;</code><br />
+<code>#include &lt;string.h&gt;</code><br />
+<code>#include &lt;stdlib.h&gt;</code><br />
+<code>#include &lt;stdint.h&gt;</code><br />
+<code>#include &lt;unistd.h&gt;</code><br />
+<code>#include &lt;json-c/json.h&gt;</code><br />
+<code>#include &lt;glib.h&gt;</code><br />
+<code>#include &lt;pthread.h&gt;</code><br />
+<code>#include &quot;<a class="el" href="../../d3/d3d/hs-helper_8h_source.html">hs-helper.h</a>&quot;</code><br />
+</div>
+<p><a href="../../d0/d1e/homescreen_8c_source.html">Go to the source code of this file.</a></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
+Classes</h2></td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d7d/structevent.html">event</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table><table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
+Macros</h2></td></tr>
+<tr class="memitem:a369266c24eacffb87046522897a570d5"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d1e/homescreen_8c.html#a369266c24eacffb87046522897a570d5">_GNU_SOURCE</a></td></tr>
+<tr class="separator:a369266c24eacffb87046522897a570d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ad2c1fbc92ba364fcf83f15e6d0af66f0"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d1e/homescreen_8c.html#ad2c1fbc92ba364fcf83f15e6d0af66f0">AFB_BINDING_VERSION</a>&#160;&#160;&#160;2</td></tr>
+<tr class="separator:ad2c1fbc92ba364fcf83f15e6d0af66f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a09f43d9e7e1c5d2198c0d66024b4500e"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d1e/homescreen_8c.html#a09f43d9e7e1c5d2198c0d66024b4500e">COMMAND_EVENT_NUM</a>&#160;&#160;&#160;4</td></tr>
+<tr class="separator:a09f43d9e7e1c5d2198c0d66024b4500e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a9a68ed04201d9390bb85b2c6ab1d7250"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d1e/homescreen_8c.html#a9a68ed04201d9390bb85b2c6ab1d7250">EVENT_SUBSCRIBE_ERROR_CODE</a>&#160;&#160;&#160;100</td></tr>
+<tr class="separator:a9a68ed04201d9390bb85b2c6ab1d7250"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table><table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
+Functions</h2></td></tr>
+<tr class="memitem:af48cab759d4ae0ddbfcdd60f4051ba05"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d1e/homescreen_8c.html#af48cab759d4ae0ddbfcdd60f4051ba05">pingSample</a> (struct afb_req request)</td></tr>
+<tr class="separator:af48cab759d4ae0ddbfcdd60f4051ba05"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a096eae5c8f297f9df142a406eea56227"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d1e/homescreen_8c.html#a096eae5c8f297f9df142a406eea56227">tap_shortcut</a> (struct afb_req request)</td></tr>
+<tr class="separator:a096eae5c8f297f9df142a406eea56227"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a640cf8ed97d804c5ed1c09a349056338"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d1e/homescreen_8c.html#a640cf8ed97d804c5ed1c09a349056338">on_screen_message</a> (struct afb_req request)</td></tr>
+<tr class="separator:a640cf8ed97d804c5ed1c09a349056338"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a2f380055d7d69828115d2a8951634933"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d1e/homescreen_8c.html#a2f380055d7d69828115d2a8951634933">on_screen_reply</a> (struct afb_req request)</td></tr>
+<tr class="separator:a2f380055d7d69828115d2a8951634933"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a4ff0c8b506669e5622a6ee168134d8f1"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d1e/homescreen_8c.html#a4ff0c8b506669e5622a6ee168134d8f1">subscribe</a> (struct afb_req request)</td></tr>
+<tr class="separator:a4ff0c8b506669e5622a6ee168134d8f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ab92621255d7370c6dd8a0f1a8e376ad3"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d1e/homescreen_8c.html#ab92621255d7370c6dd8a0f1a8e376ad3">unsubscribe</a> (struct afb_req request)</td></tr>
+<tr class="separator:ab92621255d7370c6dd8a0f1a8e376ad3"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a83d646edf54a6a082f69121bc89a08de"><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d1e/homescreen_8c.html#a83d646edf54a6a082f69121bc89a08de">preinit</a> ()</td></tr>
+<tr class="separator:a83d646edf54a6a082f69121bc89a08de"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a00cbbc0f3f4452db078ae511684a6adc"><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d1e/homescreen_8c.html#a00cbbc0f3f4452db078ae511684a6adc">init</a> ()</td></tr>
+<tr class="separator:a00cbbc0f3f4452db078ae511684a6adc"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a1279893c0fe937311a81e0a98fb4cf1c"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d1e/homescreen_8c.html#a1279893c0fe937311a81e0a98fb4cf1c">onevent</a> (const char *<a class="el" href="../../df/d7d/structevent.html">event</a>, struct json_object *object)</td></tr>
+<tr class="separator:a1279893c0fe937311a81e0a98fb4cf1c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table><table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
+Variables</h2></td></tr>
+<tr class="memitem:a1c3c5bfa861dcb58d9e9d216d893864c"><td class="memItemLeft" align="right" valign="top">static struct <a class="el" href="../../df/d7d/structevent.html">event</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d1e/homescreen_8c.html#a1c3c5bfa861dcb58d9e9d216d893864c">event_list</a> [<a class="el" href="../../d0/d1e/homescreen_8c.html#a09f43d9e7e1c5d2198c0d66024b4500e">COMMAND_EVENT_NUM</a>]</td></tr>
+<tr class="separator:a1c3c5bfa861dcb58d9e9d216d893864c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a2af1ff5a4cbf03125e61e903832035f5"><td class="memItemLeft" align="right" valign="top">static struct afb_event&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d1e/homescreen_8c.html#a2af1ff5a4cbf03125e61e903832035f5">ev_tap_shortcut</a></td></tr>
+<tr class="separator:a2af1ff5a4cbf03125e61e903832035f5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:af7cfc4f688bb898c09291252c4cb832c"><td class="memItemLeft" align="right" valign="top">static struct afb_event&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d1e/homescreen_8c.html#af7cfc4f688bb898c09291252c4cb832c">ev_on_screen_message</a></td></tr>
+<tr class="separator:af7cfc4f688bb898c09291252c4cb832c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a5c225341e0ecbae0585302ef754a55ec"><td class="memItemLeft" align="right" valign="top">static struct afb_event&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d1e/homescreen_8c.html#a5c225341e0ecbae0585302ef754a55ec">ev_on_screen_reply</a></td></tr>
+<tr class="separator:a5c225341e0ecbae0585302ef754a55ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a25fbdcc4e5787e3f41d99f4a71e86611"><td class="memItemLeft" align="right" valign="top">static struct afb_event&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d1e/homescreen_8c.html#a25fbdcc4e5787e3f41d99f4a71e86611">ev_reserved</a></td></tr>
+<tr class="separator:a25fbdcc4e5787e3f41d99f4a71e86611"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aed1c5296a2e6d34945507a0fca17a376"><td class="memItemLeft" align="right" valign="top">static const char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d1e/homescreen_8c.html#aed1c5296a2e6d34945507a0fca17a376">_error</a> [] = &quot;error&quot;</td></tr>
+<tr class="separator:aed1c5296a2e6d34945507a0fca17a376"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a1f2c79fa6801b63751e270d67994fe81"><td class="memItemLeft" align="right" valign="top">static const char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d1e/homescreen_8c.html#a1f2c79fa6801b63751e270d67994fe81">_application_name</a> [] = &quot;application_name&quot;</td></tr>
+<tr class="separator:a1f2c79fa6801b63751e270d67994fe81"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:abfd6c1d6f316fa952b11553f8f275e92"><td class="memItemLeft" align="right" valign="top">static const char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d1e/homescreen_8c.html#abfd6c1d6f316fa952b11553f8f275e92">_display_message</a> [] = &quot;display_message&quot;</td></tr>
+<tr class="separator:abfd6c1d6f316fa952b11553f8f275e92"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a79b0f0b481161527ccb80e83da143219"><td class="memItemLeft" align="right" valign="top">static const char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d1e/homescreen_8c.html#a79b0f0b481161527ccb80e83da143219">_reply_message</a> [] = &quot;reply_message&quot;</td></tr>
+<tr class="separator:a79b0f0b481161527ccb80e83da143219"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:acad6dadf60fac3d701e488e4fcd11c89"><td class="memItemLeft" align="right" valign="top">static const struct afb_verb_v2&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d1e/homescreen_8c.html#acad6dadf60fac3d701e488e4fcd11c89">verbs</a> []</td></tr>
+<tr class="separator:acad6dadf60fac3d701e488e4fcd11c89"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ae2a62ab481a2922cbfc788193857a12e"><td class="memItemLeft" align="right" valign="top">const struct afb_binding_v2&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d1e/homescreen_8c.html#ae2a62ab481a2922cbfc788193857a12e">afbBindingV2</a></td></tr>
+<tr class="separator:ae2a62ab481a2922cbfc788193857a12e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<h2 class="groupheader">Macro Definition Documentation</h2>
+<a id="a369266c24eacffb87046522897a570d5"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a369266c24eacffb87046522897a570d5">&#9670;&nbsp;</a></span>_GNU_SOURCE</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define _GNU_SOURCE</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p class="definition">Definition at line <a class="el" href="../../d0/d1e/homescreen_8c_source.html#l00017">17</a> of file <a class="el" href="../../d0/d1e/homescreen_8c_source.html">homescreen.c</a>.</p>
+
+</div>
+</div>
+<a id="ad2c1fbc92ba364fcf83f15e6d0af66f0"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ad2c1fbc92ba364fcf83f15e6d0af66f0">&#9670;&nbsp;</a></span>AFB_BINDING_VERSION</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define AFB_BINDING_VERSION&#160;&#160;&#160;2</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p class="definition">Definition at line <a class="el" href="../../d0/d1e/homescreen_8c_source.html#l00018">18</a> of file <a class="el" href="../../d0/d1e/homescreen_8c_source.html">homescreen.c</a>.</p>
+
+</div>
+</div>
+<a id="a09f43d9e7e1c5d2198c0d66024b4500e"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a09f43d9e7e1c5d2198c0d66024b4500e">&#9670;&nbsp;</a></span>COMMAND_EVENT_NUM</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define COMMAND_EVENT_NUM&#160;&#160;&#160;4</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p class="definition">Definition at line <a class="el" href="../../d0/d1e/homescreen_8c_source.html#l00031">31</a> of file <a class="el" href="../../d0/d1e/homescreen_8c_source.html">homescreen.c</a>.</p>
+
+</div>
+</div>
+<a id="a9a68ed04201d9390bb85b2c6ab1d7250"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a9a68ed04201d9390bb85b2c6ab1d7250">&#9670;&nbsp;</a></span>EVENT_SUBSCRIBE_ERROR_CODE</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define EVENT_SUBSCRIBE_ERROR_CODE&#160;&#160;&#160;100</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p class="definition">Definition at line <a class="el" href="../../d0/d1e/homescreen_8c_source.html#l00032">32</a> of file <a class="el" href="../../d0/d1e/homescreen_8c_source.html">homescreen.c</a>.</p>
+
+</div>
+</div>
+<h2 class="groupheader">Function Documentation</h2>
+<a id="a00cbbc0f3f4452db078ae511684a6adc"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a00cbbc0f3f4452db078ae511684a6adc">&#9670;&nbsp;</a></span>init()</h2>
+
+<div class="memitem">
+<div class="memproto">
+<table class="mlabels">
+ <tr>
+ <td class="mlabels-left">
+ <table class="memname">
+ <tr>
+ <td class="memname">static int init </td>
+ <td>(</td>
+ <td class="paramname"></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+ </td>
+ <td class="mlabels-right">
+<span class="mlabels"><span class="mlabel">static</span></span> </td>
+ </tr>
+</table>
+</div><div class="memdoc">
+
+<p class="definition">Definition at line <a class="el" href="../../d0/d1e/homescreen_8c_source.html#l00277">277</a> of file <a class="el" href="../../d0/d1e/homescreen_8c_source.html">homescreen.c</a>.</p>
+<div class="fragment"><div class="line"><a name="l00278"></a><span class="lineno"> 278</span>&#160;{</div><div class="line"><a name="l00279"></a><span class="lineno"> 279</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a>(<span class="stringliteral">&quot;homescreen-service&quot;</span>,<span class="stringliteral">&quot;binding init&quot;</span>);</div><div class="line"><a name="l00280"></a><span class="lineno"> 280</span>&#160;</div><div class="line"><a name="l00281"></a><span class="lineno"> 281</span>&#160; <a class="code" href="../../d0/d1e/homescreen_8c.html#a2af1ff5a4cbf03125e61e903832035f5">ev_tap_shortcut</a> = afb_daemon_make_event(<a class="code" href="../../d3/d3d/hs-helper_8h.html#a0cd84b1a2184c9b84d1b7bf24582f28e">evlist</a>[0]);</div><div class="line"><a name="l00282"></a><span class="lineno"> 282</span>&#160; <a class="code" href="../../d0/d1e/homescreen_8c.html#af7cfc4f688bb898c09291252c4cb832c">ev_on_screen_message</a> = afb_daemon_make_event(<a class="code" href="../../d3/d3d/hs-helper_8h.html#a0cd84b1a2184c9b84d1b7bf24582f28e">evlist</a>[1]);</div><div class="line"><a name="l00283"></a><span class="lineno"> 283</span>&#160; <a class="code" href="../../d0/d1e/homescreen_8c.html#a5c225341e0ecbae0585302ef754a55ec">ev_on_screen_reply</a> = afb_daemon_make_event(<a class="code" href="../../d3/d3d/hs-helper_8h.html#a0cd84b1a2184c9b84d1b7bf24582f28e">evlist</a>[2]);</div><div class="line"><a name="l00284"></a><span class="lineno"> 284</span>&#160; <a class="code" href="../../d0/d1e/homescreen_8c.html#a25fbdcc4e5787e3f41d99f4a71e86611">ev_reserved</a> = afb_daemon_make_event(<a class="code" href="../../d3/d3d/hs-helper_8h.html#a0cd84b1a2184c9b84d1b7bf24582f28e">evlist</a>[3]);</div><div class="line"><a name="l00285"></a><span class="lineno"> 285</span>&#160;</div><div class="line"><a name="l00286"></a><span class="lineno"> 286</span>&#160; <a class="code" href="../../d0/d1e/homescreen_8c.html#a1c3c5bfa861dcb58d9e9d216d893864c">event_list</a>[0].<a class="code" href="../../df/d7d/structevent.html#a45c6cfb7961a21a3366db067e4cc59ab">name</a> = <a class="code" href="../../d3/d3d/hs-helper_8h.html#a0cd84b1a2184c9b84d1b7bf24582f28e">evlist</a>[0];</div><div class="line"><a name="l00287"></a><span class="lineno"> 287</span>&#160; <a class="code" href="../../d0/d1e/homescreen_8c.html#a1c3c5bfa861dcb58d9e9d216d893864c">event_list</a>[0].<a class="code" href="../../df/d7d/structevent.html#a58726ebc551d36562ac3f9e1fe293214">event</a> = &amp;<a class="code" href="../../d0/d1e/homescreen_8c.html#a2af1ff5a4cbf03125e61e903832035f5">ev_tap_shortcut</a>;</div><div class="line"><a name="l00288"></a><span class="lineno"> 288</span>&#160;</div><div class="line"><a name="l00289"></a><span class="lineno"> 289</span>&#160; <a class="code" href="../../d0/d1e/homescreen_8c.html#a1c3c5bfa861dcb58d9e9d216d893864c">event_list</a>[1].<a class="code" href="../../df/d7d/structevent.html#a45c6cfb7961a21a3366db067e4cc59ab">name</a> = <a class="code" href="../../d3/d3d/hs-helper_8h.html#a0cd84b1a2184c9b84d1b7bf24582f28e">evlist</a>[1];</div><div class="line"><a name="l00290"></a><span class="lineno"> 290</span>&#160; <a class="code" href="../../d0/d1e/homescreen_8c.html#a1c3c5bfa861dcb58d9e9d216d893864c">event_list</a>[1].<a class="code" href="../../df/d7d/structevent.html#a58726ebc551d36562ac3f9e1fe293214">event</a> = &amp;<a class="code" href="../../d0/d1e/homescreen_8c.html#af7cfc4f688bb898c09291252c4cb832c">ev_on_screen_message</a>;</div><div class="line"><a name="l00291"></a><span class="lineno"> 291</span>&#160;</div><div class="line"><a name="l00292"></a><span class="lineno"> 292</span>&#160; <a class="code" href="../../d0/d1e/homescreen_8c.html#a1c3c5bfa861dcb58d9e9d216d893864c">event_list</a>[2].<a class="code" href="../../df/d7d/structevent.html#a45c6cfb7961a21a3366db067e4cc59ab">name</a> = <a class="code" href="../../d3/d3d/hs-helper_8h.html#a0cd84b1a2184c9b84d1b7bf24582f28e">evlist</a>[2];</div><div class="line"><a name="l00293"></a><span class="lineno"> 293</span>&#160; <a class="code" href="../../d0/d1e/homescreen_8c.html#a1c3c5bfa861dcb58d9e9d216d893864c">event_list</a>[2].<a class="code" href="../../df/d7d/structevent.html#a58726ebc551d36562ac3f9e1fe293214">event</a> = &amp;<a class="code" href="../../d0/d1e/homescreen_8c.html#a5c225341e0ecbae0585302ef754a55ec">ev_on_screen_reply</a>;</div><div class="line"><a name="l00294"></a><span class="lineno"> 294</span>&#160;</div><div class="line"><a name="l00295"></a><span class="lineno"> 295</span>&#160; <a class="code" href="../../d0/d1e/homescreen_8c.html#a1c3c5bfa861dcb58d9e9d216d893864c">event_list</a>[3].<a class="code" href="../../df/d7d/structevent.html#a45c6cfb7961a21a3366db067e4cc59ab">name</a> = <a class="code" href="../../d3/d3d/hs-helper_8h.html#a0cd84b1a2184c9b84d1b7bf24582f28e">evlist</a>[3];</div><div class="line"><a name="l00296"></a><span class="lineno"> 296</span>&#160; <a class="code" href="../../d0/d1e/homescreen_8c.html#a1c3c5bfa861dcb58d9e9d216d893864c">event_list</a>[3].<a class="code" href="../../df/d7d/structevent.html#a58726ebc551d36562ac3f9e1fe293214">event</a> = &amp;<a class="code" href="../../d0/d1e/homescreen_8c.html#a25fbdcc4e5787e3f41d99f4a71e86611">ev_reserved</a>;</div><div class="line"><a name="l00297"></a><span class="lineno"> 297</span>&#160;</div><div class="line"><a name="l00298"></a><span class="lineno"> 298</span>&#160; <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00299"></a><span class="lineno"> 299</span>&#160;}</div><div class="ttc" id="structevent_html_a58726ebc551d36562ac3f9e1fe293214"><div class="ttname"><a href="../../df/d7d/structevent.html#a58726ebc551d36562ac3f9e1fe293214">event::event</a></div><div class="ttdeci">struct afb_event * event</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00037">homescreen.c:37</a></div></div>
+<div class="ttc" id="hmi-debug_8h_html_abc0d6e0760017d8ae48b836925b2ef15"><div class="ttname"><a href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a></div><div class="ttdeci">#define HMI_NOTICE(prefix, args,...)</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d76/hmi-debug_8h_source.html#l00020">hmi-debug.h:20</a></div></div>
+<div class="ttc" id="homescreen_8c_html_a25fbdcc4e5787e3f41d99f4a71e86611"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#a25fbdcc4e5787e3f41d99f4a71e86611">ev_reserved</a></div><div class="ttdeci">static struct afb_event ev_reserved</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00045">homescreen.c:45</a></div></div>
+<div class="ttc" id="hs-helper_8h_html_a0cd84b1a2184c9b84d1b7bf24582f28e"><div class="ttname"><a href="../../d3/d3d/hs-helper_8h.html#a0cd84b1a2184c9b84d1b7bf24582f28e">evlist</a></div><div class="ttdeci">static const char * evlist[]</div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d3d/hs-helper_8h_source.html#l00034">hs-helper.h:34</a></div></div>
+<div class="ttc" id="structevent_html_a45c6cfb7961a21a3366db067e4cc59ab"><div class="ttname"><a href="../../df/d7d/structevent.html#a45c6cfb7961a21a3366db067e4cc59ab">event::name</a></div><div class="ttdeci">const char * name</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00036">homescreen.c:36</a></div></div>
+<div class="ttc" id="homescreen_8c_html_a5c225341e0ecbae0585302ef754a55ec"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#a5c225341e0ecbae0585302ef754a55ec">ev_on_screen_reply</a></div><div class="ttdeci">static struct afb_event ev_on_screen_reply</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00044">homescreen.c:44</a></div></div>
+<div class="ttc" id="homescreen_8c_html_af7cfc4f688bb898c09291252c4cb832c"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#af7cfc4f688bb898c09291252c4cb832c">ev_on_screen_message</a></div><div class="ttdeci">static struct afb_event ev_on_screen_message</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00043">homescreen.c:43</a></div></div>
+<div class="ttc" id="homescreen_8c_html_a1c3c5bfa861dcb58d9e9d216d893864c"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#a1c3c5bfa861dcb58d9e9d216d893864c">event_list</a></div><div class="ttdeci">static struct event event_list[COMMAND_EVENT_NUM]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00040">homescreen.c:40</a></div></div>
+<div class="ttc" id="homescreen_8c_html_a2af1ff5a4cbf03125e61e903832035f5"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#a2af1ff5a4cbf03125e61e903832035f5">ev_tap_shortcut</a></div><div class="ttdeci">static struct afb_event ev_tap_shortcut</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00042">homescreen.c:42</a></div></div>
+</div><!-- fragment -->
+</div>
+</div>
+<a id="a640cf8ed97d804c5ed1c09a349056338"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a640cf8ed97d804c5ed1c09a349056338">&#9670;&nbsp;</a></span>on_screen_message()</h2>
+
+<div class="memitem">
+<div class="memproto">
+<table class="mlabels">
+ <tr>
+ <td class="mlabels-left">
+ <table class="memname">
+ <tr>
+ <td class="memname">static void on_screen_message </td>
+ <td>(</td>
+ <td class="paramtype">struct afb_req&#160;</td>
+ <td class="paramname"><em>request</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+ </td>
+ <td class="mlabels-right">
+<span class="mlabels"><span class="mlabel">static</span></span> </td>
+ </tr>
+</table>
+</div><div class="memdoc">
+<p>HomeScreen OnScreen message</p>
+<h4>Parameters</h4>
+<p>Request key</p><ul>
+<li>display_message : message for display</li>
+</ul>
+<h4>Return</h4>
+<p>Nothing </p>
+
+<p class="definition">Definition at line <a class="el" href="../../d0/d1e/homescreen_8c_source.html#l00114">114</a> of file <a class="el" href="../../d0/d1e/homescreen_8c_source.html">homescreen.c</a>.</p>
+<div class="fragment"><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160;{</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a>(<span class="stringliteral">&quot;homescreen-service&quot;</span>,<span class="stringliteral">&quot;is called.&quot;</span>);</div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160;</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160; <span class="keywordtype">int</span> ret = 0;</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160; <span class="keyword">const</span> <span class="keywordtype">char</span>* value = afb_req_value(request, <a class="code" href="../../d0/d1e/homescreen_8c.html#abfd6c1d6f316fa952b11553f8f275e92">_display_message</a>);</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160; <span class="keywordflow">if</span> (value) {</div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160;</div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a>(<span class="stringliteral">&quot;homescreen-service&quot;</span>,<span class="stringliteral">&quot;request params = %s.&quot;</span>, value);</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160;</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160; <span class="keyword">struct </span>json_object* push_obj = json_object_new_object();</div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160; <a class="code" href="../../dd/d1d/hs-helper_8c.html#a8777c53f1d4d5412f19b134ad85ffedf">hs_add_object_to_json_object_str</a>( push_obj, 2,</div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160; <a class="code" href="../../d0/d1e/homescreen_8c.html#abfd6c1d6f316fa952b11553f8f275e92">_display_message</a>, value);</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160; afb_event_push(<a class="code" href="../../d0/d1e/homescreen_8c.html#af7cfc4f688bb898c09291252c4cb832c">ev_on_screen_message</a>, push_obj);</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160; } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160; afb_req_fail_f(request, <span class="stringliteral">&quot;failed&quot;</span>, <span class="stringliteral">&quot;called %s, Unknown palameter&quot;</span>, __FUNCTION__);</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160; <span class="keywordflow">return</span>;</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160; }</div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160;</div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160; <span class="comment">// response to HomeScreen</span></div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160; <span class="keyword">struct </span>json_object *res = json_object_new_object();</div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160; <a class="code" href="../../dd/d1d/hs-helper_8c.html#ae83604a37134e7bdee3ce4f10bb0b47a">hs_add_object_to_json_object_func</a>(res, __FUNCTION__, 2,</div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160; <a class="code" href="../../d0/d1e/homescreen_8c.html#aed1c5296a2e6d34945507a0fca17a376">_error</a>, ret);</div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160; afb_req_success(request, res, <span class="stringliteral">&quot;afb_event_push event [on_screen_message]&quot;</span>);</div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160;}</div><div class="ttc" id="hs-helper_8c_html_a8777c53f1d4d5412f19b134ad85ffedf"><div class="ttname"><a href="../../dd/d1d/hs-helper_8c.html#a8777c53f1d4d5412f19b134ad85ffedf">hs_add_object_to_json_object_str</a></div><div class="ttdeci">void hs_add_object_to_json_object_str(struct json_object *j_obj, int count,...)</div><div class="ttdef"><b>Definition:</b> <a href="../../dd/d1d/hs-helper_8c_source.html#l00110">hs-helper.c:110</a></div></div>
+<div class="ttc" id="hmi-debug_8h_html_abc0d6e0760017d8ae48b836925b2ef15"><div class="ttname"><a href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a></div><div class="ttdeci">#define HMI_NOTICE(prefix, args,...)</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d76/hmi-debug_8h_source.html#l00020">hmi-debug.h:20</a></div></div>
+<div class="ttc" id="homescreen_8c_html_aed1c5296a2e6d34945507a0fca17a376"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#aed1c5296a2e6d34945507a0fca17a376">_error</a></div><div class="ttdeci">static const char _error[]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00047">homescreen.c:47</a></div></div>
+<div class="ttc" id="homescreen_8c_html_af7cfc4f688bb898c09291252c4cb832c"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#af7cfc4f688bb898c09291252c4cb832c">ev_on_screen_message</a></div><div class="ttdeci">static struct afb_event ev_on_screen_message</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00043">homescreen.c:43</a></div></div>
+<div class="ttc" id="homescreen_8c_html_abfd6c1d6f316fa952b11553f8f275e92"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#abfd6c1d6f316fa952b11553f8f275e92">_display_message</a></div><div class="ttdeci">static const char _display_message[]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00050">homescreen.c:50</a></div></div>
+<div class="ttc" id="hs-helper_8c_html_ae83604a37134e7bdee3ce4f10bb0b47a"><div class="ttname"><a href="../../dd/d1d/hs-helper_8c.html#ae83604a37134e7bdee3ce4f10bb0b47a">hs_add_object_to_json_object_func</a></div><div class="ttdeci">void hs_add_object_to_json_object_func(struct json_object *j_obj, const char *verb_name, int count,...)</div><div class="ttdef"><b>Definition:</b> <a href="../../dd/d1d/hs-helper_8c_source.html#l00125">hs-helper.c:125</a></div></div>
+</div><!-- fragment -->
+</div>
+</div>
+<a id="a2f380055d7d69828115d2a8951634933"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a2f380055d7d69828115d2a8951634933">&#9670;&nbsp;</a></span>on_screen_reply()</h2>
+
+<div class="memitem">
+<div class="memproto">
+<table class="mlabels">
+ <tr>
+ <td class="mlabels-left">
+ <table class="memname">
+ <tr>
+ <td class="memname">static void on_screen_reply </td>
+ <td>(</td>
+ <td class="paramtype">struct afb_req&#160;</td>
+ <td class="paramname"><em>request</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+ </td>
+ <td class="mlabels-right">
+<span class="mlabels"><span class="mlabel">static</span></span> </td>
+ </tr>
+</table>
+</div><div class="memdoc">
+<p>HomeScreen OnScreen Reply</p>
+<h4>Parameters</h4>
+<p>Request key</p><ul>
+<li>reply_message : message for reply</li>
+</ul>
+<h4>Return</h4>
+<p>Nothing </p>
+
+<p class="definition">Definition at line <a class="el" href="../../d0/d1e/homescreen_8c_source.html#l00151">151</a> of file <a class="el" href="../../d0/d1e/homescreen_8c_source.html">homescreen.c</a>.</p>
+<div class="fragment"><div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160;{</div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a>(<span class="stringliteral">&quot;homescreen-service&quot;</span>,<span class="stringliteral">&quot;is called.&quot;</span>);</div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160;</div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160; <span class="keywordtype">int</span> ret = 0;</div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160; <span class="keyword">const</span> <span class="keywordtype">char</span>* value = afb_req_value(request, <a class="code" href="../../d0/d1e/homescreen_8c.html#a79b0f0b481161527ccb80e83da143219">_reply_message</a>);</div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160; <span class="keywordflow">if</span> (value) {</div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>&#160;</div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a>(<span class="stringliteral">&quot;homescreen-service&quot;</span>,<span class="stringliteral">&quot;request params = %s.&quot;</span>, value);</div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160;</div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160; <span class="keyword">struct </span>json_object* push_obj = json_object_new_object();</div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span>&#160; <a class="code" href="../../dd/d1d/hs-helper_8c.html#a8777c53f1d4d5412f19b134ad85ffedf">hs_add_object_to_json_object_str</a>( push_obj, 2,</div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span>&#160; <a class="code" href="../../d0/d1e/homescreen_8c.html#a79b0f0b481161527ccb80e83da143219">_reply_message</a>, value);</div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>&#160; afb_event_push(<a class="code" href="../../d0/d1e/homescreen_8c.html#a5c225341e0ecbae0585302ef754a55ec">ev_on_screen_reply</a>, push_obj);</div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>&#160; } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160; afb_req_fail_f(request, <span class="stringliteral">&quot;failed&quot;</span>, <span class="stringliteral">&quot;called %s, Unknown palameter&quot;</span>, __FUNCTION__);</div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160; <span class="keywordflow">return</span>;</div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span>&#160; }</div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span>&#160;</div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span>&#160; <span class="comment">// response to HomeScreen</span></div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span>&#160; <span class="keyword">struct </span>json_object *res = json_object_new_object();</div><div class="line"><a name="l00172"></a><span class="lineno"> 172</span>&#160; <a class="code" href="../../dd/d1d/hs-helper_8c.html#ae83604a37134e7bdee3ce4f10bb0b47a">hs_add_object_to_json_object_func</a>(res, __FUNCTION__, 2,</div><div class="line"><a name="l00173"></a><span class="lineno"> 173</span>&#160; <a class="code" href="../../d0/d1e/homescreen_8c.html#aed1c5296a2e6d34945507a0fca17a376">_error</a>, ret);</div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span>&#160; afb_req_success(request, res, <span class="stringliteral">&quot;afb_event_push event [on_screen_reply]&quot;</span>);</div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span>&#160;}</div><div class="ttc" id="hs-helper_8c_html_a8777c53f1d4d5412f19b134ad85ffedf"><div class="ttname"><a href="../../dd/d1d/hs-helper_8c.html#a8777c53f1d4d5412f19b134ad85ffedf">hs_add_object_to_json_object_str</a></div><div class="ttdeci">void hs_add_object_to_json_object_str(struct json_object *j_obj, int count,...)</div><div class="ttdef"><b>Definition:</b> <a href="../../dd/d1d/hs-helper_8c_source.html#l00110">hs-helper.c:110</a></div></div>
+<div class="ttc" id="hmi-debug_8h_html_abc0d6e0760017d8ae48b836925b2ef15"><div class="ttname"><a href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a></div><div class="ttdeci">#define HMI_NOTICE(prefix, args,...)</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d76/hmi-debug_8h_source.html#l00020">hmi-debug.h:20</a></div></div>
+<div class="ttc" id="homescreen_8c_html_aed1c5296a2e6d34945507a0fca17a376"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#aed1c5296a2e6d34945507a0fca17a376">_error</a></div><div class="ttdeci">static const char _error[]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00047">homescreen.c:47</a></div></div>
+<div class="ttc" id="homescreen_8c_html_a5c225341e0ecbae0585302ef754a55ec"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#a5c225341e0ecbae0585302ef754a55ec">ev_on_screen_reply</a></div><div class="ttdeci">static struct afb_event ev_on_screen_reply</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00044">homescreen.c:44</a></div></div>
+<div class="ttc" id="homescreen_8c_html_a79b0f0b481161527ccb80e83da143219"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#a79b0f0b481161527ccb80e83da143219">_reply_message</a></div><div class="ttdeci">static const char _reply_message[]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00051">homescreen.c:51</a></div></div>
+<div class="ttc" id="hs-helper_8c_html_ae83604a37134e7bdee3ce4f10bb0b47a"><div class="ttname"><a href="../../dd/d1d/hs-helper_8c.html#ae83604a37134e7bdee3ce4f10bb0b47a">hs_add_object_to_json_object_func</a></div><div class="ttdeci">void hs_add_object_to_json_object_func(struct json_object *j_obj, const char *verb_name, int count,...)</div><div class="ttdef"><b>Definition:</b> <a href="../../dd/d1d/hs-helper_8c_source.html#l00125">hs-helper.c:125</a></div></div>
+</div><!-- fragment -->
+</div>
+</div>
+<a id="a1279893c0fe937311a81e0a98fb4cf1c"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a1279893c0fe937311a81e0a98fb4cf1c">&#9670;&nbsp;</a></span>onevent()</h2>
+
+<div class="memitem">
+<div class="memproto">
+<table class="mlabels">
+ <tr>
+ <td class="mlabels-left">
+ <table class="memname">
+ <tr>
+ <td class="memname">static void onevent </td>
+ <td>(</td>
+ <td class="paramtype">const char *&#160;</td>
+ <td class="paramname"><em>event</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">struct json_object *&#160;</td>
+ <td class="paramname"><em>object</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+ </td>
+ <td class="mlabels-right">
+<span class="mlabels"><span class="mlabel">static</span></span> </td>
+ </tr>
+</table>
+</div><div class="memdoc">
+
+<p class="definition">Definition at line <a class="el" href="../../d0/d1e/homescreen_8c_source.html#l00301">301</a> of file <a class="el" href="../../d0/d1e/homescreen_8c_source.html">homescreen.c</a>.</p>
+<div class="fragment"><div class="line"><a name="l00302"></a><span class="lineno"> 302</span>&#160;{</div><div class="line"><a name="l00303"></a><span class="lineno"> 303</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a>(<span class="stringliteral">&quot;homescreen-service&quot;</span>,<span class="stringliteral">&quot;on_event %s&quot;</span>, <a class="code" href="../../df/d7d/structevent.html">event</a>);</div><div class="line"><a name="l00304"></a><span class="lineno"> 304</span>&#160;}</div><div class="ttc" id="hmi-debug_8h_html_abc0d6e0760017d8ae48b836925b2ef15"><div class="ttname"><a href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a></div><div class="ttdeci">#define HMI_NOTICE(prefix, args,...)</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d76/hmi-debug_8h_source.html#l00020">hmi-debug.h:20</a></div></div>
+<div class="ttc" id="structevent_html"><div class="ttname"><a href="../../df/d7d/structevent.html">event</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00035">homescreen.c:35</a></div></div>
+</div><!-- fragment -->
+</div>
+</div>
+<a id="af48cab759d4ae0ddbfcdd60f4051ba05"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#af48cab759d4ae0ddbfcdd60f4051ba05">&#9670;&nbsp;</a></span>pingSample()</h2>
+
+<div class="memitem">
+<div class="memproto">
+<table class="mlabels">
+ <tr>
+ <td class="mlabels-left">
+ <table class="memname">
+ <tr>
+ <td class="memname">static void pingSample </td>
+ <td>(</td>
+ <td class="paramtype">struct afb_req&#160;</td>
+ <td class="paramname"><em>request</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+ </td>
+ <td class="mlabels-right">
+<span class="mlabels"><span class="mlabel">static</span></span> </td>
+ </tr>
+</table>
+</div><div class="memdoc">
+
+<p class="definition">Definition at line <a class="el" href="../../d0/d1e/homescreen_8c_source.html#l00057">57</a> of file <a class="el" href="../../d0/d1e/homescreen_8c_source.html">homescreen.c</a>.</p>
+<div class="fragment"><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160;{</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160; <span class="keyword">static</span> <span class="keywordtype">int</span> pingcount = 0;</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160; afb_req_success_f(request, json_object_new_int(pingcount), <span class="stringliteral">&quot;Ping count = %d&quot;</span>, pingcount);</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a>(<span class="stringliteral">&quot;homescreen-service&quot;</span>,<span class="stringliteral">&quot;Verbosity macro at level notice invoked at ping invocation count = %d&quot;</span>, pingcount);</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160; pingcount++;</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160;}</div><div class="ttc" id="hmi-debug_8h_html_abc0d6e0760017d8ae48b836925b2ef15"><div class="ttname"><a href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a></div><div class="ttdeci">#define HMI_NOTICE(prefix, args,...)</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d76/hmi-debug_8h_source.html#l00020">hmi-debug.h:20</a></div></div>
+</div><!-- fragment -->
+</div>
+</div>
+<a id="a83d646edf54a6a082f69121bc89a08de"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a83d646edf54a6a082f69121bc89a08de">&#9670;&nbsp;</a></span>preinit()</h2>
+
+<div class="memitem">
+<div class="memproto">
+<table class="mlabels">
+ <tr>
+ <td class="mlabels-left">
+ <table class="memname">
+ <tr>
+ <td class="memname">static int preinit </td>
+ <td>(</td>
+ <td class="paramname"></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+ </td>
+ <td class="mlabels-right">
+<span class="mlabels"><span class="mlabel">static</span></span> </td>
+ </tr>
+</table>
+</div><div class="memdoc">
+
+<p class="definition">Definition at line <a class="el" href="../../d0/d1e/homescreen_8c_source.html#l00271">271</a> of file <a class="el" href="../../d0/d1e/homescreen_8c_source.html">homescreen.c</a>.</p>
+<div class="fragment"><div class="line"><a name="l00272"></a><span class="lineno"> 272</span>&#160;{</div><div class="line"><a name="l00273"></a><span class="lineno"> 273</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a>(<span class="stringliteral">&quot;homescreen-service&quot;</span>,<span class="stringliteral">&quot;binding preinit (was register)&quot;</span>);</div><div class="line"><a name="l00274"></a><span class="lineno"> 274</span>&#160; <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00275"></a><span class="lineno"> 275</span>&#160;}</div><div class="ttc" id="hmi-debug_8h_html_abc0d6e0760017d8ae48b836925b2ef15"><div class="ttname"><a href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a></div><div class="ttdeci">#define HMI_NOTICE(prefix, args,...)</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d76/hmi-debug_8h_source.html#l00020">hmi-debug.h:20</a></div></div>
+</div><!-- fragment -->
+</div>
+</div>
+<a id="a4ff0c8b506669e5622a6ee168134d8f1"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a4ff0c8b506669e5622a6ee168134d8f1">&#9670;&nbsp;</a></span>subscribe()</h2>
+
+<div class="memitem">
+<div class="memproto">
+<table class="mlabels">
+ <tr>
+ <td class="mlabels-left">
+ <table class="memname">
+ <tr>
+ <td class="memname">static void subscribe </td>
+ <td>(</td>
+ <td class="paramtype">struct afb_req&#160;</td>
+ <td class="paramname"><em>request</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+ </td>
+ <td class="mlabels-right">
+<span class="mlabels"><span class="mlabel">static</span></span> </td>
+ </tr>
+</table>
+</div><div class="memdoc">
+<p>Subscribe event</p>
+<h4>Parameters</h4>
+<ul>
+<li>event : Event name. Event list is written in <a class="el" href="../../d0/d8a/libhomescreen_8cpp.html">libhomescreen.cpp</a></li>
+</ul>
+<h4>Return</h4>
+<p>Nothing</p>
+<h4>Note</h4>
+
+<p class="definition">Definition at line <a class="el" href="../../d0/d1e/homescreen_8c_source.html#l00189">189</a> of file <a class="el" href="../../d0/d1e/homescreen_8c_source.html">homescreen.c</a>.</p>
+<div class="fragment"><div class="line"><a name="l00190"></a><span class="lineno"> 190</span>&#160;{</div><div class="line"><a name="l00191"></a><span class="lineno"> 191</span>&#160; <span class="keyword">const</span> <span class="keywordtype">char</span> *value = afb_req_value(request, <span class="stringliteral">&quot;event&quot;</span>);</div><div class="line"><a name="l00192"></a><span class="lineno"> 192</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a>(<span class="stringliteral">&quot;homescreen-service&quot;</span>,<span class="stringliteral">&quot;value is %s&quot;</span>, value);</div><div class="line"><a name="l00193"></a><span class="lineno"> 193</span>&#160; <span class="keywordtype">int</span> ret = 0;</div><div class="line"><a name="l00194"></a><span class="lineno"> 194</span>&#160; <span class="keywordflow">if</span>(value) {</div><div class="line"><a name="l00195"></a><span class="lineno"> 195</span>&#160; <span class="keywordtype">int</span> index = <a class="code" href="../../dd/d1d/hs-helper_8c.html#a2ff1b894941c3b461ca8119079c4146a">hs_search_event_name_index</a>(value);</div><div class="line"><a name="l00196"></a><span class="lineno"> 196</span>&#160; <span class="keywordflow">if</span>(index &lt; 0)</div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span>&#160; {</div><div class="line"><a name="l00198"></a><span class="lineno"> 198</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a>(<span class="stringliteral">&quot;homescreen-service&quot;</span>,<span class="stringliteral">&quot;dedicated event doesn&#39;t exist&quot;</span>);</div><div class="line"><a name="l00199"></a><span class="lineno"> 199</span>&#160; ret = <a class="code" href="../../d0/d1e/homescreen_8c.html#a9a68ed04201d9390bb85b2c6ab1d7250">EVENT_SUBSCRIBE_ERROR_CODE</a>;</div><div class="line"><a name="l00200"></a><span class="lineno"> 200</span>&#160; }</div><div class="line"><a name="l00201"></a><span class="lineno"> 201</span>&#160; <span class="keywordflow">else</span></div><div class="line"><a name="l00202"></a><span class="lineno"> 202</span>&#160; {</div><div class="line"><a name="l00203"></a><span class="lineno"> 203</span>&#160; afb_req_subscribe(request, *<a class="code" href="../../d0/d1e/homescreen_8c.html#a1c3c5bfa861dcb58d9e9d216d893864c">event_list</a>[index].<a class="code" href="../../df/d7d/structevent.html">event</a>);</div><div class="line"><a name="l00204"></a><span class="lineno"> 204</span>&#160; }</div><div class="line"><a name="l00205"></a><span class="lineno"> 205</span>&#160; }</div><div class="line"><a name="l00206"></a><span class="lineno"> 206</span>&#160; <span class="keywordflow">else</span>{</div><div class="line"><a name="l00207"></a><span class="lineno"> 207</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a>(<span class="stringliteral">&quot;homescreen-service&quot;</span>,<span class="stringliteral">&quot;Please input event name&quot;</span>);</div><div class="line"><a name="l00208"></a><span class="lineno"> 208</span>&#160; ret = <a class="code" href="../../d0/d1e/homescreen_8c.html#a9a68ed04201d9390bb85b2c6ab1d7250">EVENT_SUBSCRIBE_ERROR_CODE</a>;</div><div class="line"><a name="l00209"></a><span class="lineno"> 209</span>&#160; }</div><div class="line"><a name="l00210"></a><span class="lineno"> 210</span>&#160; <span class="comment">/*create response json object*/</span></div><div class="line"><a name="l00211"></a><span class="lineno"> 211</span>&#160; <span class="keyword">struct </span>json_object *res = json_object_new_object();</div><div class="line"><a name="l00212"></a><span class="lineno"> 212</span>&#160; <a class="code" href="../../dd/d1d/hs-helper_8c.html#ae83604a37134e7bdee3ce4f10bb0b47a">hs_add_object_to_json_object_func</a>(res, __FUNCTION__, 2,</div><div class="line"><a name="l00213"></a><span class="lineno"> 213</span>&#160; <a class="code" href="../../d0/d1e/homescreen_8c.html#aed1c5296a2e6d34945507a0fca17a376">_error</a>, ret);</div><div class="line"><a name="l00214"></a><span class="lineno"> 214</span>&#160; afb_req_success_f(request, res, <span class="stringliteral">&quot;homescreen binder subscribe event name [%s]&quot;</span>, value);</div><div class="line"><a name="l00215"></a><span class="lineno"> 215</span>&#160;}</div><div class="ttc" id="hmi-debug_8h_html_abc0d6e0760017d8ae48b836925b2ef15"><div class="ttname"><a href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a></div><div class="ttdeci">#define HMI_NOTICE(prefix, args,...)</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d76/hmi-debug_8h_source.html#l00020">hmi-debug.h:20</a></div></div>
+<div class="ttc" id="homescreen_8c_html_aed1c5296a2e6d34945507a0fca17a376"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#aed1c5296a2e6d34945507a0fca17a376">_error</a></div><div class="ttdeci">static const char _error[]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00047">homescreen.c:47</a></div></div>
+<div class="ttc" id="structevent_html"><div class="ttname"><a href="../../df/d7d/structevent.html">event</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00035">homescreen.c:35</a></div></div>
+<div class="ttc" id="hs-helper_8c_html_a2ff1b894941c3b461ca8119079c4146a"><div class="ttname"><a href="../../dd/d1d/hs-helper_8c.html#a2ff1b894941c3b461ca8119079c4146a">hs_search_event_name_index</a></div><div class="ttdeci">int hs_search_event_name_index(const char *value)</div><div class="ttdef"><b>Definition:</b> <a href="../../dd/d1d/hs-helper_8c_source.html#l00142">hs-helper.c:142</a></div></div>
+<div class="ttc" id="homescreen_8c_html_a1c3c5bfa861dcb58d9e9d216d893864c"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#a1c3c5bfa861dcb58d9e9d216d893864c">event_list</a></div><div class="ttdeci">static struct event event_list[COMMAND_EVENT_NUM]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00040">homescreen.c:40</a></div></div>
+<div class="ttc" id="homescreen_8c_html_a9a68ed04201d9390bb85b2c6ab1d7250"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#a9a68ed04201d9390bb85b2c6ab1d7250">EVENT_SUBSCRIBE_ERROR_CODE</a></div><div class="ttdeci">#define EVENT_SUBSCRIBE_ERROR_CODE</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00032">homescreen.c:32</a></div></div>
+<div class="ttc" id="hs-helper_8c_html_ae83604a37134e7bdee3ce4f10bb0b47a"><div class="ttname"><a href="../../dd/d1d/hs-helper_8c.html#ae83604a37134e7bdee3ce4f10bb0b47a">hs_add_object_to_json_object_func</a></div><div class="ttdeci">void hs_add_object_to_json_object_func(struct json_object *j_obj, const char *verb_name, int count,...)</div><div class="ttdef"><b>Definition:</b> <a href="../../dd/d1d/hs-helper_8c_source.html#l00125">hs-helper.c:125</a></div></div>
+</div><!-- fragment -->
+</div>
+</div>
+<a id="a096eae5c8f297f9df142a406eea56227"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a096eae5c8f297f9df142a406eea56227">&#9670;&nbsp;</a></span>tap_shortcut()</h2>
+
+<div class="memitem">
+<div class="memproto">
+<table class="mlabels">
+ <tr>
+ <td class="mlabels-left">
+ <table class="memname">
+ <tr>
+ <td class="memname">static void tap_shortcut </td>
+ <td>(</td>
+ <td class="paramtype">struct afb_req&#160;</td>
+ <td class="paramname"><em>request</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+ </td>
+ <td class="mlabels-right">
+<span class="mlabels"><span class="mlabel">static</span></span> </td>
+ </tr>
+</table>
+</div><div class="memdoc">
+<p>tap_shortcut notify for homescreen When Shortcut area is tapped, notify these applciations</p>
+<h4>Parameters</h4>
+<p>Request key</p><ul>
+<li>application_name : application name</li>
+</ul>
+<h4>Return</h4>
+<p>Nothing </p>
+
+<p class="definition">Definition at line <a class="el" href="../../d0/d1e/homescreen_8c_source.html#l00077">77</a> of file <a class="el" href="../../d0/d1e/homescreen_8c_source.html">homescreen.c</a>.</p>
+<div class="fragment"><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160;{</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a>(<span class="stringliteral">&quot;homescreen-service&quot;</span>,<span class="stringliteral">&quot;is called.&quot;</span>);</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160;</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; <span class="keywordtype">int</span> ret = 0;</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; <span class="keyword">const</span> <span class="keywordtype">char</span>* value = afb_req_value(request, <a class="code" href="../../d0/d1e/homescreen_8c.html#a1f2c79fa6801b63751e270d67994fe81">_application_name</a>);</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; <span class="keywordflow">if</span> (value) {</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160;</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a>(<span class="stringliteral">&quot;homescreen-service&quot;</span>,<span class="stringliteral">&quot;request params = %s.&quot;</span>, value);</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160;</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; <span class="keyword">struct </span>json_object* push_obj = json_object_new_object();</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; <a class="code" href="../../dd/d1d/hs-helper_8c.html#a8777c53f1d4d5412f19b134ad85ffedf">hs_add_object_to_json_object_str</a>( push_obj, 2,</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160; <a class="code" href="../../d0/d1e/homescreen_8c.html#a1f2c79fa6801b63751e270d67994fe81">_application_name</a>, value);</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160; afb_event_push(<a class="code" href="../../d0/d1e/homescreen_8c.html#a2af1ff5a4cbf03125e61e903832035f5">ev_tap_shortcut</a>, push_obj);</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160; } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160; afb_req_fail_f(request, <span class="stringliteral">&quot;failed&quot;</span>, <span class="stringliteral">&quot;called %s, Unknown palameter&quot;</span>, __FUNCTION__);</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160; <span class="keywordflow">return</span>;</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160; }</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160;</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160; <span class="comment">// response to HomeScreen</span></div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160; <span class="keyword">struct </span>json_object *res = json_object_new_object();</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160; <a class="code" href="../../dd/d1d/hs-helper_8c.html#ae83604a37134e7bdee3ce4f10bb0b47a">hs_add_object_to_json_object_func</a>(res, __FUNCTION__, 2,</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160; <a class="code" href="../../d0/d1e/homescreen_8c.html#aed1c5296a2e6d34945507a0fca17a376">_error</a>, ret);</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160; afb_req_success(request, res, <span class="stringliteral">&quot;afb_event_push event [tap_shortcut]&quot;</span>);</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160;}</div><div class="ttc" id="hs-helper_8c_html_a8777c53f1d4d5412f19b134ad85ffedf"><div class="ttname"><a href="../../dd/d1d/hs-helper_8c.html#a8777c53f1d4d5412f19b134ad85ffedf">hs_add_object_to_json_object_str</a></div><div class="ttdeci">void hs_add_object_to_json_object_str(struct json_object *j_obj, int count,...)</div><div class="ttdef"><b>Definition:</b> <a href="../../dd/d1d/hs-helper_8c_source.html#l00110">hs-helper.c:110</a></div></div>
+<div class="ttc" id="hmi-debug_8h_html_abc0d6e0760017d8ae48b836925b2ef15"><div class="ttname"><a href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a></div><div class="ttdeci">#define HMI_NOTICE(prefix, args,...)</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d76/hmi-debug_8h_source.html#l00020">hmi-debug.h:20</a></div></div>
+<div class="ttc" id="homescreen_8c_html_a1f2c79fa6801b63751e270d67994fe81"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#a1f2c79fa6801b63751e270d67994fe81">_application_name</a></div><div class="ttdeci">static const char _application_name[]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00049">homescreen.c:49</a></div></div>
+<div class="ttc" id="homescreen_8c_html_aed1c5296a2e6d34945507a0fca17a376"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#aed1c5296a2e6d34945507a0fca17a376">_error</a></div><div class="ttdeci">static const char _error[]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00047">homescreen.c:47</a></div></div>
+<div class="ttc" id="homescreen_8c_html_a2af1ff5a4cbf03125e61e903832035f5"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#a2af1ff5a4cbf03125e61e903832035f5">ev_tap_shortcut</a></div><div class="ttdeci">static struct afb_event ev_tap_shortcut</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00042">homescreen.c:42</a></div></div>
+<div class="ttc" id="hs-helper_8c_html_ae83604a37134e7bdee3ce4f10bb0b47a"><div class="ttname"><a href="../../dd/d1d/hs-helper_8c.html#ae83604a37134e7bdee3ce4f10bb0b47a">hs_add_object_to_json_object_func</a></div><div class="ttdeci">void hs_add_object_to_json_object_func(struct json_object *j_obj, const char *verb_name, int count,...)</div><div class="ttdef"><b>Definition:</b> <a href="../../dd/d1d/hs-helper_8c_source.html#l00125">hs-helper.c:125</a></div></div>
+</div><!-- fragment -->
+</div>
+</div>
+<a id="ab92621255d7370c6dd8a0f1a8e376ad3"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ab92621255d7370c6dd8a0f1a8e376ad3">&#9670;&nbsp;</a></span>unsubscribe()</h2>
+
+<div class="memitem">
+<div class="memproto">
+<table class="mlabels">
+ <tr>
+ <td class="mlabels-left">
+ <table class="memname">
+ <tr>
+ <td class="memname">static void unsubscribe </td>
+ <td>(</td>
+ <td class="paramtype">struct afb_req&#160;</td>
+ <td class="paramname"><em>request</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+ </td>
+ <td class="mlabels-right">
+<span class="mlabels"><span class="mlabel">static</span></span> </td>
+ </tr>
+</table>
+</div><div class="memdoc">
+<p>Unsubscribe event</p>
+<h4>Parameters</h4>
+<ul>
+<li>event : Event name. Event list is written in <a class="el" href="../../d0/d8a/libhomescreen_8cpp.html">libhomescreen.cpp</a></li>
+</ul>
+<h4>Return</h4>
+<p>Nothing</p>
+<h4>Note</h4>
+
+<p class="definition">Definition at line <a class="el" href="../../d0/d1e/homescreen_8c_source.html#l00229">229</a> of file <a class="el" href="../../d0/d1e/homescreen_8c_source.html">homescreen.c</a>.</p>
+<div class="fragment"><div class="line"><a name="l00230"></a><span class="lineno"> 230</span>&#160;{</div><div class="line"><a name="l00231"></a><span class="lineno"> 231</span>&#160; <span class="keyword">const</span> <span class="keywordtype">char</span> *value = afb_req_value(request, <span class="stringliteral">&quot;event&quot;</span>);</div><div class="line"><a name="l00232"></a><span class="lineno"> 232</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a>(<span class="stringliteral">&quot;homescreen-service&quot;</span>,<span class="stringliteral">&quot;value is %s&quot;</span>, value);</div><div class="line"><a name="l00233"></a><span class="lineno"> 233</span>&#160; <span class="keywordtype">int</span> ret = 0;</div><div class="line"><a name="l00234"></a><span class="lineno"> 234</span>&#160; <span class="keywordflow">if</span>(value) {</div><div class="line"><a name="l00235"></a><span class="lineno"> 235</span>&#160; <span class="keywordtype">int</span> index = <a class="code" href="../../dd/d1d/hs-helper_8c.html#a2ff1b894941c3b461ca8119079c4146a">hs_search_event_name_index</a>(value);</div><div class="line"><a name="l00236"></a><span class="lineno"> 236</span>&#160; <span class="keywordflow">if</span>(index &lt; 0)</div><div class="line"><a name="l00237"></a><span class="lineno"> 237</span>&#160; {</div><div class="line"><a name="l00238"></a><span class="lineno"> 238</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a>(<span class="stringliteral">&quot;homescreen-service&quot;</span>,<span class="stringliteral">&quot;dedicated event doesn&#39;t exist&quot;</span>);</div><div class="line"><a name="l00239"></a><span class="lineno"> 239</span>&#160; ret = <a class="code" href="../../d0/d1e/homescreen_8c.html#a9a68ed04201d9390bb85b2c6ab1d7250">EVENT_SUBSCRIBE_ERROR_CODE</a>;</div><div class="line"><a name="l00240"></a><span class="lineno"> 240</span>&#160; }</div><div class="line"><a name="l00241"></a><span class="lineno"> 241</span>&#160; <span class="keywordflow">else</span></div><div class="line"><a name="l00242"></a><span class="lineno"> 242</span>&#160; {</div><div class="line"><a name="l00243"></a><span class="lineno"> 243</span>&#160; afb_req_unsubscribe(request, *<a class="code" href="../../d0/d1e/homescreen_8c.html#a1c3c5bfa861dcb58d9e9d216d893864c">event_list</a>[index].<a class="code" href="../../df/d7d/structevent.html">event</a>);</div><div class="line"><a name="l00244"></a><span class="lineno"> 244</span>&#160; }</div><div class="line"><a name="l00245"></a><span class="lineno"> 245</span>&#160; }</div><div class="line"><a name="l00246"></a><span class="lineno"> 246</span>&#160; <span class="keywordflow">else</span>{</div><div class="line"><a name="l00247"></a><span class="lineno"> 247</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a>(<span class="stringliteral">&quot;homescreen-service&quot;</span>,<span class="stringliteral">&quot;Please input event name&quot;</span>);</div><div class="line"><a name="l00248"></a><span class="lineno"> 248</span>&#160; ret = <a class="code" href="../../d0/d1e/homescreen_8c.html#a9a68ed04201d9390bb85b2c6ab1d7250">EVENT_SUBSCRIBE_ERROR_CODE</a>;</div><div class="line"><a name="l00249"></a><span class="lineno"> 249</span>&#160; }</div><div class="line"><a name="l00250"></a><span class="lineno"> 250</span>&#160; <span class="comment">/*create response json object*/</span></div><div class="line"><a name="l00251"></a><span class="lineno"> 251</span>&#160; <span class="keyword">struct </span>json_object *res = json_object_new_object();</div><div class="line"><a name="l00252"></a><span class="lineno"> 252</span>&#160; <a class="code" href="../../dd/d1d/hs-helper_8c.html#ae83604a37134e7bdee3ce4f10bb0b47a">hs_add_object_to_json_object_func</a>(res, __FUNCTION__, 2,</div><div class="line"><a name="l00253"></a><span class="lineno"> 253</span>&#160; <a class="code" href="../../d0/d1e/homescreen_8c.html#aed1c5296a2e6d34945507a0fca17a376">_error</a>, ret);</div><div class="line"><a name="l00254"></a><span class="lineno"> 254</span>&#160; afb_req_success_f(request, res, <span class="stringliteral">&quot;homescreen binder unsubscribe event name [%s]&quot;</span>, value);</div><div class="line"><a name="l00255"></a><span class="lineno"> 255</span>&#160;}</div><div class="ttc" id="hmi-debug_8h_html_abc0d6e0760017d8ae48b836925b2ef15"><div class="ttname"><a href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a></div><div class="ttdeci">#define HMI_NOTICE(prefix, args,...)</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d76/hmi-debug_8h_source.html#l00020">hmi-debug.h:20</a></div></div>
+<div class="ttc" id="homescreen_8c_html_aed1c5296a2e6d34945507a0fca17a376"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#aed1c5296a2e6d34945507a0fca17a376">_error</a></div><div class="ttdeci">static const char _error[]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00047">homescreen.c:47</a></div></div>
+<div class="ttc" id="structevent_html"><div class="ttname"><a href="../../df/d7d/structevent.html">event</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00035">homescreen.c:35</a></div></div>
+<div class="ttc" id="hs-helper_8c_html_a2ff1b894941c3b461ca8119079c4146a"><div class="ttname"><a href="../../dd/d1d/hs-helper_8c.html#a2ff1b894941c3b461ca8119079c4146a">hs_search_event_name_index</a></div><div class="ttdeci">int hs_search_event_name_index(const char *value)</div><div class="ttdef"><b>Definition:</b> <a href="../../dd/d1d/hs-helper_8c_source.html#l00142">hs-helper.c:142</a></div></div>
+<div class="ttc" id="homescreen_8c_html_a1c3c5bfa861dcb58d9e9d216d893864c"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#a1c3c5bfa861dcb58d9e9d216d893864c">event_list</a></div><div class="ttdeci">static struct event event_list[COMMAND_EVENT_NUM]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00040">homescreen.c:40</a></div></div>
+<div class="ttc" id="homescreen_8c_html_a9a68ed04201d9390bb85b2c6ab1d7250"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#a9a68ed04201d9390bb85b2c6ab1d7250">EVENT_SUBSCRIBE_ERROR_CODE</a></div><div class="ttdeci">#define EVENT_SUBSCRIBE_ERROR_CODE</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00032">homescreen.c:32</a></div></div>
+<div class="ttc" id="hs-helper_8c_html_ae83604a37134e7bdee3ce4f10bb0b47a"><div class="ttname"><a href="../../dd/d1d/hs-helper_8c.html#ae83604a37134e7bdee3ce4f10bb0b47a">hs_add_object_to_json_object_func</a></div><div class="ttdeci">void hs_add_object_to_json_object_func(struct json_object *j_obj, const char *verb_name, int count,...)</div><div class="ttdef"><b>Definition:</b> <a href="../../dd/d1d/hs-helper_8c_source.html#l00125">hs-helper.c:125</a></div></div>
+</div><!-- fragment -->
+</div>
+</div>
+<h2 class="groupheader">Variable Documentation</h2>
+<a id="a1f2c79fa6801b63751e270d67994fe81"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a1f2c79fa6801b63751e270d67994fe81">&#9670;&nbsp;</a></span>_application_name</h2>
+
+<div class="memitem">
+<div class="memproto">
+<table class="mlabels">
+ <tr>
+ <td class="mlabels-left">
+ <table class="memname">
+ <tr>
+ <td class="memname">const char _application_name[] = &quot;application_name&quot;</td>
+ </tr>
+ </table>
+ </td>
+ <td class="mlabels-right">
+<span class="mlabels"><span class="mlabel">static</span></span> </td>
+ </tr>
+</table>
+</div><div class="memdoc">
+
+<p class="definition">Definition at line <a class="el" href="../../d0/d1e/homescreen_8c_source.html#l00049">49</a> of file <a class="el" href="../../d0/d1e/homescreen_8c_source.html">homescreen.c</a>.</p>
+
+</div>
+</div>
+<a id="abfd6c1d6f316fa952b11553f8f275e92"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#abfd6c1d6f316fa952b11553f8f275e92">&#9670;&nbsp;</a></span>_display_message</h2>
+
+<div class="memitem">
+<div class="memproto">
+<table class="mlabels">
+ <tr>
+ <td class="mlabels-left">
+ <table class="memname">
+ <tr>
+ <td class="memname">const char _display_message[] = &quot;display_message&quot;</td>
+ </tr>
+ </table>
+ </td>
+ <td class="mlabels-right">
+<span class="mlabels"><span class="mlabel">static</span></span> </td>
+ </tr>
+</table>
+</div><div class="memdoc">
+
+<p class="definition">Definition at line <a class="el" href="../../d0/d1e/homescreen_8c_source.html#l00050">50</a> of file <a class="el" href="../../d0/d1e/homescreen_8c_source.html">homescreen.c</a>.</p>
+
+</div>
+</div>
+<a id="aed1c5296a2e6d34945507a0fca17a376"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aed1c5296a2e6d34945507a0fca17a376">&#9670;&nbsp;</a></span>_error</h2>
+
+<div class="memitem">
+<div class="memproto">
+<table class="mlabels">
+ <tr>
+ <td class="mlabels-left">
+ <table class="memname">
+ <tr>
+ <td class="memname">const char _error[] = &quot;error&quot;</td>
+ </tr>
+ </table>
+ </td>
+ <td class="mlabels-right">
+<span class="mlabels"><span class="mlabel">static</span></span> </td>
+ </tr>
+</table>
+</div><div class="memdoc">
+
+<p class="definition">Definition at line <a class="el" href="../../d0/d1e/homescreen_8c_source.html#l00047">47</a> of file <a class="el" href="../../d0/d1e/homescreen_8c_source.html">homescreen.c</a>.</p>
+
+</div>
+</div>
+<a id="a79b0f0b481161527ccb80e83da143219"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a79b0f0b481161527ccb80e83da143219">&#9670;&nbsp;</a></span>_reply_message</h2>
+
+<div class="memitem">
+<div class="memproto">
+<table class="mlabels">
+ <tr>
+ <td class="mlabels-left">
+ <table class="memname">
+ <tr>
+ <td class="memname">const char _reply_message[] = &quot;reply_message&quot;</td>
+ </tr>
+ </table>
+ </td>
+ <td class="mlabels-right">
+<span class="mlabels"><span class="mlabel">static</span></span> </td>
+ </tr>
+</table>
+</div><div class="memdoc">
+
+<p class="definition">Definition at line <a class="el" href="../../d0/d1e/homescreen_8c_source.html#l00051">51</a> of file <a class="el" href="../../d0/d1e/homescreen_8c_source.html">homescreen.c</a>.</p>
+
+</div>
+</div>
+<a id="ae2a62ab481a2922cbfc788193857a12e"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ae2a62ab481a2922cbfc788193857a12e">&#9670;&nbsp;</a></span>afbBindingV2</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">const struct afb_binding_v2 afbBindingV2</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<b>Initial value:</b><div class="fragment"><div class="line">= {</div><div class="line"> .api = <span class="stringliteral">&quot;homescreen&quot;</span>,</div><div class="line"> .specification = NULL,</div><div class="line"> .verbs = <a class="code" href="../../d0/d1e/homescreen_8c.html#acad6dadf60fac3d701e488e4fcd11c89">verbs</a>,</div><div class="line"> .preinit = <a class="code" href="../../d0/d1e/homescreen_8c.html#a83d646edf54a6a082f69121bc89a08de">preinit</a>,</div><div class="line"> .init = <a class="code" href="../../d0/d1e/homescreen_8c.html#a00cbbc0f3f4452db078ae511684a6adc">init</a>,</div><div class="line"> .onevent = <a class="code" href="../../d0/d1e/homescreen_8c.html#a1279893c0fe937311a81e0a98fb4cf1c">onevent</a></div><div class="line">}</div><div class="ttc" id="homescreen_8c_html_a83d646edf54a6a082f69121bc89a08de"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#a83d646edf54a6a082f69121bc89a08de">preinit</a></div><div class="ttdeci">static int preinit()</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00271">homescreen.c:271</a></div></div>
+<div class="ttc" id="homescreen_8c_html_a1279893c0fe937311a81e0a98fb4cf1c"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#a1279893c0fe937311a81e0a98fb4cf1c">onevent</a></div><div class="ttdeci">static void onevent(const char *event, struct json_object *object)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00301">homescreen.c:301</a></div></div>
+<div class="ttc" id="homescreen_8c_html_a00cbbc0f3f4452db078ae511684a6adc"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#a00cbbc0f3f4452db078ae511684a6adc">init</a></div><div class="ttdeci">static int init()</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00277">homescreen.c:277</a></div></div>
+<div class="ttc" id="homescreen_8c_html_acad6dadf60fac3d701e488e4fcd11c89"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#acad6dadf60fac3d701e488e4fcd11c89">verbs</a></div><div class="ttdeci">static const struct afb_verb_v2 verbs[]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00260">homescreen.c:260</a></div></div>
+</div><!-- fragment -->
+<p class="definition">Definition at line <a class="el" href="../../d0/d1e/homescreen_8c_source.html#l00306">306</a> of file <a class="el" href="../../d0/d1e/homescreen_8c_source.html">homescreen.c</a>.</p>
+
+</div>
+</div>
+<a id="af7cfc4f688bb898c09291252c4cb832c"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#af7cfc4f688bb898c09291252c4cb832c">&#9670;&nbsp;</a></span>ev_on_screen_message</h2>
+
+<div class="memitem">
+<div class="memproto">
+<table class="mlabels">
+ <tr>
+ <td class="mlabels-left">
+ <table class="memname">
+ <tr>
+ <td class="memname">struct afb_event ev_on_screen_message</td>
+ </tr>
+ </table>
+ </td>
+ <td class="mlabels-right">
+<span class="mlabels"><span class="mlabel">static</span></span> </td>
+ </tr>
+</table>
+</div><div class="memdoc">
+
+<p class="definition">Definition at line <a class="el" href="../../d0/d1e/homescreen_8c_source.html#l00043">43</a> of file <a class="el" href="../../d0/d1e/homescreen_8c_source.html">homescreen.c</a>.</p>
+
+</div>
+</div>
+<a id="a5c225341e0ecbae0585302ef754a55ec"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a5c225341e0ecbae0585302ef754a55ec">&#9670;&nbsp;</a></span>ev_on_screen_reply</h2>
+
+<div class="memitem">
+<div class="memproto">
+<table class="mlabels">
+ <tr>
+ <td class="mlabels-left">
+ <table class="memname">
+ <tr>
+ <td class="memname">struct afb_event ev_on_screen_reply</td>
+ </tr>
+ </table>
+ </td>
+ <td class="mlabels-right">
+<span class="mlabels"><span class="mlabel">static</span></span> </td>
+ </tr>
+</table>
+</div><div class="memdoc">
+
+<p class="definition">Definition at line <a class="el" href="../../d0/d1e/homescreen_8c_source.html#l00044">44</a> of file <a class="el" href="../../d0/d1e/homescreen_8c_source.html">homescreen.c</a>.</p>
+
+</div>
+</div>
+<a id="a25fbdcc4e5787e3f41d99f4a71e86611"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a25fbdcc4e5787e3f41d99f4a71e86611">&#9670;&nbsp;</a></span>ev_reserved</h2>
+
+<div class="memitem">
+<div class="memproto">
+<table class="mlabels">
+ <tr>
+ <td class="mlabels-left">
+ <table class="memname">
+ <tr>
+ <td class="memname">struct afb_event ev_reserved</td>
+ </tr>
+ </table>
+ </td>
+ <td class="mlabels-right">
+<span class="mlabels"><span class="mlabel">static</span></span> </td>
+ </tr>
+</table>
+</div><div class="memdoc">
+
+<p class="definition">Definition at line <a class="el" href="../../d0/d1e/homescreen_8c_source.html#l00045">45</a> of file <a class="el" href="../../d0/d1e/homescreen_8c_source.html">homescreen.c</a>.</p>
+
+</div>
+</div>
+<a id="a2af1ff5a4cbf03125e61e903832035f5"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a2af1ff5a4cbf03125e61e903832035f5">&#9670;&nbsp;</a></span>ev_tap_shortcut</h2>
+
+<div class="memitem">
+<div class="memproto">
+<table class="mlabels">
+ <tr>
+ <td class="mlabels-left">
+ <table class="memname">
+ <tr>
+ <td class="memname">struct afb_event ev_tap_shortcut</td>
+ </tr>
+ </table>
+ </td>
+ <td class="mlabels-right">
+<span class="mlabels"><span class="mlabel">static</span></span> </td>
+ </tr>
+</table>
+</div><div class="memdoc">
+
+<p class="definition">Definition at line <a class="el" href="../../d0/d1e/homescreen_8c_source.html#l00042">42</a> of file <a class="el" href="../../d0/d1e/homescreen_8c_source.html">homescreen.c</a>.</p>
+
+</div>
+</div>
+<a id="a1c3c5bfa861dcb58d9e9d216d893864c"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a1c3c5bfa861dcb58d9e9d216d893864c">&#9670;&nbsp;</a></span>event_list</h2>
+
+<div class="memitem">
+<div class="memproto">
+<table class="mlabels">
+ <tr>
+ <td class="mlabels-left">
+ <table class="memname">
+ <tr>
+ <td class="memname">struct <a class="el" href="../../df/d7d/structevent.html">event</a> event_list[<a class="el" href="../../d0/d1e/homescreen_8c.html#a09f43d9e7e1c5d2198c0d66024b4500e">COMMAND_EVENT_NUM</a>]</td>
+ </tr>
+ </table>
+ </td>
+ <td class="mlabels-right">
+<span class="mlabels"><span class="mlabel">static</span></span> </td>
+ </tr>
+</table>
+</div><div class="memdoc">
+
+<p class="definition">Definition at line <a class="el" href="../../d0/d1e/homescreen_8c_source.html#l00040">40</a> of file <a class="el" href="../../d0/d1e/homescreen_8c_source.html">homescreen.c</a>.</p>
+
+</div>
+</div>
+<a id="acad6dadf60fac3d701e488e4fcd11c89"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#acad6dadf60fac3d701e488e4fcd11c89">&#9670;&nbsp;</a></span>verbs</h2>
+
+<div class="memitem">
+<div class="memproto">
+<table class="mlabels">
+ <tr>
+ <td class="mlabels-left">
+ <table class="memname">
+ <tr>
+ <td class="memname">const struct afb_verb_v2 verbs[]</td>
+ </tr>
+ </table>
+ </td>
+ <td class="mlabels-right">
+<span class="mlabels"><span class="mlabel">static</span></span> </td>
+ </tr>
+</table>
+</div><div class="memdoc">
+<b>Initial value:</b><div class="fragment"><div class="line">= {</div><div class="line"> </div><div class="line"> { .verb = <span class="stringliteral">&quot;ping&quot;</span>, .session = AFB_SESSION_NONE, .callback = <a class="code" href="../../d0/d1e/homescreen_8c.html#af48cab759d4ae0ddbfcdd60f4051ba05">pingSample</a>, .auth = NULL },</div><div class="line"> { .verb = <span class="stringliteral">&quot;tap_shortcut&quot;</span>, .session = AFB_SESSION_NONE, .callback = <a class="code" href="../../d0/d1e/homescreen_8c.html#a096eae5c8f297f9df142a406eea56227">tap_shortcut</a>, .auth = NULL },</div><div class="line"> { .verb = <span class="stringliteral">&quot;on_screen_message&quot;</span>, .session = AFB_SESSION_NONE, .callback = <a class="code" href="../../d0/d1e/homescreen_8c.html#a640cf8ed97d804c5ed1c09a349056338">on_screen_message</a>, .auth = NULL },</div><div class="line"> { .verb = <span class="stringliteral">&quot;on_screen_reply&quot;</span>, .session = AFB_SESSION_NONE, .callback = <a class="code" href="../../d0/d1e/homescreen_8c.html#a2f380055d7d69828115d2a8951634933">on_screen_reply</a>, .auth = NULL },</div><div class="line"> { .verb = <span class="stringliteral">&quot;subscribe&quot;</span>, .session = AFB_SESSION_NONE, .callback = <a class="code" href="../../d0/d1e/homescreen_8c.html#a4ff0c8b506669e5622a6ee168134d8f1">subscribe</a>, .auth = NULL },</div><div class="line"> { .verb = <span class="stringliteral">&quot;unsubscribe&quot;</span>, .session = AFB_SESSION_NONE, .callback = <a class="code" href="../../d0/d1e/homescreen_8c.html#ab92621255d7370c6dd8a0f1a8e376ad3">unsubscribe</a>, .auth = NULL },</div><div class="line"> {NULL } </div><div class="line">}</div><div class="ttc" id="homescreen_8c_html_a096eae5c8f297f9df142a406eea56227"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#a096eae5c8f297f9df142a406eea56227">tap_shortcut</a></div><div class="ttdeci">static void tap_shortcut(struct afb_req request)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00077">homescreen.c:77</a></div></div>
+<div class="ttc" id="homescreen_8c_html_af48cab759d4ae0ddbfcdd60f4051ba05"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#af48cab759d4ae0ddbfcdd60f4051ba05">pingSample</a></div><div class="ttdeci">static void pingSample(struct afb_req request)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00057">homescreen.c:57</a></div></div>
+<div class="ttc" id="homescreen_8c_html_a2f380055d7d69828115d2a8951634933"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#a2f380055d7d69828115d2a8951634933">on_screen_reply</a></div><div class="ttdeci">static void on_screen_reply(struct afb_req request)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00151">homescreen.c:151</a></div></div>
+<div class="ttc" id="homescreen_8c_html_ab92621255d7370c6dd8a0f1a8e376ad3"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#ab92621255d7370c6dd8a0f1a8e376ad3">unsubscribe</a></div><div class="ttdeci">static void unsubscribe(struct afb_req request)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00229">homescreen.c:229</a></div></div>
+<div class="ttc" id="homescreen_8c_html_a640cf8ed97d804c5ed1c09a349056338"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#a640cf8ed97d804c5ed1c09a349056338">on_screen_message</a></div><div class="ttdeci">static void on_screen_message(struct afb_req request)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00114">homescreen.c:114</a></div></div>
+<div class="ttc" id="homescreen_8c_html_a4ff0c8b506669e5622a6ee168134d8f1"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#a4ff0c8b506669e5622a6ee168134d8f1">subscribe</a></div><div class="ttdeci">static void subscribe(struct afb_req request)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00189">homescreen.c:189</a></div></div>
+</div><!-- fragment -->
+<p class="definition">Definition at line <a class="el" href="../../d0/d1e/homescreen_8c_source.html#l00260">260</a> of file <a class="el" href="../../d0/d1e/homescreen_8c_source.html">homescreen.c</a>.</p>
+
+</div>
+</div>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="../../doxygen.png" alt="doxygen"/>
+</a> 1.8.13
+</small></address>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/d0/d1e/homescreen_8c_source.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/d0/d1e/homescreen_8c_source.html
new file mode 100644
index 0000000..6a4f516
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/d0/d1e/homescreen_8c_source.html
@@ -0,0 +1,108 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>HomeScreenBinding: src/homescreen.c Source File</title>
+<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="../../jquery.js"></script>
+<script type="text/javascript" src="../../dynsections.js"></script>
+<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="../../search/searchdata.js"></script>
+<script type="text/javascript" src="../../search/search.js"></script>
+<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+ <td id="projectalign" style="padding-left: 0.5em;">
+ <div id="projectname">HomeScreenBinding
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.13 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
+</script>
+<script type="text/javascript" src="../../menudata.js"></script>
+<script type="text/javascript" src="../../menu.js"></script>
+<script type="text/javascript">
+$(function() {
+ initMenu('../../',true,false,'search.php','Search');
+ $(document).ready(function() { init_search(); });
+});
+</script>
+<div id="main-nav"></div>
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+ onmouseover="return searchBox.OnSearchSelectShow()"
+ onmouseout="return searchBox.OnSearchSelectHide()"
+ onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0"
+ name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div id="nav-path" class="navpath">
+ <ul>
+<li class="navelem"><a class="el" href="../../dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li> </ul>
+</div>
+</div><!-- top -->
+<div class="header">
+ <div class="headertitle">
+<div class="title">homescreen.c</div> </div>
+</div><!--header-->
+<div class="contents">
+<a href="../../d0/d1e/homescreen_8c.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment"> * Copyright (c) 2017 TOYOTA MOTOR CORPORATION</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment"> * Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment"> * you may not use this file except in compliance with the License.</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment"> * You may obtain a copy of the License at</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment"> * Unless required by applicable law or agreed to in writing, software</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment"> * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment"> * See the License for the specific language governing permissions and</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment"> * limitations under the License.</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;</div><div class="line"><a name="l00017"></a><span class="lineno"><a class="line" href="../../d0/d1e/homescreen_8c.html#a369266c24eacffb87046522897a570d5"> 17</a></span>&#160;<span class="preprocessor">#define _GNU_SOURCE</span></div><div class="line"><a name="l00018"></a><span class="lineno"><a class="line" href="../../d0/d1e/homescreen_8c.html#ad2c1fbc92ba364fcf83f15e6d0af66f0"> 18</a></span>&#160;<span class="preprocessor">#define AFB_BINDING_VERSION 2</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="preprocessor">#include &lt;afb/afb-binding.h&gt;</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;</div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="preprocessor">#include &lt;stdio.h&gt;</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="preprocessor">#include &lt;string.h&gt;</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="preprocessor">#include &lt;stdlib.h&gt;</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;<span class="preprocessor">#include &lt;stdint.h&gt;</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="preprocessor">#include &lt;unistd.h&gt;</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="preprocessor">#include &lt;json-c/json.h&gt;</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="preprocessor">#include &lt;glib.h&gt;</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;<span class="preprocessor">#include &lt;pthread.h&gt;</span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="../../d3/d3d/hs-helper_8h.html">hs-helper.h</a>&quot;</span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;</div><div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="../../d0/d1e/homescreen_8c.html#a09f43d9e7e1c5d2198c0d66024b4500e"> 31</a></span>&#160;<span class="preprocessor">#define COMMAND_EVENT_NUM 4</span></div><div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="../../d0/d1e/homescreen_8c.html#a9a68ed04201d9390bb85b2c6ab1d7250"> 32</a></span>&#160;<span class="preprocessor">#define EVENT_SUBSCRIBE_ERROR_CODE 100</span></div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;<span class="comment">/* To Do hash table is better */</span></div><div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="../../df/d7d/structevent.html"> 35</a></span>&#160;<span class="keyword">struct </span><a class="code" href="../../df/d7d/structevent.html">event</a>{</div><div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="../../df/d7d/structevent.html#a45c6cfb7961a21a3366db067e4cc59ab"> 36</a></span>&#160; <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="../../df/d7d/structevent.html#a45c6cfb7961a21a3366db067e4cc59ab">name</a>;</div><div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="../../df/d7d/structevent.html#a58726ebc551d36562ac3f9e1fe293214"> 37</a></span>&#160; <span class="keyword">struct </span>afb_event* <a class="code" href="../../df/d7d/structevent.html#a58726ebc551d36562ac3f9e1fe293214">event</a>;</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160; };</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160;</div><div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="../../d0/d1e/homescreen_8c.html#a1c3c5bfa861dcb58d9e9d216d893864c"> 40</a></span>&#160;<span class="keyword">static</span> <span class="keyword">struct </span><a class="code" href="../../df/d7d/structevent.html">event</a> <a class="code" href="../../d0/d1e/homescreen_8c.html#a1c3c5bfa861dcb58d9e9d216d893864c">event_list</a>[<a class="code" href="../../d0/d1e/homescreen_8c.html#a09f43d9e7e1c5d2198c0d66024b4500e">COMMAND_EVENT_NUM</a>];</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160;</div><div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="../../d0/d1e/homescreen_8c.html#a2af1ff5a4cbf03125e61e903832035f5"> 42</a></span>&#160;<span class="keyword">static</span> <span class="keyword">struct </span>afb_event <a class="code" href="../../d0/d1e/homescreen_8c.html#a2af1ff5a4cbf03125e61e903832035f5">ev_tap_shortcut</a>;</div><div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="../../d0/d1e/homescreen_8c.html#af7cfc4f688bb898c09291252c4cb832c"> 43</a></span>&#160;<span class="keyword">static</span> <span class="keyword">struct </span>afb_event <a class="code" href="../../d0/d1e/homescreen_8c.html#af7cfc4f688bb898c09291252c4cb832c">ev_on_screen_message</a>;</div><div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="../../d0/d1e/homescreen_8c.html#a5c225341e0ecbae0585302ef754a55ec"> 44</a></span>&#160;<span class="keyword">static</span> <span class="keyword">struct </span>afb_event <a class="code" href="../../d0/d1e/homescreen_8c.html#a5c225341e0ecbae0585302ef754a55ec">ev_on_screen_reply</a>;</div><div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="../../d0/d1e/homescreen_8c.html#a25fbdcc4e5787e3f41d99f4a71e86611"> 45</a></span>&#160;<span class="keyword">static</span> <span class="keyword">struct </span>afb_event <a class="code" href="../../d0/d1e/homescreen_8c.html#a25fbdcc4e5787e3f41d99f4a71e86611">ev_reserved</a>;</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160;</div><div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="../../d0/d1e/homescreen_8c.html#aed1c5296a2e6d34945507a0fca17a376"> 47</a></span>&#160;<span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span> <a class="code" href="../../d0/d1e/homescreen_8c.html#aed1c5296a2e6d34945507a0fca17a376">_error</a>[] = <span class="stringliteral">&quot;error&quot;</span>;</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160;</div><div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="../../d0/d1e/homescreen_8c.html#a1f2c79fa6801b63751e270d67994fe81"> 49</a></span>&#160;<span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span> <a class="code" href="../../d0/d1e/homescreen_8c.html#a1f2c79fa6801b63751e270d67994fe81">_application_name</a>[] = <span class="stringliteral">&quot;application_name&quot;</span>;</div><div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="../../d0/d1e/homescreen_8c.html#abfd6c1d6f316fa952b11553f8f275e92"> 50</a></span>&#160;<span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span> <a class="code" href="../../d0/d1e/homescreen_8c.html#abfd6c1d6f316fa952b11553f8f275e92">_display_message</a>[] = <span class="stringliteral">&quot;display_message&quot;</span>;</div><div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="../../d0/d1e/homescreen_8c.html#a79b0f0b481161527ccb80e83da143219"> 51</a></span>&#160;<span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span> <a class="code" href="../../d0/d1e/homescreen_8c.html#a79b0f0b481161527ccb80e83da143219">_reply_message</a>[] = <span class="stringliteral">&quot;reply_message&quot;</span>;</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160;</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160;<span class="comment">********** Method of HomeScreen Service (API) **********</span></div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160;<span class="comment">*/</span></div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160;</div><div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="../../d0/d1e/homescreen_8c.html#af48cab759d4ae0ddbfcdd60f4051ba05"> 57</a></span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="../../d0/d1e/homescreen_8c.html#af48cab759d4ae0ddbfcdd60f4051ba05">pingSample</a>(<span class="keyword">struct</span> afb_req request)</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160;{</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160; <span class="keyword">static</span> <span class="keywordtype">int</span> pingcount = 0;</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160; afb_req_success_f(request, json_object_new_int(pingcount), <span class="stringliteral">&quot;Ping count = %d&quot;</span>, pingcount);</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a>(<span class="stringliteral">&quot;homescreen-service&quot;</span>,<span class="stringliteral">&quot;Verbosity macro at level notice invoked at ping invocation count = %d&quot;</span>, pingcount);</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160; pingcount++;</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160;}</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160;</div><div class="line"><a name="l00077"></a><span class="lineno"><a class="line" href="../../d0/d1e/homescreen_8c.html#a096eae5c8f297f9df142a406eea56227"> 77</a></span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="../../d0/d1e/homescreen_8c.html#a096eae5c8f297f9df142a406eea56227">tap_shortcut</a> (<span class="keyword">struct</span> afb_req request)</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160;{</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a>(<span class="stringliteral">&quot;homescreen-service&quot;</span>,<span class="stringliteral">&quot;is called.&quot;</span>);</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160;</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; <span class="keywordtype">int</span> ret = 0;</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; <span class="keyword">const</span> <span class="keywordtype">char</span>* value = afb_req_value(request, <a class="code" href="../../d0/d1e/homescreen_8c.html#a1f2c79fa6801b63751e270d67994fe81">_application_name</a>);</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; <span class="keywordflow">if</span> (value) {</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160;</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a>(<span class="stringliteral">&quot;homescreen-service&quot;</span>,<span class="stringliteral">&quot;request params = %s.&quot;</span>, value);</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160;</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; <span class="keyword">struct </span>json_object* push_obj = json_object_new_object();</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; <a class="code" href="../../dd/d1d/hs-helper_8c.html#a8777c53f1d4d5412f19b134ad85ffedf">hs_add_object_to_json_object_str</a>( push_obj, 2,</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160; <a class="code" href="../../d0/d1e/homescreen_8c.html#a1f2c79fa6801b63751e270d67994fe81">_application_name</a>, value);</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160; afb_event_push(<a class="code" href="../../d0/d1e/homescreen_8c.html#a2af1ff5a4cbf03125e61e903832035f5">ev_tap_shortcut</a>, push_obj);</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160; } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160; afb_req_fail_f(request, <span class="stringliteral">&quot;failed&quot;</span>, <span class="stringliteral">&quot;called %s, Unknown palameter&quot;</span>, __FUNCTION__);</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160; <span class="keywordflow">return</span>;</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160; }</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160;</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160; <span class="comment">// response to HomeScreen</span></div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160; <span class="keyword">struct </span>json_object *res = json_object_new_object();</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160; <a class="code" href="../../dd/d1d/hs-helper_8c.html#ae83604a37134e7bdee3ce4f10bb0b47a">hs_add_object_to_json_object_func</a>(res, __FUNCTION__, 2,</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160; <a class="code" href="../../d0/d1e/homescreen_8c.html#aed1c5296a2e6d34945507a0fca17a376">_error</a>, ret);</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160; afb_req_success(request, res, <span class="stringliteral">&quot;afb_event_push event [tap_shortcut]&quot;</span>);</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160;}</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160;</div><div class="line"><a name="l00114"></a><span class="lineno"><a class="line" href="../../d0/d1e/homescreen_8c.html#a640cf8ed97d804c5ed1c09a349056338"> 114</a></span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="../../d0/d1e/homescreen_8c.html#a640cf8ed97d804c5ed1c09a349056338">on_screen_message</a> (<span class="keyword">struct</span> afb_req request)</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160;{</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a>(<span class="stringliteral">&quot;homescreen-service&quot;</span>,<span class="stringliteral">&quot;is called.&quot;</span>);</div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160;</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160; <span class="keywordtype">int</span> ret = 0;</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160; <span class="keyword">const</span> <span class="keywordtype">char</span>* value = afb_req_value(request, <a class="code" href="../../d0/d1e/homescreen_8c.html#abfd6c1d6f316fa952b11553f8f275e92">_display_message</a>);</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160; <span class="keywordflow">if</span> (value) {</div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160;</div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a>(<span class="stringliteral">&quot;homescreen-service&quot;</span>,<span class="stringliteral">&quot;request params = %s.&quot;</span>, value);</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160;</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160; <span class="keyword">struct </span>json_object* push_obj = json_object_new_object();</div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160; <a class="code" href="../../dd/d1d/hs-helper_8c.html#a8777c53f1d4d5412f19b134ad85ffedf">hs_add_object_to_json_object_str</a>( push_obj, 2,</div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160; <a class="code" href="../../d0/d1e/homescreen_8c.html#abfd6c1d6f316fa952b11553f8f275e92">_display_message</a>, value);</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160; afb_event_push(<a class="code" href="../../d0/d1e/homescreen_8c.html#af7cfc4f688bb898c09291252c4cb832c">ev_on_screen_message</a>, push_obj);</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160; } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160; afb_req_fail_f(request, <span class="stringliteral">&quot;failed&quot;</span>, <span class="stringliteral">&quot;called %s, Unknown palameter&quot;</span>, __FUNCTION__);</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160; <span class="keywordflow">return</span>;</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160; }</div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160;</div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160; <span class="comment">// response to HomeScreen</span></div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160; <span class="keyword">struct </span>json_object *res = json_object_new_object();</div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160; <a class="code" href="../../dd/d1d/hs-helper_8c.html#ae83604a37134e7bdee3ce4f10bb0b47a">hs_add_object_to_json_object_func</a>(res, __FUNCTION__, 2,</div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160; <a class="code" href="../../d0/d1e/homescreen_8c.html#aed1c5296a2e6d34945507a0fca17a376">_error</a>, ret);</div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160; afb_req_success(request, res, <span class="stringliteral">&quot;afb_event_push event [on_screen_message]&quot;</span>);</div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160;}</div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160;</div><div class="line"><a name="l00151"></a><span class="lineno"><a class="line" href="../../d0/d1e/homescreen_8c.html#a2f380055d7d69828115d2a8951634933"> 151</a></span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="../../d0/d1e/homescreen_8c.html#a2f380055d7d69828115d2a8951634933">on_screen_reply</a> (<span class="keyword">struct</span> afb_req request)</div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160;{</div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a>(<span class="stringliteral">&quot;homescreen-service&quot;</span>,<span class="stringliteral">&quot;is called.&quot;</span>);</div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160;</div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160; <span class="keywordtype">int</span> ret = 0;</div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160; <span class="keyword">const</span> <span class="keywordtype">char</span>* value = afb_req_value(request, <a class="code" href="../../d0/d1e/homescreen_8c.html#a79b0f0b481161527ccb80e83da143219">_reply_message</a>);</div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160; <span class="keywordflow">if</span> (value) {</div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>&#160;</div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a>(<span class="stringliteral">&quot;homescreen-service&quot;</span>,<span class="stringliteral">&quot;request params = %s.&quot;</span>, value);</div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160;</div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160; <span class="keyword">struct </span>json_object* push_obj = json_object_new_object();</div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span>&#160; <a class="code" href="../../dd/d1d/hs-helper_8c.html#a8777c53f1d4d5412f19b134ad85ffedf">hs_add_object_to_json_object_str</a>( push_obj, 2,</div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span>&#160; <a class="code" href="../../d0/d1e/homescreen_8c.html#a79b0f0b481161527ccb80e83da143219">_reply_message</a>, value);</div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>&#160; afb_event_push(<a class="code" href="../../d0/d1e/homescreen_8c.html#a5c225341e0ecbae0585302ef754a55ec">ev_on_screen_reply</a>, push_obj);</div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>&#160; } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160; afb_req_fail_f(request, <span class="stringliteral">&quot;failed&quot;</span>, <span class="stringliteral">&quot;called %s, Unknown palameter&quot;</span>, __FUNCTION__);</div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160; <span class="keywordflow">return</span>;</div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span>&#160; }</div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span>&#160;</div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span>&#160; <span class="comment">// response to HomeScreen</span></div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span>&#160; <span class="keyword">struct </span>json_object *res = json_object_new_object();</div><div class="line"><a name="l00172"></a><span class="lineno"> 172</span>&#160; <a class="code" href="../../dd/d1d/hs-helper_8c.html#ae83604a37134e7bdee3ce4f10bb0b47a">hs_add_object_to_json_object_func</a>(res, __FUNCTION__, 2,</div><div class="line"><a name="l00173"></a><span class="lineno"> 173</span>&#160; <a class="code" href="../../d0/d1e/homescreen_8c.html#aed1c5296a2e6d34945507a0fca17a376">_error</a>, ret);</div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span>&#160; afb_req_success(request, res, <span class="stringliteral">&quot;afb_event_push event [on_screen_reply]&quot;</span>);</div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span>&#160;}</div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span>&#160;</div><div class="line"><a name="l00189"></a><span class="lineno"><a class="line" href="../../d0/d1e/homescreen_8c.html#a4ff0c8b506669e5622a6ee168134d8f1"> 189</a></span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="../../d0/d1e/homescreen_8c.html#a4ff0c8b506669e5622a6ee168134d8f1">subscribe</a>(<span class="keyword">struct</span> afb_req request)</div><div class="line"><a name="l00190"></a><span class="lineno"> 190</span>&#160;{</div><div class="line"><a name="l00191"></a><span class="lineno"> 191</span>&#160; <span class="keyword">const</span> <span class="keywordtype">char</span> *value = afb_req_value(request, <span class="stringliteral">&quot;event&quot;</span>);</div><div class="line"><a name="l00192"></a><span class="lineno"> 192</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a>(<span class="stringliteral">&quot;homescreen-service&quot;</span>,<span class="stringliteral">&quot;value is %s&quot;</span>, value);</div><div class="line"><a name="l00193"></a><span class="lineno"> 193</span>&#160; <span class="keywordtype">int</span> ret = 0;</div><div class="line"><a name="l00194"></a><span class="lineno"> 194</span>&#160; <span class="keywordflow">if</span>(value) {</div><div class="line"><a name="l00195"></a><span class="lineno"> 195</span>&#160; <span class="keywordtype">int</span> index = <a class="code" href="../../dd/d1d/hs-helper_8c.html#a2ff1b894941c3b461ca8119079c4146a">hs_search_event_name_index</a>(value);</div><div class="line"><a name="l00196"></a><span class="lineno"> 196</span>&#160; <span class="keywordflow">if</span>(index &lt; 0)</div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span>&#160; {</div><div class="line"><a name="l00198"></a><span class="lineno"> 198</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a>(<span class="stringliteral">&quot;homescreen-service&quot;</span>,<span class="stringliteral">&quot;dedicated event doesn&#39;t exist&quot;</span>);</div><div class="line"><a name="l00199"></a><span class="lineno"> 199</span>&#160; ret = <a class="code" href="../../d0/d1e/homescreen_8c.html#a9a68ed04201d9390bb85b2c6ab1d7250">EVENT_SUBSCRIBE_ERROR_CODE</a>;</div><div class="line"><a name="l00200"></a><span class="lineno"> 200</span>&#160; }</div><div class="line"><a name="l00201"></a><span class="lineno"> 201</span>&#160; <span class="keywordflow">else</span></div><div class="line"><a name="l00202"></a><span class="lineno"> 202</span>&#160; {</div><div class="line"><a name="l00203"></a><span class="lineno"> 203</span>&#160; afb_req_subscribe(request, *<a class="code" href="../../d0/d1e/homescreen_8c.html#a1c3c5bfa861dcb58d9e9d216d893864c">event_list</a>[index].<a class="code" href="../../df/d7d/structevent.html">event</a>);</div><div class="line"><a name="l00204"></a><span class="lineno"> 204</span>&#160; }</div><div class="line"><a name="l00205"></a><span class="lineno"> 205</span>&#160; }</div><div class="line"><a name="l00206"></a><span class="lineno"> 206</span>&#160; <span class="keywordflow">else</span>{</div><div class="line"><a name="l00207"></a><span class="lineno"> 207</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a>(<span class="stringliteral">&quot;homescreen-service&quot;</span>,<span class="stringliteral">&quot;Please input event name&quot;</span>);</div><div class="line"><a name="l00208"></a><span class="lineno"> 208</span>&#160; ret = <a class="code" href="../../d0/d1e/homescreen_8c.html#a9a68ed04201d9390bb85b2c6ab1d7250">EVENT_SUBSCRIBE_ERROR_CODE</a>;</div><div class="line"><a name="l00209"></a><span class="lineno"> 209</span>&#160; }</div><div class="line"><a name="l00210"></a><span class="lineno"> 210</span>&#160; <span class="comment">/*create response json object*/</span></div><div class="line"><a name="l00211"></a><span class="lineno"> 211</span>&#160; <span class="keyword">struct </span>json_object *res = json_object_new_object();</div><div class="line"><a name="l00212"></a><span class="lineno"> 212</span>&#160; <a class="code" href="../../dd/d1d/hs-helper_8c.html#ae83604a37134e7bdee3ce4f10bb0b47a">hs_add_object_to_json_object_func</a>(res, __FUNCTION__, 2,</div><div class="line"><a name="l00213"></a><span class="lineno"> 213</span>&#160; <a class="code" href="../../d0/d1e/homescreen_8c.html#aed1c5296a2e6d34945507a0fca17a376">_error</a>, ret);</div><div class="line"><a name="l00214"></a><span class="lineno"> 214</span>&#160; afb_req_success_f(request, res, <span class="stringliteral">&quot;homescreen binder subscribe event name [%s]&quot;</span>, value);</div><div class="line"><a name="l00215"></a><span class="lineno"> 215</span>&#160;}</div><div class="line"><a name="l00216"></a><span class="lineno"> 216</span>&#160;</div><div class="line"><a name="l00229"></a><span class="lineno"><a class="line" href="../../d0/d1e/homescreen_8c.html#ab92621255d7370c6dd8a0f1a8e376ad3"> 229</a></span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="../../d0/d1e/homescreen_8c.html#ab92621255d7370c6dd8a0f1a8e376ad3">unsubscribe</a>(<span class="keyword">struct</span> afb_req request)</div><div class="line"><a name="l00230"></a><span class="lineno"> 230</span>&#160;{</div><div class="line"><a name="l00231"></a><span class="lineno"> 231</span>&#160; <span class="keyword">const</span> <span class="keywordtype">char</span> *value = afb_req_value(request, <span class="stringliteral">&quot;event&quot;</span>);</div><div class="line"><a name="l00232"></a><span class="lineno"> 232</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a>(<span class="stringliteral">&quot;homescreen-service&quot;</span>,<span class="stringliteral">&quot;value is %s&quot;</span>, value);</div><div class="line"><a name="l00233"></a><span class="lineno"> 233</span>&#160; <span class="keywordtype">int</span> ret = 0;</div><div class="line"><a name="l00234"></a><span class="lineno"> 234</span>&#160; <span class="keywordflow">if</span>(value) {</div><div class="line"><a name="l00235"></a><span class="lineno"> 235</span>&#160; <span class="keywordtype">int</span> index = <a class="code" href="../../dd/d1d/hs-helper_8c.html#a2ff1b894941c3b461ca8119079c4146a">hs_search_event_name_index</a>(value);</div><div class="line"><a name="l00236"></a><span class="lineno"> 236</span>&#160; <span class="keywordflow">if</span>(index &lt; 0)</div><div class="line"><a name="l00237"></a><span class="lineno"> 237</span>&#160; {</div><div class="line"><a name="l00238"></a><span class="lineno"> 238</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a>(<span class="stringliteral">&quot;homescreen-service&quot;</span>,<span class="stringliteral">&quot;dedicated event doesn&#39;t exist&quot;</span>);</div><div class="line"><a name="l00239"></a><span class="lineno"> 239</span>&#160; ret = <a class="code" href="../../d0/d1e/homescreen_8c.html#a9a68ed04201d9390bb85b2c6ab1d7250">EVENT_SUBSCRIBE_ERROR_CODE</a>;</div><div class="line"><a name="l00240"></a><span class="lineno"> 240</span>&#160; }</div><div class="line"><a name="l00241"></a><span class="lineno"> 241</span>&#160; <span class="keywordflow">else</span></div><div class="line"><a name="l00242"></a><span class="lineno"> 242</span>&#160; {</div><div class="line"><a name="l00243"></a><span class="lineno"> 243</span>&#160; afb_req_unsubscribe(request, *<a class="code" href="../../d0/d1e/homescreen_8c.html#a1c3c5bfa861dcb58d9e9d216d893864c">event_list</a>[index].<a class="code" href="../../df/d7d/structevent.html">event</a>);</div><div class="line"><a name="l00244"></a><span class="lineno"> 244</span>&#160; }</div><div class="line"><a name="l00245"></a><span class="lineno"> 245</span>&#160; }</div><div class="line"><a name="l00246"></a><span class="lineno"> 246</span>&#160; <span class="keywordflow">else</span>{</div><div class="line"><a name="l00247"></a><span class="lineno"> 247</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a>(<span class="stringliteral">&quot;homescreen-service&quot;</span>,<span class="stringliteral">&quot;Please input event name&quot;</span>);</div><div class="line"><a name="l00248"></a><span class="lineno"> 248</span>&#160; ret = <a class="code" href="../../d0/d1e/homescreen_8c.html#a9a68ed04201d9390bb85b2c6ab1d7250">EVENT_SUBSCRIBE_ERROR_CODE</a>;</div><div class="line"><a name="l00249"></a><span class="lineno"> 249</span>&#160; }</div><div class="line"><a name="l00250"></a><span class="lineno"> 250</span>&#160; <span class="comment">/*create response json object*/</span></div><div class="line"><a name="l00251"></a><span class="lineno"> 251</span>&#160; <span class="keyword">struct </span>json_object *res = json_object_new_object();</div><div class="line"><a name="l00252"></a><span class="lineno"> 252</span>&#160; <a class="code" href="../../dd/d1d/hs-helper_8c.html#ae83604a37134e7bdee3ce4f10bb0b47a">hs_add_object_to_json_object_func</a>(res, __FUNCTION__, 2,</div><div class="line"><a name="l00253"></a><span class="lineno"> 253</span>&#160; <a class="code" href="../../d0/d1e/homescreen_8c.html#aed1c5296a2e6d34945507a0fca17a376">_error</a>, ret);</div><div class="line"><a name="l00254"></a><span class="lineno"> 254</span>&#160; afb_req_success_f(request, res, <span class="stringliteral">&quot;homescreen binder unsubscribe event name [%s]&quot;</span>, value);</div><div class="line"><a name="l00255"></a><span class="lineno"> 255</span>&#160;}</div><div class="line"><a name="l00256"></a><span class="lineno"> 256</span>&#160;</div><div class="line"><a name="l00257"></a><span class="lineno"> 257</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00258"></a><span class="lineno"> 258</span>&#160;<span class="comment"> * array of the verbs exported to afb-daemon</span></div><div class="line"><a name="l00259"></a><span class="lineno"> 259</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00260"></a><span class="lineno"><a class="line" href="../../d0/d1e/homescreen_8c.html#acad6dadf60fac3d701e488e4fcd11c89"> 260</a></span>&#160;<span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">struct </span>afb_verb_v2 <a class="code" href="../../d0/d1e/homescreen_8c.html#acad6dadf60fac3d701e488e4fcd11c89">verbs</a>[]= {</div><div class="line"><a name="l00261"></a><span class="lineno"> 261</span>&#160; <span class="comment">/* VERB&#39;S NAME SESSION MANAGEMENT FUNCTION TO CALL */</span></div><div class="line"><a name="l00262"></a><span class="lineno"> 262</span>&#160; { .verb = <span class="stringliteral">&quot;ping&quot;</span>, .session = AFB_SESSION_NONE, .callback = <a class="code" href="../../d0/d1e/homescreen_8c.html#af48cab759d4ae0ddbfcdd60f4051ba05">pingSample</a>, .auth = NULL },</div><div class="line"><a name="l00263"></a><span class="lineno"> 263</span>&#160; { .verb = <span class="stringliteral">&quot;tap_shortcut&quot;</span>, .session = AFB_SESSION_NONE, .callback = <a class="code" href="../../d0/d1e/homescreen_8c.html#a096eae5c8f297f9df142a406eea56227">tap_shortcut</a>, .auth = NULL },</div><div class="line"><a name="l00264"></a><span class="lineno"> 264</span>&#160; { .verb = <span class="stringliteral">&quot;on_screen_message&quot;</span>, .session = AFB_SESSION_NONE, .callback = <a class="code" href="../../d0/d1e/homescreen_8c.html#a640cf8ed97d804c5ed1c09a349056338">on_screen_message</a>, .auth = NULL },</div><div class="line"><a name="l00265"></a><span class="lineno"> 265</span>&#160; { .verb = <span class="stringliteral">&quot;on_screen_reply&quot;</span>, .session = AFB_SESSION_NONE, .callback = <a class="code" href="../../d0/d1e/homescreen_8c.html#a2f380055d7d69828115d2a8951634933">on_screen_reply</a>, .auth = NULL },</div><div class="line"><a name="l00266"></a><span class="lineno"> 266</span>&#160; { .verb = <span class="stringliteral">&quot;subscribe&quot;</span>, .session = AFB_SESSION_NONE, .callback = <a class="code" href="../../d0/d1e/homescreen_8c.html#a4ff0c8b506669e5622a6ee168134d8f1">subscribe</a>, .auth = NULL },</div><div class="line"><a name="l00267"></a><span class="lineno"> 267</span>&#160; { .verb = <span class="stringliteral">&quot;unsubscribe&quot;</span>, .session = AFB_SESSION_NONE, .callback = <a class="code" href="../../d0/d1e/homescreen_8c.html#ab92621255d7370c6dd8a0f1a8e376ad3">unsubscribe</a>, .auth = NULL },</div><div class="line"><a name="l00268"></a><span class="lineno"> 268</span>&#160; {NULL } <span class="comment">/* marker for end of the array */</span></div><div class="line"><a name="l00269"></a><span class="lineno"> 269</span>&#160;};</div><div class="line"><a name="l00270"></a><span class="lineno"> 270</span>&#160;</div><div class="line"><a name="l00271"></a><span class="lineno"><a class="line" href="../../d0/d1e/homescreen_8c.html#a83d646edf54a6a082f69121bc89a08de"> 271</a></span>&#160;<span class="keyword">static</span> <span class="keywordtype">int</span> <a class="code" href="../../d0/d1e/homescreen_8c.html#a83d646edf54a6a082f69121bc89a08de">preinit</a>()</div><div class="line"><a name="l00272"></a><span class="lineno"> 272</span>&#160;{</div><div class="line"><a name="l00273"></a><span class="lineno"> 273</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a>(<span class="stringliteral">&quot;homescreen-service&quot;</span>,<span class="stringliteral">&quot;binding preinit (was register)&quot;</span>);</div><div class="line"><a name="l00274"></a><span class="lineno"> 274</span>&#160; <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00275"></a><span class="lineno"> 275</span>&#160;}</div><div class="line"><a name="l00276"></a><span class="lineno"> 276</span>&#160;</div><div class="line"><a name="l00277"></a><span class="lineno"><a class="line" href="../../d0/d1e/homescreen_8c.html#a00cbbc0f3f4452db078ae511684a6adc"> 277</a></span>&#160;<span class="keyword">static</span> <span class="keywordtype">int</span> <a class="code" href="../../d0/d1e/homescreen_8c.html#a00cbbc0f3f4452db078ae511684a6adc">init</a>()</div><div class="line"><a name="l00278"></a><span class="lineno"> 278</span>&#160;{</div><div class="line"><a name="l00279"></a><span class="lineno"> 279</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a>(<span class="stringliteral">&quot;homescreen-service&quot;</span>,<span class="stringliteral">&quot;binding init&quot;</span>);</div><div class="line"><a name="l00280"></a><span class="lineno"> 280</span>&#160;</div><div class="line"><a name="l00281"></a><span class="lineno"> 281</span>&#160; <a class="code" href="../../d0/d1e/homescreen_8c.html#a2af1ff5a4cbf03125e61e903832035f5">ev_tap_shortcut</a> = afb_daemon_make_event(<a class="code" href="../../d3/d3d/hs-helper_8h.html#a0cd84b1a2184c9b84d1b7bf24582f28e">evlist</a>[0]);</div><div class="line"><a name="l00282"></a><span class="lineno"> 282</span>&#160; <a class="code" href="../../d0/d1e/homescreen_8c.html#af7cfc4f688bb898c09291252c4cb832c">ev_on_screen_message</a> = afb_daemon_make_event(<a class="code" href="../../d3/d3d/hs-helper_8h.html#a0cd84b1a2184c9b84d1b7bf24582f28e">evlist</a>[1]);</div><div class="line"><a name="l00283"></a><span class="lineno"> 283</span>&#160; <a class="code" href="../../d0/d1e/homescreen_8c.html#a5c225341e0ecbae0585302ef754a55ec">ev_on_screen_reply</a> = afb_daemon_make_event(<a class="code" href="../../d3/d3d/hs-helper_8h.html#a0cd84b1a2184c9b84d1b7bf24582f28e">evlist</a>[2]);</div><div class="line"><a name="l00284"></a><span class="lineno"> 284</span>&#160; <a class="code" href="../../d0/d1e/homescreen_8c.html#a25fbdcc4e5787e3f41d99f4a71e86611">ev_reserved</a> = afb_daemon_make_event(<a class="code" href="../../d3/d3d/hs-helper_8h.html#a0cd84b1a2184c9b84d1b7bf24582f28e">evlist</a>[3]);</div><div class="line"><a name="l00285"></a><span class="lineno"> 285</span>&#160;</div><div class="line"><a name="l00286"></a><span class="lineno"> 286</span>&#160; <a class="code" href="../../d0/d1e/homescreen_8c.html#a1c3c5bfa861dcb58d9e9d216d893864c">event_list</a>[0].<a class="code" href="../../df/d7d/structevent.html#a45c6cfb7961a21a3366db067e4cc59ab">name</a> = <a class="code" href="../../d3/d3d/hs-helper_8h.html#a0cd84b1a2184c9b84d1b7bf24582f28e">evlist</a>[0];</div><div class="line"><a name="l00287"></a><span class="lineno"> 287</span>&#160; <a class="code" href="../../d0/d1e/homescreen_8c.html#a1c3c5bfa861dcb58d9e9d216d893864c">event_list</a>[0].<a class="code" href="../../df/d7d/structevent.html#a58726ebc551d36562ac3f9e1fe293214">event</a> = &amp;<a class="code" href="../../d0/d1e/homescreen_8c.html#a2af1ff5a4cbf03125e61e903832035f5">ev_tap_shortcut</a>;</div><div class="line"><a name="l00288"></a><span class="lineno"> 288</span>&#160;</div><div class="line"><a name="l00289"></a><span class="lineno"> 289</span>&#160; <a class="code" href="../../d0/d1e/homescreen_8c.html#a1c3c5bfa861dcb58d9e9d216d893864c">event_list</a>[1].<a class="code" href="../../df/d7d/structevent.html#a45c6cfb7961a21a3366db067e4cc59ab">name</a> = <a class="code" href="../../d3/d3d/hs-helper_8h.html#a0cd84b1a2184c9b84d1b7bf24582f28e">evlist</a>[1];</div><div class="line"><a name="l00290"></a><span class="lineno"> 290</span>&#160; <a class="code" href="../../d0/d1e/homescreen_8c.html#a1c3c5bfa861dcb58d9e9d216d893864c">event_list</a>[1].<a class="code" href="../../df/d7d/structevent.html#a58726ebc551d36562ac3f9e1fe293214">event</a> = &amp;<a class="code" href="../../d0/d1e/homescreen_8c.html#af7cfc4f688bb898c09291252c4cb832c">ev_on_screen_message</a>;</div><div class="line"><a name="l00291"></a><span class="lineno"> 291</span>&#160;</div><div class="line"><a name="l00292"></a><span class="lineno"> 292</span>&#160; <a class="code" href="../../d0/d1e/homescreen_8c.html#a1c3c5bfa861dcb58d9e9d216d893864c">event_list</a>[2].<a class="code" href="../../df/d7d/structevent.html#a45c6cfb7961a21a3366db067e4cc59ab">name</a> = <a class="code" href="../../d3/d3d/hs-helper_8h.html#a0cd84b1a2184c9b84d1b7bf24582f28e">evlist</a>[2];</div><div class="line"><a name="l00293"></a><span class="lineno"> 293</span>&#160; <a class="code" href="../../d0/d1e/homescreen_8c.html#a1c3c5bfa861dcb58d9e9d216d893864c">event_list</a>[2].<a class="code" href="../../df/d7d/structevent.html#a58726ebc551d36562ac3f9e1fe293214">event</a> = &amp;<a class="code" href="../../d0/d1e/homescreen_8c.html#a5c225341e0ecbae0585302ef754a55ec">ev_on_screen_reply</a>;</div><div class="line"><a name="l00294"></a><span class="lineno"> 294</span>&#160;</div><div class="line"><a name="l00295"></a><span class="lineno"> 295</span>&#160; <a class="code" href="../../d0/d1e/homescreen_8c.html#a1c3c5bfa861dcb58d9e9d216d893864c">event_list</a>[3].<a class="code" href="../../df/d7d/structevent.html#a45c6cfb7961a21a3366db067e4cc59ab">name</a> = <a class="code" href="../../d3/d3d/hs-helper_8h.html#a0cd84b1a2184c9b84d1b7bf24582f28e">evlist</a>[3];</div><div class="line"><a name="l00296"></a><span class="lineno"> 296</span>&#160; <a class="code" href="../../d0/d1e/homescreen_8c.html#a1c3c5bfa861dcb58d9e9d216d893864c">event_list</a>[3].<a class="code" href="../../df/d7d/structevent.html#a58726ebc551d36562ac3f9e1fe293214">event</a> = &amp;<a class="code" href="../../d0/d1e/homescreen_8c.html#a25fbdcc4e5787e3f41d99f4a71e86611">ev_reserved</a>;</div><div class="line"><a name="l00297"></a><span class="lineno"> 297</span>&#160;</div><div class="line"><a name="l00298"></a><span class="lineno"> 298</span>&#160; <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00299"></a><span class="lineno"> 299</span>&#160;}</div><div class="line"><a name="l00300"></a><span class="lineno"> 300</span>&#160;</div><div class="line"><a name="l00301"></a><span class="lineno"><a class="line" href="../../d0/d1e/homescreen_8c.html#a1279893c0fe937311a81e0a98fb4cf1c"> 301</a></span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="../../d0/d1e/homescreen_8c.html#a1279893c0fe937311a81e0a98fb4cf1c">onevent</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="../../df/d7d/structevent.html">event</a>, <span class="keyword">struct</span> json_object *<span class="keywordtype">object</span>)</div><div class="line"><a name="l00302"></a><span class="lineno"> 302</span>&#160;{</div><div class="line"><a name="l00303"></a><span class="lineno"> 303</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a>(<span class="stringliteral">&quot;homescreen-service&quot;</span>,<span class="stringliteral">&quot;on_event %s&quot;</span>, event);</div><div class="line"><a name="l00304"></a><span class="lineno"> 304</span>&#160;}</div><div class="line"><a name="l00305"></a><span class="lineno"> 305</span>&#160;</div><div class="line"><a name="l00306"></a><span class="lineno"><a class="line" href="../../d0/d1e/homescreen_8c.html#ae2a62ab481a2922cbfc788193857a12e"> 306</a></span>&#160;<span class="keyword">const</span> <span class="keyword">struct </span>afb_binding_v2 <a class="code" href="../../d0/d1e/homescreen_8c.html#ae2a62ab481a2922cbfc788193857a12e">afbBindingV2</a> = {</div><div class="line"><a name="l00307"></a><span class="lineno"> 307</span>&#160; .api = <span class="stringliteral">&quot;homescreen&quot;</span>,</div><div class="line"><a name="l00308"></a><span class="lineno"> 308</span>&#160; .specification = NULL,</div><div class="line"><a name="l00309"></a><span class="lineno"> 309</span>&#160; .verbs = <a class="code" href="../../d0/d1e/homescreen_8c.html#acad6dadf60fac3d701e488e4fcd11c89">verbs</a>,</div><div class="line"><a name="l00310"></a><span class="lineno"> 310</span>&#160; .preinit = <a class="code" href="../../d0/d1e/homescreen_8c.html#a83d646edf54a6a082f69121bc89a08de">preinit</a>,</div><div class="line"><a name="l00311"></a><span class="lineno"> 311</span>&#160; .init = <a class="code" href="../../d0/d1e/homescreen_8c.html#a00cbbc0f3f4452db078ae511684a6adc">init</a>,</div><div class="line"><a name="l00312"></a><span class="lineno"> 312</span>&#160; .onevent = <a class="code" href="../../d0/d1e/homescreen_8c.html#a1279893c0fe937311a81e0a98fb4cf1c">onevent</a></div><div class="line"><a name="l00313"></a><span class="lineno"> 313</span>&#160;};</div><div class="ttc" id="hs-helper_8c_html_a8777c53f1d4d5412f19b134ad85ffedf"><div class="ttname"><a href="../../dd/d1d/hs-helper_8c.html#a8777c53f1d4d5412f19b134ad85ffedf">hs_add_object_to_json_object_str</a></div><div class="ttdeci">void hs_add_object_to_json_object_str(struct json_object *j_obj, int count,...)</div><div class="ttdef"><b>Definition:</b> <a href="../../dd/d1d/hs-helper_8c_source.html#l00110">hs-helper.c:110</a></div></div>
+<div class="ttc" id="structevent_html_a58726ebc551d36562ac3f9e1fe293214"><div class="ttname"><a href="../../df/d7d/structevent.html#a58726ebc551d36562ac3f9e1fe293214">event::event</a></div><div class="ttdeci">struct afb_event * event</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00037">homescreen.c:37</a></div></div>
+<div class="ttc" id="hmi-debug_8h_html_abc0d6e0760017d8ae48b836925b2ef15"><div class="ttname"><a href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a></div><div class="ttdeci">#define HMI_NOTICE(prefix, args,...)</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d76/hmi-debug_8h_source.html#l00020">hmi-debug.h:20</a></div></div>
+<div class="ttc" id="homescreen_8c_html_a83d646edf54a6a082f69121bc89a08de"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#a83d646edf54a6a082f69121bc89a08de">preinit</a></div><div class="ttdeci">static int preinit()</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00271">homescreen.c:271</a></div></div>
+<div class="ttc" id="homescreen_8c_html_a096eae5c8f297f9df142a406eea56227"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#a096eae5c8f297f9df142a406eea56227">tap_shortcut</a></div><div class="ttdeci">static void tap_shortcut(struct afb_req request)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00077">homescreen.c:77</a></div></div>
+<div class="ttc" id="homescreen_8c_html_a1f2c79fa6801b63751e270d67994fe81"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#a1f2c79fa6801b63751e270d67994fe81">_application_name</a></div><div class="ttdeci">static const char _application_name[]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00049">homescreen.c:49</a></div></div>
+<div class="ttc" id="homescreen_8c_html_a25fbdcc4e5787e3f41d99f4a71e86611"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#a25fbdcc4e5787e3f41d99f4a71e86611">ev_reserved</a></div><div class="ttdeci">static struct afb_event ev_reserved</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00045">homescreen.c:45</a></div></div>
+<div class="ttc" id="homescreen_8c_html_aed1c5296a2e6d34945507a0fca17a376"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#aed1c5296a2e6d34945507a0fca17a376">_error</a></div><div class="ttdeci">static const char _error[]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00047">homescreen.c:47</a></div></div>
+<div class="ttc" id="homescreen_8c_html_af48cab759d4ae0ddbfcdd60f4051ba05"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#af48cab759d4ae0ddbfcdd60f4051ba05">pingSample</a></div><div class="ttdeci">static void pingSample(struct afb_req request)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00057">homescreen.c:57</a></div></div>
+<div class="ttc" id="homescreen_8c_html_a1279893c0fe937311a81e0a98fb4cf1c"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#a1279893c0fe937311a81e0a98fb4cf1c">onevent</a></div><div class="ttdeci">static void onevent(const char *event, struct json_object *object)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00301">homescreen.c:301</a></div></div>
+<div class="ttc" id="hs-helper_8h_html"><div class="ttname"><a href="../../d3/d3d/hs-helper_8h.html">hs-helper.h</a></div></div>
+<div class="ttc" id="structevent_html"><div class="ttname"><a href="../../df/d7d/structevent.html">event</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00035">homescreen.c:35</a></div></div>
+<div class="ttc" id="homescreen_8c_html_a2f380055d7d69828115d2a8951634933"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#a2f380055d7d69828115d2a8951634933">on_screen_reply</a></div><div class="ttdeci">static void on_screen_reply(struct afb_req request)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00151">homescreen.c:151</a></div></div>
+<div class="ttc" id="homescreen_8c_html_a00cbbc0f3f4452db078ae511684a6adc"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#a00cbbc0f3f4452db078ae511684a6adc">init</a></div><div class="ttdeci">static int init()</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00277">homescreen.c:277</a></div></div>
+<div class="ttc" id="hs-helper_8h_html_a0cd84b1a2184c9b84d1b7bf24582f28e"><div class="ttname"><a href="../../d3/d3d/hs-helper_8h.html#a0cd84b1a2184c9b84d1b7bf24582f28e">evlist</a></div><div class="ttdeci">static const char * evlist[]</div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d3d/hs-helper_8h_source.html#l00034">hs-helper.h:34</a></div></div>
+<div class="ttc" id="structevent_html_a45c6cfb7961a21a3366db067e4cc59ab"><div class="ttname"><a href="../../df/d7d/structevent.html#a45c6cfb7961a21a3366db067e4cc59ab">event::name</a></div><div class="ttdeci">const char * name</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00036">homescreen.c:36</a></div></div>
+<div class="ttc" id="homescreen_8c_html_ab92621255d7370c6dd8a0f1a8e376ad3"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#ab92621255d7370c6dd8a0f1a8e376ad3">unsubscribe</a></div><div class="ttdeci">static void unsubscribe(struct afb_req request)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00229">homescreen.c:229</a></div></div>
+<div class="ttc" id="hs-helper_8c_html_a2ff1b894941c3b461ca8119079c4146a"><div class="ttname"><a href="../../dd/d1d/hs-helper_8c.html#a2ff1b894941c3b461ca8119079c4146a">hs_search_event_name_index</a></div><div class="ttdeci">int hs_search_event_name_index(const char *value)</div><div class="ttdef"><b>Definition:</b> <a href="../../dd/d1d/hs-helper_8c_source.html#l00142">hs-helper.c:142</a></div></div>
+<div class="ttc" id="homescreen_8c_html_a5c225341e0ecbae0585302ef754a55ec"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#a5c225341e0ecbae0585302ef754a55ec">ev_on_screen_reply</a></div><div class="ttdeci">static struct afb_event ev_on_screen_reply</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00044">homescreen.c:44</a></div></div>
+<div class="ttc" id="homescreen_8c_html_af7cfc4f688bb898c09291252c4cb832c"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#af7cfc4f688bb898c09291252c4cb832c">ev_on_screen_message</a></div><div class="ttdeci">static struct afb_event ev_on_screen_message</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00043">homescreen.c:43</a></div></div>
+<div class="ttc" id="homescreen_8c_html_a09f43d9e7e1c5d2198c0d66024b4500e"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#a09f43d9e7e1c5d2198c0d66024b4500e">COMMAND_EVENT_NUM</a></div><div class="ttdeci">#define COMMAND_EVENT_NUM</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00031">homescreen.c:31</a></div></div>
+<div class="ttc" id="homescreen_8c_html_a640cf8ed97d804c5ed1c09a349056338"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#a640cf8ed97d804c5ed1c09a349056338">on_screen_message</a></div><div class="ttdeci">static void on_screen_message(struct afb_req request)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00114">homescreen.c:114</a></div></div>
+<div class="ttc" id="homescreen_8c_html_acad6dadf60fac3d701e488e4fcd11c89"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#acad6dadf60fac3d701e488e4fcd11c89">verbs</a></div><div class="ttdeci">static const struct afb_verb_v2 verbs[]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00260">homescreen.c:260</a></div></div>
+<div class="ttc" id="homescreen_8c_html_a1c3c5bfa861dcb58d9e9d216d893864c"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#a1c3c5bfa861dcb58d9e9d216d893864c">event_list</a></div><div class="ttdeci">static struct event event_list[COMMAND_EVENT_NUM]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00040">homescreen.c:40</a></div></div>
+<div class="ttc" id="homescreen_8c_html_abfd6c1d6f316fa952b11553f8f275e92"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#abfd6c1d6f316fa952b11553f8f275e92">_display_message</a></div><div class="ttdeci">static const char _display_message[]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00050">homescreen.c:50</a></div></div>
+<div class="ttc" id="homescreen_8c_html_a4ff0c8b506669e5622a6ee168134d8f1"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#a4ff0c8b506669e5622a6ee168134d8f1">subscribe</a></div><div class="ttdeci">static void subscribe(struct afb_req request)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00189">homescreen.c:189</a></div></div>
+<div class="ttc" id="homescreen_8c_html_a9a68ed04201d9390bb85b2c6ab1d7250"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#a9a68ed04201d9390bb85b2c6ab1d7250">EVENT_SUBSCRIBE_ERROR_CODE</a></div><div class="ttdeci">#define EVENT_SUBSCRIBE_ERROR_CODE</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00032">homescreen.c:32</a></div></div>
+<div class="ttc" id="homescreen_8c_html_a2af1ff5a4cbf03125e61e903832035f5"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#a2af1ff5a4cbf03125e61e903832035f5">ev_tap_shortcut</a></div><div class="ttdeci">static struct afb_event ev_tap_shortcut</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00042">homescreen.c:42</a></div></div>
+<div class="ttc" id="homescreen_8c_html_a79b0f0b481161527ccb80e83da143219"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#a79b0f0b481161527ccb80e83da143219">_reply_message</a></div><div class="ttdeci">static const char _reply_message[]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00051">homescreen.c:51</a></div></div>
+<div class="ttc" id="homescreen_8c_html_ae2a62ab481a2922cbfc788193857a12e"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#ae2a62ab481a2922cbfc788193857a12e">afbBindingV2</a></div><div class="ttdeci">const struct afb_binding_v2 afbBindingV2</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00306">homescreen.c:306</a></div></div>
+<div class="ttc" id="hs-helper_8c_html_ae83604a37134e7bdee3ce4f10bb0b47a"><div class="ttname"><a href="../../dd/d1d/hs-helper_8c.html#ae83604a37134e7bdee3ce4f10bb0b47a">hs_add_object_to_json_object_func</a></div><div class="ttdeci">void hs_add_object_to_json_object_func(struct json_object *j_obj, const char *verb_name, int count,...)</div><div class="ttdef"><b>Definition:</b> <a href="../../dd/d1d/hs-helper_8c_source.html#l00125">hs-helper.c:125</a></div></div>
+</div><!-- fragment --></div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="../../doxygen.png" alt="doxygen"/>
+</a> 1.8.13
+</small></address>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/d0/d8a/libhomescreen_8cpp.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/d0/d8a/libhomescreen_8cpp.html
new file mode 100644
index 0000000..1aec416
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/d0/d8a/libhomescreen_8cpp.html
@@ -0,0 +1,377 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>HomeScreenBinding: libhomescreen/libhomescreen.cpp File Reference</title>
+<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="../../jquery.js"></script>
+<script type="text/javascript" src="../../dynsections.js"></script>
+<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="../../search/searchdata.js"></script>
+<script type="text/javascript" src="../../search/search.js"></script>
+<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+ <td id="projectalign" style="padding-left: 0.5em;">
+ <div id="projectname">HomeScreenBinding
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.13 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
+</script>
+<script type="text/javascript" src="../../menudata.js"></script>
+<script type="text/javascript" src="../../menu.js"></script>
+<script type="text/javascript">
+$(function() {
+ initMenu('../../',true,false,'search.php','Search');
+ $(document).ready(function() { init_search(); });
+});
+</script>
+<div id="main-nav"></div>
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+ onmouseover="return searchBox.OnSearchSelectShow()"
+ onmouseout="return searchBox.OnSearchSelectHide()"
+ onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0"
+ name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div id="nav-path" class="navpath">
+ <ul>
+<li class="navelem"><a class="el" href="../../dir_65f76d62445e9e84c0450b12bf77c3bc.html">libhomescreen</a></li> </ul>
+</div>
+</div><!-- top -->
+<div class="header">
+ <div class="summary">
+<a href="#func-members">Functions</a> &#124;
+<a href="#var-members">Variables</a> </div>
+ <div class="headertitle">
+<div class="title">libhomescreen.cpp File Reference</div> </div>
+</div><!--header-->
+<div class="contents">
+<div class="textblock"><code>#include &lt;stdarg.h&gt;</code><br />
+<code>#include &lt;sys/socket.h&gt;</code><br />
+<code>#include &lt;iostream&gt;</code><br />
+<code>#include &lt;algorithm&gt;</code><br />
+<code>#include &lt;thread&gt;</code><br />
+<code>#include &lt;errno.h&gt;</code><br />
+<code>#include &lt;cassert&gt;</code><br />
+<code>#include &lt;cctype&gt;</code><br />
+<code>#include &lt;cerrno&gt;</code><br />
+<code>#include &lt;cstdio&gt;</code><br />
+<code>#include &lt;cstdlib&gt;</code><br />
+<code>#include &lt;cstring&gt;</code><br />
+<code>#include &lt;<a class="el" href="../../df/d43/libhomescreen_8hpp_source.html">libhomescreen.hpp</a>&gt;</code><br />
+<code>#include &quot;<a class="el" href="../../df/d76/hmi-debug_8h_source.html">hmi-debug.h</a>&quot;</code><br />
+</div>
+<p><a href="../../d0/d8a/libhomescreen_8cpp_source.html">Go to the source code of this file.</a></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
+Functions</h2></td></tr>
+<tr class="memitem:a7a2176c3d71fec0f09dcb2aa0866b17e"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d8a/libhomescreen_8cpp.html#a7a2176c3d71fec0f09dcb2aa0866b17e">has_verb</a> (const string &amp;verb)</td></tr>
+<tr class="separator:a7a2176c3d71fec0f09dcb2aa0866b17e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a73c05b96c151e5e46c28585ccb143c1c"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d8a/libhomescreen_8cpp.html#a73c05b96c151e5e46c28585ccb143c1c">_on_hangup_static</a> (void *closure, struct afb_wsj1 *wsj)</td></tr>
+<tr class="separator:a73c05b96c151e5e46c28585ccb143c1c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a782a05fde0f1c17e0c4c8f972a3f53c8"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d8a/libhomescreen_8cpp.html#a782a05fde0f1c17e0c4c8f972a3f53c8">_on_call_static</a> (void *closure, const char *api, const char *verb, struct afb_wsj1_msg *msg)</td></tr>
+<tr class="separator:a782a05fde0f1c17e0c4c8f972a3f53c8"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a3df86185aa9453726556da201d95a6f9"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d8a/libhomescreen_8cpp.html#a3df86185aa9453726556da201d95a6f9">_on_event_static</a> (void *closure, const char *<a class="el" href="../../df/d7d/structevent.html">event</a>, struct afb_wsj1_msg *msg)</td></tr>
+<tr class="separator:a3df86185aa9453726556da201d95a6f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a7778933bffa862c63fa0a1b8219faa8b"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d8a/libhomescreen_8cpp.html#a7778933bffa862c63fa0a1b8219faa8b">_on_reply_static</a> (void *closure, struct afb_wsj1_msg *msg)</td></tr>
+<tr class="separator:a7778933bffa862c63fa0a1b8219faa8b"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aa73353e1bf62c68b6b0aba7a1e4e275e"><td class="memItemLeft" align="right" valign="top">static void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d8a/libhomescreen_8cpp.html#aa73353e1bf62c68b6b0aba7a1e4e275e">event_loop_run</a> (void *args)</td></tr>
+<tr class="separator:aa73353e1bf62c68b6b0aba7a1e4e275e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table><table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
+Variables</h2></td></tr>
+<tr class="memitem:a1e2d6e77dd8f0162f830058579eab42f"><td class="memItemLeft" align="right" valign="top">static const char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d8a/libhomescreen_8cpp.html#a1e2d6e77dd8f0162f830058579eab42f">API</a> [] = &quot;homescreen&quot;</td></tr>
+<tr class="separator:a1e2d6e77dd8f0162f830058579eab42f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<h2 class="groupheader">Function Documentation</h2>
+<a id="a782a05fde0f1c17e0c4c8f972a3f53c8"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a782a05fde0f1c17e0c4c8f972a3f53c8">&#9670;&nbsp;</a></span>_on_call_static()</h2>
+
+<div class="memitem">
+<div class="memproto">
+<table class="mlabels">
+ <tr>
+ <td class="mlabels-left">
+ <table class="memname">
+ <tr>
+ <td class="memname">static void _on_call_static </td>
+ <td>(</td>
+ <td class="paramtype">void *&#160;</td>
+ <td class="paramname"><em>closure</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const char *&#160;</td>
+ <td class="paramname"><em>api</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const char *&#160;</td>
+ <td class="paramname"><em>verb</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">struct afb_wsj1_msg *&#160;</td>
+ <td class="paramname"><em>msg</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+ </td>
+ <td class="mlabels-right">
+<span class="mlabels"><span class="mlabel">static</span></span> </td>
+ </tr>
+</table>
+</div><div class="memdoc">
+
+<p class="definition">Definition at line <a class="el" href="../../d0/d8a/libhomescreen_8cpp_source.html#l00064">64</a> of file <a class="el" href="../../d0/d8a/libhomescreen_8cpp_source.html">libhomescreen.cpp</a>.</p>
+<div class="fragment"><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160;{</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160; <span class="comment">/* LibHomeScreen is not called from other process */</span></div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160;}</div></div><!-- fragment -->
+</div>
+</div>
+<a id="a3df86185aa9453726556da201d95a6f9"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a3df86185aa9453726556da201d95a6f9">&#9670;&nbsp;</a></span>_on_event_static()</h2>
+
+<div class="memitem">
+<div class="memproto">
+<table class="mlabels">
+ <tr>
+ <td class="mlabels-left">
+ <table class="memname">
+ <tr>
+ <td class="memname">static void _on_event_static </td>
+ <td>(</td>
+ <td class="paramtype">void *&#160;</td>
+ <td class="paramname"><em>closure</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const char *&#160;</td>
+ <td class="paramname"><em>event</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">struct afb_wsj1_msg *&#160;</td>
+ <td class="paramname"><em>msg</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+ </td>
+ <td class="mlabels-right">
+<span class="mlabels"><span class="mlabel">static</span></span> </td>
+ </tr>
+</table>
+</div><div class="memdoc">
+
+<p class="definition">Definition at line <a class="el" href="../../d0/d8a/libhomescreen_8cpp_source.html#l00069">69</a> of file <a class="el" href="../../d0/d8a/libhomescreen_8cpp_source.html">libhomescreen.cpp</a>.</p>
+<div class="fragment"><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160;{</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160; <span class="keyword">static_cast&lt;</span><a class="code" href="../../de/dd0/class_lib_home_screen.html">LibHomeScreen</a>*<span class="keyword">&gt;</span>(closure)-&gt;on_event(NULL,<a class="code" href="../../df/d7d/structevent.html">event</a>,msg);</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160;}</div><div class="ttc" id="structevent_html"><div class="ttname"><a href="../../df/d7d/structevent.html">event</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00035">homescreen.c:35</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html">LibHomeScreen</a></div><div class="ttdef"><b>Definition:</b> <a href="../../df/d43/libhomescreen_8hpp_source.html#l00032">libhomescreen.hpp:32</a></div></div>
+</div><!-- fragment -->
+</div>
+</div>
+<a id="a73c05b96c151e5e46c28585ccb143c1c"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a73c05b96c151e5e46c28585ccb143c1c">&#9670;&nbsp;</a></span>_on_hangup_static()</h2>
+
+<div class="memitem">
+<div class="memproto">
+<table class="mlabels">
+ <tr>
+ <td class="mlabels-left">
+ <table class="memname">
+ <tr>
+ <td class="memname">static void _on_hangup_static </td>
+ <td>(</td>
+ <td class="paramtype">void *&#160;</td>
+ <td class="paramname"><em>closure</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">struct afb_wsj1 *&#160;</td>
+ <td class="paramname"><em>wsj</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+ </td>
+ <td class="mlabels-right">
+<span class="mlabels"><span class="mlabel">static</span></span> </td>
+ </tr>
+</table>
+</div><div class="memdoc">
+<p>websocket </p>
+
+<p class="definition">Definition at line <a class="el" href="../../d0/d8a/libhomescreen_8cpp_source.html#l00059">59</a> of file <a class="el" href="../../d0/d8a/libhomescreen_8cpp_source.html">libhomescreen.cpp</a>.</p>
+<div class="fragment"><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160;{</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; <span class="keyword">static_cast&lt;</span><a class="code" href="../../de/dd0/class_lib_home_screen.html">LibHomeScreen</a>*<span class="keyword">&gt;</span>(closure)-&gt;on_hangup(NULL,wsj);</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160;}</div><div class="ttc" id="class_lib_home_screen_html"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html">LibHomeScreen</a></div><div class="ttdef"><b>Definition:</b> <a href="../../df/d43/libhomescreen_8hpp_source.html#l00032">libhomescreen.hpp:32</a></div></div>
+</div><!-- fragment -->
+</div>
+</div>
+<a id="a7778933bffa862c63fa0a1b8219faa8b"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a7778933bffa862c63fa0a1b8219faa8b">&#9670;&nbsp;</a></span>_on_reply_static()</h2>
+
+<div class="memitem">
+<div class="memproto">
+<table class="mlabels">
+ <tr>
+ <td class="mlabels-left">
+ <table class="memname">
+ <tr>
+ <td class="memname">static void _on_reply_static </td>
+ <td>(</td>
+ <td class="paramtype">void *&#160;</td>
+ <td class="paramname"><em>closure</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">struct afb_wsj1_msg *&#160;</td>
+ <td class="paramname"><em>msg</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+ </td>
+ <td class="mlabels-right">
+<span class="mlabels"><span class="mlabel">static</span></span> </td>
+ </tr>
+</table>
+</div><div class="memdoc">
+
+<p class="definition">Definition at line <a class="el" href="../../d0/d8a/libhomescreen_8cpp_source.html#l00074">74</a> of file <a class="el" href="../../d0/d8a/libhomescreen_8cpp_source.html">libhomescreen.cpp</a>.</p>
+<div class="fragment"><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160;{</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160; <span class="keyword">static_cast&lt;</span><a class="code" href="../../de/dd0/class_lib_home_screen.html">LibHomeScreen</a>*<span class="keyword">&gt;</span>(closure)-&gt;on_reply(NULL,msg);</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160;}</div><div class="ttc" id="class_lib_home_screen_html"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html">LibHomeScreen</a></div><div class="ttdef"><b>Definition:</b> <a href="../../df/d43/libhomescreen_8hpp_source.html#l00032">libhomescreen.hpp:32</a></div></div>
+</div><!-- fragment -->
+</div>
+</div>
+<a id="aa73353e1bf62c68b6b0aba7a1e4e275e"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aa73353e1bf62c68b6b0aba7a1e4e275e">&#9670;&nbsp;</a></span>event_loop_run()</h2>
+
+<div class="memitem">
+<div class="memproto">
+<table class="mlabels">
+ <tr>
+ <td class="mlabels-left">
+ <table class="memname">
+ <tr>
+ <td class="memname">static void* event_loop_run </td>
+ <td>(</td>
+ <td class="paramtype">void *&#160;</td>
+ <td class="paramname"><em>args</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+ </td>
+ <td class="mlabels-right">
+<span class="mlabels"><span class="mlabel">static</span></span> </td>
+ </tr>
+</table>
+</div><div class="memdoc">
+
+<p class="definition">Definition at line <a class="el" href="../../d0/d8a/libhomescreen_8cpp_source.html#l00201">201</a> of file <a class="el" href="../../d0/d8a/libhomescreen_8cpp_source.html">libhomescreen.cpp</a>.</p>
+<div class="fragment"><div class="line"><a name="l00202"></a><span class="lineno"> 202</span>&#160;{</div><div class="line"><a name="l00203"></a><span class="lineno"> 203</span>&#160; <span class="keyword">struct </span>sd_event* loop = (<span class="keyword">struct </span>sd_event*)(args);</div><div class="line"><a name="l00204"></a><span class="lineno"> 204</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#a0d26d8b8201011dade787236519711c0">HMI_DEBUG</a>(<span class="stringliteral">&quot;libhomescreen&quot;</span>,<span class="stringliteral">&quot;start eventloop&quot;</span>);</div><div class="line"><a name="l00205"></a><span class="lineno"> 205</span>&#160; <span class="keywordflow">for</span>(;;)</div><div class="line"><a name="l00206"></a><span class="lineno"> 206</span>&#160; sd_event_run(loop, 30000000);</div><div class="line"><a name="l00207"></a><span class="lineno"> 207</span>&#160;}</div><div class="ttc" id="hmi-debug_8h_html_a0d26d8b8201011dade787236519711c0"><div class="ttname"><a href="../../df/d76/hmi-debug_8h.html#a0d26d8b8201011dade787236519711c0">HMI_DEBUG</a></div><div class="ttdeci">#define HMI_DEBUG(prefix, args,...)</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d76/hmi-debug_8h_source.html#l00022">hmi-debug.h:22</a></div></div>
+</div><!-- fragment -->
+</div>
+</div>
+<a id="a7a2176c3d71fec0f09dcb2aa0866b17e"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a7a2176c3d71fec0f09dcb2aa0866b17e">&#9670;&nbsp;</a></span>has_verb()</h2>
+
+<div class="memitem">
+<div class="memproto">
+<table class="mlabels">
+ <tr>
+ <td class="mlabels-left">
+ <table class="memname">
+ <tr>
+ <td class="memname">static bool has_verb </td>
+ <td>(</td>
+ <td class="paramtype">const string &amp;&#160;</td>
+ <td class="paramname"><em>verb</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+ </td>
+ <td class="mlabels-right">
+<span class="mlabels"><span class="mlabel">static</span></span> </td>
+ </tr>
+</table>
+</div><div class="memdoc">
+
+<p class="definition">Definition at line <a class="el" href="../../d0/d8a/libhomescreen_8cpp_source.html#l00518">518</a> of file <a class="el" href="../../d0/d8a/libhomescreen_8cpp_source.html">libhomescreen.cpp</a>.</p>
+<div class="fragment"><div class="line"><a name="l00519"></a><span class="lineno"> 519</span>&#160;{</div><div class="line"><a name="l00520"></a><span class="lineno"> 520</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#a0d26d8b8201011dade787236519711c0">HMI_DEBUG</a>(<span class="stringliteral">&quot;libhomescreen&quot;</span>,<span class="stringliteral">&quot;verb is %s&quot;</span>, verb.c_str());</div><div class="line"><a name="l00521"></a><span class="lineno"> 521</span>&#160; <span class="keywordflow">if</span>(find(<a class="code" href="../../de/dd0/class_lib_home_screen.html#a5593ff5ac78f6495ccb649904cf0ab08">LibHomeScreen::api_list</a>.begin(), <a class="code" href="../../de/dd0/class_lib_home_screen.html#a5593ff5ac78f6495ccb649904cf0ab08">LibHomeScreen::api_list</a>.end(), verb) != <a class="code" href="../../de/dd0/class_lib_home_screen.html#a5593ff5ac78f6495ccb649904cf0ab08">LibHomeScreen::api_list</a>.end())</div><div class="line"><a name="l00522"></a><span class="lineno"> 522</span>&#160; <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l00523"></a><span class="lineno"> 523</span>&#160; <span class="keywordflow">else</span></div><div class="line"><a name="l00524"></a><span class="lineno"> 524</span>&#160; <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00525"></a><span class="lineno"> 525</span>&#160;}</div><div class="ttc" id="hmi-debug_8h_html_a0d26d8b8201011dade787236519711c0"><div class="ttname"><a href="../../df/d76/hmi-debug_8h.html#a0d26d8b8201011dade787236519711c0">HMI_DEBUG</a></div><div class="ttdeci">#define HMI_DEBUG(prefix, args,...)</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d76/hmi-debug_8h_source.html#l00022">hmi-debug.h:22</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_a5593ff5ac78f6495ccb649904cf0ab08"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#a5593ff5ac78f6495ccb649904cf0ab08">LibHomeScreen::api_list</a></div><div class="ttdeci">static const std::vector&lt; std::string &gt; api_list</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d43/libhomescreen_8hpp_source.html#l00050">libhomescreen.hpp:50</a></div></div>
+</div><!-- fragment -->
+</div>
+</div>
+<h2 class="groupheader">Variable Documentation</h2>
+<a id="a1e2d6e77dd8f0162f830058579eab42f"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a1e2d6e77dd8f0162f830058579eab42f">&#9670;&nbsp;</a></span>API</h2>
+
+<div class="memitem">
+<div class="memproto">
+<table class="mlabels">
+ <tr>
+ <td class="mlabels-left">
+ <table class="memname">
+ <tr>
+ <td class="memname">const char API[] = &quot;homescreen&quot;</td>
+ </tr>
+ </table>
+ </td>
+ <td class="mlabels-right">
+<span class="mlabels"><span class="mlabel">static</span></span> </td>
+ </tr>
+</table>
+</div><div class="memdoc">
+
+<p class="definition">Definition at line <a class="el" href="../../d0/d8a/libhomescreen_8cpp_source.html#l00036">36</a> of file <a class="el" href="../../d0/d8a/libhomescreen_8cpp_source.html">libhomescreen.cpp</a>.</p>
+
+</div>
+</div>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="../../doxygen.png" alt="doxygen"/>
+</a> 1.8.13
+</small></address>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/d0/d8a/libhomescreen_8cpp_source.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/d0/d8a/libhomescreen_8cpp_source.html
new file mode 100644
index 0000000..621f8d4
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/d0/d8a/libhomescreen_8cpp_source.html
@@ -0,0 +1,111 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>HomeScreenBinding: libhomescreen/libhomescreen.cpp Source File</title>
+<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="../../jquery.js"></script>
+<script type="text/javascript" src="../../dynsections.js"></script>
+<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="../../search/searchdata.js"></script>
+<script type="text/javascript" src="../../search/search.js"></script>
+<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+ <td id="projectalign" style="padding-left: 0.5em;">
+ <div id="projectname">HomeScreenBinding
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.13 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
+</script>
+<script type="text/javascript" src="../../menudata.js"></script>
+<script type="text/javascript" src="../../menu.js"></script>
+<script type="text/javascript">
+$(function() {
+ initMenu('../../',true,false,'search.php','Search');
+ $(document).ready(function() { init_search(); });
+});
+</script>
+<div id="main-nav"></div>
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+ onmouseover="return searchBox.OnSearchSelectShow()"
+ onmouseout="return searchBox.OnSearchSelectHide()"
+ onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0"
+ name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div id="nav-path" class="navpath">
+ <ul>
+<li class="navelem"><a class="el" href="../../dir_65f76d62445e9e84c0450b12bf77c3bc.html">libhomescreen</a></li> </ul>
+</div>
+</div><!-- top -->
+<div class="header">
+ <div class="headertitle">
+<div class="title">libhomescreen.cpp</div> </div>
+</div><!--header-->
+<div class="contents">
+<a href="../../d0/d8a/libhomescreen_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment"> * Copyright (c) 2017 TOYOTA MOTOR CORPORATION</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment"> * Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment"> * you may not use this file except in compliance with the License.</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment"> * You may obtain a copy of the License at</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment"> * Unless required by applicable law or agreed to in writing, software</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment"> * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment"> * See the License for the specific language governing permissions and</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment"> * limitations under the License.</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;</div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="preprocessor">#include &lt;stdarg.h&gt;</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="preprocessor">#include &lt;sys/socket.h&gt;</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="preprocessor">#include &lt;iostream&gt;</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="preprocessor">#include &lt;algorithm&gt;</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="preprocessor">#include &lt;thread&gt;</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="preprocessor">#include &lt;errno.h&gt;</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="preprocessor">#include &lt;cassert&gt;</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;<span class="preprocessor">#include &lt;cctype&gt;</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="preprocessor">#include &lt;cerrno&gt;</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="preprocessor">#include &lt;cstdio&gt;</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="preprocessor">#include &lt;cstdlib&gt;</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;<span class="preprocessor">#include &lt;cstring&gt;</span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;</div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="../../df/d43/libhomescreen_8hpp.html">libhomescreen.hpp</a>&gt;</span></div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="../../df/d76/hmi-debug_8h.html">hmi-debug.h</a>&quot;</span></div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;</div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;<span class="keyword">using namespace </span><a class="code" href="../../d8/dcc/namespacestd.html">std</a>;</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;<span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="../../d0/d8a/libhomescreen_8cpp.html#a7a2176c3d71fec0f09dcb2aa0866b17e">has_verb</a>(<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; verb);</div><div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="../../d0/d8a/libhomescreen_8cpp.html#a1e2d6e77dd8f0162f830058579eab42f"> 36</a></span>&#160;<span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span> <a class="code" href="../../d0/d8a/libhomescreen_8cpp.html#a1e2d6e77dd8f0162f830058579eab42f">API</a>[] = <span class="stringliteral">&quot;homescreen&quot;</span>;</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160;</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160;<span class="keyword">const</span> std::vector&lt;std::string&gt; <a class="code" href="../../de/dd0/class_lib_home_screen.html#a5593ff5ac78f6495ccb649904cf0ab08">LibHomeScreen::api_list</a> {</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160; std::string(<span class="stringliteral">&quot;ping&quot;</span>), <span class="comment">// debug do not use</span></div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160; std::string(<span class="stringliteral">&quot;tap_shortcut&quot;</span>), <span class="comment">// HomeScreen Application only</span></div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160; std::string(<span class="stringliteral">&quot;on_screen_message&quot;</span>),</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160; std::string(<span class="stringliteral">&quot;on_screen_reply&quot;</span>),</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160; std::string(<span class="stringliteral">&quot;subscribe&quot;</span>),</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160; std::string(<span class="stringliteral">&quot;unsubscribe&quot;</span>)</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160;};</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160;</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160;<span class="keyword">const</span> std::vector&lt;std::string&gt; <a class="code" href="../../de/dd0/class_lib_home_screen.html#a6a6d8a4d33a006a08652e7377a4c29e9">LibHomeScreen::event_list</a> {</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160; std::string(<span class="stringliteral">&quot;tap_shortcut&quot;</span>),</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160; std::string(<span class="stringliteral">&quot;on_screen_message&quot;</span>),</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160; std::string(<span class="stringliteral">&quot;on_screen_reply&quot;</span>),</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160; std::string(<span class="stringliteral">&quot;none&quot;</span>)</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160;};</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160;</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160;</div><div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="../../d0/d8a/libhomescreen_8cpp.html#a73c05b96c151e5e46c28585ccb143c1c"> 59</a></span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="../../d0/d8a/libhomescreen_8cpp.html#a73c05b96c151e5e46c28585ccb143c1c">_on_hangup_static</a>(<span class="keywordtype">void</span> *closure, <span class="keyword">struct</span> afb_wsj1 *wsj)</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160;{</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; <span class="keyword">static_cast&lt;</span><a class="code" href="../../de/dd0/class_lib_home_screen.html">LibHomeScreen</a>*<span class="keyword">&gt;</span>(closure)-&gt;on_hangup(NULL,wsj);</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160;}</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160;</div><div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="../../d0/d8a/libhomescreen_8cpp.html#a782a05fde0f1c17e0c4c8f972a3f53c8"> 64</a></span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="../../d0/d8a/libhomescreen_8cpp.html#a782a05fde0f1c17e0c4c8f972a3f53c8">_on_call_static</a>(<span class="keywordtype">void</span> *closure, <span class="keyword">const</span> <span class="keywordtype">char</span> *api, <span class="keyword">const</span> <span class="keywordtype">char</span> *verb, <span class="keyword">struct</span> afb_wsj1_msg *msg)</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160;{</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160; <span class="comment">/* LibHomeScreen is not called from other process */</span></div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160;}</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160;</div><div class="line"><a name="l00069"></a><span class="lineno"><a class="line" href="../../d0/d8a/libhomescreen_8cpp.html#a3df86185aa9453726556da201d95a6f9"> 69</a></span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="../../d0/d8a/libhomescreen_8cpp.html#a3df86185aa9453726556da201d95a6f9">_on_event_static</a>(<span class="keywordtype">void</span>* closure, <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="../../df/d7d/structevent.html">event</a>, <span class="keyword">struct</span> afb_wsj1_msg *msg)</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160;{</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160; <span class="keyword">static_cast&lt;</span><a class="code" href="../../de/dd0/class_lib_home_screen.html">LibHomeScreen</a>*<span class="keyword">&gt;</span>(closure)-&gt;on_event(NULL,event,msg);</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160;}</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160;</div><div class="line"><a name="l00074"></a><span class="lineno"><a class="line" href="../../d0/d8a/libhomescreen_8cpp.html#a7778933bffa862c63fa0a1b8219faa8b"> 74</a></span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="../../d0/d8a/libhomescreen_8cpp.html#a7778933bffa862c63fa0a1b8219faa8b">_on_reply_static</a>(<span class="keywordtype">void</span> *closure, <span class="keyword">struct</span> afb_wsj1_msg *msg)</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160;{</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160; <span class="keyword">static_cast&lt;</span><a class="code" href="../../de/dd0/class_lib_home_screen.html">LibHomeScreen</a>*<span class="keyword">&gt;</span>(closure)-&gt;on_reply(NULL,msg);</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160;}</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160;</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160;</div><div class="line"><a name="l00083"></a><span class="lineno"><a class="line" href="../../de/dd0/class_lib_home_screen.html#a724bd949c4154fad041f96a15ef0f5dc"> 83</a></span>&#160;<a class="code" href="../../de/dd0/class_lib_home_screen.html#a724bd949c4154fad041f96a15ef0f5dc">LibHomeScreen::LibHomeScreen</a>()</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160;{</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160;}</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160;</div><div class="line"><a name="l00090"></a><span class="lineno"><a class="line" href="../../de/dd0/class_lib_home_screen.html#a249902aebf71a5383ca8ec6ae558d095"> 90</a></span>&#160;<a class="code" href="../../de/dd0/class_lib_home_screen.html#a249902aebf71a5383ca8ec6ae558d095">LibHomeScreen::~LibHomeScreen</a>()</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160;{</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160; <span class="keywordflow">if</span>(mploop)</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160; {</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160; sd_event_unref(mploop);</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160; }</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160; <span class="keywordflow">if</span>(sp_websock != NULL)</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160; {</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160; afb_wsj1_unref(sp_websock);</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160; }</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160;}</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160;</div><div class="line"><a name="l00116"></a><span class="lineno"><a class="line" href="../../de/dd0/class_lib_home_screen.html#a6a57b573cc767725762ba9beab032220"> 116</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="../../de/dd0/class_lib_home_screen.html#a6a57b573cc767725762ba9beab032220">LibHomeScreen::init</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> port, <span class="keyword">const</span> <span class="keywordtype">string</span>&amp; token)</div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160;{</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160; <span class="keywordtype">int</span> ret = 0;</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160; <span class="keywordflow">if</span>(port &gt; 0 &amp;&amp; token.size() &gt; 0)</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160; {</div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160; mport = port;</div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160; mtoken = token;</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160; }</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160; <span class="keywordflow">else</span></div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160; {</div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#a65bb6c7cfe38f8a724beab5059d36fb2">HMI_ERROR</a>(<span class="stringliteral">&quot;libhomescreen&quot;</span>,<span class="stringliteral">&quot;port and token should be &gt; 0, Initial port and token uses.&quot;</span>);</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160; }</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160;</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160; ret = initialize_websocket();</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160; <span class="keywordflow">if</span>(ret != 0 )</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160; {</div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#a65bb6c7cfe38f8a724beab5059d36fb2">HMI_ERROR</a>(<span class="stringliteral">&quot;libhomescreen&quot;</span>,<span class="stringliteral">&quot;Failed to initialize websocket&quot;</span>);</div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160; }</div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160; <span class="keywordflow">else</span>{</div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#a0d26d8b8201011dade787236519711c0">HMI_DEBUG</a>(<span class="stringliteral">&quot;libhomescreen&quot;</span>,<span class="stringliteral">&quot;Initialized&quot;</span>);</div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160; }</div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160;</div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160; <span class="keywordflow">return</span> ret;</div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160;}</div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160;</div><div class="line"><a name="l00155"></a><span class="lineno"><a class="line" href="../../de/dd0/class_lib_home_screen.html#a2789e8a5372202cc36f48e71dbb9b7cf"> 155</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../de/dd0/class_lib_home_screen.html#a2789e8a5372202cc36f48e71dbb9b7cf">LibHomeScreen::registerCallback</a>(</div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160; <span class="keywordtype">void</span> (*event_cb)(<span class="keyword">const</span> std::string&amp; <a class="code" href="../../df/d7d/structevent.html">event</a>, <span class="keyword">struct</span> json_object* event_contents),</div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160; <span class="keywordtype">void</span> (*reply_cb)(<span class="keyword">struct</span> json_object* reply_contents),</div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>&#160; <span class="keywordtype">void</span> (*hangup_cb)(<span class="keywordtype">void</span>))</div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160;{</div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160; onEvent = event_cb;</div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160; onReply = reply_cb;</div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span>&#160; onHangup = hangup_cb;</div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span>&#160;}</div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>&#160;</div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>&#160;<span class="keywordtype">int</span> LibHomeScreen::initialize_websocket()</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160;{</div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160; mploop = NULL;</div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span>&#160; onEvent = <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span>&#160; onReply = <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span>&#160; <span class="keywordtype">int</span> ret = sd_event_default(&amp;mploop);</div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span>&#160; <span class="keywordflow">if</span>(ret &lt; 0)</div><div class="line"><a name="l00172"></a><span class="lineno"> 172</span>&#160; {</div><div class="line"><a name="l00173"></a><span class="lineno"> 173</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#a65bb6c7cfe38f8a724beab5059d36fb2">HMI_ERROR</a>(<span class="stringliteral">&quot;libhomescreen&quot;</span>,<span class="stringliteral">&quot;Failed to create event loop&quot;</span>);</div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span>&#160; <span class="keywordflow">goto</span> END;</div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span>&#160; }</div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span>&#160;</div><div class="line"><a name="l00177"></a><span class="lineno"> 177</span>&#160; <span class="comment">/* Initialize interface from websocket */</span></div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span>&#160; minterface.on_hangup = <a class="code" href="../../d0/d8a/libhomescreen_8cpp.html#a73c05b96c151e5e46c28585ccb143c1c">_on_hangup_static</a>;</div><div class="line"><a name="l00179"></a><span class="lineno"> 179</span>&#160; minterface.on_call = <a class="code" href="../../d0/d8a/libhomescreen_8cpp.html#a782a05fde0f1c17e0c4c8f972a3f53c8">_on_call_static</a>; <span class="comment">/* Is this necessary? */</span></div><div class="line"><a name="l00180"></a><span class="lineno"> 180</span>&#160; minterface.on_event = <a class="code" href="../../d0/d8a/libhomescreen_8cpp.html#a3df86185aa9453726556da201d95a6f9">_on_event_static</a>;</div><div class="line"><a name="l00181"></a><span class="lineno"> 181</span>&#160; muri += <span class="stringliteral">&quot;ws://localhost:&quot;</span> + to_string(mport) + <span class="stringliteral">&quot;/api?token=&quot;</span> + mtoken; <span class="comment">/*To be modified*/</span></div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span>&#160; sp_websock = afb_ws_client_connect_wsj1(mploop, muri.c_str(), &amp;minterface, <span class="keyword">this</span>);</div><div class="line"><a name="l00183"></a><span class="lineno"> 183</span>&#160; <span class="keywordflow">if</span>(sp_websock == NULL)</div><div class="line"><a name="l00184"></a><span class="lineno"> 184</span>&#160; {</div><div class="line"><a name="l00185"></a><span class="lineno"> 185</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#a65bb6c7cfe38f8a724beab5059d36fb2">HMI_ERROR</a>(<span class="stringliteral">&quot;libhomescreen&quot;</span>,<span class="stringliteral">&quot;Failed to create websocket connection&quot;</span>);</div><div class="line"><a name="l00186"></a><span class="lineno"> 186</span>&#160; <span class="keywordflow">goto</span> END;</div><div class="line"><a name="l00187"></a><span class="lineno"> 187</span>&#160; }</div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span>&#160;</div><div class="line"><a name="l00189"></a><span class="lineno"> 189</span>&#160; <span class="comment">/* creates the evsrc */</span></div><div class="line"><a name="l00190"></a><span class="lineno"> 190</span>&#160; <span class="comment">//ret = sd_event_add_io(mploop,&amp;mevent_src, sp_websock-&gt;fd, EPOLLIN, event_callback, NULL);</span></div><div class="line"><a name="l00191"></a><span class="lineno"> 191</span>&#160;</div><div class="line"><a name="l00192"></a><span class="lineno"> 192</span>&#160; <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00193"></a><span class="lineno"> 193</span>&#160;END:</div><div class="line"><a name="l00194"></a><span class="lineno"> 194</span>&#160; <span class="keywordflow">if</span>(mploop)</div><div class="line"><a name="l00195"></a><span class="lineno"> 195</span>&#160; {</div><div class="line"><a name="l00196"></a><span class="lineno"> 196</span>&#160; sd_event_unref(mploop);</div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span>&#160; }</div><div class="line"><a name="l00198"></a><span class="lineno"> 198</span>&#160; <span class="keywordflow">return</span> -1;</div><div class="line"><a name="l00199"></a><span class="lineno"> 199</span>&#160;}</div><div class="line"><a name="l00200"></a><span class="lineno"> 200</span>&#160;</div><div class="line"><a name="l00201"></a><span class="lineno"><a class="line" href="../../d0/d8a/libhomescreen_8cpp.html#aa73353e1bf62c68b6b0aba7a1e4e275e"> 201</a></span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> *<a class="code" href="../../d0/d8a/libhomescreen_8cpp.html#aa73353e1bf62c68b6b0aba7a1e4e275e">event_loop_run</a>(<span class="keywordtype">void</span> *args)</div><div class="line"><a name="l00202"></a><span class="lineno"> 202</span>&#160;{</div><div class="line"><a name="l00203"></a><span class="lineno"> 203</span>&#160; <span class="keyword">struct </span>sd_event* loop = (<span class="keyword">struct </span>sd_event*)(args);</div><div class="line"><a name="l00204"></a><span class="lineno"> 204</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#a0d26d8b8201011dade787236519711c0">HMI_DEBUG</a>(<span class="stringliteral">&quot;libhomescreen&quot;</span>,<span class="stringliteral">&quot;start eventloop&quot;</span>);</div><div class="line"><a name="l00205"></a><span class="lineno"> 205</span>&#160; <span class="keywordflow">for</span>(;;)</div><div class="line"><a name="l00206"></a><span class="lineno"> 206</span>&#160; sd_event_run(loop, 30000000);</div><div class="line"><a name="l00207"></a><span class="lineno"> 207</span>&#160;}</div><div class="line"><a name="l00208"></a><span class="lineno"> 208</span>&#160;</div><div class="line"><a name="l00220"></a><span class="lineno"><a class="line" href="../../de/dd0/class_lib_home_screen.html#afb571c9577087b47065eb23e7fdbc903"> 220</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="../../de/dd0/class_lib_home_screen.html#afb571c9577087b47065eb23e7fdbc903">LibHomeScreen::tapShortcut</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* application_name)</div><div class="line"><a name="l00221"></a><span class="lineno"> 221</span>&#160;{</div><div class="line"><a name="l00222"></a><span class="lineno"> 222</span>&#160; <span class="keywordflow">if</span>(!sp_websock)</div><div class="line"><a name="l00223"></a><span class="lineno"> 223</span>&#160; {</div><div class="line"><a name="l00224"></a><span class="lineno"> 224</span>&#160; <span class="keywordflow">return</span> -1;</div><div class="line"><a name="l00225"></a><span class="lineno"> 225</span>&#160; }</div><div class="line"><a name="l00226"></a><span class="lineno"> 226</span>&#160;</div><div class="line"><a name="l00227"></a><span class="lineno"> 227</span>&#160; <span class="keyword">struct </span>json_object* j_obj = json_object_new_object();</div><div class="line"><a name="l00228"></a><span class="lineno"> 228</span>&#160; <span class="keyword">struct </span>json_object* val = json_object_new_string(application_name);</div><div class="line"><a name="l00229"></a><span class="lineno"> 229</span>&#160; json_object_object_add(j_obj, <span class="stringliteral">&quot;application_name&quot;</span>, val);</div><div class="line"><a name="l00230"></a><span class="lineno"> 230</span>&#160; <span class="keywordflow">return</span> this-&gt;call(<span class="stringliteral">&quot;tap_shortcut&quot;</span>, j_obj);</div><div class="line"><a name="l00231"></a><span class="lineno"> 231</span>&#160;}</div><div class="line"><a name="l00232"></a><span class="lineno"> 232</span>&#160;</div><div class="line"><a name="l00244"></a><span class="lineno"><a class="line" href="../../de/dd0/class_lib_home_screen.html#ac336482036a72b51a822725f1929523c"> 244</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="../../de/dd0/class_lib_home_screen.html#ac336482036a72b51a822725f1929523c">LibHomeScreen::onScreenMessage</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* display_message)</div><div class="line"><a name="l00245"></a><span class="lineno"> 245</span>&#160;{</div><div class="line"><a name="l00246"></a><span class="lineno"> 246</span>&#160; <span class="keywordflow">if</span>(!sp_websock)</div><div class="line"><a name="l00247"></a><span class="lineno"> 247</span>&#160; {</div><div class="line"><a name="l00248"></a><span class="lineno"> 248</span>&#160; <span class="keywordflow">return</span> -1;</div><div class="line"><a name="l00249"></a><span class="lineno"> 249</span>&#160; }</div><div class="line"><a name="l00250"></a><span class="lineno"> 250</span>&#160;</div><div class="line"><a name="l00251"></a><span class="lineno"> 251</span>&#160; <span class="keyword">struct </span>json_object* j_obj = json_object_new_object();</div><div class="line"><a name="l00252"></a><span class="lineno"> 252</span>&#160; <span class="keyword">struct </span>json_object* val = json_object_new_string(display_message);</div><div class="line"><a name="l00253"></a><span class="lineno"> 253</span>&#160; json_object_object_add(j_obj, <span class="stringliteral">&quot;display_message&quot;</span>, val);</div><div class="line"><a name="l00254"></a><span class="lineno"> 254</span>&#160; <span class="keywordflow">return</span> this-&gt;call(<span class="stringliteral">&quot;on_screen_message&quot;</span>, j_obj);</div><div class="line"><a name="l00255"></a><span class="lineno"> 255</span>&#160;}</div><div class="line"><a name="l00256"></a><span class="lineno"> 256</span>&#160;</div><div class="line"><a name="l00268"></a><span class="lineno"><a class="line" href="../../de/dd0/class_lib_home_screen.html#a6c065f41f2c5d1f58d2763bfb4da9c37"> 268</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="../../de/dd0/class_lib_home_screen.html#a6c065f41f2c5d1f58d2763bfb4da9c37">LibHomeScreen::onScreenReply</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* reply_message)</div><div class="line"><a name="l00269"></a><span class="lineno"> 269</span>&#160;{</div><div class="line"><a name="l00270"></a><span class="lineno"> 270</span>&#160; <span class="keywordflow">if</span>(!sp_websock)</div><div class="line"><a name="l00271"></a><span class="lineno"> 271</span>&#160; {</div><div class="line"><a name="l00272"></a><span class="lineno"> 272</span>&#160; <span class="keywordflow">return</span> -1;</div><div class="line"><a name="l00273"></a><span class="lineno"> 273</span>&#160; }</div><div class="line"><a name="l00274"></a><span class="lineno"> 274</span>&#160;</div><div class="line"><a name="l00275"></a><span class="lineno"> 275</span>&#160; <span class="keyword">struct </span>json_object* j_obj = json_object_new_object();</div><div class="line"><a name="l00276"></a><span class="lineno"> 276</span>&#160; <span class="keyword">struct </span>json_object* val = json_object_new_string(reply_message);</div><div class="line"><a name="l00277"></a><span class="lineno"> 277</span>&#160; json_object_object_add(j_obj, <span class="stringliteral">&quot;reply_message&quot;</span>, val);</div><div class="line"><a name="l00278"></a><span class="lineno"> 278</span>&#160; <span class="keywordflow">return</span> this-&gt;call(<span class="stringliteral">&quot;on_screen_reply&quot;</span>, j_obj);</div><div class="line"><a name="l00279"></a><span class="lineno"> 279</span>&#160;}</div><div class="line"><a name="l00280"></a><span class="lineno"> 280</span>&#160;</div><div class="line"><a name="l00293"></a><span class="lineno"><a class="line" href="../../de/dd0/class_lib_home_screen.html#ab1b0e08bf35415de9064afed899e9f85"> 293</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../de/dd0/class_lib_home_screen.html#ab1b0e08bf35415de9064afed899e9f85">LibHomeScreen::set_event_handler</a>(<span class="keyword">enum</span> <a class="code" href="../../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154">EventType</a> et, <a class="code" href="../../de/dd0/class_lib_home_screen.html#a334f11f81c84c98d18284215dcaada3a">handler_func</a> f)</div><div class="line"><a name="l00294"></a><span class="lineno"> 294</span>&#160;{</div><div class="line"><a name="l00295"></a><span class="lineno"> 295</span>&#160; <span class="keywordflow">if</span> (et &gt;= 1 &amp;&amp; et &lt;= 3) {</div><div class="line"><a name="l00296"></a><span class="lineno"> 296</span>&#160; <span class="keywordflow">switch</span> (et) {</div><div class="line"><a name="l00297"></a><span class="lineno"> 297</span>&#160; <span class="keywordflow">case</span> Event_TapShortcut:</div><div class="line"><a name="l00298"></a><span class="lineno"> 298</span>&#160; this-&gt;<a class="code" href="../../d0/d1e/homescreen_8c.html#a4ff0c8b506669e5622a6ee168134d8f1">subscribe</a>(<a class="code" href="../../de/dd0/class_lib_home_screen.html#a6a6d8a4d33a006a08652e7377a4c29e9">LibHomeScreen::event_list</a>[0]);</div><div class="line"><a name="l00299"></a><span class="lineno"> 299</span>&#160; <span class="keywordflow">break</span>;</div><div class="line"><a name="l00300"></a><span class="lineno"> 300</span>&#160; <span class="keywordflow">case</span> Event_OnScreenMessage:</div><div class="line"><a name="l00301"></a><span class="lineno"> 301</span>&#160; this-&gt;<a class="code" href="../../d0/d1e/homescreen_8c.html#a4ff0c8b506669e5622a6ee168134d8f1">subscribe</a>(<a class="code" href="../../de/dd0/class_lib_home_screen.html#a6a6d8a4d33a006a08652e7377a4c29e9">LibHomeScreen::event_list</a>[1]);</div><div class="line"><a name="l00302"></a><span class="lineno"> 302</span>&#160; <span class="keywordflow">break</span>;</div><div class="line"><a name="l00303"></a><span class="lineno"> 303</span>&#160; <span class="keywordflow">case</span> Event_OnScreenReply:</div><div class="line"><a name="l00304"></a><span class="lineno"> 304</span>&#160; this-&gt;<a class="code" href="../../d0/d1e/homescreen_8c.html#a4ff0c8b506669e5622a6ee168134d8f1">subscribe</a>(<a class="code" href="../../de/dd0/class_lib_home_screen.html#a6a6d8a4d33a006a08652e7377a4c29e9">LibHomeScreen::event_list</a>[2]);</div><div class="line"><a name="l00305"></a><span class="lineno"> 305</span>&#160; <span class="keywordflow">break</span>;</div><div class="line"><a name="l00306"></a><span class="lineno"> 306</span>&#160; }</div><div class="line"><a name="l00307"></a><span class="lineno"> 307</span>&#160;</div><div class="line"><a name="l00308"></a><span class="lineno"> 308</span>&#160; this-&gt;handlers[et] = std::move(f);</div><div class="line"><a name="l00309"></a><span class="lineno"> 309</span>&#160; }</div><div class="line"><a name="l00310"></a><span class="lineno"> 310</span>&#160;}</div><div class="line"><a name="l00311"></a><span class="lineno"> 311</span>&#160;</div><div class="line"><a name="l00326"></a><span class="lineno"> 326</span>&#160;<span class="keywordtype">int</span> <a class="code" href="../../de/dd0/class_lib_home_screen.html#a527b49dcfe581be6275d0eb2236ba37f">LibHomeScreen::call</a>(<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; verb, <span class="keyword">struct</span> json_object* arg)</div><div class="line"><a name="l00327"></a><span class="lineno"> 327</span>&#160;{</div><div class="line"><a name="l00328"></a><span class="lineno"> 328</span>&#160; <span class="keywordtype">int</span> ret;</div><div class="line"><a name="l00329"></a><span class="lineno"> 329</span>&#160; <span class="keywordflow">if</span>(!sp_websock)</div><div class="line"><a name="l00330"></a><span class="lineno"> 330</span>&#160; {</div><div class="line"><a name="l00331"></a><span class="lineno"> 331</span>&#160; <span class="keywordflow">return</span> -1;</div><div class="line"><a name="l00332"></a><span class="lineno"> 332</span>&#160; }</div><div class="line"><a name="l00333"></a><span class="lineno"> 333</span>&#160; <span class="keywordflow">if</span> (!<a class="code" href="../../d0/d8a/libhomescreen_8cpp.html#a7a2176c3d71fec0f09dcb2aa0866b17e">has_verb</a>(verb))</div><div class="line"><a name="l00334"></a><span class="lineno"> 334</span>&#160; {</div><div class="line"><a name="l00335"></a><span class="lineno"> 335</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#a65bb6c7cfe38f8a724beab5059d36fb2">HMI_ERROR</a>(<span class="stringliteral">&quot;libhomescreen&quot;</span>,<span class="stringliteral">&quot;verb doesn&#39;t exit&quot;</span>);</div><div class="line"><a name="l00336"></a><span class="lineno"> 336</span>&#160; <span class="keywordflow">return</span> -1;</div><div class="line"><a name="l00337"></a><span class="lineno"> 337</span>&#160; }</div><div class="line"><a name="l00338"></a><span class="lineno"> 338</span>&#160; ret = afb_wsj1_call_j(sp_websock, <a class="code" href="../../d0/d8a/libhomescreen_8cpp.html#a1e2d6e77dd8f0162f830058579eab42f">API</a>, verb.c_str(), arg, <a class="code" href="../../d0/d8a/libhomescreen_8cpp.html#a7778933bffa862c63fa0a1b8219faa8b">_on_reply_static</a>, <span class="keyword">this</span>);</div><div class="line"><a name="l00339"></a><span class="lineno"> 339</span>&#160; <span class="keywordflow">if</span> (ret &lt; 0) {</div><div class="line"><a name="l00340"></a><span class="lineno"> 340</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#a65bb6c7cfe38f8a724beab5059d36fb2">HMI_ERROR</a>(<span class="stringliteral">&quot;libhomescreen&quot;</span>,<span class="stringliteral">&quot;Failed to call verb:%s&quot;</span>,verb.c_str());</div><div class="line"><a name="l00341"></a><span class="lineno"> 341</span>&#160; }</div><div class="line"><a name="l00342"></a><span class="lineno"> 342</span>&#160; <span class="keywordflow">return</span> ret;</div><div class="line"><a name="l00343"></a><span class="lineno"> 343</span>&#160;}</div><div class="line"><a name="l00344"></a><span class="lineno"> 344</span>&#160;</div><div class="line"><a name="l00360"></a><span class="lineno"><a class="line" href="../../de/dd0/class_lib_home_screen.html#ab5e8e8ab7d53e0f114e9e907fcbb7643"> 360</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="../../de/dd0/class_lib_home_screen.html#a527b49dcfe581be6275d0eb2236ba37f">LibHomeScreen::call</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* verb, <span class="keyword">struct</span> json_object* arg)</div><div class="line"><a name="l00361"></a><span class="lineno"> 361</span>&#160;{</div><div class="line"><a name="l00362"></a><span class="lineno"> 362</span>&#160; <span class="keywordtype">int</span> ret;</div><div class="line"><a name="l00363"></a><span class="lineno"> 363</span>&#160; <span class="keywordflow">if</span>(!sp_websock)</div><div class="line"><a name="l00364"></a><span class="lineno"> 364</span>&#160; {</div><div class="line"><a name="l00365"></a><span class="lineno"> 365</span>&#160; <span class="keywordflow">return</span> -1;</div><div class="line"><a name="l00366"></a><span class="lineno"> 366</span>&#160; }</div><div class="line"><a name="l00367"></a><span class="lineno"> 367</span>&#160; <span class="keywordflow">if</span> (!<a class="code" href="../../d0/d8a/libhomescreen_8cpp.html#a7a2176c3d71fec0f09dcb2aa0866b17e">has_verb</a>(<span class="keywordtype">string</span>(verb)))</div><div class="line"><a name="l00368"></a><span class="lineno"> 368</span>&#160; {</div><div class="line"><a name="l00369"></a><span class="lineno"> 369</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#a65bb6c7cfe38f8a724beab5059d36fb2">HMI_ERROR</a>(<span class="stringliteral">&quot;libhomescreen&quot;</span>,<span class="stringliteral">&quot;verb doesn&#39;t exit&quot;</span>);</div><div class="line"><a name="l00370"></a><span class="lineno"> 370</span>&#160; <span class="keywordflow">return</span> -1;</div><div class="line"><a name="l00371"></a><span class="lineno"> 371</span>&#160; }</div><div class="line"><a name="l00372"></a><span class="lineno"> 372</span>&#160; ret = afb_wsj1_call_j(sp_websock, <a class="code" href="../../d0/d8a/libhomescreen_8cpp.html#a1e2d6e77dd8f0162f830058579eab42f">API</a>, verb, arg, <a class="code" href="../../d0/d8a/libhomescreen_8cpp.html#a7778933bffa862c63fa0a1b8219faa8b">_on_reply_static</a>, <span class="keyword">this</span>);</div><div class="line"><a name="l00373"></a><span class="lineno"> 373</span>&#160; <span class="keywordflow">if</span> (ret &lt; 0) {</div><div class="line"><a name="l00374"></a><span class="lineno"> 374</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#a65bb6c7cfe38f8a724beab5059d36fb2">HMI_ERROR</a>(<span class="stringliteral">&quot;libhomescreen&quot;</span>,<span class="stringliteral">&quot;Failed to call verb:%s&quot;</span>,verb);</div><div class="line"><a name="l00375"></a><span class="lineno"> 375</span>&#160; }</div><div class="line"><a name="l00376"></a><span class="lineno"> 376</span>&#160; <span class="keywordflow">return</span> ret;</div><div class="line"><a name="l00377"></a><span class="lineno"> 377</span>&#160;}</div><div class="line"><a name="l00378"></a><span class="lineno"> 378</span>&#160;</div><div class="line"><a name="l00392"></a><span class="lineno"><a class="line" href="../../de/dd0/class_lib_home_screen.html#aa4c189807b75d070f567967f0d690738"> 392</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="../../de/dd0/class_lib_home_screen.html#aa4c189807b75d070f567967f0d690738">LibHomeScreen::subscribe</a>(<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; event_name)</div><div class="line"><a name="l00393"></a><span class="lineno"> 393</span>&#160;{</div><div class="line"><a name="l00394"></a><span class="lineno"> 394</span>&#160; <span class="keywordflow">if</span>(!sp_websock)</div><div class="line"><a name="l00395"></a><span class="lineno"> 395</span>&#160; {</div><div class="line"><a name="l00396"></a><span class="lineno"> 396</span>&#160; <span class="keywordflow">return</span> -1;</div><div class="line"><a name="l00397"></a><span class="lineno"> 397</span>&#160; }</div><div class="line"><a name="l00398"></a><span class="lineno"> 398</span>&#160; <span class="keyword">struct </span>json_object* j_obj = json_object_new_object();</div><div class="line"><a name="l00399"></a><span class="lineno"> 399</span>&#160; json_object_object_add(j_obj, <span class="stringliteral">&quot;event&quot;</span>, json_object_new_string(event_name.c_str()));</div><div class="line"><a name="l00400"></a><span class="lineno"> 400</span>&#160;</div><div class="line"><a name="l00401"></a><span class="lineno"> 401</span>&#160; <span class="keywordtype">int</span> ret = afb_wsj1_call_j(sp_websock, <a class="code" href="../../d0/d8a/libhomescreen_8cpp.html#a1e2d6e77dd8f0162f830058579eab42f">API</a>, <span class="stringliteral">&quot;subscribe&quot;</span>, j_obj, <a class="code" href="../../d0/d8a/libhomescreen_8cpp.html#a7778933bffa862c63fa0a1b8219faa8b">_on_reply_static</a>, <span class="keyword">this</span>);</div><div class="line"><a name="l00402"></a><span class="lineno"> 402</span>&#160; <span class="keywordflow">if</span> (ret &lt; 0) {</div><div class="line"><a name="l00403"></a><span class="lineno"> 403</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#a65bb6c7cfe38f8a724beab5059d36fb2">HMI_ERROR</a>(<span class="stringliteral">&quot;libhomescreen&quot;</span>,<span class="stringliteral">&quot;Failed to call verb:%s&quot;</span>,__FUNCTION__);</div><div class="line"><a name="l00404"></a><span class="lineno"> 404</span>&#160; }</div><div class="line"><a name="l00405"></a><span class="lineno"> 405</span>&#160; <span class="keywordflow">return</span> ret;</div><div class="line"><a name="l00406"></a><span class="lineno"> 406</span>&#160;}</div><div class="line"><a name="l00407"></a><span class="lineno"> 407</span>&#160;</div><div class="line"><a name="l00421"></a><span class="lineno"><a class="line" href="../../de/dd0/class_lib_home_screen.html#aac03a45cbd453ba69ddb00c1016930a6"> 421</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="../../de/dd0/class_lib_home_screen.html#aac03a45cbd453ba69ddb00c1016930a6">LibHomeScreen::unsubscribe</a>(<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; event_name)</div><div class="line"><a name="l00422"></a><span class="lineno"> 422</span>&#160;{</div><div class="line"><a name="l00423"></a><span class="lineno"> 423</span>&#160; <span class="keywordflow">if</span>(!sp_websock)</div><div class="line"><a name="l00424"></a><span class="lineno"> 424</span>&#160; {</div><div class="line"><a name="l00425"></a><span class="lineno"> 425</span>&#160; <span class="keywordflow">return</span> -1;</div><div class="line"><a name="l00426"></a><span class="lineno"> 426</span>&#160; }</div><div class="line"><a name="l00427"></a><span class="lineno"> 427</span>&#160; <span class="keyword">struct </span>json_object* j_obj = json_object_new_object();</div><div class="line"><a name="l00428"></a><span class="lineno"> 428</span>&#160; json_object_object_add(j_obj, <span class="stringliteral">&quot;event&quot;</span>, json_object_new_string(event_name.c_str()));</div><div class="line"><a name="l00429"></a><span class="lineno"> 429</span>&#160;</div><div class="line"><a name="l00430"></a><span class="lineno"> 430</span>&#160; <span class="keywordtype">int</span> ret = afb_wsj1_call_j(sp_websock, <a class="code" href="../../d0/d8a/libhomescreen_8cpp.html#a1e2d6e77dd8f0162f830058579eab42f">API</a>, <span class="stringliteral">&quot;unsubscribe&quot;</span>, j_obj, <a class="code" href="../../d0/d8a/libhomescreen_8cpp.html#a7778933bffa862c63fa0a1b8219faa8b">_on_reply_static</a>, <span class="keyword">this</span>);</div><div class="line"><a name="l00431"></a><span class="lineno"> 431</span>&#160; <span class="keywordflow">if</span> (ret &lt; 0) {</div><div class="line"><a name="l00432"></a><span class="lineno"> 432</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#a65bb6c7cfe38f8a724beab5059d36fb2">HMI_ERROR</a>(<span class="stringliteral">&quot;libhomescreen&quot;</span>,<span class="stringliteral">&quot;Failed to call verb:%s&quot;</span>,__FUNCTION__);</div><div class="line"><a name="l00433"></a><span class="lineno"> 433</span>&#160; }</div><div class="line"><a name="l00434"></a><span class="lineno"> 434</span>&#160; <span class="keywordflow">return</span> ret;</div><div class="line"><a name="l00435"></a><span class="lineno"> 435</span>&#160;}</div><div class="line"><a name="l00436"></a><span class="lineno"> 436</span>&#160;</div><div class="line"><a name="l00437"></a><span class="lineno"> 437</span>&#160;<span class="comment">/************* Callback Function *************/</span></div><div class="line"><a name="l00438"></a><span class="lineno"> 438</span>&#160;</div><div class="line"><a name="l00439"></a><span class="lineno"><a class="line" href="../../de/dd0/class_lib_home_screen.html#ab1c1fa69f24b981e824dd9fb810c4b74"> 439</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../de/dd0/class_lib_home_screen.html#ab1c1fa69f24b981e824dd9fb810c4b74">LibHomeScreen::on_hangup</a>(<span class="keywordtype">void</span> *closure, <span class="keyword">struct</span> afb_wsj1 *wsj)</div><div class="line"><a name="l00440"></a><span class="lineno"> 440</span>&#160;{</div><div class="line"><a name="l00441"></a><span class="lineno"> 441</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#a0d26d8b8201011dade787236519711c0">HMI_DEBUG</a>(<span class="stringliteral">&quot;libhomescreen&quot;</span>,<span class="stringliteral">&quot;%s called&quot;</span>, __FUNCTION__);</div><div class="line"><a name="l00442"></a><span class="lineno"> 442</span>&#160; <span class="keywordflow">if</span>(onHangup != <span class="keyword">nullptr</span>)</div><div class="line"><a name="l00443"></a><span class="lineno"> 443</span>&#160; {</div><div class="line"><a name="l00444"></a><span class="lineno"> 444</span>&#160; onHangup();</div><div class="line"><a name="l00445"></a><span class="lineno"> 445</span>&#160; }</div><div class="line"><a name="l00446"></a><span class="lineno"> 446</span>&#160;}</div><div class="line"><a name="l00447"></a><span class="lineno"> 447</span>&#160;</div><div class="line"><a name="l00448"></a><span class="lineno"><a class="line" href="../../de/dd0/class_lib_home_screen.html#a608638eb87b2772a3dcc92d8ca8f3596"> 448</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../de/dd0/class_lib_home_screen.html#a608638eb87b2772a3dcc92d8ca8f3596">LibHomeScreen::on_call</a>(<span class="keywordtype">void</span> *closure, <span class="keyword">const</span> <span class="keywordtype">char</span> *api, <span class="keyword">const</span> <span class="keywordtype">char</span> *verb, <span class="keyword">struct</span> afb_wsj1_msg *msg)</div><div class="line"><a name="l00449"></a><span class="lineno"> 449</span>&#160;{</div><div class="line"><a name="l00450"></a><span class="lineno"> 450</span>&#160;}</div><div class="line"><a name="l00451"></a><span class="lineno"> 451</span>&#160;</div><div class="line"><a name="l00452"></a><span class="lineno"> 452</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00453"></a><span class="lineno"> 453</span>&#160;<span class="comment">* event is like &quot;homescreen/tap_shortcut&quot;</span></div><div class="line"><a name="l00454"></a><span class="lineno"> 454</span>&#160;<span class="comment">* msg is like {&quot;event&quot;:&quot;homescreen\/tap_shortcut&quot;,&quot;data&quot;:{&quot;application_name&quot;:&quot;hoge&quot;},&quot;jtype&quot;:&quot;afb-event&quot;}</span></div><div class="line"><a name="l00455"></a><span class="lineno"> 455</span>&#160;<span class="comment">* so you can get</span></div><div class="line"><a name="l00456"></a><span class="lineno"> 456</span>&#160;<span class="comment"> event name : struct json_object obj = json_object_object_get(msg,&quot;event&quot;)</span></div><div class="line"><a name="l00457"></a><span class="lineno"> 457</span>&#160;<span class="comment">*/</span></div><div class="line"><a name="l00458"></a><span class="lineno"><a class="line" href="../../de/dd0/class_lib_home_screen.html#a9c4885b51b43ab24a548d49fb3ab2de3"> 458</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../de/dd0/class_lib_home_screen.html#a9c4885b51b43ab24a548d49fb3ab2de3">LibHomeScreen::on_event</a>(<span class="keywordtype">void</span> *closure, <span class="keyword">const</span> <span class="keywordtype">char</span> *event, <span class="keyword">struct</span> afb_wsj1_msg *msg)</div><div class="line"><a name="l00459"></a><span class="lineno"> 459</span>&#160;{</div><div class="line"><a name="l00460"></a><span class="lineno"> 460</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#a0d26d8b8201011dade787236519711c0">HMI_DEBUG</a>(<span class="stringliteral">&quot;libhomescreen&quot;</span>,<span class="stringliteral">&quot;event: (%s) msg: (%s).&quot;</span>, event, afb_wsj1_msg_object_s(msg));</div><div class="line"><a name="l00461"></a><span class="lineno"> 461</span>&#160;</div><div class="line"><a name="l00462"></a><span class="lineno"> 462</span>&#160; <span class="keywordflow">if</span> (strstr(event, <a class="code" href="../../d0/d8a/libhomescreen_8cpp.html#a1e2d6e77dd8f0162f830058579eab42f">API</a>) == NULL) {</div><div class="line"><a name="l00463"></a><span class="lineno"> 463</span>&#160; <span class="keywordflow">return</span>;</div><div class="line"><a name="l00464"></a><span class="lineno"> 464</span>&#160; }</div><div class="line"><a name="l00465"></a><span class="lineno"> 465</span>&#160;</div><div class="line"><a name="l00466"></a><span class="lineno"> 466</span>&#160; <span class="keyword">struct </span>json_object* ev_contents = afb_wsj1_msg_object_j(msg);</div><div class="line"><a name="l00467"></a><span class="lineno"> 467</span>&#160; <span class="keyword">struct </span>json_object *json_data = json_object_object_get(ev_contents, <span class="stringliteral">&quot;data&quot;</span>);</div><div class="line"><a name="l00468"></a><span class="lineno"> 468</span>&#160;</div><div class="line"><a name="l00469"></a><span class="lineno"> 469</span>&#160; <span class="keywordflow">if</span>(onEvent != <span class="keyword">nullptr</span>)</div><div class="line"><a name="l00470"></a><span class="lineno"> 470</span>&#160; {</div><div class="line"><a name="l00471"></a><span class="lineno"> 471</span>&#160; <span class="keyword">const</span> <span class="keywordtype">string</span> ev(event);</div><div class="line"><a name="l00472"></a><span class="lineno"> 472</span>&#160; onEvent(ev, ev_contents);</div><div class="line"><a name="l00473"></a><span class="lineno"> 473</span>&#160; }</div><div class="line"><a name="l00474"></a><span class="lineno"> 474</span>&#160;</div><div class="line"><a name="l00475"></a><span class="lineno"> 475</span>&#160; <span class="keyword">const</span> <span class="keywordtype">char</span>* event_only = strchr(event, <span class="charliteral">&#39;/&#39;</span>);</div><div class="line"><a name="l00476"></a><span class="lineno"> 476</span>&#160; <span class="keywordflow">if</span> (event_only != <span class="keyword">nullptr</span>) {</div><div class="line"><a name="l00477"></a><span class="lineno"> 477</span>&#160; event_only = event_only + 1;</div><div class="line"><a name="l00478"></a><span class="lineno"> 478</span>&#160; }</div><div class="line"><a name="l00479"></a><span class="lineno"> 479</span>&#160;</div><div class="line"><a name="l00480"></a><span class="lineno"> 480</span>&#160; <span class="keywordflow">if</span> (strcasecmp(event_only, <a class="code" href="../../de/dd0/class_lib_home_screen.html#a6a6d8a4d33a006a08652e7377a4c29e9">LibHomeScreen::event_list</a>[0].c_str()) == 0) {</div><div class="line"><a name="l00481"></a><span class="lineno"> 481</span>&#160; <span class="keyword">auto</span> i = this-&gt;handlers.find(Event_TapShortcut);</div><div class="line"><a name="l00482"></a><span class="lineno"> 482</span>&#160; <span class="keywordflow">if</span> ( i != this-&gt;handlers.end() ) {</div><div class="line"><a name="l00483"></a><span class="lineno"> 483</span>&#160; i-&gt;second(json_data);</div><div class="line"><a name="l00484"></a><span class="lineno"> 484</span>&#160; }</div><div class="line"><a name="l00485"></a><span class="lineno"> 485</span>&#160; }</div><div class="line"><a name="l00486"></a><span class="lineno"> 486</span>&#160; <span class="keywordflow">else</span> <span class="keywordflow">if</span> (strcasecmp(event_only, <a class="code" href="../../de/dd0/class_lib_home_screen.html#a6a6d8a4d33a006a08652e7377a4c29e9">LibHomeScreen::event_list</a>[1].c_str()) == 0) {</div><div class="line"><a name="l00487"></a><span class="lineno"> 487</span>&#160; <span class="keyword">auto</span> i = this-&gt;handlers.find(Event_OnScreenMessage);</div><div class="line"><a name="l00488"></a><span class="lineno"> 488</span>&#160; <span class="keywordflow">if</span> ( i != this-&gt;handlers.end() ) {</div><div class="line"><a name="l00489"></a><span class="lineno"> 489</span>&#160; i-&gt;second(json_data);</div><div class="line"><a name="l00490"></a><span class="lineno"> 490</span>&#160; }</div><div class="line"><a name="l00491"></a><span class="lineno"> 491</span>&#160; }</div><div class="line"><a name="l00492"></a><span class="lineno"> 492</span>&#160; <span class="keywordflow">else</span> <span class="keywordflow">if</span> (strcasecmp(event_only, <a class="code" href="../../de/dd0/class_lib_home_screen.html#a6a6d8a4d33a006a08652e7377a4c29e9">LibHomeScreen::event_list</a>[2].c_str()) == 0) {</div><div class="line"><a name="l00493"></a><span class="lineno"> 493</span>&#160; <span class="keyword">auto</span> i = this-&gt;handlers.find(Event_OnScreenReply);</div><div class="line"><a name="l00494"></a><span class="lineno"> 494</span>&#160; <span class="keywordflow">if</span> ( i != this-&gt;handlers.end() ) {</div><div class="line"><a name="l00495"></a><span class="lineno"> 495</span>&#160; i-&gt;second(json_data);</div><div class="line"><a name="l00496"></a><span class="lineno"> 496</span>&#160; }</div><div class="line"><a name="l00497"></a><span class="lineno"> 497</span>&#160; }</div><div class="line"><a name="l00498"></a><span class="lineno"> 498</span>&#160;</div><div class="line"><a name="l00499"></a><span class="lineno"> 499</span>&#160; json_object_put(ev_contents);</div><div class="line"><a name="l00500"></a><span class="lineno"> 500</span>&#160;}</div><div class="line"><a name="l00501"></a><span class="lineno"> 501</span>&#160;</div><div class="line"><a name="l00506"></a><span class="lineno"><a class="line" href="../../de/dd0/class_lib_home_screen.html#a248d9648c6186287a7632ec1c75fc9c5"> 506</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../de/dd0/class_lib_home_screen.html#a248d9648c6186287a7632ec1c75fc9c5">LibHomeScreen::on_reply</a>(<span class="keywordtype">void</span> *closure, <span class="keyword">struct</span> afb_wsj1_msg *msg)</div><div class="line"><a name="l00507"></a><span class="lineno"> 507</span>&#160;{</div><div class="line"><a name="l00508"></a><span class="lineno"> 508</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#a0d26d8b8201011dade787236519711c0">HMI_DEBUG</a>(<span class="stringliteral">&quot;libhomescreen&quot;</span>,<span class="stringliteral">&quot;msg: (%s)&quot;</span>, afb_wsj1_msg_object_s(msg));</div><div class="line"><a name="l00509"></a><span class="lineno"> 509</span>&#160; <span class="keywordflow">if</span>(onReply != <span class="keyword">nullptr</span>)</div><div class="line"><a name="l00510"></a><span class="lineno"> 510</span>&#160; {</div><div class="line"><a name="l00511"></a><span class="lineno"> 511</span>&#160; <span class="keyword">struct </span>json_object* reply = afb_wsj1_msg_object_j(msg);</div><div class="line"><a name="l00512"></a><span class="lineno"> 512</span>&#160; onReply(reply);</div><div class="line"><a name="l00513"></a><span class="lineno"> 513</span>&#160;</div><div class="line"><a name="l00514"></a><span class="lineno"> 514</span>&#160; json_object_put(reply);</div><div class="line"><a name="l00515"></a><span class="lineno"> 515</span>&#160; }</div><div class="line"><a name="l00516"></a><span class="lineno"> 516</span>&#160;}</div><div class="line"><a name="l00517"></a><span class="lineno"> 517</span>&#160;</div><div class="line"><a name="l00518"></a><span class="lineno"><a class="line" href="../../d0/d8a/libhomescreen_8cpp.html#a7a2176c3d71fec0f09dcb2aa0866b17e"> 518</a></span>&#160;<span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="../../d0/d8a/libhomescreen_8cpp.html#a7a2176c3d71fec0f09dcb2aa0866b17e">has_verb</a>(<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; verb)</div><div class="line"><a name="l00519"></a><span class="lineno"> 519</span>&#160;{</div><div class="line"><a name="l00520"></a><span class="lineno"> 520</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#a0d26d8b8201011dade787236519711c0">HMI_DEBUG</a>(<span class="stringliteral">&quot;libhomescreen&quot;</span>,<span class="stringliteral">&quot;verb is %s&quot;</span>, verb.c_str());</div><div class="line"><a name="l00521"></a><span class="lineno"> 521</span>&#160; <span class="keywordflow">if</span>(find(<a class="code" href="../../de/dd0/class_lib_home_screen.html#a5593ff5ac78f6495ccb649904cf0ab08">LibHomeScreen::api_list</a>.begin(), <a class="code" href="../../de/dd0/class_lib_home_screen.html#a5593ff5ac78f6495ccb649904cf0ab08">LibHomeScreen::api_list</a>.end(), verb) != <a class="code" href="../../de/dd0/class_lib_home_screen.html#a5593ff5ac78f6495ccb649904cf0ab08">LibHomeScreen::api_list</a>.end())</div><div class="line"><a name="l00522"></a><span class="lineno"> 522</span>&#160; <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l00523"></a><span class="lineno"> 523</span>&#160; <span class="keywordflow">else</span></div><div class="line"><a name="l00524"></a><span class="lineno"> 524</span>&#160; <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00525"></a><span class="lineno"> 525</span>&#160;}</div><div class="ttc" id="class_lib_home_screen_html_a9c4885b51b43ab24a548d49fb3ab2de3"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#a9c4885b51b43ab24a548d49fb3ab2de3">LibHomeScreen::on_event</a></div><div class="ttdeci">void on_event(void *closure, const char *event, struct afb_wsj1_msg *msg)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d8a/libhomescreen_8cpp_source.html#l00458">libhomescreen.cpp:458</a></div></div>
+<div class="ttc" id="hmi-debug_8h_html_a65bb6c7cfe38f8a724beab5059d36fb2"><div class="ttname"><a href="../../df/d76/hmi-debug_8h.html#a65bb6c7cfe38f8a724beab5059d36fb2">HMI_ERROR</a></div><div class="ttdeci">#define HMI_ERROR(prefix, args,...)</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d76/hmi-debug_8h_source.html#l00018">hmi-debug.h:18</a></div></div>
+<div class="ttc" id="libhomescreen_8cpp_html_a73c05b96c151e5e46c28585ccb143c1c"><div class="ttname"><a href="../../d0/d8a/libhomescreen_8cpp.html#a73c05b96c151e5e46c28585ccb143c1c">_on_hangup_static</a></div><div class="ttdeci">static void _on_hangup_static(void *closure, struct afb_wsj1 *wsj)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d8a/libhomescreen_8cpp_source.html#l00059">libhomescreen.cpp:59</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_a248d9648c6186287a7632ec1c75fc9c5"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#a248d9648c6186287a7632ec1c75fc9c5">LibHomeScreen::on_reply</a></div><div class="ttdeci">void on_reply(void *closure, struct afb_wsj1_msg *msg)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d8a/libhomescreen_8cpp_source.html#l00506">libhomescreen.cpp:506</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_a6c065f41f2c5d1f58d2763bfb4da9c37"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#a6c065f41f2c5d1f58d2763bfb4da9c37">LibHomeScreen::onScreenReply</a></div><div class="ttdeci">int onScreenReply(const char *reply_message)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d8a/libhomescreen_8cpp_source.html#l00268">libhomescreen.cpp:268</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_a334f11f81c84c98d18284215dcaada3a"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#a334f11f81c84c98d18284215dcaada3a">LibHomeScreen::handler_func</a></div><div class="ttdeci">std::function&lt; void(json_object *)&gt; handler_func</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d43/libhomescreen_8hpp_source.html#l00042">libhomescreen.hpp:42</a></div></div>
+<div class="ttc" id="hmi-debug_8h_html_a0d26d8b8201011dade787236519711c0"><div class="ttname"><a href="../../df/d76/hmi-debug_8h.html#a0d26d8b8201011dade787236519711c0">HMI_DEBUG</a></div><div class="ttdeci">#define HMI_DEBUG(prefix, args,...)</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d76/hmi-debug_8h_source.html#l00022">hmi-debug.h:22</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_a608638eb87b2772a3dcc92d8ca8f3596"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#a608638eb87b2772a3dcc92d8ca8f3596">LibHomeScreen::on_call</a></div><div class="ttdeci">void on_call(void *closure, const char *api, const char *verb, struct afb_wsj1_msg *msg)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d8a/libhomescreen_8cpp_source.html#l00448">libhomescreen.cpp:448</a></div></div>
+<div class="ttc" id="structevent_html"><div class="ttname"><a href="../../df/d7d/structevent.html">event</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00035">homescreen.c:35</a></div></div>
+<div class="ttc" id="namespacestd_html"><div class="ttname"><a href="../../d8/dcc/namespacestd.html">std</a></div></div>
+<div class="ttc" id="libhomescreen_8cpp_html_a782a05fde0f1c17e0c4c8f972a3f53c8"><div class="ttname"><a href="../../d0/d8a/libhomescreen_8cpp.html#a782a05fde0f1c17e0c4c8f972a3f53c8">_on_call_static</a></div><div class="ttdeci">static void _on_call_static(void *closure, const char *api, const char *verb, struct afb_wsj1_msg *msg)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d8a/libhomescreen_8cpp_source.html#l00064">libhomescreen.cpp:64</a></div></div>
+<div class="ttc" id="libhomescreen_8cpp_html_a1e2d6e77dd8f0162f830058579eab42f"><div class="ttname"><a href="../../d0/d8a/libhomescreen_8cpp.html#a1e2d6e77dd8f0162f830058579eab42f">API</a></div><div class="ttdeci">static const char API[]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d8a/libhomescreen_8cpp_source.html#l00036">libhomescreen.cpp:36</a></div></div>
+<div class="ttc" id="libhomescreen_8hpp_html"><div class="ttname"><a href="../../df/d43/libhomescreen_8hpp.html">libhomescreen.hpp</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_a527b49dcfe581be6275d0eb2236ba37f"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#a527b49dcfe581be6275d0eb2236ba37f">LibHomeScreen::call</a></div><div class="ttdeci">int call(const std::string &amp;verb, struct json_object *arg)</div></div>
+<div class="ttc" id="libhomescreen_8cpp_html_aa73353e1bf62c68b6b0aba7a1e4e275e"><div class="ttname"><a href="../../d0/d8a/libhomescreen_8cpp.html#aa73353e1bf62c68b6b0aba7a1e4e275e">event_loop_run</a></div><div class="ttdeci">static void * event_loop_run(void *args)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d8a/libhomescreen_8cpp_source.html#l00201">libhomescreen.cpp:201</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_ab1c1fa69f24b981e824dd9fb810c4b74"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#ab1c1fa69f24b981e824dd9fb810c4b74">LibHomeScreen::on_hangup</a></div><div class="ttdeci">void on_hangup(void *closure, struct afb_wsj1 *wsj)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d8a/libhomescreen_8cpp_source.html#l00439">libhomescreen.cpp:439</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_afb571c9577087b47065eb23e7fdbc903"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#afb571c9577087b47065eb23e7fdbc903">LibHomeScreen::tapShortcut</a></div><div class="ttdeci">int tapShortcut(const char *application_name)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d8a/libhomescreen_8cpp_source.html#l00220">libhomescreen.cpp:220</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_aa4c189807b75d070f567967f0d690738"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#aa4c189807b75d070f567967f0d690738">LibHomeScreen::subscribe</a></div><div class="ttdeci">int subscribe(const std::string &amp;event_name)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d8a/libhomescreen_8cpp_source.html#l00392">libhomescreen.cpp:392</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_a82616c91ac211d2ad08e709b524bf154"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154">LibHomeScreen::EventType</a></div><div class="ttdeci">EventType</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d43/libhomescreen_8hpp_source.html#l00044">libhomescreen.hpp:44</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_a724bd949c4154fad041f96a15ef0f5dc"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#a724bd949c4154fad041f96a15ef0f5dc">LibHomeScreen::LibHomeScreen</a></div><div class="ttdeci">LibHomeScreen()</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d8a/libhomescreen_8cpp_source.html#l00083">libhomescreen.cpp:83</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_a6a6d8a4d33a006a08652e7377a4c29e9"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#a6a6d8a4d33a006a08652e7377a4c29e9">LibHomeScreen::event_list</a></div><div class="ttdeci">static const std::vector&lt; std::string &gt; event_list</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d43/libhomescreen_8hpp_source.html#l00051">libhomescreen.hpp:51</a></div></div>
+<div class="ttc" id="homescreen_8c_html_a4ff0c8b506669e5622a6ee168134d8f1"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#a4ff0c8b506669e5622a6ee168134d8f1">subscribe</a></div><div class="ttdeci">static void subscribe(struct afb_req request)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00189">homescreen.c:189</a></div></div>
+<div class="ttc" id="hmi-debug_8h_html"><div class="ttname"><a href="../../df/d76/hmi-debug_8h.html">hmi-debug.h</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_a6a57b573cc767725762ba9beab032220"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#a6a57b573cc767725762ba9beab032220">LibHomeScreen::init</a></div><div class="ttdeci">int init(const int port, const std::string &amp;token)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d8a/libhomescreen_8cpp_source.html#l00116">libhomescreen.cpp:116</a></div></div>
+<div class="ttc" id="libhomescreen_8cpp_html_a7a2176c3d71fec0f09dcb2aa0866b17e"><div class="ttname"><a href="../../d0/d8a/libhomescreen_8cpp.html#a7a2176c3d71fec0f09dcb2aa0866b17e">has_verb</a></div><div class="ttdeci">static bool has_verb(const string &amp;verb)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d8a/libhomescreen_8cpp_source.html#l00518">libhomescreen.cpp:518</a></div></div>
+<div class="ttc" id="libhomescreen_8cpp_html_a3df86185aa9453726556da201d95a6f9"><div class="ttname"><a href="../../d0/d8a/libhomescreen_8cpp.html#a3df86185aa9453726556da201d95a6f9">_on_event_static</a></div><div class="ttdeci">static void _on_event_static(void *closure, const char *event, struct afb_wsj1_msg *msg)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d8a/libhomescreen_8cpp_source.html#l00069">libhomescreen.cpp:69</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_ac336482036a72b51a822725f1929523c"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#ac336482036a72b51a822725f1929523c">LibHomeScreen::onScreenMessage</a></div><div class="ttdeci">int onScreenMessage(const char *display_message)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d8a/libhomescreen_8cpp_source.html#l00244">libhomescreen.cpp:244</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html">LibHomeScreen</a></div><div class="ttdef"><b>Definition:</b> <a href="../../df/d43/libhomescreen_8hpp_source.html#l00032">libhomescreen.hpp:32</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_a249902aebf71a5383ca8ec6ae558d095"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#a249902aebf71a5383ca8ec6ae558d095">LibHomeScreen::~LibHomeScreen</a></div><div class="ttdeci">~LibHomeScreen()</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d8a/libhomescreen_8cpp_source.html#l00090">libhomescreen.cpp:90</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_a5593ff5ac78f6495ccb649904cf0ab08"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#a5593ff5ac78f6495ccb649904cf0ab08">LibHomeScreen::api_list</a></div><div class="ttdeci">static const std::vector&lt; std::string &gt; api_list</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d43/libhomescreen_8hpp_source.html#l00050">libhomescreen.hpp:50</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_aac03a45cbd453ba69ddb00c1016930a6"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#aac03a45cbd453ba69ddb00c1016930a6">LibHomeScreen::unsubscribe</a></div><div class="ttdeci">int unsubscribe(const std::string &amp;event_name)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d8a/libhomescreen_8cpp_source.html#l00421">libhomescreen.cpp:421</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_ab1b0e08bf35415de9064afed899e9f85"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#ab1b0e08bf35415de9064afed899e9f85">LibHomeScreen::set_event_handler</a></div><div class="ttdeci">void set_event_handler(enum EventType et, handler_func f)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d8a/libhomescreen_8cpp_source.html#l00293">libhomescreen.cpp:293</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_a2789e8a5372202cc36f48e71dbb9b7cf"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#a2789e8a5372202cc36f48e71dbb9b7cf">LibHomeScreen::registerCallback</a></div><div class="ttdeci">void registerCallback(void(*event_cb)(const std::string &amp;event, struct json_object *event_contents), void(*reply_cb)(struct json_object *reply_contents), void(*hangup_cb)(void)=nullptr)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d8a/libhomescreen_8cpp_source.html#l00155">libhomescreen.cpp:155</a></div></div>
+<div class="ttc" id="libhomescreen_8cpp_html_a7778933bffa862c63fa0a1b8219faa8b"><div class="ttname"><a href="../../d0/d8a/libhomescreen_8cpp.html#a7778933bffa862c63fa0a1b8219faa8b">_on_reply_static</a></div><div class="ttdeci">static void _on_reply_static(void *closure, struct afb_wsj1_msg *msg)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d8a/libhomescreen_8cpp_source.html#l00074">libhomescreen.cpp:74</a></div></div>
+</div><!-- fragment --></div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="../../doxygen.png" alt="doxygen"/>
+</a> 1.8.13
+</small></address>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/d3/d3d/hs-helper_8h.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/d3/d3d/hs-helper_8h.html
new file mode 100644
index 0000000..5ee78fe
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/d3/d3d/hs-helper_8h.html
@@ -0,0 +1,473 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>HomeScreenBinding: src/hs-helper.h File Reference</title>
+<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="../../jquery.js"></script>
+<script type="text/javascript" src="../../dynsections.js"></script>
+<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="../../search/searchdata.js"></script>
+<script type="text/javascript" src="../../search/search.js"></script>
+<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+ <td id="projectalign" style="padding-left: 0.5em;">
+ <div id="projectname">HomeScreenBinding
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.13 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
+</script>
+<script type="text/javascript" src="../../menudata.js"></script>
+<script type="text/javascript" src="../../menu.js"></script>
+<script type="text/javascript">
+$(function() {
+ initMenu('../../',true,false,'search.php','Search');
+ $(document).ready(function() { init_search(); });
+});
+</script>
+<div id="main-nav"></div>
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+ onmouseover="return searchBox.OnSearchSelectShow()"
+ onmouseout="return searchBox.OnSearchSelectHide()"
+ onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0"
+ name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div id="nav-path" class="navpath">
+ <ul>
+<li class="navelem"><a class="el" href="../../dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li> </ul>
+</div>
+</div><!-- top -->
+<div class="header">
+ <div class="summary">
+<a href="#define-members">Macros</a> &#124;
+<a href="#typedef-members">Typedefs</a> &#124;
+<a href="#enum-members">Enumerations</a> &#124;
+<a href="#func-members">Functions</a> &#124;
+<a href="#var-members">Variables</a> </div>
+ <div class="headertitle">
+<div class="title">hs-helper.h File Reference</div> </div>
+</div><!--header-->
+<div class="contents">
+<div class="textblock"><code>#include &lt;afb/afb-binding.h&gt;</code><br />
+<code>#include &lt;stdint.h&gt;</code><br />
+<code>#include &lt;glib.h&gt;</code><br />
+<code>#include &lt;errno.h&gt;</code><br />
+<code>#include &quot;<a class="el" href="../../df/d76/hmi-debug_8h_source.html">hmi-debug.h</a>&quot;</code><br />
+</div>
+<p><a href="../../d3/d3d/hs-helper_8h_source.html">Go to the source code of this file.</a></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
+Macros</h2></td></tr>
+<tr class="memitem:ad2c1fbc92ba364fcf83f15e6d0af66f0"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d3d/hs-helper_8h.html#ad2c1fbc92ba364fcf83f15e6d0af66f0">AFB_BINDING_VERSION</a>&#160;&#160;&#160;2</td></tr>
+<tr class="separator:ad2c1fbc92ba364fcf83f15e6d0af66f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table><table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
+Typedefs</h2></td></tr>
+<tr class="memitem:ab0d62ccfa9c3ab87f090f67c3d50adce"><td class="memItemLeft" align="right" valign="top">typedef enum <a class="el" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899">REQ_ERROR</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d3d/hs-helper_8h.html#ab0d62ccfa9c3ab87f090f67c3d50adce">REQ_ERROR</a></td></tr>
+<tr class="separator:ab0d62ccfa9c3ab87f090f67c3d50adce"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table><table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
+Enumerations</h2></td></tr>
+<tr class="memitem:aa49f1dbbf26f01627a5737cf43aad899"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899">REQ_ERROR</a> { <a class="el" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899a96a855966bc63045222b3dcac524cee1">REQ_FAIL</a> = -1,
+<a class="el" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899ab093abb14c097b3b7719debb04d5e8ee">REQ_OK</a> =0,
+<a class="el" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899aa223eed65c9bee2bf1f4cdecaf90d66a">NOT_NUMBER</a>,
+<a class="el" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899add1c84bf80c5f80741ee8f37fef1e12b">OUT_RANGE</a>
+ }</td></tr>
+<tr class="separator:aa49f1dbbf26f01627a5737cf43aad899"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table><table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
+Functions</h2></td></tr>
+<tr class="memitem:a649900645417f2df3a70b9ad67529f53"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899">REQ_ERROR</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d3d/hs-helper_8h.html#a649900645417f2df3a70b9ad67529f53">get_value_uint16</a> (const struct afb_req request, const char *source, uint16_t *out_id)</td></tr>
+<tr class="separator:a649900645417f2df3a70b9ad67529f53"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a2e62366684e39ea94436bf017e416827"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899">REQ_ERROR</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d3d/hs-helper_8h.html#a2e62366684e39ea94436bf017e416827">get_value_int16</a> (const struct afb_req request, const char *source, int16_t *out_id)</td></tr>
+<tr class="separator:a2e62366684e39ea94436bf017e416827"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ac5b0370643c520377afd3fd4891918d2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899">REQ_ERROR</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d3d/hs-helper_8h.html#ac5b0370643c520377afd3fd4891918d2">get_value_int32</a> (const struct afb_req request, const char *source, int32_t *out_id)</td></tr>
+<tr class="separator:ac5b0370643c520377afd3fd4891918d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a1ba31a6a94515ff1730ba0043a67d59e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d3d/hs-helper_8h.html#a1ba31a6a94515ff1730ba0043a67d59e">hs_add_object_to_json_object</a> (struct json_object *j_obj, int count,...)</td></tr>
+<tr class="separator:a1ba31a6a94515ff1730ba0043a67d59e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a8777c53f1d4d5412f19b134ad85ffedf"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d3d/hs-helper_8h.html#a8777c53f1d4d5412f19b134ad85ffedf">hs_add_object_to_json_object_str</a> (struct json_object *j_obj, int count,...)</td></tr>
+<tr class="separator:a8777c53f1d4d5412f19b134ad85ffedf"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ae83604a37134e7bdee3ce4f10bb0b47a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d3d/hs-helper_8h.html#ae83604a37134e7bdee3ce4f10bb0b47a">hs_add_object_to_json_object_func</a> (struct json_object *j_obj, const char *verb_name, int count,...)</td></tr>
+<tr class="separator:ae83604a37134e7bdee3ce4f10bb0b47a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a2ff1b894941c3b461ca8119079c4146a"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d3d/hs-helper_8h.html#a2ff1b894941c3b461ca8119079c4146a">hs_search_event_name_index</a> (const char *value)</td></tr>
+<tr class="separator:a2ff1b894941c3b461ca8119079c4146a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table><table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
+Variables</h2></td></tr>
+<tr class="memitem:a0cd84b1a2184c9b84d1b7bf24582f28e"><td class="memItemLeft" align="right" valign="top">static const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d3d/hs-helper_8h.html#a0cd84b1a2184c9b84d1b7bf24582f28e">evlist</a> []</td></tr>
+<tr class="separator:a0cd84b1a2184c9b84d1b7bf24582f28e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<h2 class="groupheader">Macro Definition Documentation</h2>
+<a id="ad2c1fbc92ba364fcf83f15e6d0af66f0"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ad2c1fbc92ba364fcf83f15e6d0af66f0">&#9670;&nbsp;</a></span>AFB_BINDING_VERSION</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define AFB_BINDING_VERSION&#160;&#160;&#160;2</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p class="definition">Definition at line <a class="el" href="../../d3/d3d/hs-helper_8h_source.html#l00019">19</a> of file <a class="el" href="../../d3/d3d/hs-helper_8h_source.html">hs-helper.h</a>.</p>
+
+</div>
+</div>
+<h2 class="groupheader">Typedef Documentation</h2>
+<a id="ab0d62ccfa9c3ab87f090f67c3d50adce"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ab0d62ccfa9c3ab87f090f67c3d50adce">&#9670;&nbsp;</a></span>REQ_ERROR</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">typedef enum <a class="el" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899">REQ_ERROR</a> <a class="el" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899">REQ_ERROR</a></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<h2 class="groupheader">Enumeration Type Documentation</h2>
+<a id="aa49f1dbbf26f01627a5737cf43aad899"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aa49f1dbbf26f01627a5737cf43aad899">&#9670;&nbsp;</a></span>REQ_ERROR</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">enum <a class="el" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899">REQ_ERROR</a></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<table class="fieldtable">
+<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="aa49f1dbbf26f01627a5737cf43aad899a96a855966bc63045222b3dcac524cee1"></a>REQ_FAIL&#160;</td><td class="fielddoc"></td></tr>
+<tr><td class="fieldname"><a id="aa49f1dbbf26f01627a5737cf43aad899ab093abb14c097b3b7719debb04d5e8ee"></a>REQ_OK&#160;</td><td class="fielddoc"></td></tr>
+<tr><td class="fieldname"><a id="aa49f1dbbf26f01627a5737cf43aad899aa223eed65c9bee2bf1f4cdecaf90d66a"></a>NOT_NUMBER&#160;</td><td class="fielddoc"></td></tr>
+<tr><td class="fieldname"><a id="aa49f1dbbf26f01627a5737cf43aad899add1c84bf80c5f80741ee8f37fef1e12b"></a>OUT_RANGE&#160;</td><td class="fielddoc"></td></tr>
+</table>
+
+<p class="definition">Definition at line <a class="el" href="../../d3/d3d/hs-helper_8h_source.html#l00026">26</a> of file <a class="el" href="../../d3/d3d/hs-helper_8h_source.html">hs-helper.h</a>.</p>
+<div class="fragment"><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;{</div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160; <a class="code" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899a96a855966bc63045222b3dcac524cee1">REQ_FAIL</a> = -1,</div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160; <a class="code" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899ab093abb14c097b3b7719debb04d5e8ee">REQ_OK</a>=0,</div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160; <a class="code" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899aa223eed65c9bee2bf1f4cdecaf90d66a">NOT_NUMBER</a>,</div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160; <a class="code" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899add1c84bf80c5f80741ee8f37fef1e12b">OUT_RANGE</a></div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;}<a class="code" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899">REQ_ERROR</a>;</div><div class="ttc" id="hs-helper_8h_html_aa49f1dbbf26f01627a5737cf43aad899a96a855966bc63045222b3dcac524cee1"><div class="ttname"><a href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899a96a855966bc63045222b3dcac524cee1">REQ_FAIL</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d3d/hs-helper_8h_source.html#l00028">hs-helper.h:28</a></div></div>
+<div class="ttc" id="hs-helper_8h_html_aa49f1dbbf26f01627a5737cf43aad899add1c84bf80c5f80741ee8f37fef1e12b"><div class="ttname"><a href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899add1c84bf80c5f80741ee8f37fef1e12b">OUT_RANGE</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d3d/hs-helper_8h_source.html#l00031">hs-helper.h:31</a></div></div>
+<div class="ttc" id="hs-helper_8h_html_aa49f1dbbf26f01627a5737cf43aad899aa223eed65c9bee2bf1f4cdecaf90d66a"><div class="ttname"><a href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899aa223eed65c9bee2bf1f4cdecaf90d66a">NOT_NUMBER</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d3d/hs-helper_8h_source.html#l00030">hs-helper.h:30</a></div></div>
+<div class="ttc" id="hs-helper_8h_html_aa49f1dbbf26f01627a5737cf43aad899ab093abb14c097b3b7719debb04d5e8ee"><div class="ttname"><a href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899ab093abb14c097b3b7719debb04d5e8ee">REQ_OK</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d3d/hs-helper_8h_source.html#l00029">hs-helper.h:29</a></div></div>
+<div class="ttc" id="hs-helper_8h_html_aa49f1dbbf26f01627a5737cf43aad899"><div class="ttname"><a href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899">REQ_ERROR</a></div><div class="ttdeci">REQ_ERROR</div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d3d/hs-helper_8h_source.html#l00026">hs-helper.h:26</a></div></div>
+</div><!-- fragment -->
+</div>
+</div>
+<h2 class="groupheader">Function Documentation</h2>
+<a id="a2e62366684e39ea94436bf017e416827"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a2e62366684e39ea94436bf017e416827">&#9670;&nbsp;</a></span>get_value_int16()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899">REQ_ERROR</a> get_value_int16 </td>
+ <td>(</td>
+ <td class="paramtype">const struct afb_req&#160;</td>
+ <td class="paramname"><em>request</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const char *&#160;</td>
+ <td class="paramname"><em>source</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">int16_t *&#160;</td>
+ <td class="paramname"><em>out_id</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p class="definition">Definition at line <a class="el" href="../../dd/d1d/hs-helper_8c_source.html#l00048">48</a> of file <a class="el" href="../../dd/d1d/hs-helper_8c_source.html">hs-helper.c</a>.</p>
+<div class="fragment"><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160;{</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160; <span class="keywordtype">char</span>* endptr;</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160; <span class="keyword">const</span> <span class="keywordtype">char</span>* tmp = afb_req_value (request, source);</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160; <span class="keywordflow">if</span>(!tmp)</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160; {</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160; <span class="keywordflow">return</span> <a class="code" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899a96a855966bc63045222b3dcac524cee1">REQ_FAIL</a>;</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160; }</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160; <span class="keywordtype">long</span> tmp_id = strtol(tmp,&amp;endptr,10);</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160;</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160; <span class="comment">/* error check of range */</span></div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160; <span class="keywordflow">if</span>( (tmp_id &gt; INT16_MAX) || (tmp_id &lt; INT16_MIN) )</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160; {</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; <span class="keywordflow">return</span> <a class="code" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899add1c84bf80c5f80741ee8f37fef1e12b">OUT_RANGE</a>;</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160; }</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160; <span class="keywordflow">if</span>(*endptr != <span class="charliteral">&#39;\0&#39;</span>)</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160; {</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160; <span class="keywordflow">return</span> <a class="code" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899aa223eed65c9bee2bf1f4cdecaf90d66a">NOT_NUMBER</a>;</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160; }</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160;</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160; *out_id = (int16_t)tmp_id;</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160; <span class="keywordflow">return</span> <a class="code" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899ab093abb14c097b3b7719debb04d5e8ee">REQ_OK</a>;</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160;}</div><div class="ttc" id="hs-helper_8h_html_aa49f1dbbf26f01627a5737cf43aad899a96a855966bc63045222b3dcac524cee1"><div class="ttname"><a href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899a96a855966bc63045222b3dcac524cee1">REQ_FAIL</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d3d/hs-helper_8h_source.html#l00028">hs-helper.h:28</a></div></div>
+<div class="ttc" id="hs-helper_8h_html_aa49f1dbbf26f01627a5737cf43aad899add1c84bf80c5f80741ee8f37fef1e12b"><div class="ttname"><a href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899add1c84bf80c5f80741ee8f37fef1e12b">OUT_RANGE</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d3d/hs-helper_8h_source.html#l00031">hs-helper.h:31</a></div></div>
+<div class="ttc" id="hs-helper_8h_html_aa49f1dbbf26f01627a5737cf43aad899aa223eed65c9bee2bf1f4cdecaf90d66a"><div class="ttname"><a href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899aa223eed65c9bee2bf1f4cdecaf90d66a">NOT_NUMBER</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d3d/hs-helper_8h_source.html#l00030">hs-helper.h:30</a></div></div>
+<div class="ttc" id="hs-helper_8h_html_aa49f1dbbf26f01627a5737cf43aad899ab093abb14c097b3b7719debb04d5e8ee"><div class="ttname"><a href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899ab093abb14c097b3b7719debb04d5e8ee">REQ_OK</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d3d/hs-helper_8h_source.html#l00029">hs-helper.h:29</a></div></div>
+</div><!-- fragment -->
+</div>
+</div>
+<a id="ac5b0370643c520377afd3fd4891918d2"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ac5b0370643c520377afd3fd4891918d2">&#9670;&nbsp;</a></span>get_value_int32()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899">REQ_ERROR</a> get_value_int32 </td>
+ <td>(</td>
+ <td class="paramtype">const struct afb_req&#160;</td>
+ <td class="paramname"><em>request</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const char *&#160;</td>
+ <td class="paramname"><em>source</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">int32_t *&#160;</td>
+ <td class="paramname"><em>out_id</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p class="definition">Definition at line <a class="el" href="../../dd/d1d/hs-helper_8c_source.html#l00072">72</a> of file <a class="el" href="../../dd/d1d/hs-helper_8c_source.html">hs-helper.c</a>.</p>
+<div class="fragment"><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160;{</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160; <span class="keywordtype">char</span>* endptr;</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160; <span class="keyword">const</span> <span class="keywordtype">char</span>* tmp = afb_req_value (request, source);</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160; <span class="keywordflow">if</span>(!tmp)</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160; {</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160; <span class="keywordflow">return</span> <a class="code" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899a96a855966bc63045222b3dcac524cee1">REQ_FAIL</a>;</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160; }</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160; <span class="keywordtype">long</span> tmp_id = strtol(tmp,&amp;endptr,10);</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160;</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; <span class="comment">/* error check of range */</span></div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; <span class="keywordflow">if</span>( (tmp_id &gt; INT32_MAX) || (tmp_id &lt; INT32_MIN) )</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160; {</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; <span class="keywordflow">return</span> <a class="code" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899add1c84bf80c5f80741ee8f37fef1e12b">OUT_RANGE</a>;</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; }</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; <span class="keywordflow">if</span>(*endptr != <span class="charliteral">&#39;\0&#39;</span>)</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; {</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160; <span class="keywordflow">return</span> <a class="code" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899aa223eed65c9bee2bf1f4cdecaf90d66a">NOT_NUMBER</a>;</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160; }</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160;</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160; *out_id = (int32_t)tmp_id;</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160; <span class="keywordflow">return</span> <a class="code" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899ab093abb14c097b3b7719debb04d5e8ee">REQ_OK</a>;</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160;}</div><div class="ttc" id="hs-helper_8h_html_aa49f1dbbf26f01627a5737cf43aad899a96a855966bc63045222b3dcac524cee1"><div class="ttname"><a href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899a96a855966bc63045222b3dcac524cee1">REQ_FAIL</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d3d/hs-helper_8h_source.html#l00028">hs-helper.h:28</a></div></div>
+<div class="ttc" id="hs-helper_8h_html_aa49f1dbbf26f01627a5737cf43aad899add1c84bf80c5f80741ee8f37fef1e12b"><div class="ttname"><a href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899add1c84bf80c5f80741ee8f37fef1e12b">OUT_RANGE</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d3d/hs-helper_8h_source.html#l00031">hs-helper.h:31</a></div></div>
+<div class="ttc" id="hs-helper_8h_html_aa49f1dbbf26f01627a5737cf43aad899aa223eed65c9bee2bf1f4cdecaf90d66a"><div class="ttname"><a href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899aa223eed65c9bee2bf1f4cdecaf90d66a">NOT_NUMBER</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d3d/hs-helper_8h_source.html#l00030">hs-helper.h:30</a></div></div>
+<div class="ttc" id="hs-helper_8h_html_aa49f1dbbf26f01627a5737cf43aad899ab093abb14c097b3b7719debb04d5e8ee"><div class="ttname"><a href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899ab093abb14c097b3b7719debb04d5e8ee">REQ_OK</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d3d/hs-helper_8h_source.html#l00029">hs-helper.h:29</a></div></div>
+</div><!-- fragment -->
+</div>
+</div>
+<a id="a649900645417f2df3a70b9ad67529f53"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a649900645417f2df3a70b9ad67529f53">&#9670;&nbsp;</a></span>get_value_uint16()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899">REQ_ERROR</a> get_value_uint16 </td>
+ <td>(</td>
+ <td class="paramtype">const struct afb_req&#160;</td>
+ <td class="paramname"><em>request</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const char *&#160;</td>
+ <td class="paramname"><em>source</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t *&#160;</td>
+ <td class="paramname"><em>out_id</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p class="definition">Definition at line <a class="el" href="../../dd/d1d/hs-helper_8c_source.html#l00024">24</a> of file <a class="el" href="../../dd/d1d/hs-helper_8c_source.html">hs-helper.c</a>.</p>
+<div class="fragment"><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;{</div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160; <span class="keywordtype">char</span>* endptr;</div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160; <span class="keyword">const</span> <span class="keywordtype">char</span>* tmp = afb_req_value (request, source);</div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160; <span class="keywordflow">if</span>(!tmp)</div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160; {</div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160; <span class="keywordflow">return</span> <a class="code" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899a96a855966bc63045222b3dcac524cee1">REQ_FAIL</a>;</div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160; }</div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160; <span class="keywordtype">long</span> tmp_id = strtol(tmp,&amp;endptr,10);</div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160; <span class="comment">/* error check of range */</span></div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160; <span class="keywordflow">if</span>( (tmp_id &gt; UINT16_MAX) || (tmp_id &lt; 0) )</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160; {</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160; <span class="keywordflow">return</span> <a class="code" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899add1c84bf80c5f80741ee8f37fef1e12b">OUT_RANGE</a>;</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160; }</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160; <span class="keywordflow">if</span>(*endptr != <span class="charliteral">&#39;\0&#39;</span>)</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160; {</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160; <span class="keywordflow">return</span> <a class="code" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899aa223eed65c9bee2bf1f4cdecaf90d66a">NOT_NUMBER</a>;</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160; }</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160;</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160; *out_id = (uint16_t)tmp_id;</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160; <span class="keywordflow">return</span> <a class="code" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899ab093abb14c097b3b7719debb04d5e8ee">REQ_OK</a>;</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160;}</div><div class="ttc" id="hs-helper_8h_html_aa49f1dbbf26f01627a5737cf43aad899a96a855966bc63045222b3dcac524cee1"><div class="ttname"><a href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899a96a855966bc63045222b3dcac524cee1">REQ_FAIL</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d3d/hs-helper_8h_source.html#l00028">hs-helper.h:28</a></div></div>
+<div class="ttc" id="hs-helper_8h_html_aa49f1dbbf26f01627a5737cf43aad899add1c84bf80c5f80741ee8f37fef1e12b"><div class="ttname"><a href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899add1c84bf80c5f80741ee8f37fef1e12b">OUT_RANGE</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d3d/hs-helper_8h_source.html#l00031">hs-helper.h:31</a></div></div>
+<div class="ttc" id="hs-helper_8h_html_aa49f1dbbf26f01627a5737cf43aad899aa223eed65c9bee2bf1f4cdecaf90d66a"><div class="ttname"><a href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899aa223eed65c9bee2bf1f4cdecaf90d66a">NOT_NUMBER</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d3d/hs-helper_8h_source.html#l00030">hs-helper.h:30</a></div></div>
+<div class="ttc" id="hs-helper_8h_html_aa49f1dbbf26f01627a5737cf43aad899ab093abb14c097b3b7719debb04d5e8ee"><div class="ttname"><a href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899ab093abb14c097b3b7719debb04d5e8ee">REQ_OK</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d3d/hs-helper_8h_source.html#l00029">hs-helper.h:29</a></div></div>
+</div><!-- fragment -->
+</div>
+</div>
+<a id="a1ba31a6a94515ff1730ba0043a67d59e"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a1ba31a6a94515ff1730ba0043a67d59e">&#9670;&nbsp;</a></span>hs_add_object_to_json_object()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void hs_add_object_to_json_object </td>
+ <td>(</td>
+ <td class="paramtype">struct json_object *&#160;</td>
+ <td class="paramname"><em>j_obj</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">int&#160;</td>
+ <td class="paramname"><em>count</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">&#160;</td>
+ <td class="paramname"><em>...</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p class="definition">Definition at line <a class="el" href="../../dd/d1d/hs-helper_8c_source.html#l00096">96</a> of file <a class="el" href="../../dd/d1d/hs-helper_8c_source.html">hs-helper.c</a>.</p>
+<div class="fragment"><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160;{</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160; va_list args;</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160; va_start(args, count);</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160; <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0; i &lt; count; ++i )</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160; {</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160; <span class="keywordtype">char</span> *key = va_arg(args, <span class="keywordtype">char</span>*);</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160; <span class="keywordtype">int</span> value = va_arg(args, <span class="keywordtype">int</span>);</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160; json_object_object_add(j_obj, key, json_object_new_int((int32_t)value));</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160; ++i;</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160; }</div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160; va_end(args);</div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160;}</div></div><!-- fragment -->
+</div>
+</div>
+<a id="ae83604a37134e7bdee3ce4f10bb0b47a"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ae83604a37134e7bdee3ce4f10bb0b47a">&#9670;&nbsp;</a></span>hs_add_object_to_json_object_func()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void hs_add_object_to_json_object_func </td>
+ <td>(</td>
+ <td class="paramtype">struct json_object *&#160;</td>
+ <td class="paramname"><em>j_obj</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const char *&#160;</td>
+ <td class="paramname"><em>verb_name</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">int&#160;</td>
+ <td class="paramname"><em>count</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">&#160;</td>
+ <td class="paramname"><em>...</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p class="definition">Definition at line <a class="el" href="../../dd/d1d/hs-helper_8c_source.html#l00125">125</a> of file <a class="el" href="../../dd/d1d/hs-helper_8c_source.html">hs-helper.c</a>.</p>
+<div class="fragment"><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160;{</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160; va_list args;</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160; va_start(args, count);</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160;</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160; json_object_object_add(j_obj,<span class="stringliteral">&quot;verb&quot;</span>, json_object_new_string(verb_name));</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160;</div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160; <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0; i &lt; count; ++i )</div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160; {</div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160; <span class="keywordtype">char</span> *key = va_arg(args, <span class="keywordtype">char</span>*);</div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160; <span class="keywordtype">int</span> value = va_arg(args, <span class="keywordtype">int</span>);</div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160; json_object_object_add(j_obj, key, json_object_new_int((int32_t)value));</div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160; ++i;</div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160; }</div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160; va_end(args);</div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160;}</div></div><!-- fragment -->
+</div>
+</div>
+<a id="a8777c53f1d4d5412f19b134ad85ffedf"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a8777c53f1d4d5412f19b134ad85ffedf">&#9670;&nbsp;</a></span>hs_add_object_to_json_object_str()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void hs_add_object_to_json_object_str </td>
+ <td>(</td>
+ <td class="paramtype">struct json_object *&#160;</td>
+ <td class="paramname"><em>j_obj</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">int&#160;</td>
+ <td class="paramname"><em>count</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">&#160;</td>
+ <td class="paramname"><em>...</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p class="definition">Definition at line <a class="el" href="../../dd/d1d/hs-helper_8c_source.html#l00110">110</a> of file <a class="el" href="../../dd/d1d/hs-helper_8c_source.html">hs-helper.c</a>.</p>
+<div class="fragment"><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160;{</div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160; va_list args;</div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160; va_start(args, count);</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160; <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0; i &lt; count; ++i )</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160; {</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160; <span class="keywordtype">char</span> *key = va_arg(args, <span class="keywordtype">char</span>*);</div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160; <span class="keywordtype">char</span> *value = va_arg(args, <span class="keywordtype">char</span>*);</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160; json_object_object_add(j_obj, key, json_object_new_string(value));</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160; ++i;</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160; }</div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160; va_end(args);</div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160;}</div></div><!-- fragment -->
+</div>
+</div>
+<a id="a2ff1b894941c3b461ca8119079c4146a"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a2ff1b894941c3b461ca8119079c4146a">&#9670;&nbsp;</a></span>hs_search_event_name_index()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">int hs_search_event_name_index </td>
+ <td>(</td>
+ <td class="paramtype">const char *&#160;</td>
+ <td class="paramname"><em>value</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p class="definition">Definition at line <a class="el" href="../../dd/d1d/hs-helper_8c_source.html#l00142">142</a> of file <a class="el" href="../../dd/d1d/hs-helper_8c_source.html">hs-helper.c</a>.</p>
+<div class="fragment"><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160;{</div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160; <span class="keywordtype">size_t</span> buf_size = 50;</div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160; <span class="keywordtype">size_t</span> size = <span class="keyword">sizeof</span> <a class="code" href="../../d3/d3d/hs-helper_8h.html#a0cd84b1a2184c9b84d1b7bf24582f28e">evlist</a> / <span class="keyword">sizeof</span> *<a class="code" href="../../d3/d3d/hs-helper_8h.html#a0cd84b1a2184c9b84d1b7bf24582f28e">evlist</a>;</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160; <span class="keywordtype">int</span> ret = -1;</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160; <span class="keywordflow">for</span>(<span class="keywordtype">size_t</span> i = 0 ; i &lt; size ; ++i)</div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160; {</div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160; <span class="keywordflow">if</span>(!strncmp(value, <a class="code" href="../../d3/d3d/hs-helper_8h.html#a0cd84b1a2184c9b84d1b7bf24582f28e">evlist</a>[i], buf_size))</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160; {</div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160; ret = i;</div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160; <span class="keywordflow">break</span>;</div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160; }</div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160; }</div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160; <span class="keywordflow">return</span> ret;</div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160;}</div><div class="ttc" id="hs-helper_8h_html_a0cd84b1a2184c9b84d1b7bf24582f28e"><div class="ttname"><a href="../../d3/d3d/hs-helper_8h.html#a0cd84b1a2184c9b84d1b7bf24582f28e">evlist</a></div><div class="ttdeci">static const char * evlist[]</div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d3d/hs-helper_8h_source.html#l00034">hs-helper.h:34</a></div></div>
+</div><!-- fragment -->
+</div>
+</div>
+<h2 class="groupheader">Variable Documentation</h2>
+<a id="a0cd84b1a2184c9b84d1b7bf24582f28e"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a0cd84b1a2184c9b84d1b7bf24582f28e">&#9670;&nbsp;</a></span>evlist</h2>
+
+<div class="memitem">
+<div class="memproto">
+<table class="mlabels">
+ <tr>
+ <td class="mlabels-left">
+ <table class="memname">
+ <tr>
+ <td class="memname">const char* evlist[]</td>
+ </tr>
+ </table>
+ </td>
+ <td class="mlabels-right">
+<span class="mlabels"><span class="mlabel">static</span></span> </td>
+ </tr>
+</table>
+</div><div class="memdoc">
+<b>Initial value:</b><div class="fragment"><div class="line">= {</div><div class="line"> <span class="stringliteral">&quot;tap_shortcut&quot;</span>,</div><div class="line"> <span class="stringliteral">&quot;on_screen_message&quot;</span>,</div><div class="line"> <span class="stringliteral">&quot;on_screen_reply&quot;</span>,</div><div class="line"> <span class="stringliteral">&quot;reserved&quot;</span></div><div class="line"> }</div></div><!-- fragment -->
+<p class="definition">Definition at line <a class="el" href="../../d3/d3d/hs-helper_8h_source.html#l00034">34</a> of file <a class="el" href="../../d3/d3d/hs-helper_8h_source.html">hs-helper.h</a>.</p>
+
+</div>
+</div>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="../../doxygen.png" alt="doxygen"/>
+</a> 1.8.13
+</small></address>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/d3/d3d/hs-helper_8h_source.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/d3/d3d/hs-helper_8h_source.html
new file mode 100644
index 0000000..f0a581a
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/d3/d3d/hs-helper_8h_source.html
@@ -0,0 +1,91 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>HomeScreenBinding: src/hs-helper.h Source File</title>
+<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="../../jquery.js"></script>
+<script type="text/javascript" src="../../dynsections.js"></script>
+<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="../../search/searchdata.js"></script>
+<script type="text/javascript" src="../../search/search.js"></script>
+<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+ <td id="projectalign" style="padding-left: 0.5em;">
+ <div id="projectname">HomeScreenBinding
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.13 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
+</script>
+<script type="text/javascript" src="../../menudata.js"></script>
+<script type="text/javascript" src="../../menu.js"></script>
+<script type="text/javascript">
+$(function() {
+ initMenu('../../',true,false,'search.php','Search');
+ $(document).ready(function() { init_search(); });
+});
+</script>
+<div id="main-nav"></div>
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+ onmouseover="return searchBox.OnSearchSelectShow()"
+ onmouseout="return searchBox.OnSearchSelectHide()"
+ onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0"
+ name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div id="nav-path" class="navpath">
+ <ul>
+<li class="navelem"><a class="el" href="../../dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li> </ul>
+</div>
+</div><!-- top -->
+<div class="header">
+ <div class="headertitle">
+<div class="title">hs-helper.h</div> </div>
+</div><!--header-->
+<div class="contents">
+<a href="../../d3/d3d/hs-helper_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment"> * Copyright (c) 2017 TOYOTA MOTOR CORPORATION</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment"> * Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment"> * you may not use this file except in compliance with the License.</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment"> * You may obtain a copy of the License at</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment"> * Unless required by applicable law or agreed to in writing, software</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment"> * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment"> * See the License for the specific language governing permissions and</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment"> * limitations under the License.</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;</div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="preprocessor">#ifndef HOMESCREEN_HELPER_H</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="preprocessor">#define HOMESCREEN_HELPER_H</span></div><div class="line"><a name="l00019"></a><span class="lineno"><a class="line" href="../../d3/d3d/hs-helper_8h.html#ad2c1fbc92ba364fcf83f15e6d0af66f0"> 19</a></span>&#160;<span class="preprocessor">#define AFB_BINDING_VERSION 2</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="preprocessor">#include &lt;afb/afb-binding.h&gt;</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="preprocessor">#include &lt;stdint.h&gt;</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="preprocessor">#include &lt;glib.h&gt;</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="preprocessor">#include &lt;errno.h&gt;</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="../../df/d76/hmi-debug_8h.html">hmi-debug.h</a>&quot;</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;</div><div class="line"><a name="l00026"></a><span class="lineno"><a class="line" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899"> 26</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">enum</span> <a class="code" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899">REQ_ERROR</a></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;{</div><div class="line"><a name="l00028"></a><span class="lineno"><a class="line" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899a96a855966bc63045222b3dcac524cee1"> 28</a></span>&#160; <a class="code" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899a96a855966bc63045222b3dcac524cee1">REQ_FAIL</a> = -1,</div><div class="line"><a name="l00029"></a><span class="lineno"><a class="line" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899ab093abb14c097b3b7719debb04d5e8ee"> 29</a></span>&#160; <a class="code" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899ab093abb14c097b3b7719debb04d5e8ee">REQ_OK</a>=0,</div><div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899aa223eed65c9bee2bf1f4cdecaf90d66a"> 30</a></span>&#160; <a class="code" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899aa223eed65c9bee2bf1f4cdecaf90d66a">NOT_NUMBER</a>,</div><div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899add1c84bf80c5f80741ee8f37fef1e12b"> 31</a></span>&#160; <a class="code" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899add1c84bf80c5f80741ee8f37fef1e12b">OUT_RANGE</a></div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;}<a class="code" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899">REQ_ERROR</a>;</div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;</div><div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="../../d3/d3d/hs-helper_8h.html#a0cd84b1a2184c9b84d1b7bf24582f28e"> 34</a></span>&#160;<span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="../../d3/d3d/hs-helper_8h.html#a0cd84b1a2184c9b84d1b7bf24582f28e">evlist</a>[] = {</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160; <span class="stringliteral">&quot;tap_shortcut&quot;</span>,</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160; <span class="stringliteral">&quot;on_screen_message&quot;</span>,</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160; <span class="stringliteral">&quot;on_screen_reply&quot;</span>,</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160; <span class="stringliteral">&quot;reserved&quot;</span></div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160; };</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160;</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160;<a class="code" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899">REQ_ERROR</a> <a class="code" href="../../d3/d3d/hs-helper_8h.html#a649900645417f2df3a70b9ad67529f53">get_value_uint16</a>(<span class="keyword">const</span> <span class="keyword">struct</span> afb_req request, <span class="keyword">const</span> <span class="keywordtype">char</span> *source, uint16_t *out_id);</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160;<a class="code" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899">REQ_ERROR</a> <a class="code" href="../../d3/d3d/hs-helper_8h.html#a2e62366684e39ea94436bf017e416827">get_value_int16</a>(<span class="keyword">const</span> <span class="keyword">struct</span> afb_req request, <span class="keyword">const</span> <span class="keywordtype">char</span> *source, int16_t *out_id);</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160;<a class="code" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899">REQ_ERROR</a> <a class="code" href="../../d3/d3d/hs-helper_8h.html#ac5b0370643c520377afd3fd4891918d2">get_value_int32</a>(<span class="keyword">const</span> <span class="keyword">struct</span> afb_req request, <span class="keyword">const</span> <span class="keywordtype">char</span> *source, int32_t *out_id);</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d3/d3d/hs-helper_8h.html#a1ba31a6a94515ff1730ba0043a67d59e">hs_add_object_to_json_object</a>(<span class="keyword">struct</span> json_object* j_obj, <span class="keywordtype">int</span> count, ...);</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d3/d3d/hs-helper_8h.html#a8777c53f1d4d5412f19b134ad85ffedf">hs_add_object_to_json_object_str</a>(<span class="keyword">struct</span> json_object* j_obj, <span class="keywordtype">int</span> count, ...);</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d3/d3d/hs-helper_8h.html#ae83604a37134e7bdee3ce4f10bb0b47a">hs_add_object_to_json_object_func</a>(<span class="keyword">struct</span> json_object* j_obj, <span class="keyword">const</span> <span class="keywordtype">char</span>* verb_name, <span class="keywordtype">int</span> count, ...);</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160;<span class="keywordtype">int</span> <a class="code" href="../../d3/d3d/hs-helper_8h.html#a2ff1b894941c3b461ca8119079c4146a">hs_search_event_name_index</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* value);</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160;</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/*HOMESCREEN_HELPER_H*/</span><span class="preprocessor"></span></div><div class="ttc" id="hs-helper_8h_html_ae83604a37134e7bdee3ce4f10bb0b47a"><div class="ttname"><a href="../../d3/d3d/hs-helper_8h.html#ae83604a37134e7bdee3ce4f10bb0b47a">hs_add_object_to_json_object_func</a></div><div class="ttdeci">void hs_add_object_to_json_object_func(struct json_object *j_obj, const char *verb_name, int count,...)</div><div class="ttdef"><b>Definition:</b> <a href="../../dd/d1d/hs-helper_8c_source.html#l00125">hs-helper.c:125</a></div></div>
+<div class="ttc" id="hs-helper_8h_html_a649900645417f2df3a70b9ad67529f53"><div class="ttname"><a href="../../d3/d3d/hs-helper_8h.html#a649900645417f2df3a70b9ad67529f53">get_value_uint16</a></div><div class="ttdeci">REQ_ERROR get_value_uint16(const struct afb_req request, const char *source, uint16_t *out_id)</div><div class="ttdef"><b>Definition:</b> <a href="../../dd/d1d/hs-helper_8c_source.html#l00024">hs-helper.c:24</a></div></div>
+<div class="ttc" id="hs-helper_8h_html_a1ba31a6a94515ff1730ba0043a67d59e"><div class="ttname"><a href="../../d3/d3d/hs-helper_8h.html#a1ba31a6a94515ff1730ba0043a67d59e">hs_add_object_to_json_object</a></div><div class="ttdeci">void hs_add_object_to_json_object(struct json_object *j_obj, int count,...)</div><div class="ttdef"><b>Definition:</b> <a href="../../dd/d1d/hs-helper_8c_source.html#l00096">hs-helper.c:96</a></div></div>
+<div class="ttc" id="hs-helper_8h_html_ac5b0370643c520377afd3fd4891918d2"><div class="ttname"><a href="../../d3/d3d/hs-helper_8h.html#ac5b0370643c520377afd3fd4891918d2">get_value_int32</a></div><div class="ttdeci">REQ_ERROR get_value_int32(const struct afb_req request, const char *source, int32_t *out_id)</div><div class="ttdef"><b>Definition:</b> <a href="../../dd/d1d/hs-helper_8c_source.html#l00072">hs-helper.c:72</a></div></div>
+<div class="ttc" id="hs-helper_8h_html_a2e62366684e39ea94436bf017e416827"><div class="ttname"><a href="../../d3/d3d/hs-helper_8h.html#a2e62366684e39ea94436bf017e416827">get_value_int16</a></div><div class="ttdeci">REQ_ERROR get_value_int16(const struct afb_req request, const char *source, int16_t *out_id)</div><div class="ttdef"><b>Definition:</b> <a href="../../dd/d1d/hs-helper_8c_source.html#l00048">hs-helper.c:48</a></div></div>
+<div class="ttc" id="hs-helper_8h_html_a2ff1b894941c3b461ca8119079c4146a"><div class="ttname"><a href="../../d3/d3d/hs-helper_8h.html#a2ff1b894941c3b461ca8119079c4146a">hs_search_event_name_index</a></div><div class="ttdeci">int hs_search_event_name_index(const char *value)</div><div class="ttdef"><b>Definition:</b> <a href="../../dd/d1d/hs-helper_8c_source.html#l00142">hs-helper.c:142</a></div></div>
+<div class="ttc" id="hs-helper_8h_html_a0cd84b1a2184c9b84d1b7bf24582f28e"><div class="ttname"><a href="../../d3/d3d/hs-helper_8h.html#a0cd84b1a2184c9b84d1b7bf24582f28e">evlist</a></div><div class="ttdeci">static const char * evlist[]</div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d3d/hs-helper_8h_source.html#l00034">hs-helper.h:34</a></div></div>
+<div class="ttc" id="hs-helper_8h_html_aa49f1dbbf26f01627a5737cf43aad899a96a855966bc63045222b3dcac524cee1"><div class="ttname"><a href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899a96a855966bc63045222b3dcac524cee1">REQ_FAIL</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d3d/hs-helper_8h_source.html#l00028">hs-helper.h:28</a></div></div>
+<div class="ttc" id="hs-helper_8h_html_aa49f1dbbf26f01627a5737cf43aad899add1c84bf80c5f80741ee8f37fef1e12b"><div class="ttname"><a href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899add1c84bf80c5f80741ee8f37fef1e12b">OUT_RANGE</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d3d/hs-helper_8h_source.html#l00031">hs-helper.h:31</a></div></div>
+<div class="ttc" id="hs-helper_8h_html_aa49f1dbbf26f01627a5737cf43aad899aa223eed65c9bee2bf1f4cdecaf90d66a"><div class="ttname"><a href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899aa223eed65c9bee2bf1f4cdecaf90d66a">NOT_NUMBER</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d3d/hs-helper_8h_source.html#l00030">hs-helper.h:30</a></div></div>
+<div class="ttc" id="hs-helper_8h_html_aa49f1dbbf26f01627a5737cf43aad899ab093abb14c097b3b7719debb04d5e8ee"><div class="ttname"><a href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899ab093abb14c097b3b7719debb04d5e8ee">REQ_OK</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d3d/hs-helper_8h_source.html#l00029">hs-helper.h:29</a></div></div>
+<div class="ttc" id="hs-helper_8h_html_aa49f1dbbf26f01627a5737cf43aad899"><div class="ttname"><a href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899">REQ_ERROR</a></div><div class="ttdeci">REQ_ERROR</div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d3d/hs-helper_8h_source.html#l00026">hs-helper.h:26</a></div></div>
+<div class="ttc" id="hmi-debug_8h_html"><div class="ttname"><a href="../../df/d76/hmi-debug_8h.html">hmi-debug.h</a></div></div>
+<div class="ttc" id="hs-helper_8h_html_a8777c53f1d4d5412f19b134ad85ffedf"><div class="ttname"><a href="../../d3/d3d/hs-helper_8h.html#a8777c53f1d4d5412f19b134ad85ffedf">hs_add_object_to_json_object_str</a></div><div class="ttdeci">void hs_add_object_to_json_object_str(struct json_object *j_obj, int count,...)</div><div class="ttdef"><b>Definition:</b> <a href="../../dd/d1d/hs-helper_8c_source.html#l00110">hs-helper.c:110</a></div></div>
+</div><!-- fragment --></div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="../../doxygen.png" alt="doxygen"/>
+</a> 1.8.13
+</small></address>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/d7/df4/class_lib_home_screen-members.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/d7/df4/class_lib_home_screen-members.html
new file mode 100644
index 0000000..6171ad9
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/d7/df4/class_lib_home_screen-members.html
@@ -0,0 +1,101 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>HomeScreenBinding: Member List</title>
+<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="../../jquery.js"></script>
+<script type="text/javascript" src="../../dynsections.js"></script>
+<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="../../search/searchdata.js"></script>
+<script type="text/javascript" src="../../search/search.js"></script>
+<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+ <td id="projectalign" style="padding-left: 0.5em;">
+ <div id="projectname">HomeScreenBinding
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.13 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
+</script>
+<script type="text/javascript" src="../../menudata.js"></script>
+<script type="text/javascript" src="../../menu.js"></script>
+<script type="text/javascript">
+$(function() {
+ initMenu('../../',true,false,'search.php','Search');
+ $(document).ready(function() { init_search(); });
+});
+</script>
+<div id="main-nav"></div>
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+ onmouseover="return searchBox.OnSearchSelectShow()"
+ onmouseout="return searchBox.OnSearchSelectHide()"
+ onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0"
+ name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+</div><!-- top -->
+<div class="header">
+ <div class="headertitle">
+<div class="title">LibHomeScreen Member List</div> </div>
+</div><!--header-->
+<div class="contents">
+
+<p>This is the complete list of members for <a class="el" href="../../de/dd0/class_lib_home_screen.html">LibHomeScreen</a>, including all inherited members.</p>
+<table class="directory">
+ <tr class="even"><td class="entry"><a class="el" href="../../de/dd0/class_lib_home_screen.html#a5593ff5ac78f6495ccb649904cf0ab08">api_list</a></td><td class="entry"><a class="el" href="../../de/dd0/class_lib_home_screen.html">LibHomeScreen</a></td><td class="entry"><span class="mlabel">static</span></td></tr>
+ <tr><td class="entry"><a class="el" href="../../de/dd0/class_lib_home_screen.html#a527b49dcfe581be6275d0eb2236ba37f">call</a>(const std::string &amp;verb, struct json_object *arg)</td><td class="entry"><a class="el" href="../../de/dd0/class_lib_home_screen.html">LibHomeScreen</a></td><td class="entry"></td></tr>
+ <tr class="even"><td class="entry"><a class="el" href="../../de/dd0/class_lib_home_screen.html#ab5e8e8ab7d53e0f114e9e907fcbb7643">call</a>(const char *verb, struct json_object *arg)</td><td class="entry"><a class="el" href="../../de/dd0/class_lib_home_screen.html">LibHomeScreen</a></td><td class="entry"></td></tr>
+ <tr><td class="entry"><a class="el" href="../../de/dd0/class_lib_home_screen.html#a6a6d8a4d33a006a08652e7377a4c29e9">event_list</a></td><td class="entry"><a class="el" href="../../de/dd0/class_lib_home_screen.html">LibHomeScreen</a></td><td class="entry"><span class="mlabel">static</span></td></tr>
+ <tr class="even"><td class="entry"><a class="el" href="../../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154aea56fa32a124a8ddcbea127755280a1d">Event_OnScreenMessage</a> enum value</td><td class="entry"><a class="el" href="../../de/dd0/class_lib_home_screen.html">LibHomeScreen</a></td><td class="entry"></td></tr>
+ <tr><td class="entry"><a class="el" href="../../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154acae91db4efc2394fd701f581d277a3fd">Event_OnScreenReply</a> enum value</td><td class="entry"><a class="el" href="../../de/dd0/class_lib_home_screen.html">LibHomeScreen</a></td><td class="entry"></td></tr>
+ <tr class="even"><td class="entry"><a class="el" href="../../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154a4b0a82d501e4db5fbfe25c254c92896f">Event_TapShortcut</a> enum value</td><td class="entry"><a class="el" href="../../de/dd0/class_lib_home_screen.html">LibHomeScreen</a></td><td class="entry"></td></tr>
+ <tr><td class="entry"><a class="el" href="../../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154">EventType</a> enum name</td><td class="entry"><a class="el" href="../../de/dd0/class_lib_home_screen.html">LibHomeScreen</a></td><td class="entry"></td></tr>
+ <tr class="even"><td class="entry"><a class="el" href="../../de/dd0/class_lib_home_screen.html#a334f11f81c84c98d18284215dcaada3a">handler_func</a> typedef</td><td class="entry"><a class="el" href="../../de/dd0/class_lib_home_screen.html">LibHomeScreen</a></td><td class="entry"></td></tr>
+ <tr><td class="entry"><a class="el" href="../../de/dd0/class_lib_home_screen.html#a6a57b573cc767725762ba9beab032220">init</a>(const int port, const std::string &amp;token)</td><td class="entry"><a class="el" href="../../de/dd0/class_lib_home_screen.html">LibHomeScreen</a></td><td class="entry"></td></tr>
+ <tr class="even"><td class="entry"><a class="el" href="../../de/dd0/class_lib_home_screen.html#a724bd949c4154fad041f96a15ef0f5dc">LibHomeScreen</a>()</td><td class="entry"><a class="el" href="../../de/dd0/class_lib_home_screen.html">LibHomeScreen</a></td><td class="entry"></td></tr>
+ <tr><td class="entry"><a class="el" href="../../de/dd0/class_lib_home_screen.html#a0fff2f703c8ce184eb9edd133e0f4137">LibHomeScreen</a>(const LibHomeScreen &amp;)=delete</td><td class="entry"><a class="el" href="../../de/dd0/class_lib_home_screen.html">LibHomeScreen</a></td><td class="entry"></td></tr>
+ <tr class="even"><td class="entry"><a class="el" href="../../de/dd0/class_lib_home_screen.html#a608638eb87b2772a3dcc92d8ca8f3596">on_call</a>(void *closure, const char *api, const char *verb, struct afb_wsj1_msg *msg)</td><td class="entry"><a class="el" href="../../de/dd0/class_lib_home_screen.html">LibHomeScreen</a></td><td class="entry"></td></tr>
+ <tr><td class="entry"><a class="el" href="../../de/dd0/class_lib_home_screen.html#a9c4885b51b43ab24a548d49fb3ab2de3">on_event</a>(void *closure, const char *event, struct afb_wsj1_msg *msg)</td><td class="entry"><a class="el" href="../../de/dd0/class_lib_home_screen.html">LibHomeScreen</a></td><td class="entry"></td></tr>
+ <tr class="even"><td class="entry"><a class="el" href="../../de/dd0/class_lib_home_screen.html#ab1c1fa69f24b981e824dd9fb810c4b74">on_hangup</a>(void *closure, struct afb_wsj1 *wsj)</td><td class="entry"><a class="el" href="../../de/dd0/class_lib_home_screen.html">LibHomeScreen</a></td><td class="entry"></td></tr>
+ <tr><td class="entry"><a class="el" href="../../de/dd0/class_lib_home_screen.html#a248d9648c6186287a7632ec1c75fc9c5">on_reply</a>(void *closure, struct afb_wsj1_msg *msg)</td><td class="entry"><a class="el" href="../../de/dd0/class_lib_home_screen.html">LibHomeScreen</a></td><td class="entry"></td></tr>
+ <tr class="even"><td class="entry"><a class="el" href="../../de/dd0/class_lib_home_screen.html#ac336482036a72b51a822725f1929523c">onScreenMessage</a>(const char *display_message)</td><td class="entry"><a class="el" href="../../de/dd0/class_lib_home_screen.html">LibHomeScreen</a></td><td class="entry"></td></tr>
+ <tr><td class="entry"><a class="el" href="../../de/dd0/class_lib_home_screen.html#a6c065f41f2c5d1f58d2763bfb4da9c37">onScreenReply</a>(const char *reply_message)</td><td class="entry"><a class="el" href="../../de/dd0/class_lib_home_screen.html">LibHomeScreen</a></td><td class="entry"></td></tr>
+ <tr class="even"><td class="entry"><a class="el" href="../../de/dd0/class_lib_home_screen.html#a23bc17798453cfca50904562736f6b25">operator=</a>(const LibHomeScreen &amp;)=delete</td><td class="entry"><a class="el" href="../../de/dd0/class_lib_home_screen.html">LibHomeScreen</a></td><td class="entry"></td></tr>
+ <tr><td class="entry"><a class="el" href="../../de/dd0/class_lib_home_screen.html#a2789e8a5372202cc36f48e71dbb9b7cf">registerCallback</a>(void(*event_cb)(const std::string &amp;event, struct json_object *event_contents), void(*reply_cb)(struct json_object *reply_contents), void(*hangup_cb)(void)=nullptr)</td><td class="entry"><a class="el" href="../../de/dd0/class_lib_home_screen.html">LibHomeScreen</a></td><td class="entry"></td></tr>
+ <tr class="even"><td class="entry"><a class="el" href="../../de/dd0/class_lib_home_screen.html#ab1b0e08bf35415de9064afed899e9f85">set_event_handler</a>(enum EventType et, handler_func f)</td><td class="entry"><a class="el" href="../../de/dd0/class_lib_home_screen.html">LibHomeScreen</a></td><td class="entry"></td></tr>
+ <tr><td class="entry"><a class="el" href="../../de/dd0/class_lib_home_screen.html#aa4c189807b75d070f567967f0d690738">subscribe</a>(const std::string &amp;event_name)</td><td class="entry"><a class="el" href="../../de/dd0/class_lib_home_screen.html">LibHomeScreen</a></td><td class="entry"></td></tr>
+ <tr class="even"><td class="entry"><a class="el" href="../../de/dd0/class_lib_home_screen.html#afb571c9577087b47065eb23e7fdbc903">tapShortcut</a>(const char *application_name)</td><td class="entry"><a class="el" href="../../de/dd0/class_lib_home_screen.html">LibHomeScreen</a></td><td class="entry"></td></tr>
+ <tr><td class="entry"><a class="el" href="../../de/dd0/class_lib_home_screen.html#aac03a45cbd453ba69ddb00c1016930a6">unsubscribe</a>(const std::string &amp;event_name)</td><td class="entry"><a class="el" href="../../de/dd0/class_lib_home_screen.html">LibHomeScreen</a></td><td class="entry"></td></tr>
+ <tr class="even"><td class="entry"><a class="el" href="../../de/dd0/class_lib_home_screen.html#a249902aebf71a5383ca8ec6ae558d095">~LibHomeScreen</a>()</td><td class="entry"><a class="el" href="../../de/dd0/class_lib_home_screen.html">LibHomeScreen</a></td><td class="entry"></td></tr>
+</table></div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="../../doxygen.png" alt="doxygen"/>
+</a> 1.8.13
+</small></address>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/dd/d1d/hs-helper_8c.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/dd/d1d/hs-helper_8c.html
new file mode 100644
index 0000000..ce8d1bd
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/dd/d1d/hs-helper_8c.html
@@ -0,0 +1,361 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>HomeScreenBinding: src/hs-helper.c File Reference</title>
+<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="../../jquery.js"></script>
+<script type="text/javascript" src="../../dynsections.js"></script>
+<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="../../search/searchdata.js"></script>
+<script type="text/javascript" src="../../search/search.js"></script>
+<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+ <td id="projectalign" style="padding-left: 0.5em;">
+ <div id="projectname">HomeScreenBinding
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.13 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
+</script>
+<script type="text/javascript" src="../../menudata.js"></script>
+<script type="text/javascript" src="../../menu.js"></script>
+<script type="text/javascript">
+$(function() {
+ initMenu('../../',true,false,'search.php','Search');
+ $(document).ready(function() { init_search(); });
+});
+</script>
+<div id="main-nav"></div>
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+ onmouseover="return searchBox.OnSearchSelectShow()"
+ onmouseout="return searchBox.OnSearchSelectHide()"
+ onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0"
+ name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div id="nav-path" class="navpath">
+ <ul>
+<li class="navelem"><a class="el" href="../../dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li> </ul>
+</div>
+</div><!-- top -->
+<div class="header">
+ <div class="summary">
+<a href="#func-members">Functions</a> </div>
+ <div class="headertitle">
+<div class="title">hs-helper.c File Reference</div> </div>
+</div><!--header-->
+<div class="contents">
+<div class="textblock"><code>#include &quot;<a class="el" href="../../d3/d3d/hs-helper_8h_source.html">hs-helper.h</a>&quot;</code><br />
+<code>#include &lt;stdlib.h&gt;</code><br />
+<code>#include &lt;string.h&gt;</code><br />
+<code>#include &lt;limits.h&gt;</code><br />
+<code>#include &lt;json-c/json.h&gt;</code><br />
+<code>#include &lt;stdarg.h&gt;</code><br />
+</div>
+<p><a href="../../dd/d1d/hs-helper_8c_source.html">Go to the source code of this file.</a></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
+Functions</h2></td></tr>
+<tr class="memitem:a649900645417f2df3a70b9ad67529f53"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899">REQ_ERROR</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d1d/hs-helper_8c.html#a649900645417f2df3a70b9ad67529f53">get_value_uint16</a> (const struct afb_req request, const char *source, uint16_t *out_id)</td></tr>
+<tr class="separator:a649900645417f2df3a70b9ad67529f53"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a2e62366684e39ea94436bf017e416827"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899">REQ_ERROR</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d1d/hs-helper_8c.html#a2e62366684e39ea94436bf017e416827">get_value_int16</a> (const struct afb_req request, const char *source, int16_t *out_id)</td></tr>
+<tr class="separator:a2e62366684e39ea94436bf017e416827"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ac5b0370643c520377afd3fd4891918d2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899">REQ_ERROR</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d1d/hs-helper_8c.html#ac5b0370643c520377afd3fd4891918d2">get_value_int32</a> (const struct afb_req request, const char *source, int32_t *out_id)</td></tr>
+<tr class="separator:ac5b0370643c520377afd3fd4891918d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a1ba31a6a94515ff1730ba0043a67d59e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d1d/hs-helper_8c.html#a1ba31a6a94515ff1730ba0043a67d59e">hs_add_object_to_json_object</a> (struct json_object *j_obj, int count,...)</td></tr>
+<tr class="separator:a1ba31a6a94515ff1730ba0043a67d59e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a8777c53f1d4d5412f19b134ad85ffedf"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d1d/hs-helper_8c.html#a8777c53f1d4d5412f19b134ad85ffedf">hs_add_object_to_json_object_str</a> (struct json_object *j_obj, int count,...)</td></tr>
+<tr class="separator:a8777c53f1d4d5412f19b134ad85ffedf"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ae83604a37134e7bdee3ce4f10bb0b47a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d1d/hs-helper_8c.html#ae83604a37134e7bdee3ce4f10bb0b47a">hs_add_object_to_json_object_func</a> (struct json_object *j_obj, const char *verb_name, int count,...)</td></tr>
+<tr class="separator:ae83604a37134e7bdee3ce4f10bb0b47a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a2ff1b894941c3b461ca8119079c4146a"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d1d/hs-helper_8c.html#a2ff1b894941c3b461ca8119079c4146a">hs_search_event_name_index</a> (const char *value)</td></tr>
+<tr class="separator:a2ff1b894941c3b461ca8119079c4146a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<h2 class="groupheader">Function Documentation</h2>
+<a id="a2e62366684e39ea94436bf017e416827"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a2e62366684e39ea94436bf017e416827">&#9670;&nbsp;</a></span>get_value_int16()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899">REQ_ERROR</a> get_value_int16 </td>
+ <td>(</td>
+ <td class="paramtype">const struct afb_req&#160;</td>
+ <td class="paramname"><em>request</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const char *&#160;</td>
+ <td class="paramname"><em>source</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">int16_t *&#160;</td>
+ <td class="paramname"><em>out_id</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p class="definition">Definition at line <a class="el" href="../../dd/d1d/hs-helper_8c_source.html#l00048">48</a> of file <a class="el" href="../../dd/d1d/hs-helper_8c_source.html">hs-helper.c</a>.</p>
+<div class="fragment"><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160;{</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160; <span class="keywordtype">char</span>* endptr;</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160; <span class="keyword">const</span> <span class="keywordtype">char</span>* tmp = afb_req_value (request, source);</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160; <span class="keywordflow">if</span>(!tmp)</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160; {</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160; <span class="keywordflow">return</span> <a class="code" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899a96a855966bc63045222b3dcac524cee1">REQ_FAIL</a>;</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160; }</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160; <span class="keywordtype">long</span> tmp_id = strtol(tmp,&amp;endptr,10);</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160;</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160; <span class="comment">/* error check of range */</span></div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160; <span class="keywordflow">if</span>( (tmp_id &gt; INT16_MAX) || (tmp_id &lt; INT16_MIN) )</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160; {</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; <span class="keywordflow">return</span> <a class="code" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899add1c84bf80c5f80741ee8f37fef1e12b">OUT_RANGE</a>;</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160; }</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160; <span class="keywordflow">if</span>(*endptr != <span class="charliteral">&#39;\0&#39;</span>)</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160; {</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160; <span class="keywordflow">return</span> <a class="code" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899aa223eed65c9bee2bf1f4cdecaf90d66a">NOT_NUMBER</a>;</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160; }</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160;</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160; *out_id = (int16_t)tmp_id;</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160; <span class="keywordflow">return</span> <a class="code" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899ab093abb14c097b3b7719debb04d5e8ee">REQ_OK</a>;</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160;}</div><div class="ttc" id="hs-helper_8h_html_aa49f1dbbf26f01627a5737cf43aad899a96a855966bc63045222b3dcac524cee1"><div class="ttname"><a href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899a96a855966bc63045222b3dcac524cee1">REQ_FAIL</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d3d/hs-helper_8h_source.html#l00028">hs-helper.h:28</a></div></div>
+<div class="ttc" id="hs-helper_8h_html_aa49f1dbbf26f01627a5737cf43aad899add1c84bf80c5f80741ee8f37fef1e12b"><div class="ttname"><a href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899add1c84bf80c5f80741ee8f37fef1e12b">OUT_RANGE</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d3d/hs-helper_8h_source.html#l00031">hs-helper.h:31</a></div></div>
+<div class="ttc" id="hs-helper_8h_html_aa49f1dbbf26f01627a5737cf43aad899aa223eed65c9bee2bf1f4cdecaf90d66a"><div class="ttname"><a href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899aa223eed65c9bee2bf1f4cdecaf90d66a">NOT_NUMBER</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d3d/hs-helper_8h_source.html#l00030">hs-helper.h:30</a></div></div>
+<div class="ttc" id="hs-helper_8h_html_aa49f1dbbf26f01627a5737cf43aad899ab093abb14c097b3b7719debb04d5e8ee"><div class="ttname"><a href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899ab093abb14c097b3b7719debb04d5e8ee">REQ_OK</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d3d/hs-helper_8h_source.html#l00029">hs-helper.h:29</a></div></div>
+</div><!-- fragment -->
+</div>
+</div>
+<a id="ac5b0370643c520377afd3fd4891918d2"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ac5b0370643c520377afd3fd4891918d2">&#9670;&nbsp;</a></span>get_value_int32()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899">REQ_ERROR</a> get_value_int32 </td>
+ <td>(</td>
+ <td class="paramtype">const struct afb_req&#160;</td>
+ <td class="paramname"><em>request</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const char *&#160;</td>
+ <td class="paramname"><em>source</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">int32_t *&#160;</td>
+ <td class="paramname"><em>out_id</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p class="definition">Definition at line <a class="el" href="../../dd/d1d/hs-helper_8c_source.html#l00072">72</a> of file <a class="el" href="../../dd/d1d/hs-helper_8c_source.html">hs-helper.c</a>.</p>
+<div class="fragment"><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160;{</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160; <span class="keywordtype">char</span>* endptr;</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160; <span class="keyword">const</span> <span class="keywordtype">char</span>* tmp = afb_req_value (request, source);</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160; <span class="keywordflow">if</span>(!tmp)</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160; {</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160; <span class="keywordflow">return</span> <a class="code" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899a96a855966bc63045222b3dcac524cee1">REQ_FAIL</a>;</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160; }</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160; <span class="keywordtype">long</span> tmp_id = strtol(tmp,&amp;endptr,10);</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160;</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; <span class="comment">/* error check of range */</span></div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; <span class="keywordflow">if</span>( (tmp_id &gt; INT32_MAX) || (tmp_id &lt; INT32_MIN) )</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160; {</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; <span class="keywordflow">return</span> <a class="code" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899add1c84bf80c5f80741ee8f37fef1e12b">OUT_RANGE</a>;</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; }</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; <span class="keywordflow">if</span>(*endptr != <span class="charliteral">&#39;\0&#39;</span>)</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; {</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160; <span class="keywordflow">return</span> <a class="code" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899aa223eed65c9bee2bf1f4cdecaf90d66a">NOT_NUMBER</a>;</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160; }</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160;</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160; *out_id = (int32_t)tmp_id;</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160; <span class="keywordflow">return</span> <a class="code" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899ab093abb14c097b3b7719debb04d5e8ee">REQ_OK</a>;</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160;}</div><div class="ttc" id="hs-helper_8h_html_aa49f1dbbf26f01627a5737cf43aad899a96a855966bc63045222b3dcac524cee1"><div class="ttname"><a href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899a96a855966bc63045222b3dcac524cee1">REQ_FAIL</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d3d/hs-helper_8h_source.html#l00028">hs-helper.h:28</a></div></div>
+<div class="ttc" id="hs-helper_8h_html_aa49f1dbbf26f01627a5737cf43aad899add1c84bf80c5f80741ee8f37fef1e12b"><div class="ttname"><a href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899add1c84bf80c5f80741ee8f37fef1e12b">OUT_RANGE</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d3d/hs-helper_8h_source.html#l00031">hs-helper.h:31</a></div></div>
+<div class="ttc" id="hs-helper_8h_html_aa49f1dbbf26f01627a5737cf43aad899aa223eed65c9bee2bf1f4cdecaf90d66a"><div class="ttname"><a href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899aa223eed65c9bee2bf1f4cdecaf90d66a">NOT_NUMBER</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d3d/hs-helper_8h_source.html#l00030">hs-helper.h:30</a></div></div>
+<div class="ttc" id="hs-helper_8h_html_aa49f1dbbf26f01627a5737cf43aad899ab093abb14c097b3b7719debb04d5e8ee"><div class="ttname"><a href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899ab093abb14c097b3b7719debb04d5e8ee">REQ_OK</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d3d/hs-helper_8h_source.html#l00029">hs-helper.h:29</a></div></div>
+</div><!-- fragment -->
+</div>
+</div>
+<a id="a649900645417f2df3a70b9ad67529f53"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a649900645417f2df3a70b9ad67529f53">&#9670;&nbsp;</a></span>get_value_uint16()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899">REQ_ERROR</a> get_value_uint16 </td>
+ <td>(</td>
+ <td class="paramtype">const struct afb_req&#160;</td>
+ <td class="paramname"><em>request</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const char *&#160;</td>
+ <td class="paramname"><em>source</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t *&#160;</td>
+ <td class="paramname"><em>out_id</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p class="definition">Definition at line <a class="el" href="../../dd/d1d/hs-helper_8c_source.html#l00024">24</a> of file <a class="el" href="../../dd/d1d/hs-helper_8c_source.html">hs-helper.c</a>.</p>
+<div class="fragment"><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;{</div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160; <span class="keywordtype">char</span>* endptr;</div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160; <span class="keyword">const</span> <span class="keywordtype">char</span>* tmp = afb_req_value (request, source);</div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160; <span class="keywordflow">if</span>(!tmp)</div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160; {</div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160; <span class="keywordflow">return</span> <a class="code" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899a96a855966bc63045222b3dcac524cee1">REQ_FAIL</a>;</div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160; }</div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160; <span class="keywordtype">long</span> tmp_id = strtol(tmp,&amp;endptr,10);</div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160; <span class="comment">/* error check of range */</span></div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160; <span class="keywordflow">if</span>( (tmp_id &gt; UINT16_MAX) || (tmp_id &lt; 0) )</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160; {</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160; <span class="keywordflow">return</span> <a class="code" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899add1c84bf80c5f80741ee8f37fef1e12b">OUT_RANGE</a>;</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160; }</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160; <span class="keywordflow">if</span>(*endptr != <span class="charliteral">&#39;\0&#39;</span>)</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160; {</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160; <span class="keywordflow">return</span> <a class="code" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899aa223eed65c9bee2bf1f4cdecaf90d66a">NOT_NUMBER</a>;</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160; }</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160;</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160; *out_id = (uint16_t)tmp_id;</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160; <span class="keywordflow">return</span> <a class="code" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899ab093abb14c097b3b7719debb04d5e8ee">REQ_OK</a>;</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160;}</div><div class="ttc" id="hs-helper_8h_html_aa49f1dbbf26f01627a5737cf43aad899a96a855966bc63045222b3dcac524cee1"><div class="ttname"><a href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899a96a855966bc63045222b3dcac524cee1">REQ_FAIL</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d3d/hs-helper_8h_source.html#l00028">hs-helper.h:28</a></div></div>
+<div class="ttc" id="hs-helper_8h_html_aa49f1dbbf26f01627a5737cf43aad899add1c84bf80c5f80741ee8f37fef1e12b"><div class="ttname"><a href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899add1c84bf80c5f80741ee8f37fef1e12b">OUT_RANGE</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d3d/hs-helper_8h_source.html#l00031">hs-helper.h:31</a></div></div>
+<div class="ttc" id="hs-helper_8h_html_aa49f1dbbf26f01627a5737cf43aad899aa223eed65c9bee2bf1f4cdecaf90d66a"><div class="ttname"><a href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899aa223eed65c9bee2bf1f4cdecaf90d66a">NOT_NUMBER</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d3d/hs-helper_8h_source.html#l00030">hs-helper.h:30</a></div></div>
+<div class="ttc" id="hs-helper_8h_html_aa49f1dbbf26f01627a5737cf43aad899ab093abb14c097b3b7719debb04d5e8ee"><div class="ttname"><a href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899ab093abb14c097b3b7719debb04d5e8ee">REQ_OK</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d3d/hs-helper_8h_source.html#l00029">hs-helper.h:29</a></div></div>
+</div><!-- fragment -->
+</div>
+</div>
+<a id="a1ba31a6a94515ff1730ba0043a67d59e"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a1ba31a6a94515ff1730ba0043a67d59e">&#9670;&nbsp;</a></span>hs_add_object_to_json_object()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void hs_add_object_to_json_object </td>
+ <td>(</td>
+ <td class="paramtype">struct json_object *&#160;</td>
+ <td class="paramname"><em>j_obj</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">int&#160;</td>
+ <td class="paramname"><em>count</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">&#160;</td>
+ <td class="paramname"><em>...</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p class="definition">Definition at line <a class="el" href="../../dd/d1d/hs-helper_8c_source.html#l00096">96</a> of file <a class="el" href="../../dd/d1d/hs-helper_8c_source.html">hs-helper.c</a>.</p>
+<div class="fragment"><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160;{</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160; va_list args;</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160; va_start(args, count);</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160; <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0; i &lt; count; ++i )</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160; {</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160; <span class="keywordtype">char</span> *key = va_arg(args, <span class="keywordtype">char</span>*);</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160; <span class="keywordtype">int</span> value = va_arg(args, <span class="keywordtype">int</span>);</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160; json_object_object_add(j_obj, key, json_object_new_int((int32_t)value));</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160; ++i;</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160; }</div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160; va_end(args);</div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160;}</div></div><!-- fragment -->
+</div>
+</div>
+<a id="ae83604a37134e7bdee3ce4f10bb0b47a"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ae83604a37134e7bdee3ce4f10bb0b47a">&#9670;&nbsp;</a></span>hs_add_object_to_json_object_func()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void hs_add_object_to_json_object_func </td>
+ <td>(</td>
+ <td class="paramtype">struct json_object *&#160;</td>
+ <td class="paramname"><em>j_obj</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const char *&#160;</td>
+ <td class="paramname"><em>verb_name</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">int&#160;</td>
+ <td class="paramname"><em>count</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">&#160;</td>
+ <td class="paramname"><em>...</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p class="definition">Definition at line <a class="el" href="../../dd/d1d/hs-helper_8c_source.html#l00125">125</a> of file <a class="el" href="../../dd/d1d/hs-helper_8c_source.html">hs-helper.c</a>.</p>
+<div class="fragment"><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160;{</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160; va_list args;</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160; va_start(args, count);</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160;</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160; json_object_object_add(j_obj,<span class="stringliteral">&quot;verb&quot;</span>, json_object_new_string(verb_name));</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160;</div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160; <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0; i &lt; count; ++i )</div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160; {</div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160; <span class="keywordtype">char</span> *key = va_arg(args, <span class="keywordtype">char</span>*);</div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160; <span class="keywordtype">int</span> value = va_arg(args, <span class="keywordtype">int</span>);</div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160; json_object_object_add(j_obj, key, json_object_new_int((int32_t)value));</div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160; ++i;</div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160; }</div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160; va_end(args);</div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160;}</div></div><!-- fragment -->
+</div>
+</div>
+<a id="a8777c53f1d4d5412f19b134ad85ffedf"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a8777c53f1d4d5412f19b134ad85ffedf">&#9670;&nbsp;</a></span>hs_add_object_to_json_object_str()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void hs_add_object_to_json_object_str </td>
+ <td>(</td>
+ <td class="paramtype">struct json_object *&#160;</td>
+ <td class="paramname"><em>j_obj</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">int&#160;</td>
+ <td class="paramname"><em>count</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">&#160;</td>
+ <td class="paramname"><em>...</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p class="definition">Definition at line <a class="el" href="../../dd/d1d/hs-helper_8c_source.html#l00110">110</a> of file <a class="el" href="../../dd/d1d/hs-helper_8c_source.html">hs-helper.c</a>.</p>
+<div class="fragment"><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160;{</div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160; va_list args;</div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160; va_start(args, count);</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160; <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0; i &lt; count; ++i )</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160; {</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160; <span class="keywordtype">char</span> *key = va_arg(args, <span class="keywordtype">char</span>*);</div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160; <span class="keywordtype">char</span> *value = va_arg(args, <span class="keywordtype">char</span>*);</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160; json_object_object_add(j_obj, key, json_object_new_string(value));</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160; ++i;</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160; }</div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160; va_end(args);</div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160;}</div></div><!-- fragment -->
+</div>
+</div>
+<a id="a2ff1b894941c3b461ca8119079c4146a"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a2ff1b894941c3b461ca8119079c4146a">&#9670;&nbsp;</a></span>hs_search_event_name_index()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">int hs_search_event_name_index </td>
+ <td>(</td>
+ <td class="paramtype">const char *&#160;</td>
+ <td class="paramname"><em>value</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p class="definition">Definition at line <a class="el" href="../../dd/d1d/hs-helper_8c_source.html#l00142">142</a> of file <a class="el" href="../../dd/d1d/hs-helper_8c_source.html">hs-helper.c</a>.</p>
+<div class="fragment"><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160;{</div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160; <span class="keywordtype">size_t</span> buf_size = 50;</div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160; <span class="keywordtype">size_t</span> size = <span class="keyword">sizeof</span> <a class="code" href="../../d3/d3d/hs-helper_8h.html#a0cd84b1a2184c9b84d1b7bf24582f28e">evlist</a> / <span class="keyword">sizeof</span> *<a class="code" href="../../d3/d3d/hs-helper_8h.html#a0cd84b1a2184c9b84d1b7bf24582f28e">evlist</a>;</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160; <span class="keywordtype">int</span> ret = -1;</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160; <span class="keywordflow">for</span>(<span class="keywordtype">size_t</span> i = 0 ; i &lt; size ; ++i)</div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160; {</div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160; <span class="keywordflow">if</span>(!strncmp(value, <a class="code" href="../../d3/d3d/hs-helper_8h.html#a0cd84b1a2184c9b84d1b7bf24582f28e">evlist</a>[i], buf_size))</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160; {</div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160; ret = i;</div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160; <span class="keywordflow">break</span>;</div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160; }</div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160; }</div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160; <span class="keywordflow">return</span> ret;</div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160;}</div><div class="ttc" id="hs-helper_8h_html_a0cd84b1a2184c9b84d1b7bf24582f28e"><div class="ttname"><a href="../../d3/d3d/hs-helper_8h.html#a0cd84b1a2184c9b84d1b7bf24582f28e">evlist</a></div><div class="ttdeci">static const char * evlist[]</div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d3d/hs-helper_8h_source.html#l00034">hs-helper.h:34</a></div></div>
+</div><!-- fragment -->
+</div>
+</div>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="../../doxygen.png" alt="doxygen"/>
+</a> 1.8.13
+</small></address>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/dd/d1d/hs-helper_8c_source.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/dd/d1d/hs-helper_8c_source.html
new file mode 100644
index 0000000..792ec9d
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/dd/d1d/hs-helper_8c_source.html
@@ -0,0 +1,91 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>HomeScreenBinding: src/hs-helper.c Source File</title>
+<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="../../jquery.js"></script>
+<script type="text/javascript" src="../../dynsections.js"></script>
+<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="../../search/searchdata.js"></script>
+<script type="text/javascript" src="../../search/search.js"></script>
+<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+ <td id="projectalign" style="padding-left: 0.5em;">
+ <div id="projectname">HomeScreenBinding
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.13 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
+</script>
+<script type="text/javascript" src="../../menudata.js"></script>
+<script type="text/javascript" src="../../menu.js"></script>
+<script type="text/javascript">
+$(function() {
+ initMenu('../../',true,false,'search.php','Search');
+ $(document).ready(function() { init_search(); });
+});
+</script>
+<div id="main-nav"></div>
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+ onmouseover="return searchBox.OnSearchSelectShow()"
+ onmouseout="return searchBox.OnSearchSelectHide()"
+ onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0"
+ name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div id="nav-path" class="navpath">
+ <ul>
+<li class="navelem"><a class="el" href="../../dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li> </ul>
+</div>
+</div><!-- top -->
+<div class="header">
+ <div class="headertitle">
+<div class="title">hs-helper.c</div> </div>
+</div><!--header-->
+<div class="contents">
+<a href="../../dd/d1d/hs-helper_8c.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment"> * Copyright (c) 2017 TOYOTA MOTOR CORPORATION</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment"> * Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment"> * you may not use this file except in compliance with the License.</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment"> * You may obtain a copy of the License at</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment"> * Unless required by applicable law or agreed to in writing, software</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment"> * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment"> * See the License for the specific language governing permissions and</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment"> * limitations under the License.</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;</div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="../../d3/d3d/hs-helper_8h.html">hs-helper.h</a>&quot;</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="preprocessor">#include &lt;stdlib.h&gt;</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="preprocessor">#include &lt;string.h&gt;</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="preprocessor">#include &lt;limits.h&gt;</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="preprocessor">#include &lt;json-c/json.h&gt;</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="preprocessor">#include &lt;stdarg.h&gt;</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;</div><div class="line"><a name="l00024"></a><span class="lineno"><a class="line" href="../../d3/d3d/hs-helper_8h.html#a649900645417f2df3a70b9ad67529f53"> 24</a></span>&#160;<a class="code" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899">REQ_ERROR</a> <a class="code" href="../../dd/d1d/hs-helper_8c.html#a649900645417f2df3a70b9ad67529f53">get_value_uint16</a>(<span class="keyword">const</span> <span class="keyword">struct</span> afb_req request, <span class="keyword">const</span> <span class="keywordtype">char</span> *source, uint16_t *out_id)</div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;{</div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160; <span class="keywordtype">char</span>* endptr;</div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160; <span class="keyword">const</span> <span class="keywordtype">char</span>* tmp = afb_req_value (request, source);</div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160; <span class="keywordflow">if</span>(!tmp)</div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160; {</div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160; <span class="keywordflow">return</span> <a class="code" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899a96a855966bc63045222b3dcac524cee1">REQ_FAIL</a>;</div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160; }</div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160; <span class="keywordtype">long</span> tmp_id = strtol(tmp,&amp;endptr,10);</div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160; <span class="comment">/* error check of range */</span></div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160; <span class="keywordflow">if</span>( (tmp_id &gt; UINT16_MAX) || (tmp_id &lt; 0) )</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160; {</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160; <span class="keywordflow">return</span> <a class="code" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899add1c84bf80c5f80741ee8f37fef1e12b">OUT_RANGE</a>;</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160; }</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160; <span class="keywordflow">if</span>(*endptr != <span class="charliteral">&#39;\0&#39;</span>)</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160; {</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160; <span class="keywordflow">return</span> <a class="code" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899aa223eed65c9bee2bf1f4cdecaf90d66a">NOT_NUMBER</a>;</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160; }</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160;</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160; *out_id = (uint16_t)tmp_id;</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160; <span class="keywordflow">return</span> <a class="code" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899ab093abb14c097b3b7719debb04d5e8ee">REQ_OK</a>;</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160;}</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160;</div><div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="../../d3/d3d/hs-helper_8h.html#a2e62366684e39ea94436bf017e416827"> 48</a></span>&#160;<a class="code" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899">REQ_ERROR</a> <a class="code" href="../../dd/d1d/hs-helper_8c.html#a2e62366684e39ea94436bf017e416827">get_value_int16</a>(<span class="keyword">const</span> <span class="keyword">struct</span> afb_req request, <span class="keyword">const</span> <span class="keywordtype">char</span> *source, int16_t *out_id)</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160;{</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160; <span class="keywordtype">char</span>* endptr;</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160; <span class="keyword">const</span> <span class="keywordtype">char</span>* tmp = afb_req_value (request, source);</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160; <span class="keywordflow">if</span>(!tmp)</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160; {</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160; <span class="keywordflow">return</span> <a class="code" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899a96a855966bc63045222b3dcac524cee1">REQ_FAIL</a>;</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160; }</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160; <span class="keywordtype">long</span> tmp_id = strtol(tmp,&amp;endptr,10);</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160;</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160; <span class="comment">/* error check of range */</span></div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160; <span class="keywordflow">if</span>( (tmp_id &gt; INT16_MAX) || (tmp_id &lt; INT16_MIN) )</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160; {</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; <span class="keywordflow">return</span> <a class="code" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899add1c84bf80c5f80741ee8f37fef1e12b">OUT_RANGE</a>;</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160; }</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160; <span class="keywordflow">if</span>(*endptr != <span class="charliteral">&#39;\0&#39;</span>)</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160; {</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160; <span class="keywordflow">return</span> <a class="code" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899aa223eed65c9bee2bf1f4cdecaf90d66a">NOT_NUMBER</a>;</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160; }</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160;</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160; *out_id = (int16_t)tmp_id;</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160; <span class="keywordflow">return</span> <a class="code" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899ab093abb14c097b3b7719debb04d5e8ee">REQ_OK</a>;</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160;}</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160;</div><div class="line"><a name="l00072"></a><span class="lineno"><a class="line" href="../../d3/d3d/hs-helper_8h.html#ac5b0370643c520377afd3fd4891918d2"> 72</a></span>&#160;<a class="code" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899">REQ_ERROR</a> <a class="code" href="../../dd/d1d/hs-helper_8c.html#ac5b0370643c520377afd3fd4891918d2">get_value_int32</a>(<span class="keyword">const</span> <span class="keyword">struct</span> afb_req request, <span class="keyword">const</span> <span class="keywordtype">char</span> *source, int32_t *out_id)</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160;{</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160; <span class="keywordtype">char</span>* endptr;</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160; <span class="keyword">const</span> <span class="keywordtype">char</span>* tmp = afb_req_value (request, source);</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160; <span class="keywordflow">if</span>(!tmp)</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160; {</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160; <span class="keywordflow">return</span> <a class="code" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899a96a855966bc63045222b3dcac524cee1">REQ_FAIL</a>;</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160; }</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160; <span class="keywordtype">long</span> tmp_id = strtol(tmp,&amp;endptr,10);</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160;</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; <span class="comment">/* error check of range */</span></div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; <span class="keywordflow">if</span>( (tmp_id &gt; INT32_MAX) || (tmp_id &lt; INT32_MIN) )</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160; {</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; <span class="keywordflow">return</span> <a class="code" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899add1c84bf80c5f80741ee8f37fef1e12b">OUT_RANGE</a>;</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; }</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; <span class="keywordflow">if</span>(*endptr != <span class="charliteral">&#39;\0&#39;</span>)</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; {</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160; <span class="keywordflow">return</span> <a class="code" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899aa223eed65c9bee2bf1f4cdecaf90d66a">NOT_NUMBER</a>;</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160; }</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160;</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160; *out_id = (int32_t)tmp_id;</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160; <span class="keywordflow">return</span> <a class="code" href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899ab093abb14c097b3b7719debb04d5e8ee">REQ_OK</a>;</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160;}</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160;</div><div class="line"><a name="l00096"></a><span class="lineno"><a class="line" href="../../d3/d3d/hs-helper_8h.html#a1ba31a6a94515ff1730ba0043a67d59e"> 96</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../dd/d1d/hs-helper_8c.html#a1ba31a6a94515ff1730ba0043a67d59e">hs_add_object_to_json_object</a>(<span class="keyword">struct</span> json_object* j_obj, <span class="keywordtype">int</span> count,...)</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160;{</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160; va_list args;</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160; va_start(args, count);</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160; <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0; i &lt; count; ++i )</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160; {</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160; <span class="keywordtype">char</span> *key = va_arg(args, <span class="keywordtype">char</span>*);</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160; <span class="keywordtype">int</span> value = va_arg(args, <span class="keywordtype">int</span>);</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160; json_object_object_add(j_obj, key, json_object_new_int((int32_t)value));</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160; ++i;</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160; }</div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160; va_end(args);</div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160;}</div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160;</div><div class="line"><a name="l00110"></a><span class="lineno"><a class="line" href="../../d3/d3d/hs-helper_8h.html#a8777c53f1d4d5412f19b134ad85ffedf"> 110</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../dd/d1d/hs-helper_8c.html#a8777c53f1d4d5412f19b134ad85ffedf">hs_add_object_to_json_object_str</a>(<span class="keyword">struct</span> json_object* j_obj, <span class="keywordtype">int</span> count,...)</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160;{</div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160; va_list args;</div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160; va_start(args, count);</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160; <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0; i &lt; count; ++i )</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160; {</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160; <span class="keywordtype">char</span> *key = va_arg(args, <span class="keywordtype">char</span>*);</div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160; <span class="keywordtype">char</span> *value = va_arg(args, <span class="keywordtype">char</span>*);</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160; json_object_object_add(j_obj, key, json_object_new_string(value));</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160; ++i;</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160; }</div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160; va_end(args);</div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160;}</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160;</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160;</div><div class="line"><a name="l00125"></a><span class="lineno"><a class="line" href="../../d3/d3d/hs-helper_8h.html#ae83604a37134e7bdee3ce4f10bb0b47a"> 125</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../dd/d1d/hs-helper_8c.html#ae83604a37134e7bdee3ce4f10bb0b47a">hs_add_object_to_json_object_func</a>(<span class="keyword">struct</span> json_object* j_obj, <span class="keyword">const</span> <span class="keywordtype">char</span>* verb_name, <span class="keywordtype">int</span> count, ...)</div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160;{</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160; va_list args;</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160; va_start(args, count);</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160;</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160; json_object_object_add(j_obj,<span class="stringliteral">&quot;verb&quot;</span>, json_object_new_string(verb_name));</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160;</div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160; <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0; i &lt; count; ++i )</div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160; {</div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160; <span class="keywordtype">char</span> *key = va_arg(args, <span class="keywordtype">char</span>*);</div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160; <span class="keywordtype">int</span> value = va_arg(args, <span class="keywordtype">int</span>);</div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160; json_object_object_add(j_obj, key, json_object_new_int((int32_t)value));</div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160; ++i;</div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160; }</div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160; va_end(args);</div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160;}</div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160;</div><div class="line"><a name="l00142"></a><span class="lineno"><a class="line" href="../../d3/d3d/hs-helper_8h.html#a2ff1b894941c3b461ca8119079c4146a"> 142</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="../../dd/d1d/hs-helper_8c.html#a2ff1b894941c3b461ca8119079c4146a">hs_search_event_name_index</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* value)</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160;{</div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160; <span class="keywordtype">size_t</span> buf_size = 50;</div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160; <span class="keywordtype">size_t</span> size = <span class="keyword">sizeof</span> <a class="code" href="../../d3/d3d/hs-helper_8h.html#a0cd84b1a2184c9b84d1b7bf24582f28e">evlist</a> / <span class="keyword">sizeof</span> *<a class="code" href="../../d3/d3d/hs-helper_8h.html#a0cd84b1a2184c9b84d1b7bf24582f28e">evlist</a>;</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160; <span class="keywordtype">int</span> ret = -1;</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160; <span class="keywordflow">for</span>(<span class="keywordtype">size_t</span> i = 0 ; i &lt; size ; ++i)</div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160; {</div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160; <span class="keywordflow">if</span>(!strncmp(value, <a class="code" href="../../d3/d3d/hs-helper_8h.html#a0cd84b1a2184c9b84d1b7bf24582f28e">evlist</a>[i], buf_size))</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160; {</div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160; ret = i;</div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160; <span class="keywordflow">break</span>;</div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160; }</div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160; }</div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160; <span class="keywordflow">return</span> ret;</div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160;}</div><div class="ttc" id="hs-helper_8c_html_a8777c53f1d4d5412f19b134ad85ffedf"><div class="ttname"><a href="../../dd/d1d/hs-helper_8c.html#a8777c53f1d4d5412f19b134ad85ffedf">hs_add_object_to_json_object_str</a></div><div class="ttdeci">void hs_add_object_to_json_object_str(struct json_object *j_obj, int count,...)</div><div class="ttdef"><b>Definition:</b> <a href="../../dd/d1d/hs-helper_8c_source.html#l00110">hs-helper.c:110</a></div></div>
+<div class="ttc" id="hs-helper_8h_html"><div class="ttname"><a href="../../d3/d3d/hs-helper_8h.html">hs-helper.h</a></div></div>
+<div class="ttc" id="hs-helper_8c_html_a649900645417f2df3a70b9ad67529f53"><div class="ttname"><a href="../../dd/d1d/hs-helper_8c.html#a649900645417f2df3a70b9ad67529f53">get_value_uint16</a></div><div class="ttdeci">REQ_ERROR get_value_uint16(const struct afb_req request, const char *source, uint16_t *out_id)</div><div class="ttdef"><b>Definition:</b> <a href="../../dd/d1d/hs-helper_8c_source.html#l00024">hs-helper.c:24</a></div></div>
+<div class="ttc" id="hs-helper_8h_html_a0cd84b1a2184c9b84d1b7bf24582f28e"><div class="ttname"><a href="../../d3/d3d/hs-helper_8h.html#a0cd84b1a2184c9b84d1b7bf24582f28e">evlist</a></div><div class="ttdeci">static const char * evlist[]</div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d3d/hs-helper_8h_source.html#l00034">hs-helper.h:34</a></div></div>
+<div class="ttc" id="hs-helper_8h_html_aa49f1dbbf26f01627a5737cf43aad899a96a855966bc63045222b3dcac524cee1"><div class="ttname"><a href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899a96a855966bc63045222b3dcac524cee1">REQ_FAIL</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d3d/hs-helper_8h_source.html#l00028">hs-helper.h:28</a></div></div>
+<div class="ttc" id="hs-helper_8c_html_a2ff1b894941c3b461ca8119079c4146a"><div class="ttname"><a href="../../dd/d1d/hs-helper_8c.html#a2ff1b894941c3b461ca8119079c4146a">hs_search_event_name_index</a></div><div class="ttdeci">int hs_search_event_name_index(const char *value)</div><div class="ttdef"><b>Definition:</b> <a href="../../dd/d1d/hs-helper_8c_source.html#l00142">hs-helper.c:142</a></div></div>
+<div class="ttc" id="hs-helper_8c_html_a2e62366684e39ea94436bf017e416827"><div class="ttname"><a href="../../dd/d1d/hs-helper_8c.html#a2e62366684e39ea94436bf017e416827">get_value_int16</a></div><div class="ttdeci">REQ_ERROR get_value_int16(const struct afb_req request, const char *source, int16_t *out_id)</div><div class="ttdef"><b>Definition:</b> <a href="../../dd/d1d/hs-helper_8c_source.html#l00048">hs-helper.c:48</a></div></div>
+<div class="ttc" id="hs-helper_8h_html_aa49f1dbbf26f01627a5737cf43aad899add1c84bf80c5f80741ee8f37fef1e12b"><div class="ttname"><a href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899add1c84bf80c5f80741ee8f37fef1e12b">OUT_RANGE</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d3d/hs-helper_8h_source.html#l00031">hs-helper.h:31</a></div></div>
+<div class="ttc" id="hs-helper_8c_html_ac5b0370643c520377afd3fd4891918d2"><div class="ttname"><a href="../../dd/d1d/hs-helper_8c.html#ac5b0370643c520377afd3fd4891918d2">get_value_int32</a></div><div class="ttdeci">REQ_ERROR get_value_int32(const struct afb_req request, const char *source, int32_t *out_id)</div><div class="ttdef"><b>Definition:</b> <a href="../../dd/d1d/hs-helper_8c_source.html#l00072">hs-helper.c:72</a></div></div>
+<div class="ttc" id="hs-helper_8h_html_aa49f1dbbf26f01627a5737cf43aad899aa223eed65c9bee2bf1f4cdecaf90d66a"><div class="ttname"><a href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899aa223eed65c9bee2bf1f4cdecaf90d66a">NOT_NUMBER</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d3d/hs-helper_8h_source.html#l00030">hs-helper.h:30</a></div></div>
+<div class="ttc" id="hs-helper_8h_html_aa49f1dbbf26f01627a5737cf43aad899ab093abb14c097b3b7719debb04d5e8ee"><div class="ttname"><a href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899ab093abb14c097b3b7719debb04d5e8ee">REQ_OK</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d3d/hs-helper_8h_source.html#l00029">hs-helper.h:29</a></div></div>
+<div class="ttc" id="hs-helper_8h_html_aa49f1dbbf26f01627a5737cf43aad899"><div class="ttname"><a href="../../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899">REQ_ERROR</a></div><div class="ttdeci">REQ_ERROR</div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d3d/hs-helper_8h_source.html#l00026">hs-helper.h:26</a></div></div>
+<div class="ttc" id="hs-helper_8c_html_a1ba31a6a94515ff1730ba0043a67d59e"><div class="ttname"><a href="../../dd/d1d/hs-helper_8c.html#a1ba31a6a94515ff1730ba0043a67d59e">hs_add_object_to_json_object</a></div><div class="ttdeci">void hs_add_object_to_json_object(struct json_object *j_obj, int count,...)</div><div class="ttdef"><b>Definition:</b> <a href="../../dd/d1d/hs-helper_8c_source.html#l00096">hs-helper.c:96</a></div></div>
+<div class="ttc" id="hs-helper_8c_html_ae83604a37134e7bdee3ce4f10bb0b47a"><div class="ttname"><a href="../../dd/d1d/hs-helper_8c.html#ae83604a37134e7bdee3ce4f10bb0b47a">hs_add_object_to_json_object_func</a></div><div class="ttdeci">void hs_add_object_to_json_object_func(struct json_object *j_obj, const char *verb_name, int count,...)</div><div class="ttdef"><b>Definition:</b> <a href="../../dd/d1d/hs-helper_8c_source.html#l00125">hs-helper.c:125</a></div></div>
+</div><!-- fragment --></div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="../../doxygen.png" alt="doxygen"/>
+</a> 1.8.13
+</small></address>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/dd/d86/structevent-members.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/dd/d86/structevent-members.html
new file mode 100644
index 0000000..8f15215
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/dd/d86/structevent-members.html
@@ -0,0 +1,78 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>HomeScreenBinding: Member List</title>
+<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="../../jquery.js"></script>
+<script type="text/javascript" src="../../dynsections.js"></script>
+<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="../../search/searchdata.js"></script>
+<script type="text/javascript" src="../../search/search.js"></script>
+<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+ <td id="projectalign" style="padding-left: 0.5em;">
+ <div id="projectname">HomeScreenBinding
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.13 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
+</script>
+<script type="text/javascript" src="../../menudata.js"></script>
+<script type="text/javascript" src="../../menu.js"></script>
+<script type="text/javascript">
+$(function() {
+ initMenu('../../',true,false,'search.php','Search');
+ $(document).ready(function() { init_search(); });
+});
+</script>
+<div id="main-nav"></div>
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+ onmouseover="return searchBox.OnSearchSelectShow()"
+ onmouseout="return searchBox.OnSearchSelectHide()"
+ onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0"
+ name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+</div><!-- top -->
+<div class="header">
+ <div class="headertitle">
+<div class="title">event Member List</div> </div>
+</div><!--header-->
+<div class="contents">
+
+<p>This is the complete list of members for <a class="el" href="../../df/d7d/structevent.html">event</a>, including all inherited members.</p>
+<table class="directory">
+ <tr class="even"><td class="entry"><a class="el" href="../../df/d7d/structevent.html#a58726ebc551d36562ac3f9e1fe293214">event</a></td><td class="entry"><a class="el" href="../../df/d7d/structevent.html">event</a></td><td class="entry"></td></tr>
+ <tr><td class="entry"><a class="el" href="../../df/d7d/structevent.html#a45c6cfb7961a21a3366db067e4cc59ab">name</a></td><td class="entry"><a class="el" href="../../df/d7d/structevent.html">event</a></td><td class="entry"></td></tr>
+</table></div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="../../doxygen.png" alt="doxygen"/>
+</a> 1.8.13
+</small></address>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/de/dd0/class_lib_home_screen.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/de/dd0/class_lib_home_screen.html
new file mode 100644
index 0000000..2181e10
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/de/dd0/class_lib_home_screen.html
@@ -0,0 +1,844 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>HomeScreenBinding: LibHomeScreen Class Reference</title>
+<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="../../jquery.js"></script>
+<script type="text/javascript" src="../../dynsections.js"></script>
+<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="../../search/searchdata.js"></script>
+<script type="text/javascript" src="../../search/search.js"></script>
+<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+ <td id="projectalign" style="padding-left: 0.5em;">
+ <div id="projectname">HomeScreenBinding
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.13 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
+</script>
+<script type="text/javascript" src="../../menudata.js"></script>
+<script type="text/javascript" src="../../menu.js"></script>
+<script type="text/javascript">
+$(function() {
+ initMenu('../../',true,false,'search.php','Search');
+ $(document).ready(function() { init_search(); });
+});
+</script>
+<div id="main-nav"></div>
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+ onmouseover="return searchBox.OnSearchSelectShow()"
+ onmouseout="return searchBox.OnSearchSelectHide()"
+ onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0"
+ name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+</div><!-- top -->
+<div class="header">
+ <div class="summary">
+<a href="#pub-types">Public Types</a> &#124;
+<a href="#pub-methods">Public Member Functions</a> &#124;
+<a href="#pub-static-attribs">Static Public Attributes</a> &#124;
+<a href="../../d7/df4/class_lib_home_screen-members.html">List of all members</a> </div>
+ <div class="headertitle">
+<div class="title">LibHomeScreen Class Reference</div> </div>
+</div><!--header-->
+<div class="contents">
+
+<p><code>#include &lt;<a class="el" href="../../df/d43/libhomescreen_8hpp_source.html">libhomescreen.hpp</a>&gt;</code></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
+Public Types</h2></td></tr>
+<tr class="memitem:a82616c91ac211d2ad08e709b524bf154"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154">EventType</a> { <a class="el" href="../../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154a4b0a82d501e4db5fbfe25c254c92896f">Event_TapShortcut</a> = 1,
+<a class="el" href="../../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154aea56fa32a124a8ddcbea127755280a1d">Event_OnScreenMessage</a>,
+<a class="el" href="../../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154acae91db4efc2394fd701f581d277a3fd">Event_OnScreenReply</a>
+ }</td></tr>
+<tr class="separator:a82616c91ac211d2ad08e709b524bf154"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a334f11f81c84c98d18284215dcaada3a"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/dd0/class_lib_home_screen.html#a334f11f81c84c98d18284215dcaada3a">handler_func</a> = std::function&lt; void(json_object *)&gt;</td></tr>
+<tr class="separator:a334f11f81c84c98d18284215dcaada3a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table><table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
+Public Member Functions</h2></td></tr>
+<tr class="memitem:a724bd949c4154fad041f96a15ef0f5dc"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/dd0/class_lib_home_screen.html#a724bd949c4154fad041f96a15ef0f5dc">LibHomeScreen</a> ()</td></tr>
+<tr class="separator:a724bd949c4154fad041f96a15ef0f5dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a249902aebf71a5383ca8ec6ae558d095"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/dd0/class_lib_home_screen.html#a249902aebf71a5383ca8ec6ae558d095">~LibHomeScreen</a> ()</td></tr>
+<tr class="separator:a249902aebf71a5383ca8ec6ae558d095"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a0fff2f703c8ce184eb9edd133e0f4137"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/dd0/class_lib_home_screen.html#a0fff2f703c8ce184eb9edd133e0f4137">LibHomeScreen</a> (const <a class="el" href="../../de/dd0/class_lib_home_screen.html">LibHomeScreen</a> &amp;)=delete</td></tr>
+<tr class="separator:a0fff2f703c8ce184eb9edd133e0f4137"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a23bc17798453cfca50904562736f6b25"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../de/dd0/class_lib_home_screen.html">LibHomeScreen</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/dd0/class_lib_home_screen.html#a23bc17798453cfca50904562736f6b25">operator=</a> (const <a class="el" href="../../de/dd0/class_lib_home_screen.html">LibHomeScreen</a> &amp;)=delete</td></tr>
+<tr class="separator:a23bc17798453cfca50904562736f6b25"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a6a57b573cc767725762ba9beab032220"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/dd0/class_lib_home_screen.html#a6a57b573cc767725762ba9beab032220">init</a> (const int port, const std::string &amp;token)</td></tr>
+<tr class="separator:a6a57b573cc767725762ba9beab032220"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:afb571c9577087b47065eb23e7fdbc903"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/dd0/class_lib_home_screen.html#afb571c9577087b47065eb23e7fdbc903">tapShortcut</a> (const char *application_name)</td></tr>
+<tr class="separator:afb571c9577087b47065eb23e7fdbc903"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ac336482036a72b51a822725f1929523c"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/dd0/class_lib_home_screen.html#ac336482036a72b51a822725f1929523c">onScreenMessage</a> (const char *display_message)</td></tr>
+<tr class="separator:ac336482036a72b51a822725f1929523c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a6c065f41f2c5d1f58d2763bfb4da9c37"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/dd0/class_lib_home_screen.html#a6c065f41f2c5d1f58d2763bfb4da9c37">onScreenReply</a> (const char *reply_message)</td></tr>
+<tr class="separator:a6c065f41f2c5d1f58d2763bfb4da9c37"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ab1b0e08bf35415de9064afed899e9f85"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/dd0/class_lib_home_screen.html#ab1b0e08bf35415de9064afed899e9f85">set_event_handler</a> (enum <a class="el" href="../../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154">EventType</a> et, <a class="el" href="../../de/dd0/class_lib_home_screen.html#a334f11f81c84c98d18284215dcaada3a">handler_func</a> f)</td></tr>
+<tr class="separator:ab1b0e08bf35415de9064afed899e9f85"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a2789e8a5372202cc36f48e71dbb9b7cf"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/dd0/class_lib_home_screen.html#a2789e8a5372202cc36f48e71dbb9b7cf">registerCallback</a> (void(*event_cb)(const std::string &amp;<a class="el" href="../../df/d7d/structevent.html">event</a>, struct json_object *event_contents), void(*reply_cb)(struct json_object *reply_contents), void(*hangup_cb)(void)=nullptr)</td></tr>
+<tr class="separator:a2789e8a5372202cc36f48e71dbb9b7cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a527b49dcfe581be6275d0eb2236ba37f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/dd0/class_lib_home_screen.html#a527b49dcfe581be6275d0eb2236ba37f">call</a> (const std::string &amp;verb, struct json_object *arg)</td></tr>
+<tr class="separator:a527b49dcfe581be6275d0eb2236ba37f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ab5e8e8ab7d53e0f114e9e907fcbb7643"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/dd0/class_lib_home_screen.html#ab5e8e8ab7d53e0f114e9e907fcbb7643">call</a> (const char *verb, struct json_object *arg)</td></tr>
+<tr class="separator:ab5e8e8ab7d53e0f114e9e907fcbb7643"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aa4c189807b75d070f567967f0d690738"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/dd0/class_lib_home_screen.html#aa4c189807b75d070f567967f0d690738">subscribe</a> (const std::string &amp;event_name)</td></tr>
+<tr class="separator:aa4c189807b75d070f567967f0d690738"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aac03a45cbd453ba69ddb00c1016930a6"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/dd0/class_lib_home_screen.html#aac03a45cbd453ba69ddb00c1016930a6">unsubscribe</a> (const std::string &amp;event_name)</td></tr>
+<tr class="separator:aac03a45cbd453ba69ddb00c1016930a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ab1c1fa69f24b981e824dd9fb810c4b74"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/dd0/class_lib_home_screen.html#ab1c1fa69f24b981e824dd9fb810c4b74">on_hangup</a> (void *closure, struct afb_wsj1 *wsj)</td></tr>
+<tr class="separator:ab1c1fa69f24b981e824dd9fb810c4b74"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a608638eb87b2772a3dcc92d8ca8f3596"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/dd0/class_lib_home_screen.html#a608638eb87b2772a3dcc92d8ca8f3596">on_call</a> (void *closure, const char *api, const char *verb, struct afb_wsj1_msg *msg)</td></tr>
+<tr class="separator:a608638eb87b2772a3dcc92d8ca8f3596"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a9c4885b51b43ab24a548d49fb3ab2de3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/dd0/class_lib_home_screen.html#a9c4885b51b43ab24a548d49fb3ab2de3">on_event</a> (void *closure, const char *<a class="el" href="../../df/d7d/structevent.html">event</a>, struct afb_wsj1_msg *msg)</td></tr>
+<tr class="separator:a9c4885b51b43ab24a548d49fb3ab2de3"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a248d9648c6186287a7632ec1c75fc9c5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/dd0/class_lib_home_screen.html#a248d9648c6186287a7632ec1c75fc9c5">on_reply</a> (void *closure, struct afb_wsj1_msg *msg)</td></tr>
+<tr class="separator:a248d9648c6186287a7632ec1c75fc9c5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table><table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-attribs"></a>
+Static Public Attributes</h2></td></tr>
+<tr class="memitem:a5593ff5ac78f6495ccb649904cf0ab08"><td class="memItemLeft" align="right" valign="top">static const std::vector&lt; std::string &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/dd0/class_lib_home_screen.html#a5593ff5ac78f6495ccb649904cf0ab08">api_list</a></td></tr>
+<tr class="separator:a5593ff5ac78f6495ccb649904cf0ab08"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a6a6d8a4d33a006a08652e7377a4c29e9"><td class="memItemLeft" align="right" valign="top">static const std::vector&lt; std::string &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/dd0/class_lib_home_screen.html#a6a6d8a4d33a006a08652e7377a4c29e9">event_list</a></td></tr>
+<tr class="separator:a6a6d8a4d33a006a08652e7377a4c29e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock">
+<p class="definition">Definition at line <a class="el" href="../../df/d43/libhomescreen_8hpp_source.html#l00032">32</a> of file <a class="el" href="../../df/d43/libhomescreen_8hpp_source.html">libhomescreen.hpp</a>.</p>
+</div><h2 class="groupheader">Member Typedef Documentation</h2>
+<a id="a334f11f81c84c98d18284215dcaada3a"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a334f11f81c84c98d18284215dcaada3a">&#9670;&nbsp;</a></span>handler_func</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">using <a class="el" href="../../de/dd0/class_lib_home_screen.html#a334f11f81c84c98d18284215dcaada3a">LibHomeScreen::handler_func</a> = std::function&lt;void(json_object*)&gt;</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p class="definition">Definition at line <a class="el" href="../../df/d43/libhomescreen_8hpp_source.html#l00042">42</a> of file <a class="el" href="../../df/d43/libhomescreen_8hpp_source.html">libhomescreen.hpp</a>.</p>
+
+</div>
+</div>
+<h2 class="groupheader">Member Enumeration Documentation</h2>
+<a id="a82616c91ac211d2ad08e709b524bf154"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a82616c91ac211d2ad08e709b524bf154">&#9670;&nbsp;</a></span>EventType</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">enum <a class="el" href="../../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154">LibHomeScreen::EventType</a></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<table class="fieldtable">
+<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a82616c91ac211d2ad08e709b524bf154a4b0a82d501e4db5fbfe25c254c92896f"></a>Event_TapShortcut&#160;</td><td class="fielddoc"></td></tr>
+<tr><td class="fieldname"><a id="a82616c91ac211d2ad08e709b524bf154aea56fa32a124a8ddcbea127755280a1d"></a>Event_OnScreenMessage&#160;</td><td class="fielddoc"></td></tr>
+<tr><td class="fieldname"><a id="a82616c91ac211d2ad08e709b524bf154acae91db4efc2394fd701f581d277a3fd"></a>Event_OnScreenReply&#160;</td><td class="fielddoc"></td></tr>
+</table>
+
+<p class="definition">Definition at line <a class="el" href="../../df/d43/libhomescreen_8hpp_source.html#l00044">44</a> of file <a class="el" href="../../df/d43/libhomescreen_8hpp_source.html">libhomescreen.hpp</a>.</p>
+<div class="fragment"><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160; {</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160; <a class="code" href="../../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154a4b0a82d501e4db5fbfe25c254c92896f">Event_TapShortcut</a> = 1,</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160; <a class="code" href="../../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154aea56fa32a124a8ddcbea127755280a1d">Event_OnScreenMessage</a>,</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160; <a class="code" href="../../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154acae91db4efc2394fd701f581d277a3fd">Event_OnScreenReply</a></div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160; };</div><div class="ttc" id="class_lib_home_screen_html_a82616c91ac211d2ad08e709b524bf154aea56fa32a124a8ddcbea127755280a1d"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154aea56fa32a124a8ddcbea127755280a1d">LibHomeScreen::Event_OnScreenMessage</a></div><div class="ttdef"><b>Definition:</b> <a href="../../df/d43/libhomescreen_8hpp_source.html#l00046">libhomescreen.hpp:46</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_a82616c91ac211d2ad08e709b524bf154acae91db4efc2394fd701f581d277a3fd"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154acae91db4efc2394fd701f581d277a3fd">LibHomeScreen::Event_OnScreenReply</a></div><div class="ttdef"><b>Definition:</b> <a href="../../df/d43/libhomescreen_8hpp_source.html#l00047">libhomescreen.hpp:47</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_a82616c91ac211d2ad08e709b524bf154a4b0a82d501e4db5fbfe25c254c92896f"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154a4b0a82d501e4db5fbfe25c254c92896f">LibHomeScreen::Event_TapShortcut</a></div><div class="ttdef"><b>Definition:</b> <a href="../../df/d43/libhomescreen_8hpp_source.html#l00045">libhomescreen.hpp:45</a></div></div>
+</div><!-- fragment -->
+</div>
+</div>
+<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
+<a id="a724bd949c4154fad041f96a15ef0f5dc"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a724bd949c4154fad041f96a15ef0f5dc">&#9670;&nbsp;</a></span>LibHomeScreen() <span class="overload">[1/2]</span></h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LibHomeScreen::LibHomeScreen </td>
+ <td>(</td>
+ <td class="paramname"></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>constructor </p>
+
+<p class="definition">Definition at line <a class="el" href="../../d0/d8a/libhomescreen_8cpp_source.html#l00083">83</a> of file <a class="el" href="../../d0/d8a/libhomescreen_8cpp_source.html">libhomescreen.cpp</a>.</p>
+<div class="fragment"><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160;{</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160;}</div></div><!-- fragment -->
+</div>
+</div>
+<a id="a249902aebf71a5383ca8ec6ae558d095"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a249902aebf71a5383ca8ec6ae558d095">&#9670;&nbsp;</a></span>~LibHomeScreen()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LibHomeScreen::~LibHomeScreen </td>
+ <td>(</td>
+ <td class="paramname"></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>destructor </p>
+
+<p class="definition">Definition at line <a class="el" href="../../d0/d8a/libhomescreen_8cpp_source.html#l00090">90</a> of file <a class="el" href="../../d0/d8a/libhomescreen_8cpp_source.html">libhomescreen.cpp</a>.</p>
+<div class="fragment"><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160;{</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160; <span class="keywordflow">if</span>(mploop)</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160; {</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160; sd_event_unref(mploop);</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160; }</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160; <span class="keywordflow">if</span>(sp_websock != NULL)</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160; {</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160; afb_wsj1_unref(sp_websock);</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160; }</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160;}</div></div><!-- fragment -->
+</div>
+</div>
+<a id="a0fff2f703c8ce184eb9edd133e0f4137"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a0fff2f703c8ce184eb9edd133e0f4137">&#9670;&nbsp;</a></span>LibHomeScreen() <span class="overload">[2/2]</span></h2>
+
+<div class="memitem">
+<div class="memproto">
+<table class="mlabels">
+ <tr>
+ <td class="mlabels-left">
+ <table class="memname">
+ <tr>
+ <td class="memname">LibHomeScreen::LibHomeScreen </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="../../de/dd0/class_lib_home_screen.html">LibHomeScreen</a> &amp;&#160;</td>
+ <td class="paramname"></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+ </td>
+ <td class="mlabels-right">
+<span class="mlabels"><span class="mlabel">delete</span></span> </td>
+ </tr>
+</table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<h2 class="groupheader">Member Function Documentation</h2>
+<a id="a527b49dcfe581be6275d0eb2236ba37f"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a527b49dcfe581be6275d0eb2236ba37f">&#9670;&nbsp;</a></span>call() <span class="overload">[1/2]</span></h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">int LibHomeScreen::call </td>
+ <td>(</td>
+ <td class="paramtype">const std::string &amp;&#160;</td>
+ <td class="paramname"><em>verb</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">struct json_object *&#160;</td>
+ <td class="paramname"><em>arg</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="ab5e8e8ab7d53e0f114e9e907fcbb7643"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ab5e8e8ab7d53e0f114e9e907fcbb7643">&#9670;&nbsp;</a></span>call() <span class="overload">[2/2]</span></h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">int LibHomeScreen::call </td>
+ <td>(</td>
+ <td class="paramtype">const char *&#160;</td>
+ <td class="paramname"><em>verb</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">struct json_object *&#160;</td>
+ <td class="paramname"><em>arg</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>This function calls the API of HomeScreen via WebSocket This function is overload function of "call"</p>
+<h4>Parameters</h4>
+<ul>
+<li>verb [in] : This argument should be specified to the API name (e.g. "tap_shortcut")</li>
+<li>arg [in] : This argument should be specified to the argument of API. And this argument expects JSON object</li>
+</ul>
+<h4>Return</h4>
+<ul>
+<li>Returns 0 on success or -1 in case of error.</li>
+</ul>
+<h4>Note</h4>
+<p>To call HomeScreen's APIs, the application should set its function name, arguments to JSON format. </p>
+
+<p class="definition">Definition at line <a class="el" href="../../d0/d8a/libhomescreen_8cpp_source.html#l00360">360</a> of file <a class="el" href="../../d0/d8a/libhomescreen_8cpp_source.html">libhomescreen.cpp</a>.</p>
+<div class="fragment"><div class="line"><a name="l00361"></a><span class="lineno"> 361</span>&#160;{</div><div class="line"><a name="l00362"></a><span class="lineno"> 362</span>&#160; <span class="keywordtype">int</span> ret;</div><div class="line"><a name="l00363"></a><span class="lineno"> 363</span>&#160; <span class="keywordflow">if</span>(!sp_websock)</div><div class="line"><a name="l00364"></a><span class="lineno"> 364</span>&#160; {</div><div class="line"><a name="l00365"></a><span class="lineno"> 365</span>&#160; <span class="keywordflow">return</span> -1;</div><div class="line"><a name="l00366"></a><span class="lineno"> 366</span>&#160; }</div><div class="line"><a name="l00367"></a><span class="lineno"> 367</span>&#160; <span class="keywordflow">if</span> (!<a class="code" href="../../d0/d8a/libhomescreen_8cpp.html#a7a2176c3d71fec0f09dcb2aa0866b17e">has_verb</a>(<span class="keywordtype">string</span>(verb)))</div><div class="line"><a name="l00368"></a><span class="lineno"> 368</span>&#160; {</div><div class="line"><a name="l00369"></a><span class="lineno"> 369</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#a65bb6c7cfe38f8a724beab5059d36fb2">HMI_ERROR</a>(<span class="stringliteral">&quot;libhomescreen&quot;</span>,<span class="stringliteral">&quot;verb doesn&#39;t exit&quot;</span>);</div><div class="line"><a name="l00370"></a><span class="lineno"> 370</span>&#160; <span class="keywordflow">return</span> -1;</div><div class="line"><a name="l00371"></a><span class="lineno"> 371</span>&#160; }</div><div class="line"><a name="l00372"></a><span class="lineno"> 372</span>&#160; ret = afb_wsj1_call_j(sp_websock, <a class="code" href="../../d0/d8a/libhomescreen_8cpp.html#a1e2d6e77dd8f0162f830058579eab42f">API</a>, verb, arg, <a class="code" href="../../d0/d8a/libhomescreen_8cpp.html#a7778933bffa862c63fa0a1b8219faa8b">_on_reply_static</a>, <span class="keyword">this</span>);</div><div class="line"><a name="l00373"></a><span class="lineno"> 373</span>&#160; <span class="keywordflow">if</span> (ret &lt; 0) {</div><div class="line"><a name="l00374"></a><span class="lineno"> 374</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#a65bb6c7cfe38f8a724beab5059d36fb2">HMI_ERROR</a>(<span class="stringliteral">&quot;libhomescreen&quot;</span>,<span class="stringliteral">&quot;Failed to call verb:%s&quot;</span>,verb);</div><div class="line"><a name="l00375"></a><span class="lineno"> 375</span>&#160; }</div><div class="line"><a name="l00376"></a><span class="lineno"> 376</span>&#160; <span class="keywordflow">return</span> ret;</div><div class="line"><a name="l00377"></a><span class="lineno"> 377</span>&#160;}</div><div class="ttc" id="hmi-debug_8h_html_a65bb6c7cfe38f8a724beab5059d36fb2"><div class="ttname"><a href="../../df/d76/hmi-debug_8h.html#a65bb6c7cfe38f8a724beab5059d36fb2">HMI_ERROR</a></div><div class="ttdeci">#define HMI_ERROR(prefix, args,...)</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d76/hmi-debug_8h_source.html#l00018">hmi-debug.h:18</a></div></div>
+<div class="ttc" id="libhomescreen_8cpp_html_a1e2d6e77dd8f0162f830058579eab42f"><div class="ttname"><a href="../../d0/d8a/libhomescreen_8cpp.html#a1e2d6e77dd8f0162f830058579eab42f">API</a></div><div class="ttdeci">static const char API[]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d8a/libhomescreen_8cpp_source.html#l00036">libhomescreen.cpp:36</a></div></div>
+<div class="ttc" id="libhomescreen_8cpp_html_a7a2176c3d71fec0f09dcb2aa0866b17e"><div class="ttname"><a href="../../d0/d8a/libhomescreen_8cpp.html#a7a2176c3d71fec0f09dcb2aa0866b17e">has_verb</a></div><div class="ttdeci">static bool has_verb(const string &amp;verb)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d8a/libhomescreen_8cpp_source.html#l00518">libhomescreen.cpp:518</a></div></div>
+<div class="ttc" id="libhomescreen_8cpp_html_a7778933bffa862c63fa0a1b8219faa8b"><div class="ttname"><a href="../../d0/d8a/libhomescreen_8cpp.html#a7778933bffa862c63fa0a1b8219faa8b">_on_reply_static</a></div><div class="ttdeci">static void _on_reply_static(void *closure, struct afb_wsj1_msg *msg)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d8a/libhomescreen_8cpp_source.html#l00074">libhomescreen.cpp:74</a></div></div>
+</div><!-- fragment -->
+</div>
+</div>
+<a id="a6a57b573cc767725762ba9beab032220"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a6a57b573cc767725762ba9beab032220">&#9670;&nbsp;</a></span>init()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">int LibHomeScreen::init </td>
+ <td>(</td>
+ <td class="paramtype">const int&#160;</td>
+ <td class="paramname"><em>port</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const std::string &amp;&#160;</td>
+ <td class="paramname"><em>token</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>This function is initializer</p>
+<h4>Parameters</h4>
+<ul>
+<li>port [in] : This argument should be specified to the port number to be used for websocket</li>
+<li>token [in] : This argument should be specified to the token to be used for websocket</li>
+</ul>
+<h4>Return</h4>
+<p>Nothing</p>
+<h4>Note</h4>
+<p>Use this constructor </p>
+
+<p class="definition">Definition at line <a class="el" href="../../d0/d8a/libhomescreen_8cpp_source.html#l00116">116</a> of file <a class="el" href="../../d0/d8a/libhomescreen_8cpp_source.html">libhomescreen.cpp</a>.</p>
+<div class="fragment"><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160;{</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160; <span class="keywordtype">int</span> ret = 0;</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160; <span class="keywordflow">if</span>(port &gt; 0 &amp;&amp; token.size() &gt; 0)</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160; {</div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160; mport = port;</div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160; mtoken = token;</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160; }</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160; <span class="keywordflow">else</span></div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160; {</div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#a65bb6c7cfe38f8a724beab5059d36fb2">HMI_ERROR</a>(<span class="stringliteral">&quot;libhomescreen&quot;</span>,<span class="stringliteral">&quot;port and token should be &gt; 0, Initial port and token uses.&quot;</span>);</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160; }</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160;</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160; ret = initialize_websocket();</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160; <span class="keywordflow">if</span>(ret != 0 )</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160; {</div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#a65bb6c7cfe38f8a724beab5059d36fb2">HMI_ERROR</a>(<span class="stringliteral">&quot;libhomescreen&quot;</span>,<span class="stringliteral">&quot;Failed to initialize websocket&quot;</span>);</div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160; }</div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160; <span class="keywordflow">else</span>{</div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#a0d26d8b8201011dade787236519711c0">HMI_DEBUG</a>(<span class="stringliteral">&quot;libhomescreen&quot;</span>,<span class="stringliteral">&quot;Initialized&quot;</span>);</div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160; }</div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160;</div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160; <span class="keywordflow">return</span> ret;</div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160;}</div><div class="ttc" id="hmi-debug_8h_html_a65bb6c7cfe38f8a724beab5059d36fb2"><div class="ttname"><a href="../../df/d76/hmi-debug_8h.html#a65bb6c7cfe38f8a724beab5059d36fb2">HMI_ERROR</a></div><div class="ttdeci">#define HMI_ERROR(prefix, args,...)</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d76/hmi-debug_8h_source.html#l00018">hmi-debug.h:18</a></div></div>
+<div class="ttc" id="hmi-debug_8h_html_a0d26d8b8201011dade787236519711c0"><div class="ttname"><a href="../../df/d76/hmi-debug_8h.html#a0d26d8b8201011dade787236519711c0">HMI_DEBUG</a></div><div class="ttdeci">#define HMI_DEBUG(prefix, args,...)</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d76/hmi-debug_8h_source.html#l00022">hmi-debug.h:22</a></div></div>
+</div><!-- fragment -->
+</div>
+</div>
+<a id="a608638eb87b2772a3dcc92d8ca8f3596"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a608638eb87b2772a3dcc92d8ca8f3596">&#9670;&nbsp;</a></span>on_call()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void LibHomeScreen::on_call </td>
+ <td>(</td>
+ <td class="paramtype">void *&#160;</td>
+ <td class="paramname"><em>closure</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const char *&#160;</td>
+ <td class="paramname"><em>api</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const char *&#160;</td>
+ <td class="paramname"><em>verb</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">struct afb_wsj1_msg *&#160;</td>
+ <td class="paramname"><em>msg</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p class="definition">Definition at line <a class="el" href="../../d0/d8a/libhomescreen_8cpp_source.html#l00448">448</a> of file <a class="el" href="../../d0/d8a/libhomescreen_8cpp_source.html">libhomescreen.cpp</a>.</p>
+<div class="fragment"><div class="line"><a name="l00449"></a><span class="lineno"> 449</span>&#160;{</div><div class="line"><a name="l00450"></a><span class="lineno"> 450</span>&#160;}</div></div><!-- fragment -->
+</div>
+</div>
+<a id="a9c4885b51b43ab24a548d49fb3ab2de3"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a9c4885b51b43ab24a548d49fb3ab2de3">&#9670;&nbsp;</a></span>on_event()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void LibHomeScreen::on_event </td>
+ <td>(</td>
+ <td class="paramtype">void *&#160;</td>
+ <td class="paramname"><em>closure</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const char *&#160;</td>
+ <td class="paramname"><em>event</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">struct afb_wsj1_msg *&#160;</td>
+ <td class="paramname"><em>msg</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p class="definition">Definition at line <a class="el" href="../../d0/d8a/libhomescreen_8cpp_source.html#l00458">458</a> of file <a class="el" href="../../d0/d8a/libhomescreen_8cpp_source.html">libhomescreen.cpp</a>.</p>
+<div class="fragment"><div class="line"><a name="l00459"></a><span class="lineno"> 459</span>&#160;{</div><div class="line"><a name="l00460"></a><span class="lineno"> 460</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#a0d26d8b8201011dade787236519711c0">HMI_DEBUG</a>(<span class="stringliteral">&quot;libhomescreen&quot;</span>,<span class="stringliteral">&quot;event: (%s) msg: (%s).&quot;</span>, <a class="code" href="../../df/d7d/structevent.html">event</a>, afb_wsj1_msg_object_s(msg));</div><div class="line"><a name="l00461"></a><span class="lineno"> 461</span>&#160;</div><div class="line"><a name="l00462"></a><span class="lineno"> 462</span>&#160; <span class="keywordflow">if</span> (strstr(<a class="code" href="../../df/d7d/structevent.html">event</a>, <a class="code" href="../../d0/d8a/libhomescreen_8cpp.html#a1e2d6e77dd8f0162f830058579eab42f">API</a>) == NULL) {</div><div class="line"><a name="l00463"></a><span class="lineno"> 463</span>&#160; <span class="keywordflow">return</span>;</div><div class="line"><a name="l00464"></a><span class="lineno"> 464</span>&#160; }</div><div class="line"><a name="l00465"></a><span class="lineno"> 465</span>&#160;</div><div class="line"><a name="l00466"></a><span class="lineno"> 466</span>&#160; <span class="keyword">struct </span>json_object* ev_contents = afb_wsj1_msg_object_j(msg);</div><div class="line"><a name="l00467"></a><span class="lineno"> 467</span>&#160; <span class="keyword">struct </span>json_object *json_data = json_object_object_get(ev_contents, <span class="stringliteral">&quot;data&quot;</span>);</div><div class="line"><a name="l00468"></a><span class="lineno"> 468</span>&#160;</div><div class="line"><a name="l00469"></a><span class="lineno"> 469</span>&#160; <span class="keywordflow">if</span>(onEvent != <span class="keyword">nullptr</span>)</div><div class="line"><a name="l00470"></a><span class="lineno"> 470</span>&#160; {</div><div class="line"><a name="l00471"></a><span class="lineno"> 471</span>&#160; <span class="keyword">const</span> <span class="keywordtype">string</span> ev(<a class="code" href="../../df/d7d/structevent.html">event</a>);</div><div class="line"><a name="l00472"></a><span class="lineno"> 472</span>&#160; onEvent(ev, ev_contents);</div><div class="line"><a name="l00473"></a><span class="lineno"> 473</span>&#160; }</div><div class="line"><a name="l00474"></a><span class="lineno"> 474</span>&#160;</div><div class="line"><a name="l00475"></a><span class="lineno"> 475</span>&#160; <span class="keyword">const</span> <span class="keywordtype">char</span>* event_only = strchr(<a class="code" href="../../df/d7d/structevent.html">event</a>, <span class="charliteral">&#39;/&#39;</span>);</div><div class="line"><a name="l00476"></a><span class="lineno"> 476</span>&#160; <span class="keywordflow">if</span> (event_only != <span class="keyword">nullptr</span>) {</div><div class="line"><a name="l00477"></a><span class="lineno"> 477</span>&#160; event_only = event_only + 1;</div><div class="line"><a name="l00478"></a><span class="lineno"> 478</span>&#160; }</div><div class="line"><a name="l00479"></a><span class="lineno"> 479</span>&#160;</div><div class="line"><a name="l00480"></a><span class="lineno"> 480</span>&#160; <span class="keywordflow">if</span> (strcasecmp(event_only, <a class="code" href="../../de/dd0/class_lib_home_screen.html#a6a6d8a4d33a006a08652e7377a4c29e9">LibHomeScreen::event_list</a>[0].c_str()) == 0) {</div><div class="line"><a name="l00481"></a><span class="lineno"> 481</span>&#160; <span class="keyword">auto</span> i = this-&gt;handlers.find(<a class="code" href="../../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154a4b0a82d501e4db5fbfe25c254c92896f">Event_TapShortcut</a>);</div><div class="line"><a name="l00482"></a><span class="lineno"> 482</span>&#160; <span class="keywordflow">if</span> ( i != this-&gt;handlers.end() ) {</div><div class="line"><a name="l00483"></a><span class="lineno"> 483</span>&#160; i-&gt;second(json_data);</div><div class="line"><a name="l00484"></a><span class="lineno"> 484</span>&#160; }</div><div class="line"><a name="l00485"></a><span class="lineno"> 485</span>&#160; }</div><div class="line"><a name="l00486"></a><span class="lineno"> 486</span>&#160; <span class="keywordflow">else</span> <span class="keywordflow">if</span> (strcasecmp(event_only, <a class="code" href="../../de/dd0/class_lib_home_screen.html#a6a6d8a4d33a006a08652e7377a4c29e9">LibHomeScreen::event_list</a>[1].c_str()) == 0) {</div><div class="line"><a name="l00487"></a><span class="lineno"> 487</span>&#160; <span class="keyword">auto</span> i = this-&gt;handlers.find(<a class="code" href="../../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154aea56fa32a124a8ddcbea127755280a1d">Event_OnScreenMessage</a>);</div><div class="line"><a name="l00488"></a><span class="lineno"> 488</span>&#160; <span class="keywordflow">if</span> ( i != this-&gt;handlers.end() ) {</div><div class="line"><a name="l00489"></a><span class="lineno"> 489</span>&#160; i-&gt;second(json_data);</div><div class="line"><a name="l00490"></a><span class="lineno"> 490</span>&#160; }</div><div class="line"><a name="l00491"></a><span class="lineno"> 491</span>&#160; }</div><div class="line"><a name="l00492"></a><span class="lineno"> 492</span>&#160; <span class="keywordflow">else</span> <span class="keywordflow">if</span> (strcasecmp(event_only, <a class="code" href="../../de/dd0/class_lib_home_screen.html#a6a6d8a4d33a006a08652e7377a4c29e9">LibHomeScreen::event_list</a>[2].c_str()) == 0) {</div><div class="line"><a name="l00493"></a><span class="lineno"> 493</span>&#160; <span class="keyword">auto</span> i = this-&gt;handlers.find(<a class="code" href="../../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154acae91db4efc2394fd701f581d277a3fd">Event_OnScreenReply</a>);</div><div class="line"><a name="l00494"></a><span class="lineno"> 494</span>&#160; <span class="keywordflow">if</span> ( i != this-&gt;handlers.end() ) {</div><div class="line"><a name="l00495"></a><span class="lineno"> 495</span>&#160; i-&gt;second(json_data);</div><div class="line"><a name="l00496"></a><span class="lineno"> 496</span>&#160; }</div><div class="line"><a name="l00497"></a><span class="lineno"> 497</span>&#160; }</div><div class="line"><a name="l00498"></a><span class="lineno"> 498</span>&#160;</div><div class="line"><a name="l00499"></a><span class="lineno"> 499</span>&#160; json_object_put(ev_contents);</div><div class="line"><a name="l00500"></a><span class="lineno"> 500</span>&#160;}</div><div class="ttc" id="hmi-debug_8h_html_a0d26d8b8201011dade787236519711c0"><div class="ttname"><a href="../../df/d76/hmi-debug_8h.html#a0d26d8b8201011dade787236519711c0">HMI_DEBUG</a></div><div class="ttdeci">#define HMI_DEBUG(prefix, args,...)</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d76/hmi-debug_8h_source.html#l00022">hmi-debug.h:22</a></div></div>
+<div class="ttc" id="structevent_html"><div class="ttname"><a href="../../df/d7d/structevent.html">event</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00035">homescreen.c:35</a></div></div>
+<div class="ttc" id="libhomescreen_8cpp_html_a1e2d6e77dd8f0162f830058579eab42f"><div class="ttname"><a href="../../d0/d8a/libhomescreen_8cpp.html#a1e2d6e77dd8f0162f830058579eab42f">API</a></div><div class="ttdeci">static const char API[]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d8a/libhomescreen_8cpp_source.html#l00036">libhomescreen.cpp:36</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_a82616c91ac211d2ad08e709b524bf154aea56fa32a124a8ddcbea127755280a1d"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154aea56fa32a124a8ddcbea127755280a1d">LibHomeScreen::Event_OnScreenMessage</a></div><div class="ttdef"><b>Definition:</b> <a href="../../df/d43/libhomescreen_8hpp_source.html#l00046">libhomescreen.hpp:46</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_a82616c91ac211d2ad08e709b524bf154acae91db4efc2394fd701f581d277a3fd"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154acae91db4efc2394fd701f581d277a3fd">LibHomeScreen::Event_OnScreenReply</a></div><div class="ttdef"><b>Definition:</b> <a href="../../df/d43/libhomescreen_8hpp_source.html#l00047">libhomescreen.hpp:47</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_a6a6d8a4d33a006a08652e7377a4c29e9"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#a6a6d8a4d33a006a08652e7377a4c29e9">LibHomeScreen::event_list</a></div><div class="ttdeci">static const std::vector&lt; std::string &gt; event_list</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d43/libhomescreen_8hpp_source.html#l00051">libhomescreen.hpp:51</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_a82616c91ac211d2ad08e709b524bf154a4b0a82d501e4db5fbfe25c254c92896f"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154a4b0a82d501e4db5fbfe25c254c92896f">LibHomeScreen::Event_TapShortcut</a></div><div class="ttdef"><b>Definition:</b> <a href="../../df/d43/libhomescreen_8hpp_source.html#l00045">libhomescreen.hpp:45</a></div></div>
+</div><!-- fragment -->
+</div>
+</div>
+<a id="ab1c1fa69f24b981e824dd9fb810c4b74"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ab1c1fa69f24b981e824dd9fb810c4b74">&#9670;&nbsp;</a></span>on_hangup()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void LibHomeScreen::on_hangup </td>
+ <td>(</td>
+ <td class="paramtype">void *&#160;</td>
+ <td class="paramname"><em>closure</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">struct afb_wsj1 *&#160;</td>
+ <td class="paramname"><em>wsj</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p class="definition">Definition at line <a class="el" href="../../d0/d8a/libhomescreen_8cpp_source.html#l00439">439</a> of file <a class="el" href="../../d0/d8a/libhomescreen_8cpp_source.html">libhomescreen.cpp</a>.</p>
+<div class="fragment"><div class="line"><a name="l00440"></a><span class="lineno"> 440</span>&#160;{</div><div class="line"><a name="l00441"></a><span class="lineno"> 441</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#a0d26d8b8201011dade787236519711c0">HMI_DEBUG</a>(<span class="stringliteral">&quot;libhomescreen&quot;</span>,<span class="stringliteral">&quot;%s called&quot;</span>, __FUNCTION__);</div><div class="line"><a name="l00442"></a><span class="lineno"> 442</span>&#160; <span class="keywordflow">if</span>(onHangup != <span class="keyword">nullptr</span>)</div><div class="line"><a name="l00443"></a><span class="lineno"> 443</span>&#160; {</div><div class="line"><a name="l00444"></a><span class="lineno"> 444</span>&#160; onHangup();</div><div class="line"><a name="l00445"></a><span class="lineno"> 445</span>&#160; }</div><div class="line"><a name="l00446"></a><span class="lineno"> 446</span>&#160;}</div><div class="ttc" id="hmi-debug_8h_html_a0d26d8b8201011dade787236519711c0"><div class="ttname"><a href="../../df/d76/hmi-debug_8h.html#a0d26d8b8201011dade787236519711c0">HMI_DEBUG</a></div><div class="ttdeci">#define HMI_DEBUG(prefix, args,...)</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d76/hmi-debug_8h_source.html#l00022">hmi-debug.h:22</a></div></div>
+</div><!-- fragment -->
+</div>
+</div>
+<a id="a248d9648c6186287a7632ec1c75fc9c5"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a248d9648c6186287a7632ec1c75fc9c5">&#9670;&nbsp;</a></span>on_reply()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void LibHomeScreen::on_reply </td>
+ <td>(</td>
+ <td class="paramtype">void *&#160;</td>
+ <td class="paramname"><em>closure</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">struct afb_wsj1_msg *&#160;</td>
+ <td class="paramname"><em>msg</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>msg is like ({"response":{"verb":"subscribe","error":0},"jtype":"afb-reply","request":{"status":"success","info":"homescreen binder subscribe event name [on_screen_message]"}}) msg is like ({"response":{"verb":"tap_shortcut","error":0},"jtype":"afb-reply","request":{"status":"success","info":"afb_event_push event [tap_shortcut]"}}) </p>
+
+<p class="definition">Definition at line <a class="el" href="../../d0/d8a/libhomescreen_8cpp_source.html#l00506">506</a> of file <a class="el" href="../../d0/d8a/libhomescreen_8cpp_source.html">libhomescreen.cpp</a>.</p>
+<div class="fragment"><div class="line"><a name="l00507"></a><span class="lineno"> 507</span>&#160;{</div><div class="line"><a name="l00508"></a><span class="lineno"> 508</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#a0d26d8b8201011dade787236519711c0">HMI_DEBUG</a>(<span class="stringliteral">&quot;libhomescreen&quot;</span>,<span class="stringliteral">&quot;msg: (%s)&quot;</span>, afb_wsj1_msg_object_s(msg));</div><div class="line"><a name="l00509"></a><span class="lineno"> 509</span>&#160; <span class="keywordflow">if</span>(onReply != <span class="keyword">nullptr</span>)</div><div class="line"><a name="l00510"></a><span class="lineno"> 510</span>&#160; {</div><div class="line"><a name="l00511"></a><span class="lineno"> 511</span>&#160; <span class="keyword">struct </span>json_object* reply = afb_wsj1_msg_object_j(msg);</div><div class="line"><a name="l00512"></a><span class="lineno"> 512</span>&#160; onReply(reply);</div><div class="line"><a name="l00513"></a><span class="lineno"> 513</span>&#160;</div><div class="line"><a name="l00514"></a><span class="lineno"> 514</span>&#160; json_object_put(reply);</div><div class="line"><a name="l00515"></a><span class="lineno"> 515</span>&#160; }</div><div class="line"><a name="l00516"></a><span class="lineno"> 516</span>&#160;}</div><div class="ttc" id="hmi-debug_8h_html_a0d26d8b8201011dade787236519711c0"><div class="ttname"><a href="../../df/d76/hmi-debug_8h.html#a0d26d8b8201011dade787236519711c0">HMI_DEBUG</a></div><div class="ttdeci">#define HMI_DEBUG(prefix, args,...)</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d76/hmi-debug_8h_source.html#l00022">hmi-debug.h:22</a></div></div>
+</div><!-- fragment -->
+</div>
+</div>
+<a id="ac336482036a72b51a822725f1929523c"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ac336482036a72b51a822725f1929523c">&#9670;&nbsp;</a></span>onScreenMessage()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">int LibHomeScreen::onScreenMessage </td>
+ <td>(</td>
+ <td class="paramtype">const char *&#160;</td>
+ <td class="paramname"><em>display_message</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Sending onScreen message event</p>
+<p>Sending OnScreen message event to HomeScreen from applications</p>
+<h4>Parameters</h4>
+<ul>
+<li>display_message [in] : message for display</li>
+</ul>
+<h4>Return</h4>
+<ul>
+<li>Returns 0 on success or -1 in case of error. </li>
+</ul>
+
+<p class="definition">Definition at line <a class="el" href="../../d0/d8a/libhomescreen_8cpp_source.html#l00244">244</a> of file <a class="el" href="../../d0/d8a/libhomescreen_8cpp_source.html">libhomescreen.cpp</a>.</p>
+<div class="fragment"><div class="line"><a name="l00245"></a><span class="lineno"> 245</span>&#160;{</div><div class="line"><a name="l00246"></a><span class="lineno"> 246</span>&#160; <span class="keywordflow">if</span>(!sp_websock)</div><div class="line"><a name="l00247"></a><span class="lineno"> 247</span>&#160; {</div><div class="line"><a name="l00248"></a><span class="lineno"> 248</span>&#160; <span class="keywordflow">return</span> -1;</div><div class="line"><a name="l00249"></a><span class="lineno"> 249</span>&#160; }</div><div class="line"><a name="l00250"></a><span class="lineno"> 250</span>&#160;</div><div class="line"><a name="l00251"></a><span class="lineno"> 251</span>&#160; <span class="keyword">struct </span>json_object* j_obj = json_object_new_object();</div><div class="line"><a name="l00252"></a><span class="lineno"> 252</span>&#160; <span class="keyword">struct </span>json_object* val = json_object_new_string(display_message);</div><div class="line"><a name="l00253"></a><span class="lineno"> 253</span>&#160; json_object_object_add(j_obj, <span class="stringliteral">&quot;display_message&quot;</span>, val);</div><div class="line"><a name="l00254"></a><span class="lineno"> 254</span>&#160; <span class="keywordflow">return</span> this-&gt;<a class="code" href="../../de/dd0/class_lib_home_screen.html#a527b49dcfe581be6275d0eb2236ba37f">call</a>(<span class="stringliteral">&quot;on_screen_message&quot;</span>, j_obj);</div><div class="line"><a name="l00255"></a><span class="lineno"> 255</span>&#160;}</div><div class="ttc" id="class_lib_home_screen_html_a527b49dcfe581be6275d0eb2236ba37f"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#a527b49dcfe581be6275d0eb2236ba37f">LibHomeScreen::call</a></div><div class="ttdeci">int call(const std::string &amp;verb, struct json_object *arg)</div></div>
+</div><!-- fragment -->
+</div>
+</div>
+<a id="a6c065f41f2c5d1f58d2763bfb4da9c37"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a6c065f41f2c5d1f58d2763bfb4da9c37">&#9670;&nbsp;</a></span>onScreenReply()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">int LibHomeScreen::onScreenReply </td>
+ <td>(</td>
+ <td class="paramtype">const char *&#160;</td>
+ <td class="paramname"><em>reply_message</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Sending onScreen reply event</p>
+<p>Sending OnScreen reply event to applications from HomeScreen</p>
+<h4>Parameters</h4>
+<ul>
+<li>reply_message [in] : message for reply</li>
+</ul>
+<h4>Return</h4>
+<ul>
+<li>Returns 0 on success or -1 in case of error. </li>
+</ul>
+
+<p class="definition">Definition at line <a class="el" href="../../d0/d8a/libhomescreen_8cpp_source.html#l00268">268</a> of file <a class="el" href="../../d0/d8a/libhomescreen_8cpp_source.html">libhomescreen.cpp</a>.</p>
+<div class="fragment"><div class="line"><a name="l00269"></a><span class="lineno"> 269</span>&#160;{</div><div class="line"><a name="l00270"></a><span class="lineno"> 270</span>&#160; <span class="keywordflow">if</span>(!sp_websock)</div><div class="line"><a name="l00271"></a><span class="lineno"> 271</span>&#160; {</div><div class="line"><a name="l00272"></a><span class="lineno"> 272</span>&#160; <span class="keywordflow">return</span> -1;</div><div class="line"><a name="l00273"></a><span class="lineno"> 273</span>&#160; }</div><div class="line"><a name="l00274"></a><span class="lineno"> 274</span>&#160;</div><div class="line"><a name="l00275"></a><span class="lineno"> 275</span>&#160; <span class="keyword">struct </span>json_object* j_obj = json_object_new_object();</div><div class="line"><a name="l00276"></a><span class="lineno"> 276</span>&#160; <span class="keyword">struct </span>json_object* val = json_object_new_string(reply_message);</div><div class="line"><a name="l00277"></a><span class="lineno"> 277</span>&#160; json_object_object_add(j_obj, <span class="stringliteral">&quot;reply_message&quot;</span>, val);</div><div class="line"><a name="l00278"></a><span class="lineno"> 278</span>&#160; <span class="keywordflow">return</span> this-&gt;<a class="code" href="../../de/dd0/class_lib_home_screen.html#a527b49dcfe581be6275d0eb2236ba37f">call</a>(<span class="stringliteral">&quot;on_screen_reply&quot;</span>, j_obj);</div><div class="line"><a name="l00279"></a><span class="lineno"> 279</span>&#160;}</div><div class="ttc" id="class_lib_home_screen_html_a527b49dcfe581be6275d0eb2236ba37f"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#a527b49dcfe581be6275d0eb2236ba37f">LibHomeScreen::call</a></div><div class="ttdeci">int call(const std::string &amp;verb, struct json_object *arg)</div></div>
+</div><!-- fragment -->
+</div>
+</div>
+<a id="a23bc17798453cfca50904562736f6b25"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a23bc17798453cfca50904562736f6b25">&#9670;&nbsp;</a></span>operator=()</h2>
+
+<div class="memitem">
+<div class="memproto">
+<table class="mlabels">
+ <tr>
+ <td class="mlabels-left">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="../../de/dd0/class_lib_home_screen.html">LibHomeScreen</a>&amp; LibHomeScreen::operator= </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="../../de/dd0/class_lib_home_screen.html">LibHomeScreen</a> &amp;&#160;</td>
+ <td class="paramname"></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+ </td>
+ <td class="mlabels-right">
+<span class="mlabels"><span class="mlabel">delete</span></span> </td>
+ </tr>
+</table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a2789e8a5372202cc36f48e71dbb9b7cf"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a2789e8a5372202cc36f48e71dbb9b7cf">&#9670;&nbsp;</a></span>registerCallback()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void LibHomeScreen::registerCallback </td>
+ <td>(</td>
+ <td class="paramtype">void(*)(const std::string &amp;<a class="el" href="../../df/d7d/structevent.html">event</a>, struct json_object *event_contents)&#160;</td>
+ <td class="paramname"><em>event_cb</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">void(*)(struct json_object *reply_contents)&#160;</td>
+ <td class="paramname"><em>reply_cb</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">void(*)(void)&#160;</td>
+ <td class="paramname"><em>hangup_cb</em> = <code>nullptr</code>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>This function register callback function for reply/event message from home screen</p>
+<h4>Parameters</h4>
+<ul>
+<li>event_cb [in] : This argument should be specified to the callback for subscribed event</li>
+<li>reply_cb [in] : This argument should be specified to the reply callback for call function</li>
+</ul>
+<h4>Return</h4>
+<p>Nothing</p>
+<h4>Note</h4>
+<p>Event callback is invoked by home screen for event you subscribed. If you would like to get event, please call subscribe function before/after this function </p>
+
+<p class="definition">Definition at line <a class="el" href="../../d0/d8a/libhomescreen_8cpp_source.html#l00155">155</a> of file <a class="el" href="../../d0/d8a/libhomescreen_8cpp_source.html">libhomescreen.cpp</a>.</p>
+<div class="fragment"><div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160;{</div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160; onEvent = event_cb;</div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160; onReply = reply_cb;</div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span>&#160; onHangup = hangup_cb;</div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span>&#160;}</div></div><!-- fragment -->
+</div>
+</div>
+<a id="ab1b0e08bf35415de9064afed899e9f85"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ab1b0e08bf35415de9064afed899e9f85">&#9670;&nbsp;</a></span>set_event_handler()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void LibHomeScreen::set_event_handler </td>
+ <td>(</td>
+ <td class="paramtype">enum <a class="el" href="../../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154">EventType</a>&#160;</td>
+ <td class="paramname"><em>et</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="../../de/dd0/class_lib_home_screen.html#a334f11f81c84c98d18284215dcaada3a">handler_func</a>&#160;</td>
+ <td class="paramname"><em>f</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Setting Event Handler</p>
+<p>Setting event handler for Homescreen</p>
+<h4>Parameters</h4>
+<ul>
+<li>et [in] : event name</li>
+<li>f [in] : event handler</li>
+</ul>
+<h4>Return</h4>
+<p>Nothing </p>
+
+<p class="definition">Definition at line <a class="el" href="../../d0/d8a/libhomescreen_8cpp_source.html#l00293">293</a> of file <a class="el" href="../../d0/d8a/libhomescreen_8cpp_source.html">libhomescreen.cpp</a>.</p>
+<div class="fragment"><div class="line"><a name="l00294"></a><span class="lineno"> 294</span>&#160;{</div><div class="line"><a name="l00295"></a><span class="lineno"> 295</span>&#160; <span class="keywordflow">if</span> (et &gt;= 1 &amp;&amp; et &lt;= 3) {</div><div class="line"><a name="l00296"></a><span class="lineno"> 296</span>&#160; <span class="keywordflow">switch</span> (et) {</div><div class="line"><a name="l00297"></a><span class="lineno"> 297</span>&#160; <span class="keywordflow">case</span> <a class="code" href="../../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154a4b0a82d501e4db5fbfe25c254c92896f">Event_TapShortcut</a>:</div><div class="line"><a name="l00298"></a><span class="lineno"> 298</span>&#160; this-&gt;<a class="code" href="../../de/dd0/class_lib_home_screen.html#aa4c189807b75d070f567967f0d690738">subscribe</a>(<a class="code" href="../../de/dd0/class_lib_home_screen.html#a6a6d8a4d33a006a08652e7377a4c29e9">LibHomeScreen::event_list</a>[0]);</div><div class="line"><a name="l00299"></a><span class="lineno"> 299</span>&#160; <span class="keywordflow">break</span>;</div><div class="line"><a name="l00300"></a><span class="lineno"> 300</span>&#160; <span class="keywordflow">case</span> <a class="code" href="../../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154aea56fa32a124a8ddcbea127755280a1d">Event_OnScreenMessage</a>:</div><div class="line"><a name="l00301"></a><span class="lineno"> 301</span>&#160; this-&gt;<a class="code" href="../../de/dd0/class_lib_home_screen.html#aa4c189807b75d070f567967f0d690738">subscribe</a>(<a class="code" href="../../de/dd0/class_lib_home_screen.html#a6a6d8a4d33a006a08652e7377a4c29e9">LibHomeScreen::event_list</a>[1]);</div><div class="line"><a name="l00302"></a><span class="lineno"> 302</span>&#160; <span class="keywordflow">break</span>;</div><div class="line"><a name="l00303"></a><span class="lineno"> 303</span>&#160; <span class="keywordflow">case</span> <a class="code" href="../../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154acae91db4efc2394fd701f581d277a3fd">Event_OnScreenReply</a>:</div><div class="line"><a name="l00304"></a><span class="lineno"> 304</span>&#160; this-&gt;<a class="code" href="../../de/dd0/class_lib_home_screen.html#aa4c189807b75d070f567967f0d690738">subscribe</a>(<a class="code" href="../../de/dd0/class_lib_home_screen.html#a6a6d8a4d33a006a08652e7377a4c29e9">LibHomeScreen::event_list</a>[2]);</div><div class="line"><a name="l00305"></a><span class="lineno"> 305</span>&#160; <span class="keywordflow">break</span>;</div><div class="line"><a name="l00306"></a><span class="lineno"> 306</span>&#160; }</div><div class="line"><a name="l00307"></a><span class="lineno"> 307</span>&#160;</div><div class="line"><a name="l00308"></a><span class="lineno"> 308</span>&#160; this-&gt;handlers[et] = std::move(f);</div><div class="line"><a name="l00309"></a><span class="lineno"> 309</span>&#160; }</div><div class="line"><a name="l00310"></a><span class="lineno"> 310</span>&#160;}</div><div class="ttc" id="class_lib_home_screen_html_a82616c91ac211d2ad08e709b524bf154aea56fa32a124a8ddcbea127755280a1d"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154aea56fa32a124a8ddcbea127755280a1d">LibHomeScreen::Event_OnScreenMessage</a></div><div class="ttdef"><b>Definition:</b> <a href="../../df/d43/libhomescreen_8hpp_source.html#l00046">libhomescreen.hpp:46</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_a82616c91ac211d2ad08e709b524bf154acae91db4efc2394fd701f581d277a3fd"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154acae91db4efc2394fd701f581d277a3fd">LibHomeScreen::Event_OnScreenReply</a></div><div class="ttdef"><b>Definition:</b> <a href="../../df/d43/libhomescreen_8hpp_source.html#l00047">libhomescreen.hpp:47</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_aa4c189807b75d070f567967f0d690738"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#aa4c189807b75d070f567967f0d690738">LibHomeScreen::subscribe</a></div><div class="ttdeci">int subscribe(const std::string &amp;event_name)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d8a/libhomescreen_8cpp_source.html#l00392">libhomescreen.cpp:392</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_a6a6d8a4d33a006a08652e7377a4c29e9"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#a6a6d8a4d33a006a08652e7377a4c29e9">LibHomeScreen::event_list</a></div><div class="ttdeci">static const std::vector&lt; std::string &gt; event_list</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d43/libhomescreen_8hpp_source.html#l00051">libhomescreen.hpp:51</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_a82616c91ac211d2ad08e709b524bf154a4b0a82d501e4db5fbfe25c254c92896f"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154a4b0a82d501e4db5fbfe25c254c92896f">LibHomeScreen::Event_TapShortcut</a></div><div class="ttdef"><b>Definition:</b> <a href="../../df/d43/libhomescreen_8hpp_source.html#l00045">libhomescreen.hpp:45</a></div></div>
+</div><!-- fragment -->
+</div>
+</div>
+<a id="aa4c189807b75d070f567967f0d690738"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aa4c189807b75d070f567967f0d690738">&#9670;&nbsp;</a></span>subscribe()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">int LibHomeScreen::subscribe </td>
+ <td>(</td>
+ <td class="paramtype">const std::string &amp;&#160;</td>
+ <td class="paramname"><em>event_name</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Register callback function for each event</p>
+<h4>Parameters</h4>
+<ul>
+<li>event_name [in] : This argument should be specified to the event name</li>
+</ul>
+<h4>Return</h4>
+<ul>
+<li>Returns 0 on success or -1 in case of error.</li>
+</ul>
+<h4>Note</h4>
+<p>This function enables to get an event to your callback function. </p>
+
+<p class="definition">Definition at line <a class="el" href="../../d0/d8a/libhomescreen_8cpp_source.html#l00392">392</a> of file <a class="el" href="../../d0/d8a/libhomescreen_8cpp_source.html">libhomescreen.cpp</a>.</p>
+<div class="fragment"><div class="line"><a name="l00393"></a><span class="lineno"> 393</span>&#160;{</div><div class="line"><a name="l00394"></a><span class="lineno"> 394</span>&#160; <span class="keywordflow">if</span>(!sp_websock)</div><div class="line"><a name="l00395"></a><span class="lineno"> 395</span>&#160; {</div><div class="line"><a name="l00396"></a><span class="lineno"> 396</span>&#160; <span class="keywordflow">return</span> -1;</div><div class="line"><a name="l00397"></a><span class="lineno"> 397</span>&#160; }</div><div class="line"><a name="l00398"></a><span class="lineno"> 398</span>&#160; <span class="keyword">struct </span>json_object* j_obj = json_object_new_object();</div><div class="line"><a name="l00399"></a><span class="lineno"> 399</span>&#160; json_object_object_add(j_obj, <span class="stringliteral">&quot;event&quot;</span>, json_object_new_string(event_name.c_str()));</div><div class="line"><a name="l00400"></a><span class="lineno"> 400</span>&#160;</div><div class="line"><a name="l00401"></a><span class="lineno"> 401</span>&#160; <span class="keywordtype">int</span> ret = afb_wsj1_call_j(sp_websock, <a class="code" href="../../d0/d8a/libhomescreen_8cpp.html#a1e2d6e77dd8f0162f830058579eab42f">API</a>, <span class="stringliteral">&quot;subscribe&quot;</span>, j_obj, <a class="code" href="../../d0/d8a/libhomescreen_8cpp.html#a7778933bffa862c63fa0a1b8219faa8b">_on_reply_static</a>, <span class="keyword">this</span>);</div><div class="line"><a name="l00402"></a><span class="lineno"> 402</span>&#160; <span class="keywordflow">if</span> (ret &lt; 0) {</div><div class="line"><a name="l00403"></a><span class="lineno"> 403</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#a65bb6c7cfe38f8a724beab5059d36fb2">HMI_ERROR</a>(<span class="stringliteral">&quot;libhomescreen&quot;</span>,<span class="stringliteral">&quot;Failed to call verb:%s&quot;</span>,__FUNCTION__);</div><div class="line"><a name="l00404"></a><span class="lineno"> 404</span>&#160; }</div><div class="line"><a name="l00405"></a><span class="lineno"> 405</span>&#160; <span class="keywordflow">return</span> ret;</div><div class="line"><a name="l00406"></a><span class="lineno"> 406</span>&#160;}</div><div class="ttc" id="hmi-debug_8h_html_a65bb6c7cfe38f8a724beab5059d36fb2"><div class="ttname"><a href="../../df/d76/hmi-debug_8h.html#a65bb6c7cfe38f8a724beab5059d36fb2">HMI_ERROR</a></div><div class="ttdeci">#define HMI_ERROR(prefix, args,...)</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d76/hmi-debug_8h_source.html#l00018">hmi-debug.h:18</a></div></div>
+<div class="ttc" id="libhomescreen_8cpp_html_a1e2d6e77dd8f0162f830058579eab42f"><div class="ttname"><a href="../../d0/d8a/libhomescreen_8cpp.html#a1e2d6e77dd8f0162f830058579eab42f">API</a></div><div class="ttdeci">static const char API[]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d8a/libhomescreen_8cpp_source.html#l00036">libhomescreen.cpp:36</a></div></div>
+<div class="ttc" id="libhomescreen_8cpp_html_a7778933bffa862c63fa0a1b8219faa8b"><div class="ttname"><a href="../../d0/d8a/libhomescreen_8cpp.html#a7778933bffa862c63fa0a1b8219faa8b">_on_reply_static</a></div><div class="ttdeci">static void _on_reply_static(void *closure, struct afb_wsj1_msg *msg)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d8a/libhomescreen_8cpp_source.html#l00074">libhomescreen.cpp:74</a></div></div>
+</div><!-- fragment -->
+</div>
+</div>
+<a id="afb571c9577087b47065eb23e7fdbc903"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#afb571c9577087b47065eb23e7fdbc903">&#9670;&nbsp;</a></span>tapShortcut()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">int LibHomeScreen::tapShortcut </td>
+ <td>(</td>
+ <td class="paramtype">const char *&#160;</td>
+ <td class="paramname"><em>application_name</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Sending ShortCut Icon tapped event</p>
+<p>When HomeScreen shortcut area is tapped, sending a event</p>
+<h4>Parameters</h4>
+<ul>
+<li>application_name [in] : Tapped application name (label)</li>
+</ul>
+<h4>Return</h4>
+<ul>
+<li>Returns 0 on success or -1 in case of error. </li>
+</ul>
+
+<p class="definition">Definition at line <a class="el" href="../../d0/d8a/libhomescreen_8cpp_source.html#l00220">220</a> of file <a class="el" href="../../d0/d8a/libhomescreen_8cpp_source.html">libhomescreen.cpp</a>.</p>
+<div class="fragment"><div class="line"><a name="l00221"></a><span class="lineno"> 221</span>&#160;{</div><div class="line"><a name="l00222"></a><span class="lineno"> 222</span>&#160; <span class="keywordflow">if</span>(!sp_websock)</div><div class="line"><a name="l00223"></a><span class="lineno"> 223</span>&#160; {</div><div class="line"><a name="l00224"></a><span class="lineno"> 224</span>&#160; <span class="keywordflow">return</span> -1;</div><div class="line"><a name="l00225"></a><span class="lineno"> 225</span>&#160; }</div><div class="line"><a name="l00226"></a><span class="lineno"> 226</span>&#160;</div><div class="line"><a name="l00227"></a><span class="lineno"> 227</span>&#160; <span class="keyword">struct </span>json_object* j_obj = json_object_new_object();</div><div class="line"><a name="l00228"></a><span class="lineno"> 228</span>&#160; <span class="keyword">struct </span>json_object* val = json_object_new_string(application_name);</div><div class="line"><a name="l00229"></a><span class="lineno"> 229</span>&#160; json_object_object_add(j_obj, <span class="stringliteral">&quot;application_name&quot;</span>, val);</div><div class="line"><a name="l00230"></a><span class="lineno"> 230</span>&#160; <span class="keywordflow">return</span> this-&gt;<a class="code" href="../../de/dd0/class_lib_home_screen.html#a527b49dcfe581be6275d0eb2236ba37f">call</a>(<span class="stringliteral">&quot;tap_shortcut&quot;</span>, j_obj);</div><div class="line"><a name="l00231"></a><span class="lineno"> 231</span>&#160;}</div><div class="ttc" id="class_lib_home_screen_html_a527b49dcfe581be6275d0eb2236ba37f"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#a527b49dcfe581be6275d0eb2236ba37f">LibHomeScreen::call</a></div><div class="ttdeci">int call(const std::string &amp;verb, struct json_object *arg)</div></div>
+</div><!-- fragment -->
+</div>
+</div>
+<a id="aac03a45cbd453ba69ddb00c1016930a6"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aac03a45cbd453ba69ddb00c1016930a6">&#9670;&nbsp;</a></span>unsubscribe()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">int LibHomeScreen::unsubscribe </td>
+ <td>(</td>
+ <td class="paramtype">const std::string &amp;&#160;</td>
+ <td class="paramname"><em>event_name</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Unregister callback function for each event</p>
+<h4>Parameters</h4>
+<ul>
+<li>event_name [in] : This argument should be specified to the event name</li>
+</ul>
+<h4>Return</h4>
+<ul>
+<li>Returns 0 on success or -1 in case of error.</li>
+</ul>
+<h4>Note</h4>
+<p>This function disables to get an event to your callback function. </p>
+
+<p class="definition">Definition at line <a class="el" href="../../d0/d8a/libhomescreen_8cpp_source.html#l00421">421</a> of file <a class="el" href="../../d0/d8a/libhomescreen_8cpp_source.html">libhomescreen.cpp</a>.</p>
+<div class="fragment"><div class="line"><a name="l00422"></a><span class="lineno"> 422</span>&#160;{</div><div class="line"><a name="l00423"></a><span class="lineno"> 423</span>&#160; <span class="keywordflow">if</span>(!sp_websock)</div><div class="line"><a name="l00424"></a><span class="lineno"> 424</span>&#160; {</div><div class="line"><a name="l00425"></a><span class="lineno"> 425</span>&#160; <span class="keywordflow">return</span> -1;</div><div class="line"><a name="l00426"></a><span class="lineno"> 426</span>&#160; }</div><div class="line"><a name="l00427"></a><span class="lineno"> 427</span>&#160; <span class="keyword">struct </span>json_object* j_obj = json_object_new_object();</div><div class="line"><a name="l00428"></a><span class="lineno"> 428</span>&#160; json_object_object_add(j_obj, <span class="stringliteral">&quot;event&quot;</span>, json_object_new_string(event_name.c_str()));</div><div class="line"><a name="l00429"></a><span class="lineno"> 429</span>&#160;</div><div class="line"><a name="l00430"></a><span class="lineno"> 430</span>&#160; <span class="keywordtype">int</span> ret = afb_wsj1_call_j(sp_websock, <a class="code" href="../../d0/d8a/libhomescreen_8cpp.html#a1e2d6e77dd8f0162f830058579eab42f">API</a>, <span class="stringliteral">&quot;unsubscribe&quot;</span>, j_obj, <a class="code" href="../../d0/d8a/libhomescreen_8cpp.html#a7778933bffa862c63fa0a1b8219faa8b">_on_reply_static</a>, <span class="keyword">this</span>);</div><div class="line"><a name="l00431"></a><span class="lineno"> 431</span>&#160; <span class="keywordflow">if</span> (ret &lt; 0) {</div><div class="line"><a name="l00432"></a><span class="lineno"> 432</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#a65bb6c7cfe38f8a724beab5059d36fb2">HMI_ERROR</a>(<span class="stringliteral">&quot;libhomescreen&quot;</span>,<span class="stringliteral">&quot;Failed to call verb:%s&quot;</span>,__FUNCTION__);</div><div class="line"><a name="l00433"></a><span class="lineno"> 433</span>&#160; }</div><div class="line"><a name="l00434"></a><span class="lineno"> 434</span>&#160; <span class="keywordflow">return</span> ret;</div><div class="line"><a name="l00435"></a><span class="lineno"> 435</span>&#160;}</div><div class="ttc" id="hmi-debug_8h_html_a65bb6c7cfe38f8a724beab5059d36fb2"><div class="ttname"><a href="../../df/d76/hmi-debug_8h.html#a65bb6c7cfe38f8a724beab5059d36fb2">HMI_ERROR</a></div><div class="ttdeci">#define HMI_ERROR(prefix, args,...)</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d76/hmi-debug_8h_source.html#l00018">hmi-debug.h:18</a></div></div>
+<div class="ttc" id="libhomescreen_8cpp_html_a1e2d6e77dd8f0162f830058579eab42f"><div class="ttname"><a href="../../d0/d8a/libhomescreen_8cpp.html#a1e2d6e77dd8f0162f830058579eab42f">API</a></div><div class="ttdeci">static const char API[]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d8a/libhomescreen_8cpp_source.html#l00036">libhomescreen.cpp:36</a></div></div>
+<div class="ttc" id="libhomescreen_8cpp_html_a7778933bffa862c63fa0a1b8219faa8b"><div class="ttname"><a href="../../d0/d8a/libhomescreen_8cpp.html#a7778933bffa862c63fa0a1b8219faa8b">_on_reply_static</a></div><div class="ttdeci">static void _on_reply_static(void *closure, struct afb_wsj1_msg *msg)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d8a/libhomescreen_8cpp_source.html#l00074">libhomescreen.cpp:74</a></div></div>
+</div><!-- fragment -->
+</div>
+</div>
+<h2 class="groupheader">Member Data Documentation</h2>
+<a id="a5593ff5ac78f6495ccb649904cf0ab08"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a5593ff5ac78f6495ccb649904cf0ab08">&#9670;&nbsp;</a></span>api_list</h2>
+
+<div class="memitem">
+<div class="memproto">
+<table class="mlabels">
+ <tr>
+ <td class="mlabels-left">
+ <table class="memname">
+ <tr>
+ <td class="memname">const std::vector&lt; std::string &gt; LibHomeScreen::api_list</td>
+ </tr>
+ </table>
+ </td>
+ <td class="mlabels-right">
+<span class="mlabels"><span class="mlabel">static</span></span> </td>
+ </tr>
+</table>
+</div><div class="memdoc">
+<b>Initial value:</b><div class="fragment"><div class="line">{</div><div class="line"> std::string(<span class="stringliteral">&quot;ping&quot;</span>), </div><div class="line"> std::string(<span class="stringliteral">&quot;tap_shortcut&quot;</span>), </div><div class="line"> std::string(<span class="stringliteral">&quot;on_screen_message&quot;</span>),</div><div class="line"> std::string(<span class="stringliteral">&quot;on_screen_reply&quot;</span>),</div><div class="line"> std::string(<span class="stringliteral">&quot;subscribe&quot;</span>),</div><div class="line"> std::string(<span class="stringliteral">&quot;unsubscribe&quot;</span>)</div><div class="line">}</div></div><!-- fragment -->
+<p class="definition">Definition at line <a class="el" href="../../df/d43/libhomescreen_8hpp_source.html#l00050">50</a> of file <a class="el" href="../../df/d43/libhomescreen_8hpp_source.html">libhomescreen.hpp</a>.</p>
+
+</div>
+</div>
+<a id="a6a6d8a4d33a006a08652e7377a4c29e9"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a6a6d8a4d33a006a08652e7377a4c29e9">&#9670;&nbsp;</a></span>event_list</h2>
+
+<div class="memitem">
+<div class="memproto">
+<table class="mlabels">
+ <tr>
+ <td class="mlabels-left">
+ <table class="memname">
+ <tr>
+ <td class="memname">const std::vector&lt; std::string &gt; LibHomeScreen::event_list</td>
+ </tr>
+ </table>
+ </td>
+ <td class="mlabels-right">
+<span class="mlabels"><span class="mlabel">static</span></span> </td>
+ </tr>
+</table>
+</div><div class="memdoc">
+<b>Initial value:</b><div class="fragment"><div class="line">{</div><div class="line"> std::string(<span class="stringliteral">&quot;tap_shortcut&quot;</span>),</div><div class="line"> std::string(<span class="stringliteral">&quot;on_screen_message&quot;</span>),</div><div class="line"> std::string(<span class="stringliteral">&quot;on_screen_reply&quot;</span>),</div><div class="line"> std::string(<span class="stringliteral">&quot;none&quot;</span>)</div><div class="line">}</div></div><!-- fragment -->
+<p class="definition">Definition at line <a class="el" href="../../df/d43/libhomescreen_8hpp_source.html#l00051">51</a> of file <a class="el" href="../../df/d43/libhomescreen_8hpp_source.html">libhomescreen.hpp</a>.</p>
+
+</div>
+</div>
+<hr/>The documentation for this class was generated from the following files:<ul>
+<li>include/<a class="el" href="../../df/d43/libhomescreen_8hpp_source.html">libhomescreen.hpp</a></li>
+<li>libhomescreen/<a class="el" href="../../d0/d8a/libhomescreen_8cpp_source.html">libhomescreen.cpp</a></li>
+</ul>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="../../doxygen.png" alt="doxygen"/>
+</a> 1.8.13
+</small></address>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/df/d43/libhomescreen_8hpp.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/df/d43/libhomescreen_8hpp.html
new file mode 100644
index 0000000..c164aaf
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/df/d43/libhomescreen_8hpp.html
@@ -0,0 +1,96 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>HomeScreenBinding: include/libhomescreen.hpp File Reference</title>
+<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="../../jquery.js"></script>
+<script type="text/javascript" src="../../dynsections.js"></script>
+<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="../../search/searchdata.js"></script>
+<script type="text/javascript" src="../../search/search.js"></script>
+<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+ <td id="projectalign" style="padding-left: 0.5em;">
+ <div id="projectname">HomeScreenBinding
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.13 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
+</script>
+<script type="text/javascript" src="../../menudata.js"></script>
+<script type="text/javascript" src="../../menu.js"></script>
+<script type="text/javascript">
+$(function() {
+ initMenu('../../',true,false,'search.php','Search');
+ $(document).ready(function() { init_search(); });
+});
+</script>
+<div id="main-nav"></div>
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+ onmouseover="return searchBox.OnSearchSelectShow()"
+ onmouseout="return searchBox.OnSearchSelectHide()"
+ onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0"
+ name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div id="nav-path" class="navpath">
+ <ul>
+<li class="navelem"><a class="el" href="../../dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li> </ul>
+</div>
+</div><!-- top -->
+<div class="header">
+ <div class="summary">
+<a href="#nested-classes">Classes</a> </div>
+ <div class="headertitle">
+<div class="title">libhomescreen.hpp File Reference</div> </div>
+</div><!--header-->
+<div class="contents">
+<div class="textblock"><code>#include &lt;vector&gt;</code><br />
+<code>#include &lt;map&gt;</code><br />
+<code>#include &lt;string&gt;</code><br />
+<code>#include &lt;functional&gt;</code><br />
+<code>#include &lt;json-c/json.h&gt;</code><br />
+<code>#include &lt;systemd/sd-event.h&gt;</code><br />
+<code>#include &lt;afb/afb-binding.h&gt;</code><br />
+<code>#include &lt;afb/afb-wsj1.h&gt;</code><br />
+<code>#include &lt;afb/afb-ws-client.h&gt;</code><br />
+</div>
+<p><a href="../../df/d43/libhomescreen_8hpp_source.html">Go to the source code of this file.</a></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
+Classes</h2></td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/dd0/class_lib_home_screen.html">LibHomeScreen</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="../../doxygen.png" alt="doxygen"/>
+</a> 1.8.13
+</small></address>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/df/d43/libhomescreen_8hpp_source.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/df/d43/libhomescreen_8hpp_source.html
new file mode 100644
index 0000000..5e2f196
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/df/d43/libhomescreen_8hpp_source.html
@@ -0,0 +1,102 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>HomeScreenBinding: include/libhomescreen.hpp Source File</title>
+<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="../../jquery.js"></script>
+<script type="text/javascript" src="../../dynsections.js"></script>
+<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="../../search/searchdata.js"></script>
+<script type="text/javascript" src="../../search/search.js"></script>
+<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+ <td id="projectalign" style="padding-left: 0.5em;">
+ <div id="projectname">HomeScreenBinding
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.13 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
+</script>
+<script type="text/javascript" src="../../menudata.js"></script>
+<script type="text/javascript" src="../../menu.js"></script>
+<script type="text/javascript">
+$(function() {
+ initMenu('../../',true,false,'search.php','Search');
+ $(document).ready(function() { init_search(); });
+});
+</script>
+<div id="main-nav"></div>
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+ onmouseover="return searchBox.OnSearchSelectShow()"
+ onmouseout="return searchBox.OnSearchSelectHide()"
+ onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0"
+ name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div id="nav-path" class="navpath">
+ <ul>
+<li class="navelem"><a class="el" href="../../dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li> </ul>
+</div>
+</div><!-- top -->
+<div class="header">
+ <div class="headertitle">
+<div class="title">libhomescreen.hpp</div> </div>
+</div><!--header-->
+<div class="contents">
+<a href="../../df/d43/libhomescreen_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment"> * Copyright (c) 2017 TOYOTA MOTOR CORPORATION</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment"> * Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment"> * you may not use this file except in compliance with the License.</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment"> * You may obtain a copy of the License at</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment"> * Unless required by applicable law or agreed to in writing, software</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment"> * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment"> * See the License for the specific language governing permissions and</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment"> * limitations under the License.</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;</div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="preprocessor">#ifndef LIBHOMESCREEN_H</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="preprocessor">#define LIBHOMESCREEN_H</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="preprocessor">#include &lt;map&gt;</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="preprocessor">#include &lt;functional&gt;</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="preprocessor">#include &lt;json-c/json.h&gt;</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;<span class="preprocessor">#include &lt;systemd/sd-event.h&gt;</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;{</div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="preprocessor">#include &lt;afb/afb-binding.h&gt;</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;<span class="preprocessor">#include &lt;afb/afb-wsj1.h&gt;</span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;<span class="preprocessor">#include &lt;afb/afb-ws-client.h&gt;</span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;}</div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;</div><div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="../../de/dd0/class_lib_home_screen.html"> 32</a></span>&#160;<span class="keyword">class </span><a class="code" href="../../de/dd0/class_lib_home_screen.html">LibHomeScreen</a></div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;{</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160; <a class="code" href="../../de/dd0/class_lib_home_screen.html#a724bd949c4154fad041f96a15ef0f5dc">LibHomeScreen</a>();</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160; <a class="code" href="../../de/dd0/class_lib_home_screen.html#a249902aebf71a5383ca8ec6ae558d095">~LibHomeScreen</a>();</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160;</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160; <a class="code" href="../../de/dd0/class_lib_home_screen.html#a724bd949c4154fad041f96a15ef0f5dc">LibHomeScreen</a>(<span class="keyword">const</span> <a class="code" href="../../de/dd0/class_lib_home_screen.html">LibHomeScreen</a> &amp;) = <span class="keyword">delete</span>;</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160; <a class="code" href="../../de/dd0/class_lib_home_screen.html">LibHomeScreen</a> &amp;<a class="code" href="../../de/dd0/class_lib_home_screen.html#a23bc17798453cfca50904562736f6b25">operator=</a>(<span class="keyword">const</span> <a class="code" href="../../de/dd0/class_lib_home_screen.html">LibHomeScreen</a> &amp;) = <span class="keyword">delete</span>;</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160;</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160; <span class="comment">// using handler_func = std::function&lt;void(const char*)&gt;;</span></div><div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="../../de/dd0/class_lib_home_screen.html#a334f11f81c84c98d18284215dcaada3a"> 42</a></span>&#160; <span class="keyword">using</span> <a class="code" href="../../de/dd0/class_lib_home_screen.html#a334f11f81c84c98d18284215dcaada3a">handler_func</a> = std::function&lt;void(json_object*)&gt;;</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160;</div><div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="../../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154"> 44</a></span>&#160; <span class="keyword">enum</span> <a class="code" href="../../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154">EventType</a> {</div><div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="../../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154a4b0a82d501e4db5fbfe25c254c92896f"> 45</a></span>&#160; <a class="code" href="../../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154a4b0a82d501e4db5fbfe25c254c92896f">Event_TapShortcut</a> = 1,</div><div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="../../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154aea56fa32a124a8ddcbea127755280a1d"> 46</a></span>&#160; <a class="code" href="../../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154aea56fa32a124a8ddcbea127755280a1d">Event_OnScreenMessage</a>,</div><div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="../../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154acae91db4efc2394fd701f581d277a3fd"> 47</a></span>&#160; <a class="code" href="../../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154acae91db4efc2394fd701f581d277a3fd">Event_OnScreenReply</a></div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160; };</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160;</div><div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="../../de/dd0/class_lib_home_screen.html#a5593ff5ac78f6495ccb649904cf0ab08"> 50</a></span>&#160; <span class="keyword">static</span> <span class="keyword">const</span> std::vector&lt;std::string&gt; <a class="code" href="../../de/dd0/class_lib_home_screen.html#a5593ff5ac78f6495ccb649904cf0ab08">api_list</a>;</div><div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="../../de/dd0/class_lib_home_screen.html#a6a6d8a4d33a006a08652e7377a4c29e9"> 51</a></span>&#160; <span class="keyword">static</span> <span class="keyword">const</span> std::vector&lt;std::string&gt; <a class="code" href="../../de/dd0/class_lib_home_screen.html#a6a6d8a4d33a006a08652e7377a4c29e9">event_list</a>;</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160;</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160; <span class="comment">/* Method */</span></div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160; <span class="keywordtype">int</span> <a class="code" href="../../de/dd0/class_lib_home_screen.html#a6a57b573cc767725762ba9beab032220">init</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> port, <span class="keyword">const</span> std::string&amp; token);</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160;</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160; <span class="keywordtype">int</span> <a class="code" href="../../de/dd0/class_lib_home_screen.html#afb571c9577087b47065eb23e7fdbc903">tapShortcut</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* application_name);</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160; <span class="keywordtype">int</span> <a class="code" href="../../de/dd0/class_lib_home_screen.html#ac336482036a72b51a822725f1929523c">onScreenMessage</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* display_message);</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160; <span class="keywordtype">int</span> <a class="code" href="../../de/dd0/class_lib_home_screen.html#a6c065f41f2c5d1f58d2763bfb4da9c37">onScreenReply</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* reply_message);</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160;</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160; <span class="keywordtype">void</span> <a class="code" href="../../de/dd0/class_lib_home_screen.html#ab1b0e08bf35415de9064afed899e9f85">set_event_handler</a>(<span class="keyword">enum</span> <a class="code" href="../../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154">EventType</a> et, <a class="code" href="../../de/dd0/class_lib_home_screen.html#a334f11f81c84c98d18284215dcaada3a">handler_func</a> f);</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160;</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160; <span class="keywordtype">void</span> <a class="code" href="../../de/dd0/class_lib_home_screen.html#a2789e8a5372202cc36f48e71dbb9b7cf">registerCallback</a>(</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160; <span class="keywordtype">void</span> (*event_cb)(<span class="keyword">const</span> std::string&amp; <a class="code" href="../../df/d7d/structevent.html">event</a>, <span class="keyword">struct</span> json_object* event_contents),</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160; <span class="keywordtype">void</span> (*reply_cb)(<span class="keyword">struct</span> json_object* reply_contents),</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160; <span class="keywordtype">void</span> (*hangup_cb)(<span class="keywordtype">void</span>) = <span class="keyword">nullptr</span>);</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160;</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160; <span class="keywordtype">int</span> <a class="code" href="../../de/dd0/class_lib_home_screen.html#a527b49dcfe581be6275d0eb2236ba37f">call</a>(<span class="keyword">const</span> std::string&amp; verb, <span class="keyword">struct</span> json_object* arg);</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160; <span class="keywordtype">int</span> <a class="code" href="../../de/dd0/class_lib_home_screen.html#a527b49dcfe581be6275d0eb2236ba37f">call</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* verb, <span class="keyword">struct</span> json_object* arg);</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160; <span class="keywordtype">int</span> <a class="code" href="../../de/dd0/class_lib_home_screen.html#aa4c189807b75d070f567967f0d690738">subscribe</a>(<span class="keyword">const</span> std::string&amp; event_name);</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160; <span class="keywordtype">int</span> <a class="code" href="../../de/dd0/class_lib_home_screen.html#aac03a45cbd453ba69ddb00c1016930a6">unsubscribe</a>(<span class="keyword">const</span> std::string&amp; event_name);</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160;</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160;<span class="keyword">private</span>:</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160; <span class="keywordtype">int</span> initialize_websocket();</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160;</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160; void (*onEvent)(<span class="keyword">const</span> std::string&amp; event, <span class="keyword">struct </span>json_object* event_contents);</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160; void (*onReply)(<span class="keyword">struct </span>json_object* reply);</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160; void (*onHangup)(void);</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160;</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160; <span class="keyword">struct </span>afb_wsj1* sp_websock;</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160; <span class="keyword">struct </span>afb_wsj1_itf minterface;</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; sd_event* mploop;</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; std::string muri;</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160;</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160; <span class="keywordtype">int</span> mport = 2000;</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; std::string mtoken = <span class="stringliteral">&quot;hs&quot;</span>;</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160;</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; std::map&lt;EventType, handler_func&gt; handlers;</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160;</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160; <span class="comment">/* Don&#39;t use/ Internal only */</span></div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160; <span class="keywordtype">void</span> <a class="code" href="../../de/dd0/class_lib_home_screen.html#ab1c1fa69f24b981e824dd9fb810c4b74">on_hangup</a>(<span class="keywordtype">void</span> *closure, <span class="keyword">struct</span> afb_wsj1 *wsj);</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160; <span class="keywordtype">void</span> <a class="code" href="../../de/dd0/class_lib_home_screen.html#a608638eb87b2772a3dcc92d8ca8f3596">on_call</a>(<span class="keywordtype">void</span> *closure, <span class="keyword">const</span> <span class="keywordtype">char</span> *api, <span class="keyword">const</span> <span class="keywordtype">char</span> *verb, <span class="keyword">struct</span> afb_wsj1_msg *msg);</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160; <span class="keywordtype">void</span> <a class="code" href="../../de/dd0/class_lib_home_screen.html#a9c4885b51b43ab24a548d49fb3ab2de3">on_event</a>(<span class="keywordtype">void</span> *closure, <span class="keyword">const</span> <span class="keywordtype">char</span> *event, <span class="keyword">struct</span> afb_wsj1_msg *msg);</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160; <span class="keywordtype">void</span> <a class="code" href="../../de/dd0/class_lib_home_screen.html#a248d9648c6186287a7632ec1c75fc9c5">on_reply</a>(<span class="keywordtype">void</span> *closure, <span class="keyword">struct</span> afb_wsj1_msg *msg);</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160;};</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160;</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* LIBHOMESCREEN_H */</span><span class="preprocessor"></span></div><div class="ttc" id="class_lib_home_screen_html_a9c4885b51b43ab24a548d49fb3ab2de3"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#a9c4885b51b43ab24a548d49fb3ab2de3">LibHomeScreen::on_event</a></div><div class="ttdeci">void on_event(void *closure, const char *event, struct afb_wsj1_msg *msg)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d8a/libhomescreen_8cpp_source.html#l00458">libhomescreen.cpp:458</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_a248d9648c6186287a7632ec1c75fc9c5"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#a248d9648c6186287a7632ec1c75fc9c5">LibHomeScreen::on_reply</a></div><div class="ttdeci">void on_reply(void *closure, struct afb_wsj1_msg *msg)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d8a/libhomescreen_8cpp_source.html#l00506">libhomescreen.cpp:506</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_a6c065f41f2c5d1f58d2763bfb4da9c37"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#a6c065f41f2c5d1f58d2763bfb4da9c37">LibHomeScreen::onScreenReply</a></div><div class="ttdeci">int onScreenReply(const char *reply_message)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d8a/libhomescreen_8cpp_source.html#l00268">libhomescreen.cpp:268</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_a23bc17798453cfca50904562736f6b25"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#a23bc17798453cfca50904562736f6b25">LibHomeScreen::operator=</a></div><div class="ttdeci">LibHomeScreen &amp; operator=(const LibHomeScreen &amp;)=delete</div></div>
+<div class="ttc" id="class_lib_home_screen_html_a334f11f81c84c98d18284215dcaada3a"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#a334f11f81c84c98d18284215dcaada3a">LibHomeScreen::handler_func</a></div><div class="ttdeci">std::function&lt; void(json_object *)&gt; handler_func</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d43/libhomescreen_8hpp_source.html#l00042">libhomescreen.hpp:42</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_a608638eb87b2772a3dcc92d8ca8f3596"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#a608638eb87b2772a3dcc92d8ca8f3596">LibHomeScreen::on_call</a></div><div class="ttdeci">void on_call(void *closure, const char *api, const char *verb, struct afb_wsj1_msg *msg)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d8a/libhomescreen_8cpp_source.html#l00448">libhomescreen.cpp:448</a></div></div>
+<div class="ttc" id="structevent_html"><div class="ttname"><a href="../../df/d7d/structevent.html">event</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00035">homescreen.c:35</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_a82616c91ac211d2ad08e709b524bf154aea56fa32a124a8ddcbea127755280a1d"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154aea56fa32a124a8ddcbea127755280a1d">LibHomeScreen::Event_OnScreenMessage</a></div><div class="ttdef"><b>Definition:</b> <a href="../../df/d43/libhomescreen_8hpp_source.html#l00046">libhomescreen.hpp:46</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_a82616c91ac211d2ad08e709b524bf154acae91db4efc2394fd701f581d277a3fd"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154acae91db4efc2394fd701f581d277a3fd">LibHomeScreen::Event_OnScreenReply</a></div><div class="ttdef"><b>Definition:</b> <a href="../../df/d43/libhomescreen_8hpp_source.html#l00047">libhomescreen.hpp:47</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_a527b49dcfe581be6275d0eb2236ba37f"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#a527b49dcfe581be6275d0eb2236ba37f">LibHomeScreen::call</a></div><div class="ttdeci">int call(const std::string &amp;verb, struct json_object *arg)</div></div>
+<div class="ttc" id="class_lib_home_screen_html_ab1c1fa69f24b981e824dd9fb810c4b74"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#ab1c1fa69f24b981e824dd9fb810c4b74">LibHomeScreen::on_hangup</a></div><div class="ttdeci">void on_hangup(void *closure, struct afb_wsj1 *wsj)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d8a/libhomescreen_8cpp_source.html#l00439">libhomescreen.cpp:439</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_afb571c9577087b47065eb23e7fdbc903"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#afb571c9577087b47065eb23e7fdbc903">LibHomeScreen::tapShortcut</a></div><div class="ttdeci">int tapShortcut(const char *application_name)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d8a/libhomescreen_8cpp_source.html#l00220">libhomescreen.cpp:220</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_aa4c189807b75d070f567967f0d690738"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#aa4c189807b75d070f567967f0d690738">LibHomeScreen::subscribe</a></div><div class="ttdeci">int subscribe(const std::string &amp;event_name)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d8a/libhomescreen_8cpp_source.html#l00392">libhomescreen.cpp:392</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_a82616c91ac211d2ad08e709b524bf154"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154">LibHomeScreen::EventType</a></div><div class="ttdeci">EventType</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d43/libhomescreen_8hpp_source.html#l00044">libhomescreen.hpp:44</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_a724bd949c4154fad041f96a15ef0f5dc"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#a724bd949c4154fad041f96a15ef0f5dc">LibHomeScreen::LibHomeScreen</a></div><div class="ttdeci">LibHomeScreen()</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d8a/libhomescreen_8cpp_source.html#l00083">libhomescreen.cpp:83</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_a6a6d8a4d33a006a08652e7377a4c29e9"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#a6a6d8a4d33a006a08652e7377a4c29e9">LibHomeScreen::event_list</a></div><div class="ttdeci">static const std::vector&lt; std::string &gt; event_list</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d43/libhomescreen_8hpp_source.html#l00051">libhomescreen.hpp:51</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_a6a57b573cc767725762ba9beab032220"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#a6a57b573cc767725762ba9beab032220">LibHomeScreen::init</a></div><div class="ttdeci">int init(const int port, const std::string &amp;token)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d8a/libhomescreen_8cpp_source.html#l00116">libhomescreen.cpp:116</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_ac336482036a72b51a822725f1929523c"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#ac336482036a72b51a822725f1929523c">LibHomeScreen::onScreenMessage</a></div><div class="ttdeci">int onScreenMessage(const char *display_message)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d8a/libhomescreen_8cpp_source.html#l00244">libhomescreen.cpp:244</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html">LibHomeScreen</a></div><div class="ttdef"><b>Definition:</b> <a href="../../df/d43/libhomescreen_8hpp_source.html#l00032">libhomescreen.hpp:32</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_a249902aebf71a5383ca8ec6ae558d095"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#a249902aebf71a5383ca8ec6ae558d095">LibHomeScreen::~LibHomeScreen</a></div><div class="ttdeci">~LibHomeScreen()</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d8a/libhomescreen_8cpp_source.html#l00090">libhomescreen.cpp:90</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_a5593ff5ac78f6495ccb649904cf0ab08"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#a5593ff5ac78f6495ccb649904cf0ab08">LibHomeScreen::api_list</a></div><div class="ttdeci">static const std::vector&lt; std::string &gt; api_list</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d43/libhomescreen_8hpp_source.html#l00050">libhomescreen.hpp:50</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_aac03a45cbd453ba69ddb00c1016930a6"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#aac03a45cbd453ba69ddb00c1016930a6">LibHomeScreen::unsubscribe</a></div><div class="ttdeci">int unsubscribe(const std::string &amp;event_name)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d8a/libhomescreen_8cpp_source.html#l00421">libhomescreen.cpp:421</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_ab1b0e08bf35415de9064afed899e9f85"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#ab1b0e08bf35415de9064afed899e9f85">LibHomeScreen::set_event_handler</a></div><div class="ttdeci">void set_event_handler(enum EventType et, handler_func f)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d8a/libhomescreen_8cpp_source.html#l00293">libhomescreen.cpp:293</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_a2789e8a5372202cc36f48e71dbb9b7cf"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#a2789e8a5372202cc36f48e71dbb9b7cf">LibHomeScreen::registerCallback</a></div><div class="ttdeci">void registerCallback(void(*event_cb)(const std::string &amp;event, struct json_object *event_contents), void(*reply_cb)(struct json_object *reply_contents), void(*hangup_cb)(void)=nullptr)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d8a/libhomescreen_8cpp_source.html#l00155">libhomescreen.cpp:155</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_a82616c91ac211d2ad08e709b524bf154a4b0a82d501e4db5fbfe25c254c92896f"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154a4b0a82d501e4db5fbfe25c254c92896f">LibHomeScreen::Event_TapShortcut</a></div><div class="ttdef"><b>Definition:</b> <a href="../../df/d43/libhomescreen_8hpp_source.html#l00045">libhomescreen.hpp:45</a></div></div>
+</div><!-- fragment --></div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="../../doxygen.png" alt="doxygen"/>
+</a> 1.8.13
+</small></address>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/df/d76/hmi-debug_8h.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/df/d76/hmi-debug_8h.html
new file mode 100644
index 0000000..3931c00
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/df/d76/hmi-debug_8h.html
@@ -0,0 +1,435 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>HomeScreenBinding: include/hmi-debug.h File Reference</title>
+<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="../../jquery.js"></script>
+<script type="text/javascript" src="../../dynsections.js"></script>
+<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="../../search/searchdata.js"></script>
+<script type="text/javascript" src="../../search/search.js"></script>
+<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+ <td id="projectalign" style="padding-left: 0.5em;">
+ <div id="projectname">HomeScreenBinding
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.13 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
+</script>
+<script type="text/javascript" src="../../menudata.js"></script>
+<script type="text/javascript" src="../../menu.js"></script>
+<script type="text/javascript">
+$(function() {
+ initMenu('../../',true,false,'search.php','Search');
+ $(document).ready(function() { init_search(); });
+});
+</script>
+<div id="main-nav"></div>
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+ onmouseover="return searchBox.OnSearchSelectShow()"
+ onmouseout="return searchBox.OnSearchSelectHide()"
+ onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0"
+ name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div id="nav-path" class="navpath">
+ <ul>
+<li class="navelem"><a class="el" href="../../dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li> </ul>
+</div>
+</div><!-- top -->
+<div class="header">
+ <div class="summary">
+<a href="#define-members">Macros</a> &#124;
+<a href="#enum-members">Enumerations</a> &#124;
+<a href="#func-members">Functions</a> &#124;
+<a href="#var-members">Variables</a> </div>
+ <div class="headertitle">
+<div class="title">hmi-debug.h File Reference</div> </div>
+</div><!--header-->
+<div class="contents">
+<div class="textblock"><code>#include &lt;time.h&gt;</code><br />
+<code>#include &lt;stdio.h&gt;</code><br />
+<code>#include &lt;afb/afb-binding.h&gt;</code><br />
+</div>
+<p><a href="../../df/d76/hmi-debug_8h_source.html">Go to the source code of this file.</a></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
+Macros</h2></td></tr>
+<tr class="memitem:a65bb6c7cfe38f8a724beab5059d36fb2"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d76/hmi-debug_8h.html#a65bb6c7cfe38f8a724beab5059d36fb2">HMI_ERROR</a>(prefix, args, ...)&#160;&#160;&#160;<a class="el" href="../../df/d76/hmi-debug_8h.html#a0846b9d51e2e0612c4825a9a581aa40a">_HMI_LOG</a>(<a class="el" href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a5b40f003febbc3b535649d63f4b8a44f">LOG_LEVEL_ERROR</a>, __FILE__, __FUNCTION__, __LINE__, prefix, args, ##__VA_ARGS__)</td></tr>
+<tr class="separator:a65bb6c7cfe38f8a724beab5059d36fb2"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a25361812432cd2480bc8f1a8e56ecbf7"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d76/hmi-debug_8h.html#a25361812432cd2480bc8f1a8e56ecbf7">HMI_WARNING</a>(prefix, args, ...)&#160;&#160;&#160;<a class="el" href="../../df/d76/hmi-debug_8h.html#a0846b9d51e2e0612c4825a9a581aa40a">_HMI_LOG</a>(<a class="el" href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a5b4dd81b4dc7eefbc55ba03415c627ef">LOG_LEVEL_WARNING</a>, __FILE__, __FUNCTION__,__LINE__, prefix, args,##__VA_ARGS__)</td></tr>
+<tr class="separator:a25361812432cd2480bc8f1a8e56ecbf7"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:abc0d6e0760017d8ae48b836925b2ef15"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a>(prefix, args, ...)&#160;&#160;&#160;<a class="el" href="../../df/d76/hmi-debug_8h.html#a0846b9d51e2e0612c4825a9a581aa40a">_HMI_LOG</a>(<a class="el" href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a23ae4d711a7bbb3900240cb7316b4b4e">LOG_LEVEL_NOTICE</a>, __FILE__, __FUNCTION__,__LINE__, prefix, args,##__VA_ARGS__)</td></tr>
+<tr class="separator:abc0d6e0760017d8ae48b836925b2ef15"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a11b249a67108f0f4c50a0fc8a3eb4f5c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d76/hmi-debug_8h.html#a11b249a67108f0f4c50a0fc8a3eb4f5c">HMI_INFO</a>(prefix, args, ...)&#160;&#160;&#160;<a class="el" href="../../df/d76/hmi-debug_8h.html#a0846b9d51e2e0612c4825a9a581aa40a">_HMI_LOG</a>(<a class="el" href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583aedee1e3159bfe7d918b6e29873c5aee4">LOG_LEVEL_INFO</a>, __FILE__, __FUNCTION__,__LINE__, prefix, args,##__VA_ARGS__)</td></tr>
+<tr class="separator:a11b249a67108f0f4c50a0fc8a3eb4f5c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a0d26d8b8201011dade787236519711c0"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d76/hmi-debug_8h.html#a0d26d8b8201011dade787236519711c0">HMI_DEBUG</a>(prefix, args, ...)&#160;&#160;&#160;<a class="el" href="../../df/d76/hmi-debug_8h.html#a0846b9d51e2e0612c4825a9a581aa40a">_HMI_LOG</a>(<a class="el" href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a538b2b6e011479d408ecd2be0f6d6177">LOG_LEVEL_DEBUG</a>, __FILE__, __FUNCTION__,__LINE__, prefix, args,##__VA_ARGS__)</td></tr>
+<tr class="separator:a0d26d8b8201011dade787236519711c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table><table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
+Enumerations</h2></td></tr>
+<tr class="memitem:aa5a9053636a30269210c54e734e0d583"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583">LOG_LEVEL</a> { <br />
+&#160;&#160;<a class="el" href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a69dacb1837e1e37c6ed34cc2ee1d8848">LOG_LEVEL_NONE</a> = 0,
+<a class="el" href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a5b40f003febbc3b535649d63f4b8a44f">LOG_LEVEL_ERROR</a>,
+<a class="el" href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a5b4dd81b4dc7eefbc55ba03415c627ef">LOG_LEVEL_WARNING</a>,
+<a class="el" href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a23ae4d711a7bbb3900240cb7316b4b4e">LOG_LEVEL_NOTICE</a>,
+<br />
+&#160;&#160;<a class="el" href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583aedee1e3159bfe7d918b6e29873c5aee4">LOG_LEVEL_INFO</a>,
+<a class="el" href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a538b2b6e011479d408ecd2be0f6d6177">LOG_LEVEL_DEBUG</a>,
+<a class="el" href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a0459003454bc8bb17752e6d8e5787444">LOG_LEVEL_MAX</a> = LOG_LEVEL_ERROR
+<br />
+ }</td></tr>
+<tr class="separator:aa5a9053636a30269210c54e734e0d583"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table><table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
+Functions</h2></td></tr>
+<tr class="memitem:a0846b9d51e2e0612c4825a9a581aa40a"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d76/hmi-debug_8h.html#a0846b9d51e2e0612c4825a9a581aa40a">_HMI_LOG</a> (enum <a class="el" href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583">LOG_LEVEL</a> level, const char *file, const char *func, const int line, const char *prefix, const char *log,...)</td></tr>
+<tr class="separator:a0846b9d51e2e0612c4825a9a581aa40a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table><table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
+Variables</h2></td></tr>
+<tr class="memitem:a13d4c7647aad2e84766f8b48a6caab09"><td class="memItemLeft" align="right" valign="top">static char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d76/hmi-debug_8h.html#a13d4c7647aad2e84766f8b48a6caab09">ERROR_FLAG</a> [6][20] = {&quot;NONE&quot;, &quot;ERROR&quot;, &quot;WARNING&quot;, &quot;NOTICE&quot;, &quot;INFO&quot;, &quot;DEBUG&quot;}</td></tr>
+<tr class="separator:a13d4c7647aad2e84766f8b48a6caab09"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<h2 class="groupheader">Macro Definition Documentation</h2>
+<a id="a0d26d8b8201011dade787236519711c0"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a0d26d8b8201011dade787236519711c0">&#9670;&nbsp;</a></span>HMI_DEBUG</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define HMI_DEBUG</td>
+ <td>(</td>
+ <td class="paramtype">&#160;</td>
+ <td class="paramname">prefix, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">&#160;</td>
+ <td class="paramname">args, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">&#160;</td>
+ <td class="paramname"><em>...</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td>&#160;&#160;&#160;<a class="el" href="../../df/d76/hmi-debug_8h.html#a0846b9d51e2e0612c4825a9a581aa40a">_HMI_LOG</a>(<a class="el" href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a538b2b6e011479d408ecd2be0f6d6177">LOG_LEVEL_DEBUG</a>, __FILE__, __FUNCTION__,__LINE__, prefix, args,##__VA_ARGS__)</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p class="definition">Definition at line <a class="el" href="../../df/d76/hmi-debug_8h_source.html#l00022">22</a> of file <a class="el" href="../../df/d76/hmi-debug_8h_source.html">hmi-debug.h</a>.</p>
+
+</div>
+</div>
+<a id="a65bb6c7cfe38f8a724beab5059d36fb2"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a65bb6c7cfe38f8a724beab5059d36fb2">&#9670;&nbsp;</a></span>HMI_ERROR</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define HMI_ERROR</td>
+ <td>(</td>
+ <td class="paramtype">&#160;</td>
+ <td class="paramname">prefix, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">&#160;</td>
+ <td class="paramname">args, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">&#160;</td>
+ <td class="paramname"><em>...</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td>&#160;&#160;&#160;<a class="el" href="../../df/d76/hmi-debug_8h.html#a0846b9d51e2e0612c4825a9a581aa40a">_HMI_LOG</a>(<a class="el" href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a5b40f003febbc3b535649d63f4b8a44f">LOG_LEVEL_ERROR</a>, __FILE__, __FUNCTION__, __LINE__, prefix, args, ##__VA_ARGS__)</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p class="definition">Definition at line <a class="el" href="../../df/d76/hmi-debug_8h_source.html#l00018">18</a> of file <a class="el" href="../../df/d76/hmi-debug_8h_source.html">hmi-debug.h</a>.</p>
+
+</div>
+</div>
+<a id="a11b249a67108f0f4c50a0fc8a3eb4f5c"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a11b249a67108f0f4c50a0fc8a3eb4f5c">&#9670;&nbsp;</a></span>HMI_INFO</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define HMI_INFO</td>
+ <td>(</td>
+ <td class="paramtype">&#160;</td>
+ <td class="paramname">prefix, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">&#160;</td>
+ <td class="paramname">args, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">&#160;</td>
+ <td class="paramname"><em>...</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td>&#160;&#160;&#160;<a class="el" href="../../df/d76/hmi-debug_8h.html#a0846b9d51e2e0612c4825a9a581aa40a">_HMI_LOG</a>(<a class="el" href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583aedee1e3159bfe7d918b6e29873c5aee4">LOG_LEVEL_INFO</a>, __FILE__, __FUNCTION__,__LINE__, prefix, args,##__VA_ARGS__)</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p class="definition">Definition at line <a class="el" href="../../df/d76/hmi-debug_8h_source.html#l00021">21</a> of file <a class="el" href="../../df/d76/hmi-debug_8h_source.html">hmi-debug.h</a>.</p>
+
+</div>
+</div>
+<a id="abc0d6e0760017d8ae48b836925b2ef15"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#abc0d6e0760017d8ae48b836925b2ef15">&#9670;&nbsp;</a></span>HMI_NOTICE</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define HMI_NOTICE</td>
+ <td>(</td>
+ <td class="paramtype">&#160;</td>
+ <td class="paramname">prefix, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">&#160;</td>
+ <td class="paramname">args, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">&#160;</td>
+ <td class="paramname"><em>...</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td>&#160;&#160;&#160;<a class="el" href="../../df/d76/hmi-debug_8h.html#a0846b9d51e2e0612c4825a9a581aa40a">_HMI_LOG</a>(<a class="el" href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a23ae4d711a7bbb3900240cb7316b4b4e">LOG_LEVEL_NOTICE</a>, __FILE__, __FUNCTION__,__LINE__, prefix, args,##__VA_ARGS__)</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p class="definition">Definition at line <a class="el" href="../../df/d76/hmi-debug_8h_source.html#l00020">20</a> of file <a class="el" href="../../df/d76/hmi-debug_8h_source.html">hmi-debug.h</a>.</p>
+
+</div>
+</div>
+<a id="a25361812432cd2480bc8f1a8e56ecbf7"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a25361812432cd2480bc8f1a8e56ecbf7">&#9670;&nbsp;</a></span>HMI_WARNING</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define HMI_WARNING</td>
+ <td>(</td>
+ <td class="paramtype">&#160;</td>
+ <td class="paramname">prefix, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">&#160;</td>
+ <td class="paramname">args, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">&#160;</td>
+ <td class="paramname"><em>...</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td>&#160;&#160;&#160;<a class="el" href="../../df/d76/hmi-debug_8h.html#a0846b9d51e2e0612c4825a9a581aa40a">_HMI_LOG</a>(<a class="el" href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a5b4dd81b4dc7eefbc55ba03415c627ef">LOG_LEVEL_WARNING</a>, __FILE__, __FUNCTION__,__LINE__, prefix, args,##__VA_ARGS__)</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p class="definition">Definition at line <a class="el" href="../../df/d76/hmi-debug_8h_source.html#l00019">19</a> of file <a class="el" href="../../df/d76/hmi-debug_8h_source.html">hmi-debug.h</a>.</p>
+
+</div>
+</div>
+<h2 class="groupheader">Enumeration Type Documentation</h2>
+<a id="aa5a9053636a30269210c54e734e0d583"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aa5a9053636a30269210c54e734e0d583">&#9670;&nbsp;</a></span>LOG_LEVEL</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">enum <a class="el" href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583">LOG_LEVEL</a></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<table class="fieldtable">
+<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="aa5a9053636a30269210c54e734e0d583a69dacb1837e1e37c6ed34cc2ee1d8848"></a>LOG_LEVEL_NONE&#160;</td><td class="fielddoc"></td></tr>
+<tr><td class="fieldname"><a id="aa5a9053636a30269210c54e734e0d583a5b40f003febbc3b535649d63f4b8a44f"></a>LOG_LEVEL_ERROR&#160;</td><td class="fielddoc"></td></tr>
+<tr><td class="fieldname"><a id="aa5a9053636a30269210c54e734e0d583a5b4dd81b4dc7eefbc55ba03415c627ef"></a>LOG_LEVEL_WARNING&#160;</td><td class="fielddoc"></td></tr>
+<tr><td class="fieldname"><a id="aa5a9053636a30269210c54e734e0d583a23ae4d711a7bbb3900240cb7316b4b4e"></a>LOG_LEVEL_NOTICE&#160;</td><td class="fielddoc"></td></tr>
+<tr><td class="fieldname"><a id="aa5a9053636a30269210c54e734e0d583aedee1e3159bfe7d918b6e29873c5aee4"></a>LOG_LEVEL_INFO&#160;</td><td class="fielddoc"></td></tr>
+<tr><td class="fieldname"><a id="aa5a9053636a30269210c54e734e0d583a538b2b6e011479d408ecd2be0f6d6177"></a>LOG_LEVEL_DEBUG&#160;</td><td class="fielddoc"></td></tr>
+<tr><td class="fieldname"><a id="aa5a9053636a30269210c54e734e0d583a0459003454bc8bb17752e6d8e5787444"></a>LOG_LEVEL_MAX&#160;</td><td class="fielddoc"></td></tr>
+</table>
+
+<p class="definition">Definition at line <a class="el" href="../../df/d76/hmi-debug_8h_source.html#l00008">8</a> of file <a class="el" href="../../df/d76/hmi-debug_8h_source.html">hmi-debug.h</a>.</p>
+<div class="fragment"><div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160; {</div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a69dacb1837e1e37c6ed34cc2ee1d8848">LOG_LEVEL_NONE</a> = 0,</div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a5b40f003febbc3b535649d63f4b8a44f">LOG_LEVEL_ERROR</a>,</div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a5b4dd81b4dc7eefbc55ba03415c627ef">LOG_LEVEL_WARNING</a>,</div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a23ae4d711a7bbb3900240cb7316b4b4e">LOG_LEVEL_NOTICE</a>,</div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583aedee1e3159bfe7d918b6e29873c5aee4">LOG_LEVEL_INFO</a>,</div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a538b2b6e011479d408ecd2be0f6d6177">LOG_LEVEL_DEBUG</a>,</div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a0459003454bc8bb17752e6d8e5787444">LOG_LEVEL_MAX</a> = <a class="code" href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a5b40f003febbc3b535649d63f4b8a44f">LOG_LEVEL_ERROR</a></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;};</div><div class="ttc" id="hmi-debug_8h_html_aa5a9053636a30269210c54e734e0d583a5b40f003febbc3b535649d63f4b8a44f"><div class="ttname"><a href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a5b40f003febbc3b535649d63f4b8a44f">LOG_LEVEL_ERROR</a></div><div class="ttdef"><b>Definition:</b> <a href="../../df/d76/hmi-debug_8h_source.html#l00010">hmi-debug.h:10</a></div></div>
+<div class="ttc" id="hmi-debug_8h_html_aa5a9053636a30269210c54e734e0d583a23ae4d711a7bbb3900240cb7316b4b4e"><div class="ttname"><a href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a23ae4d711a7bbb3900240cb7316b4b4e">LOG_LEVEL_NOTICE</a></div><div class="ttdef"><b>Definition:</b> <a href="../../df/d76/hmi-debug_8h_source.html#l00012">hmi-debug.h:12</a></div></div>
+<div class="ttc" id="hmi-debug_8h_html_aa5a9053636a30269210c54e734e0d583a538b2b6e011479d408ecd2be0f6d6177"><div class="ttname"><a href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a538b2b6e011479d408ecd2be0f6d6177">LOG_LEVEL_DEBUG</a></div><div class="ttdef"><b>Definition:</b> <a href="../../df/d76/hmi-debug_8h_source.html#l00014">hmi-debug.h:14</a></div></div>
+<div class="ttc" id="hmi-debug_8h_html_aa5a9053636a30269210c54e734e0d583aedee1e3159bfe7d918b6e29873c5aee4"><div class="ttname"><a href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583aedee1e3159bfe7d918b6e29873c5aee4">LOG_LEVEL_INFO</a></div><div class="ttdef"><b>Definition:</b> <a href="../../df/d76/hmi-debug_8h_source.html#l00013">hmi-debug.h:13</a></div></div>
+<div class="ttc" id="hmi-debug_8h_html_aa5a9053636a30269210c54e734e0d583a0459003454bc8bb17752e6d8e5787444"><div class="ttname"><a href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a0459003454bc8bb17752e6d8e5787444">LOG_LEVEL_MAX</a></div><div class="ttdef"><b>Definition:</b> <a href="../../df/d76/hmi-debug_8h_source.html#l00015">hmi-debug.h:15</a></div></div>
+<div class="ttc" id="hmi-debug_8h_html_aa5a9053636a30269210c54e734e0d583a5b4dd81b4dc7eefbc55ba03415c627ef"><div class="ttname"><a href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a5b4dd81b4dc7eefbc55ba03415c627ef">LOG_LEVEL_WARNING</a></div><div class="ttdef"><b>Definition:</b> <a href="../../df/d76/hmi-debug_8h_source.html#l00011">hmi-debug.h:11</a></div></div>
+<div class="ttc" id="hmi-debug_8h_html_aa5a9053636a30269210c54e734e0d583a69dacb1837e1e37c6ed34cc2ee1d8848"><div class="ttname"><a href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a69dacb1837e1e37c6ed34cc2ee1d8848">LOG_LEVEL_NONE</a></div><div class="ttdef"><b>Definition:</b> <a href="../../df/d76/hmi-debug_8h_source.html#l00009">hmi-debug.h:9</a></div></div>
+</div><!-- fragment -->
+</div>
+</div>
+<h2 class="groupheader">Function Documentation</h2>
+<a id="a0846b9d51e2e0612c4825a9a581aa40a"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a0846b9d51e2e0612c4825a9a581aa40a">&#9670;&nbsp;</a></span>_HMI_LOG()</h2>
+
+<div class="memitem">
+<div class="memproto">
+<table class="mlabels">
+ <tr>
+ <td class="mlabels-left">
+ <table class="memname">
+ <tr>
+ <td class="memname">static void _HMI_LOG </td>
+ <td>(</td>
+ <td class="paramtype">enum <a class="el" href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583">LOG_LEVEL</a>&#160;</td>
+ <td class="paramname"><em>level</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const char *&#160;</td>
+ <td class="paramname"><em>file</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const char *&#160;</td>
+ <td class="paramname"><em>func</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const int&#160;</td>
+ <td class="paramname"><em>line</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const char *&#160;</td>
+ <td class="paramname"><em>prefix</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const char *&#160;</td>
+ <td class="paramname"><em>log</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">&#160;</td>
+ <td class="paramname"><em>...</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+ </td>
+ <td class="mlabels-right">
+<span class="mlabels"><span class="mlabel">static</span></span> </td>
+ </tr>
+</table>
+</div><div class="memdoc">
+
+<p class="definition">Definition at line <a class="el" href="../../df/d76/hmi-debug_8h_source.html#l00026">26</a> of file <a class="el" href="../../df/d76/hmi-debug_8h_source.html">hmi-debug.h</a>.</p>
+<div class="fragment"><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;{</div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> log_level = (getenv(<span class="stringliteral">&quot;USE_HMI_DEBUG&quot;</span>) == NULL)?0:atoi(getenv(<span class="stringliteral">&quot;USE_HMI_DEBUG&quot;</span>));</div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160; <span class="keywordflow">if</span>(log_level &lt; level)</div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160; {</div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160; <span class="keywordflow">return</span>;</div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160; }</div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160; <span class="keywordtype">char</span> *message;</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160; <span class="keyword">struct </span>timespec tp;</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160; <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> time;</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160;</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160; clock_gettime(CLOCK_REALTIME, &amp;tp);</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160; time = (tp.tv_sec * 1000000L) + (tp.tv_nsec / 1000);</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160;</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160; va_list args;</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160; va_start(args, log);</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160; <span class="keywordflow">if</span> (log == NULL || vasprintf(&amp;message, log, args) &lt; 0)</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160; message = NULL;</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160; fprintf(stderr, <span class="stringliteral">&quot;[%10.3f] [%s %s] [%s:%d] &gt;&gt;&gt; %s \n&quot;</span>, time / 1000.0, prefix, <a class="code" href="../../df/d76/hmi-debug_8h.html#a13d4c7647aad2e84766f8b48a6caab09">ERROR_FLAG</a>[level], func, line, message);</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160; va_end(args);</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160; free(message);</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160;}</div><div class="ttc" id="hmi-debug_8h_html_a13d4c7647aad2e84766f8b48a6caab09"><div class="ttname"><a href="../../df/d76/hmi-debug_8h.html#a13d4c7647aad2e84766f8b48a6caab09">ERROR_FLAG</a></div><div class="ttdeci">static char ERROR_FLAG[6][20]</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d76/hmi-debug_8h_source.html#l00024">hmi-debug.h:24</a></div></div>
+</div><!-- fragment -->
+</div>
+</div>
+<h2 class="groupheader">Variable Documentation</h2>
+<a id="a13d4c7647aad2e84766f8b48a6caab09"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a13d4c7647aad2e84766f8b48a6caab09">&#9670;&nbsp;</a></span>ERROR_FLAG</h2>
+
+<div class="memitem">
+<div class="memproto">
+<table class="mlabels">
+ <tr>
+ <td class="mlabels-left">
+ <table class="memname">
+ <tr>
+ <td class="memname">char ERROR_FLAG[6][20] = {&quot;NONE&quot;, &quot;ERROR&quot;, &quot;WARNING&quot;, &quot;NOTICE&quot;, &quot;INFO&quot;, &quot;DEBUG&quot;}</td>
+ </tr>
+ </table>
+ </td>
+ <td class="mlabels-right">
+<span class="mlabels"><span class="mlabel">static</span></span> </td>
+ </tr>
+</table>
+</div><div class="memdoc">
+
+<p class="definition">Definition at line <a class="el" href="../../df/d76/hmi-debug_8h_source.html#l00024">24</a> of file <a class="el" href="../../df/d76/hmi-debug_8h_source.html">hmi-debug.h</a>.</p>
+
+</div>
+</div>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="../../doxygen.png" alt="doxygen"/>
+</a> 1.8.13
+</small></address>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/df/d76/hmi-debug_8h_source.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/df/d76/hmi-debug_8h_source.html
new file mode 100644
index 0000000..80b0c61
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/df/d76/hmi-debug_8h_source.html
@@ -0,0 +1,87 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>HomeScreenBinding: include/hmi-debug.h Source File</title>
+<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="../../jquery.js"></script>
+<script type="text/javascript" src="../../dynsections.js"></script>
+<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="../../search/searchdata.js"></script>
+<script type="text/javascript" src="../../search/search.js"></script>
+<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+ <td id="projectalign" style="padding-left: 0.5em;">
+ <div id="projectname">HomeScreenBinding
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.13 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
+</script>
+<script type="text/javascript" src="../../menudata.js"></script>
+<script type="text/javascript" src="../../menu.js"></script>
+<script type="text/javascript">
+$(function() {
+ initMenu('../../',true,false,'search.php','Search');
+ $(document).ready(function() { init_search(); });
+});
+</script>
+<div id="main-nav"></div>
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+ onmouseover="return searchBox.OnSearchSelectShow()"
+ onmouseout="return searchBox.OnSearchSelectHide()"
+ onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0"
+ name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div id="nav-path" class="navpath">
+ <ul>
+<li class="navelem"><a class="el" href="../../dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li> </ul>
+</div>
+</div><!-- top -->
+<div class="header">
+ <div class="headertitle">
+<div class="title">hmi-debug.h</div> </div>
+</div><!--header-->
+<div class="contents">
+<a href="../../df/d76/hmi-debug_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="preprocessor">#ifndef __HMI_DEBUG_H__</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="preprocessor">#define __HMI_DEBUG_H__</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;</div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="preprocessor">#include &lt;time.h&gt;</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="preprocessor">#include &lt;stdio.h&gt;</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="preprocessor">#include &lt;afb/afb-binding.h&gt;</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;</div><div class="line"><a name="l00008"></a><span class="lineno"><a class="line" href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583"> 8</a></span>&#160;<span class="keyword">enum</span> <a class="code" href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583">LOG_LEVEL</a>{</div><div class="line"><a name="l00009"></a><span class="lineno"><a class="line" href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a69dacb1837e1e37c6ed34cc2ee1d8848"> 9</a></span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a69dacb1837e1e37c6ed34cc2ee1d8848">LOG_LEVEL_NONE</a> = 0,</div><div class="line"><a name="l00010"></a><span class="lineno"><a class="line" href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a5b40f003febbc3b535649d63f4b8a44f"> 10</a></span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a5b40f003febbc3b535649d63f4b8a44f">LOG_LEVEL_ERROR</a>,</div><div class="line"><a name="l00011"></a><span class="lineno"><a class="line" href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a5b4dd81b4dc7eefbc55ba03415c627ef"> 11</a></span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a5b4dd81b4dc7eefbc55ba03415c627ef">LOG_LEVEL_WARNING</a>,</div><div class="line"><a name="l00012"></a><span class="lineno"><a class="line" href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a23ae4d711a7bbb3900240cb7316b4b4e"> 12</a></span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a23ae4d711a7bbb3900240cb7316b4b4e">LOG_LEVEL_NOTICE</a>,</div><div class="line"><a name="l00013"></a><span class="lineno"><a class="line" href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583aedee1e3159bfe7d918b6e29873c5aee4"> 13</a></span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583aedee1e3159bfe7d918b6e29873c5aee4">LOG_LEVEL_INFO</a>,</div><div class="line"><a name="l00014"></a><span class="lineno"><a class="line" href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a538b2b6e011479d408ecd2be0f6d6177"> 14</a></span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a538b2b6e011479d408ecd2be0f6d6177">LOG_LEVEL_DEBUG</a>,</div><div class="line"><a name="l00015"></a><span class="lineno"><a class="line" href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a0459003454bc8bb17752e6d8e5787444"> 15</a></span>&#160; <a class="code" href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a0459003454bc8bb17752e6d8e5787444">LOG_LEVEL_MAX</a> = <a class="code" href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a5b40f003febbc3b535649d63f4b8a44f">LOG_LEVEL_ERROR</a></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;};</div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;</div><div class="line"><a name="l00018"></a><span class="lineno"><a class="line" href="../../df/d76/hmi-debug_8h.html#a65bb6c7cfe38f8a724beab5059d36fb2"> 18</a></span>&#160;<span class="preprocessor">#define HMI_ERROR(prefix, args,...) _HMI_LOG(LOG_LEVEL_ERROR, __FILE__, __FUNCTION__, __LINE__, prefix, args, ##__VA_ARGS__)</span></div><div class="line"><a name="l00019"></a><span class="lineno"><a class="line" href="../../df/d76/hmi-debug_8h.html#a25361812432cd2480bc8f1a8e56ecbf7"> 19</a></span>&#160;<span class="preprocessor">#define HMI_WARNING(prefix, args,...) _HMI_LOG(LOG_LEVEL_WARNING, __FILE__, __FUNCTION__,__LINE__, prefix, args,##__VA_ARGS__)</span></div><div class="line"><a name="l00020"></a><span class="lineno"><a class="line" href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15"> 20</a></span>&#160;<span class="preprocessor">#define HMI_NOTICE(prefix, args,...) _HMI_LOG(LOG_LEVEL_NOTICE, __FILE__, __FUNCTION__,__LINE__, prefix, args,##__VA_ARGS__)</span></div><div class="line"><a name="l00021"></a><span class="lineno"><a class="line" href="../../df/d76/hmi-debug_8h.html#a11b249a67108f0f4c50a0fc8a3eb4f5c"> 21</a></span>&#160;<span class="preprocessor">#define HMI_INFO(prefix, args,...) _HMI_LOG(LOG_LEVEL_INFO, __FILE__, __FUNCTION__,__LINE__, prefix, args,##__VA_ARGS__)</span></div><div class="line"><a name="l00022"></a><span class="lineno"><a class="line" href="../../df/d76/hmi-debug_8h.html#a0d26d8b8201011dade787236519711c0"> 22</a></span>&#160;<span class="preprocessor">#define HMI_DEBUG(prefix, args,...) _HMI_LOG(LOG_LEVEL_DEBUG, __FILE__, __FUNCTION__,__LINE__, prefix, args,##__VA_ARGS__)</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;</div><div class="line"><a name="l00024"></a><span class="lineno"><a class="line" href="../../df/d76/hmi-debug_8h.html#a13d4c7647aad2e84766f8b48a6caab09"> 24</a></span>&#160;<span class="keyword">static</span> <span class="keywordtype">char</span> <a class="code" href="../../df/d76/hmi-debug_8h.html#a13d4c7647aad2e84766f8b48a6caab09">ERROR_FLAG</a>[6][20] = {<span class="stringliteral">&quot;NONE&quot;</span>, <span class="stringliteral">&quot;ERROR&quot;</span>, <span class="stringliteral">&quot;WARNING&quot;</span>, <span class="stringliteral">&quot;NOTICE&quot;</span>, <span class="stringliteral">&quot;INFO&quot;</span>, <span class="stringliteral">&quot;DEBUG&quot;</span>};</div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;</div><div class="line"><a name="l00026"></a><span class="lineno"><a class="line" href="../../df/d76/hmi-debug_8h.html#a0846b9d51e2e0612c4825a9a581aa40a"> 26</a></span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="../../df/d76/hmi-debug_8h.html#a0846b9d51e2e0612c4825a9a581aa40a">_HMI_LOG</a>(<span class="keyword">enum</span> <a class="code" href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583">LOG_LEVEL</a> level, <span class="keyword">const</span> <span class="keywordtype">char</span>* file, <span class="keyword">const</span> <span class="keywordtype">char</span>* func, <span class="keyword">const</span> <span class="keywordtype">int</span> line, <span class="keyword">const</span> <span class="keywordtype">char</span>* prefix, <span class="keyword">const</span> <span class="keywordtype">char</span>* log, ...)</div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;{</div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> log_level = (getenv(<span class="stringliteral">&quot;USE_HMI_DEBUG&quot;</span>) == NULL)?0:atoi(getenv(<span class="stringliteral">&quot;USE_HMI_DEBUG&quot;</span>));</div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160; <span class="keywordflow">if</span>(log_level &lt; level)</div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160; {</div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160; <span class="keywordflow">return</span>;</div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160; }</div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160; <span class="keywordtype">char</span> *message;</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160; <span class="keyword">struct </span>timespec tp;</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160; <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> time;</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160;</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160; clock_gettime(CLOCK_REALTIME, &amp;tp);</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160; time = (tp.tv_sec * 1000000L) + (tp.tv_nsec / 1000);</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160;</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160; va_list args;</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160; va_start(args, log);</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160; <span class="keywordflow">if</span> (log == NULL || vasprintf(&amp;message, log, args) &lt; 0)</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160; message = NULL;</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160; fprintf(stderr, <span class="stringliteral">&quot;[%10.3f] [%s %s] [%s:%d] &gt;&gt;&gt; %s \n&quot;</span>, time / 1000.0, prefix, <a class="code" href="../../df/d76/hmi-debug_8h.html#a13d4c7647aad2e84766f8b48a6caab09">ERROR_FLAG</a>[level], func, line, message);</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160; va_end(args);</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160; free(message);</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160;}</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160;</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160;<span class="preprocessor">#endif //__HMI_DEBUG_H__</span></div><div class="ttc" id="hmi-debug_8h_html_aa5a9053636a30269210c54e734e0d583a5b40f003febbc3b535649d63f4b8a44f"><div class="ttname"><a href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a5b40f003febbc3b535649d63f4b8a44f">LOG_LEVEL_ERROR</a></div><div class="ttdef"><b>Definition:</b> <a href="../../df/d76/hmi-debug_8h_source.html#l00010">hmi-debug.h:10</a></div></div>
+<div class="ttc" id="hmi-debug_8h_html_aa5a9053636a30269210c54e734e0d583a23ae4d711a7bbb3900240cb7316b4b4e"><div class="ttname"><a href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a23ae4d711a7bbb3900240cb7316b4b4e">LOG_LEVEL_NOTICE</a></div><div class="ttdef"><b>Definition:</b> <a href="../../df/d76/hmi-debug_8h_source.html#l00012">hmi-debug.h:12</a></div></div>
+<div class="ttc" id="hmi-debug_8h_html_aa5a9053636a30269210c54e734e0d583a538b2b6e011479d408ecd2be0f6d6177"><div class="ttname"><a href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a538b2b6e011479d408ecd2be0f6d6177">LOG_LEVEL_DEBUG</a></div><div class="ttdef"><b>Definition:</b> <a href="../../df/d76/hmi-debug_8h_source.html#l00014">hmi-debug.h:14</a></div></div>
+<div class="ttc" id="hmi-debug_8h_html_aa5a9053636a30269210c54e734e0d583aedee1e3159bfe7d918b6e29873c5aee4"><div class="ttname"><a href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583aedee1e3159bfe7d918b6e29873c5aee4">LOG_LEVEL_INFO</a></div><div class="ttdef"><b>Definition:</b> <a href="../../df/d76/hmi-debug_8h_source.html#l00013">hmi-debug.h:13</a></div></div>
+<div class="ttc" id="hmi-debug_8h_html_a13d4c7647aad2e84766f8b48a6caab09"><div class="ttname"><a href="../../df/d76/hmi-debug_8h.html#a13d4c7647aad2e84766f8b48a6caab09">ERROR_FLAG</a></div><div class="ttdeci">static char ERROR_FLAG[6][20]</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d76/hmi-debug_8h_source.html#l00024">hmi-debug.h:24</a></div></div>
+<div class="ttc" id="hmi-debug_8h_html_aa5a9053636a30269210c54e734e0d583"><div class="ttname"><a href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583">LOG_LEVEL</a></div><div class="ttdeci">LOG_LEVEL</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d76/hmi-debug_8h_source.html#l00008">hmi-debug.h:8</a></div></div>
+<div class="ttc" id="hmi-debug_8h_html_aa5a9053636a30269210c54e734e0d583a0459003454bc8bb17752e6d8e5787444"><div class="ttname"><a href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a0459003454bc8bb17752e6d8e5787444">LOG_LEVEL_MAX</a></div><div class="ttdef"><b>Definition:</b> <a href="../../df/d76/hmi-debug_8h_source.html#l00015">hmi-debug.h:15</a></div></div>
+<div class="ttc" id="hmi-debug_8h_html_aa5a9053636a30269210c54e734e0d583a5b4dd81b4dc7eefbc55ba03415c627ef"><div class="ttname"><a href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a5b4dd81b4dc7eefbc55ba03415c627ef">LOG_LEVEL_WARNING</a></div><div class="ttdef"><b>Definition:</b> <a href="../../df/d76/hmi-debug_8h_source.html#l00011">hmi-debug.h:11</a></div></div>
+<div class="ttc" id="hmi-debug_8h_html_a0846b9d51e2e0612c4825a9a581aa40a"><div class="ttname"><a href="../../df/d76/hmi-debug_8h.html#a0846b9d51e2e0612c4825a9a581aa40a">_HMI_LOG</a></div><div class="ttdeci">static void _HMI_LOG(enum LOG_LEVEL level, const char *file, const char *func, const int line, const char *prefix, const char *log,...)</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d76/hmi-debug_8h_source.html#l00026">hmi-debug.h:26</a></div></div>
+<div class="ttc" id="hmi-debug_8h_html_aa5a9053636a30269210c54e734e0d583a69dacb1837e1e37c6ed34cc2ee1d8848"><div class="ttname"><a href="../../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a69dacb1837e1e37c6ed34cc2ee1d8848">LOG_LEVEL_NONE</a></div><div class="ttdef"><b>Definition:</b> <a href="../../df/d76/hmi-debug_8h_source.html#l00009">hmi-debug.h:9</a></div></div>
+</div><!-- fragment --></div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="../../doxygen.png" alt="doxygen"/>
+</a> 1.8.13
+</small></address>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/df/d7d/structevent.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/df/d7d/structevent.html
new file mode 100644
index 0000000..2fcc0eb
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/df/d7d/structevent.html
@@ -0,0 +1,123 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>HomeScreenBinding: event Struct Reference</title>
+<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="../../jquery.js"></script>
+<script type="text/javascript" src="../../dynsections.js"></script>
+<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="../../search/searchdata.js"></script>
+<script type="text/javascript" src="../../search/search.js"></script>
+<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+ <td id="projectalign" style="padding-left: 0.5em;">
+ <div id="projectname">HomeScreenBinding
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.13 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
+</script>
+<script type="text/javascript" src="../../menudata.js"></script>
+<script type="text/javascript" src="../../menu.js"></script>
+<script type="text/javascript">
+$(function() {
+ initMenu('../../',true,false,'search.php','Search');
+ $(document).ready(function() { init_search(); });
+});
+</script>
+<div id="main-nav"></div>
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+ onmouseover="return searchBox.OnSearchSelectShow()"
+ onmouseout="return searchBox.OnSearchSelectHide()"
+ onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0"
+ name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+</div><!-- top -->
+<div class="header">
+ <div class="summary">
+<a href="#pub-attribs">Public Attributes</a> &#124;
+<a href="../../dd/d86/structevent-members.html">List of all members</a> </div>
+ <div class="headertitle">
+<div class="title">event Struct Reference</div> </div>
+</div><!--header-->
+<div class="contents">
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
+Public Attributes</h2></td></tr>
+<tr class="memitem:a45c6cfb7961a21a3366db067e4cc59ab"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d7d/structevent.html#a45c6cfb7961a21a3366db067e4cc59ab">name</a></td></tr>
+<tr class="separator:a45c6cfb7961a21a3366db067e4cc59ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a58726ebc551d36562ac3f9e1fe293214"><td class="memItemLeft" align="right" valign="top">struct afb_event *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d7d/structevent.html#a58726ebc551d36562ac3f9e1fe293214">event</a></td></tr>
+<tr class="separator:a58726ebc551d36562ac3f9e1fe293214"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock">
+<p class="definition">Definition at line <a class="el" href="../../d0/d1e/homescreen_8c_source.html#l00035">35</a> of file <a class="el" href="../../d0/d1e/homescreen_8c_source.html">homescreen.c</a>.</p>
+</div><h2 class="groupheader">Member Data Documentation</h2>
+<a id="a58726ebc551d36562ac3f9e1fe293214"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a58726ebc551d36562ac3f9e1fe293214">&#9670;&nbsp;</a></span>event</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">struct afb_event* event::event</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p class="definition">Definition at line <a class="el" href="../../d0/d1e/homescreen_8c_source.html#l00037">37</a> of file <a class="el" href="../../d0/d1e/homescreen_8c_source.html">homescreen.c</a>.</p>
+
+</div>
+</div>
+<a id="a45c6cfb7961a21a3366db067e4cc59ab"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a45c6cfb7961a21a3366db067e4cc59ab">&#9670;&nbsp;</a></span>name</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">const char* event::name</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p class="definition">Definition at line <a class="el" href="../../d0/d1e/homescreen_8c_source.html#l00036">36</a> of file <a class="el" href="../../d0/d1e/homescreen_8c_source.html">homescreen.c</a>.</p>
+
+</div>
+</div>
+<hr/>The documentation for this struct was generated from the following file:<ul>
+<li>src/<a class="el" href="../../d0/d1e/homescreen_8c_source.html">homescreen.c</a></li>
+</ul>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="../../doxygen.png" alt="doxygen"/>
+</a> 1.8.13
+</small></address>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/df/dac/test_8cpp.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/df/dac/test_8cpp.html
new file mode 100644
index 0000000..00f9515
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/df/dac/test_8cpp.html
@@ -0,0 +1,334 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>HomeScreenBinding: libhomescreen/test.cpp File Reference</title>
+<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="../../jquery.js"></script>
+<script type="text/javascript" src="../../dynsections.js"></script>
+<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="../../search/searchdata.js"></script>
+<script type="text/javascript" src="../../search/search.js"></script>
+<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+ <td id="projectalign" style="padding-left: 0.5em;">
+ <div id="projectname">HomeScreenBinding
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.13 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
+</script>
+<script type="text/javascript" src="../../menudata.js"></script>
+<script type="text/javascript" src="../../menu.js"></script>
+<script type="text/javascript">
+$(function() {
+ initMenu('../../',true,false,'search.php','Search');
+ $(document).ready(function() { init_search(); });
+});
+</script>
+<div id="main-nav"></div>
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+ onmouseover="return searchBox.OnSearchSelectShow()"
+ onmouseout="return searchBox.OnSearchSelectHide()"
+ onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0"
+ name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div id="nav-path" class="navpath">
+ <ul>
+<li class="navelem"><a class="el" href="../../dir_65f76d62445e9e84c0450b12bf77c3bc.html">libhomescreen</a></li> </ul>
+</div>
+</div><!-- top -->
+<div class="header">
+ <div class="summary">
+<a href="#func-members">Functions</a> &#124;
+<a href="#var-members">Variables</a> </div>
+ <div class="headertitle">
+<div class="title">test.cpp File Reference</div> </div>
+</div><!--header-->
+<div class="contents">
+<div class="textblock"><code>#include &lt;<a class="el" href="../../df/d43/libhomescreen_8hpp_source.html">libhomescreen.hpp</a>&gt;</code><br />
+<code>#include &lt;iostream&gt;</code><br />
+<code>#include &lt;glib-2.0/glib.h&gt;</code><br />
+<code>#include &lt;fcntl.h&gt;</code><br />
+<code>#include &lt;string&gt;</code><br />
+<code>#include &lt;sys/types.h&gt;</code><br />
+<code>#include &lt;sys/stat.h&gt;</code><br />
+<code>#include &lt;thread&gt;</code><br />
+<code>#include &lt;exception&gt;</code><br />
+<code>#include &lt;vector&gt;</code><br />
+<code>#include &lt;sstream&gt;</code><br />
+<code>#include &lt;functional&gt;</code><br />
+</div>
+<p><a href="../../df/dac/test_8cpp_source.html">Go to the source code of this file.</a></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
+Functions</h2></td></tr>
+<tr class="memitem:aafb7f182b8bb6ba92354dde1658d86a4"><td class="memItemLeft" align="right" valign="top">static vector&lt; string &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/dac/test_8cpp.html#aafb7f182b8bb6ba92354dde1658d86a4">split</a> (const string &amp;str, char sep)</td></tr>
+<tr class="separator:aafb7f182b8bb6ba92354dde1658d86a4"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a64a6014565bb3e03294ec4a952d5add0"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/dac/test_8cpp.html#a64a6014565bb3e03294ec4a952d5add0">usage</a> ()</td></tr>
+<tr class="separator:a64a6014565bb3e03294ec4a952d5add0"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aa9b3c43c212b49edee82ac30a11aa255"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/dac/test_8cpp.html#aa9b3c43c212b49edee82ac30a11aa255">call_test</a> ()</td></tr>
+<tr class="separator:aa9b3c43c212b49edee82ac30a11aa255"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a6d3cb4886e7afd45bd56b49800da932d"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/dac/test_8cpp.html#a6d3cb4886e7afd45bd56b49800da932d">onRep</a> (struct json_object *reply_contents)</td></tr>
+<tr class="separator:a6d3cb4886e7afd45bd56b49800da932d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a6a2874c419fe5936fcccadc7e6cf268e"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/dac/test_8cpp.html#a6a2874c419fe5936fcccadc7e6cf268e">onEv</a> (const string &amp;<a class="el" href="../../df/d7d/structevent.html">event</a>, struct json_object *event_contents)</td></tr>
+<tr class="separator:a6a2874c419fe5936fcccadc7e6cf268e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a3c04138a5bfe5d72780bb7e82a18e627"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/dac/test_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">main</a> (int argc, char **argv)</td></tr>
+<tr class="separator:a3c04138a5bfe5d72780bb7e82a18e627"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table><table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
+Variables</h2></td></tr>
+<tr class="memitem:a529acbd1fed9d98a587edfa62309fa8d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../de/dd0/class_lib_home_screen.html">LibHomeScreen</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/dac/test_8cpp.html#a529acbd1fed9d98a587edfa62309fa8d">hs</a></td></tr>
+<tr class="separator:a529acbd1fed9d98a587edfa62309fa8d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<h2 class="groupheader">Function Documentation</h2>
+<a id="aa9b3c43c212b49edee82ac30a11aa255"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aa9b3c43c212b49edee82ac30a11aa255">&#9670;&nbsp;</a></span>call_test()</h2>
+
+<div class="memitem">
+<div class="memproto">
+<table class="mlabels">
+ <tr>
+ <td class="mlabels-left">
+ <table class="memname">
+ <tr>
+ <td class="memname">static void call_test </td>
+ <td>(</td>
+ <td class="paramname"></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+ </td>
+ <td class="mlabels-right">
+<span class="mlabels"><span class="mlabel">static</span></span> </td>
+ </tr>
+</table>
+</div><div class="memdoc">
+
+<p class="definition">Definition at line <a class="el" href="../../df/dac/test_8cpp_source.html#l00051">51</a> of file <a class="el" href="../../df/dac/test_8cpp_source.html">test.cpp</a>.</p>
+<div class="fragment"><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160;{</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160; <span class="keywordtype">string</span> command;</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160;</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160; cout &lt;&lt; <span class="stringliteral">&quot;input verb and argments&quot;</span> &lt;&lt; endl;</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160;</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160; <span class="comment">/* read the buffer */</span></div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160; <span class="keywordflow">for</span>(;;){</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160; <span class="keywordtype">char</span> line[1023];</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160; cin.getline(line, <span class="keyword">sizeof</span>(line));</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; command = line;</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160; <span class="keywordflow">if</span>(command.empty()){</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160; <span class="keywordflow">continue</span>;</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160; }</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160;</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160; vector&lt;string&gt; v_command = <a class="code" href="../../df/dac/test_8cpp.html#aafb7f182b8bb6ba92354dde1658d86a4">split</a>(command, <span class="charliteral">&#39; &#39;</span>);</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160; <span class="comment">/*for(auto itr = v_command.begin(); itr != v_command.end(); ++itr)</span></div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160;<span class="comment"> {</span></div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160;<span class="comment"> cout &lt;&lt; *itr &lt;&lt;endl;</span></div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160;<span class="comment"> }*/</span></div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160; <span class="keywordtype">size_t</span> num = v_command.size();</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160; <span class="keywordflow">if</span>(num % 2 == 0){</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160; cout &lt;&lt; <span class="stringliteral">&quot;If command contains args, please input &lt;key,value&gt; in argument part&quot;</span> &lt;&lt; endl;</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160; <span class="keywordflow">continue</span>;</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160; }</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160; <span class="comment">/* create json object */</span></div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160; <span class="keyword">struct </span>json_object* j_obj = json_object_new_object();</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160; <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 1;i &lt; (v_command.size()) ;++i){</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160; <span class="keyword">struct </span>json_object* val = json_object_new_string(v_command[i+1].c_str());</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160; json_object_object_add(j_obj, v_command[i].c_str(), val);</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; ++i;</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; }</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; <span class="comment">/* call verb via LibHomeScreen */</span></div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160; <a class="code" href="../../df/dac/test_8cpp.html#a529acbd1fed9d98a587edfa62309fa8d">hs</a>-&gt;<a class="code" href="../../de/dd0/class_lib_home_screen.html#a527b49dcfe581be6275d0eb2236ba37f">call</a>(v_command[0], j_obj);</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; <span class="comment">/* free vector */</span></div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; vector&lt;string&gt;().swap(v_command);</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; string().swap(command);</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; }</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160;}</div><div class="ttc" id="test_8cpp_html_aafb7f182b8bb6ba92354dde1658d86a4"><div class="ttname"><a href="../../df/dac/test_8cpp.html#aafb7f182b8bb6ba92354dde1658d86a4">split</a></div><div class="ttdeci">static vector&lt; string &gt; split(const string &amp;str, char sep)</div><div class="ttdef"><b>Definition:</b> <a href="../../df/dac/test_8cpp_source.html#l00105">test.cpp:105</a></div></div>
+<div class="ttc" id="test_8cpp_html_a529acbd1fed9d98a587edfa62309fa8d"><div class="ttname"><a href="../../df/dac/test_8cpp.html#a529acbd1fed9d98a587edfa62309fa8d">hs</a></div><div class="ttdeci">LibHomeScreen * hs</div><div class="ttdef"><b>Definition:</b> <a href="../../df/dac/test_8cpp_source.html#l00033">test.cpp:33</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_a527b49dcfe581be6275d0eb2236ba37f"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#a527b49dcfe581be6275d0eb2236ba37f">LibHomeScreen::call</a></div><div class="ttdeci">int call(const std::string &amp;verb, struct json_object *arg)</div></div>
+</div><!-- fragment -->
+</div>
+</div>
+<a id="a3c04138a5bfe5d72780bb7e82a18e627"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a3c04138a5bfe5d72780bb7e82a18e627">&#9670;&nbsp;</a></span>main()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">int main </td>
+ <td>(</td>
+ <td class="paramtype">int&#160;</td>
+ <td class="paramname"><em>argc</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">char **&#160;</td>
+ <td class="paramname"><em>argv</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p class="definition">Definition at line <a class="el" href="../../df/dac/test_8cpp_source.html#l00117">117</a> of file <a class="el" href="../../df/dac/test_8cpp_source.html">test.cpp</a>.</p>
+<div class="fragment"><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160;{</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160; <span class="keywordtype">int</span> ret;</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160; <span class="keywordflow">if</span>(argc == 1)</div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160; {</div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160; printf(<span class="stringliteral">&quot;Please input port num in first argument, and token in second argument&quot;</span>);</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160; <a class="code" href="../../df/dac/test_8cpp.html#a64a6014565bb3e03294ec4a952d5add0">usage</a>();</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160; <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160; }</div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160; <span class="keywordflow">if</span>(argc == 2)</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160; {</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160; <span class="keywordtype">string</span> av(argv[1]);</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160; <span class="keywordflow">if</span>( (av == <span class="stringliteral">&quot;-h&quot;</span>) || (av == <span class="stringliteral">&quot;--help&quot;</span>))</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160; {</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160; <a class="code" href="../../df/dac/test_8cpp.html#a64a6014565bb3e03294ec4a952d5add0">usage</a>();</div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160; <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160; }</div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160; }</div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160;</div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160; <span class="keywordtype">string</span> port_string(argv[1]);</div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160; <span class="keywordtype">string</span> token(argv[2]);</div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160; <span class="keywordtype">char</span>* endptr;</div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160; <span class="keywordtype">long</span> port = strtol(port_string.c_str(),&amp;endptr,10);</div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160;</div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160; <span class="comment">/* error check of range */</span></div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160; <span class="keywordflow">if</span>( (port &gt; 20000) || (port &lt; 0) )</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160; {</div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160; printf(<span class="stringliteral">&quot;input under 20000(temporary number)&quot;</span>);</div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160; <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160; }</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160; <span class="keywordflow">if</span>(*endptr != <span class="charliteral">&#39;\0&#39;</span>)</div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160; {</div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160; printf(<span class="stringliteral">&quot;not number&quot;</span>);</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160; <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160; }</div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160;</div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160; cout &lt;&lt; <span class="stringliteral">&quot;Call test for LibHomeScreen&quot;</span> &lt;&lt; endl;</div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160; <a class="code" href="../../df/dac/test_8cpp.html#a529acbd1fed9d98a587edfa62309fa8d">hs</a> = <span class="keyword">new</span> <a class="code" href="../../de/dd0/class_lib_home_screen.html">LibHomeScreen</a>();</div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160; <a class="code" href="../../df/dac/test_8cpp.html#a529acbd1fed9d98a587edfa62309fa8d">hs</a>-&gt;<a class="code" href="../../de/dd0/class_lib_home_screen.html#a6a57b573cc767725762ba9beab032220">init</a>(port, token);</div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160;</div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160; <span class="comment">// hs-&gt;registerCallback(&amp;onEv, &amp;onRep);</span></div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>&#160; <span class="comment">//</span></div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160; <span class="comment">// hs-&gt;subscribe(event_list[0]); // tap_shortcut event subscribe</span></div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160; <span class="comment">// hs-&gt;subscribe(event_list[1]);</span></div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160;</div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span>&#160; <a class="code" href="../../df/dac/test_8cpp.html#a529acbd1fed9d98a587edfa62309fa8d">hs</a>-&gt;<a class="code" href="../../de/dd0/class_lib_home_screen.html#ab1b0e08bf35415de9064afed899e9f85">set_event_handler</a>(<a class="code" href="../../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154a4b0a82d501e4db5fbfe25c254c92896f">LibHomeScreen::Event_TapShortcut</a>, [](json_object *<span class="keywordtype">object</span>){</div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span>&#160; <span class="keyword">const</span> <span class="keywordtype">char</span> *application_name = json_object_get_string(</div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>&#160; json_object_object_get(<span class="keywordtype">object</span>, <span class="stringliteral">&quot;application_name&quot;</span>));</div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>&#160; cout &lt;&lt; <span class="stringliteral">&quot;set_event_handler Event_TapShortcut application_name = &quot;</span> &lt;&lt; application_name &lt;&lt; endl;</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160; });</div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160;</div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span>&#160; <a class="code" href="../../df/dac/test_8cpp.html#a529acbd1fed9d98a587edfa62309fa8d">hs</a>-&gt;<a class="code" href="../../de/dd0/class_lib_home_screen.html#ab1b0e08bf35415de9064afed899e9f85">set_event_handler</a>(<a class="code" href="../../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154aea56fa32a124a8ddcbea127755280a1d">LibHomeScreen::Event_OnScreenMessage</a>, [](json_object *<span class="keywordtype">object</span>){</div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span>&#160; <span class="keyword">const</span> <span class="keywordtype">char</span> *display_message = json_object_get_string(</div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span>&#160; json_object_object_get(<span class="keywordtype">object</span>, <span class="stringliteral">&quot;display_message&quot;</span>));</div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span>&#160; cout &lt;&lt; <span class="stringliteral">&quot;set_event_handler Event_OnScreenMessage display_message = &quot;</span> &lt;&lt; display_message &lt;&lt; endl;</div><div class="line"><a name="l00172"></a><span class="lineno"> 172</span>&#160; });</div><div class="line"><a name="l00173"></a><span class="lineno"> 173</span>&#160;</div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span>&#160; <a class="code" href="../../df/dac/test_8cpp.html#a529acbd1fed9d98a587edfa62309fa8d">hs</a>-&gt;<a class="code" href="../../de/dd0/class_lib_home_screen.html#ab1b0e08bf35415de9064afed899e9f85">set_event_handler</a>(<a class="code" href="../../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154acae91db4efc2394fd701f581d277a3fd">LibHomeScreen::Event_OnScreenReply</a>, [](json_object *<span class="keywordtype">object</span>){</div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span>&#160; <span class="keyword">const</span> <span class="keywordtype">char</span> *reply_message = json_object_get_string(</div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span>&#160; json_object_object_get(<span class="keywordtype">object</span>, <span class="stringliteral">&quot;reply_message&quot;</span>));</div><div class="line"><a name="l00177"></a><span class="lineno"> 177</span>&#160; cout &lt;&lt; <span class="stringliteral">&quot;set_event_handler Event_OnScreenReply reply_message = &quot;</span> &lt;&lt; reply_message &lt;&lt; endl;</div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span>&#160; });</div><div class="line"><a name="l00179"></a><span class="lineno"> 179</span>&#160;</div><div class="line"><a name="l00180"></a><span class="lineno"> 180</span>&#160; <span class="keywordflow">if</span> (ret &lt; 0) {</div><div class="line"><a name="l00181"></a><span class="lineno"> 181</span>&#160; printf(<span class="stringliteral">&quot;failed to create event loop&quot;</span>);</div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span>&#160; <span class="keywordflow">return</span> -1;</div><div class="line"><a name="l00183"></a><span class="lineno"> 183</span>&#160; }</div><div class="line"><a name="l00184"></a><span class="lineno"> 184</span>&#160;</div><div class="line"><a name="l00185"></a><span class="lineno"> 185</span>&#160; <a class="code" href="../../df/dac/test_8cpp.html#aa9b3c43c212b49edee82ac30a11aa255">call_test</a>();</div><div class="line"><a name="l00186"></a><span class="lineno"> 186</span>&#160;</div><div class="line"><a name="l00187"></a><span class="lineno"> 187</span>&#160; <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span>&#160;}</div><div class="ttc" id="test_8cpp_html_a64a6014565bb3e03294ec4a952d5add0"><div class="ttname"><a href="../../df/dac/test_8cpp.html#a64a6014565bb3e03294ec4a952d5add0">usage</a></div><div class="ttdeci">static void usage()</div><div class="ttdef"><b>Definition:</b> <a href="../../df/dac/test_8cpp_source.html#l00035">test.cpp:35</a></div></div>
+<div class="ttc" id="test_8cpp_html_a529acbd1fed9d98a587edfa62309fa8d"><div class="ttname"><a href="../../df/dac/test_8cpp.html#a529acbd1fed9d98a587edfa62309fa8d">hs</a></div><div class="ttdeci">LibHomeScreen * hs</div><div class="ttdef"><b>Definition:</b> <a href="../../df/dac/test_8cpp_source.html#l00033">test.cpp:33</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_a82616c91ac211d2ad08e709b524bf154aea56fa32a124a8ddcbea127755280a1d"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154aea56fa32a124a8ddcbea127755280a1d">LibHomeScreen::Event_OnScreenMessage</a></div><div class="ttdef"><b>Definition:</b> <a href="../../df/d43/libhomescreen_8hpp_source.html#l00046">libhomescreen.hpp:46</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_a82616c91ac211d2ad08e709b524bf154acae91db4efc2394fd701f581d277a3fd"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154acae91db4efc2394fd701f581d277a3fd">LibHomeScreen::Event_OnScreenReply</a></div><div class="ttdef"><b>Definition:</b> <a href="../../df/d43/libhomescreen_8hpp_source.html#l00047">libhomescreen.hpp:47</a></div></div>
+<div class="ttc" id="test_8cpp_html_aa9b3c43c212b49edee82ac30a11aa255"><div class="ttname"><a href="../../df/dac/test_8cpp.html#aa9b3c43c212b49edee82ac30a11aa255">call_test</a></div><div class="ttdeci">static void call_test()</div><div class="ttdef"><b>Definition:</b> <a href="../../df/dac/test_8cpp_source.html#l00051">test.cpp:51</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_a6a57b573cc767725762ba9beab032220"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#a6a57b573cc767725762ba9beab032220">LibHomeScreen::init</a></div><div class="ttdeci">int init(const int port, const std::string &amp;token)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d8a/libhomescreen_8cpp_source.html#l00116">libhomescreen.cpp:116</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html">LibHomeScreen</a></div><div class="ttdef"><b>Definition:</b> <a href="../../df/d43/libhomescreen_8hpp_source.html#l00032">libhomescreen.hpp:32</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_ab1b0e08bf35415de9064afed899e9f85"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#ab1b0e08bf35415de9064afed899e9f85">LibHomeScreen::set_event_handler</a></div><div class="ttdeci">void set_event_handler(enum EventType et, handler_func f)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d8a/libhomescreen_8cpp_source.html#l00293">libhomescreen.cpp:293</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_a82616c91ac211d2ad08e709b524bf154a4b0a82d501e4db5fbfe25c254c92896f"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154a4b0a82d501e4db5fbfe25c254c92896f">LibHomeScreen::Event_TapShortcut</a></div><div class="ttdef"><b>Definition:</b> <a href="../../df/d43/libhomescreen_8hpp_source.html#l00045">libhomescreen.hpp:45</a></div></div>
+</div><!-- fragment -->
+</div>
+</div>
+<a id="a6a2874c419fe5936fcccadc7e6cf268e"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a6a2874c419fe5936fcccadc7e6cf268e">&#9670;&nbsp;</a></span>onEv()</h2>
+
+<div class="memitem">
+<div class="memproto">
+<table class="mlabels">
+ <tr>
+ <td class="mlabels-left">
+ <table class="memname">
+ <tr>
+ <td class="memname">static void onEv </td>
+ <td>(</td>
+ <td class="paramtype">const string &amp;&#160;</td>
+ <td class="paramname"><em>event</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">struct json_object *&#160;</td>
+ <td class="paramname"><em>event_contents</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+ </td>
+ <td class="mlabels-right">
+<span class="mlabels"><span class="mlabel">static</span></span> </td>
+ </tr>
+</table>
+</div><div class="memdoc">
+
+<p class="definition">Definition at line <a class="el" href="../../df/dac/test_8cpp_source.html#l00098">98</a> of file <a class="el" href="../../df/dac/test_8cpp_source.html">test.cpp</a>.</p>
+<div class="fragment"><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160;{</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160; <span class="keyword">const</span> <span class="keywordtype">char</span>* str = json_object_to_json_string(event_contents);</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160; cout &lt;&lt; <span class="stringliteral">&quot;test.cpp [CB onEvent]: event: &quot;</span> &lt;&lt; <span class="keyword">event</span>.c_str() &lt;&lt; <span class="stringliteral">&quot; contents: &quot;</span> &lt;&lt; str &lt;&lt; endl;</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160; <span class="comment">//json_object_put(event_contents); do not release!!!</span></div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160;}</div></div><!-- fragment -->
+</div>
+</div>
+<a id="a6d3cb4886e7afd45bd56b49800da932d"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a6d3cb4886e7afd45bd56b49800da932d">&#9670;&nbsp;</a></span>onRep()</h2>
+
+<div class="memitem">
+<div class="memproto">
+<table class="mlabels">
+ <tr>
+ <td class="mlabels-left">
+ <table class="memname">
+ <tr>
+ <td class="memname">static void onRep </td>
+ <td>(</td>
+ <td class="paramtype">struct json_object *&#160;</td>
+ <td class="paramname"><em>reply_contents</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+ </td>
+ <td class="mlabels-right">
+<span class="mlabels"><span class="mlabel">static</span></span> </td>
+ </tr>
+</table>
+</div><div class="memdoc">
+
+<p class="definition">Definition at line <a class="el" href="../../df/dac/test_8cpp_source.html#l00091">91</a> of file <a class="el" href="../../df/dac/test_8cpp_source.html">test.cpp</a>.</p>
+<div class="fragment"><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160;{</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160; <span class="keyword">const</span> <span class="keywordtype">char</span>* str = json_object_to_json_string(reply_contents);</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160; cout &lt;&lt; <span class="stringliteral">&quot;test.cpp [CB onRep]: &quot;</span> &lt;&lt; str &lt;&lt; endl;</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160; <span class="comment">//json_object_put(reply_contents); do not release!!!</span></div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160;}</div></div><!-- fragment -->
+</div>
+</div>
+<a id="aafb7f182b8bb6ba92354dde1658d86a4"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aafb7f182b8bb6ba92354dde1658d86a4">&#9670;&nbsp;</a></span>split()</h2>
+
+<div class="memitem">
+<div class="memproto">
+<table class="mlabels">
+ <tr>
+ <td class="mlabels-left">
+ <table class="memname">
+ <tr>
+ <td class="memname">static vector&lt; string &gt; split </td>
+ <td>(</td>
+ <td class="paramtype">const string &amp;&#160;</td>
+ <td class="paramname"><em>str</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">char&#160;</td>
+ <td class="paramname"><em>sep</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+ </td>
+ <td class="mlabels-right">
+<span class="mlabels"><span class="mlabel">static</span></span> </td>
+ </tr>
+</table>
+</div><div class="memdoc">
+
+<p class="definition">Definition at line <a class="el" href="../../df/dac/test_8cpp_source.html#l00105">105</a> of file <a class="el" href="../../df/dac/test_8cpp_source.html">test.cpp</a>.</p>
+<div class="fragment"><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160;{</div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160; vector&lt;string&gt; v;</div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160; stringstream ss(str);</div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160; <span class="keywordtype">string</span> buffer;</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160; <span class="keywordflow">while</span>( getline(ss, buffer, sep) ) {</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160; <span class="keywordflow">if</span>(!buffer.empty())</div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160; v.push_back(buffer);</div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160; }</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160; <span class="keywordflow">return</span> v;</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160;}</div></div><!-- fragment -->
+</div>
+</div>
+<a id="a64a6014565bb3e03294ec4a952d5add0"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a64a6014565bb3e03294ec4a952d5add0">&#9670;&nbsp;</a></span>usage()</h2>
+
+<div class="memitem">
+<div class="memproto">
+<table class="mlabels">
+ <tr>
+ <td class="mlabels-left">
+ <table class="memname">
+ <tr>
+ <td class="memname">static void usage </td>
+ <td>(</td>
+ <td class="paramname"></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+ </td>
+ <td class="mlabels-right">
+<span class="mlabels"><span class="mlabel">static</span></span> </td>
+ </tr>
+</table>
+</div><div class="memdoc">
+
+<p class="definition">Definition at line <a class="el" href="../../df/dac/test_8cpp_source.html#l00035">35</a> of file <a class="el" href="../../df/dac/test_8cpp_source.html">test.cpp</a>.</p>
+<div class="fragment"><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160;{</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160; cout &lt;&lt; <span class="stringliteral">&quot;verb &quot;</span>&lt;&lt; <span class="stringliteral">&quot;key:arg&quot;</span> &lt;&lt; endl;</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160; cout &lt;&lt; <span class="stringliteral">&quot;example:&quot;</span> &lt;&lt; endl;</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160; cout &lt;&lt; <span class="stringliteral">&quot;ping&quot;</span> &lt;&lt; endl;</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160; cout &lt;&lt; <span class="stringliteral">&quot;------- -------- --- &quot;</span> &lt;&lt; endl;</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160; cout &lt;&lt; <span class="stringliteral">&quot; verb key value&quot;</span> &lt;&lt; endl;</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160; cout &lt;&lt; <span class="stringliteral">&quot;verb list:&quot;</span> &lt;&lt; endl;</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160; <span class="keywordflow">for</span>(<span class="keyword">auto</span> itr = <a class="code" href="../../de/dd0/class_lib_home_screen.html#a5593ff5ac78f6495ccb649904cf0ab08">LibHomeScreen::api_list</a>.begin(); itr != <a class="code" href="../../de/dd0/class_lib_home_screen.html#a5593ff5ac78f6495ccb649904cf0ab08">LibHomeScreen::api_list</a>.end(); ++itr)</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160; {</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160; cout &lt;&lt; <span class="stringliteral">&quot; &quot;</span> &lt;&lt; *itr &lt;&lt; endl;</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160; }</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160; <span class="comment">// Todo output api list</span></div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160; exit(0);</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160;}</div><div class="ttc" id="class_lib_home_screen_html_a5593ff5ac78f6495ccb649904cf0ab08"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#a5593ff5ac78f6495ccb649904cf0ab08">LibHomeScreen::api_list</a></div><div class="ttdeci">static const std::vector&lt; std::string &gt; api_list</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d43/libhomescreen_8hpp_source.html#l00050">libhomescreen.hpp:50</a></div></div>
+</div><!-- fragment -->
+</div>
+</div>
+<h2 class="groupheader">Variable Documentation</h2>
+<a id="a529acbd1fed9d98a587edfa62309fa8d"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a529acbd1fed9d98a587edfa62309fa8d">&#9670;&nbsp;</a></span>hs</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="../../de/dd0/class_lib_home_screen.html">LibHomeScreen</a>* hs</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p class="definition">Definition at line <a class="el" href="../../df/dac/test_8cpp_source.html#l00033">33</a> of file <a class="el" href="../../df/dac/test_8cpp_source.html">test.cpp</a>.</p>
+
+</div>
+</div>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="../../doxygen.png" alt="doxygen"/>
+</a> 1.8.13
+</small></address>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/df/dac/test_8cpp_source.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/df/dac/test_8cpp_source.html
new file mode 100644
index 0000000..2a5c650
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/df/dac/test_8cpp_source.html
@@ -0,0 +1,95 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>HomeScreenBinding: libhomescreen/test.cpp Source File</title>
+<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="../../jquery.js"></script>
+<script type="text/javascript" src="../../dynsections.js"></script>
+<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="../../search/searchdata.js"></script>
+<script type="text/javascript" src="../../search/search.js"></script>
+<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+ <td id="projectalign" style="padding-left: 0.5em;">
+ <div id="projectname">HomeScreenBinding
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.13 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
+</script>
+<script type="text/javascript" src="../../menudata.js"></script>
+<script type="text/javascript" src="../../menu.js"></script>
+<script type="text/javascript">
+$(function() {
+ initMenu('../../',true,false,'search.php','Search');
+ $(document).ready(function() { init_search(); });
+});
+</script>
+<div id="main-nav"></div>
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+ onmouseover="return searchBox.OnSearchSelectShow()"
+ onmouseout="return searchBox.OnSearchSelectHide()"
+ onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0"
+ name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div id="nav-path" class="navpath">
+ <ul>
+<li class="navelem"><a class="el" href="../../dir_65f76d62445e9e84c0450b12bf77c3bc.html">libhomescreen</a></li> </ul>
+</div>
+</div><!-- top -->
+<div class="header">
+ <div class="headertitle">
+<div class="title">test.cpp</div> </div>
+</div><!--header-->
+<div class="contents">
+<a href="../../df/dac/test_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment"> * Copyright (c) 2017 TOYOTA MOTOR CORPORATION</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment"> * Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment"> * you may not use this file except in compliance with the License.</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment"> * You may obtain a copy of the License at</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment"> * Unless required by applicable law or agreed to in writing, software</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment"> * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment"> * See the License for the specific language governing permissions and</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment"> * limitations under the License.</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;</div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="../../df/d43/libhomescreen_8hpp.html">libhomescreen.hpp</a>&gt;</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="preprocessor">#include &lt;iostream&gt;</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="preprocessor">#include &lt;glib-2.0/glib.h&gt;</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="preprocessor">#include &lt;fcntl.h&gt;</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="preprocessor">#include &lt;sys/types.h&gt;</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="preprocessor">#include &lt;sys/stat.h&gt;</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;<span class="preprocessor">#include &lt;thread&gt;</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="preprocessor">#include &lt;exception&gt;</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="preprocessor">#include &lt;sstream&gt;</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;<span class="preprocessor">#include &lt;functional&gt;</span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;</div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;<span class="keyword">using namespace </span><a class="code" href="../../d8/dcc/namespacestd.html">std</a>;</div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;</div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;<span class="keyword">static</span> vector&lt;string&gt; <a class="code" href="../../df/dac/test_8cpp.html#aafb7f182b8bb6ba92354dde1658d86a4">split</a>(<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; str, <span class="keywordtype">char</span> sep);</div><div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="../../df/dac/test_8cpp.html#a529acbd1fed9d98a587edfa62309fa8d"> 33</a></span>&#160;<a class="code" href="../../de/dd0/class_lib_home_screen.html">LibHomeScreen</a>* <a class="code" href="../../df/dac/test_8cpp.html#a529acbd1fed9d98a587edfa62309fa8d">hs</a>;</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;</div><div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="../../df/dac/test_8cpp.html#a64a6014565bb3e03294ec4a952d5add0"> 35</a></span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="../../df/dac/test_8cpp.html#a64a6014565bb3e03294ec4a952d5add0">usage</a>()</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160;{</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160; cout &lt;&lt; <span class="stringliteral">&quot;verb &quot;</span>&lt;&lt; <span class="stringliteral">&quot;key:arg&quot;</span> &lt;&lt; endl;</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160; cout &lt;&lt; <span class="stringliteral">&quot;example:&quot;</span> &lt;&lt; endl;</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160; cout &lt;&lt; <span class="stringliteral">&quot;ping&quot;</span> &lt;&lt; endl;</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160; cout &lt;&lt; <span class="stringliteral">&quot;------- -------- --- &quot;</span> &lt;&lt; endl;</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160; cout &lt;&lt; <span class="stringliteral">&quot; verb key value&quot;</span> &lt;&lt; endl;</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160; cout &lt;&lt; <span class="stringliteral">&quot;verb list:&quot;</span> &lt;&lt; endl;</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160; <span class="keywordflow">for</span>(<span class="keyword">auto</span> itr = <a class="code" href="../../de/dd0/class_lib_home_screen.html#a5593ff5ac78f6495ccb649904cf0ab08">LibHomeScreen::api_list</a>.begin(); itr != <a class="code" href="../../de/dd0/class_lib_home_screen.html#a5593ff5ac78f6495ccb649904cf0ab08">LibHomeScreen::api_list</a>.end(); ++itr)</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160; {</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160; cout &lt;&lt; <span class="stringliteral">&quot; &quot;</span> &lt;&lt; *itr &lt;&lt; endl;</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160; }</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160; <span class="comment">// Todo output api list</span></div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160; exit(0);</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160;}</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160;</div><div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="../../df/dac/test_8cpp.html#aa9b3c43c212b49edee82ac30a11aa255"> 51</a></span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="../../df/dac/test_8cpp.html#aa9b3c43c212b49edee82ac30a11aa255">call_test</a>()</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160;{</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160; <span class="keywordtype">string</span> command;</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160;</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160; cout &lt;&lt; <span class="stringliteral">&quot;input verb and argments&quot;</span> &lt;&lt; endl;</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160;</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160; <span class="comment">/* read the buffer */</span></div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160; <span class="keywordflow">for</span>(;;){</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160; <span class="keywordtype">char</span> line[1023];</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160; cin.getline(line, <span class="keyword">sizeof</span>(line));</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; command = line;</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160; <span class="keywordflow">if</span>(command.empty()){</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160; <span class="keywordflow">continue</span>;</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160; }</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160;</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160; vector&lt;string&gt; v_command = <a class="code" href="../../df/dac/test_8cpp.html#aafb7f182b8bb6ba92354dde1658d86a4">split</a>(command, <span class="charliteral">&#39; &#39;</span>);</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160; <span class="comment">/*for(auto itr = v_command.begin(); itr != v_command.end(); ++itr)</span></div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160;<span class="comment"> {</span></div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160;<span class="comment"> cout &lt;&lt; *itr &lt;&lt;endl;</span></div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160;<span class="comment"> }*/</span></div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160; <span class="keywordtype">size_t</span> num = v_command.size();</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160; <span class="keywordflow">if</span>(num % 2 == 0){</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160; cout &lt;&lt; <span class="stringliteral">&quot;If command contains args, please input &lt;key,value&gt; in argument part&quot;</span> &lt;&lt; endl;</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160; <span class="keywordflow">continue</span>;</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160; }</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160; <span class="comment">/* create json object */</span></div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160; <span class="keyword">struct </span>json_object* j_obj = json_object_new_object();</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160; <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 1;i &lt; (v_command.size()) ;++i){</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160; <span class="keyword">struct </span>json_object* val = json_object_new_string(v_command[i+1].c_str());</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160; json_object_object_add(j_obj, v_command[i].c_str(), val);</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; ++i;</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; }</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; <span class="comment">/* call verb via LibHomeScreen */</span></div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160; hs-&gt;<a class="code" href="../../de/dd0/class_lib_home_screen.html#a527b49dcfe581be6275d0eb2236ba37f">call</a>(v_command[0], j_obj);</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; <span class="comment">/* free vector */</span></div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; vector&lt;string&gt;().swap(v_command);</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; string().swap(command);</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; }</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160;}</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160;</div><div class="line"><a name="l00091"></a><span class="lineno"><a class="line" href="../../df/dac/test_8cpp.html#a6d3cb4886e7afd45bd56b49800da932d"> 91</a></span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="../../df/dac/test_8cpp.html#a6d3cb4886e7afd45bd56b49800da932d">onRep</a>(<span class="keyword">struct</span> json_object* reply_contents)</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160;{</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160; <span class="keyword">const</span> <span class="keywordtype">char</span>* str = json_object_to_json_string(reply_contents);</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160; cout &lt;&lt; <span class="stringliteral">&quot;test.cpp [CB onRep]: &quot;</span> &lt;&lt; str &lt;&lt; endl;</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160; <span class="comment">//json_object_put(reply_contents); do not release!!!</span></div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160;}</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160;</div><div class="line"><a name="l00098"></a><span class="lineno"><a class="line" href="../../df/dac/test_8cpp.html#a6a2874c419fe5936fcccadc7e6cf268e"> 98</a></span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="../../df/dac/test_8cpp.html#a6a2874c419fe5936fcccadc7e6cf268e">onEv</a>(<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; <a class="code" href="../../df/d7d/structevent.html">event</a>, <span class="keyword">struct</span> json_object* event_contents)</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160;{</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160; <span class="keyword">const</span> <span class="keywordtype">char</span>* str = json_object_to_json_string(event_contents);</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160; cout &lt;&lt; <span class="stringliteral">&quot;test.cpp [CB onEvent]: event: &quot;</span> &lt;&lt; <span class="keyword">event</span>.c_str() &lt;&lt; <span class="stringliteral">&quot; contents: &quot;</span> &lt;&lt; str &lt;&lt; endl;</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160; <span class="comment">//json_object_put(event_contents); do not release!!!</span></div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160;}</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160;</div><div class="line"><a name="l00105"></a><span class="lineno"><a class="line" href="../../df/dac/test_8cpp.html#aafb7f182b8bb6ba92354dde1658d86a4"> 105</a></span>&#160;<span class="keyword">static</span> vector&lt;string&gt; <a class="code" href="../../df/dac/test_8cpp.html#aafb7f182b8bb6ba92354dde1658d86a4">split</a>(<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; str, <span class="keywordtype">char</span> sep)</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160;{</div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160; vector&lt;string&gt; v;</div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160; stringstream ss(str);</div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160; <span class="keywordtype">string</span> buffer;</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160; <span class="keywordflow">while</span>( getline(ss, buffer, sep) ) {</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160; <span class="keywordflow">if</span>(!buffer.empty())</div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160; v.push_back(buffer);</div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160; }</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160; <span class="keywordflow">return</span> v;</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160;}</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160;</div><div class="line"><a name="l00117"></a><span class="lineno"><a class="line" href="../../df/dac/test_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627"> 117</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="../../df/dac/test_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">main</a>(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> **argv)</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160;{</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160; <span class="keywordtype">int</span> ret;</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160; <span class="keywordflow">if</span>(argc == 1)</div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160; {</div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160; printf(<span class="stringliteral">&quot;Please input port num in first argument, and token in second argument&quot;</span>);</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160; <a class="code" href="../../df/dac/test_8cpp.html#a64a6014565bb3e03294ec4a952d5add0">usage</a>();</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160; <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160; }</div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160; <span class="keywordflow">if</span>(argc == 2)</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160; {</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160; <span class="keywordtype">string</span> av(argv[1]);</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160; <span class="keywordflow">if</span>( (av == <span class="stringliteral">&quot;-h&quot;</span>) || (av == <span class="stringliteral">&quot;--help&quot;</span>))</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160; {</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160; <a class="code" href="../../df/dac/test_8cpp.html#a64a6014565bb3e03294ec4a952d5add0">usage</a>();</div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160; <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160; }</div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160; }</div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160;</div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160; <span class="keywordtype">string</span> port_string(argv[1]);</div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160; <span class="keywordtype">string</span> token(argv[2]);</div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160; <span class="keywordtype">char</span>* endptr;</div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160; <span class="keywordtype">long</span> port = strtol(port_string.c_str(),&amp;endptr,10);</div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160;</div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160; <span class="comment">/* error check of range */</span></div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160; <span class="keywordflow">if</span>( (port &gt; 20000) || (port &lt; 0) )</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160; {</div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160; printf(<span class="stringliteral">&quot;input under 20000(temporary number)&quot;</span>);</div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160; <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160; }</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160; <span class="keywordflow">if</span>(*endptr != <span class="charliteral">&#39;\0&#39;</span>)</div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160; {</div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160; printf(<span class="stringliteral">&quot;not number&quot;</span>);</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160; <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160; }</div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160;</div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160; cout &lt;&lt; <span class="stringliteral">&quot;Call test for LibHomeScreen&quot;</span> &lt;&lt; endl;</div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160; hs = <span class="keyword">new</span> <a class="code" href="../../de/dd0/class_lib_home_screen.html">LibHomeScreen</a>();</div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160; hs-&gt;<a class="code" href="../../de/dd0/class_lib_home_screen.html#a6a57b573cc767725762ba9beab032220">init</a>(port, token);</div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160;</div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160; <span class="comment">// hs-&gt;registerCallback(&amp;onEv, &amp;onRep);</span></div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>&#160; <span class="comment">//</span></div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160; <span class="comment">// hs-&gt;subscribe(event_list[0]); // tap_shortcut event subscribe</span></div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160; <span class="comment">// hs-&gt;subscribe(event_list[1]);</span></div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160;</div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span>&#160; hs-&gt;<a class="code" href="../../de/dd0/class_lib_home_screen.html#ab1b0e08bf35415de9064afed899e9f85">set_event_handler</a>(<a class="code" href="../../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154a4b0a82d501e4db5fbfe25c254c92896f">LibHomeScreen::Event_TapShortcut</a>, [](json_object *<span class="keywordtype">object</span>){</div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span>&#160; <span class="keyword">const</span> <span class="keywordtype">char</span> *application_name = json_object_get_string(</div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>&#160; json_object_object_get(<span class="keywordtype">object</span>, <span class="stringliteral">&quot;application_name&quot;</span>));</div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>&#160; cout &lt;&lt; <span class="stringliteral">&quot;set_event_handler Event_TapShortcut application_name = &quot;</span> &lt;&lt; application_name &lt;&lt; endl;</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160; });</div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160;</div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span>&#160; hs-&gt;<a class="code" href="../../de/dd0/class_lib_home_screen.html#ab1b0e08bf35415de9064afed899e9f85">set_event_handler</a>(<a class="code" href="../../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154aea56fa32a124a8ddcbea127755280a1d">LibHomeScreen::Event_OnScreenMessage</a>, [](json_object *<span class="keywordtype">object</span>){</div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span>&#160; <span class="keyword">const</span> <span class="keywordtype">char</span> *display_message = json_object_get_string(</div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span>&#160; json_object_object_get(<span class="keywordtype">object</span>, <span class="stringliteral">&quot;display_message&quot;</span>));</div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span>&#160; cout &lt;&lt; <span class="stringliteral">&quot;set_event_handler Event_OnScreenMessage display_message = &quot;</span> &lt;&lt; display_message &lt;&lt; endl;</div><div class="line"><a name="l00172"></a><span class="lineno"> 172</span>&#160; });</div><div class="line"><a name="l00173"></a><span class="lineno"> 173</span>&#160;</div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span>&#160; hs-&gt;<a class="code" href="../../de/dd0/class_lib_home_screen.html#ab1b0e08bf35415de9064afed899e9f85">set_event_handler</a>(<a class="code" href="../../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154acae91db4efc2394fd701f581d277a3fd">LibHomeScreen::Event_OnScreenReply</a>, [](json_object *<span class="keywordtype">object</span>){</div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span>&#160; <span class="keyword">const</span> <span class="keywordtype">char</span> *reply_message = json_object_get_string(</div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span>&#160; json_object_object_get(<span class="keywordtype">object</span>, <span class="stringliteral">&quot;reply_message&quot;</span>));</div><div class="line"><a name="l00177"></a><span class="lineno"> 177</span>&#160; cout &lt;&lt; <span class="stringliteral">&quot;set_event_handler Event_OnScreenReply reply_message = &quot;</span> &lt;&lt; reply_message &lt;&lt; endl;</div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span>&#160; });</div><div class="line"><a name="l00179"></a><span class="lineno"> 179</span>&#160;</div><div class="line"><a name="l00180"></a><span class="lineno"> 180</span>&#160; <span class="keywordflow">if</span> (ret &lt; 0) {</div><div class="line"><a name="l00181"></a><span class="lineno"> 181</span>&#160; printf(<span class="stringliteral">&quot;failed to create event loop&quot;</span>);</div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span>&#160; <span class="keywordflow">return</span> -1;</div><div class="line"><a name="l00183"></a><span class="lineno"> 183</span>&#160; }</div><div class="line"><a name="l00184"></a><span class="lineno"> 184</span>&#160;</div><div class="line"><a name="l00185"></a><span class="lineno"> 185</span>&#160; <a class="code" href="../../df/dac/test_8cpp.html#aa9b3c43c212b49edee82ac30a11aa255">call_test</a>();</div><div class="line"><a name="l00186"></a><span class="lineno"> 186</span>&#160;</div><div class="line"><a name="l00187"></a><span class="lineno"> 187</span>&#160; <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span>&#160;}</div><div class="ttc" id="test_8cpp_html_a64a6014565bb3e03294ec4a952d5add0"><div class="ttname"><a href="../../df/dac/test_8cpp.html#a64a6014565bb3e03294ec4a952d5add0">usage</a></div><div class="ttdeci">static void usage()</div><div class="ttdef"><b>Definition:</b> <a href="../../df/dac/test_8cpp_source.html#l00035">test.cpp:35</a></div></div>
+<div class="ttc" id="test_8cpp_html_aafb7f182b8bb6ba92354dde1658d86a4"><div class="ttname"><a href="../../df/dac/test_8cpp.html#aafb7f182b8bb6ba92354dde1658d86a4">split</a></div><div class="ttdeci">static vector&lt; string &gt; split(const string &amp;str, char sep)</div><div class="ttdef"><b>Definition:</b> <a href="../../df/dac/test_8cpp_source.html#l00105">test.cpp:105</a></div></div>
+<div class="ttc" id="structevent_html"><div class="ttname"><a href="../../df/d7d/structevent.html">event</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00035">homescreen.c:35</a></div></div>
+<div class="ttc" id="namespacestd_html"><div class="ttname"><a href="../../d8/dcc/namespacestd.html">std</a></div></div>
+<div class="ttc" id="test_8cpp_html_a529acbd1fed9d98a587edfa62309fa8d"><div class="ttname"><a href="../../df/dac/test_8cpp.html#a529acbd1fed9d98a587edfa62309fa8d">hs</a></div><div class="ttdeci">LibHomeScreen * hs</div><div class="ttdef"><b>Definition:</b> <a href="../../df/dac/test_8cpp_source.html#l00033">test.cpp:33</a></div></div>
+<div class="ttc" id="libhomescreen_8hpp_html"><div class="ttname"><a href="../../df/d43/libhomescreen_8hpp.html">libhomescreen.hpp</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_a82616c91ac211d2ad08e709b524bf154aea56fa32a124a8ddcbea127755280a1d"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154aea56fa32a124a8ddcbea127755280a1d">LibHomeScreen::Event_OnScreenMessage</a></div><div class="ttdef"><b>Definition:</b> <a href="../../df/d43/libhomescreen_8hpp_source.html#l00046">libhomescreen.hpp:46</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_a82616c91ac211d2ad08e709b524bf154acae91db4efc2394fd701f581d277a3fd"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154acae91db4efc2394fd701f581d277a3fd">LibHomeScreen::Event_OnScreenReply</a></div><div class="ttdef"><b>Definition:</b> <a href="../../df/d43/libhomescreen_8hpp_source.html#l00047">libhomescreen.hpp:47</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_a527b49dcfe581be6275d0eb2236ba37f"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#a527b49dcfe581be6275d0eb2236ba37f">LibHomeScreen::call</a></div><div class="ttdeci">int call(const std::string &amp;verb, struct json_object *arg)</div></div>
+<div class="ttc" id="test_8cpp_html_a6a2874c419fe5936fcccadc7e6cf268e"><div class="ttname"><a href="../../df/dac/test_8cpp.html#a6a2874c419fe5936fcccadc7e6cf268e">onEv</a></div><div class="ttdeci">static void onEv(const string &amp;event, struct json_object *event_contents)</div><div class="ttdef"><b>Definition:</b> <a href="../../df/dac/test_8cpp_source.html#l00098">test.cpp:98</a></div></div>
+<div class="ttc" id="test_8cpp_html_a3c04138a5bfe5d72780bb7e82a18e627"><div class="ttname"><a href="../../df/dac/test_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">main</a></div><div class="ttdeci">int main(int argc, char **argv)</div><div class="ttdef"><b>Definition:</b> <a href="../../df/dac/test_8cpp_source.html#l00117">test.cpp:117</a></div></div>
+<div class="ttc" id="test_8cpp_html_aa9b3c43c212b49edee82ac30a11aa255"><div class="ttname"><a href="../../df/dac/test_8cpp.html#aa9b3c43c212b49edee82ac30a11aa255">call_test</a></div><div class="ttdeci">static void call_test()</div><div class="ttdef"><b>Definition:</b> <a href="../../df/dac/test_8cpp_source.html#l00051">test.cpp:51</a></div></div>
+<div class="ttc" id="test_8cpp_html_a6d3cb4886e7afd45bd56b49800da932d"><div class="ttname"><a href="../../df/dac/test_8cpp.html#a6d3cb4886e7afd45bd56b49800da932d">onRep</a></div><div class="ttdeci">static void onRep(struct json_object *reply_contents)</div><div class="ttdef"><b>Definition:</b> <a href="../../df/dac/test_8cpp_source.html#l00091">test.cpp:91</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_a6a57b573cc767725762ba9beab032220"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#a6a57b573cc767725762ba9beab032220">LibHomeScreen::init</a></div><div class="ttdeci">int init(const int port, const std::string &amp;token)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d8a/libhomescreen_8cpp_source.html#l00116">libhomescreen.cpp:116</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html">LibHomeScreen</a></div><div class="ttdef"><b>Definition:</b> <a href="../../df/d43/libhomescreen_8hpp_source.html#l00032">libhomescreen.hpp:32</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_a5593ff5ac78f6495ccb649904cf0ab08"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#a5593ff5ac78f6495ccb649904cf0ab08">LibHomeScreen::api_list</a></div><div class="ttdeci">static const std::vector&lt; std::string &gt; api_list</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d43/libhomescreen_8hpp_source.html#l00050">libhomescreen.hpp:50</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_ab1b0e08bf35415de9064afed899e9f85"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#ab1b0e08bf35415de9064afed899e9f85">LibHomeScreen::set_event_handler</a></div><div class="ttdeci">void set_event_handler(enum EventType et, handler_func f)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d8a/libhomescreen_8cpp_source.html#l00293">libhomescreen.cpp:293</a></div></div>
+<div class="ttc" id="class_lib_home_screen_html_a82616c91ac211d2ad08e709b524bf154a4b0a82d501e4db5fbfe25c254c92896f"><div class="ttname"><a href="../../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154a4b0a82d501e4db5fbfe25c254c92896f">LibHomeScreen::Event_TapShortcut</a></div><div class="ttdef"><b>Definition:</b> <a href="../../df/d43/libhomescreen_8hpp_source.html#l00045">libhomescreen.hpp:45</a></div></div>
+</div><!-- fragment --></div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="../../doxygen.png" alt="doxygen"/>
+</a> 1.8.13
+</small></address>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/dir_0f70dc74e67ded1ed6ea12b5a24cac83.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/dir_0f70dc74e67ded1ed6ea12b5a24cac83.html
new file mode 100644
index 0000000..00ae245
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/dir_0f70dc74e67ded1ed6ea12b5a24cac83.html
@@ -0,0 +1,83 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>HomeScreenBinding: include/libhomescreen Directory Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+ <td id="projectalign" style="padding-left: 0.5em;">
+ <div id="projectname">HomeScreenBinding
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.13 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+$(function() {
+ initMenu('',true,false,'search.php','Search');
+ $(document).ready(function() { init_search(); });
+});
+</script>
+<div id="main-nav"></div>
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+ onmouseover="return searchBox.OnSearchSelectShow()"
+ onmouseout="return searchBox.OnSearchSelectHide()"
+ onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0"
+ name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div id="nav-path" class="navpath">
+ <ul>
+<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_0f70dc74e67ded1ed6ea12b5a24cac83.html">libhomescreen</a></li> </ul>
+</div>
+</div><!-- top -->
+<div class="header">
+ <div class="headertitle">
+<div class="title">libhomescreen Directory Reference</div> </div>
+</div><!--header-->
+<div class="contents">
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="files"></a>
+Files</h2></td></tr>
+<tr class="memitem:df/d43/libhomescreen_8hpp"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="df/d43/libhomescreen_8hpp.html">libhomescreen.hpp</a> <a href="df/d43/libhomescreen_8hpp_source.html">[code]</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/>
+</a> 1.8.13
+</small></address>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/dir_65f76d62445e9e84c0450b12bf77c3bc.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/dir_65f76d62445e9e84c0450b12bf77c3bc.html
new file mode 100644
index 0000000..ff64d77
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/dir_65f76d62445e9e84c0450b12bf77c3bc.html
@@ -0,0 +1,85 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>HomeScreenBinding: libhomescreen Directory Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+ <td id="projectalign" style="padding-left: 0.5em;">
+ <div id="projectname">HomeScreenBinding
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.13 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+$(function() {
+ initMenu('',true,false,'search.php','Search');
+ $(document).ready(function() { init_search(); });
+});
+</script>
+<div id="main-nav"></div>
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+ onmouseover="return searchBox.OnSearchSelectShow()"
+ onmouseout="return searchBox.OnSearchSelectHide()"
+ onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0"
+ name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div id="nav-path" class="navpath">
+ <ul>
+<li class="navelem"><a class="el" href="dir_65f76d62445e9e84c0450b12bf77c3bc.html">libhomescreen</a></li> </ul>
+</div>
+</div><!-- top -->
+<div class="header">
+ <div class="headertitle">
+<div class="title">libhomescreen Directory Reference</div> </div>
+</div><!--header-->
+<div class="contents">
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="files"></a>
+Files</h2></td></tr>
+<tr class="memitem:d0/d8a/libhomescreen_8cpp"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="d0/d8a/libhomescreen_8cpp.html">libhomescreen.cpp</a> <a href="d0/d8a/libhomescreen_8cpp_source.html">[code]</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:df/dac/test_8cpp"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="df/dac/test_8cpp.html">test.cpp</a> <a href="df/dac/test_8cpp_source.html">[code]</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/>
+</a> 1.8.13
+</small></address>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html
new file mode 100644
index 0000000..167382f
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html
@@ -0,0 +1,87 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>HomeScreenBinding: src Directory Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+ <td id="projectalign" style="padding-left: 0.5em;">
+ <div id="projectname">HomeScreenBinding
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.13 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+$(function() {
+ initMenu('',true,false,'search.php','Search');
+ $(document).ready(function() { init_search(); });
+});
+</script>
+<div id="main-nav"></div>
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+ onmouseover="return searchBox.OnSearchSelectShow()"
+ onmouseout="return searchBox.OnSearchSelectHide()"
+ onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0"
+ name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div id="nav-path" class="navpath">
+ <ul>
+<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li> </ul>
+</div>
+</div><!-- top -->
+<div class="header">
+ <div class="headertitle">
+<div class="title">src Directory Reference</div> </div>
+</div><!--header-->
+<div class="contents">
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="files"></a>
+Files</h2></td></tr>
+<tr class="memitem:d0/d1e/homescreen_8c"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="d0/d1e/homescreen_8c.html">homescreen.c</a> <a href="d0/d1e/homescreen_8c_source.html">[code]</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:dd/d1d/hs-helper_8c"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dd/d1d/hs-helper_8c.html">hs-helper.c</a> <a href="dd/d1d/hs-helper_8c_source.html">[code]</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:d3/d3d/hs-helper_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="d3/d3d/hs-helper_8h.html">hs-helper.h</a> <a href="d3/d3d/hs-helper_8h_source.html">[code]</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/>
+</a> 1.8.13
+</small></address>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/dir_a01af9eb3c502936dfd53c3f8e45721d.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/dir_a01af9eb3c502936dfd53c3f8e45721d.html
new file mode 100644
index 0000000..925bba0
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/dir_a01af9eb3c502936dfd53c3f8e45721d.html
@@ -0,0 +1,87 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>HomeScreenBinding: homescreen_service Directory Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+ <td id="projectalign" style="padding-left: 0.5em;">
+ <div id="projectname">HomeScreenBinding
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.13 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+$(function() {
+ initMenu('',true,false,'search.php','Search');
+ $(document).ready(function() { init_search(); });
+});
+</script>
+<div id="main-nav"></div>
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+ onmouseover="return searchBox.OnSearchSelectShow()"
+ onmouseout="return searchBox.OnSearchSelectHide()"
+ onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0"
+ name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div id="nav-path" class="navpath">
+ <ul>
+<li class="navelem"><a class="el" href="dir_a01af9eb3c502936dfd53c3f8e45721d.html">homescreen_service</a></li> </ul>
+</div>
+</div><!-- top -->
+<div class="header">
+ <div class="headertitle">
+<div class="title">homescreen_service Directory Reference</div> </div>
+</div><!--header-->
+<div class="contents">
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="files"></a>
+Files</h2></td></tr>
+<tr class="memitem:d0/d1e/homescreen_8c"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="d0/d1e/homescreen_8c.html">homescreen.c</a> <a href="d0/d1e/homescreen_8c_source.html">[code]</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:dd/d1d/hs-helper_8c"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dd/d1d/hs-helper_8c.html">hs-helper.c</a> <a href="dd/d1d/hs-helper_8c_source.html">[code]</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:d3/d3d/hs-helper_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="d3/d3d/hs-helper_8h.html">hs-helper.h</a> <a href="d3/d3d/hs-helper_8h_source.html">[code]</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/>
+</a> 1.8.13
+</small></address>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/dir_d44c64559bbebec7f509842c48db8b23.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/dir_d44c64559bbebec7f509842c48db8b23.html
new file mode 100644
index 0000000..a25c052
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/dir_d44c64559bbebec7f509842c48db8b23.html
@@ -0,0 +1,85 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>HomeScreenBinding: include Directory Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+ <td id="projectalign" style="padding-left: 0.5em;">
+ <div id="projectname">HomeScreenBinding
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.13 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+$(function() {
+ initMenu('',true,false,'search.php','Search');
+ $(document).ready(function() { init_search(); });
+});
+</script>
+<div id="main-nav"></div>
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+ onmouseover="return searchBox.OnSearchSelectShow()"
+ onmouseout="return searchBox.OnSearchSelectHide()"
+ onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0"
+ name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div id="nav-path" class="navpath">
+ <ul>
+<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li> </ul>
+</div>
+</div><!-- top -->
+<div class="header">
+ <div class="headertitle">
+<div class="title">include Directory Reference</div> </div>
+</div><!--header-->
+<div class="contents">
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="files"></a>
+Files</h2></td></tr>
+<tr class="memitem:df/d76/hmi-debug_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="df/d76/hmi-debug_8h.html">hmi-debug.h</a> <a href="df/d76/hmi-debug_8h_source.html">[code]</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:df/d43/libhomescreen_8hpp"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="df/d43/libhomescreen_8hpp.html">libhomescreen.hpp</a> <a href="df/d43/libhomescreen_8hpp_source.html">[code]</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/>
+</a> 1.8.13
+</small></address>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/doc.png b/demo#3/common/agl-service-homescreen/doc/api-ref/html/doc.png
new file mode 100644
index 0000000..17edabf
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/doc.png
Binary files differ
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/doxygen.css b/demo#3/common/agl-service-homescreen/doc/api-ref/html/doxygen.css
new file mode 100644
index 0000000..4f1ab91
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/doxygen.css
@@ -0,0 +1,1596 @@
+/* The standard CSS for doxygen 1.8.13 */
+
+body, table, div, p, dl {
+ font: 400 14px/22px Roboto,sans-serif;
+}
+
+p.reference, p.definition {
+ font: 400 14px/22px Roboto,sans-serif;
+}
+
+/* @group Heading Levels */
+
+h1.groupheader {
+ font-size: 150%;
+}
+
+.title {
+ font: 400 14px/28px Roboto,sans-serif;
+ font-size: 150%;
+ font-weight: bold;
+ margin: 10px 2px;
+}
+
+h2.groupheader {
+ border-bottom: 1px solid #879ECB;
+ color: #354C7B;
+ font-size: 150%;
+ font-weight: normal;
+ margin-top: 1.75em;
+ padding-top: 8px;
+ padding-bottom: 4px;
+ width: 100%;
+}
+
+h3.groupheader {
+ font-size: 100%;
+}
+
+h1, h2, h3, h4, h5, h6 {
+ -webkit-transition: text-shadow 0.5s linear;
+ -moz-transition: text-shadow 0.5s linear;
+ -ms-transition: text-shadow 0.5s linear;
+ -o-transition: text-shadow 0.5s linear;
+ transition: text-shadow 0.5s linear;
+ margin-right: 15px;
+}
+
+h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow {
+ text-shadow: 0 0 15px cyan;
+}
+
+dt {
+ font-weight: bold;
+}
+
+div.multicol {
+ -moz-column-gap: 1em;
+ -webkit-column-gap: 1em;
+ -moz-column-count: 3;
+ -webkit-column-count: 3;
+}
+
+p.startli, p.startdd {
+ margin-top: 2px;
+}
+
+p.starttd {
+ margin-top: 0px;
+}
+
+p.endli {
+ margin-bottom: 0px;
+}
+
+p.enddd {
+ margin-bottom: 4px;
+}
+
+p.endtd {
+ margin-bottom: 2px;
+}
+
+/* @end */
+
+caption {
+ font-weight: bold;
+}
+
+span.legend {
+ font-size: 70%;
+ text-align: center;
+}
+
+h3.version {
+ font-size: 90%;
+ text-align: center;
+}
+
+div.qindex, div.navtab{
+ background-color: #EBEFF6;
+ border: 1px solid #A3B4D7;
+ text-align: center;
+}
+
+div.qindex, div.navpath {
+ width: 100%;
+ line-height: 140%;
+}
+
+div.navtab {
+ margin-right: 15px;
+}
+
+/* @group Link Styling */
+
+a {
+ color: #3D578C;
+ font-weight: normal;
+ text-decoration: none;
+}
+
+.contents a:visited {
+ color: #4665A2;
+}
+
+a:hover {
+ text-decoration: underline;
+}
+
+a.qindex {
+ font-weight: bold;
+}
+
+a.qindexHL {
+ font-weight: bold;
+ background-color: #9CAFD4;
+ color: #ffffff;
+ border: 1px double #869DCA;
+}
+
+.contents a.qindexHL:visited {
+ color: #ffffff;
+}
+
+a.el {
+ font-weight: bold;
+}
+
+a.elRef {
+}
+
+a.code, a.code:visited, a.line, a.line:visited {
+ color: #4665A2;
+}
+
+a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited {
+ color: #4665A2;
+}
+
+/* @end */
+
+dl.el {
+ margin-left: -1cm;
+}
+
+pre.fragment {
+ border: 1px solid #C4CFE5;
+ background-color: #FBFCFD;
+ padding: 4px 6px;
+ margin: 4px 8px 4px 2px;
+ overflow: auto;
+ word-wrap: break-word;
+ font-size: 9pt;
+ line-height: 125%;
+ font-family: monospace, fixed;
+ font-size: 105%;
+}
+
+div.fragment {
+ padding: 0px;
+ margin: 4px 8px 4px 2px;
+ background-color: #FBFCFD;
+ border: 1px solid #C4CFE5;
+}
+
+div.line {
+ font-family: monospace, fixed;
+ font-size: 13px;
+ min-height: 13px;
+ line-height: 1.0;
+ text-wrap: unrestricted;
+ white-space: -moz-pre-wrap; /* Moz */
+ white-space: -pre-wrap; /* Opera 4-6 */
+ white-space: -o-pre-wrap; /* Opera 7 */
+ white-space: pre-wrap; /* CSS3 */
+ word-wrap: break-word; /* IE 5.5+ */
+ text-indent: -53px;
+ padding-left: 53px;
+ padding-bottom: 0px;
+ margin: 0px;
+ -webkit-transition-property: background-color, box-shadow;
+ -webkit-transition-duration: 0.5s;
+ -moz-transition-property: background-color, box-shadow;
+ -moz-transition-duration: 0.5s;
+ -ms-transition-property: background-color, box-shadow;
+ -ms-transition-duration: 0.5s;
+ -o-transition-property: background-color, box-shadow;
+ -o-transition-duration: 0.5s;
+ transition-property: background-color, box-shadow;
+ transition-duration: 0.5s;
+}
+
+div.line:after {
+ content:"\000A";
+ white-space: pre;
+}
+
+div.line.glow {
+ background-color: cyan;
+ box-shadow: 0 0 10px cyan;
+}
+
+
+span.lineno {
+ padding-right: 4px;
+ text-align: right;
+ border-right: 2px solid #0F0;
+ background-color: #E8E8E8;
+ white-space: pre;
+}
+span.lineno a {
+ background-color: #D8D8D8;
+}
+
+span.lineno a:hover {
+ background-color: #C8C8C8;
+}
+
+.lineno {
+ -webkit-touch-callout: none;
+ -webkit-user-select: none;
+ -khtml-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+
+div.ah, span.ah {
+ background-color: black;
+ font-weight: bold;
+ color: #ffffff;
+ margin-bottom: 3px;
+ margin-top: 3px;
+ padding: 0.2em;
+ border: solid thin #333;
+ border-radius: 0.5em;
+ -webkit-border-radius: .5em;
+ -moz-border-radius: .5em;
+ box-shadow: 2px 2px 3px #999;
+ -webkit-box-shadow: 2px 2px 3px #999;
+ -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444));
+ background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000 110%);
+}
+
+div.classindex ul {
+ list-style: none;
+ padding-left: 0;
+}
+
+div.classindex span.ai {
+ display: inline-block;
+}
+
+div.groupHeader {
+ margin-left: 16px;
+ margin-top: 12px;
+ font-weight: bold;
+}
+
+div.groupText {
+ margin-left: 16px;
+ font-style: italic;
+}
+
+body {
+ background-color: white;
+ color: black;
+ margin: 0;
+}
+
+div.contents {
+ margin-top: 10px;
+ margin-left: 12px;
+ margin-right: 8px;
+}
+
+td.indexkey {
+ background-color: #EBEFF6;
+ font-weight: bold;
+ border: 1px solid #C4CFE5;
+ margin: 2px 0px 2px 0;
+ padding: 2px 10px;
+ white-space: nowrap;
+ vertical-align: top;
+}
+
+td.indexvalue {
+ background-color: #EBEFF6;
+ border: 1px solid #C4CFE5;
+ padding: 2px 10px;
+ margin: 2px 0px;
+}
+
+tr.memlist {
+ background-color: #EEF1F7;
+}
+
+p.formulaDsp {
+ text-align: center;
+}
+
+img.formulaDsp {
+
+}
+
+img.formulaInl {
+ vertical-align: middle;
+}
+
+div.center {
+ text-align: center;
+ margin-top: 0px;
+ margin-bottom: 0px;
+ padding: 0px;
+}
+
+div.center img {
+ border: 0px;
+}
+
+address.footer {
+ text-align: right;
+ padding-right: 12px;
+}
+
+img.footer {
+ border: 0px;
+ vertical-align: middle;
+}
+
+/* @group Code Colorization */
+
+span.keyword {
+ color: #008000
+}
+
+span.keywordtype {
+ color: #604020
+}
+
+span.keywordflow {
+ color: #e08000
+}
+
+span.comment {
+ color: #800000
+}
+
+span.preprocessor {
+ color: #806020
+}
+
+span.stringliteral {
+ color: #002080
+}
+
+span.charliteral {
+ color: #008080
+}
+
+span.vhdldigit {
+ color: #ff00ff
+}
+
+span.vhdlchar {
+ color: #000000
+}
+
+span.vhdlkeyword {
+ color: #700070
+}
+
+span.vhdllogic {
+ color: #ff0000
+}
+
+blockquote {
+ background-color: #F7F8FB;
+ border-left: 2px solid #9CAFD4;
+ margin: 0 24px 0 4px;
+ padding: 0 12px 0 16px;
+}
+
+/* @end */
+
+/*
+.search {
+ color: #003399;
+ font-weight: bold;
+}
+
+form.search {
+ margin-bottom: 0px;
+ margin-top: 0px;
+}
+
+input.search {
+ font-size: 75%;
+ color: #000080;
+ font-weight: normal;
+ background-color: #e8eef2;
+}
+*/
+
+td.tiny {
+ font-size: 75%;
+}
+
+.dirtab {
+ padding: 4px;
+ border-collapse: collapse;
+ border: 1px solid #A3B4D7;
+}
+
+th.dirtab {
+ background: #EBEFF6;
+ font-weight: bold;
+}
+
+hr {
+ height: 0px;
+ border: none;
+ border-top: 1px solid #4A6AAA;
+}
+
+hr.footer {
+ height: 1px;
+}
+
+/* @group Member Descriptions */
+
+table.memberdecls {
+ border-spacing: 0px;
+ padding: 0px;
+}
+
+.memberdecls td, .fieldtable tr {
+ -webkit-transition-property: background-color, box-shadow;
+ -webkit-transition-duration: 0.5s;
+ -moz-transition-property: background-color, box-shadow;
+ -moz-transition-duration: 0.5s;
+ -ms-transition-property: background-color, box-shadow;
+ -ms-transition-duration: 0.5s;
+ -o-transition-property: background-color, box-shadow;
+ -o-transition-duration: 0.5s;
+ transition-property: background-color, box-shadow;
+ transition-duration: 0.5s;
+}
+
+.memberdecls td.glow, .fieldtable tr.glow {
+ background-color: cyan;
+ box-shadow: 0 0 15px cyan;
+}
+
+.mdescLeft, .mdescRight,
+.memItemLeft, .memItemRight,
+.memTemplItemLeft, .memTemplItemRight, .memTemplParams {
+ background-color: #F9FAFC;
+ border: none;
+ margin: 4px;
+ padding: 1px 0 0 8px;
+}
+
+.mdescLeft, .mdescRight {
+ padding: 0px 8px 4px 8px;
+ color: #555;
+}
+
+.memSeparator {
+ border-bottom: 1px solid #DEE4F0;
+ line-height: 1px;
+ margin: 0px;
+ padding: 0px;
+}
+
+.memItemLeft, .memTemplItemLeft {
+ white-space: nowrap;
+}
+
+.memItemRight {
+ width: 100%;
+}
+
+.memTemplParams {
+ color: #4665A2;
+ white-space: nowrap;
+ font-size: 80%;
+}
+
+/* @end */
+
+/* @group Member Details */
+
+/* Styles for detailed member documentation */
+
+.memtitle {
+ padding: 8px;
+ border-top: 1px solid #A8B8D9;
+ border-left: 1px solid #A8B8D9;
+ border-right: 1px solid #A8B8D9;
+ border-top-right-radius: 4px;
+ border-top-left-radius: 4px;
+ margin-bottom: -1px;
+ background-image: url('nav_f.png');
+ background-repeat: repeat-x;
+ background-color: #E2E8F2;
+ line-height: 1.25;
+ font-weight: 300;
+ float:left;
+}
+
+.permalink
+{
+ font-size: 65%;
+ display: inline-block;
+ vertical-align: middle;
+}
+
+.memtemplate {
+ font-size: 80%;
+ color: #4665A2;
+ font-weight: normal;
+ margin-left: 9px;
+}
+
+.memnav {
+ background-color: #EBEFF6;
+ border: 1px solid #A3B4D7;
+ text-align: center;
+ margin: 2px;
+ margin-right: 15px;
+ padding: 2px;
+}
+
+.mempage {
+ width: 100%;
+}
+
+.memitem {
+ padding: 0;
+ margin-bottom: 10px;
+ margin-right: 5px;
+ -webkit-transition: box-shadow 0.5s linear;
+ -moz-transition: box-shadow 0.5s linear;
+ -ms-transition: box-shadow 0.5s linear;
+ -o-transition: box-shadow 0.5s linear;
+ transition: box-shadow 0.5s linear;
+ display: table !important;
+ width: 100%;
+}
+
+.memitem.glow {
+ box-shadow: 0 0 15px cyan;
+}
+
+.memname {
+ font-weight: 400;
+ margin-left: 6px;
+}
+
+.memname td {
+ vertical-align: bottom;
+}
+
+.memproto, dl.reflist dt {
+ border-top: 1px solid #A8B8D9;
+ border-left: 1px solid #A8B8D9;
+ border-right: 1px solid #A8B8D9;
+ padding: 6px 0px 6px 0px;
+ color: #253555;
+ font-weight: bold;
+ text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
+ background-color: #DFE5F1;
+ /* opera specific markup */
+ box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
+ border-top-right-radius: 4px;
+ /* firefox specific markup */
+ -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
+ -moz-border-radius-topright: 4px;
+ /* webkit specific markup */
+ -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
+ -webkit-border-top-right-radius: 4px;
+
+}
+
+.overload {
+ font-family: "courier new",courier,monospace;
+ font-size: 65%;
+}
+
+.memdoc, dl.reflist dd {
+ border-bottom: 1px solid #A8B8D9;
+ border-left: 1px solid #A8B8D9;
+ border-right: 1px solid #A8B8D9;
+ padding: 6px 10px 2px 10px;
+ background-color: #FBFCFD;
+ border-top-width: 0;
+ background-image:url('nav_g.png');
+ background-repeat:repeat-x;
+ background-color: #FFFFFF;
+ /* opera specific markup */
+ border-bottom-left-radius: 4px;
+ border-bottom-right-radius: 4px;
+ box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
+ /* firefox specific markup */
+ -moz-border-radius-bottomleft: 4px;
+ -moz-border-radius-bottomright: 4px;
+ -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
+ /* webkit specific markup */
+ -webkit-border-bottom-left-radius: 4px;
+ -webkit-border-bottom-right-radius: 4px;
+ -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
+}
+
+dl.reflist dt {
+ padding: 5px;
+}
+
+dl.reflist dd {
+ margin: 0px 0px 10px 0px;
+ padding: 5px;
+}
+
+.paramkey {
+ text-align: right;
+}
+
+.paramtype {
+ white-space: nowrap;
+}
+
+.paramname {
+ color: #602020;
+ white-space: nowrap;
+}
+.paramname em {
+ font-style: normal;
+}
+.paramname code {
+ line-height: 14px;
+}
+
+.params, .retval, .exception, .tparams {
+ margin-left: 0px;
+ padding-left: 0px;
+}
+
+.params .paramname, .retval .paramname {
+ font-weight: bold;
+ vertical-align: top;
+}
+
+.params .paramtype {
+ font-style: italic;
+ vertical-align: top;
+}
+
+.params .paramdir {
+ font-family: "courier new",courier,monospace;
+ vertical-align: top;
+}
+
+table.mlabels {
+ border-spacing: 0px;
+}
+
+td.mlabels-left {
+ width: 100%;
+ padding: 0px;
+}
+
+td.mlabels-right {
+ vertical-align: bottom;
+ padding: 0px;
+ white-space: nowrap;
+}
+
+span.mlabels {
+ margin-left: 8px;
+}
+
+span.mlabel {
+ background-color: #728DC1;
+ border-top:1px solid #5373B4;
+ border-left:1px solid #5373B4;
+ border-right:1px solid #C4CFE5;
+ border-bottom:1px solid #C4CFE5;
+ text-shadow: none;
+ color: white;
+ margin-right: 4px;
+ padding: 2px 3px;
+ border-radius: 3px;
+ font-size: 7pt;
+ white-space: nowrap;
+ vertical-align: middle;
+}
+
+
+
+/* @end */
+
+/* these are for tree view inside a (index) page */
+
+div.directory {
+ margin: 10px 0px;
+ border-top: 1px solid #9CAFD4;
+ border-bottom: 1px solid #9CAFD4;
+ width: 100%;
+}
+
+.directory table {
+ border-collapse:collapse;
+}
+
+.directory td {
+ margin: 0px;
+ padding: 0px;
+ vertical-align: top;
+}
+
+.directory td.entry {
+ white-space: nowrap;
+ padding-right: 6px;
+ padding-top: 3px;
+}
+
+.directory td.entry a {
+ outline:none;
+}
+
+.directory td.entry a img {
+ border: none;
+}
+
+.directory td.desc {
+ width: 100%;
+ padding-left: 6px;
+ padding-right: 6px;
+ padding-top: 3px;
+ border-left: 1px solid rgba(0,0,0,0.05);
+}
+
+.directory tr.even {
+ padding-left: 6px;
+ background-color: #F7F8FB;
+}
+
+.directory img {
+ vertical-align: -30%;
+}
+
+.directory .levels {
+ white-space: nowrap;
+ width: 100%;
+ text-align: right;
+ font-size: 9pt;
+}
+
+.directory .levels span {
+ cursor: pointer;
+ padding-left: 2px;
+ padding-right: 2px;
+ color: #3D578C;
+}
+
+.arrow {
+ color: #9CAFD4;
+ -webkit-user-select: none;
+ -khtml-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ cursor: pointer;
+ font-size: 80%;
+ display: inline-block;
+ width: 16px;
+ height: 22px;
+}
+
+.icon {
+ font-family: Arial, Helvetica;
+ font-weight: bold;
+ font-size: 12px;
+ height: 14px;
+ width: 16px;
+ display: inline-block;
+ background-color: #728DC1;
+ color: white;
+ text-align: center;
+ border-radius: 4px;
+ margin-left: 2px;
+ margin-right: 2px;
+}
+
+.icona {
+ width: 24px;
+ height: 22px;
+ display: inline-block;
+}
+
+.iconfopen {
+ width: 24px;
+ height: 18px;
+ margin-bottom: 4px;
+ background-image:url('folderopen.png');
+ background-position: 0px -4px;
+ background-repeat: repeat-y;
+ vertical-align:top;
+ display: inline-block;
+}
+
+.iconfclosed {
+ width: 24px;
+ height: 18px;
+ margin-bottom: 4px;
+ background-image:url('folderclosed.png');
+ background-position: 0px -4px;
+ background-repeat: repeat-y;
+ vertical-align:top;
+ display: inline-block;
+}
+
+.icondoc {
+ width: 24px;
+ height: 18px;
+ margin-bottom: 4px;
+ background-image:url('doc.png');
+ background-position: 0px -4px;
+ background-repeat: repeat-y;
+ vertical-align:top;
+ display: inline-block;
+}
+
+table.directory {
+ font: 400 14px Roboto,sans-serif;
+}
+
+/* @end */
+
+div.dynheader {
+ margin-top: 8px;
+ -webkit-touch-callout: none;
+ -webkit-user-select: none;
+ -khtml-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+
+address {
+ font-style: normal;
+ color: #2A3D61;
+}
+
+table.doxtable caption {
+ caption-side: top;
+}
+
+table.doxtable {
+ border-collapse:collapse;
+ margin-top: 4px;
+ margin-bottom: 4px;
+}
+
+table.doxtable td, table.doxtable th {
+ border: 1px solid #2D4068;
+ padding: 3px 7px 2px;
+}
+
+table.doxtable th {
+ background-color: #374F7F;
+ color: #FFFFFF;
+ font-size: 110%;
+ padding-bottom: 4px;
+ padding-top: 5px;
+}
+
+table.fieldtable {
+ /*width: 100%;*/
+ margin-bottom: 10px;
+ border: 1px solid #A8B8D9;
+ border-spacing: 0px;
+ -moz-border-radius: 4px;
+ -webkit-border-radius: 4px;
+ border-radius: 4px;
+ -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px;
+ -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15);
+ box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15);
+}
+
+.fieldtable td, .fieldtable th {
+ padding: 3px 7px 2px;
+}
+
+.fieldtable td.fieldtype, .fieldtable td.fieldname {
+ white-space: nowrap;
+ border-right: 1px solid #A8B8D9;
+ border-bottom: 1px solid #A8B8D9;
+ vertical-align: top;
+}
+
+.fieldtable td.fieldname {
+ padding-top: 3px;
+}
+
+.fieldtable td.fielddoc {
+ border-bottom: 1px solid #A8B8D9;
+ /*width: 100%;*/
+}
+
+.fieldtable td.fielddoc p:first-child {
+ margin-top: 0px;
+}
+
+.fieldtable td.fielddoc p:last-child {
+ margin-bottom: 2px;
+}
+
+.fieldtable tr:last-child td {
+ border-bottom: none;
+}
+
+.fieldtable th {
+ background-image:url('nav_f.png');
+ background-repeat:repeat-x;
+ background-color: #E2E8F2;
+ font-size: 90%;
+ color: #253555;
+ padding-bottom: 4px;
+ padding-top: 5px;
+ text-align:left;
+ font-weight: 400;
+ -moz-border-radius-topleft: 4px;
+ -moz-border-radius-topright: 4px;
+ -webkit-border-top-left-radius: 4px;
+ -webkit-border-top-right-radius: 4px;
+ border-top-left-radius: 4px;
+ border-top-right-radius: 4px;
+ border-bottom: 1px solid #A8B8D9;
+}
+
+
+.tabsearch {
+ top: 0px;
+ left: 10px;
+ height: 36px;
+ background-image: url('tab_b.png');
+ z-index: 101;
+ overflow: hidden;
+ font-size: 13px;
+}
+
+.navpath ul
+{
+ font-size: 11px;
+ background-image:url('tab_b.png');
+ background-repeat:repeat-x;
+ background-position: 0 -5px;
+ height:30px;
+ line-height:30px;
+ color:#8AA0CC;
+ border:solid 1px #C2CDE4;
+ overflow:hidden;
+ margin:0px;
+ padding:0px;
+}
+
+.navpath li
+{
+ list-style-type:none;
+ float:left;
+ padding-left:10px;
+ padding-right:15px;
+ background-image:url('bc_s.png');
+ background-repeat:no-repeat;
+ background-position:right;
+ color:#364D7C;
+}
+
+.navpath li.navelem a
+{
+ height:32px;
+ display:block;
+ text-decoration: none;
+ outline: none;
+ color: #283A5D;
+ font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif;
+ text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
+ text-decoration: none;
+}
+
+.navpath li.navelem a:hover
+{
+ color:#6884BD;
+}
+
+.navpath li.footer
+{
+ list-style-type:none;
+ float:right;
+ padding-left:10px;
+ padding-right:15px;
+ background-image:none;
+ background-repeat:no-repeat;
+ background-position:right;
+ color:#364D7C;
+ font-size: 8pt;
+}
+
+
+div.summary
+{
+ float: right;
+ font-size: 8pt;
+ padding-right: 5px;
+ width: 50%;
+ text-align: right;
+}
+
+div.summary a
+{
+ white-space: nowrap;
+}
+
+table.classindex
+{
+ margin: 10px;
+ white-space: nowrap;
+ margin-left: 3%;
+ margin-right: 3%;
+ width: 94%;
+ border: 0;
+ border-spacing: 0;
+ padding: 0;
+}
+
+div.ingroups
+{
+ font-size: 8pt;
+ width: 50%;
+ text-align: left;
+}
+
+div.ingroups a
+{
+ white-space: nowrap;
+}
+
+div.header
+{
+ background-image:url('nav_h.png');
+ background-repeat:repeat-x;
+ background-color: #F9FAFC;
+ margin: 0px;
+ border-bottom: 1px solid #C4CFE5;
+}
+
+div.headertitle
+{
+ padding: 5px 5px 5px 10px;
+}
+
+dl
+{
+ padding: 0 0 0 10px;
+}
+
+/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug */
+dl.section
+{
+ margin-left: 0px;
+ padding-left: 0px;
+}
+
+dl.note
+{
+ margin-left:-7px;
+ padding-left: 3px;
+ border-left:4px solid;
+ border-color: #D0C000;
+}
+
+dl.warning, dl.attention
+{
+ margin-left:-7px;
+ padding-left: 3px;
+ border-left:4px solid;
+ border-color: #FF0000;
+}
+
+dl.pre, dl.post, dl.invariant
+{
+ margin-left:-7px;
+ padding-left: 3px;
+ border-left:4px solid;
+ border-color: #00D000;
+}
+
+dl.deprecated
+{
+ margin-left:-7px;
+ padding-left: 3px;
+ border-left:4px solid;
+ border-color: #505050;
+}
+
+dl.todo
+{
+ margin-left:-7px;
+ padding-left: 3px;
+ border-left:4px solid;
+ border-color: #00C0E0;
+}
+
+dl.test
+{
+ margin-left:-7px;
+ padding-left: 3px;
+ border-left:4px solid;
+ border-color: #3030E0;
+}
+
+dl.bug
+{
+ margin-left:-7px;
+ padding-left: 3px;
+ border-left:4px solid;
+ border-color: #C08050;
+}
+
+dl.section dd {
+ margin-bottom: 6px;
+}
+
+
+#projectlogo
+{
+ text-align: center;
+ vertical-align: bottom;
+ border-collapse: separate;
+}
+
+#projectlogo img
+{
+ border: 0px none;
+}
+
+#projectalign
+{
+ vertical-align: middle;
+}
+
+#projectname
+{
+ font: 300% Tahoma, Arial,sans-serif;
+ margin: 0px;
+ padding: 2px 0px;
+}
+
+#projectbrief
+{
+ font: 120% Tahoma, Arial,sans-serif;
+ margin: 0px;
+ padding: 0px;
+}
+
+#projectnumber
+{
+ font: 50% Tahoma, Arial,sans-serif;
+ margin: 0px;
+ padding: 0px;
+}
+
+#titlearea
+{
+ padding: 0px;
+ margin: 0px;
+ width: 100%;
+ border-bottom: 1px solid #5373B4;
+}
+
+.image
+{
+ text-align: center;
+}
+
+.dotgraph
+{
+ text-align: center;
+}
+
+.mscgraph
+{
+ text-align: center;
+}
+
+.plantumlgraph
+{
+ text-align: center;
+}
+
+.diagraph
+{
+ text-align: center;
+}
+
+.caption
+{
+ font-weight: bold;
+}
+
+div.zoom
+{
+ border: 1px solid #90A5CE;
+}
+
+dl.citelist {
+ margin-bottom:50px;
+}
+
+dl.citelist dt {
+ color:#334975;
+ float:left;
+ font-weight:bold;
+ margin-right:10px;
+ padding:5px;
+}
+
+dl.citelist dd {
+ margin:2px 0;
+ padding:5px 0;
+}
+
+div.toc {
+ padding: 14px 25px;
+ background-color: #F4F6FA;
+ border: 1px solid #D8DFEE;
+ border-radius: 7px 7px 7px 7px;
+ float: right;
+ height: auto;
+ margin: 0 8px 10px 10px;
+ width: 200px;
+}
+
+div.toc li {
+ background: url("bdwn.png") no-repeat scroll 0 5px transparent;
+ font: 10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif;
+ margin-top: 5px;
+ padding-left: 10px;
+ padding-top: 2px;
+}
+
+div.toc h3 {
+ font: bold 12px/1.2 Arial,FreeSans,sans-serif;
+ color: #4665A2;
+ border-bottom: 0 none;
+ margin: 0;
+}
+
+div.toc ul {
+ list-style: none outside none;
+ border: medium none;
+ padding: 0px;
+}
+
+div.toc li.level1 {
+ margin-left: 0px;
+}
+
+div.toc li.level2 {
+ margin-left: 15px;
+}
+
+div.toc li.level3 {
+ margin-left: 30px;
+}
+
+div.toc li.level4 {
+ margin-left: 45px;
+}
+
+.inherit_header {
+ font-weight: bold;
+ color: gray;
+ cursor: pointer;
+ -webkit-touch-callout: none;
+ -webkit-user-select: none;
+ -khtml-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+
+.inherit_header td {
+ padding: 6px 0px 2px 5px;
+}
+
+.inherit {
+ display: none;
+}
+
+tr.heading h2 {
+ margin-top: 12px;
+ margin-bottom: 4px;
+}
+
+/* tooltip related style info */
+
+.ttc {
+ position: absolute;
+ display: none;
+}
+
+#powerTip {
+ cursor: default;
+ white-space: nowrap;
+ background-color: white;
+ border: 1px solid gray;
+ border-radius: 4px 4px 4px 4px;
+ box-shadow: 1px 1px 7px gray;
+ display: none;
+ font-size: smaller;
+ max-width: 80%;
+ opacity: 0.9;
+ padding: 1ex 1em 1em;
+ position: absolute;
+ z-index: 2147483647;
+}
+
+#powerTip div.ttdoc {
+ color: grey;
+ font-style: italic;
+}
+
+#powerTip div.ttname a {
+ font-weight: bold;
+}
+
+#powerTip div.ttname {
+ font-weight: bold;
+}
+
+#powerTip div.ttdeci {
+ color: #006318;
+}
+
+#powerTip div {
+ margin: 0px;
+ padding: 0px;
+ font: 12px/16px Roboto,sans-serif;
+}
+
+#powerTip:before, #powerTip:after {
+ content: "";
+ position: absolute;
+ margin: 0px;
+}
+
+#powerTip.n:after, #powerTip.n:before,
+#powerTip.s:after, #powerTip.s:before,
+#powerTip.w:after, #powerTip.w:before,
+#powerTip.e:after, #powerTip.e:before,
+#powerTip.ne:after, #powerTip.ne:before,
+#powerTip.se:after, #powerTip.se:before,
+#powerTip.nw:after, #powerTip.nw:before,
+#powerTip.sw:after, #powerTip.sw:before {
+ border: solid transparent;
+ content: " ";
+ height: 0;
+ width: 0;
+ position: absolute;
+}
+
+#powerTip.n:after, #powerTip.s:after,
+#powerTip.w:after, #powerTip.e:after,
+#powerTip.nw:after, #powerTip.ne:after,
+#powerTip.sw:after, #powerTip.se:after {
+ border-color: rgba(255, 255, 255, 0);
+}
+
+#powerTip.n:before, #powerTip.s:before,
+#powerTip.w:before, #powerTip.e:before,
+#powerTip.nw:before, #powerTip.ne:before,
+#powerTip.sw:before, #powerTip.se:before {
+ border-color: rgba(128, 128, 128, 0);
+}
+
+#powerTip.n:after, #powerTip.n:before,
+#powerTip.ne:after, #powerTip.ne:before,
+#powerTip.nw:after, #powerTip.nw:before {
+ top: 100%;
+}
+
+#powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after {
+ border-top-color: #ffffff;
+ border-width: 10px;
+ margin: 0px -10px;
+}
+#powerTip.n:before {
+ border-top-color: #808080;
+ border-width: 11px;
+ margin: 0px -11px;
+}
+#powerTip.n:after, #powerTip.n:before {
+ left: 50%;
+}
+
+#powerTip.nw:after, #powerTip.nw:before {
+ right: 14px;
+}
+
+#powerTip.ne:after, #powerTip.ne:before {
+ left: 14px;
+}
+
+#powerTip.s:after, #powerTip.s:before,
+#powerTip.se:after, #powerTip.se:before,
+#powerTip.sw:after, #powerTip.sw:before {
+ bottom: 100%;
+}
+
+#powerTip.s:after, #powerTip.se:after, #powerTip.sw:after {
+ border-bottom-color: #ffffff;
+ border-width: 10px;
+ margin: 0px -10px;
+}
+
+#powerTip.s:before, #powerTip.se:before, #powerTip.sw:before {
+ border-bottom-color: #808080;
+ border-width: 11px;
+ margin: 0px -11px;
+}
+
+#powerTip.s:after, #powerTip.s:before {
+ left: 50%;
+}
+
+#powerTip.sw:after, #powerTip.sw:before {
+ right: 14px;
+}
+
+#powerTip.se:after, #powerTip.se:before {
+ left: 14px;
+}
+
+#powerTip.e:after, #powerTip.e:before {
+ left: 100%;
+}
+#powerTip.e:after {
+ border-left-color: #ffffff;
+ border-width: 10px;
+ top: 50%;
+ margin-top: -10px;
+}
+#powerTip.e:before {
+ border-left-color: #808080;
+ border-width: 11px;
+ top: 50%;
+ margin-top: -11px;
+}
+
+#powerTip.w:after, #powerTip.w:before {
+ right: 100%;
+}
+#powerTip.w:after {
+ border-right-color: #ffffff;
+ border-width: 10px;
+ top: 50%;
+ margin-top: -10px;
+}
+#powerTip.w:before {
+ border-right-color: #808080;
+ border-width: 11px;
+ top: 50%;
+ margin-top: -11px;
+}
+
+@media print
+{
+ #top { display: none; }
+ #side-nav { display: none; }
+ #nav-path { display: none; }
+ body { overflow:visible; }
+ h1, h2, h3, h4, h5, h6 { page-break-after: avoid; }
+ .summary { display: none; }
+ .memitem { page-break-inside: avoid; }
+ #doc-content
+ {
+ margin-left:0 !important;
+ height:auto !important;
+ width:auto !important;
+ overflow:inherit;
+ display:inline;
+ }
+}
+
+/* @group Markdown */
+
+/*
+table.markdownTable {
+ border-collapse:collapse;
+ margin-top: 4px;
+ margin-bottom: 4px;
+}
+
+table.markdownTable td, table.markdownTable th {
+ border: 1px solid #2D4068;
+ padding: 3px 7px 2px;
+}
+
+table.markdownTableHead tr {
+}
+
+table.markdownTableBodyLeft td, table.markdownTable th {
+ border: 1px solid #2D4068;
+ padding: 3px 7px 2px;
+}
+
+th.markdownTableHeadLeft th.markdownTableHeadRight th.markdownTableHeadCenter th.markdownTableHeadNone {
+ background-color: #374F7F;
+ color: #FFFFFF;
+ font-size: 110%;
+ padding-bottom: 4px;
+ padding-top: 5px;
+}
+
+th.markdownTableHeadLeft {
+ text-align: left
+}
+
+th.markdownTableHeadRight {
+ text-align: right
+}
+
+th.markdownTableHeadCenter {
+ text-align: center
+}
+*/
+
+table.markdownTable {
+ border-collapse:collapse;
+ margin-top: 4px;
+ margin-bottom: 4px;
+}
+
+table.markdownTable td, table.markdownTable th {
+ border: 1px solid #2D4068;
+ padding: 3px 7px 2px;
+}
+
+table.markdownTable tr {
+}
+
+th.markdownTableHeadLeft, th.markdownTableHeadRight, th.markdownTableHeadCenter, th.markdownTableHeadNone {
+ background-color: #374F7F;
+ color: #FFFFFF;
+ font-size: 110%;
+ padding-bottom: 4px;
+ padding-top: 5px;
+}
+
+th.markdownTableHeadLeft, td.markdownTableBodyLeft {
+ text-align: left
+}
+
+th.markdownTableHeadRight, td.markdownTableBodyRight {
+ text-align: right
+}
+
+th.markdownTableHeadCenter, td.markdownTableBodyCenter {
+ text-align: center
+}
+
+
+/* @end */
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/doxygen.png b/demo#3/common/agl-service-homescreen/doc/api-ref/html/doxygen.png
new file mode 100644
index 0000000..3ff17d8
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/doxygen.png
Binary files differ
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/dynsections.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/dynsections.js
new file mode 100644
index 0000000..1e6bf07
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/dynsections.js
@@ -0,0 +1,104 @@
+function toggleVisibility(linkObj)
+{
+ var base = $(linkObj).attr('id');
+ var summary = $('#'+base+'-summary');
+ var content = $('#'+base+'-content');
+ var trigger = $('#'+base+'-trigger');
+ var src=$(trigger).attr('src');
+ if (content.is(':visible')===true) {
+ content.hide();
+ summary.show();
+ $(linkObj).addClass('closed').removeClass('opened');
+ $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png');
+ } else {
+ content.show();
+ summary.hide();
+ $(linkObj).removeClass('closed').addClass('opened');
+ $(trigger).attr('src',src.substring(0,src.length-10)+'open.png');
+ }
+ return false;
+}
+
+function updateStripes()
+{
+ $('table.directory tr').
+ removeClass('even').filter(':visible:even').addClass('even');
+}
+
+function toggleLevel(level)
+{
+ $('table.directory tr').each(function() {
+ var l = this.id.split('_').length-1;
+ var i = $('#img'+this.id.substring(3));
+ var a = $('#arr'+this.id.substring(3));
+ if (l<level+1) {
+ i.removeClass('iconfopen iconfclosed').addClass('iconfopen');
+ a.html('&#9660;');
+ $(this).show();
+ } else if (l==level+1) {
+ i.removeClass('iconfclosed iconfopen').addClass('iconfclosed');
+ a.html('&#9658;');
+ $(this).show();
+ } else {
+ $(this).hide();
+ }
+ });
+ updateStripes();
+}
+
+function toggleFolder(id)
+{
+ // the clicked row
+ var currentRow = $('#row_'+id);
+
+ // all rows after the clicked row
+ var rows = currentRow.nextAll("tr");
+
+ var re = new RegExp('^row_'+id+'\\d+_$', "i"); //only one sub
+
+ // only match elements AFTER this one (can't hide elements before)
+ var childRows = rows.filter(function() { return this.id.match(re); });
+
+ // first row is visible we are HIDING
+ if (childRows.filter(':first').is(':visible')===true) {
+ // replace down arrow by right arrow for current row
+ var currentRowSpans = currentRow.find("span");
+ currentRowSpans.filter(".iconfopen").removeClass("iconfopen").addClass("iconfclosed");
+ currentRowSpans.filter(".arrow").html('&#9658;');
+ rows.filter("[id^=row_"+id+"]").hide(); // hide all children
+ } else { // we are SHOWING
+ // replace right arrow by down arrow for current row
+ var currentRowSpans = currentRow.find("span");
+ currentRowSpans.filter(".iconfclosed").removeClass("iconfclosed").addClass("iconfopen");
+ currentRowSpans.filter(".arrow").html('&#9660;');
+ // replace down arrows by right arrows for child rows
+ var childRowsSpans = childRows.find("span");
+ childRowsSpans.filter(".iconfopen").removeClass("iconfopen").addClass("iconfclosed");
+ childRowsSpans.filter(".arrow").html('&#9658;');
+ childRows.show(); //show all children
+ }
+ updateStripes();
+}
+
+
+function toggleInherit(id)
+{
+ var rows = $('tr.inherit.'+id);
+ var img = $('tr.inherit_header.'+id+' img');
+ var src = $(img).attr('src');
+ if (rows.filter(':first').is(':visible')===true) {
+ rows.css('display','none');
+ $(img).attr('src',src.substring(0,src.length-8)+'closed.png');
+ } else {
+ rows.css('display','table-row'); // using show() causes jump in firefox
+ $(img).attr('src',src.substring(0,src.length-10)+'open.png');
+ }
+}
+
+
+$(document).ready(function() {
+ $('.code,.codeRef').each(function() {
+ $(this).data('powertip',$('#'+$(this).attr('href').replace(/.*\//,'').replace(/[^a-z_A-Z0-9]/g,'_')).html());
+ $(this).powerTip({ placement: 's', smartPlacement: true, mouseOnToPopup: true });
+ });
+});
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/files.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/files.html
new file mode 100644
index 0000000..821231f
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/files.html
@@ -0,0 +1,87 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>HomeScreenBinding: File List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+ <td id="projectalign" style="padding-left: 0.5em;">
+ <div id="projectname">HomeScreenBinding
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.13 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+$(function() {
+ initMenu('',true,false,'search.php','Search');
+ $(document).ready(function() { init_search(); });
+});
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+ onmouseover="return searchBox.OnSearchSelectShow()"
+ onmouseout="return searchBox.OnSearchSelectHide()"
+ onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0"
+ name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div class="header">
+ <div class="headertitle">
+<div class="title">File List</div> </div>
+</div><!--header-->
+<div class="contents">
+<div class="textblock">Here is a list of all files with brief descriptions:</div><div class="directory">
+<div class="levels">[detail level <span onclick="javascript:toggleLevel(1);">1</span><span onclick="javascript:toggleLevel(2);">2</span>]</div><table class="directory">
+<tr id="row_0_" class="even"><td class="entry"><span style="width:0px;display:inline-block;">&#160;</span><span id="arr_0_" class="arrow" onclick="toggleFolder('0_')">&#9660;</span><span id="img_0_" class="iconfopen" onclick="toggleFolder('0_')">&#160;</span><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html" target="_self">include</a></td><td class="desc"></td></tr>
+<tr id="row_0_0_"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><a href="df/d76/hmi-debug_8h_source.html"><span class="icondoc"></span></a><a class="el" href="df/d76/hmi-debug_8h.html" target="_self">hmi-debug.h</a></td><td class="desc"></td></tr>
+<tr id="row_0_1_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><a href="df/d43/libhomescreen_8hpp_source.html"><span class="icondoc"></span></a><a class="el" href="df/d43/libhomescreen_8hpp.html" target="_self">libhomescreen.hpp</a></td><td class="desc"></td></tr>
+<tr id="row_1_"><td class="entry"><span style="width:0px;display:inline-block;">&#160;</span><span id="arr_1_" class="arrow" onclick="toggleFolder('1_')">&#9660;</span><span id="img_1_" class="iconfopen" onclick="toggleFolder('1_')">&#160;</span><a class="el" href="dir_65f76d62445e9e84c0450b12bf77c3bc.html" target="_self">libhomescreen</a></td><td class="desc"></td></tr>
+<tr id="row_1_0_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><a href="d0/d8a/libhomescreen_8cpp_source.html"><span class="icondoc"></span></a><a class="el" href="d0/d8a/libhomescreen_8cpp.html" target="_self">libhomescreen.cpp</a></td><td class="desc"></td></tr>
+<tr id="row_1_1_"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><a href="df/dac/test_8cpp_source.html"><span class="icondoc"></span></a><a class="el" href="df/dac/test_8cpp.html" target="_self">test.cpp</a></td><td class="desc"></td></tr>
+<tr id="row_2_" class="even"><td class="entry"><span style="width:0px;display:inline-block;">&#160;</span><span id="arr_2_" class="arrow" onclick="toggleFolder('2_')">&#9660;</span><span id="img_2_" class="iconfopen" onclick="toggleFolder('2_')">&#160;</span><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html" target="_self">src</a></td><td class="desc"></td></tr>
+<tr id="row_2_0_"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><a href="d0/d1e/homescreen_8c_source.html"><span class="icondoc"></span></a><a class="el" href="d0/d1e/homescreen_8c.html" target="_self">homescreen.c</a></td><td class="desc"></td></tr>
+<tr id="row_2_1_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><a href="dd/d1d/hs-helper_8c_source.html"><span class="icondoc"></span></a><a class="el" href="dd/d1d/hs-helper_8c.html" target="_self">hs-helper.c</a></td><td class="desc"></td></tr>
+<tr id="row_2_2_"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><a href="d3/d3d/hs-helper_8h_source.html"><span class="icondoc"></span></a><a class="el" href="d3/d3d/hs-helper_8h.html" target="_self">hs-helper.h</a></td><td class="desc"></td></tr>
+</table>
+</div><!-- directory -->
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/>
+</a> 1.8.13
+</small></address>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/folderclosed.png b/demo#3/common/agl-service-homescreen/doc/api-ref/html/folderclosed.png
new file mode 100644
index 0000000..bb8ab35
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/folderclosed.png
Binary files differ
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/folderopen.png b/demo#3/common/agl-service-homescreen/doc/api-ref/html/folderopen.png
new file mode 100644
index 0000000..d6c7f67
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/folderopen.png
Binary files differ
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/functions.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/functions.html
new file mode 100644
index 0000000..4aa87d0
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/functions.html
@@ -0,0 +1,146 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>HomeScreenBinding: Class Members</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+ <td id="projectalign" style="padding-left: 0.5em;">
+ <div id="projectname">HomeScreenBinding
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.13 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+$(function() {
+ initMenu('',true,false,'search.php','Search');
+ $(document).ready(function() { init_search(); });
+});
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+ onmouseover="return searchBox.OnSearchSelectShow()"
+ onmouseout="return searchBox.OnSearchSelectHide()"
+ onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0"
+ name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div class="contents">
+<div class="textblock">Here is a list of all class members with links to the classes they belong to:</div><ul>
+<li>api_list
+: <a class="el" href="de/dd0/class_lib_home_screen.html#a5593ff5ac78f6495ccb649904cf0ab08">LibHomeScreen</a>
+</li>
+<li>call()
+: <a class="el" href="de/dd0/class_lib_home_screen.html#a527b49dcfe581be6275d0eb2236ba37f">LibHomeScreen</a>
+</li>
+<li>event
+: <a class="el" href="df/d7d/structevent.html#a58726ebc551d36562ac3f9e1fe293214">event</a>
+</li>
+<li>event_list
+: <a class="el" href="de/dd0/class_lib_home_screen.html#a6a6d8a4d33a006a08652e7377a4c29e9">LibHomeScreen</a>
+</li>
+<li>Event_OnScreenMessage
+: <a class="el" href="de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154aea56fa32a124a8ddcbea127755280a1d">LibHomeScreen</a>
+</li>
+<li>Event_OnScreenReply
+: <a class="el" href="de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154acae91db4efc2394fd701f581d277a3fd">LibHomeScreen</a>
+</li>
+<li>Event_TapShortcut
+: <a class="el" href="de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154a4b0a82d501e4db5fbfe25c254c92896f">LibHomeScreen</a>
+</li>
+<li>EventType
+: <a class="el" href="de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154">LibHomeScreen</a>
+</li>
+<li>handler_func
+: <a class="el" href="de/dd0/class_lib_home_screen.html#a334f11f81c84c98d18284215dcaada3a">LibHomeScreen</a>
+</li>
+<li>init()
+: <a class="el" href="de/dd0/class_lib_home_screen.html#a6a57b573cc767725762ba9beab032220">LibHomeScreen</a>
+</li>
+<li>LibHomeScreen()
+: <a class="el" href="de/dd0/class_lib_home_screen.html#a724bd949c4154fad041f96a15ef0f5dc">LibHomeScreen</a>
+</li>
+<li>name
+: <a class="el" href="df/d7d/structevent.html#a45c6cfb7961a21a3366db067e4cc59ab">event</a>
+</li>
+<li>on_call()
+: <a class="el" href="de/dd0/class_lib_home_screen.html#a608638eb87b2772a3dcc92d8ca8f3596">LibHomeScreen</a>
+</li>
+<li>on_event()
+: <a class="el" href="de/dd0/class_lib_home_screen.html#a9c4885b51b43ab24a548d49fb3ab2de3">LibHomeScreen</a>
+</li>
+<li>on_hangup()
+: <a class="el" href="de/dd0/class_lib_home_screen.html#ab1c1fa69f24b981e824dd9fb810c4b74">LibHomeScreen</a>
+</li>
+<li>on_reply()
+: <a class="el" href="de/dd0/class_lib_home_screen.html#a248d9648c6186287a7632ec1c75fc9c5">LibHomeScreen</a>
+</li>
+<li>onScreenMessage()
+: <a class="el" href="de/dd0/class_lib_home_screen.html#ac336482036a72b51a822725f1929523c">LibHomeScreen</a>
+</li>
+<li>onScreenReply()
+: <a class="el" href="de/dd0/class_lib_home_screen.html#a6c065f41f2c5d1f58d2763bfb4da9c37">LibHomeScreen</a>
+</li>
+<li>operator=()
+: <a class="el" href="de/dd0/class_lib_home_screen.html#a23bc17798453cfca50904562736f6b25">LibHomeScreen</a>
+</li>
+<li>registerCallback()
+: <a class="el" href="de/dd0/class_lib_home_screen.html#a2789e8a5372202cc36f48e71dbb9b7cf">LibHomeScreen</a>
+</li>
+<li>set_event_handler()
+: <a class="el" href="de/dd0/class_lib_home_screen.html#ab1b0e08bf35415de9064afed899e9f85">LibHomeScreen</a>
+</li>
+<li>subscribe()
+: <a class="el" href="de/dd0/class_lib_home_screen.html#aa4c189807b75d070f567967f0d690738">LibHomeScreen</a>
+</li>
+<li>tapShortcut()
+: <a class="el" href="de/dd0/class_lib_home_screen.html#afb571c9577087b47065eb23e7fdbc903">LibHomeScreen</a>
+</li>
+<li>unsubscribe()
+: <a class="el" href="de/dd0/class_lib_home_screen.html#aac03a45cbd453ba69ddb00c1016930a6">LibHomeScreen</a>
+</li>
+<li>~LibHomeScreen()
+: <a class="el" href="de/dd0/class_lib_home_screen.html#a249902aebf71a5383ca8ec6ae558d095">LibHomeScreen</a>
+</li>
+</ul>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/>
+</a> 1.8.13
+</small></address>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/functions_enum.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/functions_enum.html
new file mode 100644
index 0000000..77795ff
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/functions_enum.html
@@ -0,0 +1,74 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>HomeScreenBinding: Class Members - Enumerations</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+ <td id="projectalign" style="padding-left: 0.5em;">
+ <div id="projectname">HomeScreenBinding
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.13 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+$(function() {
+ initMenu('',true,false,'search.php','Search');
+ $(document).ready(function() { init_search(); });
+});
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+ onmouseover="return searchBox.OnSearchSelectShow()"
+ onmouseout="return searchBox.OnSearchSelectHide()"
+ onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0"
+ name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div class="contents">
+&#160;<ul>
+<li>EventType
+: <a class="el" href="de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154">LibHomeScreen</a>
+</li>
+</ul>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/>
+</a> 1.8.13
+</small></address>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/functions_eval.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/functions_eval.html
new file mode 100644
index 0000000..9cbcc1b
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/functions_eval.html
@@ -0,0 +1,80 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>HomeScreenBinding: Class Members - Enumerator</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+ <td id="projectalign" style="padding-left: 0.5em;">
+ <div id="projectname">HomeScreenBinding
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.13 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+$(function() {
+ initMenu('',true,false,'search.php','Search');
+ $(document).ready(function() { init_search(); });
+});
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+ onmouseover="return searchBox.OnSearchSelectShow()"
+ onmouseout="return searchBox.OnSearchSelectHide()"
+ onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0"
+ name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div class="contents">
+&#160;<ul>
+<li>Event_OnScreenMessage
+: <a class="el" href="de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154aea56fa32a124a8ddcbea127755280a1d">LibHomeScreen</a>
+</li>
+<li>Event_OnScreenReply
+: <a class="el" href="de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154acae91db4efc2394fd701f581d277a3fd">LibHomeScreen</a>
+</li>
+<li>Event_TapShortcut
+: <a class="el" href="de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154a4b0a82d501e4db5fbfe25c254c92896f">LibHomeScreen</a>
+</li>
+</ul>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/>
+</a> 1.8.13
+</small></address>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/functions_func.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/functions_func.html
new file mode 100644
index 0000000..500e2d4
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/functions_func.html
@@ -0,0 +1,119 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>HomeScreenBinding: Class Members - Functions</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+ <td id="projectalign" style="padding-left: 0.5em;">
+ <div id="projectname">HomeScreenBinding
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.13 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+$(function() {
+ initMenu('',true,false,'search.php','Search');
+ $(document).ready(function() { init_search(); });
+});
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+ onmouseover="return searchBox.OnSearchSelectShow()"
+ onmouseout="return searchBox.OnSearchSelectHide()"
+ onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0"
+ name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div class="contents">
+&#160;<ul>
+<li>call()
+: <a class="el" href="de/dd0/class_lib_home_screen.html#a527b49dcfe581be6275d0eb2236ba37f">LibHomeScreen</a>
+</li>
+<li>init()
+: <a class="el" href="de/dd0/class_lib_home_screen.html#a6a57b573cc767725762ba9beab032220">LibHomeScreen</a>
+</li>
+<li>LibHomeScreen()
+: <a class="el" href="de/dd0/class_lib_home_screen.html#a724bd949c4154fad041f96a15ef0f5dc">LibHomeScreen</a>
+</li>
+<li>on_call()
+: <a class="el" href="de/dd0/class_lib_home_screen.html#a608638eb87b2772a3dcc92d8ca8f3596">LibHomeScreen</a>
+</li>
+<li>on_event()
+: <a class="el" href="de/dd0/class_lib_home_screen.html#a9c4885b51b43ab24a548d49fb3ab2de3">LibHomeScreen</a>
+</li>
+<li>on_hangup()
+: <a class="el" href="de/dd0/class_lib_home_screen.html#ab1c1fa69f24b981e824dd9fb810c4b74">LibHomeScreen</a>
+</li>
+<li>on_reply()
+: <a class="el" href="de/dd0/class_lib_home_screen.html#a248d9648c6186287a7632ec1c75fc9c5">LibHomeScreen</a>
+</li>
+<li>onScreenMessage()
+: <a class="el" href="de/dd0/class_lib_home_screen.html#ac336482036a72b51a822725f1929523c">LibHomeScreen</a>
+</li>
+<li>onScreenReply()
+: <a class="el" href="de/dd0/class_lib_home_screen.html#a6c065f41f2c5d1f58d2763bfb4da9c37">LibHomeScreen</a>
+</li>
+<li>operator=()
+: <a class="el" href="de/dd0/class_lib_home_screen.html#a23bc17798453cfca50904562736f6b25">LibHomeScreen</a>
+</li>
+<li>registerCallback()
+: <a class="el" href="de/dd0/class_lib_home_screen.html#a2789e8a5372202cc36f48e71dbb9b7cf">LibHomeScreen</a>
+</li>
+<li>set_event_handler()
+: <a class="el" href="de/dd0/class_lib_home_screen.html#ab1b0e08bf35415de9064afed899e9f85">LibHomeScreen</a>
+</li>
+<li>subscribe()
+: <a class="el" href="de/dd0/class_lib_home_screen.html#aa4c189807b75d070f567967f0d690738">LibHomeScreen</a>
+</li>
+<li>tapShortcut()
+: <a class="el" href="de/dd0/class_lib_home_screen.html#afb571c9577087b47065eb23e7fdbc903">LibHomeScreen</a>
+</li>
+<li>unsubscribe()
+: <a class="el" href="de/dd0/class_lib_home_screen.html#aac03a45cbd453ba69ddb00c1016930a6">LibHomeScreen</a>
+</li>
+<li>~LibHomeScreen()
+: <a class="el" href="de/dd0/class_lib_home_screen.html#a249902aebf71a5383ca8ec6ae558d095">LibHomeScreen</a>
+</li>
+</ul>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/>
+</a> 1.8.13
+</small></address>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/functions_type.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/functions_type.html
new file mode 100644
index 0000000..f9914d4
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/functions_type.html
@@ -0,0 +1,74 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>HomeScreenBinding: Class Members - Typedefs</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+ <td id="projectalign" style="padding-left: 0.5em;">
+ <div id="projectname">HomeScreenBinding
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.13 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+$(function() {
+ initMenu('',true,false,'search.php','Search');
+ $(document).ready(function() { init_search(); });
+});
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+ onmouseover="return searchBox.OnSearchSelectShow()"
+ onmouseout="return searchBox.OnSearchSelectHide()"
+ onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0"
+ name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div class="contents">
+&#160;<ul>
+<li>handler_func
+: <a class="el" href="de/dd0/class_lib_home_screen.html#a334f11f81c84c98d18284215dcaada3a">LibHomeScreen</a>
+</li>
+</ul>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/>
+</a> 1.8.13
+</small></address>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/functions_vars.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/functions_vars.html
new file mode 100644
index 0000000..8926b79
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/functions_vars.html
@@ -0,0 +1,83 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>HomeScreenBinding: Class Members - Variables</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+ <td id="projectalign" style="padding-left: 0.5em;">
+ <div id="projectname">HomeScreenBinding
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.13 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+$(function() {
+ initMenu('',true,false,'search.php','Search');
+ $(document).ready(function() { init_search(); });
+});
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+ onmouseover="return searchBox.OnSearchSelectShow()"
+ onmouseout="return searchBox.OnSearchSelectHide()"
+ onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0"
+ name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div class="contents">
+&#160;<ul>
+<li>api_list
+: <a class="el" href="de/dd0/class_lib_home_screen.html#a5593ff5ac78f6495ccb649904cf0ab08">LibHomeScreen</a>
+</li>
+<li>event
+: <a class="el" href="df/d7d/structevent.html#a58726ebc551d36562ac3f9e1fe293214">event</a>
+</li>
+<li>event_list
+: <a class="el" href="de/dd0/class_lib_home_screen.html#a6a6d8a4d33a006a08652e7377a4c29e9">LibHomeScreen</a>
+</li>
+<li>name
+: <a class="el" href="df/d7d/structevent.html#a45c6cfb7961a21a3366db067e4cc59ab">event</a>
+</li>
+</ul>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/>
+</a> 1.8.13
+</small></address>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/globals.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/globals.html
new file mode 100644
index 0000000..1498f7c
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/globals.html
@@ -0,0 +1,343 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>HomeScreenBinding: File Members</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+ <td id="projectalign" style="padding-left: 0.5em;">
+ <div id="projectname">HomeScreenBinding
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.13 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+$(function() {
+ initMenu('',true,false,'search.php','Search');
+ $(document).ready(function() { init_search(); });
+});
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+ onmouseover="return searchBox.OnSearchSelectShow()"
+ onmouseout="return searchBox.OnSearchSelectHide()"
+ onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0"
+ name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div class="contents">
+<div class="textblock">Here is a list of all file members with links to the files they belong to:</div>
+
+<h3><a id="index__"></a>- _ -</h3><ul>
+<li>_application_name
+: <a class="el" href="d0/d1e/homescreen_8c.html#a1f2c79fa6801b63751e270d67994fe81">homescreen.c</a>
+</li>
+<li>_display_message
+: <a class="el" href="d0/d1e/homescreen_8c.html#abfd6c1d6f316fa952b11553f8f275e92">homescreen.c</a>
+</li>
+<li>_error
+: <a class="el" href="d0/d1e/homescreen_8c.html#aed1c5296a2e6d34945507a0fca17a376">homescreen.c</a>
+</li>
+<li>_GNU_SOURCE
+: <a class="el" href="d0/d1e/homescreen_8c.html#a369266c24eacffb87046522897a570d5">homescreen.c</a>
+</li>
+<li>_HMI_LOG()
+: <a class="el" href="df/d76/hmi-debug_8h.html#a0846b9d51e2e0612c4825a9a581aa40a">hmi-debug.h</a>
+</li>
+<li>_on_call_static()
+: <a class="el" href="d0/d8a/libhomescreen_8cpp.html#a782a05fde0f1c17e0c4c8f972a3f53c8">libhomescreen.cpp</a>
+</li>
+<li>_on_event_static()
+: <a class="el" href="d0/d8a/libhomescreen_8cpp.html#a3df86185aa9453726556da201d95a6f9">libhomescreen.cpp</a>
+</li>
+<li>_on_hangup_static()
+: <a class="el" href="d0/d8a/libhomescreen_8cpp.html#a73c05b96c151e5e46c28585ccb143c1c">libhomescreen.cpp</a>
+</li>
+<li>_on_reply_static()
+: <a class="el" href="d0/d8a/libhomescreen_8cpp.html#a7778933bffa862c63fa0a1b8219faa8b">libhomescreen.cpp</a>
+</li>
+<li>_reply_message
+: <a class="el" href="d0/d1e/homescreen_8c.html#a79b0f0b481161527ccb80e83da143219">homescreen.c</a>
+</li>
+</ul>
+
+
+<h3><a id="index_a"></a>- a -</h3><ul>
+<li>AFB_BINDING_VERSION
+: <a class="el" href="d0/d1e/homescreen_8c.html#ad2c1fbc92ba364fcf83f15e6d0af66f0">homescreen.c</a>
+, <a class="el" href="d3/d3d/hs-helper_8h.html#ad2c1fbc92ba364fcf83f15e6d0af66f0">hs-helper.h</a>
+</li>
+<li>afbBindingV2
+: <a class="el" href="d0/d1e/homescreen_8c.html#ae2a62ab481a2922cbfc788193857a12e">homescreen.c</a>
+</li>
+<li>API
+: <a class="el" href="d0/d8a/libhomescreen_8cpp.html#a1e2d6e77dd8f0162f830058579eab42f">libhomescreen.cpp</a>
+</li>
+</ul>
+
+
+<h3><a id="index_c"></a>- c -</h3><ul>
+<li>call_test()
+: <a class="el" href="df/dac/test_8cpp.html#aa9b3c43c212b49edee82ac30a11aa255">test.cpp</a>
+</li>
+<li>COMMAND_EVENT_NUM
+: <a class="el" href="d0/d1e/homescreen_8c.html#a09f43d9e7e1c5d2198c0d66024b4500e">homescreen.c</a>
+</li>
+</ul>
+
+
+<h3><a id="index_e"></a>- e -</h3><ul>
+<li>ERROR_FLAG
+: <a class="el" href="df/d76/hmi-debug_8h.html#a13d4c7647aad2e84766f8b48a6caab09">hmi-debug.h</a>
+</li>
+<li>ev_on_screen_message
+: <a class="el" href="d0/d1e/homescreen_8c.html#af7cfc4f688bb898c09291252c4cb832c">homescreen.c</a>
+</li>
+<li>ev_on_screen_reply
+: <a class="el" href="d0/d1e/homescreen_8c.html#a5c225341e0ecbae0585302ef754a55ec">homescreen.c</a>
+</li>
+<li>ev_reserved
+: <a class="el" href="d0/d1e/homescreen_8c.html#a25fbdcc4e5787e3f41d99f4a71e86611">homescreen.c</a>
+</li>
+<li>ev_tap_shortcut
+: <a class="el" href="d0/d1e/homescreen_8c.html#a2af1ff5a4cbf03125e61e903832035f5">homescreen.c</a>
+</li>
+<li>event_list
+: <a class="el" href="d0/d1e/homescreen_8c.html#a1c3c5bfa861dcb58d9e9d216d893864c">homescreen.c</a>
+</li>
+<li>event_loop_run()
+: <a class="el" href="d0/d8a/libhomescreen_8cpp.html#aa73353e1bf62c68b6b0aba7a1e4e275e">libhomescreen.cpp</a>
+</li>
+<li>EVENT_SUBSCRIBE_ERROR_CODE
+: <a class="el" href="d0/d1e/homescreen_8c.html#a9a68ed04201d9390bb85b2c6ab1d7250">homescreen.c</a>
+</li>
+<li>evlist
+: <a class="el" href="d3/d3d/hs-helper_8h.html#a0cd84b1a2184c9b84d1b7bf24582f28e">hs-helper.h</a>
+</li>
+</ul>
+
+
+<h3><a id="index_g"></a>- g -</h3><ul>
+<li>get_value_int16()
+: <a class="el" href="dd/d1d/hs-helper_8c.html#a2e62366684e39ea94436bf017e416827">hs-helper.c</a>
+, <a class="el" href="d3/d3d/hs-helper_8h.html#a2e62366684e39ea94436bf017e416827">hs-helper.h</a>
+</li>
+<li>get_value_int32()
+: <a class="el" href="d3/d3d/hs-helper_8h.html#ac5b0370643c520377afd3fd4891918d2">hs-helper.h</a>
+, <a class="el" href="dd/d1d/hs-helper_8c.html#ac5b0370643c520377afd3fd4891918d2">hs-helper.c</a>
+</li>
+<li>get_value_uint16()
+: <a class="el" href="d3/d3d/hs-helper_8h.html#a649900645417f2df3a70b9ad67529f53">hs-helper.h</a>
+, <a class="el" href="dd/d1d/hs-helper_8c.html#a649900645417f2df3a70b9ad67529f53">hs-helper.c</a>
+</li>
+</ul>
+
+
+<h3><a id="index_h"></a>- h -</h3><ul>
+<li>has_verb()
+: <a class="el" href="d0/d8a/libhomescreen_8cpp.html#a7a2176c3d71fec0f09dcb2aa0866b17e">libhomescreen.cpp</a>
+</li>
+<li>HMI_DEBUG
+: <a class="el" href="df/d76/hmi-debug_8h.html#a0d26d8b8201011dade787236519711c0">hmi-debug.h</a>
+</li>
+<li>HMI_ERROR
+: <a class="el" href="df/d76/hmi-debug_8h.html#a65bb6c7cfe38f8a724beab5059d36fb2">hmi-debug.h</a>
+</li>
+<li>HMI_INFO
+: <a class="el" href="df/d76/hmi-debug_8h.html#a11b249a67108f0f4c50a0fc8a3eb4f5c">hmi-debug.h</a>
+</li>
+<li>HMI_NOTICE
+: <a class="el" href="df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">hmi-debug.h</a>
+</li>
+<li>HMI_WARNING
+: <a class="el" href="df/d76/hmi-debug_8h.html#a25361812432cd2480bc8f1a8e56ecbf7">hmi-debug.h</a>
+</li>
+<li>hs
+: <a class="el" href="df/dac/test_8cpp.html#a529acbd1fed9d98a587edfa62309fa8d">test.cpp</a>
+</li>
+<li>hs_add_object_to_json_object()
+: <a class="el" href="dd/d1d/hs-helper_8c.html#a1ba31a6a94515ff1730ba0043a67d59e">hs-helper.c</a>
+, <a class="el" href="d3/d3d/hs-helper_8h.html#a1ba31a6a94515ff1730ba0043a67d59e">hs-helper.h</a>
+</li>
+<li>hs_add_object_to_json_object_func()
+: <a class="el" href="dd/d1d/hs-helper_8c.html#ae83604a37134e7bdee3ce4f10bb0b47a">hs-helper.c</a>
+, <a class="el" href="d3/d3d/hs-helper_8h.html#ae83604a37134e7bdee3ce4f10bb0b47a">hs-helper.h</a>
+</li>
+<li>hs_add_object_to_json_object_str()
+: <a class="el" href="d3/d3d/hs-helper_8h.html#a8777c53f1d4d5412f19b134ad85ffedf">hs-helper.h</a>
+, <a class="el" href="dd/d1d/hs-helper_8c.html#a8777c53f1d4d5412f19b134ad85ffedf">hs-helper.c</a>
+</li>
+<li>hs_search_event_name_index()
+: <a class="el" href="dd/d1d/hs-helper_8c.html#a2ff1b894941c3b461ca8119079c4146a">hs-helper.c</a>
+, <a class="el" href="d3/d3d/hs-helper_8h.html#a2ff1b894941c3b461ca8119079c4146a">hs-helper.h</a>
+</li>
+</ul>
+
+
+<h3><a id="index_i"></a>- i -</h3><ul>
+<li>init()
+: <a class="el" href="d0/d1e/homescreen_8c.html#a00cbbc0f3f4452db078ae511684a6adc">homescreen.c</a>
+</li>
+</ul>
+
+
+<h3><a id="index_l"></a>- l -</h3><ul>
+<li>LOG_LEVEL
+: <a class="el" href="df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583">hmi-debug.h</a>
+</li>
+<li>LOG_LEVEL_DEBUG
+: <a class="el" href="df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a538b2b6e011479d408ecd2be0f6d6177">hmi-debug.h</a>
+</li>
+<li>LOG_LEVEL_ERROR
+: <a class="el" href="df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a5b40f003febbc3b535649d63f4b8a44f">hmi-debug.h</a>
+</li>
+<li>LOG_LEVEL_INFO
+: <a class="el" href="df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583aedee1e3159bfe7d918b6e29873c5aee4">hmi-debug.h</a>
+</li>
+<li>LOG_LEVEL_MAX
+: <a class="el" href="df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a0459003454bc8bb17752e6d8e5787444">hmi-debug.h</a>
+</li>
+<li>LOG_LEVEL_NONE
+: <a class="el" href="df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a69dacb1837e1e37c6ed34cc2ee1d8848">hmi-debug.h</a>
+</li>
+<li>LOG_LEVEL_NOTICE
+: <a class="el" href="df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a23ae4d711a7bbb3900240cb7316b4b4e">hmi-debug.h</a>
+</li>
+<li>LOG_LEVEL_WARNING
+: <a class="el" href="df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a5b4dd81b4dc7eefbc55ba03415c627ef">hmi-debug.h</a>
+</li>
+</ul>
+
+
+<h3><a id="index_m"></a>- m -</h3><ul>
+<li>main()
+: <a class="el" href="df/dac/test_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">test.cpp</a>
+</li>
+</ul>
+
+
+<h3><a id="index_n"></a>- n -</h3><ul>
+<li>NOT_NUMBER
+: <a class="el" href="d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899aa223eed65c9bee2bf1f4cdecaf90d66a">hs-helper.h</a>
+</li>
+</ul>
+
+
+<h3><a id="index_o"></a>- o -</h3><ul>
+<li>on_screen_message()
+: <a class="el" href="d0/d1e/homescreen_8c.html#a640cf8ed97d804c5ed1c09a349056338">homescreen.c</a>
+</li>
+<li>on_screen_reply()
+: <a class="el" href="d0/d1e/homescreen_8c.html#a2f380055d7d69828115d2a8951634933">homescreen.c</a>
+</li>
+<li>onEv()
+: <a class="el" href="df/dac/test_8cpp.html#a6a2874c419fe5936fcccadc7e6cf268e">test.cpp</a>
+</li>
+<li>onevent()
+: <a class="el" href="d0/d1e/homescreen_8c.html#a1279893c0fe937311a81e0a98fb4cf1c">homescreen.c</a>
+</li>
+<li>onRep()
+: <a class="el" href="df/dac/test_8cpp.html#a6d3cb4886e7afd45bd56b49800da932d">test.cpp</a>
+</li>
+<li>OUT_RANGE
+: <a class="el" href="d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899add1c84bf80c5f80741ee8f37fef1e12b">hs-helper.h</a>
+</li>
+</ul>
+
+
+<h3><a id="index_p"></a>- p -</h3><ul>
+<li>pingSample()
+: <a class="el" href="d0/d1e/homescreen_8c.html#af48cab759d4ae0ddbfcdd60f4051ba05">homescreen.c</a>
+</li>
+<li>preinit()
+: <a class="el" href="d0/d1e/homescreen_8c.html#a83d646edf54a6a082f69121bc89a08de">homescreen.c</a>
+</li>
+</ul>
+
+
+<h3><a id="index_r"></a>- r -</h3><ul>
+<li>REQ_ERROR
+: <a class="el" href="d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899">hs-helper.h</a>
+</li>
+<li>REQ_FAIL
+: <a class="el" href="d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899a96a855966bc63045222b3dcac524cee1">hs-helper.h</a>
+</li>
+<li>REQ_OK
+: <a class="el" href="d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899ab093abb14c097b3b7719debb04d5e8ee">hs-helper.h</a>
+</li>
+</ul>
+
+
+<h3><a id="index_s"></a>- s -</h3><ul>
+<li>split()
+: <a class="el" href="df/dac/test_8cpp.html#aafb7f182b8bb6ba92354dde1658d86a4">test.cpp</a>
+</li>
+<li>subscribe()
+: <a class="el" href="d0/d1e/homescreen_8c.html#a4ff0c8b506669e5622a6ee168134d8f1">homescreen.c</a>
+</li>
+</ul>
+
+
+<h3><a id="index_t"></a>- t -</h3><ul>
+<li>tap_shortcut()
+: <a class="el" href="d0/d1e/homescreen_8c.html#a096eae5c8f297f9df142a406eea56227">homescreen.c</a>
+</li>
+</ul>
+
+
+<h3><a id="index_u"></a>- u -</h3><ul>
+<li>unsubscribe()
+: <a class="el" href="d0/d1e/homescreen_8c.html#ab92621255d7370c6dd8a0f1a8e376ad3">homescreen.c</a>
+</li>
+<li>usage()
+: <a class="el" href="df/dac/test_8cpp.html#a64a6014565bb3e03294ec4a952d5add0">test.cpp</a>
+</li>
+</ul>
+
+
+<h3><a id="index_v"></a>- v -</h3><ul>
+<li>verbs
+: <a class="el" href="d0/d1e/homescreen_8c.html#acad6dadf60fac3d701e488e4fcd11c89">homescreen.c</a>
+</li>
+</ul>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/>
+</a> 1.8.13
+</small></address>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/globals_defs.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/globals_defs.html
new file mode 100644
index 0000000..24c615c
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/globals_defs.html
@@ -0,0 +1,99 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>HomeScreenBinding: File Members</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+ <td id="projectalign" style="padding-left: 0.5em;">
+ <div id="projectname">HomeScreenBinding
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.13 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+$(function() {
+ initMenu('',true,false,'search.php','Search');
+ $(document).ready(function() { init_search(); });
+});
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+ onmouseover="return searchBox.OnSearchSelectShow()"
+ onmouseout="return searchBox.OnSearchSelectHide()"
+ onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0"
+ name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div class="contents">
+&#160;<ul>
+<li>_GNU_SOURCE
+: <a class="el" href="d0/d1e/homescreen_8c.html#a369266c24eacffb87046522897a570d5">homescreen.c</a>
+</li>
+<li>AFB_BINDING_VERSION
+: <a class="el" href="d0/d1e/homescreen_8c.html#ad2c1fbc92ba364fcf83f15e6d0af66f0">homescreen.c</a>
+, <a class="el" href="d3/d3d/hs-helper_8h.html#ad2c1fbc92ba364fcf83f15e6d0af66f0">hs-helper.h</a>
+</li>
+<li>COMMAND_EVENT_NUM
+: <a class="el" href="d0/d1e/homescreen_8c.html#a09f43d9e7e1c5d2198c0d66024b4500e">homescreen.c</a>
+</li>
+<li>EVENT_SUBSCRIBE_ERROR_CODE
+: <a class="el" href="d0/d1e/homescreen_8c.html#a9a68ed04201d9390bb85b2c6ab1d7250">homescreen.c</a>
+</li>
+<li>HMI_DEBUG
+: <a class="el" href="df/d76/hmi-debug_8h.html#a0d26d8b8201011dade787236519711c0">hmi-debug.h</a>
+</li>
+<li>HMI_ERROR
+: <a class="el" href="df/d76/hmi-debug_8h.html#a65bb6c7cfe38f8a724beab5059d36fb2">hmi-debug.h</a>
+</li>
+<li>HMI_INFO
+: <a class="el" href="df/d76/hmi-debug_8h.html#a11b249a67108f0f4c50a0fc8a3eb4f5c">hmi-debug.h</a>
+</li>
+<li>HMI_NOTICE
+: <a class="el" href="df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">hmi-debug.h</a>
+</li>
+<li>HMI_WARNING
+: <a class="el" href="df/d76/hmi-debug_8h.html#a25361812432cd2480bc8f1a8e56ecbf7">hmi-debug.h</a>
+</li>
+</ul>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/>
+</a> 1.8.13
+</small></address>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/globals_enum.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/globals_enum.html
new file mode 100644
index 0000000..6acaf5d
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/globals_enum.html
@@ -0,0 +1,77 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>HomeScreenBinding: File Members</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+ <td id="projectalign" style="padding-left: 0.5em;">
+ <div id="projectname">HomeScreenBinding
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.13 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+$(function() {
+ initMenu('',true,false,'search.php','Search');
+ $(document).ready(function() { init_search(); });
+});
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+ onmouseover="return searchBox.OnSearchSelectShow()"
+ onmouseout="return searchBox.OnSearchSelectHide()"
+ onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0"
+ name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div class="contents">
+&#160;<ul>
+<li>LOG_LEVEL
+: <a class="el" href="df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583">hmi-debug.h</a>
+</li>
+<li>REQ_ERROR
+: <a class="el" href="d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899">hs-helper.h</a>
+</li>
+</ul>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/>
+</a> 1.8.13
+</small></address>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/globals_eval.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/globals_eval.html
new file mode 100644
index 0000000..6619ccf
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/globals_eval.html
@@ -0,0 +1,104 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>HomeScreenBinding: File Members</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+ <td id="projectalign" style="padding-left: 0.5em;">
+ <div id="projectname">HomeScreenBinding
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.13 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+$(function() {
+ initMenu('',true,false,'search.php','Search');
+ $(document).ready(function() { init_search(); });
+});
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+ onmouseover="return searchBox.OnSearchSelectShow()"
+ onmouseout="return searchBox.OnSearchSelectHide()"
+ onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0"
+ name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div class="contents">
+&#160;<ul>
+<li>LOG_LEVEL_DEBUG
+: <a class="el" href="df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a538b2b6e011479d408ecd2be0f6d6177">hmi-debug.h</a>
+</li>
+<li>LOG_LEVEL_ERROR
+: <a class="el" href="df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a5b40f003febbc3b535649d63f4b8a44f">hmi-debug.h</a>
+</li>
+<li>LOG_LEVEL_INFO
+: <a class="el" href="df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583aedee1e3159bfe7d918b6e29873c5aee4">hmi-debug.h</a>
+</li>
+<li>LOG_LEVEL_MAX
+: <a class="el" href="df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a0459003454bc8bb17752e6d8e5787444">hmi-debug.h</a>
+</li>
+<li>LOG_LEVEL_NONE
+: <a class="el" href="df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a69dacb1837e1e37c6ed34cc2ee1d8848">hmi-debug.h</a>
+</li>
+<li>LOG_LEVEL_NOTICE
+: <a class="el" href="df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a23ae4d711a7bbb3900240cb7316b4b4e">hmi-debug.h</a>
+</li>
+<li>LOG_LEVEL_WARNING
+: <a class="el" href="df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a5b4dd81b4dc7eefbc55ba03415c627ef">hmi-debug.h</a>
+</li>
+<li>NOT_NUMBER
+: <a class="el" href="d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899aa223eed65c9bee2bf1f4cdecaf90d66a">hs-helper.h</a>
+</li>
+<li>OUT_RANGE
+: <a class="el" href="d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899add1c84bf80c5f80741ee8f37fef1e12b">hs-helper.h</a>
+</li>
+<li>REQ_FAIL
+: <a class="el" href="d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899a96a855966bc63045222b3dcac524cee1">hs-helper.h</a>
+</li>
+<li>REQ_OK
+: <a class="el" href="d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899ab093abb14c097b3b7719debb04d5e8ee">hs-helper.h</a>
+</li>
+</ul>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/>
+</a> 1.8.13
+</small></address>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/globals_func.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/globals_func.html
new file mode 100644
index 0000000..3d662e8
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/globals_func.html
@@ -0,0 +1,211 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>HomeScreenBinding: File Members</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+ <td id="projectalign" style="padding-left: 0.5em;">
+ <div id="projectname">HomeScreenBinding
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.13 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+$(function() {
+ initMenu('',true,false,'search.php','Search');
+ $(document).ready(function() { init_search(); });
+});
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+ onmouseover="return searchBox.OnSearchSelectShow()"
+ onmouseout="return searchBox.OnSearchSelectHide()"
+ onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0"
+ name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div class="contents">
+&#160;
+
+<h3><a id="index__"></a>- _ -</h3><ul>
+<li>_HMI_LOG()
+: <a class="el" href="df/d76/hmi-debug_8h.html#a0846b9d51e2e0612c4825a9a581aa40a">hmi-debug.h</a>
+</li>
+<li>_on_call_static()
+: <a class="el" href="d0/d8a/libhomescreen_8cpp.html#a782a05fde0f1c17e0c4c8f972a3f53c8">libhomescreen.cpp</a>
+</li>
+<li>_on_event_static()
+: <a class="el" href="d0/d8a/libhomescreen_8cpp.html#a3df86185aa9453726556da201d95a6f9">libhomescreen.cpp</a>
+</li>
+<li>_on_hangup_static()
+: <a class="el" href="d0/d8a/libhomescreen_8cpp.html#a73c05b96c151e5e46c28585ccb143c1c">libhomescreen.cpp</a>
+</li>
+<li>_on_reply_static()
+: <a class="el" href="d0/d8a/libhomescreen_8cpp.html#a7778933bffa862c63fa0a1b8219faa8b">libhomescreen.cpp</a>
+</li>
+</ul>
+
+
+<h3><a id="index_c"></a>- c -</h3><ul>
+<li>call_test()
+: <a class="el" href="df/dac/test_8cpp.html#aa9b3c43c212b49edee82ac30a11aa255">test.cpp</a>
+</li>
+</ul>
+
+
+<h3><a id="index_e"></a>- e -</h3><ul>
+<li>event_loop_run()
+: <a class="el" href="d0/d8a/libhomescreen_8cpp.html#aa73353e1bf62c68b6b0aba7a1e4e275e">libhomescreen.cpp</a>
+</li>
+</ul>
+
+
+<h3><a id="index_g"></a>- g -</h3><ul>
+<li>get_value_int16()
+: <a class="el" href="dd/d1d/hs-helper_8c.html#a2e62366684e39ea94436bf017e416827">hs-helper.c</a>
+, <a class="el" href="d3/d3d/hs-helper_8h.html#a2e62366684e39ea94436bf017e416827">hs-helper.h</a>
+</li>
+<li>get_value_int32()
+: <a class="el" href="dd/d1d/hs-helper_8c.html#ac5b0370643c520377afd3fd4891918d2">hs-helper.c</a>
+, <a class="el" href="d3/d3d/hs-helper_8h.html#ac5b0370643c520377afd3fd4891918d2">hs-helper.h</a>
+</li>
+<li>get_value_uint16()
+: <a class="el" href="dd/d1d/hs-helper_8c.html#a649900645417f2df3a70b9ad67529f53">hs-helper.c</a>
+, <a class="el" href="d3/d3d/hs-helper_8h.html#a649900645417f2df3a70b9ad67529f53">hs-helper.h</a>
+</li>
+</ul>
+
+
+<h3><a id="index_h"></a>- h -</h3><ul>
+<li>has_verb()
+: <a class="el" href="d0/d8a/libhomescreen_8cpp.html#a7a2176c3d71fec0f09dcb2aa0866b17e">libhomescreen.cpp</a>
+</li>
+<li>hs_add_object_to_json_object()
+: <a class="el" href="dd/d1d/hs-helper_8c.html#a1ba31a6a94515ff1730ba0043a67d59e">hs-helper.c</a>
+, <a class="el" href="d3/d3d/hs-helper_8h.html#a1ba31a6a94515ff1730ba0043a67d59e">hs-helper.h</a>
+</li>
+<li>hs_add_object_to_json_object_func()
+: <a class="el" href="dd/d1d/hs-helper_8c.html#ae83604a37134e7bdee3ce4f10bb0b47a">hs-helper.c</a>
+, <a class="el" href="d3/d3d/hs-helper_8h.html#ae83604a37134e7bdee3ce4f10bb0b47a">hs-helper.h</a>
+</li>
+<li>hs_add_object_to_json_object_str()
+: <a class="el" href="dd/d1d/hs-helper_8c.html#a8777c53f1d4d5412f19b134ad85ffedf">hs-helper.c</a>
+, <a class="el" href="d3/d3d/hs-helper_8h.html#a8777c53f1d4d5412f19b134ad85ffedf">hs-helper.h</a>
+</li>
+<li>hs_search_event_name_index()
+: <a class="el" href="dd/d1d/hs-helper_8c.html#a2ff1b894941c3b461ca8119079c4146a">hs-helper.c</a>
+, <a class="el" href="d3/d3d/hs-helper_8h.html#a2ff1b894941c3b461ca8119079c4146a">hs-helper.h</a>
+</li>
+</ul>
+
+
+<h3><a id="index_i"></a>- i -</h3><ul>
+<li>init()
+: <a class="el" href="d0/d1e/homescreen_8c.html#a00cbbc0f3f4452db078ae511684a6adc">homescreen.c</a>
+</li>
+</ul>
+
+
+<h3><a id="index_m"></a>- m -</h3><ul>
+<li>main()
+: <a class="el" href="df/dac/test_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">test.cpp</a>
+</li>
+</ul>
+
+
+<h3><a id="index_o"></a>- o -</h3><ul>
+<li>on_screen_message()
+: <a class="el" href="d0/d1e/homescreen_8c.html#a640cf8ed97d804c5ed1c09a349056338">homescreen.c</a>
+</li>
+<li>on_screen_reply()
+: <a class="el" href="d0/d1e/homescreen_8c.html#a2f380055d7d69828115d2a8951634933">homescreen.c</a>
+</li>
+<li>onEv()
+: <a class="el" href="df/dac/test_8cpp.html#a6a2874c419fe5936fcccadc7e6cf268e">test.cpp</a>
+</li>
+<li>onevent()
+: <a class="el" href="d0/d1e/homescreen_8c.html#a1279893c0fe937311a81e0a98fb4cf1c">homescreen.c</a>
+</li>
+<li>onRep()
+: <a class="el" href="df/dac/test_8cpp.html#a6d3cb4886e7afd45bd56b49800da932d">test.cpp</a>
+</li>
+</ul>
+
+
+<h3><a id="index_p"></a>- p -</h3><ul>
+<li>pingSample()
+: <a class="el" href="d0/d1e/homescreen_8c.html#af48cab759d4ae0ddbfcdd60f4051ba05">homescreen.c</a>
+</li>
+<li>preinit()
+: <a class="el" href="d0/d1e/homescreen_8c.html#a83d646edf54a6a082f69121bc89a08de">homescreen.c</a>
+</li>
+</ul>
+
+
+<h3><a id="index_s"></a>- s -</h3><ul>
+<li>split()
+: <a class="el" href="df/dac/test_8cpp.html#aafb7f182b8bb6ba92354dde1658d86a4">test.cpp</a>
+</li>
+<li>subscribe()
+: <a class="el" href="d0/d1e/homescreen_8c.html#a4ff0c8b506669e5622a6ee168134d8f1">homescreen.c</a>
+</li>
+</ul>
+
+
+<h3><a id="index_t"></a>- t -</h3><ul>
+<li>tap_shortcut()
+: <a class="el" href="d0/d1e/homescreen_8c.html#a096eae5c8f297f9df142a406eea56227">homescreen.c</a>
+</li>
+</ul>
+
+
+<h3><a id="index_u"></a>- u -</h3><ul>
+<li>unsubscribe()
+: <a class="el" href="d0/d1e/homescreen_8c.html#ab92621255d7370c6dd8a0f1a8e376ad3">homescreen.c</a>
+</li>
+<li>usage()
+: <a class="el" href="df/dac/test_8cpp.html#a64a6014565bb3e03294ec4a952d5add0">test.cpp</a>
+</li>
+</ul>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/>
+</a> 1.8.13
+</small></address>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/globals_type.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/globals_type.html
new file mode 100644
index 0000000..e873bff
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/globals_type.html
@@ -0,0 +1,74 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>HomeScreenBinding: File Members</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+ <td id="projectalign" style="padding-left: 0.5em;">
+ <div id="projectname">HomeScreenBinding
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.13 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+$(function() {
+ initMenu('',true,false,'search.php','Search');
+ $(document).ready(function() { init_search(); });
+});
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+ onmouseover="return searchBox.OnSearchSelectShow()"
+ onmouseout="return searchBox.OnSearchSelectHide()"
+ onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0"
+ name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div class="contents">
+&#160;<ul>
+<li>REQ_ERROR
+: <a class="el" href="d3/d3d/hs-helper_8h.html#ab0d62ccfa9c3ab87f090f67c3d50adce">hs-helper.h</a>
+</li>
+</ul>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/>
+</a> 1.8.13
+</small></address>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/globals_vars.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/globals_vars.html
new file mode 100644
index 0000000..364ae73
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/globals_vars.html
@@ -0,0 +1,116 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>HomeScreenBinding: File Members</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+ <td id="projectalign" style="padding-left: 0.5em;">
+ <div id="projectname">HomeScreenBinding
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.13 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+$(function() {
+ initMenu('',true,false,'search.php','Search');
+ $(document).ready(function() { init_search(); });
+});
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+ onmouseover="return searchBox.OnSearchSelectShow()"
+ onmouseout="return searchBox.OnSearchSelectHide()"
+ onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0"
+ name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div class="contents">
+&#160;<ul>
+<li>_application_name
+: <a class="el" href="d0/d1e/homescreen_8c.html#a1f2c79fa6801b63751e270d67994fe81">homescreen.c</a>
+</li>
+<li>_display_message
+: <a class="el" href="d0/d1e/homescreen_8c.html#abfd6c1d6f316fa952b11553f8f275e92">homescreen.c</a>
+</li>
+<li>_error
+: <a class="el" href="d0/d1e/homescreen_8c.html#aed1c5296a2e6d34945507a0fca17a376">homescreen.c</a>
+</li>
+<li>_reply_message
+: <a class="el" href="d0/d1e/homescreen_8c.html#a79b0f0b481161527ccb80e83da143219">homescreen.c</a>
+</li>
+<li>afbBindingV2
+: <a class="el" href="d0/d1e/homescreen_8c.html#ae2a62ab481a2922cbfc788193857a12e">homescreen.c</a>
+</li>
+<li>API
+: <a class="el" href="d0/d8a/libhomescreen_8cpp.html#a1e2d6e77dd8f0162f830058579eab42f">libhomescreen.cpp</a>
+</li>
+<li>ERROR_FLAG
+: <a class="el" href="df/d76/hmi-debug_8h.html#a13d4c7647aad2e84766f8b48a6caab09">hmi-debug.h</a>
+</li>
+<li>ev_on_screen_message
+: <a class="el" href="d0/d1e/homescreen_8c.html#af7cfc4f688bb898c09291252c4cb832c">homescreen.c</a>
+</li>
+<li>ev_on_screen_reply
+: <a class="el" href="d0/d1e/homescreen_8c.html#a5c225341e0ecbae0585302ef754a55ec">homescreen.c</a>
+</li>
+<li>ev_reserved
+: <a class="el" href="d0/d1e/homescreen_8c.html#a25fbdcc4e5787e3f41d99f4a71e86611">homescreen.c</a>
+</li>
+<li>ev_tap_shortcut
+: <a class="el" href="d0/d1e/homescreen_8c.html#a2af1ff5a4cbf03125e61e903832035f5">homescreen.c</a>
+</li>
+<li>event_list
+: <a class="el" href="d0/d1e/homescreen_8c.html#a1c3c5bfa861dcb58d9e9d216d893864c">homescreen.c</a>
+</li>
+<li>evlist
+: <a class="el" href="d3/d3d/hs-helper_8h.html#a0cd84b1a2184c9b84d1b7bf24582f28e">hs-helper.h</a>
+</li>
+<li>hs
+: <a class="el" href="df/dac/test_8cpp.html#a529acbd1fed9d98a587edfa62309fa8d">test.cpp</a>
+</li>
+<li>verbs
+: <a class="el" href="d0/d1e/homescreen_8c.html#acad6dadf60fac3d701e488e4fcd11c89">homescreen.c</a>
+</li>
+</ul>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/>
+</a> 1.8.13
+</small></address>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/index.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/index.html
new file mode 100644
index 0000000..9766905
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/index.html
@@ -0,0 +1,73 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>HomeScreenBinding: Main Page</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+ <td id="projectalign" style="padding-left: 0.5em;">
+ <div id="projectname">HomeScreenBinding
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.13 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+$(function() {
+ initMenu('',true,false,'search.php','Search');
+ $(document).ready(function() { init_search(); });
+});
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+ onmouseover="return searchBox.OnSearchSelectShow()"
+ onmouseout="return searchBox.OnSearchSelectHide()"
+ onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0"
+ name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div class="header">
+ <div class="headertitle">
+<div class="title">HomeScreenBinding Documentation</div> </div>
+</div><!--header-->
+<div class="contents">
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/>
+</a> 1.8.13
+</small></address>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/jquery.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/jquery.js
new file mode 100644
index 0000000..f5343ed
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/jquery.js
@@ -0,0 +1,87 @@
+/*!
+ * jQuery JavaScript Library v1.7.1
+ * http://jquery.com/
+ *
+ * Copyright 2011, John Resig
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ * Copyright 2011, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ *
+ * Date: Mon Nov 21 21:11:03 2011 -0500
+ */
+(function(bb,L){var av=bb.document,bu=bb.navigator,bl=bb.location;var b=(function(){var bF=function(b0,b1){return new bF.fn.init(b0,b1,bD)},bU=bb.jQuery,bH=bb.$,bD,bY=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,bM=/\S/,bI=/^\s+/,bE=/\s+$/,bA=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,bN=/^[\],:{}\s]*$/,bW=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,bP=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,bJ=/(?:^|:|,)(?:\s*\[)+/g,by=/(webkit)[ \/]([\w.]+)/,bR=/(opera)(?:.*version)?[ \/]([\w.]+)/,bQ=/(msie) ([\w.]+)/,bS=/(mozilla)(?:.*? rv:([\w.]+))?/,bB=/-([a-z]|[0-9])/ig,bZ=/^-ms-/,bT=function(b0,b1){return(b1+"").toUpperCase()},bX=bu.userAgent,bV,bC,e,bL=Object.prototype.toString,bG=Object.prototype.hasOwnProperty,bz=Array.prototype.push,bK=Array.prototype.slice,bO=String.prototype.trim,bv=Array.prototype.indexOf,bx={};bF.fn=bF.prototype={constructor:bF,init:function(b0,b4,b3){var b2,b5,b1,b6;if(!b0){return this}if(b0.nodeType){this.context=this[0]=b0;this.length=1;return this}if(b0==="body"&&!b4&&av.body){this.context=av;this[0]=av.body;this.selector=b0;this.length=1;return this}if(typeof b0==="string"){if(b0.charAt(0)==="<"&&b0.charAt(b0.length-1)===">"&&b0.length>=3){b2=[null,b0,null]}else{b2=bY.exec(b0)}if(b2&&(b2[1]||!b4)){if(b2[1]){b4=b4 instanceof bF?b4[0]:b4;b6=(b4?b4.ownerDocument||b4:av);b1=bA.exec(b0);if(b1){if(bF.isPlainObject(b4)){b0=[av.createElement(b1[1])];bF.fn.attr.call(b0,b4,true)}else{b0=[b6.createElement(b1[1])]}}else{b1=bF.buildFragment([b2[1]],[b6]);b0=(b1.cacheable?bF.clone(b1.fragment):b1.fragment).childNodes}return bF.merge(this,b0)}else{b5=av.getElementById(b2[2]);if(b5&&b5.parentNode){if(b5.id!==b2[2]){return b3.find(b0)}this.length=1;this[0]=b5}this.context=av;this.selector=b0;return this}}else{if(!b4||b4.jquery){return(b4||b3).find(b0)}else{return this.constructor(b4).find(b0)}}}else{if(bF.isFunction(b0)){return b3.ready(b0)}}if(b0.selector!==L){this.selector=b0.selector;this.context=b0.context}return bF.makeArray(b0,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return bK.call(this,0)},get:function(b0){return b0==null?this.toArray():(b0<0?this[this.length+b0]:this[b0])},pushStack:function(b1,b3,b0){var b2=this.constructor();if(bF.isArray(b1)){bz.apply(b2,b1)}else{bF.merge(b2,b1)}b2.prevObject=this;b2.context=this.context;if(b3==="find"){b2.selector=this.selector+(this.selector?" ":"")+b0}else{if(b3){b2.selector=this.selector+"."+b3+"("+b0+")"}}return b2},each:function(b1,b0){return bF.each(this,b1,b0)},ready:function(b0){bF.bindReady();bC.add(b0);return this},eq:function(b0){b0=+b0;return b0===-1?this.slice(b0):this.slice(b0,b0+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(bK.apply(this,arguments),"slice",bK.call(arguments).join(","))},map:function(b0){return this.pushStack(bF.map(this,function(b2,b1){return b0.call(b2,b1,b2)}))},end:function(){return this.prevObject||this.constructor(null)},push:bz,sort:[].sort,splice:[].splice};bF.fn.init.prototype=bF.fn;bF.extend=bF.fn.extend=function(){var b9,b2,b0,b1,b6,b7,b5=arguments[0]||{},b4=1,b3=arguments.length,b8=false;if(typeof b5==="boolean"){b8=b5;b5=arguments[1]||{};b4=2}if(typeof b5!=="object"&&!bF.isFunction(b5)){b5={}}if(b3===b4){b5=this;--b4}for(;b4<b3;b4++){if((b9=arguments[b4])!=null){for(b2 in b9){b0=b5[b2];b1=b9[b2];if(b5===b1){continue}if(b8&&b1&&(bF.isPlainObject(b1)||(b6=bF.isArray(b1)))){if(b6){b6=false;b7=b0&&bF.isArray(b0)?b0:[]}else{b7=b0&&bF.isPlainObject(b0)?b0:{}}b5[b2]=bF.extend(b8,b7,b1)}else{if(b1!==L){b5[b2]=b1}}}}}return b5};bF.extend({noConflict:function(b0){if(bb.$===bF){bb.$=bH}if(b0&&bb.jQuery===bF){bb.jQuery=bU}return bF},isReady:false,readyWait:1,holdReady:function(b0){if(b0){bF.readyWait++}else{bF.ready(true)}},ready:function(b0){if((b0===true&&!--bF.readyWait)||(b0!==true&&!bF.isReady)){if(!av.body){return setTimeout(bF.ready,1)}bF.isReady=true;if(b0!==true&&--bF.readyWait>0){return}bC.fireWith(av,[bF]);if(bF.fn.trigger){bF(av).trigger("ready").off("ready")}}},bindReady:function(){if(bC){return}bC=bF.Callbacks("once memory");if(av.readyState==="complete"){return setTimeout(bF.ready,1)}if(av.addEventListener){av.addEventListener("DOMContentLoaded",e,false);bb.addEventListener("load",bF.ready,false)}else{if(av.attachEvent){av.attachEvent("onreadystatechange",e);bb.attachEvent("onload",bF.ready);var b0=false;try{b0=bb.frameElement==null}catch(b1){}if(av.documentElement.doScroll&&b0){bw()}}}},isFunction:function(b0){return bF.type(b0)==="function"},isArray:Array.isArray||function(b0){return bF.type(b0)==="array"},isWindow:function(b0){return b0&&typeof b0==="object"&&"setInterval" in b0},isNumeric:function(b0){return !isNaN(parseFloat(b0))&&isFinite(b0)},type:function(b0){return b0==null?String(b0):bx[bL.call(b0)]||"object"},isPlainObject:function(b2){if(!b2||bF.type(b2)!=="object"||b2.nodeType||bF.isWindow(b2)){return false}try{if(b2.constructor&&!bG.call(b2,"constructor")&&!bG.call(b2.constructor.prototype,"isPrototypeOf")){return false}}catch(b1){return false}var b0;for(b0 in b2){}return b0===L||bG.call(b2,b0)},isEmptyObject:function(b1){for(var b0 in b1){return false}return true},error:function(b0){throw new Error(b0)},parseJSON:function(b0){if(typeof b0!=="string"||!b0){return null}b0=bF.trim(b0);if(bb.JSON&&bb.JSON.parse){return bb.JSON.parse(b0)}if(bN.test(b0.replace(bW,"@").replace(bP,"]").replace(bJ,""))){return(new Function("return "+b0))()}bF.error("Invalid JSON: "+b0)},parseXML:function(b2){var b0,b1;try{if(bb.DOMParser){b1=new DOMParser();b0=b1.parseFromString(b2,"text/xml")}else{b0=new ActiveXObject("Microsoft.XMLDOM");b0.async="false";b0.loadXML(b2)}}catch(b3){b0=L}if(!b0||!b0.documentElement||b0.getElementsByTagName("parsererror").length){bF.error("Invalid XML: "+b2)}return b0},noop:function(){},globalEval:function(b0){if(b0&&bM.test(b0)){(bb.execScript||function(b1){bb["eval"].call(bb,b1)})(b0)}},camelCase:function(b0){return b0.replace(bZ,"ms-").replace(bB,bT)},nodeName:function(b1,b0){return b1.nodeName&&b1.nodeName.toUpperCase()===b0.toUpperCase()},each:function(b3,b6,b2){var b1,b4=0,b5=b3.length,b0=b5===L||bF.isFunction(b3);if(b2){if(b0){for(b1 in b3){if(b6.apply(b3[b1],b2)===false){break}}}else{for(;b4<b5;){if(b6.apply(b3[b4++],b2)===false){break}}}}else{if(b0){for(b1 in b3){if(b6.call(b3[b1],b1,b3[b1])===false){break}}}else{for(;b4<b5;){if(b6.call(b3[b4],b4,b3[b4++])===false){break}}}}return b3},trim:bO?function(b0){return b0==null?"":bO.call(b0)}:function(b0){return b0==null?"":b0.toString().replace(bI,"").replace(bE,"")},makeArray:function(b3,b1){var b0=b1||[];if(b3!=null){var b2=bF.type(b3);if(b3.length==null||b2==="string"||b2==="function"||b2==="regexp"||bF.isWindow(b3)){bz.call(b0,b3)}else{bF.merge(b0,b3)}}return b0},inArray:function(b2,b3,b1){var b0;if(b3){if(bv){return bv.call(b3,b2,b1)}b0=b3.length;b1=b1?b1<0?Math.max(0,b0+b1):b1:0;for(;b1<b0;b1++){if(b1 in b3&&b3[b1]===b2){return b1}}}return -1},merge:function(b4,b2){var b3=b4.length,b1=0;if(typeof b2.length==="number"){for(var b0=b2.length;b1<b0;b1++){b4[b3++]=b2[b1]}}else{while(b2[b1]!==L){b4[b3++]=b2[b1++]}}b4.length=b3;return b4},grep:function(b1,b6,b0){var b2=[],b5;b0=!!b0;for(var b3=0,b4=b1.length;b3<b4;b3++){b5=!!b6(b1[b3],b3);if(b0!==b5){b2.push(b1[b3])}}return b2},map:function(b0,b7,b8){var b5,b6,b4=[],b2=0,b1=b0.length,b3=b0 instanceof bF||b1!==L&&typeof b1==="number"&&((b1>0&&b0[0]&&b0[b1-1])||b1===0||bF.isArray(b0));if(b3){for(;b2<b1;b2++){b5=b7(b0[b2],b2,b8);if(b5!=null){b4[b4.length]=b5}}}else{for(b6 in b0){b5=b7(b0[b6],b6,b8);if(b5!=null){b4[b4.length]=b5}}}return b4.concat.apply([],b4)},guid:1,proxy:function(b4,b3){if(typeof b3==="string"){var b2=b4[b3];b3=b4;b4=b2}if(!bF.isFunction(b4)){return L}var b0=bK.call(arguments,2),b1=function(){return b4.apply(b3,b0.concat(bK.call(arguments)))};b1.guid=b4.guid=b4.guid||b1.guid||bF.guid++;return b1},access:function(b0,b8,b6,b2,b5,b7){var b1=b0.length;if(typeof b8==="object"){for(var b3 in b8){bF.access(b0,b3,b8[b3],b2,b5,b6)}return b0}if(b6!==L){b2=!b7&&b2&&bF.isFunction(b6);for(var b4=0;b4<b1;b4++){b5(b0[b4],b8,b2?b6.call(b0[b4],b4,b5(b0[b4],b8)):b6,b7)}return b0}return b1?b5(b0[0],b8):L},now:function(){return(new Date()).getTime()},uaMatch:function(b1){b1=b1.toLowerCase();var b0=by.exec(b1)||bR.exec(b1)||bQ.exec(b1)||b1.indexOf("compatible")<0&&bS.exec(b1)||[];return{browser:b0[1]||"",version:b0[2]||"0"}},sub:function(){function b0(b3,b4){return new b0.fn.init(b3,b4)}bF.extend(true,b0,this);b0.superclass=this;b0.fn=b0.prototype=this();b0.fn.constructor=b0;b0.sub=this.sub;b0.fn.init=function b2(b3,b4){if(b4&&b4 instanceof bF&&!(b4 instanceof b0)){b4=b0(b4)}return bF.fn.init.call(this,b3,b4,b1)};b0.fn.init.prototype=b0.fn;var b1=b0(av);return b0},browser:{}});bF.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(b1,b0){bx["[object "+b0+"]"]=b0.toLowerCase()});bV=bF.uaMatch(bX);if(bV.browser){bF.browser[bV.browser]=true;bF.browser.version=bV.version}if(bF.browser.webkit){bF.browser.safari=true}if(bM.test("\xA0")){bI=/^[\s\xA0]+/;bE=/[\s\xA0]+$/}bD=bF(av);if(av.addEventListener){e=function(){av.removeEventListener("DOMContentLoaded",e,false);bF.ready()}}else{if(av.attachEvent){e=function(){if(av.readyState==="complete"){av.detachEvent("onreadystatechange",e);bF.ready()}}}}function bw(){if(bF.isReady){return}try{av.documentElement.doScroll("left")}catch(b0){setTimeout(bw,1);return}bF.ready()}return bF})();var a2={};function X(e){var bv=a2[e]={},bw,bx;e=e.split(/\s+/);for(bw=0,bx=e.length;bw<bx;bw++){bv[e[bw]]=true}return bv}b.Callbacks=function(bw){bw=bw?(a2[bw]||X(bw)):{};var bB=[],bC=[],bx,by,bv,bz,bA,bE=function(bF){var bG,bJ,bI,bH,bK;for(bG=0,bJ=bF.length;bG<bJ;bG++){bI=bF[bG];bH=b.type(bI);if(bH==="array"){bE(bI)}else{if(bH==="function"){if(!bw.unique||!bD.has(bI)){bB.push(bI)}}}}},e=function(bG,bF){bF=bF||[];bx=!bw.memory||[bG,bF];by=true;bA=bv||0;bv=0;bz=bB.length;for(;bB&&bA<bz;bA++){if(bB[bA].apply(bG,bF)===false&&bw.stopOnFalse){bx=true;break}}by=false;if(bB){if(!bw.once){if(bC&&bC.length){bx=bC.shift();bD.fireWith(bx[0],bx[1])}}else{if(bx===true){bD.disable()}else{bB=[]}}}},bD={add:function(){if(bB){var bF=bB.length;bE(arguments);if(by){bz=bB.length}else{if(bx&&bx!==true){bv=bF;e(bx[0],bx[1])}}}return this},remove:function(){if(bB){var bF=arguments,bH=0,bI=bF.length;for(;bH<bI;bH++){for(var bG=0;bG<bB.length;bG++){if(bF[bH]===bB[bG]){if(by){if(bG<=bz){bz--;if(bG<=bA){bA--}}}bB.splice(bG--,1);if(bw.unique){break}}}}}return this},has:function(bG){if(bB){var bF=0,bH=bB.length;for(;bF<bH;bF++){if(bG===bB[bF]){return true}}}return false},empty:function(){bB=[];return this},disable:function(){bB=bC=bx=L;return this},disabled:function(){return !bB},lock:function(){bC=L;if(!bx||bx===true){bD.disable()}return this},locked:function(){return !bC},fireWith:function(bG,bF){if(bC){if(by){if(!bw.once){bC.push([bG,bF])}}else{if(!(bw.once&&bx)){e(bG,bF)}}}return this},fire:function(){bD.fireWith(this,arguments);return this},fired:function(){return !!bx}};return bD};var aJ=[].slice;b.extend({Deferred:function(by){var bx=b.Callbacks("once memory"),bw=b.Callbacks("once memory"),bv=b.Callbacks("memory"),e="pending",bA={resolve:bx,reject:bw,notify:bv},bC={done:bx.add,fail:bw.add,progress:bv.add,state:function(){return e},isResolved:bx.fired,isRejected:bw.fired,then:function(bE,bD,bF){bB.done(bE).fail(bD).progress(bF);return this},always:function(){bB.done.apply(bB,arguments).fail.apply(bB,arguments);return this},pipe:function(bF,bE,bD){return b.Deferred(function(bG){b.each({done:[bF,"resolve"],fail:[bE,"reject"],progress:[bD,"notify"]},function(bI,bL){var bH=bL[0],bK=bL[1],bJ;if(b.isFunction(bH)){bB[bI](function(){bJ=bH.apply(this,arguments);if(bJ&&b.isFunction(bJ.promise)){bJ.promise().then(bG.resolve,bG.reject,bG.notify)}else{bG[bK+"With"](this===bB?bG:this,[bJ])}})}else{bB[bI](bG[bK])}})}).promise()},promise:function(bE){if(bE==null){bE=bC}else{for(var bD in bC){bE[bD]=bC[bD]}}return bE}},bB=bC.promise({}),bz;for(bz in bA){bB[bz]=bA[bz].fire;bB[bz+"With"]=bA[bz].fireWith}bB.done(function(){e="resolved"},bw.disable,bv.lock).fail(function(){e="rejected"},bx.disable,bv.lock);if(by){by.call(bB,bB)}return bB},when:function(bA){var bx=aJ.call(arguments,0),bv=0,e=bx.length,bB=new Array(e),bw=e,by=e,bC=e<=1&&bA&&b.isFunction(bA.promise)?bA:b.Deferred(),bE=bC.promise();function bD(bF){return function(bG){bx[bF]=arguments.length>1?aJ.call(arguments,0):bG;if(!(--bw)){bC.resolveWith(bC,bx)}}}function bz(bF){return function(bG){bB[bF]=arguments.length>1?aJ.call(arguments,0):bG;bC.notifyWith(bE,bB)}}if(e>1){for(;bv<e;bv++){if(bx[bv]&&bx[bv].promise&&b.isFunction(bx[bv].promise)){bx[bv].promise().then(bD(bv),bC.reject,bz(bv))}else{--bw}}if(!bw){bC.resolveWith(bC,bx)}}else{if(bC!==bA){bC.resolveWith(bC,e?[bA]:[])}}return bE}});b.support=(function(){var bJ,bI,bF,bG,bx,bE,bA,bD,bz,bK,bB,by,bw,bv=av.createElement("div"),bH=av.documentElement;bv.setAttribute("className","t");bv.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>";bI=bv.getElementsByTagName("*");bF=bv.getElementsByTagName("a")[0];if(!bI||!bI.length||!bF){return{}}bG=av.createElement("select");bx=bG.appendChild(av.createElement("option"));bE=bv.getElementsByTagName("input")[0];bJ={leadingWhitespace:(bv.firstChild.nodeType===3),tbody:!bv.getElementsByTagName("tbody").length,htmlSerialize:!!bv.getElementsByTagName("link").length,style:/top/.test(bF.getAttribute("style")),hrefNormalized:(bF.getAttribute("href")==="/a"),opacity:/^0.55/.test(bF.style.opacity),cssFloat:!!bF.style.cssFloat,checkOn:(bE.value==="on"),optSelected:bx.selected,getSetAttribute:bv.className!=="t",enctype:!!av.createElement("form").enctype,html5Clone:av.createElement("nav").cloneNode(true).outerHTML!=="<:nav></:nav>",submitBubbles:true,changeBubbles:true,focusinBubbles:false,deleteExpando:true,noCloneEvent:true,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableMarginRight:true};bE.checked=true;bJ.noCloneChecked=bE.cloneNode(true).checked;bG.disabled=true;bJ.optDisabled=!bx.disabled;try{delete bv.test}catch(bC){bJ.deleteExpando=false}if(!bv.addEventListener&&bv.attachEvent&&bv.fireEvent){bv.attachEvent("onclick",function(){bJ.noCloneEvent=false});bv.cloneNode(true).fireEvent("onclick")}bE=av.createElement("input");bE.value="t";bE.setAttribute("type","radio");bJ.radioValue=bE.value==="t";bE.setAttribute("checked","checked");bv.appendChild(bE);bD=av.createDocumentFragment();bD.appendChild(bv.lastChild);bJ.checkClone=bD.cloneNode(true).cloneNode(true).lastChild.checked;bJ.appendChecked=bE.checked;bD.removeChild(bE);bD.appendChild(bv);bv.innerHTML="";if(bb.getComputedStyle){bA=av.createElement("div");bA.style.width="0";bA.style.marginRight="0";bv.style.width="2px";bv.appendChild(bA);bJ.reliableMarginRight=(parseInt((bb.getComputedStyle(bA,null)||{marginRight:0}).marginRight,10)||0)===0}if(bv.attachEvent){for(by in {submit:1,change:1,focusin:1}){bB="on"+by;bw=(bB in bv);if(!bw){bv.setAttribute(bB,"return;");bw=(typeof bv[bB]==="function")}bJ[by+"Bubbles"]=bw}}bD.removeChild(bv);bD=bG=bx=bA=bv=bE=null;b(function(){var bM,bU,bV,bT,bN,bO,bL,bS,bR,e,bP,bQ=av.getElementsByTagName("body")[0];if(!bQ){return}bL=1;bS="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;";bR="visibility:hidden;border:0;";e="style='"+bS+"border:5px solid #000;padding:0;'";bP="<div "+e+"><div></div></div><table "+e+" cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";bM=av.createElement("div");bM.style.cssText=bR+"width:0;height:0;position:static;top:0;margin-top:"+bL+"px";bQ.insertBefore(bM,bQ.firstChild);bv=av.createElement("div");bM.appendChild(bv);bv.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";bz=bv.getElementsByTagName("td");bw=(bz[0].offsetHeight===0);bz[0].style.display="";bz[1].style.display="none";bJ.reliableHiddenOffsets=bw&&(bz[0].offsetHeight===0);bv.innerHTML="";bv.style.width=bv.style.paddingLeft="1px";b.boxModel=bJ.boxModel=bv.offsetWidth===2;if(typeof bv.style.zoom!=="undefined"){bv.style.display="inline";bv.style.zoom=1;bJ.inlineBlockNeedsLayout=(bv.offsetWidth===2);bv.style.display="";bv.innerHTML="<div style='width:4px;'></div>";bJ.shrinkWrapBlocks=(bv.offsetWidth!==2)}bv.style.cssText=bS+bR;bv.innerHTML=bP;bU=bv.firstChild;bV=bU.firstChild;bN=bU.nextSibling.firstChild.firstChild;bO={doesNotAddBorder:(bV.offsetTop!==5),doesAddBorderForTableAndCells:(bN.offsetTop===5)};bV.style.position="fixed";bV.style.top="20px";bO.fixedPosition=(bV.offsetTop===20||bV.offsetTop===15);bV.style.position=bV.style.top="";bU.style.overflow="hidden";bU.style.position="relative";bO.subtractsBorderForOverflowNotVisible=(bV.offsetTop===-5);bO.doesNotIncludeMarginInBodyOffset=(bQ.offsetTop!==bL);bQ.removeChild(bM);bv=bM=null;b.extend(bJ,bO)});return bJ})();var aS=/^(?:\{.*\}|\[.*\])$/,aA=/([A-Z])/g;b.extend({cache:{},uuid:0,expando:"jQuery"+(b.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},hasData:function(e){e=e.nodeType?b.cache[e[b.expando]]:e[b.expando];return !!e&&!S(e)},data:function(bx,bv,bz,by){if(!b.acceptData(bx)){return}var bG,bA,bD,bE=b.expando,bC=typeof bv==="string",bF=bx.nodeType,e=bF?b.cache:bx,bw=bF?bx[bE]:bx[bE]&&bE,bB=bv==="events";if((!bw||!e[bw]||(!bB&&!by&&!e[bw].data))&&bC&&bz===L){return}if(!bw){if(bF){bx[bE]=bw=++b.uuid}else{bw=bE}}if(!e[bw]){e[bw]={};if(!bF){e[bw].toJSON=b.noop}}if(typeof bv==="object"||typeof bv==="function"){if(by){e[bw]=b.extend(e[bw],bv)}else{e[bw].data=b.extend(e[bw].data,bv)}}bG=bA=e[bw];if(!by){if(!bA.data){bA.data={}}bA=bA.data}if(bz!==L){bA[b.camelCase(bv)]=bz}if(bB&&!bA[bv]){return bG.events}if(bC){bD=bA[bv];if(bD==null){bD=bA[b.camelCase(bv)]}}else{bD=bA}return bD},removeData:function(bx,bv,by){if(!b.acceptData(bx)){return}var bB,bA,bz,bC=b.expando,bD=bx.nodeType,e=bD?b.cache:bx,bw=bD?bx[bC]:bC;if(!e[bw]){return}if(bv){bB=by?e[bw]:e[bw].data;if(bB){if(!b.isArray(bv)){if(bv in bB){bv=[bv]}else{bv=b.camelCase(bv);if(bv in bB){bv=[bv]}else{bv=bv.split(" ")}}}for(bA=0,bz=bv.length;bA<bz;bA++){delete bB[bv[bA]]}if(!(by?S:b.isEmptyObject)(bB)){return}}}if(!by){delete e[bw].data;if(!S(e[bw])){return}}if(b.support.deleteExpando||!e.setInterval){delete e[bw]}else{e[bw]=null}if(bD){if(b.support.deleteExpando){delete bx[bC]}else{if(bx.removeAttribute){bx.removeAttribute(bC)}else{bx[bC]=null}}}},_data:function(bv,e,bw){return b.data(bv,e,bw,true)},acceptData:function(bv){if(bv.nodeName){var e=b.noData[bv.nodeName.toLowerCase()];if(e){return !(e===true||bv.getAttribute("classid")!==e)}}return true}});b.fn.extend({data:function(by,bA){var bB,e,bw,bz=null;if(typeof by==="undefined"){if(this.length){bz=b.data(this[0]);if(this[0].nodeType===1&&!b._data(this[0],"parsedAttrs")){e=this[0].attributes;for(var bx=0,bv=e.length;bx<bv;bx++){bw=e[bx].name;if(bw.indexOf("data-")===0){bw=b.camelCase(bw.substring(5));a5(this[0],bw,bz[bw])}}b._data(this[0],"parsedAttrs",true)}}return bz}else{if(typeof by==="object"){return this.each(function(){b.data(this,by)})}}bB=by.split(".");bB[1]=bB[1]?"."+bB[1]:"";if(bA===L){bz=this.triggerHandler("getData"+bB[1]+"!",[bB[0]]);if(bz===L&&this.length){bz=b.data(this[0],by);bz=a5(this[0],by,bz)}return bz===L&&bB[1]?this.data(bB[0]):bz}else{return this.each(function(){var bC=b(this),bD=[bB[0],bA];bC.triggerHandler("setData"+bB[1]+"!",bD);b.data(this,by,bA);bC.triggerHandler("changeData"+bB[1]+"!",bD)})}},removeData:function(e){return this.each(function(){b.removeData(this,e)})}});function a5(bx,bw,by){if(by===L&&bx.nodeType===1){var bv="data-"+bw.replace(aA,"-$1").toLowerCase();by=bx.getAttribute(bv);if(typeof by==="string"){try{by=by==="true"?true:by==="false"?false:by==="null"?null:b.isNumeric(by)?parseFloat(by):aS.test(by)?b.parseJSON(by):by}catch(bz){}b.data(bx,bw,by)}else{by=L}}return by}function S(bv){for(var e in bv){if(e==="data"&&b.isEmptyObject(bv[e])){continue}if(e!=="toJSON"){return false}}return true}function bi(by,bx,bA){var bw=bx+"defer",bv=bx+"queue",e=bx+"mark",bz=b._data(by,bw);if(bz&&(bA==="queue"||!b._data(by,bv))&&(bA==="mark"||!b._data(by,e))){setTimeout(function(){if(!b._data(by,bv)&&!b._data(by,e)){b.removeData(by,bw,true);bz.fire()}},0)}}b.extend({_mark:function(bv,e){if(bv){e=(e||"fx")+"mark";b._data(bv,e,(b._data(bv,e)||0)+1)}},_unmark:function(by,bx,bv){if(by!==true){bv=bx;bx=by;by=false}if(bx){bv=bv||"fx";var e=bv+"mark",bw=by?0:((b._data(bx,e)||1)-1);if(bw){b._data(bx,e,bw)}else{b.removeData(bx,e,true);bi(bx,bv,"mark")}}},queue:function(bv,e,bx){var bw;if(bv){e=(e||"fx")+"queue";bw=b._data(bv,e);if(bx){if(!bw||b.isArray(bx)){bw=b._data(bv,e,b.makeArray(bx))}else{bw.push(bx)}}return bw||[]}},dequeue:function(by,bx){bx=bx||"fx";var bv=b.queue(by,bx),bw=bv.shift(),e={};if(bw==="inprogress"){bw=bv.shift()}if(bw){if(bx==="fx"){bv.unshift("inprogress")}b._data(by,bx+".run",e);bw.call(by,function(){b.dequeue(by,bx)},e)}if(!bv.length){b.removeData(by,bx+"queue "+bx+".run",true);bi(by,bx,"queue")}}});b.fn.extend({queue:function(e,bv){if(typeof e!=="string"){bv=e;e="fx"}if(bv===L){return b.queue(this[0],e)}return this.each(function(){var bw=b.queue(this,e,bv);if(e==="fx"&&bw[0]!=="inprogress"){b.dequeue(this,e)}})},dequeue:function(e){return this.each(function(){b.dequeue(this,e)})},delay:function(bv,e){bv=b.fx?b.fx.speeds[bv]||bv:bv;e=e||"fx";return this.queue(e,function(bx,bw){var by=setTimeout(bx,bv);bw.stop=function(){clearTimeout(by)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(bD,bw){if(typeof bD!=="string"){bw=bD;bD=L}bD=bD||"fx";var e=b.Deferred(),bv=this,by=bv.length,bB=1,bz=bD+"defer",bA=bD+"queue",bC=bD+"mark",bx;function bE(){if(!(--bB)){e.resolveWith(bv,[bv])}}while(by--){if((bx=b.data(bv[by],bz,L,true)||(b.data(bv[by],bA,L,true)||b.data(bv[by],bC,L,true))&&b.data(bv[by],bz,b.Callbacks("once memory"),true))){bB++;bx.add(bE)}}bE();return e.promise()}});var aP=/[\n\t\r]/g,af=/\s+/,aU=/\r/g,g=/^(?:button|input)$/i,D=/^(?:button|input|object|select|textarea)$/i,l=/^a(?:rea)?$/i,ao=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,F=b.support.getSetAttribute,be,aY,aF;b.fn.extend({attr:function(e,bv){return b.access(this,e,bv,true,b.attr)},removeAttr:function(e){return this.each(function(){b.removeAttr(this,e)})},prop:function(e,bv){return b.access(this,e,bv,true,b.prop)},removeProp:function(e){e=b.propFix[e]||e;return this.each(function(){try{this[e]=L;delete this[e]}catch(bv){}})},addClass:function(by){var bA,bw,bv,bx,bz,bB,e;if(b.isFunction(by)){return this.each(function(bC){b(this).addClass(by.call(this,bC,this.className))})}if(by&&typeof by==="string"){bA=by.split(af);for(bw=0,bv=this.length;bw<bv;bw++){bx=this[bw];if(bx.nodeType===1){if(!bx.className&&bA.length===1){bx.className=by}else{bz=" "+bx.className+" ";for(bB=0,e=bA.length;bB<e;bB++){if(!~bz.indexOf(" "+bA[bB]+" ")){bz+=bA[bB]+" "}}bx.className=b.trim(bz)}}}}return this},removeClass:function(bz){var bA,bw,bv,by,bx,bB,e;if(b.isFunction(bz)){return this.each(function(bC){b(this).removeClass(bz.call(this,bC,this.className))})}if((bz&&typeof bz==="string")||bz===L){bA=(bz||"").split(af);for(bw=0,bv=this.length;bw<bv;bw++){by=this[bw];if(by.nodeType===1&&by.className){if(bz){bx=(" "+by.className+" ").replace(aP," ");for(bB=0,e=bA.length;bB<e;bB++){bx=bx.replace(" "+bA[bB]+" "," ")}by.className=b.trim(bx)}else{by.className=""}}}}return this},toggleClass:function(bx,bv){var bw=typeof bx,e=typeof bv==="boolean";if(b.isFunction(bx)){return this.each(function(by){b(this).toggleClass(bx.call(this,by,this.className,bv),bv)})}return this.each(function(){if(bw==="string"){var bA,bz=0,by=b(this),bB=bv,bC=bx.split(af);while((bA=bC[bz++])){bB=e?bB:!by.hasClass(bA);by[bB?"addClass":"removeClass"](bA)}}else{if(bw==="undefined"||bw==="boolean"){if(this.className){b._data(this,"__className__",this.className)}this.className=this.className||bx===false?"":b._data(this,"__className__")||""}}})},hasClass:function(e){var bx=" "+e+" ",bw=0,bv=this.length;for(;bw<bv;bw++){if(this[bw].nodeType===1&&(" "+this[bw].className+" ").replace(aP," ").indexOf(bx)>-1){return true}}return false},val:function(bx){var e,bv,by,bw=this[0];if(!arguments.length){if(bw){e=b.valHooks[bw.nodeName.toLowerCase()]||b.valHooks[bw.type];if(e&&"get" in e&&(bv=e.get(bw,"value"))!==L){return bv}bv=bw.value;return typeof bv==="string"?bv.replace(aU,""):bv==null?"":bv}return}by=b.isFunction(bx);return this.each(function(bA){var bz=b(this),bB;if(this.nodeType!==1){return}if(by){bB=bx.call(this,bA,bz.val())}else{bB=bx}if(bB==null){bB=""}else{if(typeof bB==="number"){bB+=""}else{if(b.isArray(bB)){bB=b.map(bB,function(bC){return bC==null?"":bC+""})}}}e=b.valHooks[this.nodeName.toLowerCase()]||b.valHooks[this.type];if(!e||!("set" in e)||e.set(this,bB,"value")===L){this.value=bB}})}});b.extend({valHooks:{option:{get:function(e){var bv=e.attributes.value;return !bv||bv.specified?e.value:e.text}},select:{get:function(e){var bA,bv,bz,bx,by=e.selectedIndex,bB=[],bC=e.options,bw=e.type==="select-one";if(by<0){return null}bv=bw?by:0;bz=bw?by+1:bC.length;for(;bv<bz;bv++){bx=bC[bv];if(bx.selected&&(b.support.optDisabled?!bx.disabled:bx.getAttribute("disabled")===null)&&(!bx.parentNode.disabled||!b.nodeName(bx.parentNode,"optgroup"))){bA=b(bx).val();if(bw){return bA}bB.push(bA)}}if(bw&&!bB.length&&bC.length){return b(bC[by]).val()}return bB},set:function(bv,bw){var e=b.makeArray(bw);b(bv).find("option").each(function(){this.selected=b.inArray(b(this).val(),e)>=0});if(!e.length){bv.selectedIndex=-1}return e}}},attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(bA,bx,bB,bz){var bw,e,by,bv=bA.nodeType;if(!bA||bv===3||bv===8||bv===2){return}if(bz&&bx in b.attrFn){return b(bA)[bx](bB)}if(typeof bA.getAttribute==="undefined"){return b.prop(bA,bx,bB)}by=bv!==1||!b.isXMLDoc(bA);if(by){bx=bx.toLowerCase();e=b.attrHooks[bx]||(ao.test(bx)?aY:be)}if(bB!==L){if(bB===null){b.removeAttr(bA,bx);return}else{if(e&&"set" in e&&by&&(bw=e.set(bA,bB,bx))!==L){return bw}else{bA.setAttribute(bx,""+bB);return bB}}}else{if(e&&"get" in e&&by&&(bw=e.get(bA,bx))!==null){return bw}else{bw=bA.getAttribute(bx);return bw===null?L:bw}}},removeAttr:function(bx,bz){var by,bA,bv,e,bw=0;if(bz&&bx.nodeType===1){bA=bz.toLowerCase().split(af);e=bA.length;for(;bw<e;bw++){bv=bA[bw];if(bv){by=b.propFix[bv]||bv;b.attr(bx,bv,"");bx.removeAttribute(F?bv:by);if(ao.test(bv)&&by in bx){bx[by]=false}}}}},attrHooks:{type:{set:function(e,bv){if(g.test(e.nodeName)&&e.parentNode){b.error("type property can't be changed")}else{if(!b.support.radioValue&&bv==="radio"&&b.nodeName(e,"input")){var bw=e.value;e.setAttribute("type",bv);if(bw){e.value=bw}return bv}}}},value:{get:function(bv,e){if(be&&b.nodeName(bv,"button")){return be.get(bv,e)}return e in bv?bv.value:null},set:function(bv,bw,e){if(be&&b.nodeName(bv,"button")){return be.set(bv,bw,e)}bv.value=bw}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(bz,bx,bA){var bw,e,by,bv=bz.nodeType;if(!bz||bv===3||bv===8||bv===2){return}by=bv!==1||!b.isXMLDoc(bz);if(by){bx=b.propFix[bx]||bx;e=b.propHooks[bx]}if(bA!==L){if(e&&"set" in e&&(bw=e.set(bz,bA,bx))!==L){return bw}else{return(bz[bx]=bA)}}else{if(e&&"get" in e&&(bw=e.get(bz,bx))!==null){return bw}else{return bz[bx]}}},propHooks:{tabIndex:{get:function(bv){var e=bv.getAttributeNode("tabindex");return e&&e.specified?parseInt(e.value,10):D.test(bv.nodeName)||l.test(bv.nodeName)&&bv.href?0:L}}}});b.attrHooks.tabindex=b.propHooks.tabIndex;aY={get:function(bv,e){var bx,bw=b.prop(bv,e);return bw===true||typeof bw!=="boolean"&&(bx=bv.getAttributeNode(e))&&bx.nodeValue!==false?e.toLowerCase():L},set:function(bv,bx,e){var bw;if(bx===false){b.removeAttr(bv,e)}else{bw=b.propFix[e]||e;if(bw in bv){bv[bw]=true}bv.setAttribute(e,e.toLowerCase())}return e}};if(!F){aF={name:true,id:true};be=b.valHooks.button={get:function(bw,bv){var e;e=bw.getAttributeNode(bv);return e&&(aF[bv]?e.nodeValue!=="":e.specified)?e.nodeValue:L},set:function(bw,bx,bv){var e=bw.getAttributeNode(bv);if(!e){e=av.createAttribute(bv);bw.setAttributeNode(e)}return(e.nodeValue=bx+"")}};b.attrHooks.tabindex.set=be.set;b.each(["width","height"],function(bv,e){b.attrHooks[e]=b.extend(b.attrHooks[e],{set:function(bw,bx){if(bx===""){bw.setAttribute(e,"auto");return bx}}})});b.attrHooks.contenteditable={get:be.get,set:function(bv,bw,e){if(bw===""){bw="false"}be.set(bv,bw,e)}}}if(!b.support.hrefNormalized){b.each(["href","src","width","height"],function(bv,e){b.attrHooks[e]=b.extend(b.attrHooks[e],{get:function(bx){var bw=bx.getAttribute(e,2);return bw===null?L:bw}})})}if(!b.support.style){b.attrHooks.style={get:function(e){return e.style.cssText.toLowerCase()||L},set:function(e,bv){return(e.style.cssText=""+bv)}}}if(!b.support.optSelected){b.propHooks.selected=b.extend(b.propHooks.selected,{get:function(bv){var e=bv.parentNode;if(e){e.selectedIndex;if(e.parentNode){e.parentNode.selectedIndex}}return null}})}if(!b.support.enctype){b.propFix.enctype="encoding"}if(!b.support.checkOn){b.each(["radio","checkbox"],function(){b.valHooks[this]={get:function(e){return e.getAttribute("value")===null?"on":e.value}}})}b.each(["radio","checkbox"],function(){b.valHooks[this]=b.extend(b.valHooks[this],{set:function(e,bv){if(b.isArray(bv)){return(e.checked=b.inArray(b(e).val(),bv)>=0)}}})});var bd=/^(?:textarea|input|select)$/i,n=/^([^\.]*)?(?:\.(.+))?$/,J=/\bhover(\.\S+)?\b/,aO=/^key/,bf=/^(?:mouse|contextmenu)|click/,T=/^(?:focusinfocus|focusoutblur)$/,U=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,Y=function(e){var bv=U.exec(e);if(bv){bv[1]=(bv[1]||"").toLowerCase();bv[3]=bv[3]&&new RegExp("(?:^|\\s)"+bv[3]+"(?:\\s|$)")}return bv},j=function(bw,e){var bv=bw.attributes||{};return((!e[1]||bw.nodeName.toLowerCase()===e[1])&&(!e[2]||(bv.id||{}).value===e[2])&&(!e[3]||e[3].test((bv["class"]||{}).value)))},bt=function(e){return b.event.special.hover?e:e.replace(J,"mouseenter$1 mouseleave$1")};b.event={add:function(bx,bC,bJ,bA,by){var bD,bB,bK,bI,bH,bF,e,bG,bv,bz,bw,bE;if(bx.nodeType===3||bx.nodeType===8||!bC||!bJ||!(bD=b._data(bx))){return}if(bJ.handler){bv=bJ;bJ=bv.handler}if(!bJ.guid){bJ.guid=b.guid++}bK=bD.events;if(!bK){bD.events=bK={}}bB=bD.handle;if(!bB){bD.handle=bB=function(bL){return typeof b!=="undefined"&&(!bL||b.event.triggered!==bL.type)?b.event.dispatch.apply(bB.elem,arguments):L};bB.elem=bx}bC=b.trim(bt(bC)).split(" ");for(bI=0;bI<bC.length;bI++){bH=n.exec(bC[bI])||[];bF=bH[1];e=(bH[2]||"").split(".").sort();bE=b.event.special[bF]||{};bF=(by?bE.delegateType:bE.bindType)||bF;bE=b.event.special[bF]||{};bG=b.extend({type:bF,origType:bH[1],data:bA,handler:bJ,guid:bJ.guid,selector:by,quick:Y(by),namespace:e.join(".")},bv);bw=bK[bF];if(!bw){bw=bK[bF]=[];bw.delegateCount=0;if(!bE.setup||bE.setup.call(bx,bA,e,bB)===false){if(bx.addEventListener){bx.addEventListener(bF,bB,false)}else{if(bx.attachEvent){bx.attachEvent("on"+bF,bB)}}}}if(bE.add){bE.add.call(bx,bG);if(!bG.handler.guid){bG.handler.guid=bJ.guid}}if(by){bw.splice(bw.delegateCount++,0,bG)}else{bw.push(bG)}b.event.global[bF]=true}bx=null},global:{},remove:function(bJ,bE,bv,bH,bB){var bI=b.hasData(bJ)&&b._data(bJ),bF,bx,bz,bL,bC,bA,bG,bw,by,bK,bD,e;if(!bI||!(bw=bI.events)){return}bE=b.trim(bt(bE||"")).split(" ");for(bF=0;bF<bE.length;bF++){bx=n.exec(bE[bF])||[];bz=bL=bx[1];bC=bx[2];if(!bz){for(bz in bw){b.event.remove(bJ,bz+bE[bF],bv,bH,true)}continue}by=b.event.special[bz]||{};bz=(bH?by.delegateType:by.bindType)||bz;bD=bw[bz]||[];bA=bD.length;bC=bC?new RegExp("(^|\\.)"+bC.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(bG=0;bG<bD.length;bG++){e=bD[bG];if((bB||bL===e.origType)&&(!bv||bv.guid===e.guid)&&(!bC||bC.test(e.namespace))&&(!bH||bH===e.selector||bH==="**"&&e.selector)){bD.splice(bG--,1);if(e.selector){bD.delegateCount--}if(by.remove){by.remove.call(bJ,e)}}}if(bD.length===0&&bA!==bD.length){if(!by.teardown||by.teardown.call(bJ,bC)===false){b.removeEvent(bJ,bz,bI.handle)}delete bw[bz]}}if(b.isEmptyObject(bw)){bK=bI.handle;if(bK){bK.elem=null}b.removeData(bJ,["events","handle"],true)}},customEvent:{getData:true,setData:true,changeData:true},trigger:function(bv,bD,bA,bJ){if(bA&&(bA.nodeType===3||bA.nodeType===8)){return}var bG=bv.type||bv,bx=[],e,bw,bC,bH,bz,by,bF,bE,bB,bI;if(T.test(bG+b.event.triggered)){return}if(bG.indexOf("!")>=0){bG=bG.slice(0,-1);bw=true}if(bG.indexOf(".")>=0){bx=bG.split(".");bG=bx.shift();bx.sort()}if((!bA||b.event.customEvent[bG])&&!b.event.global[bG]){return}bv=typeof bv==="object"?bv[b.expando]?bv:new b.Event(bG,bv):new b.Event(bG);bv.type=bG;bv.isTrigger=true;bv.exclusive=bw;bv.namespace=bx.join(".");bv.namespace_re=bv.namespace?new RegExp("(^|\\.)"+bx.join("\\.(?:.*\\.)?")+"(\\.|$)"):null;by=bG.indexOf(":")<0?"on"+bG:"";if(!bA){e=b.cache;for(bC in e){if(e[bC].events&&e[bC].events[bG]){b.event.trigger(bv,bD,e[bC].handle.elem,true)}}return}bv.result=L;if(!bv.target){bv.target=bA}bD=bD!=null?b.makeArray(bD):[];bD.unshift(bv);bF=b.event.special[bG]||{};if(bF.trigger&&bF.trigger.apply(bA,bD)===false){return}bB=[[bA,bF.bindType||bG]];if(!bJ&&!bF.noBubble&&!b.isWindow(bA)){bI=bF.delegateType||bG;bH=T.test(bI+bG)?bA:bA.parentNode;bz=null;for(;bH;bH=bH.parentNode){bB.push([bH,bI]);bz=bH}if(bz&&bz===bA.ownerDocument){bB.push([bz.defaultView||bz.parentWindow||bb,bI])}}for(bC=0;bC<bB.length&&!bv.isPropagationStopped();bC++){bH=bB[bC][0];bv.type=bB[bC][1];bE=(b._data(bH,"events")||{})[bv.type]&&b._data(bH,"handle");if(bE){bE.apply(bH,bD)}bE=by&&bH[by];if(bE&&b.acceptData(bH)&&bE.apply(bH,bD)===false){bv.preventDefault()}}bv.type=bG;if(!bJ&&!bv.isDefaultPrevented()){if((!bF._default||bF._default.apply(bA.ownerDocument,bD)===false)&&!(bG==="click"&&b.nodeName(bA,"a"))&&b.acceptData(bA)){if(by&&bA[bG]&&((bG!=="focus"&&bG!=="blur")||bv.target.offsetWidth!==0)&&!b.isWindow(bA)){bz=bA[by];if(bz){bA[by]=null}b.event.triggered=bG;bA[bG]();b.event.triggered=L;if(bz){bA[by]=bz}}}}return bv.result},dispatch:function(e){e=b.event.fix(e||bb.event);var bz=((b._data(this,"events")||{})[e.type]||[]),bA=bz.delegateCount,bG=[].slice.call(arguments,0),by=!e.exclusive&&!e.namespace,bH=[],bC,bB,bK,bx,bF,bE,bv,bD,bI,bw,bJ;bG[0]=e;e.delegateTarget=this;if(bA&&!e.target.disabled&&!(e.button&&e.type==="click")){bx=b(this);bx.context=this.ownerDocument||this;for(bK=e.target;bK!=this;bK=bK.parentNode||this){bE={};bD=[];bx[0]=bK;for(bC=0;bC<bA;bC++){bI=bz[bC];bw=bI.selector;if(bE[bw]===L){bE[bw]=(bI.quick?j(bK,bI.quick):bx.is(bw))}if(bE[bw]){bD.push(bI)}}if(bD.length){bH.push({elem:bK,matches:bD})}}}if(bz.length>bA){bH.push({elem:this,matches:bz.slice(bA)})}for(bC=0;bC<bH.length&&!e.isPropagationStopped();bC++){bv=bH[bC];e.currentTarget=bv.elem;for(bB=0;bB<bv.matches.length&&!e.isImmediatePropagationStopped();bB++){bI=bv.matches[bB];if(by||(!e.namespace&&!bI.namespace)||e.namespace_re&&e.namespace_re.test(bI.namespace)){e.data=bI.data;e.handleObj=bI;bF=((b.event.special[bI.origType]||{}).handle||bI.handler).apply(bv.elem,bG);if(bF!==L){e.result=bF;if(bF===false){e.preventDefault();e.stopPropagation()}}}}}return e.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(bv,e){if(bv.which==null){bv.which=e.charCode!=null?e.charCode:e.keyCode}return bv}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(bx,bw){var by,bz,e,bv=bw.button,bA=bw.fromElement;if(bx.pageX==null&&bw.clientX!=null){by=bx.target.ownerDocument||av;bz=by.documentElement;e=by.body;bx.pageX=bw.clientX+(bz&&bz.scrollLeft||e&&e.scrollLeft||0)-(bz&&bz.clientLeft||e&&e.clientLeft||0);bx.pageY=bw.clientY+(bz&&bz.scrollTop||e&&e.scrollTop||0)-(bz&&bz.clientTop||e&&e.clientTop||0)}if(!bx.relatedTarget&&bA){bx.relatedTarget=bA===bx.target?bw.toElement:bA}if(!bx.which&&bv!==L){bx.which=(bv&1?1:(bv&2?3:(bv&4?2:0)))}return bx}},fix:function(bw){if(bw[b.expando]){return bw}var bv,bz,e=bw,bx=b.event.fixHooks[bw.type]||{},by=bx.props?this.props.concat(bx.props):this.props;bw=b.Event(e);for(bv=by.length;bv;){bz=by[--bv];bw[bz]=e[bz]}if(!bw.target){bw.target=e.srcElement||av}if(bw.target.nodeType===3){bw.target=bw.target.parentNode}if(bw.metaKey===L){bw.metaKey=bw.ctrlKey}return bx.filter?bx.filter(bw,e):bw},special:{ready:{setup:b.bindReady},load:{noBubble:true},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(bw,bv,e){if(b.isWindow(this)){this.onbeforeunload=e}},teardown:function(bv,e){if(this.onbeforeunload===e){this.onbeforeunload=null}}}},simulate:function(bw,by,bx,bv){var bz=b.extend(new b.Event(),bx,{type:bw,isSimulated:true,originalEvent:{}});if(bv){b.event.trigger(bz,null,by)}else{b.event.dispatch.call(by,bz)}if(bz.isDefaultPrevented()){bx.preventDefault()}}};b.event.handle=b.event.dispatch;b.removeEvent=av.removeEventListener?function(bv,e,bw){if(bv.removeEventListener){bv.removeEventListener(e,bw,false)}}:function(bv,e,bw){if(bv.detachEvent){bv.detachEvent("on"+e,bw)}};b.Event=function(bv,e){if(!(this instanceof b.Event)){return new b.Event(bv,e)}if(bv&&bv.type){this.originalEvent=bv;this.type=bv.type;this.isDefaultPrevented=(bv.defaultPrevented||bv.returnValue===false||bv.getPreventDefault&&bv.getPreventDefault())?i:bk}else{this.type=bv}if(e){b.extend(this,e)}this.timeStamp=bv&&bv.timeStamp||b.now();this[b.expando]=true};function bk(){return false}function i(){return true}b.Event.prototype={preventDefault:function(){this.isDefaultPrevented=i;var bv=this.originalEvent;if(!bv){return}if(bv.preventDefault){bv.preventDefault()}else{bv.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=i;var bv=this.originalEvent;if(!bv){return}if(bv.stopPropagation){bv.stopPropagation()}bv.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=i;this.stopPropagation()},isDefaultPrevented:bk,isPropagationStopped:bk,isImmediatePropagationStopped:bk};b.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(bv,e){b.event.special[bv]={delegateType:e,bindType:e,handle:function(bz){var bB=this,bA=bz.relatedTarget,by=bz.handleObj,bw=by.selector,bx;if(!bA||(bA!==bB&&!b.contains(bB,bA))){bz.type=by.origType;bx=by.handler.apply(this,arguments);bz.type=e}return bx}}});if(!b.support.submitBubbles){b.event.special.submit={setup:function(){if(b.nodeName(this,"form")){return false}b.event.add(this,"click._submit keypress._submit",function(bx){var bw=bx.target,bv=b.nodeName(bw,"input")||b.nodeName(bw,"button")?bw.form:L;if(bv&&!bv._submit_attached){b.event.add(bv,"submit._submit",function(e){if(this.parentNode&&!e.isTrigger){b.event.simulate("submit",this.parentNode,e,true)}});bv._submit_attached=true}})},teardown:function(){if(b.nodeName(this,"form")){return false}b.event.remove(this,"._submit")}}}if(!b.support.changeBubbles){b.event.special.change={setup:function(){if(bd.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio"){b.event.add(this,"propertychange._change",function(e){if(e.originalEvent.propertyName==="checked"){this._just_changed=true}});b.event.add(this,"click._change",function(e){if(this._just_changed&&!e.isTrigger){this._just_changed=false;b.event.simulate("change",this,e,true)}})}return false}b.event.add(this,"beforeactivate._change",function(bw){var bv=bw.target;if(bd.test(bv.nodeName)&&!bv._change_attached){b.event.add(bv,"change._change",function(e){if(this.parentNode&&!e.isSimulated&&!e.isTrigger){b.event.simulate("change",this.parentNode,e,true)}});bv._change_attached=true}})},handle:function(bv){var e=bv.target;if(this!==e||bv.isSimulated||bv.isTrigger||(e.type!=="radio"&&e.type!=="checkbox")){return bv.handleObj.handler.apply(this,arguments)}},teardown:function(){b.event.remove(this,"._change");return bd.test(this.nodeName)}}}if(!b.support.focusinBubbles){b.each({focus:"focusin",blur:"focusout"},function(bx,e){var bv=0,bw=function(by){b.event.simulate(e,by.target,b.event.fix(by),true)};b.event.special[e]={setup:function(){if(bv++===0){av.addEventListener(bx,bw,true)}},teardown:function(){if(--bv===0){av.removeEventListener(bx,bw,true)}}}})}b.fn.extend({on:function(bw,e,bz,by,bv){var bA,bx;if(typeof bw==="object"){if(typeof e!=="string"){bz=e;e=L}for(bx in bw){this.on(bx,e,bz,bw[bx],bv)}return this}if(bz==null&&by==null){by=e;bz=e=L}else{if(by==null){if(typeof e==="string"){by=bz;bz=L}else{by=bz;bz=e;e=L}}}if(by===false){by=bk}else{if(!by){return this}}if(bv===1){bA=by;by=function(bB){b().off(bB);return bA.apply(this,arguments)};by.guid=bA.guid||(bA.guid=b.guid++)}return this.each(function(){b.event.add(this,bw,by,bz,e)})},one:function(bv,e,bx,bw){return this.on.call(this,bv,e,bx,bw,1)},off:function(bw,e,by){if(bw&&bw.preventDefault&&bw.handleObj){var bv=bw.handleObj;b(bw.delegateTarget).off(bv.namespace?bv.type+"."+bv.namespace:bv.type,bv.selector,bv.handler);return this}if(typeof bw==="object"){for(var bx in bw){this.off(bx,e,bw[bx])}return this}if(e===false||typeof e==="function"){by=e;e=L}if(by===false){by=bk}return this.each(function(){b.event.remove(this,bw,by,e)})},bind:function(e,bw,bv){return this.on(e,null,bw,bv)},unbind:function(e,bv){return this.off(e,null,bv)},live:function(e,bw,bv){b(this.context).on(e,this.selector,bw,bv);return this},die:function(e,bv){b(this.context).off(e,this.selector||"**",bv);return this},delegate:function(e,bv,bx,bw){return this.on(bv,e,bx,bw)},undelegate:function(e,bv,bw){return arguments.length==1?this.off(e,"**"):this.off(bv,e,bw)},trigger:function(e,bv){return this.each(function(){b.event.trigger(e,bv,this)})},triggerHandler:function(e,bv){if(this[0]){return b.event.trigger(e,bv,this[0],true)}},toggle:function(bx){var bv=arguments,e=bx.guid||b.guid++,bw=0,by=function(bz){var bA=(b._data(this,"lastToggle"+bx.guid)||0)%bw;b._data(this,"lastToggle"+bx.guid,bA+1);bz.preventDefault();return bv[bA].apply(this,arguments)||false};by.guid=e;while(bw<bv.length){bv[bw++].guid=e}return this.click(by)},hover:function(e,bv){return this.mouseenter(e).mouseleave(bv||e)}});b.each(("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu").split(" "),function(bv,e){b.fn[e]=function(bx,bw){if(bw==null){bw=bx;bx=null}return arguments.length>0?this.on(e,null,bx,bw):this.trigger(e)};if(b.attrFn){b.attrFn[e]=true}if(aO.test(e)){b.event.fixHooks[e]=b.event.keyHooks}if(bf.test(e)){b.event.fixHooks[e]=b.event.mouseHooks}});
+/*!
+ * Sizzle CSS Selector Engine
+ * Copyright 2011, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ * More information: http://sizzlejs.com/
+ */
+(function(){var bH=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,bC="sizcache"+(Math.random()+"").replace(".",""),bI=0,bL=Object.prototype.toString,bB=false,bA=true,bK=/\\/g,bO=/\r\n/g,bQ=/\W/;[0,0].sort(function(){bA=false;return 0});var by=function(bV,e,bY,bZ){bY=bY||[];e=e||av;var b1=e;if(e.nodeType!==1&&e.nodeType!==9){return[]}if(!bV||typeof bV!=="string"){return bY}var bS,b3,b6,bR,b2,b5,b4,bX,bU=true,bT=by.isXML(e),bW=[],b0=bV;do{bH.exec("");bS=bH.exec(b0);if(bS){b0=bS[3];bW.push(bS[1]);if(bS[2]){bR=bS[3];break}}}while(bS);if(bW.length>1&&bD.exec(bV)){if(bW.length===2&&bE.relative[bW[0]]){b3=bM(bW[0]+bW[1],e,bZ)}else{b3=bE.relative[bW[0]]?[e]:by(bW.shift(),e);while(bW.length){bV=bW.shift();if(bE.relative[bV]){bV+=bW.shift()}b3=bM(bV,b3,bZ)}}}else{if(!bZ&&bW.length>1&&e.nodeType===9&&!bT&&bE.match.ID.test(bW[0])&&!bE.match.ID.test(bW[bW.length-1])){b2=by.find(bW.shift(),e,bT);e=b2.expr?by.filter(b2.expr,b2.set)[0]:b2.set[0]}if(e){b2=bZ?{expr:bW.pop(),set:bF(bZ)}:by.find(bW.pop(),bW.length===1&&(bW[0]==="~"||bW[0]==="+")&&e.parentNode?e.parentNode:e,bT);b3=b2.expr?by.filter(b2.expr,b2.set):b2.set;if(bW.length>0){b6=bF(b3)}else{bU=false}while(bW.length){b5=bW.pop();b4=b5;if(!bE.relative[b5]){b5=""}else{b4=bW.pop()}if(b4==null){b4=e}bE.relative[b5](b6,b4,bT)}}else{b6=bW=[]}}if(!b6){b6=b3}if(!b6){by.error(b5||bV)}if(bL.call(b6)==="[object Array]"){if(!bU){bY.push.apply(bY,b6)}else{if(e&&e.nodeType===1){for(bX=0;b6[bX]!=null;bX++){if(b6[bX]&&(b6[bX]===true||b6[bX].nodeType===1&&by.contains(e,b6[bX]))){bY.push(b3[bX])}}}else{for(bX=0;b6[bX]!=null;bX++){if(b6[bX]&&b6[bX].nodeType===1){bY.push(b3[bX])}}}}}else{bF(b6,bY)}if(bR){by(bR,b1,bY,bZ);by.uniqueSort(bY)}return bY};by.uniqueSort=function(bR){if(bJ){bB=bA;bR.sort(bJ);if(bB){for(var e=1;e<bR.length;e++){if(bR[e]===bR[e-1]){bR.splice(e--,1)}}}}return bR};by.matches=function(e,bR){return by(e,null,null,bR)};by.matchesSelector=function(e,bR){return by(bR,null,null,[e]).length>0};by.find=function(bX,e,bY){var bW,bS,bU,bT,bV,bR;if(!bX){return[]}for(bS=0,bU=bE.order.length;bS<bU;bS++){bV=bE.order[bS];if((bT=bE.leftMatch[bV].exec(bX))){bR=bT[1];bT.splice(1,1);if(bR.substr(bR.length-1)!=="\\"){bT[1]=(bT[1]||"").replace(bK,"");bW=bE.find[bV](bT,e,bY);if(bW!=null){bX=bX.replace(bE.match[bV],"");break}}}}if(!bW){bW=typeof e.getElementsByTagName!=="undefined"?e.getElementsByTagName("*"):[]}return{set:bW,expr:bX}};by.filter=function(b1,b0,b4,bU){var bW,e,bZ,b6,b3,bR,bT,bV,b2,bS=b1,b5=[],bY=b0,bX=b0&&b0[0]&&by.isXML(b0[0]);while(b1&&b0.length){for(bZ in bE.filter){if((bW=bE.leftMatch[bZ].exec(b1))!=null&&bW[2]){bR=bE.filter[bZ];bT=bW[1];e=false;bW.splice(1,1);if(bT.substr(bT.length-1)==="\\"){continue}if(bY===b5){b5=[]}if(bE.preFilter[bZ]){bW=bE.preFilter[bZ](bW,bY,b4,b5,bU,bX);if(!bW){e=b6=true}else{if(bW===true){continue}}}if(bW){for(bV=0;(b3=bY[bV])!=null;bV++){if(b3){b6=bR(b3,bW,bV,bY);b2=bU^b6;if(b4&&b6!=null){if(b2){e=true}else{bY[bV]=false}}else{if(b2){b5.push(b3);e=true}}}}}if(b6!==L){if(!b4){bY=b5}b1=b1.replace(bE.match[bZ],"");if(!e){return[]}break}}}if(b1===bS){if(e==null){by.error(b1)}else{break}}bS=b1}return bY};by.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)};var bw=by.getText=function(bU){var bS,bT,e=bU.nodeType,bR="";if(e){if(e===1||e===9){if(typeof bU.textContent==="string"){return bU.textContent}else{if(typeof bU.innerText==="string"){return bU.innerText.replace(bO,"")}else{for(bU=bU.firstChild;bU;bU=bU.nextSibling){bR+=bw(bU)}}}}else{if(e===3||e===4){return bU.nodeValue}}}else{for(bS=0;(bT=bU[bS]);bS++){if(bT.nodeType!==8){bR+=bw(bT)}}}return bR};var bE=by.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(e){return e.getAttribute("href")},type:function(e){return e.getAttribute("type")}},relative:{"+":function(bW,bR){var bT=typeof bR==="string",bV=bT&&!bQ.test(bR),bX=bT&&!bV;if(bV){bR=bR.toLowerCase()}for(var bS=0,e=bW.length,bU;bS<e;bS++){if((bU=bW[bS])){while((bU=bU.previousSibling)&&bU.nodeType!==1){}bW[bS]=bX||bU&&bU.nodeName.toLowerCase()===bR?bU||false:bU===bR}}if(bX){by.filter(bR,bW,true)}},">":function(bW,bR){var bV,bU=typeof bR==="string",bS=0,e=bW.length;if(bU&&!bQ.test(bR)){bR=bR.toLowerCase();for(;bS<e;bS++){bV=bW[bS];if(bV){var bT=bV.parentNode;bW[bS]=bT.nodeName.toLowerCase()===bR?bT:false}}}else{for(;bS<e;bS++){bV=bW[bS];if(bV){bW[bS]=bU?bV.parentNode:bV.parentNode===bR}}if(bU){by.filter(bR,bW,true)}}},"":function(bT,bR,bV){var bU,bS=bI++,e=bN;if(typeof bR==="string"&&!bQ.test(bR)){bR=bR.toLowerCase();bU=bR;e=bv}e("parentNode",bR,bS,bT,bU,bV)},"~":function(bT,bR,bV){var bU,bS=bI++,e=bN;if(typeof bR==="string"&&!bQ.test(bR)){bR=bR.toLowerCase();bU=bR;e=bv}e("previousSibling",bR,bS,bT,bU,bV)}},find:{ID:function(bR,bS,bT){if(typeof bS.getElementById!=="undefined"&&!bT){var e=bS.getElementById(bR[1]);return e&&e.parentNode?[e]:[]}},NAME:function(bS,bV){if(typeof bV.getElementsByName!=="undefined"){var bR=[],bU=bV.getElementsByName(bS[1]);for(var bT=0,e=bU.length;bT<e;bT++){if(bU[bT].getAttribute("name")===bS[1]){bR.push(bU[bT])}}return bR.length===0?null:bR}},TAG:function(e,bR){if(typeof bR.getElementsByTagName!=="undefined"){return bR.getElementsByTagName(e[1])}}},preFilter:{CLASS:function(bT,bR,bS,e,bW,bX){bT=" "+bT[1].replace(bK,"")+" ";if(bX){return bT}for(var bU=0,bV;(bV=bR[bU])!=null;bU++){if(bV){if(bW^(bV.className&&(" "+bV.className+" ").replace(/[\t\n\r]/g," ").indexOf(bT)>=0)){if(!bS){e.push(bV)}}else{if(bS){bR[bU]=false}}}}return false},ID:function(e){return e[1].replace(bK,"")},TAG:function(bR,e){return bR[1].replace(bK,"").toLowerCase()},CHILD:function(e){if(e[1]==="nth"){if(!e[2]){by.error(e[0])}e[2]=e[2].replace(/^\+|\s*/g,"");var bR=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(bR[1]+(bR[2]||1))-0;e[3]=bR[3]-0}else{if(e[2]){by.error(e[0])}}e[0]=bI++;return e},ATTR:function(bU,bR,bS,e,bV,bW){var bT=bU[1]=bU[1].replace(bK,"");if(!bW&&bE.attrMap[bT]){bU[1]=bE.attrMap[bT]}bU[4]=(bU[4]||bU[5]||"").replace(bK,"");if(bU[2]==="~="){bU[4]=" "+bU[4]+" "}return bU},PSEUDO:function(bU,bR,bS,e,bV){if(bU[1]==="not"){if((bH.exec(bU[3])||"").length>1||/^\w/.test(bU[3])){bU[3]=by(bU[3],null,null,bR)}else{var bT=by.filter(bU[3],bR,bS,true^bV);if(!bS){e.push.apply(e,bT)}return false}}else{if(bE.match.POS.test(bU[0])||bE.match.CHILD.test(bU[0])){return true}}return bU},POS:function(e){e.unshift(true);return e}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden"},disabled:function(e){return e.disabled===true},checked:function(e){return e.checked===true},selected:function(e){if(e.parentNode){e.parentNode.selectedIndex}return e.selected===true},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(bS,bR,e){return !!by(e[3],bS).length},header:function(e){return(/h\d/i).test(e.nodeName)},text:function(bS){var e=bS.getAttribute("type"),bR=bS.type;return bS.nodeName.toLowerCase()==="input"&&"text"===bR&&(e===bR||e===null)},radio:function(e){return e.nodeName.toLowerCase()==="input"&&"radio"===e.type},checkbox:function(e){return e.nodeName.toLowerCase()==="input"&&"checkbox"===e.type},file:function(e){return e.nodeName.toLowerCase()==="input"&&"file"===e.type},password:function(e){return e.nodeName.toLowerCase()==="input"&&"password"===e.type},submit:function(bR){var e=bR.nodeName.toLowerCase();return(e==="input"||e==="button")&&"submit"===bR.type},image:function(e){return e.nodeName.toLowerCase()==="input"&&"image"===e.type},reset:function(bR){var e=bR.nodeName.toLowerCase();return(e==="input"||e==="button")&&"reset"===bR.type},button:function(bR){var e=bR.nodeName.toLowerCase();return e==="input"&&"button"===bR.type||e==="button"},input:function(e){return(/input|select|textarea|button/i).test(e.nodeName)},focus:function(e){return e===e.ownerDocument.activeElement}},setFilters:{first:function(bR,e){return e===0},last:function(bS,bR,e,bT){return bR===bT.length-1},even:function(bR,e){return e%2===0},odd:function(bR,e){return e%2===1},lt:function(bS,bR,e){return bR<e[3]-0},gt:function(bS,bR,e){return bR>e[3]-0},nth:function(bS,bR,e){return e[3]-0===bR},eq:function(bS,bR,e){return e[3]-0===bR}},filter:{PSEUDO:function(bS,bX,bW,bY){var e=bX[1],bR=bE.filters[e];if(bR){return bR(bS,bW,bX,bY)}else{if(e==="contains"){return(bS.textContent||bS.innerText||bw([bS])||"").indexOf(bX[3])>=0}else{if(e==="not"){var bT=bX[3];for(var bV=0,bU=bT.length;bV<bU;bV++){if(bT[bV]===bS){return false}}return true}else{by.error(e)}}}},CHILD:function(bS,bU){var bT,b0,bW,bZ,e,bV,bY,bX=bU[1],bR=bS;switch(bX){case"only":case"first":while((bR=bR.previousSibling)){if(bR.nodeType===1){return false}}if(bX==="first"){return true}bR=bS;case"last":while((bR=bR.nextSibling)){if(bR.nodeType===1){return false}}return true;case"nth":bT=bU[2];b0=bU[3];if(bT===1&&b0===0){return true}bW=bU[0];bZ=bS.parentNode;if(bZ&&(bZ[bC]!==bW||!bS.nodeIndex)){bV=0;for(bR=bZ.firstChild;bR;bR=bR.nextSibling){if(bR.nodeType===1){bR.nodeIndex=++bV}}bZ[bC]=bW}bY=bS.nodeIndex-b0;if(bT===0){return bY===0}else{return(bY%bT===0&&bY/bT>=0)}}},ID:function(bR,e){return bR.nodeType===1&&bR.getAttribute("id")===e},TAG:function(bR,e){return(e==="*"&&bR.nodeType===1)||!!bR.nodeName&&bR.nodeName.toLowerCase()===e},CLASS:function(bR,e){return(" "+(bR.className||bR.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(bV,bT){var bS=bT[1],e=by.attr?by.attr(bV,bS):bE.attrHandle[bS]?bE.attrHandle[bS](bV):bV[bS]!=null?bV[bS]:bV.getAttribute(bS),bW=e+"",bU=bT[2],bR=bT[4];return e==null?bU==="!=":!bU&&by.attr?e!=null:bU==="="?bW===bR:bU==="*="?bW.indexOf(bR)>=0:bU==="~="?(" "+bW+" ").indexOf(bR)>=0:!bR?bW&&e!==false:bU==="!="?bW!==bR:bU==="^="?bW.indexOf(bR)===0:bU==="$="?bW.substr(bW.length-bR.length)===bR:bU==="|="?bW===bR||bW.substr(0,bR.length+1)===bR+"-":false},POS:function(bU,bR,bS,bV){var e=bR[2],bT=bE.setFilters[e];if(bT){return bT(bU,bS,bR,bV)}}}};var bD=bE.match.POS,bx=function(bR,e){return"\\"+(e-0+1)};for(var bz in bE.match){bE.match[bz]=new RegExp(bE.match[bz].source+(/(?![^\[]*\])(?![^\(]*\))/.source));bE.leftMatch[bz]=new RegExp(/(^(?:.|\r|\n)*?)/.source+bE.match[bz].source.replace(/\\(\d+)/g,bx))}var bF=function(bR,e){bR=Array.prototype.slice.call(bR,0);if(e){e.push.apply(e,bR);return e}return bR};try{Array.prototype.slice.call(av.documentElement.childNodes,0)[0].nodeType}catch(bP){bF=function(bU,bT){var bS=0,bR=bT||[];if(bL.call(bU)==="[object Array]"){Array.prototype.push.apply(bR,bU)}else{if(typeof bU.length==="number"){for(var e=bU.length;bS<e;bS++){bR.push(bU[bS])}}else{for(;bU[bS];bS++){bR.push(bU[bS])}}}return bR}}var bJ,bG;if(av.documentElement.compareDocumentPosition){bJ=function(bR,e){if(bR===e){bB=true;return 0}if(!bR.compareDocumentPosition||!e.compareDocumentPosition){return bR.compareDocumentPosition?-1:1}return bR.compareDocumentPosition(e)&4?-1:1}}else{bJ=function(bY,bX){if(bY===bX){bB=true;return 0}else{if(bY.sourceIndex&&bX.sourceIndex){return bY.sourceIndex-bX.sourceIndex}}var bV,bR,bS=[],e=[],bU=bY.parentNode,bW=bX.parentNode,bZ=bU;if(bU===bW){return bG(bY,bX)}else{if(!bU){return -1}else{if(!bW){return 1}}}while(bZ){bS.unshift(bZ);bZ=bZ.parentNode}bZ=bW;while(bZ){e.unshift(bZ);bZ=bZ.parentNode}bV=bS.length;bR=e.length;for(var bT=0;bT<bV&&bT<bR;bT++){if(bS[bT]!==e[bT]){return bG(bS[bT],e[bT])}}return bT===bV?bG(bY,e[bT],-1):bG(bS[bT],bX,1)};bG=function(bR,e,bS){if(bR===e){return bS}var bT=bR.nextSibling;while(bT){if(bT===e){return -1}bT=bT.nextSibling}return 1}}(function(){var bR=av.createElement("div"),bS="script"+(new Date()).getTime(),e=av.documentElement;bR.innerHTML="<a name='"+bS+"'/>";e.insertBefore(bR,e.firstChild);if(av.getElementById(bS)){bE.find.ID=function(bU,bV,bW){if(typeof bV.getElementById!=="undefined"&&!bW){var bT=bV.getElementById(bU[1]);return bT?bT.id===bU[1]||typeof bT.getAttributeNode!=="undefined"&&bT.getAttributeNode("id").nodeValue===bU[1]?[bT]:L:[]}};bE.filter.ID=function(bV,bT){var bU=typeof bV.getAttributeNode!=="undefined"&&bV.getAttributeNode("id");return bV.nodeType===1&&bU&&bU.nodeValue===bT}}e.removeChild(bR);e=bR=null})();(function(){var e=av.createElement("div");e.appendChild(av.createComment(""));if(e.getElementsByTagName("*").length>0){bE.find.TAG=function(bR,bV){var bU=bV.getElementsByTagName(bR[1]);if(bR[1]==="*"){var bT=[];for(var bS=0;bU[bS];bS++){if(bU[bS].nodeType===1){bT.push(bU[bS])}}bU=bT}return bU}}e.innerHTML="<a href='#'></a>";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){bE.attrHandle.href=function(bR){return bR.getAttribute("href",2)}}e=null})();if(av.querySelectorAll){(function(){var e=by,bT=av.createElement("div"),bS="__sizzle__";bT.innerHTML="<p class='TEST'></p>";if(bT.querySelectorAll&&bT.querySelectorAll(".TEST").length===0){return}by=function(b4,bV,bZ,b3){bV=bV||av;if(!b3&&!by.isXML(bV)){var b2=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b4);if(b2&&(bV.nodeType===1||bV.nodeType===9)){if(b2[1]){return bF(bV.getElementsByTagName(b4),bZ)}else{if(b2[2]&&bE.find.CLASS&&bV.getElementsByClassName){return bF(bV.getElementsByClassName(b2[2]),bZ)}}}if(bV.nodeType===9){if(b4==="body"&&bV.body){return bF([bV.body],bZ)}else{if(b2&&b2[3]){var bY=bV.getElementById(b2[3]);if(bY&&bY.parentNode){if(bY.id===b2[3]){return bF([bY],bZ)}}else{return bF([],bZ)}}}try{return bF(bV.querySelectorAll(b4),bZ)}catch(b0){}}else{if(bV.nodeType===1&&bV.nodeName.toLowerCase()!=="object"){var bW=bV,bX=bV.getAttribute("id"),bU=bX||bS,b6=bV.parentNode,b5=/^\s*[+~]/.test(b4);if(!bX){bV.setAttribute("id",bU)}else{bU=bU.replace(/'/g,"\\$&")}if(b5&&b6){bV=bV.parentNode}try{if(!b5||b6){return bF(bV.querySelectorAll("[id='"+bU+"'] "+b4),bZ)}}catch(b1){}finally{if(!bX){bW.removeAttribute("id")}}}}}return e(b4,bV,bZ,b3)};for(var bR in e){by[bR]=e[bR]}bT=null})()}(function(){var e=av.documentElement,bS=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(bS){var bU=!bS.call(av.createElement("div"),"div"),bR=false;try{bS.call(av.documentElement,"[test!='']:sizzle")}catch(bT){bR=true}by.matchesSelector=function(bW,bY){bY=bY.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!by.isXML(bW)){try{if(bR||!bE.match.PSEUDO.test(bY)&&!/!=/.test(bY)){var bV=bS.call(bW,bY);if(bV||!bU||bW.document&&bW.document.nodeType!==11){return bV}}}catch(bX){}}return by(bY,null,null,[bW]).length>0}}})();(function(){var e=av.createElement("div");e.innerHTML="<div class='test e'></div><div class='test'></div>";if(!e.getElementsByClassName||e.getElementsByClassName("e").length===0){return}e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return}bE.order.splice(1,0,"CLASS");bE.find.CLASS=function(bR,bS,bT){if(typeof bS.getElementsByClassName!=="undefined"&&!bT){return bS.getElementsByClassName(bR[1])}};e=null})();function bv(bR,bW,bV,bZ,bX,bY){for(var bT=0,bS=bZ.length;bT<bS;bT++){var e=bZ[bT];if(e){var bU=false;e=e[bR];while(e){if(e[bC]===bV){bU=bZ[e.sizset];break}if(e.nodeType===1&&!bY){e[bC]=bV;e.sizset=bT}if(e.nodeName.toLowerCase()===bW){bU=e;break}e=e[bR]}bZ[bT]=bU}}}function bN(bR,bW,bV,bZ,bX,bY){for(var bT=0,bS=bZ.length;bT<bS;bT++){var e=bZ[bT];if(e){var bU=false;e=e[bR];while(e){if(e[bC]===bV){bU=bZ[e.sizset];break}if(e.nodeType===1){if(!bY){e[bC]=bV;e.sizset=bT}if(typeof bW!=="string"){if(e===bW){bU=true;break}}else{if(by.filter(bW,[e]).length>0){bU=e;break}}}e=e[bR]}bZ[bT]=bU}}}if(av.documentElement.contains){by.contains=function(bR,e){return bR!==e&&(bR.contains?bR.contains(e):true)}}else{if(av.documentElement.compareDocumentPosition){by.contains=function(bR,e){return !!(bR.compareDocumentPosition(e)&16)}}else{by.contains=function(){return false}}}by.isXML=function(e){var bR=(e?e.ownerDocument||e:0).documentElement;return bR?bR.nodeName!=="HTML":false};var bM=function(bS,e,bW){var bV,bX=[],bU="",bY=e.nodeType?[e]:e;while((bV=bE.match.PSEUDO.exec(bS))){bU+=bV[0];bS=bS.replace(bE.match.PSEUDO,"")}bS=bE.relative[bS]?bS+"*":bS;for(var bT=0,bR=bY.length;bT<bR;bT++){by(bS,bY[bT],bX,bW)}return by.filter(bU,bX)};by.attr=b.attr;by.selectors.attrMap={};b.find=by;b.expr=by.selectors;b.expr[":"]=b.expr.filters;b.unique=by.uniqueSort;b.text=by.getText;b.isXMLDoc=by.isXML;b.contains=by.contains})();var ab=/Until$/,aq=/^(?:parents|prevUntil|prevAll)/,a9=/,/,bp=/^.[^:#\[\.,]*$/,P=Array.prototype.slice,H=b.expr.match.POS,ay={children:true,contents:true,next:true,prev:true};b.fn.extend({find:function(e){var bw=this,by,bv;if(typeof e!=="string"){return b(e).filter(function(){for(by=0,bv=bw.length;by<bv;by++){if(b.contains(bw[by],this)){return true}}})}var bx=this.pushStack("","find",e),bA,bB,bz;for(by=0,bv=this.length;by<bv;by++){bA=bx.length;b.find(e,this[by],bx);if(by>0){for(bB=bA;bB<bx.length;bB++){for(bz=0;bz<bA;bz++){if(bx[bz]===bx[bB]){bx.splice(bB--,1);break}}}}}return bx},has:function(bv){var e=b(bv);return this.filter(function(){for(var bx=0,bw=e.length;bx<bw;bx++){if(b.contains(this,e[bx])){return true}}})},not:function(e){return this.pushStack(aG(this,e,false),"not",e)},filter:function(e){return this.pushStack(aG(this,e,true),"filter",e)},is:function(e){return !!e&&(typeof e==="string"?H.test(e)?b(e,this.context).index(this[0])>=0:b.filter(e,this).length>0:this.filter(e).length>0)},closest:function(by,bx){var bv=[],bw,e,bz=this[0];if(b.isArray(by)){var bB=1;while(bz&&bz.ownerDocument&&bz!==bx){for(bw=0;bw<by.length;bw++){if(b(bz).is(by[bw])){bv.push({selector:by[bw],elem:bz,level:bB})}}bz=bz.parentNode;bB++}return bv}var bA=H.test(by)||typeof by!=="string"?b(by,bx||this.context):0;for(bw=0,e=this.length;bw<e;bw++){bz=this[bw];while(bz){if(bA?bA.index(bz)>-1:b.find.matchesSelector(bz,by)){bv.push(bz);break}else{bz=bz.parentNode;if(!bz||!bz.ownerDocument||bz===bx||bz.nodeType===11){break}}}}bv=bv.length>1?b.unique(bv):bv;return this.pushStack(bv,"closest",by)},index:function(e){if(!e){return(this[0]&&this[0].parentNode)?this.prevAll().length:-1}if(typeof e==="string"){return b.inArray(this[0],b(e))}return b.inArray(e.jquery?e[0]:e,this)},add:function(e,bv){var bx=typeof e==="string"?b(e,bv):b.makeArray(e&&e.nodeType?[e]:e),bw=b.merge(this.get(),bx);return this.pushStack(C(bx[0])||C(bw[0])?bw:b.unique(bw))},andSelf:function(){return this.add(this.prevObject)}});function C(e){return !e||!e.parentNode||e.parentNode.nodeType===11}b.each({parent:function(bv){var e=bv.parentNode;return e&&e.nodeType!==11?e:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(bv,e,bw){return b.dir(bv,"parentNode",bw)},next:function(e){return b.nth(e,2,"nextSibling")},prev:function(e){return b.nth(e,2,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(bv,e,bw){return b.dir(bv,"nextSibling",bw)},prevUntil:function(bv,e,bw){return b.dir(bv,"previousSibling",bw)},siblings:function(e){return b.sibling(e.parentNode.firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.makeArray(e.childNodes)}},function(e,bv){b.fn[e]=function(by,bw){var bx=b.map(this,bv,by);if(!ab.test(e)){bw=by}if(bw&&typeof bw==="string"){bx=b.filter(bw,bx)}bx=this.length>1&&!ay[e]?b.unique(bx):bx;if((this.length>1||a9.test(bw))&&aq.test(e)){bx=bx.reverse()}return this.pushStack(bx,e,P.call(arguments).join(","))}});b.extend({filter:function(bw,e,bv){if(bv){bw=":not("+bw+")"}return e.length===1?b.find.matchesSelector(e[0],bw)?[e[0]]:[]:b.find.matches(bw,e)},dir:function(bw,bv,by){var e=[],bx=bw[bv];while(bx&&bx.nodeType!==9&&(by===L||bx.nodeType!==1||!b(bx).is(by))){if(bx.nodeType===1){e.push(bx)}bx=bx[bv]}return e},nth:function(by,e,bw,bx){e=e||1;var bv=0;for(;by;by=by[bw]){if(by.nodeType===1&&++bv===e){break}}return by},sibling:function(bw,bv){var e=[];for(;bw;bw=bw.nextSibling){if(bw.nodeType===1&&bw!==bv){e.push(bw)}}return e}});function aG(bx,bw,e){bw=bw||0;if(b.isFunction(bw)){return b.grep(bx,function(bz,by){var bA=!!bw.call(bz,by,bz);return bA===e})}else{if(bw.nodeType){return b.grep(bx,function(bz,by){return(bz===bw)===e})}else{if(typeof bw==="string"){var bv=b.grep(bx,function(by){return by.nodeType===1});if(bp.test(bw)){return b.filter(bw,bv,!e)}else{bw=b.filter(bw,bv)}}}}return b.grep(bx,function(bz,by){return(b.inArray(bz,bw)>=0)===e})}function a(e){var bw=aR.split("|"),bv=e.createDocumentFragment();if(bv.createElement){while(bw.length){bv.createElement(bw.pop())}}return bv}var aR="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ag=/ jQuery\d+="(?:\d+|null)"/g,ar=/^\s+/,R=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,d=/<([\w:]+)/,w=/<tbody/i,W=/<|&#?\w+;/,ae=/<(?:script|style)/i,O=/<(?:script|object|embed|option|style)/i,ah=new RegExp("<(?:"+aR+")","i"),o=/checked\s*(?:[^=]|=\s*.checked.)/i,bm=/\/(java|ecma)script/i,aN=/^\s*<!(?:\[CDATA\[|\-\-)/,ax={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},ac=a(av);ax.optgroup=ax.option;ax.tbody=ax.tfoot=ax.colgroup=ax.caption=ax.thead;ax.th=ax.td;if(!b.support.htmlSerialize){ax._default=[1,"div<div>","</div>"]}b.fn.extend({text:function(e){if(b.isFunction(e)){return this.each(function(bw){var bv=b(this);bv.text(e.call(this,bw,bv.text()))})}if(typeof e!=="object"&&e!==L){return this.empty().append((this[0]&&this[0].ownerDocument||av).createTextNode(e))}return b.text(this)},wrapAll:function(e){if(b.isFunction(e)){return this.each(function(bw){b(this).wrapAll(e.call(this,bw))})}if(this[0]){var bv=b(e,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){bv.insertBefore(this[0])}bv.map(function(){var bw=this;while(bw.firstChild&&bw.firstChild.nodeType===1){bw=bw.firstChild}return bw}).append(this)}return this},wrapInner:function(e){if(b.isFunction(e)){return this.each(function(bv){b(this).wrapInner(e.call(this,bv))})}return this.each(function(){var bv=b(this),bw=bv.contents();if(bw.length){bw.wrapAll(e)}else{bv.append(e)}})},wrap:function(e){var bv=b.isFunction(e);return this.each(function(bw){b(this).wrapAll(bv?e.call(this,bw):e)})},unwrap:function(){return this.parent().each(function(){if(!b.nodeName(this,"body")){b(this).replaceWith(this.childNodes)}}).end()},append:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.appendChild(e)}})},prepend:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.insertBefore(e,this.firstChild)}})},before:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this)})}else{if(arguments.length){var e=b.clean(arguments);e.push.apply(e,this.toArray());return this.pushStack(e,"before",arguments)}}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this.nextSibling)})}else{if(arguments.length){var e=this.pushStack(this,"after",arguments);e.push.apply(e,b.clean(arguments));return e}}},remove:function(e,bx){for(var bv=0,bw;(bw=this[bv])!=null;bv++){if(!e||b.filter(e,[bw]).length){if(!bx&&bw.nodeType===1){b.cleanData(bw.getElementsByTagName("*"));b.cleanData([bw])}if(bw.parentNode){bw.parentNode.removeChild(bw)}}}return this},empty:function(){for(var e=0,bv;(bv=this[e])!=null;e++){if(bv.nodeType===1){b.cleanData(bv.getElementsByTagName("*"))}while(bv.firstChild){bv.removeChild(bv.firstChild)}}return this},clone:function(bv,e){bv=bv==null?false:bv;e=e==null?bv:e;return this.map(function(){return b.clone(this,bv,e)})},html:function(bx){if(bx===L){return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(ag,""):null}else{if(typeof bx==="string"&&!ae.test(bx)&&(b.support.leadingWhitespace||!ar.test(bx))&&!ax[(d.exec(bx)||["",""])[1].toLowerCase()]){bx=bx.replace(R,"<$1></$2>");try{for(var bw=0,bv=this.length;bw<bv;bw++){if(this[bw].nodeType===1){b.cleanData(this[bw].getElementsByTagName("*"));this[bw].innerHTML=bx}}}catch(by){this.empty().append(bx)}}else{if(b.isFunction(bx)){this.each(function(bz){var e=b(this);e.html(bx.call(this,bz,e.html()))})}else{this.empty().append(bx)}}}return this},replaceWith:function(e){if(this[0]&&this[0].parentNode){if(b.isFunction(e)){return this.each(function(bx){var bw=b(this),bv=bw.html();bw.replaceWith(e.call(this,bx,bv))})}if(typeof e!=="string"){e=b(e).detach()}return this.each(function(){var bw=this.nextSibling,bv=this.parentNode;b(this).remove();if(bw){b(bw).before(e)}else{b(bv).append(e)}})}else{return this.length?this.pushStack(b(b.isFunction(e)?e():e),"replaceWith",e):this}},detach:function(e){return this.remove(e,true)},domManip:function(bB,bF,bE){var bx,by,bA,bD,bC=bB[0],bv=[];if(!b.support.checkClone&&arguments.length===3&&typeof bC==="string"&&o.test(bC)){return this.each(function(){b(this).domManip(bB,bF,bE,true)})}if(b.isFunction(bC)){return this.each(function(bH){var bG=b(this);bB[0]=bC.call(this,bH,bF?bG.html():L);bG.domManip(bB,bF,bE)})}if(this[0]){bD=bC&&bC.parentNode;if(b.support.parentNode&&bD&&bD.nodeType===11&&bD.childNodes.length===this.length){bx={fragment:bD}}else{bx=b.buildFragment(bB,this,bv)}bA=bx.fragment;if(bA.childNodes.length===1){by=bA=bA.firstChild}else{by=bA.firstChild}if(by){bF=bF&&b.nodeName(by,"tr");for(var bw=0,e=this.length,bz=e-1;bw<e;bw++){bE.call(bF?ba(this[bw],by):this[bw],bx.cacheable||(e>1&&bw<bz)?b.clone(bA,true,true):bA)}}if(bv.length){b.each(bv,bo)}}return this}});function ba(e,bv){return b.nodeName(e,"table")?(e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody"))):e}function t(bB,bv){if(bv.nodeType!==1||!b.hasData(bB)){return}var by,bx,e,bA=b._data(bB),bz=b._data(bv,bA),bw=bA.events;if(bw){delete bz.handle;bz.events={};for(by in bw){for(bx=0,e=bw[by].length;bx<e;bx++){b.event.add(bv,by+(bw[by][bx].namespace?".":"")+bw[by][bx].namespace,bw[by][bx],bw[by][bx].data)}}}if(bz.data){bz.data=b.extend({},bz.data)}}function ai(bv,e){var bw;if(e.nodeType!==1){return}if(e.clearAttributes){e.clearAttributes()}if(e.mergeAttributes){e.mergeAttributes(bv)}bw=e.nodeName.toLowerCase();if(bw==="object"){e.outerHTML=bv.outerHTML}else{if(bw==="input"&&(bv.type==="checkbox"||bv.type==="radio")){if(bv.checked){e.defaultChecked=e.checked=bv.checked}if(e.value!==bv.value){e.value=bv.value}}else{if(bw==="option"){e.selected=bv.defaultSelected}else{if(bw==="input"||bw==="textarea"){e.defaultValue=bv.defaultValue}}}}e.removeAttribute(b.expando)}b.buildFragment=function(bz,bx,bv){var by,e,bw,bA,bB=bz[0];if(bx&&bx[0]){bA=bx[0].ownerDocument||bx[0]}if(!bA.createDocumentFragment){bA=av}if(bz.length===1&&typeof bB==="string"&&bB.length<512&&bA===av&&bB.charAt(0)==="<"&&!O.test(bB)&&(b.support.checkClone||!o.test(bB))&&(b.support.html5Clone||!ah.test(bB))){e=true;bw=b.fragments[bB];if(bw&&bw!==1){by=bw}}if(!by){by=bA.createDocumentFragment();b.clean(bz,bA,by,bv)}if(e){b.fragments[bB]=bw?by:1}return{fragment:by,cacheable:e}};b.fragments={};b.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,bv){b.fn[e]=function(bw){var bz=[],bC=b(bw),bB=this.length===1&&this[0].parentNode;if(bB&&bB.nodeType===11&&bB.childNodes.length===1&&bC.length===1){bC[bv](this[0]);return this}else{for(var bA=0,bx=bC.length;bA<bx;bA++){var by=(bA>0?this.clone(true):this).get();b(bC[bA])[bv](by);bz=bz.concat(by)}return this.pushStack(bz,e,bC.selector)}}});function bg(e){if(typeof e.getElementsByTagName!=="undefined"){return e.getElementsByTagName("*")}else{if(typeof e.querySelectorAll!=="undefined"){return e.querySelectorAll("*")}else{return[]}}}function az(e){if(e.type==="checkbox"||e.type==="radio"){e.defaultChecked=e.checked}}function E(e){var bv=(e.nodeName||"").toLowerCase();if(bv==="input"){az(e)}else{if(bv!=="script"&&typeof e.getElementsByTagName!=="undefined"){b.grep(e.getElementsByTagName("input"),az)}}}function al(e){var bv=av.createElement("div");ac.appendChild(bv);bv.innerHTML=e.outerHTML;return bv.firstChild}b.extend({clone:function(by,bA,bw){var e,bv,bx,bz=b.support.html5Clone||!ah.test("<"+by.nodeName)?by.cloneNode(true):al(by);if((!b.support.noCloneEvent||!b.support.noCloneChecked)&&(by.nodeType===1||by.nodeType===11)&&!b.isXMLDoc(by)){ai(by,bz);e=bg(by);bv=bg(bz);for(bx=0;e[bx];++bx){if(bv[bx]){ai(e[bx],bv[bx])}}}if(bA){t(by,bz);if(bw){e=bg(by);bv=bg(bz);for(bx=0;e[bx];++bx){t(e[bx],bv[bx])}}}e=bv=null;return bz},clean:function(bw,by,bH,bA){var bF;by=by||av;if(typeof by.createElement==="undefined"){by=by.ownerDocument||by[0]&&by[0].ownerDocument||av}var bI=[],bB;for(var bE=0,bz;(bz=bw[bE])!=null;bE++){if(typeof bz==="number"){bz+=""}if(!bz){continue}if(typeof bz==="string"){if(!W.test(bz)){bz=by.createTextNode(bz)}else{bz=bz.replace(R,"<$1></$2>");var bK=(d.exec(bz)||["",""])[1].toLowerCase(),bx=ax[bK]||ax._default,bD=bx[0],bv=by.createElement("div");if(by===av){ac.appendChild(bv)}else{a(by).appendChild(bv)}bv.innerHTML=bx[1]+bz+bx[2];while(bD--){bv=bv.lastChild}if(!b.support.tbody){var e=w.test(bz),bC=bK==="table"&&!e?bv.firstChild&&bv.firstChild.childNodes:bx[1]==="<table>"&&!e?bv.childNodes:[];for(bB=bC.length-1;bB>=0;--bB){if(b.nodeName(bC[bB],"tbody")&&!bC[bB].childNodes.length){bC[bB].parentNode.removeChild(bC[bB])}}}if(!b.support.leadingWhitespace&&ar.test(bz)){bv.insertBefore(by.createTextNode(ar.exec(bz)[0]),bv.firstChild)}bz=bv.childNodes}}var bG;if(!b.support.appendChecked){if(bz[0]&&typeof(bG=bz.length)==="number"){for(bB=0;bB<bG;bB++){E(bz[bB])}}else{E(bz)}}if(bz.nodeType){bI.push(bz)}else{bI=b.merge(bI,bz)}}if(bH){bF=function(bL){return !bL.type||bm.test(bL.type)};for(bE=0;bI[bE];bE++){if(bA&&b.nodeName(bI[bE],"script")&&(!bI[bE].type||bI[bE].type.toLowerCase()==="text/javascript")){bA.push(bI[bE].parentNode?bI[bE].parentNode.removeChild(bI[bE]):bI[bE])}else{if(bI[bE].nodeType===1){var bJ=b.grep(bI[bE].getElementsByTagName("script"),bF);bI.splice.apply(bI,[bE+1,0].concat(bJ))}bH.appendChild(bI[bE])}}}return bI},cleanData:function(bv){var by,bw,e=b.cache,bB=b.event.special,bA=b.support.deleteExpando;for(var bz=0,bx;(bx=bv[bz])!=null;bz++){if(bx.nodeName&&b.noData[bx.nodeName.toLowerCase()]){continue}bw=bx[b.expando];if(bw){by=e[bw];if(by&&by.events){for(var bC in by.events){if(bB[bC]){b.event.remove(bx,bC)}else{b.removeEvent(bx,bC,by.handle)}}if(by.handle){by.handle.elem=null}}if(bA){delete bx[b.expando]}else{if(bx.removeAttribute){bx.removeAttribute(b.expando)}}delete e[bw]}}}});function bo(e,bv){if(bv.src){b.ajax({url:bv.src,async:false,dataType:"script"})}else{b.globalEval((bv.text||bv.textContent||bv.innerHTML||"").replace(aN,"/*$0*/"))}if(bv.parentNode){bv.parentNode.removeChild(bv)}}var ak=/alpha\([^)]*\)/i,au=/opacity=([^)]*)/,z=/([A-Z]|^ms)/g,bc=/^-?\d+(?:px)?$/i,bn=/^-?\d/,I=/^([\-+])=([\-+.\de]+)/,a7={position:"absolute",visibility:"hidden",display:"block"},an=["Left","Right"],a1=["Top","Bottom"],Z,aI,aX;b.fn.css=function(e,bv){if(arguments.length===2&&bv===L){return this}return b.access(this,e,bv,true,function(bx,bw,by){return by!==L?b.style(bx,bw,by):b.css(bx,bw)})};b.extend({cssHooks:{opacity:{get:function(bw,bv){if(bv){var e=Z(bw,"opacity","opacity");return e===""?"1":e}else{return bw.style.opacity}}}},cssNumber:{fillOpacity:true,fontWeight:true,lineHeight:true,opacity:true,orphans:true,widows:true,zIndex:true,zoom:true},cssProps:{"float":b.support.cssFloat?"cssFloat":"styleFloat"},style:function(bx,bw,bD,by){if(!bx||bx.nodeType===3||bx.nodeType===8||!bx.style){return}var bB,bC,bz=b.camelCase(bw),bv=bx.style,bE=b.cssHooks[bz];bw=b.cssProps[bz]||bz;if(bD!==L){bC=typeof bD;if(bC==="string"&&(bB=I.exec(bD))){bD=(+(bB[1]+1)*+bB[2])+parseFloat(b.css(bx,bw));bC="number"}if(bD==null||bC==="number"&&isNaN(bD)){return}if(bC==="number"&&!b.cssNumber[bz]){bD+="px"}if(!bE||!("set" in bE)||(bD=bE.set(bx,bD))!==L){try{bv[bw]=bD}catch(bA){}}}else{if(bE&&"get" in bE&&(bB=bE.get(bx,false,by))!==L){return bB}return bv[bw]}},css:function(by,bx,bv){var bw,e;bx=b.camelCase(bx);e=b.cssHooks[bx];bx=b.cssProps[bx]||bx;if(bx==="cssFloat"){bx="float"}if(e&&"get" in e&&(bw=e.get(by,true,bv))!==L){return bw}else{if(Z){return Z(by,bx)}}},swap:function(bx,bw,by){var e={};for(var bv in bw){e[bv]=bx.style[bv];bx.style[bv]=bw[bv]}by.call(bx);for(bv in bw){bx.style[bv]=e[bv]}}});b.curCSS=b.css;b.each(["height","width"],function(bv,e){b.cssHooks[e]={get:function(by,bx,bw){var bz;if(bx){if(by.offsetWidth!==0){return p(by,e,bw)}else{b.swap(by,a7,function(){bz=p(by,e,bw)})}return bz}},set:function(bw,bx){if(bc.test(bx)){bx=parseFloat(bx);if(bx>=0){return bx+"px"}}else{return bx}}}});if(!b.support.opacity){b.cssHooks.opacity={get:function(bv,e){return au.test((e&&bv.currentStyle?bv.currentStyle.filter:bv.style.filter)||"")?(parseFloat(RegExp.$1)/100)+"":e?"1":""},set:function(by,bz){var bx=by.style,bv=by.currentStyle,e=b.isNumeric(bz)?"alpha(opacity="+bz*100+")":"",bw=bv&&bv.filter||bx.filter||"";bx.zoom=1;if(bz>=1&&b.trim(bw.replace(ak,""))===""){bx.removeAttribute("filter");if(bv&&!bv.filter){return}}bx.filter=ak.test(bw)?bw.replace(ak,e):bw+" "+e}}}b(function(){if(!b.support.reliableMarginRight){b.cssHooks.marginRight={get:function(bw,bv){var e;b.swap(bw,{display:"inline-block"},function(){if(bv){e=Z(bw,"margin-right","marginRight")}else{e=bw.style.marginRight}});return e}}}});if(av.defaultView&&av.defaultView.getComputedStyle){aI=function(by,bw){var bv,bx,e;bw=bw.replace(z,"-$1").toLowerCase();if((bx=by.ownerDocument.defaultView)&&(e=bx.getComputedStyle(by,null))){bv=e.getPropertyValue(bw);if(bv===""&&!b.contains(by.ownerDocument.documentElement,by)){bv=b.style(by,bw)}}return bv}}if(av.documentElement.currentStyle){aX=function(bz,bw){var bA,e,by,bv=bz.currentStyle&&bz.currentStyle[bw],bx=bz.style;if(bv===null&&bx&&(by=bx[bw])){bv=by}if(!bc.test(bv)&&bn.test(bv)){bA=bx.left;e=bz.runtimeStyle&&bz.runtimeStyle.left;if(e){bz.runtimeStyle.left=bz.currentStyle.left}bx.left=bw==="fontSize"?"1em":(bv||0);bv=bx.pixelLeft+"px";bx.left=bA;if(e){bz.runtimeStyle.left=e}}return bv===""?"auto":bv}}Z=aI||aX;function p(by,bw,bv){var bA=bw==="width"?by.offsetWidth:by.offsetHeight,bz=bw==="width"?an:a1,bx=0,e=bz.length;if(bA>0){if(bv!=="border"){for(;bx<e;bx++){if(!bv){bA-=parseFloat(b.css(by,"padding"+bz[bx]))||0}if(bv==="margin"){bA+=parseFloat(b.css(by,bv+bz[bx]))||0}else{bA-=parseFloat(b.css(by,"border"+bz[bx]+"Width"))||0}}}return bA+"px"}bA=Z(by,bw,bw);if(bA<0||bA==null){bA=by.style[bw]||0}bA=parseFloat(bA)||0;if(bv){for(;bx<e;bx++){bA+=parseFloat(b.css(by,"padding"+bz[bx]))||0;if(bv!=="padding"){bA+=parseFloat(b.css(by,"border"+bz[bx]+"Width"))||0}if(bv==="margin"){bA+=parseFloat(b.css(by,bv+bz[bx]))||0}}}return bA+"px"}if(b.expr&&b.expr.filters){b.expr.filters.hidden=function(bw){var bv=bw.offsetWidth,e=bw.offsetHeight;return(bv===0&&e===0)||(!b.support.reliableHiddenOffsets&&((bw.style&&bw.style.display)||b.css(bw,"display"))==="none")};b.expr.filters.visible=function(e){return !b.expr.filters.hidden(e)}}var k=/%20/g,ap=/\[\]$/,bs=/\r?\n/g,bq=/#.*$/,aD=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,aZ=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,aM=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,aQ=/^(?:GET|HEAD)$/,c=/^\/\//,M=/\?/,a6=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,q=/^(?:select|textarea)/i,h=/\s+/,br=/([?&])_=[^&]*/,K=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,A=b.fn.load,aa={},r={},aE,s,aV=["*/"]+["*"];try{aE=bl.href}catch(aw){aE=av.createElement("a");aE.href="";aE=aE.href}s=K.exec(aE.toLowerCase())||[];function f(e){return function(by,bA){if(typeof by!=="string"){bA=by;by="*"}if(b.isFunction(bA)){var bx=by.toLowerCase().split(h),bw=0,bz=bx.length,bv,bB,bC;for(;bw<bz;bw++){bv=bx[bw];bC=/^\+/.test(bv);if(bC){bv=bv.substr(1)||"*"}bB=e[bv]=e[bv]||[];bB[bC?"unshift":"push"](bA)}}}}function aW(bv,bE,bz,bD,bB,bx){bB=bB||bE.dataTypes[0];bx=bx||{};bx[bB]=true;var bA=bv[bB],bw=0,e=bA?bA.length:0,by=(bv===aa),bC;for(;bw<e&&(by||!bC);bw++){bC=bA[bw](bE,bz,bD);if(typeof bC==="string"){if(!by||bx[bC]){bC=L}else{bE.dataTypes.unshift(bC);bC=aW(bv,bE,bz,bD,bC,bx)}}}if((by||!bC)&&!bx["*"]){bC=aW(bv,bE,bz,bD,"*",bx)}return bC}function am(bw,bx){var bv,e,by=b.ajaxSettings.flatOptions||{};for(bv in bx){if(bx[bv]!==L){(by[bv]?bw:(e||(e={})))[bv]=bx[bv]}}if(e){b.extend(true,bw,e)}}b.fn.extend({load:function(bw,bz,bA){if(typeof bw!=="string"&&A){return A.apply(this,arguments)}else{if(!this.length){return this}}var by=bw.indexOf(" ");if(by>=0){var e=bw.slice(by,bw.length);bw=bw.slice(0,by)}var bx="GET";if(bz){if(b.isFunction(bz)){bA=bz;bz=L}else{if(typeof bz==="object"){bz=b.param(bz,b.ajaxSettings.traditional);bx="POST"}}}var bv=this;b.ajax({url:bw,type:bx,dataType:"html",data:bz,complete:function(bC,bB,bD){bD=bC.responseText;if(bC.isResolved()){bC.done(function(bE){bD=bE});bv.html(e?b("<div>").append(bD.replace(a6,"")).find(e):bD)}if(bA){bv.each(bA,[bD,bB,bC])}}});return this},serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?b.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||q.test(this.nodeName)||aZ.test(this.type))}).map(function(e,bv){var bw=b(this).val();return bw==null?null:b.isArray(bw)?b.map(bw,function(by,bx){return{name:bv.name,value:by.replace(bs,"\r\n")}}):{name:bv.name,value:bw.replace(bs,"\r\n")}}).get()}});b.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,bv){b.fn[bv]=function(bw){return this.on(bv,bw)}});b.each(["get","post"],function(e,bv){b[bv]=function(bw,by,bz,bx){if(b.isFunction(by)){bx=bx||bz;bz=by;by=L}return b.ajax({type:bv,url:bw,data:by,success:bz,dataType:bx})}});b.extend({getScript:function(e,bv){return b.get(e,L,bv,"script")},getJSON:function(e,bv,bw){return b.get(e,bv,bw,"json")},ajaxSetup:function(bv,e){if(e){am(bv,b.ajaxSettings)}else{e=bv;bv=b.ajaxSettings}am(bv,e);return bv},ajaxSettings:{url:aE,isLocal:aM.test(s[1]),global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":aV},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":bb.String,"text html":true,"text json":b.parseJSON,"text xml":b.parseXML},flatOptions:{context:true,url:true}},ajaxPrefilter:f(aa),ajaxTransport:f(r),ajax:function(bz,bx){if(typeof bz==="object"){bx=bz;bz=L}bx=bx||{};var bD=b.ajaxSetup({},bx),bS=bD.context||bD,bG=bS!==bD&&(bS.nodeType||bS instanceof b)?b(bS):b.event,bR=b.Deferred(),bN=b.Callbacks("once memory"),bB=bD.statusCode||{},bC,bH={},bO={},bQ,by,bL,bE,bI,bA=0,bw,bK,bJ={readyState:0,setRequestHeader:function(bT,bU){if(!bA){var e=bT.toLowerCase();bT=bO[e]=bO[e]||bT;bH[bT]=bU}return this},getAllResponseHeaders:function(){return bA===2?bQ:null},getResponseHeader:function(bT){var e;if(bA===2){if(!by){by={};while((e=aD.exec(bQ))){by[e[1].toLowerCase()]=e[2]}}e=by[bT.toLowerCase()]}return e===L?null:e},overrideMimeType:function(e){if(!bA){bD.mimeType=e}return this},abort:function(e){e=e||"abort";if(bL){bL.abort(e)}bF(0,e);return this}};function bF(bZ,bU,b0,bW){if(bA===2){return}bA=2;if(bE){clearTimeout(bE)}bL=L;bQ=bW||"";bJ.readyState=bZ>0?4:0;var bT,b4,b3,bX=bU,bY=b0?bj(bD,bJ,b0):L,bV,b2;if(bZ>=200&&bZ<300||bZ===304){if(bD.ifModified){if((bV=bJ.getResponseHeader("Last-Modified"))){b.lastModified[bC]=bV}if((b2=bJ.getResponseHeader("Etag"))){b.etag[bC]=b2}}if(bZ===304){bX="notmodified";bT=true}else{try{b4=G(bD,bY);bX="success";bT=true}catch(b1){bX="parsererror";b3=b1}}}else{b3=bX;if(!bX||bZ){bX="error";if(bZ<0){bZ=0}}}bJ.status=bZ;bJ.statusText=""+(bU||bX);if(bT){bR.resolveWith(bS,[b4,bX,bJ])}else{bR.rejectWith(bS,[bJ,bX,b3])}bJ.statusCode(bB);bB=L;if(bw){bG.trigger("ajax"+(bT?"Success":"Error"),[bJ,bD,bT?b4:b3])}bN.fireWith(bS,[bJ,bX]);if(bw){bG.trigger("ajaxComplete",[bJ,bD]);if(!(--b.active)){b.event.trigger("ajaxStop")}}}bR.promise(bJ);bJ.success=bJ.done;bJ.error=bJ.fail;bJ.complete=bN.add;bJ.statusCode=function(bT){if(bT){var e;if(bA<2){for(e in bT){bB[e]=[bB[e],bT[e]]}}else{e=bT[bJ.status];bJ.then(e,e)}}return this};bD.url=((bz||bD.url)+"").replace(bq,"").replace(c,s[1]+"//");bD.dataTypes=b.trim(bD.dataType||"*").toLowerCase().split(h);if(bD.crossDomain==null){bI=K.exec(bD.url.toLowerCase());bD.crossDomain=!!(bI&&(bI[1]!=s[1]||bI[2]!=s[2]||(bI[3]||(bI[1]==="http:"?80:443))!=(s[3]||(s[1]==="http:"?80:443))))}if(bD.data&&bD.processData&&typeof bD.data!=="string"){bD.data=b.param(bD.data,bD.traditional)}aW(aa,bD,bx,bJ);if(bA===2){return false}bw=bD.global;bD.type=bD.type.toUpperCase();bD.hasContent=!aQ.test(bD.type);if(bw&&b.active++===0){b.event.trigger("ajaxStart")}if(!bD.hasContent){if(bD.data){bD.url+=(M.test(bD.url)?"&":"?")+bD.data;delete bD.data}bC=bD.url;if(bD.cache===false){var bv=b.now(),bP=bD.url.replace(br,"$1_="+bv);bD.url=bP+((bP===bD.url)?(M.test(bD.url)?"&":"?")+"_="+bv:"")}}if(bD.data&&bD.hasContent&&bD.contentType!==false||bx.contentType){bJ.setRequestHeader("Content-Type",bD.contentType)}if(bD.ifModified){bC=bC||bD.url;if(b.lastModified[bC]){bJ.setRequestHeader("If-Modified-Since",b.lastModified[bC])}if(b.etag[bC]){bJ.setRequestHeader("If-None-Match",b.etag[bC])}}bJ.setRequestHeader("Accept",bD.dataTypes[0]&&bD.accepts[bD.dataTypes[0]]?bD.accepts[bD.dataTypes[0]]+(bD.dataTypes[0]!=="*"?", "+aV+"; q=0.01":""):bD.accepts["*"]);for(bK in bD.headers){bJ.setRequestHeader(bK,bD.headers[bK])}if(bD.beforeSend&&(bD.beforeSend.call(bS,bJ,bD)===false||bA===2)){bJ.abort();return false}for(bK in {success:1,error:1,complete:1}){bJ[bK](bD[bK])}bL=aW(r,bD,bx,bJ);if(!bL){bF(-1,"No Transport")}else{bJ.readyState=1;if(bw){bG.trigger("ajaxSend",[bJ,bD])}if(bD.async&&bD.timeout>0){bE=setTimeout(function(){bJ.abort("timeout")},bD.timeout)}try{bA=1;bL.send(bH,bF)}catch(bM){if(bA<2){bF(-1,bM)}else{throw bM}}}return bJ},param:function(e,bw){var bv=[],by=function(bz,bA){bA=b.isFunction(bA)?bA():bA;bv[bv.length]=encodeURIComponent(bz)+"="+encodeURIComponent(bA)};if(bw===L){bw=b.ajaxSettings.traditional}if(b.isArray(e)||(e.jquery&&!b.isPlainObject(e))){b.each(e,function(){by(this.name,this.value)})}else{for(var bx in e){v(bx,e[bx],bw,by)}}return bv.join("&").replace(k,"+")}});function v(bw,by,bv,bx){if(b.isArray(by)){b.each(by,function(bA,bz){if(bv||ap.test(bw)){bx(bw,bz)}else{v(bw+"["+(typeof bz==="object"||b.isArray(bz)?bA:"")+"]",bz,bv,bx)}})}else{if(!bv&&by!=null&&typeof by==="object"){for(var e in by){v(bw+"["+e+"]",by[e],bv,bx)}}else{bx(bw,by)}}}b.extend({active:0,lastModified:{},etag:{}});function bj(bD,bC,bz){var bv=bD.contents,bB=bD.dataTypes,bw=bD.responseFields,by,bA,bx,e;for(bA in bw){if(bA in bz){bC[bw[bA]]=bz[bA]}}while(bB[0]==="*"){bB.shift();if(by===L){by=bD.mimeType||bC.getResponseHeader("content-type")}}if(by){for(bA in bv){if(bv[bA]&&bv[bA].test(by)){bB.unshift(bA);break}}}if(bB[0] in bz){bx=bB[0]}else{for(bA in bz){if(!bB[0]||bD.converters[bA+" "+bB[0]]){bx=bA;break}if(!e){e=bA}}bx=bx||e}if(bx){if(bx!==bB[0]){bB.unshift(bx)}return bz[bx]}}function G(bH,bz){if(bH.dataFilter){bz=bH.dataFilter(bz,bH.dataType)}var bD=bH.dataTypes,bG={},bA,bE,bw=bD.length,bB,bC=bD[0],bx,by,bF,bv,e;for(bA=1;bA<bw;bA++){if(bA===1){for(bE in bH.converters){if(typeof bE==="string"){bG[bE.toLowerCase()]=bH.converters[bE]}}}bx=bC;bC=bD[bA];if(bC==="*"){bC=bx}else{if(bx!=="*"&&bx!==bC){by=bx+" "+bC;bF=bG[by]||bG["* "+bC];if(!bF){e=L;for(bv in bG){bB=bv.split(" ");if(bB[0]===bx||bB[0]==="*"){e=bG[bB[1]+" "+bC];if(e){bv=bG[bv];if(bv===true){bF=e}else{if(e===true){bF=bv}}break}}}}if(!(bF||e)){b.error("No conversion from "+by.replace(" "," to "))}if(bF!==true){bz=bF?bF(bz):e(bv(bz))}}}}return bz}var aC=b.now(),u=/(\=)\?(&|$)|\?\?/i;b.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return b.expando+"_"+(aC++)}});b.ajaxPrefilter("json jsonp",function(bD,bA,bC){var bx=bD.contentType==="application/x-www-form-urlencoded"&&(typeof bD.data==="string");if(bD.dataTypes[0]==="jsonp"||bD.jsonp!==false&&(u.test(bD.url)||bx&&u.test(bD.data))){var bB,bw=bD.jsonpCallback=b.isFunction(bD.jsonpCallback)?bD.jsonpCallback():bD.jsonpCallback,bz=bb[bw],e=bD.url,by=bD.data,bv="$1"+bw+"$2";if(bD.jsonp!==false){e=e.replace(u,bv);if(bD.url===e){if(bx){by=by.replace(u,bv)}if(bD.data===by){e+=(/\?/.test(e)?"&":"?")+bD.jsonp+"="+bw}}}bD.url=e;bD.data=by;bb[bw]=function(bE){bB=[bE]};bC.always(function(){bb[bw]=bz;if(bB&&b.isFunction(bz)){bb[bw](bB[0])}});bD.converters["script json"]=function(){if(!bB){b.error(bw+" was not called")}return bB[0]};bD.dataTypes[0]="json";return"script"}});b.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){b.globalEval(e);return e}}});b.ajaxPrefilter("script",function(e){if(e.cache===L){e.cache=false}if(e.crossDomain){e.type="GET";e.global=false}});b.ajaxTransport("script",function(bw){if(bw.crossDomain){var e,bv=av.head||av.getElementsByTagName("head")[0]||av.documentElement;return{send:function(bx,by){e=av.createElement("script");e.async="async";if(bw.scriptCharset){e.charset=bw.scriptCharset}e.src=bw.url;e.onload=e.onreadystatechange=function(bA,bz){if(bz||!e.readyState||/loaded|complete/.test(e.readyState)){e.onload=e.onreadystatechange=null;if(bv&&e.parentNode){bv.removeChild(e)}e=L;if(!bz){by(200,"success")}}};bv.insertBefore(e,bv.firstChild)},abort:function(){if(e){e.onload(0,1)}}}}});var B=bb.ActiveXObject?function(){for(var e in N){N[e](0,1)}}:false,y=0,N;function aL(){try{return new bb.XMLHttpRequest()}catch(bv){}}function aj(){try{return new bb.ActiveXObject("Microsoft.XMLHTTP")}catch(bv){}}b.ajaxSettings.xhr=bb.ActiveXObject?function(){return !this.isLocal&&aL()||aj()}:aL;(function(e){b.extend(b.support,{ajax:!!e,cors:!!e&&("withCredentials" in e)})})(b.ajaxSettings.xhr());if(b.support.ajax){b.ajaxTransport(function(e){if(!e.crossDomain||b.support.cors){var bv;return{send:function(bB,bw){var bA=e.xhr(),bz,by;if(e.username){bA.open(e.type,e.url,e.async,e.username,e.password)}else{bA.open(e.type,e.url,e.async)}if(e.xhrFields){for(by in e.xhrFields){bA[by]=e.xhrFields[by]}}if(e.mimeType&&bA.overrideMimeType){bA.overrideMimeType(e.mimeType)}if(!e.crossDomain&&!bB["X-Requested-With"]){bB["X-Requested-With"]="XMLHttpRequest"}try{for(by in bB){bA.setRequestHeader(by,bB[by])}}catch(bx){}bA.send((e.hasContent&&e.data)||null);bv=function(bK,bE){var bF,bD,bC,bI,bH;try{if(bv&&(bE||bA.readyState===4)){bv=L;if(bz){bA.onreadystatechange=b.noop;if(B){delete N[bz]}}if(bE){if(bA.readyState!==4){bA.abort()}}else{bF=bA.status;bC=bA.getAllResponseHeaders();bI={};bH=bA.responseXML;if(bH&&bH.documentElement){bI.xml=bH}bI.text=bA.responseText;try{bD=bA.statusText}catch(bJ){bD=""}if(!bF&&e.isLocal&&!e.crossDomain){bF=bI.text?200:404}else{if(bF===1223){bF=204}}}}}catch(bG){if(!bE){bw(-1,bG)}}if(bI){bw(bF,bD,bI,bC)}};if(!e.async||bA.readyState===4){bv()}else{bz=++y;if(B){if(!N){N={};b(bb).unload(B)}N[bz]=bv}bA.onreadystatechange=bv}},abort:function(){if(bv){bv(0,1)}}}}})}var Q={},a8,m,aB=/^(?:toggle|show|hide)$/,aT=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,a3,aH=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],a4;b.fn.extend({show:function(bx,bA,bz){var bw,by;if(bx||bx===0){return this.animate(a0("show",3),bx,bA,bz)}else{for(var bv=0,e=this.length;bv<e;bv++){bw=this[bv];if(bw.style){by=bw.style.display;if(!b._data(bw,"olddisplay")&&by==="none"){by=bw.style.display=""}if(by===""&&b.css(bw,"display")==="none"){b._data(bw,"olddisplay",x(bw.nodeName))}}}for(bv=0;bv<e;bv++){bw=this[bv];if(bw.style){by=bw.style.display;if(by===""||by==="none"){bw.style.display=b._data(bw,"olddisplay")||""}}}return this}},hide:function(bx,bA,bz){if(bx||bx===0){return this.animate(a0("hide",3),bx,bA,bz)}else{var bw,by,bv=0,e=this.length;for(;bv<e;bv++){bw=this[bv];if(bw.style){by=b.css(bw,"display");if(by!=="none"&&!b._data(bw,"olddisplay")){b._data(bw,"olddisplay",by)}}}for(bv=0;bv<e;bv++){if(this[bv].style){this[bv].style.display="none"}}return this}},_toggle:b.fn.toggle,toggle:function(bw,bv,bx){var e=typeof bw==="boolean";if(b.isFunction(bw)&&b.isFunction(bv)){this._toggle.apply(this,arguments)}else{if(bw==null||e){this.each(function(){var by=e?bw:b(this).is(":hidden");b(this)[by?"show":"hide"]()})}else{this.animate(a0("toggle",3),bw,bv,bx)}}return this},fadeTo:function(e,bx,bw,bv){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:bx},e,bw,bv)},animate:function(bz,bw,by,bx){var e=b.speed(bw,by,bx);if(b.isEmptyObject(bz)){return this.each(e.complete,[false])}bz=b.extend({},bz);function bv(){if(e.queue===false){b._mark(this)}var bE=b.extend({},e),bK=this.nodeType===1,bI=bK&&b(this).is(":hidden"),bB,bF,bD,bJ,bH,bC,bG,bL,bA;bE.animatedProperties={};for(bD in bz){bB=b.camelCase(bD);if(bD!==bB){bz[bB]=bz[bD];delete bz[bD]}bF=bz[bB];if(b.isArray(bF)){bE.animatedProperties[bB]=bF[1];bF=bz[bB]=bF[0]}else{bE.animatedProperties[bB]=bE.specialEasing&&bE.specialEasing[bB]||bE.easing||"swing"}if(bF==="hide"&&bI||bF==="show"&&!bI){return bE.complete.call(this)}if(bK&&(bB==="height"||bB==="width")){bE.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY];if(b.css(this,"display")==="inline"&&b.css(this,"float")==="none"){if(!b.support.inlineBlockNeedsLayout||x(this.nodeName)==="inline"){this.style.display="inline-block"}else{this.style.zoom=1}}}}if(bE.overflow!=null){this.style.overflow="hidden"}for(bD in bz){bJ=new b.fx(this,bE,bD);bF=bz[bD];if(aB.test(bF)){bA=b._data(this,"toggle"+bD)||(bF==="toggle"?bI?"show":"hide":0);if(bA){b._data(this,"toggle"+bD,bA==="show"?"hide":"show");bJ[bA]()}else{bJ[bF]()}}else{bH=aT.exec(bF);bC=bJ.cur();if(bH){bG=parseFloat(bH[2]);bL=bH[3]||(b.cssNumber[bD]?"":"px");if(bL!=="px"){b.style(this,bD,(bG||1)+bL);bC=((bG||1)/bJ.cur())*bC;b.style(this,bD,bC+bL)}if(bH[1]){bG=((bH[1]==="-="?-1:1)*bG)+bC}bJ.custom(bC,bG,bL)}else{bJ.custom(bC,bF,"")}}}return true}return e.queue===false?this.each(bv):this.queue(e.queue,bv)},stop:function(bw,bv,e){if(typeof bw!=="string"){e=bv;bv=bw;bw=L}if(bv&&bw!==false){this.queue(bw||"fx",[])}return this.each(function(){var bx,by=false,bA=b.timers,bz=b._data(this);if(!e){b._unmark(true,this)}function bB(bE,bF,bD){var bC=bF[bD];b.removeData(bE,bD,true);bC.stop(e)}if(bw==null){for(bx in bz){if(bz[bx]&&bz[bx].stop&&bx.indexOf(".run")===bx.length-4){bB(this,bz,bx)}}}else{if(bz[bx=bw+".run"]&&bz[bx].stop){bB(this,bz,bx)}}for(bx=bA.length;bx--;){if(bA[bx].elem===this&&(bw==null||bA[bx].queue===bw)){if(e){bA[bx](true)}else{bA[bx].saveState()}by=true;bA.splice(bx,1)}}if(!(e&&by)){b.dequeue(this,bw)}})}});function bh(){setTimeout(at,0);return(a4=b.now())}function at(){a4=L}function a0(bv,e){var bw={};b.each(aH.concat.apply([],aH.slice(0,e)),function(){bw[this]=bv});return bw}b.each({slideDown:a0("show",1),slideUp:a0("hide",1),slideToggle:a0("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,bv){b.fn[e]=function(bw,by,bx){return this.animate(bv,bw,by,bx)}});b.extend({speed:function(bw,bx,bv){var e=bw&&typeof bw==="object"?b.extend({},bw):{complete:bv||!bv&&bx||b.isFunction(bw)&&bw,duration:bw,easing:bv&&bx||bx&&!b.isFunction(bx)&&bx};e.duration=b.fx.off?0:typeof e.duration==="number"?e.duration:e.duration in b.fx.speeds?b.fx.speeds[e.duration]:b.fx.speeds._default;if(e.queue==null||e.queue===true){e.queue="fx"}e.old=e.complete;e.complete=function(by){if(b.isFunction(e.old)){e.old.call(this)}if(e.queue){b.dequeue(this,e.queue)}else{if(by!==false){b._unmark(this)}}};return e},easing:{linear:function(bw,bx,e,bv){return e+bv*bw},swing:function(bw,bx,e,bv){return((-Math.cos(bw*Math.PI)/2)+0.5)*bv+e}},timers:[],fx:function(bv,e,bw){this.options=e;this.elem=bv;this.prop=bw;e.orig=e.orig||{}}});b.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(b.fx.step[this.prop]||b.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var e,bv=b.css(this.elem,this.prop);return isNaN(e=parseFloat(bv))?!bv||bv==="auto"?0:bv:e},custom:function(bz,by,bx){var e=this,bw=b.fx;this.startTime=a4||bh();this.end=by;this.now=this.start=bz;this.pos=this.state=0;this.unit=bx||this.unit||(b.cssNumber[this.prop]?"":"px");function bv(bA){return e.step(bA)}bv.queue=this.options.queue;bv.elem=this.elem;bv.saveState=function(){if(e.options.hide&&b._data(e.elem,"fxshow"+e.prop)===L){b._data(e.elem,"fxshow"+e.prop,e.start)}};if(bv()&&b.timers.push(bv)&&!a3){a3=setInterval(bw.tick,bw.interval)}},show:function(){var e=b._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=e||b.style(this.elem,this.prop);this.options.show=true;if(e!==L){this.custom(this.cur(),e)}else{this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur())}b(this.elem).show()},hide:function(){this.options.orig[this.prop]=b._data(this.elem,"fxshow"+this.prop)||b.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(by){var bA,bB,bv,bx=a4||bh(),e=true,bz=this.elem,bw=this.options;if(by||bx>=bw.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();bw.animatedProperties[this.prop]=true;for(bA in bw.animatedProperties){if(bw.animatedProperties[bA]!==true){e=false}}if(e){if(bw.overflow!=null&&!b.support.shrinkWrapBlocks){b.each(["","X","Y"],function(bC,bD){bz.style["overflow"+bD]=bw.overflow[bC]})}if(bw.hide){b(bz).hide()}if(bw.hide||bw.show){for(bA in bw.animatedProperties){b.style(bz,bA,bw.orig[bA]);b.removeData(bz,"fxshow"+bA,true);b.removeData(bz,"toggle"+bA,true)}}bv=bw.complete;if(bv){bw.complete=false;bv.call(bz)}}return false}else{if(bw.duration==Infinity){this.now=bx}else{bB=bx-this.startTime;this.state=bB/bw.duration;this.pos=b.easing[bw.animatedProperties[this.prop]](this.state,bB,0,1,bw.duration);this.now=this.start+((this.end-this.start)*this.pos)}this.update()}return true}};b.extend(b.fx,{tick:function(){var bw,bv=b.timers,e=0;for(;e<bv.length;e++){bw=bv[e];if(!bw()&&bv[e]===bw){bv.splice(e--,1)}}if(!bv.length){b.fx.stop()}},interval:13,stop:function(){clearInterval(a3);a3=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(e){b.style(e.elem,"opacity",e.now)},_default:function(e){if(e.elem.style&&e.elem.style[e.prop]!=null){e.elem.style[e.prop]=e.now+e.unit}else{e.elem[e.prop]=e.now}}}});b.each(["width","height"],function(e,bv){b.fx.step[bv]=function(bw){b.style(bw.elem,bv,Math.max(0,bw.now)+bw.unit)}});if(b.expr&&b.expr.filters){b.expr.filters.animated=function(e){return b.grep(b.timers,function(bv){return e===bv.elem}).length}}function x(bx){if(!Q[bx]){var e=av.body,bv=b("<"+bx+">").appendTo(e),bw=bv.css("display");bv.remove();if(bw==="none"||bw===""){if(!a8){a8=av.createElement("iframe");a8.frameBorder=a8.width=a8.height=0}e.appendChild(a8);if(!m||!a8.createElement){m=(a8.contentWindow||a8.contentDocument).document;m.write((av.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>");m.close()}bv=m.createElement(bx);m.body.appendChild(bv);bw=b.css(bv,"display");e.removeChild(a8)}Q[bx]=bw}return Q[bx]}var V=/^t(?:able|d|h)$/i,ad=/^(?:body|html)$/i;if("getBoundingClientRect" in av.documentElement){b.fn.offset=function(bI){var by=this[0],bB;if(bI){return this.each(function(e){b.offset.setOffset(this,bI,e)})}if(!by||!by.ownerDocument){return null}if(by===by.ownerDocument.body){return b.offset.bodyOffset(by)}try{bB=by.getBoundingClientRect()}catch(bF){}var bH=by.ownerDocument,bw=bH.documentElement;if(!bB||!b.contains(bw,by)){return bB?{top:bB.top,left:bB.left}:{top:0,left:0}}var bC=bH.body,bD=aK(bH),bA=bw.clientTop||bC.clientTop||0,bE=bw.clientLeft||bC.clientLeft||0,bv=bD.pageYOffset||b.support.boxModel&&bw.scrollTop||bC.scrollTop,bz=bD.pageXOffset||b.support.boxModel&&bw.scrollLeft||bC.scrollLeft,bG=bB.top+bv-bA,bx=bB.left+bz-bE;return{top:bG,left:bx}}}else{b.fn.offset=function(bF){var bz=this[0];if(bF){return this.each(function(bG){b.offset.setOffset(this,bF,bG)})}if(!bz||!bz.ownerDocument){return null}if(bz===bz.ownerDocument.body){return b.offset.bodyOffset(bz)}var bC,bw=bz.offsetParent,bv=bz,bE=bz.ownerDocument,bx=bE.documentElement,bA=bE.body,bB=bE.defaultView,e=bB?bB.getComputedStyle(bz,null):bz.currentStyle,bD=bz.offsetTop,by=bz.offsetLeft;while((bz=bz.parentNode)&&bz!==bA&&bz!==bx){if(b.support.fixedPosition&&e.position==="fixed"){break}bC=bB?bB.getComputedStyle(bz,null):bz.currentStyle;bD-=bz.scrollTop;by-=bz.scrollLeft;if(bz===bw){bD+=bz.offsetTop;by+=bz.offsetLeft;if(b.support.doesNotAddBorder&&!(b.support.doesAddBorderForTableAndCells&&V.test(bz.nodeName))){bD+=parseFloat(bC.borderTopWidth)||0;by+=parseFloat(bC.borderLeftWidth)||0}bv=bw;bw=bz.offsetParent}if(b.support.subtractsBorderForOverflowNotVisible&&bC.overflow!=="visible"){bD+=parseFloat(bC.borderTopWidth)||0;by+=parseFloat(bC.borderLeftWidth)||0}e=bC}if(e.position==="relative"||e.position==="static"){bD+=bA.offsetTop;by+=bA.offsetLeft}if(b.support.fixedPosition&&e.position==="fixed"){bD+=Math.max(bx.scrollTop,bA.scrollTop);by+=Math.max(bx.scrollLeft,bA.scrollLeft)}return{top:bD,left:by}}}b.offset={bodyOffset:function(e){var bw=e.offsetTop,bv=e.offsetLeft;if(b.support.doesNotIncludeMarginInBodyOffset){bw+=parseFloat(b.css(e,"marginTop"))||0;bv+=parseFloat(b.css(e,"marginLeft"))||0}return{top:bw,left:bv}},setOffset:function(bx,bG,bA){var bB=b.css(bx,"position");if(bB==="static"){bx.style.position="relative"}var bz=b(bx),bv=bz.offset(),e=b.css(bx,"top"),bE=b.css(bx,"left"),bF=(bB==="absolute"||bB==="fixed")&&b.inArray("auto",[e,bE])>-1,bD={},bC={},bw,by;if(bF){bC=bz.position();bw=bC.top;by=bC.left}else{bw=parseFloat(e)||0;by=parseFloat(bE)||0}if(b.isFunction(bG)){bG=bG.call(bx,bA,bv)}if(bG.top!=null){bD.top=(bG.top-bv.top)+bw}if(bG.left!=null){bD.left=(bG.left-bv.left)+by}if("using" in bG){bG.using.call(bx,bD)}else{bz.css(bD)}}};b.fn.extend({position:function(){if(!this[0]){return null}var bw=this[0],bv=this.offsetParent(),bx=this.offset(),e=ad.test(bv[0].nodeName)?{top:0,left:0}:bv.offset();bx.top-=parseFloat(b.css(bw,"marginTop"))||0;bx.left-=parseFloat(b.css(bw,"marginLeft"))||0;e.top+=parseFloat(b.css(bv[0],"borderTopWidth"))||0;e.left+=parseFloat(b.css(bv[0],"borderLeftWidth"))||0;return{top:bx.top-e.top,left:bx.left-e.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||av.body;while(e&&(!ad.test(e.nodeName)&&b.css(e,"position")==="static")){e=e.offsetParent}return e})}});b.each(["Left","Top"],function(bv,e){var bw="scroll"+e;b.fn[bw]=function(bz){var bx,by;if(bz===L){bx=this[0];if(!bx){return null}by=aK(bx);return by?("pageXOffset" in by)?by[bv?"pageYOffset":"pageXOffset"]:b.support.boxModel&&by.document.documentElement[bw]||by.document.body[bw]:bx[bw]}return this.each(function(){by=aK(this);if(by){by.scrollTo(!bv?bz:b(by).scrollLeft(),bv?bz:b(by).scrollTop())}else{this[bw]=bz}})}});function aK(e){return b.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:false}b.each(["Height","Width"],function(bv,e){var bw=e.toLowerCase();b.fn["inner"+e]=function(){var bx=this[0];return bx?bx.style?parseFloat(b.css(bx,bw,"padding")):this[bw]():null};b.fn["outer"+e]=function(by){var bx=this[0];return bx?bx.style?parseFloat(b.css(bx,bw,by?"margin":"border")):this[bw]():null};b.fn[bw]=function(bz){var bA=this[0];if(!bA){return bz==null?null:this}if(b.isFunction(bz)){return this.each(function(bE){var bD=b(this);bD[bw](bz.call(this,bE,bD[bw]()))})}if(b.isWindow(bA)){var bB=bA.document.documentElement["client"+e],bx=bA.document.body;return bA.document.compatMode==="CSS1Compat"&&bB||bx&&bx["client"+e]||bB}else{if(bA.nodeType===9){return Math.max(bA.documentElement["client"+e],bA.body["scroll"+e],bA.documentElement["scroll"+e],bA.body["offset"+e],bA.documentElement["offset"+e])}else{if(bz===L){var bC=b.css(bA,bw),by=parseFloat(bC);return b.isNumeric(by)?by:bC}else{return this.css(bw,typeof bz==="string"?bz:bz+"px")}}}}});bb.jQuery=bb.$=b;if(typeof define==="function"&&define.amd&&define.amd.jQuery){define("jquery",[],function(){return b})}})(window);/*!
+ * jQuery UI 1.8.18
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI
+ */
+(function(a,d){a.ui=a.ui||{};if(a.ui.version){return}a.extend(a.ui,{version:"1.8.18",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});a.fn.extend({propAttr:a.fn.prop||a.fn.attr,_focus:a.fn.focus,focus:function(e,f){return typeof e==="number"?this.each(function(){var g=this;setTimeout(function(){a(g).focus();if(f){f.call(g)}},e)}):this._focus.apply(this,arguments)},scrollParent:function(){var e;if((a.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){e=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(a.curCSS(this,"position",1))&&(/(auto|scroll)/).test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0)}else{e=this.parents().filter(function(){return(/(auto|scroll)/).test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!e.length?a(document):e},zIndex:function(h){if(h!==d){return this.css("zIndex",h)}if(this.length){var f=a(this[0]),e,g;while(f.length&&f[0]!==document){e=f.css("position");if(e==="absolute"||e==="relative"||e==="fixed"){g=parseInt(f.css("zIndex"),10);if(!isNaN(g)&&g!==0){return g}}f=f.parent()}}return 0},disableSelection:function(){return this.bind((a.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});a.each(["Width","Height"],function(g,e){var f=e==="Width"?["Left","Right"]:["Top","Bottom"],h=e.toLowerCase(),k={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};function j(m,l,i,n){a.each(f,function(){l-=parseFloat(a.curCSS(m,"padding"+this,true))||0;if(i){l-=parseFloat(a.curCSS(m,"border"+this+"Width",true))||0}if(n){l-=parseFloat(a.curCSS(m,"margin"+this,true))||0}});return l}a.fn["inner"+e]=function(i){if(i===d){return k["inner"+e].call(this)}return this.each(function(){a(this).css(h,j(this,i)+"px")})};a.fn["outer"+e]=function(i,l){if(typeof i!=="number"){return k["outer"+e].call(this,i)}return this.each(function(){a(this).css(h,j(this,i,true,l)+"px")})}});function c(g,e){var j=g.nodeName.toLowerCase();if("area"===j){var i=g.parentNode,h=i.name,f;if(!g.href||!h||i.nodeName.toLowerCase()!=="map"){return false}f=a("img[usemap=#"+h+"]")[0];return !!f&&b(f)}return(/input|select|textarea|button|object/.test(j)?!g.disabled:"a"==j?g.href||e:e)&&b(g)}function b(e){return !a(e).parents().andSelf().filter(function(){return a.curCSS(this,"visibility")==="hidden"||a.expr.filters.hidden(this)}).length}a.extend(a.expr[":"],{data:function(g,f,e){return !!a.data(g,e[3])},focusable:function(e){return c(e,!isNaN(a.attr(e,"tabindex")))},tabbable:function(g){var e=a.attr(g,"tabindex"),f=isNaN(e);return(f||e>=0)&&c(g,!f)}});a(function(){var e=document.body,f=e.appendChild(f=document.createElement("div"));f.offsetHeight;a.extend(f.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});a.support.minHeight=f.offsetHeight===100;a.support.selectstart="onselectstart" in f;e.removeChild(f).style.display="none"});a.extend(a.ui,{plugin:{add:function(f,g,j){var h=a.ui[f].prototype;for(var e in j){h.plugins[e]=h.plugins[e]||[];h.plugins[e].push([g,j[e]])}},call:function(e,g,f){var j=e.plugins[g];if(!j||!e.element[0].parentNode){return}for(var h=0;h<j.length;h++){if(e.options[j[h][0]]){j[h][1].apply(e.element,f)}}}},contains:function(f,e){return document.compareDocumentPosition?f.compareDocumentPosition(e)&16:f!==e&&f.contains(e)},hasScroll:function(h,f){if(a(h).css("overflow")==="hidden"){return false}var e=(f&&f==="left")?"scrollLeft":"scrollTop",g=false;if(h[e]>0){return true}h[e]=1;g=(h[e]>0);h[e]=0;return g},isOverAxis:function(f,e,g){return(f>e)&&(f<(e+g))},isOver:function(j,f,i,h,e,g){return a.ui.isOverAxis(j,i,e)&&a.ui.isOverAxis(f,h,g)}})})(jQuery);/*!
+ * jQuery UI Widget 1.8.18
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Widget
+ */
+(function(b,d){if(b.cleanData){var c=b.cleanData;b.cleanData=function(f){for(var g=0,h;(h=f[g])!=null;g++){try{b(h).triggerHandler("remove")}catch(j){}}c(f)}}else{var a=b.fn.remove;b.fn.remove=function(e,f){return this.each(function(){if(!f){if(!e||b.filter(e,[this]).length){b("*",this).add([this]).each(function(){try{b(this).triggerHandler("remove")}catch(g){}})}}return a.call(b(this),e,f)})}}b.widget=function(f,h,e){var g=f.split(".")[0],j;f=f.split(".")[1];j=g+"-"+f;if(!e){e=h;h=b.Widget}b.expr[":"][j]=function(k){return !!b.data(k,f)};b[g]=b[g]||{};b[g][f]=function(k,l){if(arguments.length){this._createWidget(k,l)}};var i=new h();i.options=b.extend(true,{},i.options);b[g][f].prototype=b.extend(true,i,{namespace:g,widgetName:f,widgetEventPrefix:b[g][f].prototype.widgetEventPrefix||f,widgetBaseClass:j},e);b.widget.bridge(f,b[g][f])};b.widget.bridge=function(f,e){b.fn[f]=function(i){var g=typeof i==="string",h=Array.prototype.slice.call(arguments,1),j=this;i=!g&&h.length?b.extend.apply(null,[true,i].concat(h)):i;if(g&&i.charAt(0)==="_"){return j}if(g){this.each(function(){var k=b.data(this,f),l=k&&b.isFunction(k[i])?k[i].apply(k,h):k;if(l!==k&&l!==d){j=l;return false}})}else{this.each(function(){var k=b.data(this,f);if(k){k.option(i||{})._init()}else{b.data(this,f,new e(i,this))}})}return j}};b.Widget=function(e,f){if(arguments.length){this._createWidget(e,f)}};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(f,g){b.data(g,this.widgetName,this);this.element=b(g);this.options=b.extend(true,{},this.options,this._getCreateOptions(),f);var e=this;this.element.bind("remove."+this.widgetName,function(){e.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return b.metadata&&b.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(f,g){var e=f;if(arguments.length===0){return b.extend({},this.options)}if(typeof f==="string"){if(g===d){return this.options[f]}e={};e[f]=g}this._setOptions(e);return this},_setOptions:function(f){var e=this;b.each(f,function(g,h){e._setOption(g,h)});return this},_setOption:function(e,f){this.options[e]=f;if(e==="disabled"){this.widget()[f?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",f)}return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(e,f,g){var j,i,h=this.options[e];g=g||{};f=b.Event(f);f.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase();f.target=this.element[0];i=f.originalEvent;if(i){for(j in i){if(!(j in f)){f[j]=i[j]}}}this.element.trigger(f,g);return !(b.isFunction(h)&&h.call(this.element[0],f,g)===false||f.isDefaultPrevented())}}})(jQuery);/*!
+ * jQuery UI Mouse 1.8.18
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Mouse
+ *
+ * Depends:
+ * jquery.ui.widget.js
+ */
+(function(b,c){var a=false;b(document).mouseup(function(d){a=false});b.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var d=this;this.element.bind("mousedown."+this.widgetName,function(e){return d._mouseDown(e)}).bind("click."+this.widgetName,function(e){if(true===b.data(e.target,d.widgetName+".preventClickEvent")){b.removeData(e.target,d.widgetName+".preventClickEvent");e.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(f){if(a){return}(this._mouseStarted&&this._mouseUp(f));this._mouseDownEvent=f;var e=this,g=(f.which==1),d=(typeof this.options.cancel=="string"&&f.target.nodeName?b(f.target).closest(this.options.cancel).length:false);if(!g||d||!this._mouseCapture(f)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){e.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(f)&&this._mouseDelayMet(f)){this._mouseStarted=(this._mouseStart(f)!==false);if(!this._mouseStarted){f.preventDefault();return true}}if(true===b.data(f.target,this.widgetName+".preventClickEvent")){b.removeData(f.target,this.widgetName+".preventClickEvent")}this._mouseMoveDelegate=function(h){return e._mouseMove(h)};this._mouseUpDelegate=function(h){return e._mouseUp(h)};b(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);f.preventDefault();a=true;return true},_mouseMove:function(d){if(b.browser.msie&&!(document.documentMode>=9)&&!d.button){return this._mouseUp(d)}if(this._mouseStarted){this._mouseDrag(d);return d.preventDefault()}if(this._mouseDistanceMet(d)&&this._mouseDelayMet(d)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,d)!==false);(this._mouseStarted?this._mouseDrag(d):this._mouseUp(d))}return !this._mouseStarted},_mouseUp:function(d){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;if(d.target==this._mouseDownEvent.target){b.data(d.target,this.widgetName+".preventClickEvent",true)}this._mouseStop(d)}return false},_mouseDistanceMet:function(d){return(Math.max(Math.abs(this._mouseDownEvent.pageX-d.pageX),Math.abs(this._mouseDownEvent.pageY-d.pageY))>=this.options.distance)},_mouseDelayMet:function(d){return this.mouseDelayMet},_mouseStart:function(d){},_mouseDrag:function(d){},_mouseStop:function(d){},_mouseCapture:function(d){return true}})})(jQuery);(function(c,d){c.widget("ui.resizable",c.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000},_create:function(){var f=this,k=this.options;this.element.addClass("ui-resizable");c.extend(this,{_aspectRatio:!!(k.aspectRatio),aspectRatio:k.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:k.helper||k.ghost||k.animate?k.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){this.element.wrap(c('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=k.handles||(!c(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all"){this.handles="n,e,s,w,se,sw,ne,nw"}var l=this.handles.split(",");this.handles={};for(var g=0;g<l.length;g++){var j=c.trim(l[g]),e="ui-resizable-"+j;var h=c('<div class="ui-resizable-handle '+e+'"></div>');if(/sw|se|ne|nw/.test(j)){h.css({zIndex:++k.zIndex})}if("se"==j){h.addClass("ui-icon ui-icon-gripsmall-diagonal-se")}this.handles[j]=".ui-resizable-"+j;this.element.append(h)}}this._renderAxis=function(q){q=q||this.element;for(var n in this.handles){if(this.handles[n].constructor==String){this.handles[n]=c(this.handles[n],this.element).show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var o=c(this.handles[n],this.element),p=0;p=/sw|ne|nw|se|n|s/.test(n)?o.outerHeight():o.outerWidth();var m=["padding",/ne|nw|n/.test(n)?"Top":/se|sw|s/.test(n)?"Bottom":/^e$/.test(n)?"Right":"Left"].join("");q.css(m,p);this._proportionallyResize()}if(!c(this.handles[n]).length){continue}}};this._renderAxis(this.element);this._handles=c(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!f.resizing){if(this.className){var i=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}f.axis=i&&i[1]?i[1]:"se"}});if(k.autoHide){this._handles.hide();c(this.element).addClass("ui-resizable-autohide").hover(function(){if(k.disabled){return}c(this).removeClass("ui-resizable-autohide");f._handles.show()},function(){if(k.disabled){return}if(!f.resizing){c(this).addClass("ui-resizable-autohide");f._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var e=function(g){c(g).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){e(this.element);var f=this.element;f.after(this.originalElement.css({position:f.css("position"),width:f.outerWidth(),height:f.outerHeight(),top:f.css("top"),left:f.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);e(this.originalElement);return this},_mouseCapture:function(f){var g=false;for(var e in this.handles){if(c(this.handles[e])[0]==f.target){g=true}}return !this.options.disabled&&g},_mouseStart:function(g){var j=this.options,f=this.element.position(),e=this.element;this.resizing=true;this.documentScroll={top:c(document).scrollTop(),left:c(document).scrollLeft()};if(e.is(".ui-draggable")||(/absolute/).test(e.css("position"))){e.css({position:"absolute",top:f.top,left:f.left})}this._renderProxy();var k=b(this.helper.css("left")),h=b(this.helper.css("top"));if(j.containment){k+=c(j.containment).scrollLeft()||0;h+=c(j.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:k,top:h};this.size=this._helper?{width:e.outerWidth(),height:e.outerHeight()}:{width:e.width(),height:e.height()};this.originalSize=this._helper?{width:e.outerWidth(),height:e.outerHeight()}:{width:e.width(),height:e.height()};this.originalPosition={left:k,top:h};this.sizeDiff={width:e.outerWidth()-e.width(),height:e.outerHeight()-e.height()};this.originalMousePosition={left:g.pageX,top:g.pageY};this.aspectRatio=(typeof j.aspectRatio=="number")?j.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);var i=c(".ui-resizable-"+this.axis).css("cursor");c("body").css("cursor",i=="auto"?this.axis+"-resize":i);e.addClass("ui-resizable-resizing");this._propagate("start",g);return true},_mouseDrag:function(e){var h=this.helper,g=this.options,m={},q=this,j=this.originalMousePosition,n=this.axis;var r=(e.pageX-j.left)||0,p=(e.pageY-j.top)||0;var i=this._change[n];if(!i){return false}var l=i.apply(this,[e,r,p]),k=c.browser.msie&&c.browser.version<7,f=this.sizeDiff;this._updateVirtualBoundaries(e.shiftKey);if(this._aspectRatio||e.shiftKey){l=this._updateRatio(l,e)}l=this._respectSize(l,e);this._propagate("resize",e);h.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()}this._updateCache(l);this._trigger("resize",e,this.ui());return false},_mouseStop:function(h){this.resizing=false;var i=this.options,m=this;if(this._helper){var g=this._proportionallyResizeElements,e=g.length&&(/textarea/i).test(g[0].nodeName),f=e&&c.ui.hasScroll(g[0],"left")?0:m.sizeDiff.height,k=e?0:m.sizeDiff.width;var n={width:(m.helper.width()-k),height:(m.helper.height()-f)},j=(parseInt(m.element.css("left"),10)+(m.position.left-m.originalPosition.left))||null,l=(parseInt(m.element.css("top"),10)+(m.position.top-m.originalPosition.top))||null;if(!i.animate){this.element.css(c.extend(n,{top:l,left:j}))}m.helper.height(m.size.height);m.helper.width(m.size.width);if(this._helper&&!i.animate){this._proportionallyResize()}}c("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",h);if(this._helper){this.helper.remove()}return false},_updateVirtualBoundaries:function(g){var j=this.options,i,h,f,k,e;e={minWidth:a(j.minWidth)?j.minWidth:0,maxWidth:a(j.maxWidth)?j.maxWidth:Infinity,minHeight:a(j.minHeight)?j.minHeight:0,maxHeight:a(j.maxHeight)?j.maxHeight:Infinity};if(this._aspectRatio||g){i=e.minHeight*this.aspectRatio;f=e.minWidth/this.aspectRatio;h=e.maxHeight*this.aspectRatio;k=e.maxWidth/this.aspectRatio;if(i>e.minWidth){e.minWidth=i}if(f>e.minHeight){e.minHeight=f}if(h<e.maxWidth){e.maxWidth=h}if(k<e.maxHeight){e.maxHeight=k}}this._vBoundaries=e},_updateCache:function(e){var f=this.options;this.offset=this.helper.offset();if(a(e.left)){this.position.left=e.left}if(a(e.top)){this.position.top=e.top}if(a(e.height)){this.size.height=e.height}if(a(e.width)){this.size.width=e.width}},_updateRatio:function(h,g){var i=this.options,j=this.position,f=this.size,e=this.axis;if(a(h.height)){h.width=(h.height*this.aspectRatio)}else{if(a(h.width)){h.height=(h.width/this.aspectRatio)}}if(e=="sw"){h.left=j.left+(f.width-h.width);h.top=null}if(e=="nw"){h.top=j.top+(f.height-h.height);h.left=j.left+(f.width-h.width)}return h},_respectSize:function(l,g){var j=this.helper,i=this._vBoundaries,r=this._aspectRatio||g.shiftKey,q=this.axis,t=a(l.width)&&i.maxWidth&&(i.maxWidth<l.width),m=a(l.height)&&i.maxHeight&&(i.maxHeight<l.height),h=a(l.width)&&i.minWidth&&(i.minWidth>l.width),s=a(l.height)&&i.minHeight&&(i.minHeight>l.height);if(h){l.width=i.minWidth}if(s){l.height=i.minHeight}if(t){l.width=i.maxWidth}if(m){l.height=i.maxHeight}var f=this.originalPosition.left+this.originalSize.width,p=this.position.top+this.size.height;var k=/sw|nw|w/.test(q),e=/nw|ne|n/.test(q);if(h&&k){l.left=f-i.minWidth}if(t&&k){l.left=f-i.maxWidth}if(s&&e){l.top=p-i.minHeight}if(m&&e){l.top=p-i.maxHeight}var n=!l.width&&!l.height;if(n&&!l.left&&l.top){l.top=null}else{if(n&&!l.top&&l.left){l.left=null}}return l},_proportionallyResize:function(){var k=this.options;if(!this._proportionallyResizeElements.length){return}var g=this.helper||this.element;for(var f=0;f<this._proportionallyResizeElements.length;f++){var h=this._proportionallyResizeElements[f];if(!this.borderDif){var e=[h.css("borderTopWidth"),h.css("borderRightWidth"),h.css("borderBottomWidth"),h.css("borderLeftWidth")],j=[h.css("paddingTop"),h.css("paddingRight"),h.css("paddingBottom"),h.css("paddingLeft")];this.borderDif=c.map(e,function(l,n){var m=parseInt(l,10)||0,o=parseInt(j[n],10)||0;return m+o})}if(c.browser.msie&&!(!(c(g).is(":hidden")||c(g).parents(":hidden").length))){continue}h.css({height:(g.height()-this.borderDif[0]-this.borderDif[2])||0,width:(g.width()-this.borderDif[1]-this.borderDif[3])||0})}},_renderProxy:function(){var f=this.element,i=this.options;this.elementOffset=f.offset();if(this._helper){this.helper=this.helper||c('<div style="overflow:hidden;"></div>');var e=c.browser.msie&&c.browser.version<7,g=(e?1:0),h=(e?2:-1);this.helper.addClass(this._helper).css({width:this.element.outerWidth()+h,height:this.element.outerHeight()+h,position:"absolute",left:this.elementOffset.left-g+"px",top:this.elementOffset.top-g+"px",zIndex:++i.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(g,f,e){return{width:this.originalSize.width+f}},w:function(h,f,e){var j=this.options,g=this.originalSize,i=this.originalPosition;return{left:i.left+f,width:g.width-f}},n:function(h,f,e){var j=this.options,g=this.originalSize,i=this.originalPosition;return{top:i.top+e,height:g.height-e}},s:function(g,f,e){return{height:this.originalSize.height+e}},se:function(g,f,e){return c.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[g,f,e]))},sw:function(g,f,e){return c.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[g,f,e]))},ne:function(g,f,e){return c.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[g,f,e]))},nw:function(g,f,e){return c.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[g,f,e]))}},_propagate:function(f,e){c.ui.plugin.call(this,f,[e,this.ui()]);(f!="resize"&&this._trigger(f,e,this.ui()))},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});c.extend(c.ui.resizable,{version:"1.8.18"});c.ui.plugin.add("resizable","alsoResize",{start:function(f,g){var e=c(this).data("resizable"),i=e.options;var h=function(j){c(j).each(function(){var k=c(this);k.data("resizable-alsoresize",{width:parseInt(k.width(),10),height:parseInt(k.height(),10),left:parseInt(k.css("left"),10),top:parseInt(k.css("top"),10)})})};if(typeof(i.alsoResize)=="object"&&!i.alsoResize.parentNode){if(i.alsoResize.length){i.alsoResize=i.alsoResize[0];h(i.alsoResize)}else{c.each(i.alsoResize,function(j){h(j)})}}else{h(i.alsoResize)}},resize:function(g,i){var f=c(this).data("resizable"),j=f.options,h=f.originalSize,l=f.originalPosition;var k={height:(f.size.height-h.height)||0,width:(f.size.width-h.width)||0,top:(f.position.top-l.top)||0,left:(f.position.left-l.left)||0},e=function(m,n){c(m).each(function(){var q=c(this),r=c(this).data("resizable-alsoresize"),p={},o=n&&n.length?n:q.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];c.each(o,function(s,u){var t=(r[u]||0)+(k[u]||0);if(t&&t>=0){p[u]=t||null}});q.css(p)})};if(typeof(j.alsoResize)=="object"&&!j.alsoResize.nodeType){c.each(j.alsoResize,function(m,n){e(m,n)})}else{e(j.alsoResize)}},stop:function(e,f){c(this).removeData("resizable-alsoresize")}});c.ui.plugin.add("resizable","animate",{stop:function(i,n){var p=c(this).data("resizable"),j=p.options;var h=p._proportionallyResizeElements,e=h.length&&(/textarea/i).test(h[0].nodeName),f=e&&c.ui.hasScroll(h[0],"left")?0:p.sizeDiff.height,l=e?0:p.sizeDiff.width;var g={width:(p.size.width-l),height:(p.size.height-f)},k=(parseInt(p.element.css("left"),10)+(p.position.left-p.originalPosition.left))||null,m=(parseInt(p.element.css("top"),10)+(p.position.top-p.originalPosition.top))||null;p.element.animate(c.extend(g,m&&k?{top:m,left:k}:{}),{duration:j.animateDuration,easing:j.animateEasing,step:function(){var o={width:parseInt(p.element.css("width"),10),height:parseInt(p.element.css("height"),10),top:parseInt(p.element.css("top"),10),left:parseInt(p.element.css("left"),10)};if(h&&h.length){c(h[0]).css({width:o.width,height:o.height})}p._updateCache(o);p._propagate("resize",i)}})}});c.ui.plugin.add("resizable","containment",{start:function(f,r){var t=c(this).data("resizable"),j=t.options,l=t.element;var g=j.containment,k=(g instanceof c)?g.get(0):(/parent/.test(g))?l.parent().get(0):g;if(!k){return}t.containerElement=c(k);if(/document/.test(g)||g==document){t.containerOffset={left:0,top:0};t.containerPosition={left:0,top:0};t.parentData={element:c(document),left:0,top:0,width:c(document).width(),height:c(document).height()||document.body.parentNode.scrollHeight}}else{var n=c(k),i=[];c(["Top","Right","Left","Bottom"]).each(function(p,o){i[p]=b(n.css("padding"+o))});t.containerOffset=n.offset();t.containerPosition=n.position();t.containerSize={height:(n.innerHeight()-i[3]),width:(n.innerWidth()-i[1])};var q=t.containerOffset,e=t.containerSize.height,m=t.containerSize.width,h=(c.ui.hasScroll(k,"left")?k.scrollWidth:m),s=(c.ui.hasScroll(k)?k.scrollHeight:e);t.parentData={element:k,left:q.left,top:q.top,width:h,height:s}}},resize:function(g,q){var t=c(this).data("resizable"),i=t.options,f=t.containerSize,p=t.containerOffset,m=t.size,n=t.position,r=t._aspectRatio||g.shiftKey,e={top:0,left:0},h=t.containerElement;if(h[0]!=document&&(/static/).test(h.css("position"))){e=p}if(n.left<(t._helper?p.left:0)){t.size.width=t.size.width+(t._helper?(t.position.left-p.left):(t.position.left-e.left));if(r){t.size.height=t.size.width/i.aspectRatio}t.position.left=i.helper?p.left:0}if(n.top<(t._helper?p.top:0)){t.size.height=t.size.height+(t._helper?(t.position.top-p.top):t.position.top);if(r){t.size.width=t.size.height*i.aspectRatio}t.position.top=t._helper?p.top:0}t.offset.left=t.parentData.left+t.position.left;t.offset.top=t.parentData.top+t.position.top;var l=Math.abs((t._helper?t.offset.left-e.left:(t.offset.left-e.left))+t.sizeDiff.width),s=Math.abs((t._helper?t.offset.top-e.top:(t.offset.top-p.top))+t.sizeDiff.height);var k=t.containerElement.get(0)==t.element.parent().get(0),j=/relative|absolute/.test(t.containerElement.css("position"));if(k&&j){l-=t.parentData.left}if(l+t.size.width>=t.parentData.width){t.size.width=t.parentData.width-l;if(r){t.size.height=t.size.width/t.aspectRatio}}if(s+t.size.height>=t.parentData.height){t.size.height=t.parentData.height-s;if(r){t.size.width=t.size.height*t.aspectRatio}}},stop:function(f,n){var q=c(this).data("resizable"),g=q.options,l=q.position,m=q.containerOffset,e=q.containerPosition,i=q.containerElement;var j=c(q.helper),r=j.offset(),p=j.outerWidth()-q.sizeDiff.width,k=j.outerHeight()-q.sizeDiff.height;if(q._helper&&!g.animate&&(/relative/).test(i.css("position"))){c(this).css({left:r.left-e.left-m.left,width:p,height:k})}if(q._helper&&!g.animate&&(/static/).test(i.css("position"))){c(this).css({left:r.left-e.left-m.left,width:p,height:k})}}});c.ui.plugin.add("resizable","ghost",{start:function(g,h){var e=c(this).data("resizable"),i=e.options,f=e.size;e.ghost=e.originalElement.clone();e.ghost.css({opacity:0.25,display:"block",position:"relative",height:f.height,width:f.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof i.ghost=="string"?i.ghost:"");e.ghost.appendTo(e.helper)},resize:function(f,g){var e=c(this).data("resizable"),h=e.options;if(e.ghost){e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})}},stop:function(f,g){var e=c(this).data("resizable"),h=e.options;if(e.ghost&&e.helper){e.helper.get(0).removeChild(e.ghost.get(0))}}});c.ui.plugin.add("resizable","grid",{resize:function(e,m){var p=c(this).data("resizable"),h=p.options,k=p.size,i=p.originalSize,j=p.originalPosition,n=p.axis,l=h._aspectRatio||e.shiftKey;h.grid=typeof h.grid=="number"?[h.grid,h.grid]:h.grid;var g=Math.round((k.width-i.width)/(h.grid[0]||1))*(h.grid[0]||1),f=Math.round((k.height-i.height)/(h.grid[1]||1))*(h.grid[1]||1);if(/^(se|s|e)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f}else{if(/^(ne)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f;p.position.top=j.top-f}else{if(/^(sw)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f;p.position.left=j.left-g}else{p.size.width=i.width+g;p.size.height=i.height+f;p.position.top=j.top-f;p.position.left=j.left-g}}}}});var b=function(e){return parseInt(e,10)||0};var a=function(e){return !isNaN(parseInt(e,10))}})(jQuery);/*!
+ * jQuery hashchange event - v1.3 - 7/21/2010
+ * http://benalman.com/projects/jquery-hashchange-plugin/
+ *
+ * Copyright (c) 2010 "Cowboy" Ben Alman
+ * Dual licensed under the MIT and GPL licenses.
+ * http://benalman.com/about/license/
+ */
+(function($,e,b){var c="hashchange",h=document,f,g=$.event.special,i=h.documentMode,d="on"+c in e&&(i===b||i>7);function a(j){j=j||location.href;return"#"+j.replace(/^[^#]*#?(.*)$/,"$1")}$.fn[c]=function(j){return j?this.bind(c,j):this.trigger(c)};$.fn[c].delay=50;g[c]=$.extend(g[c],{setup:function(){if(d){return false}$(f.start)},teardown:function(){if(d){return false}$(f.stop)}});f=(function(){var j={},p,m=a(),k=function(q){return q},l=k,o=k;j.start=function(){p||n()};j.stop=function(){p&&clearTimeout(p);p=b};function n(){var r=a(),q=o(m);if(r!==m){l(m=r,q);$(e).trigger(c)}else{if(q!==m){location.href=location.href.replace(/#.*/,"")+q}}p=setTimeout(n,$.fn[c].delay)}$.browser.msie&&!d&&(function(){var q,r;j.start=function(){if(!q){r=$.fn[c].src;r=r&&r+a();q=$('<iframe tabindex="-1" title="empty"/>').hide().one("load",function(){r||l(a());n()}).attr("src",r||"javascript:0").insertAfter("body")[0].contentWindow;h.onpropertychange=function(){try{if(event.propertyName==="title"){q.document.title=h.title}}catch(s){}}}};j.stop=k;o=function(){return a(q.location.href)};l=function(v,s){var u=q.document,t=$.fn[c].domain;if(v!==s){u.title=h.title;u.open();t&&u.write('<script>document.domain="'+t+'"<\/script>');u.close();q.location.hash=v}}})();return j})()})(jQuery,this);(function(c){var a=c.scrollTo=function(f,e,d){c(window).scrollTo(f,e,d)};a.defaults={axis:"xy",duration:parseFloat(c.fn.jquery)>=1.3?0:1};a.window=function(d){return c(window)._scrollable()};c.fn._scrollable=function(){return this.map(function(){var e=this,d=!e.nodeName||c.inArray(e.nodeName.toLowerCase(),["iframe","#document","html","body"])!=-1;if(!d){return e}var f=(e.contentWindow||e).document||e.ownerDocument||e;return c.browser.safari||f.compatMode=="BackCompat"?f.body:f.documentElement})};c.fn.scrollTo=function(f,e,d){if(typeof e=="object"){d=e;e=0}if(typeof d=="function"){d={onAfter:d}}if(f=="max"){f=9000000000}d=c.extend({},a.defaults,d);e=e||d.speed||d.duration;d.queue=d.queue&&d.axis.length>1;if(d.queue){e/=2}d.offset=b(d.offset);d.over=b(d.over);return this._scrollable().each(function(){var l=this,j=c(l),k=f,i,g={},m=j.is("html,body");switch(typeof k){case"number":case"string":if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(k)){k=b(k);break}k=c(k,this);case"object":if(k.is||k.style){i=(k=c(k)).offset()}}c.each(d.axis.split(""),function(q,r){var s=r=="x"?"Left":"Top",u=s.toLowerCase(),p="scroll"+s,o=l[p],n=a.max(l,r);if(i){g[p]=i[u]+(m?0:o-j.offset()[u]);if(d.margin){g[p]-=parseInt(k.css("margin"+s))||0;g[p]-=parseInt(k.css("border"+s+"Width"))||0}g[p]+=d.offset[u]||0;if(d.over[u]){g[p]+=k[r=="x"?"width":"height"]()*d.over[u]}}else{var t=k[u];g[p]=t.slice&&t.slice(-1)=="%"?parseFloat(t)/100*n:t}if(/^\d+$/.test(g[p])){g[p]=g[p]<=0?0:Math.min(g[p],n)}if(!q&&d.queue){if(o!=g[p]){h(d.onAfterFirst)}delete g[p]}});h(d.onAfter);function h(n){j.animate(g,e,d.easing,n&&function(){n.call(this,f,d)})}}).end()};a.max=function(j,i){var h=i=="x"?"Width":"Height",e="scroll"+h;if(!c(j).is("html,body")){return j[e]-c(j)[h.toLowerCase()]()}var g="client"+h,f=j.ownerDocument.documentElement,d=j.ownerDocument.body;return Math.max(f[e],d[e])-Math.min(f[g],d[g])};function b(d){return typeof d=="object"?d:{top:d,left:d}}})(jQuery);/*!
+ PowerTip - v1.2.0 - 2013-04-03
+ http://stevenbenner.github.com/jquery-powertip/
+ Copyright (c) 2013 Steven Benner (http://stevenbenner.com/).
+ Released under MIT license.
+ https://raw.github.com/stevenbenner/jquery-powertip/master/LICENSE.txt
+*/
+(function(a){if(typeof define==="function"&&define.amd){define(["jquery"],a)}else{a(jQuery)}}(function(k){var A=k(document),s=k(window),w=k("body");var n="displayController",e="hasActiveHover",d="forcedOpen",u="hasMouseMove",f="mouseOnToPopup",g="originalTitle",y="powertip",o="powertipjq",l="powertiptarget",E=180/Math.PI;var c={isTipOpen:false,isFixedTipOpen:false,isClosing:false,tipOpenImminent:false,activeHover:null,currentX:0,currentY:0,previousX:0,previousY:0,desyncTimeout:null,mouseTrackingActive:false,delayInProgress:false,windowWidth:0,windowHeight:0,scrollTop:0,scrollLeft:0};var p={none:0,top:1,bottom:2,left:4,right:8};k.fn.powerTip=function(F,N){if(!this.length){return this}if(k.type(F)==="string"&&k.powerTip[F]){return k.powerTip[F].call(this,this,N)}var O=k.extend({},k.fn.powerTip.defaults,F),G=new x(O);h();this.each(function M(){var R=k(this),Q=R.data(y),P=R.data(o),T=R.data(l),S;if(R.data(n)){k.powerTip.destroy(R)}S=R.attr("title");if(!Q&&!T&&!P&&S){R.data(y,S);R.data(g,S);R.removeAttr("title")}R.data(n,new t(R,O,G))});if(!O.manual){this.on({"mouseenter.powertip":function J(P){k.powerTip.show(this,P)},"mouseleave.powertip":function L(){k.powerTip.hide(this)},"focus.powertip":function K(){k.powerTip.show(this)},"blur.powertip":function H(){k.powerTip.hide(this,true)},"keydown.powertip":function I(P){if(P.keyCode===27){k.powerTip.hide(this,true)}}})}return this};k.fn.powerTip.defaults={fadeInTime:200,fadeOutTime:100,followMouse:false,popupId:"powerTip",intentSensitivity:7,intentPollInterval:100,closeDelay:100,placement:"n",smartPlacement:false,offset:10,mouseOnToPopup:false,manual:false};k.fn.powerTip.smartPlacementLists={n:["n","ne","nw","s"],e:["e","ne","se","w","nw","sw","n","s","e"],s:["s","se","sw","n"],w:["w","nw","sw","e","ne","se","n","s","w"],nw:["nw","w","sw","n","s","se","nw"],ne:["ne","e","se","n","s","sw","ne"],sw:["sw","w","nw","s","n","ne","sw"],se:["se","e","ne","s","n","nw","se"],"nw-alt":["nw-alt","n","ne-alt","sw-alt","s","se-alt","w","e"],"ne-alt":["ne-alt","n","nw-alt","se-alt","s","sw-alt","e","w"],"sw-alt":["sw-alt","s","se-alt","nw-alt","n","ne-alt","w","e"],"se-alt":["se-alt","s","sw-alt","ne-alt","n","nw-alt","e","w"]};k.powerTip={show:function z(F,G){if(G){i(G);c.previousX=G.pageX;c.previousY=G.pageY;k(F).data(n).show()}else{k(F).first().data(n).show(true,true)}return F},reposition:function r(F){k(F).first().data(n).resetPosition();return F},hide:function D(G,F){if(G){k(G).first().data(n).hide(F)}else{if(c.activeHover){c.activeHover.data(n).hide(true)}}return G},destroy:function C(G){k(G).off(".powertip").each(function F(){var I=k(this),H=[g,n,e,d];if(I.data(g)){I.attr("title",I.data(g));H.push(y)}I.removeData(H)});return G}};k.powerTip.showTip=k.powerTip.show;k.powerTip.closeTip=k.powerTip.hide;function b(){var F=this;F.top="auto";F.left="auto";F.right="auto";F.bottom="auto";F.set=function(H,G){if(k.isNumeric(G)){F[H]=Math.round(G)}}}function t(K,N,F){var J=null;function L(P,Q){M();if(!K.data(e)){if(!P){c.tipOpenImminent=true;J=setTimeout(function O(){J=null;I()},N.intentPollInterval)}else{if(Q){K.data(d,true)}F.showTip(K)}}}function G(P){M();c.tipOpenImminent=false;if(K.data(e)){K.data(d,false);if(!P){c.delayInProgress=true;J=setTimeout(function O(){J=null;F.hideTip(K);c.delayInProgress=false},N.closeDelay)}else{F.hideTip(K)}}}function I(){var Q=Math.abs(c.previousX-c.currentX),O=Math.abs(c.previousY-c.currentY),P=Q+O;if(P<N.intentSensitivity){F.showTip(K)}else{c.previousX=c.currentX;c.previousY=c.currentY;L()}}function M(){J=clearTimeout(J);c.delayInProgress=false}function H(){F.resetPosition(K)}this.show=L;this.hide=G;this.cancel=M;this.resetPosition=H}function j(){function G(M,L,J,O,P){var K=L.split("-")[0],N=new b(),I;if(q(M)){I=H(M,K)}else{I=F(M,K)}switch(L){case"n":N.set("left",I.left-(J/2));N.set("bottom",c.windowHeight-I.top+P);break;case"e":N.set("left",I.left+P);N.set("top",I.top-(O/2));break;case"s":N.set("left",I.left-(J/2));N.set("top",I.top+P);break;case"w":N.set("top",I.top-(O/2));N.set("right",c.windowWidth-I.left+P);break;case"nw":N.set("bottom",c.windowHeight-I.top+P);N.set("right",c.windowWidth-I.left-20);break;case"nw-alt":N.set("left",I.left);N.set("bottom",c.windowHeight-I.top+P);break;case"ne":N.set("left",I.left-20);N.set("bottom",c.windowHeight-I.top+P);break;case"ne-alt":N.set("bottom",c.windowHeight-I.top+P);N.set("right",c.windowWidth-I.left);break;case"sw":N.set("top",I.top+P);N.set("right",c.windowWidth-I.left-20);break;case"sw-alt":N.set("left",I.left);N.set("top",I.top+P);break;case"se":N.set("left",I.left-20);N.set("top",I.top+P);break;case"se-alt":N.set("top",I.top+P);N.set("right",c.windowWidth-I.left);break}return N}function F(K,J){var O=K.offset(),N=K.outerWidth(),I=K.outerHeight(),M,L;switch(J){case"n":M=O.left+N/2;L=O.top;break;case"e":M=O.left+N;L=O.top+I/2;break;case"s":M=O.left+N/2;L=O.top+I;break;case"w":M=O.left;L=O.top+I/2;break;case"nw":M=O.left;L=O.top;break;case"ne":M=O.left+N;L=O.top;break;case"sw":M=O.left;L=O.top+I;break;case"se":M=O.left+N;L=O.top+I;break}return{top:L,left:M}}function H(O,K){var S=O.closest("svg")[0],N=O[0],W=S.createSVGPoint(),L=N.getBBox(),V=N.getScreenCTM(),M=L.width/2,Q=L.height/2,P=[],I=["nw","n","ne","e","se","s","sw","w"],U,X,R,T;function J(){P.push(W.matrixTransform(V))}W.x=L.x;W.y=L.y;J();W.x+=M;J();W.x+=M;J();W.y+=Q;J();W.y+=Q;J();W.x-=M;J();W.x-=M;J();W.y-=Q;J();if(P[0].y!==P[1].y||P[0].x!==P[7].x){X=Math.atan2(V.b,V.a)*E;R=Math.ceil(((X%360)-22.5)/45);if(R<1){R+=8}while(R--){I.push(I.shift())}}for(T=0;T<P.length;T++){if(I[T]===K){U=P[T];break}}return{top:U.y+c.scrollTop,left:U.x+c.scrollLeft}}this.compute=G}function x(Q){var P=new j(),O=k("#"+Q.popupId);if(O.length===0){O=k("<div/>",{id:Q.popupId});if(w.length===0){w=k("body")}w.append(O)}if(Q.followMouse){if(!O.data(u)){A.on("mousemove",M);s.on("scroll",M);O.data(u,true)}}if(Q.mouseOnToPopup){O.on({mouseenter:function L(){if(O.data(f)){if(c.activeHover){c.activeHover.data(n).cancel()}}},mouseleave:function N(){if(c.activeHover){c.activeHover.data(n).hide()}}})}function I(S){S.data(e,true);O.queue(function R(T){H(S);T()})}function H(S){var U;if(!S.data(e)){return}if(c.isTipOpen){if(!c.isClosing){K(c.activeHover)}O.delay(100).queue(function R(V){H(S);V()});return}S.trigger("powerTipPreRender");U=B(S);if(U){O.empty().append(U)}else{return}S.trigger("powerTipRender");c.activeHover=S;c.isTipOpen=true;O.data(f,Q.mouseOnToPopup);if(!Q.followMouse){G(S);c.isFixedTipOpen=true}else{M()}O.fadeIn(Q.fadeInTime,function T(){if(!c.desyncTimeout){c.desyncTimeout=setInterval(J,500)}S.trigger("powerTipOpen")})}function K(R){c.isClosing=true;c.activeHover=null;c.isTipOpen=false;c.desyncTimeout=clearInterval(c.desyncTimeout);R.data(e,false);R.data(d,false);O.fadeOut(Q.fadeOutTime,function S(){var T=new b();c.isClosing=false;c.isFixedTipOpen=false;O.removeClass();T.set("top",c.currentY+Q.offset);T.set("left",c.currentX+Q.offset);O.css(T);R.trigger("powerTipClose")})}function M(){if(!c.isFixedTipOpen&&(c.isTipOpen||(c.tipOpenImminent&&O.data(u)))){var R=O.outerWidth(),V=O.outerHeight(),U=new b(),S,T;U.set("top",c.currentY+Q.offset);U.set("left",c.currentX+Q.offset);S=m(U,R,V);if(S!==p.none){T=a(S);if(T===1){if(S===p.right){U.set("left",c.windowWidth-R)}else{if(S===p.bottom){U.set("top",c.scrollTop+c.windowHeight-V)}}}else{U.set("left",c.currentX-R-Q.offset);U.set("top",c.currentY-V-Q.offset)}}O.css(U)}}function G(S){var R,T;if(Q.smartPlacement){R=k.fn.powerTip.smartPlacementLists[Q.placement];k.each(R,function(U,W){var V=m(F(S,W),O.outerWidth(),O.outerHeight());T=W;if(V===p.none){return false}})}else{F(S,Q.placement);T=Q.placement}O.addClass(T)}function F(U,T){var R=0,S,W,V=new b();V.set("top",0);V.set("left",0);O.css(V);do{S=O.outerWidth();W=O.outerHeight();V=P.compute(U,T,S,W,Q.offset);O.css(V)}while(++R<=5&&(S!==O.outerWidth()||W!==O.outerHeight()));return V}function J(){var R=false;if(c.isTipOpen&&!c.isClosing&&!c.delayInProgress){if(c.activeHover.data(e)===false||c.activeHover.is(":disabled")){R=true}else{if(!v(c.activeHover)&&!c.activeHover.is(":focus")&&!c.activeHover.data(d)){if(O.data(f)){if(!v(O)){R=true}}else{R=true}}}if(R){K(c.activeHover)}}}this.showTip=I;this.hideTip=K;this.resetPosition=G}function q(F){return window.SVGElement&&F[0] instanceof SVGElement}function h(){if(!c.mouseTrackingActive){c.mouseTrackingActive=true;k(function H(){c.scrollLeft=s.scrollLeft();c.scrollTop=s.scrollTop();c.windowWidth=s.width();c.windowHeight=s.height()});A.on("mousemove",i);s.on({resize:function G(){c.windowWidth=s.width();c.windowHeight=s.height()},scroll:function F(){var I=s.scrollLeft(),J=s.scrollTop();if(I!==c.scrollLeft){c.currentX+=I-c.scrollLeft;c.scrollLeft=I}if(J!==c.scrollTop){c.currentY+=J-c.scrollTop;c.scrollTop=J}}})}}function i(F){c.currentX=F.pageX;c.currentY=F.pageY}function v(F){var H=F.offset(),J=F[0].getBoundingClientRect(),I=J.right-J.left,G=J.bottom-J.top;return c.currentX>=H.left&&c.currentX<=H.left+I&&c.currentY>=H.top&&c.currentY<=H.top+G}function B(I){var G=I.data(y),F=I.data(o),K=I.data(l),H,J;if(G){if(k.isFunction(G)){G=G.call(I[0])}J=G}else{if(F){if(k.isFunction(F)){F=F.call(I[0])}if(F.length>0){J=F.clone(true,true)}}else{if(K){H=k("#"+K);if(H.length>0){J=H.html()}}}}return J}function m(M,L,K){var G=c.scrollTop,J=c.scrollLeft,I=G+c.windowHeight,F=J+c.windowWidth,H=p.none;if(M.top<G||Math.abs(M.bottom-c.windowHeight)-K<G){H|=p.top}if(M.top+K>I||Math.abs(M.bottom-c.windowHeight)>I){H|=p.bottom}if(M.left<J||M.right+L>F){H|=p.left}if(M.left+L>F||M.right<J){H|=p.right}return H}function a(G){var F=0;while(G){G&=G-1;F++}return F}}));/*!
+ * jQuery UI Touch Punch 0.2.3
+ *
+ * Copyright 2011–2014, Dave Furfero
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ *
+ * Depends:
+ * jquery.ui.widget.js
+ * jquery.ui.mouse.js
+ */
+(function(b){b.support.touch="ontouchend" in document;if(!b.support.touch){return}var d=b.ui.mouse.prototype,f=d._mouseInit,c=d._mouseDestroy,a;function e(h,i){if(h.originalEvent.touches.length>1){return}h.preventDefault();var j=h.originalEvent.changedTouches[0],g=document.createEvent("MouseEvents");g.initMouseEvent(i,true,true,window,1,j.screenX,j.screenY,j.clientX,j.clientY,false,false,false,false,0,null);h.target.dispatchEvent(g)}d._touchStart=function(h){var g=this;if(a||!g._mouseCapture(h.originalEvent.changedTouches[0])){return}a=true;g._touchMoved=false;e(h,"mouseover");e(h,"mousemove");e(h,"mousedown")};d._touchMove=function(g){if(!a){return}this._touchMoved=true;e(g,"mousemove")};d._touchEnd=function(g){if(!a){return}e(g,"mouseup");e(g,"mouseout");if(!this._touchMoved){e(g,"click")}a=false};d._mouseInit=function(){var g=this;g.element.bind({touchstart:b.proxy(g,"_touchStart"),touchmove:b.proxy(g,"_touchMove"),touchend:b.proxy(g,"_touchEnd")});f.call(g)};d._mouseDestroy=function(){var g=this;g.element.unbind({touchstart:b.proxy(g,"_touchStart"),touchmove:b.proxy(g,"_touchMove"),touchend:b.proxy(g,"_touchEnd")});c.call(g)}})(jQuery);/*!
+ * SmartMenus jQuery Plugin - v1.0.0 - January 27, 2016
+ * http://www.smartmenus.org/
+ *
+ * Copyright Vasil Dinkov, Vadikom Web Ltd.
+ * http://vadikom.com
+ *
+ * Licensed MIT
+ */
+(function(a){if(typeof define==="function"&&define.amd){define(["jquery"],a)}else{if(typeof module==="object"&&typeof module.exports==="object"){module.exports=a(require("jquery"))}else{a(jQuery)}}}(function(a){var b=[],e=!!window.createPopup,f=false,d="ontouchstart" in window,h=false,g=window.requestAnimationFrame||function(l){return setTimeout(l,1000/60)},c=window.cancelAnimationFrame||function(l){clearTimeout(l)};function k(m){var n=".smartmenus_mouse";if(!h&&!m){var o=true,l=null;a(document).bind(i([["mousemove",function(s){var t={x:s.pageX,y:s.pageY,timeStamp:new Date().getTime()};if(l){var q=Math.abs(l.x-t.x),p=Math.abs(l.y-t.y);if((q>0||p>0)&&q<=2&&p<=2&&t.timeStamp-l.timeStamp<=300){f=true;if(o){var r=a(s.target).closest("a");if(r.is("a")){a.each(b,function(){if(a.contains(this.$root[0],r[0])){this.itemEnter({currentTarget:r[0]});return false}})}o=false}}}l=t}],[d?"touchstart":"pointerover pointermove pointerout MSPointerOver MSPointerMove MSPointerOut",function(p){if(j(p.originalEvent)){f=false}}]],n));h=true}else{if(h&&m){a(document).unbind(n);h=false}}}function j(l){return !/^(4|mouse)$/.test(l.pointerType)}function i(l,n){if(!n){n=""}var m={};a.each(l,function(o,p){m[p[0].split(" ").join(n+" ")+n]=p[1]});return m}a.SmartMenus=function(m,l){this.$root=a(m);this.opts=l;this.rootId="";this.accessIdPrefix="";this.$subArrow=null;this.activatedItems=[];this.visibleSubMenus=[];this.showTimeout=0;this.hideTimeout=0;this.scrollTimeout=0;this.clickActivated=false;this.focusActivated=false;this.zIndexInc=0;this.idInc=0;this.$firstLink=null;this.$firstSub=null;this.disabled=false;this.$disableOverlay=null;this.$touchScrollingSub=null;this.cssTransforms3d="perspective" in m.style||"webkitPerspective" in m.style;this.wasCollapsible=false;this.init()};a.extend(a.SmartMenus,{hideAll:function(){a.each(b,function(){this.menuHideAll()})},destroy:function(){while(b.length){b[0].destroy()}k(true)},prototype:{init:function(n){var l=this;if(!n){b.push(this);this.rootId=(new Date().getTime()+Math.random()+"").replace(/\D/g,"");this.accessIdPrefix="sm-"+this.rootId+"-";if(this.$root.hasClass("sm-rtl")){this.opts.rightToLeftSubMenus=true}var r=".smartmenus";this.$root.data("smartmenus",this).attr("data-smartmenus-id",this.rootId).dataSM("level",1).bind(i([["mouseover focusin",a.proxy(this.rootOver,this)],["mouseout focusout",a.proxy(this.rootOut,this)],["keydown",a.proxy(this.rootKeyDown,this)]],r)).delegate("a",i([["mouseenter",a.proxy(this.itemEnter,this)],["mouseleave",a.proxy(this.itemLeave,this)],["mousedown",a.proxy(this.itemDown,this)],["focus",a.proxy(this.itemFocus,this)],["blur",a.proxy(this.itemBlur,this)],["click",a.proxy(this.itemClick,this)]],r));r+=this.rootId;if(this.opts.hideOnClick){a(document).bind(i([["touchstart",a.proxy(this.docTouchStart,this)],["touchmove",a.proxy(this.docTouchMove,this)],["touchend",a.proxy(this.docTouchEnd,this)],["click",a.proxy(this.docClick,this)]],r))}a(window).bind(i([["resize orientationchange",a.proxy(this.winResize,this)]],r));if(this.opts.subIndicators){this.$subArrow=a("<span/>").addClass("sub-arrow");if(this.opts.subIndicatorsText){this.$subArrow.html(this.opts.subIndicatorsText)}}k()}this.$firstSub=this.$root.find("ul").each(function(){l.menuInit(a(this))}).eq(0);this.$firstLink=this.$root.find("a").eq(0);if(this.opts.markCurrentItem){var p=/(index|default)\.[^#\?\/]*/i,m=/#.*/,q=window.location.href.replace(p,""),o=q.replace(m,"");this.$root.find("a").each(function(){var s=this.href.replace(p,""),t=a(this);if(s==q||s==o){t.addClass("current");if(l.opts.markCurrentTree){t.parentsUntil("[data-smartmenus-id]","ul").each(function(){a(this).dataSM("parent-a").addClass("current")})}}})}this.wasCollapsible=this.isCollapsible()},destroy:function(m){if(!m){var n=".smartmenus";this.$root.removeData("smartmenus").removeAttr("data-smartmenus-id").removeDataSM("level").unbind(n).undelegate(n);n+=this.rootId;a(document).unbind(n);a(window).unbind(n);if(this.opts.subIndicators){this.$subArrow=null}}this.menuHideAll();var l=this;this.$root.find("ul").each(function(){var o=a(this);if(o.dataSM("scroll-arrows")){o.dataSM("scroll-arrows").remove()}if(o.dataSM("shown-before")){if(l.opts.subMenusMinWidth||l.opts.subMenusMaxWidth){o.css({width:"",minWidth:"",maxWidth:""}).removeClass("sm-nowrap")}if(o.dataSM("scroll-arrows")){o.dataSM("scroll-arrows").remove()}o.css({zIndex:"",top:"",left:"",marginLeft:"",marginTop:"",display:""})}if((o.attr("id")||"").indexOf(l.accessIdPrefix)==0){o.removeAttr("id")}}).removeDataSM("in-mega").removeDataSM("shown-before").removeDataSM("ie-shim").removeDataSM("scroll-arrows").removeDataSM("parent-a").removeDataSM("level").removeDataSM("beforefirstshowfired").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeAttr("aria-expanded");this.$root.find("a.has-submenu").each(function(){var o=a(this);if(o.attr("id").indexOf(l.accessIdPrefix)==0){o.removeAttr("id")}}).removeClass("has-submenu").removeDataSM("sub").removeAttr("aria-haspopup").removeAttr("aria-controls").removeAttr("aria-expanded").closest("li").removeDataSM("sub");if(this.opts.subIndicators){this.$root.find("span.sub-arrow").remove()}if(this.opts.markCurrentItem){this.$root.find("a.current").removeClass("current")}if(!m){this.$root=null;this.$firstLink=null;this.$firstSub=null;if(this.$disableOverlay){this.$disableOverlay.remove();this.$disableOverlay=null}b.splice(a.inArray(this,b),1)}},disable:function(l){if(!this.disabled){this.menuHideAll();if(!l&&!this.opts.isPopup&&this.$root.is(":visible")){var m=this.$root.offset();this.$disableOverlay=a('<div class="sm-jquery-disable-overlay"/>').css({position:"absolute",top:m.top,left:m.left,width:this.$root.outerWidth(),height:this.$root.outerHeight(),zIndex:this.getStartZIndex(true),opacity:0}).appendTo(document.body)}this.disabled=true}},docClick:function(l){if(this.$touchScrollingSub){this.$touchScrollingSub=null;return}if(this.visibleSubMenus.length&&!a.contains(this.$root[0],l.target)||a(l.target).is("a")){this.menuHideAll()}},docTouchEnd:function(m){if(!this.lastTouch){return}if(this.visibleSubMenus.length&&(this.lastTouch.x2===undefined||this.lastTouch.x1==this.lastTouch.x2)&&(this.lastTouch.y2===undefined||this.lastTouch.y1==this.lastTouch.y2)&&(!this.lastTouch.target||!a.contains(this.$root[0],this.lastTouch.target))){if(this.hideTimeout){clearTimeout(this.hideTimeout);this.hideTimeout=0}var l=this;this.hideTimeout=setTimeout(function(){l.menuHideAll()},350)}this.lastTouch=null},docTouchMove:function(m){if(!this.lastTouch){return}var l=m.originalEvent.touches[0];this.lastTouch.x2=l.pageX;this.lastTouch.y2=l.pageY},docTouchStart:function(m){var l=m.originalEvent.touches[0];this.lastTouch={x1:l.pageX,y1:l.pageY,target:l.target}},enable:function(){if(this.disabled){if(this.$disableOverlay){this.$disableOverlay.remove();this.$disableOverlay=null}this.disabled=false}},getClosestMenu:function(m){var l=a(m).closest("ul");while(l.dataSM("in-mega")){l=l.parent().closest("ul")}return l[0]||null},getHeight:function(l){return this.getOffset(l,true)},getOffset:function(n,l){var m;if(n.css("display")=="none"){m={position:n[0].style.position,visibility:n[0].style.visibility};n.css({position:"absolute",visibility:"hidden"}).show()}var o=n[0].getBoundingClientRect&&n[0].getBoundingClientRect(),p=o&&(l?o.height||o.bottom-o.top:o.width||o.right-o.left);if(!p&&p!==0){p=l?n[0].offsetHeight:n[0].offsetWidth}if(m){n.hide().css(m)}return p},getStartZIndex:function(l){var m=parseInt(this[l?"$root":"$firstSub"].css("z-index"));if(!l&&isNaN(m)){m=parseInt(this.$root.css("z-index"))}return !isNaN(m)?m:1},getTouchPoint:function(l){return l.touches&&l.touches[0]||l.changedTouches&&l.changedTouches[0]||l},getViewport:function(l){var m=l?"Height":"Width",o=document.documentElement["client"+m],n=window["inner"+m];if(n){o=Math.min(o,n)}return o},getViewportHeight:function(){return this.getViewport(true)},getViewportWidth:function(){return this.getViewport()},getWidth:function(l){return this.getOffset(l)},handleEvents:function(){return !this.disabled&&this.isCSSOn()},handleItemEvents:function(l){return this.handleEvents()&&!this.isLinkInMegaMenu(l)},isCollapsible:function(){return this.$firstSub.css("position")=="static"},isCSSOn:function(){return this.$firstLink.css("display")=="block"},isFixed:function(){var l=this.$root.css("position")=="fixed";if(!l){this.$root.parentsUntil("body").each(function(){if(a(this).css("position")=="fixed"){l=true;return false}})}return l},isLinkInMegaMenu:function(l){return a(this.getClosestMenu(l[0])).hasClass("mega-menu")},isTouchMode:function(){return !f||this.opts.noMouseOver||this.isCollapsible()},itemActivate:function(p,l){var n=p.closest("ul"),q=n.dataSM("level");if(q>1&&(!this.activatedItems[q-2]||this.activatedItems[q-2][0]!=n.dataSM("parent-a")[0])){var m=this;a(n.parentsUntil("[data-smartmenus-id]","ul").get().reverse()).add(n).each(function(){m.itemActivate(a(this).dataSM("parent-a"))})}if(!this.isCollapsible()||l){this.menuHideSubMenus(!this.activatedItems[q-1]||this.activatedItems[q-1][0]!=p[0]?q-1:q)}this.activatedItems[q-1]=p;if(this.$root.triggerHandler("activate.smapi",p[0])===false){return}var o=p.dataSM("sub");if(o&&(this.isTouchMode()||(!this.opts.showOnClick||this.clickActivated))){this.menuShow(o)}},itemBlur:function(m){var l=a(m.currentTarget);if(!this.handleItemEvents(l)){return}this.$root.triggerHandler("blur.smapi",l[0])},itemClick:function(o){var n=a(o.currentTarget);if(!this.handleItemEvents(n)){return}if(this.$touchScrollingSub&&this.$touchScrollingSub[0]==n.closest("ul")[0]){this.$touchScrollingSub=null;o.stopPropagation();return false}if(this.$root.triggerHandler("click.smapi",n[0])===false){return false}var p=a(o.target).is("span.sub-arrow"),m=n.dataSM("sub"),l=m?m.dataSM("level")==2:false;if(m&&!m.is(":visible")){if(this.opts.showOnClick&&l){this.clickActivated=true}this.itemActivate(n);if(m.is(":visible")){this.focusActivated=true;return false}}else{if(this.isCollapsible()&&p){this.itemActivate(n);this.menuHide(m);return false}}if(this.opts.showOnClick&&l||n.hasClass("disabled")||this.$root.triggerHandler("select.smapi",n[0])===false){return false}},itemDown:function(m){var l=a(m.currentTarget);if(!this.handleItemEvents(l)){return}l.dataSM("mousedown",true)},itemEnter:function(n){var m=a(n.currentTarget);if(!this.handleItemEvents(m)){return}if(!this.isTouchMode()){if(this.showTimeout){clearTimeout(this.showTimeout);this.showTimeout=0}var l=this;this.showTimeout=setTimeout(function(){l.itemActivate(m)},this.opts.showOnClick&&m.closest("ul").dataSM("level")==1?1:this.opts.showTimeout)}this.$root.triggerHandler("mouseenter.smapi",m[0])},itemFocus:function(m){var l=a(m.currentTarget);if(!this.handleItemEvents(l)){return}if(this.focusActivated&&(!this.isTouchMode()||!l.dataSM("mousedown"))&&(!this.activatedItems.length||this.activatedItems[this.activatedItems.length-1][0]!=l[0])){this.itemActivate(l,true)}this.$root.triggerHandler("focus.smapi",l[0])},itemLeave:function(m){var l=a(m.currentTarget);if(!this.handleItemEvents(l)){return}if(!this.isTouchMode()){l[0].blur();if(this.showTimeout){clearTimeout(this.showTimeout);this.showTimeout=0}}l.removeDataSM("mousedown");this.$root.triggerHandler("mouseleave.smapi",l[0])},menuHide:function(m){if(this.$root.triggerHandler("beforehide.smapi",m[0])===false){return}m.stop(true,true);if(m.css("display")!="none"){var l=function(){m.css("z-index","")};if(this.isCollapsible()){if(this.opts.collapsibleHideFunction){this.opts.collapsibleHideFunction.call(this,m,l)}else{m.hide(this.opts.collapsibleHideDuration,l)}}else{if(this.opts.hideFunction){this.opts.hideFunction.call(this,m,l)}else{m.hide(this.opts.hideDuration,l)}}if(m.dataSM("ie-shim")){m.dataSM("ie-shim").remove().css({"-webkit-transform":"",transform:""})}if(m.dataSM("scroll")){this.menuScrollStop(m);m.css({"touch-action":"","-ms-touch-action":"","-webkit-transform":"",transform:""}).unbind(".smartmenus_scroll").removeDataSM("scroll").dataSM("scroll-arrows").hide()}m.dataSM("parent-a").removeClass("highlighted").attr("aria-expanded","false");m.attr({"aria-expanded":"false","aria-hidden":"true"});var n=m.dataSM("level");this.activatedItems.splice(n-1,1);this.visibleSubMenus.splice(a.inArray(m,this.visibleSubMenus),1);this.$root.triggerHandler("hide.smapi",m[0])}},menuHideAll:function(){if(this.showTimeout){clearTimeout(this.showTimeout);this.showTimeout=0}var m=this.opts.isPopup?1:0;for(var l=this.visibleSubMenus.length-1;l>=m;l--){this.menuHide(this.visibleSubMenus[l])}if(this.opts.isPopup){this.$root.stop(true,true);if(this.$root.is(":visible")){if(this.opts.hideFunction){this.opts.hideFunction.call(this,this.$root)}else{this.$root.hide(this.opts.hideDuration)}if(this.$root.dataSM("ie-shim")){this.$root.dataSM("ie-shim").remove()}}}this.activatedItems=[];this.visibleSubMenus=[];this.clickActivated=false;this.focusActivated=false;this.zIndexInc=0;this.$root.triggerHandler("hideAll.smapi")},menuHideSubMenus:function(n){for(var l=this.activatedItems.length-1;l>=n;l--){var m=this.activatedItems[l].dataSM("sub");if(m){this.menuHide(m)}}},menuIframeShim:function(l){if(e&&this.opts.overlapControlsInIE&&!l.dataSM("ie-shim")){l.dataSM("ie-shim",a("<iframe/>").attr({src:"javascript:0",tabindex:-9}).css({position:"absolute",top:"auto",left:"0",opacity:0,border:"0"}))}},menuInit:function(l){if(!l.dataSM("in-mega")){if(l.hasClass("mega-menu")){l.find("ul").dataSM("in-mega",true)}var q=2,m=l[0];while((m=m.parentNode.parentNode)!=this.$root[0]){q++}var n=l.prevAll("a").eq(-1);if(!n.length){n=l.prevAll().find("a").eq(-1)}n.addClass("has-submenu").dataSM("sub",l);l.dataSM("parent-a",n).dataSM("level",q).parent().dataSM("sub",l);var o=n.attr("id")||this.accessIdPrefix+(++this.idInc),p=l.attr("id")||this.accessIdPrefix+(++this.idInc);n.attr({id:o,"aria-haspopup":"true","aria-controls":p,"aria-expanded":"false"});l.attr({id:p,role:"group","aria-hidden":"true","aria-labelledby":o,"aria-expanded":"false"});if(this.opts.subIndicators){n[this.opts.subIndicatorsPos](this.$subArrow.clone())}}},menuPosition:function(K){var r=K.dataSM("parent-a"),D=r.closest("li"),E=D.parent(),l=K.dataSM("level"),t=this.getWidth(K),J=this.getHeight(K),u=r.offset(),o=u.left,m=u.top,q=this.getWidth(r),F=this.getHeight(r),H=a(window),v=H.scrollLeft(),s=H.scrollTop(),z=this.getViewportWidth(),L=this.getViewportHeight(),w=E.parent().is("[data-sm-horizontal-sub]")||l==2&&!E.hasClass("sm-vertical"),B=this.opts.rightToLeftSubMenus&&!D.is("[data-sm-reverse]")||!this.opts.rightToLeftSubMenus&&D.is("[data-sm-reverse]"),p=l==2?this.opts.mainMenuSubOffsetX:this.opts.subMenusSubOffsetX,n=l==2?this.opts.mainMenuSubOffsetY:this.opts.subMenusSubOffsetY,C,A;if(w){C=B?q-t-p:p;A=this.opts.bottomToTopSubMenus?-J-n:F+n}else{C=B?p-t:q-p;A=this.opts.bottomToTopSubMenus?F-n-J:n}if(this.opts.keepInViewport){var N=o+C,M=m+A;if(B&&N<v){C=w?v-N+C:q-p}else{if(!B&&N+t>v+z){C=w?v+z-t-N+C:p-t}}if(!w){if(J<L&&M+J>s+L){A+=s+L-J-M}else{if(J>=L||M<s){A+=s-M}}}if(w&&(M+J>s+L+0.49||M<s)||!w&&J>L+0.49){var G=this;if(!K.dataSM("scroll-arrows")){K.dataSM("scroll-arrows",a([a('<span class="scroll-up"><span class="scroll-up-arrow"></span></span>')[0],a('<span class="scroll-down"><span class="scroll-down-arrow"></span></span>')[0]]).bind({mouseenter:function(){K.dataSM("scroll").up=a(this).hasClass("scroll-up");G.menuScroll(K)},mouseleave:function(x){G.menuScrollStop(K);G.menuScrollOut(K,x)},"mousewheel DOMMouseScroll":function(x){x.preventDefault()}}).insertAfter(K))}var I=".smartmenus_scroll";K.dataSM("scroll",{y:this.cssTransforms3d?0:A-F,step:1,itemH:F,subH:J,arrowDownH:this.getHeight(K.dataSM("scroll-arrows").eq(1))}).bind(i([["mouseover",function(x){G.menuScrollOver(K,x)}],["mouseout",function(x){G.menuScrollOut(K,x)}],["mousewheel DOMMouseScroll",function(x){G.menuScrollMousewheel(K,x)}]],I)).dataSM("scroll-arrows").css({top:"auto",left:"0",marginLeft:C+(parseInt(K.css("border-left-width"))||0),width:t-(parseInt(K.css("border-left-width"))||0)-(parseInt(K.css("border-right-width"))||0),zIndex:K.css("z-index")}).eq(w&&this.opts.bottomToTopSubMenus?0:1).show();if(this.isFixed()){K.css({"touch-action":"none","-ms-touch-action":"none"}).bind(i([[d?"touchstart touchmove touchend":"pointerdown pointermove pointerup MSPointerDown MSPointerMove MSPointerUp",function(x){G.menuScrollTouch(K,x)}]],I))}}}K.css({top:"auto",left:"0",marginLeft:C,marginTop:A-F});this.menuIframeShim(K);if(K.dataSM("ie-shim")){K.dataSM("ie-shim").css({zIndex:K.css("z-index"),width:t,height:J,marginLeft:C,marginTop:A-F})}},menuScroll:function(r,m,n){var p=r.dataSM("scroll"),q=r.dataSM("scroll-arrows"),o=p.up?p.upEnd:p.downEnd,s;if(!m&&p.momentum){p.momentum*=0.92;s=p.momentum;if(s<0.5){this.menuScrollStop(r);return}}else{s=n||(m||!this.opts.scrollAccelerate?this.opts.scrollStep:Math.floor(p.step))}var l=r.dataSM("level");if(this.activatedItems[l-1]&&this.activatedItems[l-1].dataSM("sub")&&this.activatedItems[l-1].dataSM("sub").is(":visible")){this.menuHideSubMenus(l-1)}p.y=p.up&&o<=p.y||!p.up&&o>=p.y?p.y:(Math.abs(o-p.y)>s?p.y+(p.up?s:-s):o);r.add(r.dataSM("ie-shim")).css(this.cssTransforms3d?{"-webkit-transform":"translate3d(0, "+p.y+"px, 0)",transform:"translate3d(0, "+p.y+"px, 0)"}:{marginTop:p.y});if(f&&(p.up&&p.y>p.downEnd||!p.up&&p.y<p.upEnd)){q.eq(p.up?1:0).show()}if(p.y==o){if(f){q.eq(p.up?0:1).hide()}this.menuScrollStop(r)}else{if(!m){if(this.opts.scrollAccelerate&&p.step<this.opts.scrollStep){p.step+=0.2}var t=this;this.scrollTimeout=g(function(){t.menuScroll(r)})}}},menuScrollMousewheel:function(m,n){if(this.getClosestMenu(n.target)==m[0]){n=n.originalEvent;var l=(n.wheelDelta||-n.detail)>0;if(m.dataSM("scroll-arrows").eq(l?0:1).is(":visible")){m.dataSM("scroll").up=l;this.menuScroll(m,true)}}n.preventDefault()},menuScrollOut:function(l,m){if(f){if(!/^scroll-(up|down)/.test((m.relatedTarget||"").className)&&(l[0]!=m.relatedTarget&&!a.contains(l[0],m.relatedTarget)||this.getClosestMenu(m.relatedTarget)!=l[0])){l.dataSM("scroll-arrows").css("visibility","hidden")}}},menuScrollOver:function(n,o){if(f){if(!/^scroll-(up|down)/.test(o.target.className)&&this.getClosestMenu(o.target)==n[0]){this.menuScrollRefreshData(n);var m=n.dataSM("scroll"),l=a(window).scrollTop()-n.dataSM("parent-a").offset().top-m.itemH;n.dataSM("scroll-arrows").eq(0).css("margin-top",l).end().eq(1).css("margin-top",l+this.getViewportHeight()-m.arrowDownH).end().css("visibility","visible")}}},menuScrollRefreshData:function(n){var m=n.dataSM("scroll"),l=a(window).scrollTop()-n.dataSM("parent-a").offset().top-m.itemH;if(this.cssTransforms3d){l=-(parseFloat(n.css("margin-top"))-l)}a.extend(m,{upEnd:l,downEnd:l+this.getViewportHeight()-m.subH})},menuScrollStop:function(l){if(this.scrollTimeout){c(this.scrollTimeout);this.scrollTimeout=0;l.dataSM("scroll").step=1;return true}},menuScrollTouch:function(p,q){q=q.originalEvent;if(j(q)){var m=this.getTouchPoint(q);if(this.getClosestMenu(m.target)==p[0]){var o=p.dataSM("scroll");if(/(start|down)$/i.test(q.type)){if(this.menuScrollStop(p)){q.preventDefault();this.$touchScrollingSub=p}else{this.$touchScrollingSub=null}this.menuScrollRefreshData(p);a.extend(o,{touchStartY:m.pageY,touchStartTime:q.timeStamp})}else{if(/move$/i.test(q.type)){var n=o.touchY!==undefined?o.touchY:o.touchStartY;if(n!==undefined&&n!=m.pageY){this.$touchScrollingSub=p;var l=n<m.pageY;if(o.up!==undefined&&o.up!=l){a.extend(o,{touchStartY:m.pageY,touchStartTime:q.timeStamp})}a.extend(o,{up:l,touchY:m.pageY});this.menuScroll(p,true,Math.abs(m.pageY-n))}q.preventDefault()}else{if(o.touchY!==undefined){if(o.momentum=Math.pow(Math.abs(m.pageY-o.touchStartY)/(q.timeStamp-o.touchStartTime),2)*15){this.menuScrollStop(p);this.menuScroll(p);q.preventDefault()}delete o.touchY}}}}}},menuShow:function(n){if(!n.dataSM("beforefirstshowfired")){n.dataSM("beforefirstshowfired",true);if(this.$root.triggerHandler("beforefirstshow.smapi",n[0])===false){return}}if(this.$root.triggerHandler("beforeshow.smapi",n[0])===false){return}n.dataSM("shown-before",true).stop(true,true);if(!n.is(":visible")){var m=n.dataSM("parent-a");if(this.opts.keepHighlighted||this.isCollapsible()){m.addClass("highlighted")}if(this.isCollapsible()){n.removeClass("sm-nowrap").css({zIndex:"",width:"auto",minWidth:"",maxWidth:"",top:"",left:"",marginLeft:"",marginTop:""})}else{n.css("z-index",this.zIndexInc=(this.zIndexInc||this.getStartZIndex())+1);if(this.opts.subMenusMinWidth||this.opts.subMenusMaxWidth){n.css({width:"auto",minWidth:"",maxWidth:""}).addClass("sm-nowrap");if(this.opts.subMenusMinWidth){n.css("min-width",this.opts.subMenusMinWidth)}if(this.opts.subMenusMaxWidth){var o=this.getWidth(n);n.css("max-width",this.opts.subMenusMaxWidth);if(o>this.getWidth(n)){n.removeClass("sm-nowrap").css("width",this.opts.subMenusMaxWidth)}}}this.menuPosition(n);if(n.dataSM("ie-shim")){n.dataSM("ie-shim").insertBefore(n)}}var l=function(){n.css("overflow","")};if(this.isCollapsible()){if(this.opts.collapsibleShowFunction){this.opts.collapsibleShowFunction.call(this,n,l)}else{n.show(this.opts.collapsibleShowDuration,l)}}else{if(this.opts.showFunction){this.opts.showFunction.call(this,n,l)}else{n.show(this.opts.showDuration,l)}}m.attr("aria-expanded","true");n.attr({"aria-expanded":"true","aria-hidden":"false"});this.visibleSubMenus.push(n);this.$root.triggerHandler("show.smapi",n[0])}},popupHide:function(l){if(this.hideTimeout){clearTimeout(this.hideTimeout);this.hideTimeout=0}var m=this;this.hideTimeout=setTimeout(function(){m.menuHideAll()},l?1:this.opts.hideTimeout)},popupShow:function(o,n){if(!this.opts.isPopup){alert('SmartMenus jQuery Error:\n\nIf you want to show this menu via the "popupShow" method, set the isPopup:true option.');return}if(this.hideTimeout){clearTimeout(this.hideTimeout);this.hideTimeout=0}this.$root.dataSM("shown-before",true).stop(true,true);if(!this.$root.is(":visible")){this.$root.css({left:o,top:n});this.menuIframeShim(this.$root);if(this.$root.dataSM("ie-shim")){this.$root.dataSM("ie-shim").css({zIndex:this.$root.css("z-index"),width:this.getWidth(this.$root),height:this.getHeight(this.$root),left:o,top:n}).insertBefore(this.$root)}var m=this,l=function(){m.$root.css("overflow","")};if(this.opts.showFunction){this.opts.showFunction.call(this,this.$root,l)}else{this.$root.show(this.opts.showDuration,l)}this.visibleSubMenus[0]=this.$root}},refresh:function(){this.destroy(true);this.init(true)},rootKeyDown:function(o){if(!this.handleEvents()){return}switch(o.keyCode){case 27:var m=this.activatedItems[0];if(m){this.menuHideAll();m[0].focus();var n=m.dataSM("sub");if(n){this.menuHide(n)}}break;case 32:var l=a(o.target);if(l.is("a")&&this.handleItemEvents(l)){var n=l.dataSM("sub");if(n&&!n.is(":visible")){this.itemClick({currentTarget:o.target});o.preventDefault()}}break}},rootOut:function(m){if(!this.handleEvents()||this.isTouchMode()||m.target==this.$root[0]){return}if(this.hideTimeout){clearTimeout(this.hideTimeout);this.hideTimeout=0}if(!this.opts.showOnClick||!this.opts.hideOnClick){var l=this;this.hideTimeout=setTimeout(function(){l.menuHideAll()},this.opts.hideTimeout)}},rootOver:function(l){if(!this.handleEvents()||this.isTouchMode()||l.target==this.$root[0]){return}if(this.hideTimeout){clearTimeout(this.hideTimeout);this.hideTimeout=0}},winResize:function(m){if(!this.handleEvents()){if(this.$disableOverlay){var n=this.$root.offset();this.$disableOverlay.css({top:n.top,left:n.left,width:this.$root.outerWidth(),height:this.$root.outerHeight()})}return}if(!("onorientationchange" in window)||m.type=="orientationchange"){var l=this.isCollapsible();if(!(this.wasCollapsible&&l)){if(this.activatedItems.length){this.activatedItems[this.activatedItems.length-1][0].blur()}this.menuHideAll()}this.wasCollapsible=l}}}});a.fn.dataSM=function(l,m){if(m){return this.data(l+"_smartmenus",m)}return this.data(l+"_smartmenus")};a.fn.removeDataSM=function(l){return this.removeData(l+"_smartmenus")};a.fn.smartmenus=function(m){if(typeof m=="string"){var l=arguments,o=m;Array.prototype.shift.call(l);return this.each(function(){var p=a(this).data("smartmenus");if(p&&p[o]){p[o].apply(p,l)}})}var n=a.extend({},a.fn.smartmenus.defaults,m);return this.each(function(){new a.SmartMenus(this,n)})};a.fn.smartmenus.defaults={isPopup:false,mainMenuSubOffsetX:0,mainMenuSubOffsetY:0,subMenusSubOffsetX:0,subMenusSubOffsetY:0,subMenusMinWidth:"10em",subMenusMaxWidth:"20em",subIndicators:true,subIndicatorsPos:"prepend",subIndicatorsText:"+",scrollStep:30,scrollAccelerate:true,showTimeout:250,hideTimeout:500,showDuration:0,showFunction:null,hideDuration:0,hideFunction:function(m,l){m.fadeOut(200,l)},collapsibleShowDuration:0,collapsibleShowFunction:function(m,l){m.slideDown(200,l)},collapsibleHideDuration:0,collapsibleHideFunction:function(m,l){m.slideUp(200,l)},showOnClick:false,hideOnClick:true,noMouseOver:false,keepInViewport:true,keepHighlighted:true,markCurrentItem:false,markCurrentTree:true,rightToLeftSubMenus:false,bottomToTopSubMenus:false,overlapControlsInIE:true};return a})); \ No newline at end of file
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/menu.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/menu.js
new file mode 100644
index 0000000..97db4c2
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/menu.js
@@ -0,0 +1,26 @@
+function initMenu(relPath,searchEnabled,serverSide,searchPage,search) {
+ function makeTree(data,relPath) {
+ var result='';
+ if ('children' in data) {
+ result+='<ul>';
+ for (var i in data.children) {
+ result+='<li><a href="'+relPath+data.children[i].url+'">'+
+ data.children[i].text+'</a>'+
+ makeTree(data.children[i],relPath)+'</li>';
+ }
+ result+='</ul>';
+ }
+ return result;
+ }
+
+ $('#main-nav').append(makeTree(menudata,relPath));
+ $('#main-nav').children(':first').addClass('sm sm-dox').attr('id','main-menu');
+ if (searchEnabled) {
+ if (serverSide) {
+ $('#main-menu').append('<li style="float:right"><div id="MSearchBox" class="MSearchBoxInactive"><div class="left"><form id="FSearchBox" action="'+searchPage+'" method="get"><img id="MSearchSelect" src="'+relPath+'search/mag.png" alt=""/><input type="text" id="MSearchField" name="query" value="'+search+'" size="20" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)"></form></div><div class="right"></div></div></li>');
+ } else {
+ $('#main-menu').append('<li style="float:right"><div id="MSearchBox" class="MSearchBoxInactive"><span class="left"><img id="MSearchSelect" src="'+relPath+'search/mag_sel.png" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" alt=""/><input type="text" id="MSearchField" value="'+search+'" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)" onkeyup="searchBox.OnSearchFieldChange(event)"/></span><span class="right"><a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="'+relPath+'search/close.png" alt=""/></a></span></div></li>');
+ }
+ }
+ $('#main-menu').smartmenus();
+}
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/menudata.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/menudata.js
new file mode 100644
index 0000000..6a15d9a
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/menudata.js
@@ -0,0 +1,51 @@
+var menudata={children:[
+{text:"Main Page",url:"index.html"},
+{text:"Classes",url:"annotated.html",children:[
+{text:"Class List",url:"annotated.html"},
+{text:"Class Index",url:"classes.html"},
+{text:"Class Members",url:"functions.html",children:[
+{text:"All",url:"functions.html"},
+{text:"Functions",url:"functions_func.html"},
+{text:"Variables",url:"functions_vars.html"},
+{text:"Typedefs",url:"functions_type.html"},
+{text:"Enumerations",url:"functions_enum.html"},
+{text:"Enumerator",url:"functions_eval.html"}]}]},
+{text:"Files",url:"files.html",children:[
+{text:"File List",url:"files.html"},
+{text:"File Members",url:"globals.html",children:[
+{text:"All",url:"globals.html",children:[
+{text:"_",url:"globals.html#index__"},
+{text:"a",url:"globals.html#index_a"},
+{text:"c",url:"globals.html#index_c"},
+{text:"e",url:"globals.html#index_e"},
+{text:"g",url:"globals.html#index_g"},
+{text:"h",url:"globals.html#index_h"},
+{text:"i",url:"globals.html#index_i"},
+{text:"l",url:"globals.html#index_l"},
+{text:"m",url:"globals.html#index_m"},
+{text:"n",url:"globals.html#index_n"},
+{text:"o",url:"globals.html#index_o"},
+{text:"p",url:"globals.html#index_p"},
+{text:"r",url:"globals.html#index_r"},
+{text:"s",url:"globals.html#index_s"},
+{text:"t",url:"globals.html#index_t"},
+{text:"u",url:"globals.html#index_u"},
+{text:"v",url:"globals.html#index_v"}]},
+{text:"Functions",url:"globals_func.html",children:[
+{text:"_",url:"globals_func.html#index__"},
+{text:"c",url:"globals_func.html#index_c"},
+{text:"e",url:"globals_func.html#index_e"},
+{text:"g",url:"globals_func.html#index_g"},
+{text:"h",url:"globals_func.html#index_h"},
+{text:"i",url:"globals_func.html#index_i"},
+{text:"m",url:"globals_func.html#index_m"},
+{text:"o",url:"globals_func.html#index_o"},
+{text:"p",url:"globals_func.html#index_p"},
+{text:"s",url:"globals_func.html#index_s"},
+{text:"t",url:"globals_func.html#index_t"},
+{text:"u",url:"globals_func.html#index_u"}]},
+{text:"Variables",url:"globals_vars.html"},
+{text:"Typedefs",url:"globals_type.html"},
+{text:"Enumerations",url:"globals_enum.html"},
+{text:"Enumerator",url:"globals_eval.html"},
+{text:"Macros",url:"globals_defs.html"}]}]}]}
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/nav_f.png b/demo#3/common/agl-service-homescreen/doc/api-ref/html/nav_f.png
new file mode 100644
index 0000000..72a58a5
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/nav_f.png
Binary files differ
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/nav_g.png b/demo#3/common/agl-service-homescreen/doc/api-ref/html/nav_g.png
new file mode 100644
index 0000000..2093a23
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/nav_g.png
Binary files differ
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/nav_h.png b/demo#3/common/agl-service-homescreen/doc/api-ref/html/nav_h.png
new file mode 100644
index 0000000..33389b1
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/nav_h.png
Binary files differ
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/open.png b/demo#3/common/agl-service-homescreen/doc/api-ref/html/open.png
new file mode 100644
index 0000000..30f75c7
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/open.png
Binary files differ
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_0.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_0.html
new file mode 100644
index 0000000..f25360b
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_0.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="all_0.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_0.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_0.js
new file mode 100644
index 0000000..e7aee8c
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_0.js
@@ -0,0 +1,13 @@
+var searchData=
+[
+ ['_5fapplication_5fname',['_application_name',['../d0/d1e/homescreen_8c.html#a1f2c79fa6801b63751e270d67994fe81',1,'homescreen.c']]],
+ ['_5fdisplay_5fmessage',['_display_message',['../d0/d1e/homescreen_8c.html#abfd6c1d6f316fa952b11553f8f275e92',1,'homescreen.c']]],
+ ['_5ferror',['_error',['../d0/d1e/homescreen_8c.html#aed1c5296a2e6d34945507a0fca17a376',1,'homescreen.c']]],
+ ['_5fgnu_5fsource',['_GNU_SOURCE',['../d0/d1e/homescreen_8c.html#a369266c24eacffb87046522897a570d5',1,'homescreen.c']]],
+ ['_5fhmi_5flog',['_HMI_LOG',['../df/d76/hmi-debug_8h.html#a0846b9d51e2e0612c4825a9a581aa40a',1,'hmi-debug.h']]],
+ ['_5fon_5fcall_5fstatic',['_on_call_static',['../d0/d8a/libhomescreen_8cpp.html#a782a05fde0f1c17e0c4c8f972a3f53c8',1,'libhomescreen.cpp']]],
+ ['_5fon_5fevent_5fstatic',['_on_event_static',['../d0/d8a/libhomescreen_8cpp.html#a3df86185aa9453726556da201d95a6f9',1,'libhomescreen.cpp']]],
+ ['_5fon_5fhangup_5fstatic',['_on_hangup_static',['../d0/d8a/libhomescreen_8cpp.html#a73c05b96c151e5e46c28585ccb143c1c',1,'libhomescreen.cpp']]],
+ ['_5fon_5freply_5fstatic',['_on_reply_static',['../d0/d8a/libhomescreen_8cpp.html#a7778933bffa862c63fa0a1b8219faa8b',1,'libhomescreen.cpp']]],
+ ['_5freply_5fmessage',['_reply_message',['../d0/d1e/homescreen_8c.html#a79b0f0b481161527ccb80e83da143219',1,'homescreen.c']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_1.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_1.html
new file mode 100644
index 0000000..b13f0f7
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_1.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="all_1.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_1.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_1.js
new file mode 100644
index 0000000..c9f1816
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_1.js
@@ -0,0 +1,7 @@
+var searchData=
+[
+ ['afb_5fbinding_5fversion',['AFB_BINDING_VERSION',['../d0/d1e/homescreen_8c.html#ad2c1fbc92ba364fcf83f15e6d0af66f0',1,'AFB_BINDING_VERSION():&#160;homescreen.c'],['../d3/d3d/hs-helper_8h.html#ad2c1fbc92ba364fcf83f15e6d0af66f0',1,'AFB_BINDING_VERSION():&#160;hs-helper.h']]],
+ ['afbbindingv2',['afbBindingV2',['../d0/d1e/homescreen_8c.html#ae2a62ab481a2922cbfc788193857a12e',1,'homescreen.c']]],
+ ['api',['API',['../d0/d8a/libhomescreen_8cpp.html#a1e2d6e77dd8f0162f830058579eab42f',1,'libhomescreen.cpp']]],
+ ['api_5flist',['api_list',['../de/dd0/class_lib_home_screen.html#a5593ff5ac78f6495ccb649904cf0ab08',1,'LibHomeScreen']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_10.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_10.html
new file mode 100644
index 0000000..d1345a1
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_10.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="all_10.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_10.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_10.js
new file mode 100644
index 0000000..954e53b
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_10.js
@@ -0,0 +1,4 @@
+var searchData=
+[
+ ['verbs',['verbs',['../d0/d1e/homescreen_8c.html#acad6dadf60fac3d701e488e4fcd11c89',1,'homescreen.c']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_11.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_11.html
new file mode 100644
index 0000000..2be8b71
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_11.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="all_11.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_11.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_11.js
new file mode 100644
index 0000000..5b08f6d
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_11.js
@@ -0,0 +1,4 @@
+var searchData=
+[
+ ['_7elibhomescreen',['~LibHomeScreen',['../de/dd0/class_lib_home_screen.html#a249902aebf71a5383ca8ec6ae558d095',1,'LibHomeScreen']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_12.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_12.html
new file mode 100644
index 0000000..13c5263
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_12.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="all_12.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_12.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_12.js
new file mode 100644
index 0000000..5b08f6d
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_12.js
@@ -0,0 +1,4 @@
+var searchData=
+[
+ ['_7elibhomescreen',['~LibHomeScreen',['../de/dd0/class_lib_home_screen.html#a249902aebf71a5383ca8ec6ae558d095',1,'LibHomeScreen']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_2.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_2.html
new file mode 100644
index 0000000..9543c57
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_2.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="all_2.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_2.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_2.js
new file mode 100644
index 0000000..3e9676b
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_2.js
@@ -0,0 +1,6 @@
+var searchData=
+[
+ ['call',['call',['../de/dd0/class_lib_home_screen.html#a527b49dcfe581be6275d0eb2236ba37f',1,'LibHomeScreen::call(const std::string &amp;verb, struct json_object *arg)'],['../de/dd0/class_lib_home_screen.html#ab5e8e8ab7d53e0f114e9e907fcbb7643',1,'LibHomeScreen::call(const char *verb, struct json_object *arg)']]],
+ ['call_5ftest',['call_test',['../df/dac/test_8cpp.html#aa9b3c43c212b49edee82ac30a11aa255',1,'test.cpp']]],
+ ['command_5fevent_5fnum',['COMMAND_EVENT_NUM',['../d0/d1e/homescreen_8c.html#a09f43d9e7e1c5d2198c0d66024b4500e',1,'homescreen.c']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_3.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_3.html
new file mode 100644
index 0000000..03405c0
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_3.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="all_3.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_3.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_3.js
new file mode 100644
index 0000000..495680f
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_3.js
@@ -0,0 +1,17 @@
+var searchData=
+[
+ ['error_5fflag',['ERROR_FLAG',['../df/d76/hmi-debug_8h.html#a13d4c7647aad2e84766f8b48a6caab09',1,'hmi-debug.h']]],
+ ['ev_5fon_5fscreen_5fmessage',['ev_on_screen_message',['../d0/d1e/homescreen_8c.html#af7cfc4f688bb898c09291252c4cb832c',1,'homescreen.c']]],
+ ['ev_5fon_5fscreen_5freply',['ev_on_screen_reply',['../d0/d1e/homescreen_8c.html#a5c225341e0ecbae0585302ef754a55ec',1,'homescreen.c']]],
+ ['ev_5freserved',['ev_reserved',['../d0/d1e/homescreen_8c.html#a25fbdcc4e5787e3f41d99f4a71e86611',1,'homescreen.c']]],
+ ['ev_5ftap_5fshortcut',['ev_tap_shortcut',['../d0/d1e/homescreen_8c.html#a2af1ff5a4cbf03125e61e903832035f5',1,'homescreen.c']]],
+ ['event',['event',['../df/d7d/structevent.html',1,'event'],['../df/d7d/structevent.html#a58726ebc551d36562ac3f9e1fe293214',1,'event::event()']]],
+ ['event_5flist',['event_list',['../de/dd0/class_lib_home_screen.html#a6a6d8a4d33a006a08652e7377a4c29e9',1,'LibHomeScreen::event_list()'],['../d0/d1e/homescreen_8c.html#a1c3c5bfa861dcb58d9e9d216d893864c',1,'event_list():&#160;homescreen.c']]],
+ ['event_5floop_5frun',['event_loop_run',['../d0/d8a/libhomescreen_8cpp.html#aa73353e1bf62c68b6b0aba7a1e4e275e',1,'libhomescreen.cpp']]],
+ ['event_5fonscreenmessage',['Event_OnScreenMessage',['../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154aea56fa32a124a8ddcbea127755280a1d',1,'LibHomeScreen']]],
+ ['event_5fonscreenreply',['Event_OnScreenReply',['../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154acae91db4efc2394fd701f581d277a3fd',1,'LibHomeScreen']]],
+ ['event_5fsubscribe_5ferror_5fcode',['EVENT_SUBSCRIBE_ERROR_CODE',['../d0/d1e/homescreen_8c.html#a9a68ed04201d9390bb85b2c6ab1d7250',1,'homescreen.c']]],
+ ['event_5ftapshortcut',['Event_TapShortcut',['../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154a4b0a82d501e4db5fbfe25c254c92896f',1,'LibHomeScreen']]],
+ ['eventtype',['EventType',['../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154',1,'LibHomeScreen']]],
+ ['evlist',['evlist',['../d3/d3d/hs-helper_8h.html#a0cd84b1a2184c9b84d1b7bf24582f28e',1,'hs-helper.h']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_4.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_4.html
new file mode 100644
index 0000000..8e1f4b9
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_4.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="all_4.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_4.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_4.js
new file mode 100644
index 0000000..15928c8
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_4.js
@@ -0,0 +1,6 @@
+var searchData=
+[
+ ['get_5fvalue_5fint16',['get_value_int16',['../dd/d1d/hs-helper_8c.html#a2e62366684e39ea94436bf017e416827',1,'get_value_int16(const struct afb_req request, const char *source, int16_t *out_id):&#160;hs-helper.c'],['../d3/d3d/hs-helper_8h.html#a2e62366684e39ea94436bf017e416827',1,'get_value_int16(const struct afb_req request, const char *source, int16_t *out_id):&#160;hs-helper.c']]],
+ ['get_5fvalue_5fint32',['get_value_int32',['../dd/d1d/hs-helper_8c.html#ac5b0370643c520377afd3fd4891918d2',1,'get_value_int32(const struct afb_req request, const char *source, int32_t *out_id):&#160;hs-helper.c'],['../d3/d3d/hs-helper_8h.html#ac5b0370643c520377afd3fd4891918d2',1,'get_value_int32(const struct afb_req request, const char *source, int32_t *out_id):&#160;hs-helper.c']]],
+ ['get_5fvalue_5fuint16',['get_value_uint16',['../dd/d1d/hs-helper_8c.html#a649900645417f2df3a70b9ad67529f53',1,'get_value_uint16(const struct afb_req request, const char *source, uint16_t *out_id):&#160;hs-helper.c'],['../d3/d3d/hs-helper_8h.html#a649900645417f2df3a70b9ad67529f53',1,'get_value_uint16(const struct afb_req request, const char *source, uint16_t *out_id):&#160;hs-helper.c']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_5.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_5.html
new file mode 100644
index 0000000..89a879e
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_5.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="all_5.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_5.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_5.js
new file mode 100644
index 0000000..70c41b2
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_5.js
@@ -0,0 +1,19 @@
+var searchData=
+[
+ ['handler_5ffunc',['handler_func',['../de/dd0/class_lib_home_screen.html#a334f11f81c84c98d18284215dcaada3a',1,'LibHomeScreen']]],
+ ['has_5fverb',['has_verb',['../d0/d8a/libhomescreen_8cpp.html#a7a2176c3d71fec0f09dcb2aa0866b17e',1,'libhomescreen.cpp']]],
+ ['hmi_2ddebug_2eh',['hmi-debug.h',['../df/d76/hmi-debug_8h.html',1,'']]],
+ ['hmi_5fdebug',['HMI_DEBUG',['../df/d76/hmi-debug_8h.html#a0d26d8b8201011dade787236519711c0',1,'hmi-debug.h']]],
+ ['hmi_5ferror',['HMI_ERROR',['../df/d76/hmi-debug_8h.html#a65bb6c7cfe38f8a724beab5059d36fb2',1,'hmi-debug.h']]],
+ ['hmi_5finfo',['HMI_INFO',['../df/d76/hmi-debug_8h.html#a11b249a67108f0f4c50a0fc8a3eb4f5c',1,'hmi-debug.h']]],
+ ['hmi_5fnotice',['HMI_NOTICE',['../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15',1,'hmi-debug.h']]],
+ ['hmi_5fwarning',['HMI_WARNING',['../df/d76/hmi-debug_8h.html#a25361812432cd2480bc8f1a8e56ecbf7',1,'hmi-debug.h']]],
+ ['homescreen_2ec',['homescreen.c',['../d0/d1e/homescreen_8c.html',1,'']]],
+ ['hs',['hs',['../df/dac/test_8cpp.html#a529acbd1fed9d98a587edfa62309fa8d',1,'test.cpp']]],
+ ['hs_2dhelper_2ec',['hs-helper.c',['../dd/d1d/hs-helper_8c.html',1,'']]],
+ ['hs_2dhelper_2eh',['hs-helper.h',['../d3/d3d/hs-helper_8h.html',1,'']]],
+ ['hs_5fadd_5fobject_5fto_5fjson_5fobject',['hs_add_object_to_json_object',['../dd/d1d/hs-helper_8c.html#a1ba31a6a94515ff1730ba0043a67d59e',1,'hs_add_object_to_json_object(struct json_object *j_obj, int count,...):&#160;hs-helper.c'],['../d3/d3d/hs-helper_8h.html#a1ba31a6a94515ff1730ba0043a67d59e',1,'hs_add_object_to_json_object(struct json_object *j_obj, int count,...):&#160;hs-helper.c']]],
+ ['hs_5fadd_5fobject_5fto_5fjson_5fobject_5ffunc',['hs_add_object_to_json_object_func',['../dd/d1d/hs-helper_8c.html#ae83604a37134e7bdee3ce4f10bb0b47a',1,'hs_add_object_to_json_object_func(struct json_object *j_obj, const char *verb_name, int count,...):&#160;hs-helper.c'],['../d3/d3d/hs-helper_8h.html#ae83604a37134e7bdee3ce4f10bb0b47a',1,'hs_add_object_to_json_object_func(struct json_object *j_obj, const char *verb_name, int count,...):&#160;hs-helper.c']]],
+ ['hs_5fadd_5fobject_5fto_5fjson_5fobject_5fstr',['hs_add_object_to_json_object_str',['../dd/d1d/hs-helper_8c.html#a8777c53f1d4d5412f19b134ad85ffedf',1,'hs_add_object_to_json_object_str(struct json_object *j_obj, int count,...):&#160;hs-helper.c'],['../d3/d3d/hs-helper_8h.html#a8777c53f1d4d5412f19b134ad85ffedf',1,'hs_add_object_to_json_object_str(struct json_object *j_obj, int count,...):&#160;hs-helper.c']]],
+ ['hs_5fsearch_5fevent_5fname_5findex',['hs_search_event_name_index',['../dd/d1d/hs-helper_8c.html#a2ff1b894941c3b461ca8119079c4146a',1,'hs_search_event_name_index(const char *value):&#160;hs-helper.c'],['../d3/d3d/hs-helper_8h.html#a2ff1b894941c3b461ca8119079c4146a',1,'hs_search_event_name_index(const char *value):&#160;hs-helper.c']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_6.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_6.html
new file mode 100644
index 0000000..6afac06
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_6.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="all_6.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_6.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_6.js
new file mode 100644
index 0000000..a3186af
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_6.js
@@ -0,0 +1,4 @@
+var searchData=
+[
+ ['init',['init',['../de/dd0/class_lib_home_screen.html#a6a57b573cc767725762ba9beab032220',1,'LibHomeScreen::init()'],['../d0/d1e/homescreen_8c.html#a00cbbc0f3f4452db078ae511684a6adc',1,'init():&#160;homescreen.c']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_7.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_7.html
new file mode 100644
index 0000000..de19107
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_7.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="all_7.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_7.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_7.js
new file mode 100644
index 0000000..8d1544e
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_7.js
@@ -0,0 +1,14 @@
+var searchData=
+[
+ ['libhomescreen',['LibHomeScreen',['../de/dd0/class_lib_home_screen.html',1,'LibHomeScreen'],['../de/dd0/class_lib_home_screen.html#a724bd949c4154fad041f96a15ef0f5dc',1,'LibHomeScreen::LibHomeScreen()'],['../de/dd0/class_lib_home_screen.html#a0fff2f703c8ce184eb9edd133e0f4137',1,'LibHomeScreen::LibHomeScreen(const LibHomeScreen &amp;)=delete']]],
+ ['libhomescreen_2ecpp',['libhomescreen.cpp',['../d0/d8a/libhomescreen_8cpp.html',1,'']]],
+ ['libhomescreen_2ehpp',['libhomescreen.hpp',['../df/d43/libhomescreen_8hpp.html',1,'']]],
+ ['log_5flevel',['LOG_LEVEL',['../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583',1,'hmi-debug.h']]],
+ ['log_5flevel_5fdebug',['LOG_LEVEL_DEBUG',['../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a538b2b6e011479d408ecd2be0f6d6177',1,'hmi-debug.h']]],
+ ['log_5flevel_5ferror',['LOG_LEVEL_ERROR',['../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a5b40f003febbc3b535649d63f4b8a44f',1,'hmi-debug.h']]],
+ ['log_5flevel_5finfo',['LOG_LEVEL_INFO',['../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583aedee1e3159bfe7d918b6e29873c5aee4',1,'hmi-debug.h']]],
+ ['log_5flevel_5fmax',['LOG_LEVEL_MAX',['../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a0459003454bc8bb17752e6d8e5787444',1,'hmi-debug.h']]],
+ ['log_5flevel_5fnone',['LOG_LEVEL_NONE',['../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a69dacb1837e1e37c6ed34cc2ee1d8848',1,'hmi-debug.h']]],
+ ['log_5flevel_5fnotice',['LOG_LEVEL_NOTICE',['../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a23ae4d711a7bbb3900240cb7316b4b4e',1,'hmi-debug.h']]],
+ ['log_5flevel_5fwarning',['LOG_LEVEL_WARNING',['../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a5b4dd81b4dc7eefbc55ba03415c627ef',1,'hmi-debug.h']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_8.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_8.html
new file mode 100644
index 0000000..11e27cd
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_8.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="all_8.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_8.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_8.js
new file mode 100644
index 0000000..65e8f49
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_8.js
@@ -0,0 +1,4 @@
+var searchData=
+[
+ ['main',['main',['../df/dac/test_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627',1,'test.cpp']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_9.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_9.html
new file mode 100644
index 0000000..f8abbbe
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_9.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="all_9.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_9.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_9.js
new file mode 100644
index 0000000..3235e35
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_9.js
@@ -0,0 +1,5 @@
+var searchData=
+[
+ ['name',['name',['../df/d7d/structevent.html#a45c6cfb7961a21a3366db067e4cc59ab',1,'event']]],
+ ['not_5fnumber',['NOT_NUMBER',['../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899aa223eed65c9bee2bf1f4cdecaf90d66a',1,'hs-helper.h']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_a.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_a.html
new file mode 100644
index 0000000..9601fce
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_a.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="all_a.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_a.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_a.js
new file mode 100644
index 0000000..bd45f3f
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_a.js
@@ -0,0 +1,16 @@
+var searchData=
+[
+ ['on_5fcall',['on_call',['../de/dd0/class_lib_home_screen.html#a608638eb87b2772a3dcc92d8ca8f3596',1,'LibHomeScreen']]],
+ ['on_5fevent',['on_event',['../de/dd0/class_lib_home_screen.html#a9c4885b51b43ab24a548d49fb3ab2de3',1,'LibHomeScreen']]],
+ ['on_5fhangup',['on_hangup',['../de/dd0/class_lib_home_screen.html#ab1c1fa69f24b981e824dd9fb810c4b74',1,'LibHomeScreen']]],
+ ['on_5freply',['on_reply',['../de/dd0/class_lib_home_screen.html#a248d9648c6186287a7632ec1c75fc9c5',1,'LibHomeScreen']]],
+ ['on_5fscreen_5fmessage',['on_screen_message',['../d0/d1e/homescreen_8c.html#a640cf8ed97d804c5ed1c09a349056338',1,'homescreen.c']]],
+ ['on_5fscreen_5freply',['on_screen_reply',['../d0/d1e/homescreen_8c.html#a2f380055d7d69828115d2a8951634933',1,'homescreen.c']]],
+ ['onev',['onEv',['../df/dac/test_8cpp.html#a6a2874c419fe5936fcccadc7e6cf268e',1,'test.cpp']]],
+ ['onevent',['onevent',['../d0/d1e/homescreen_8c.html#a1279893c0fe937311a81e0a98fb4cf1c',1,'homescreen.c']]],
+ ['onrep',['onRep',['../df/dac/test_8cpp.html#a6d3cb4886e7afd45bd56b49800da932d',1,'test.cpp']]],
+ ['onscreenmessage',['onScreenMessage',['../de/dd0/class_lib_home_screen.html#ac336482036a72b51a822725f1929523c',1,'LibHomeScreen']]],
+ ['onscreenreply',['onScreenReply',['../de/dd0/class_lib_home_screen.html#a6c065f41f2c5d1f58d2763bfb4da9c37',1,'LibHomeScreen']]],
+ ['operator_3d',['operator=',['../de/dd0/class_lib_home_screen.html#a23bc17798453cfca50904562736f6b25',1,'LibHomeScreen']]],
+ ['out_5frange',['OUT_RANGE',['../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899add1c84bf80c5f80741ee8f37fef1e12b',1,'hs-helper.h']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_b.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_b.html
new file mode 100644
index 0000000..0814e4e
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_b.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="all_b.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_b.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_b.js
new file mode 100644
index 0000000..fe196ed
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_b.js
@@ -0,0 +1,5 @@
+var searchData=
+[
+ ['pingsample',['pingSample',['../d0/d1e/homescreen_8c.html#af48cab759d4ae0ddbfcdd60f4051ba05',1,'homescreen.c']]],
+ ['preinit',['preinit',['../d0/d1e/homescreen_8c.html#a83d646edf54a6a082f69121bc89a08de',1,'homescreen.c']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_c.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_c.html
new file mode 100644
index 0000000..da08c38
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_c.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="all_c.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_c.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_c.js
new file mode 100644
index 0000000..6066723
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_c.js
@@ -0,0 +1,7 @@
+var searchData=
+[
+ ['registercallback',['registerCallback',['../de/dd0/class_lib_home_screen.html#a2789e8a5372202cc36f48e71dbb9b7cf',1,'LibHomeScreen']]],
+ ['req_5ferror',['REQ_ERROR',['../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899',1,'REQ_ERROR():&#160;hs-helper.h'],['../d3/d3d/hs-helper_8h.html#ab0d62ccfa9c3ab87f090f67c3d50adce',1,'REQ_ERROR():&#160;hs-helper.h']]],
+ ['req_5ffail',['REQ_FAIL',['../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899a96a855966bc63045222b3dcac524cee1',1,'hs-helper.h']]],
+ ['req_5fok',['REQ_OK',['../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899ab093abb14c097b3b7719debb04d5e8ee',1,'hs-helper.h']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_d.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_d.html
new file mode 100644
index 0000000..9986c9c
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_d.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="all_d.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_d.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_d.js
new file mode 100644
index 0000000..657855b
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_d.js
@@ -0,0 +1,6 @@
+var searchData=
+[
+ ['set_5fevent_5fhandler',['set_event_handler',['../de/dd0/class_lib_home_screen.html#ab1b0e08bf35415de9064afed899e9f85',1,'LibHomeScreen']]],
+ ['split',['split',['../df/dac/test_8cpp.html#aafb7f182b8bb6ba92354dde1658d86a4',1,'test.cpp']]],
+ ['subscribe',['subscribe',['../de/dd0/class_lib_home_screen.html#aa4c189807b75d070f567967f0d690738',1,'LibHomeScreen::subscribe()'],['../d0/d1e/homescreen_8c.html#a4ff0c8b506669e5622a6ee168134d8f1',1,'subscribe():&#160;homescreen.c']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_e.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_e.html
new file mode 100644
index 0000000..9fa42bb
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_e.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="all_e.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_e.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_e.js
new file mode 100644
index 0000000..c5f0227
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_e.js
@@ -0,0 +1,6 @@
+var searchData=
+[
+ ['tap_5fshortcut',['tap_shortcut',['../d0/d1e/homescreen_8c.html#a096eae5c8f297f9df142a406eea56227',1,'homescreen.c']]],
+ ['tapshortcut',['tapShortcut',['../de/dd0/class_lib_home_screen.html#afb571c9577087b47065eb23e7fdbc903',1,'LibHomeScreen']]],
+ ['test_2ecpp',['test.cpp',['../df/dac/test_8cpp.html',1,'']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_f.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_f.html
new file mode 100644
index 0000000..6ecfc0e
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_f.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="all_f.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_f.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_f.js
new file mode 100644
index 0000000..1f66bcf
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/all_f.js
@@ -0,0 +1,5 @@
+var searchData=
+[
+ ['unsubscribe',['unsubscribe',['../de/dd0/class_lib_home_screen.html#aac03a45cbd453ba69ddb00c1016930a6',1,'LibHomeScreen::unsubscribe()'],['../d0/d1e/homescreen_8c.html#ab92621255d7370c6dd8a0f1a8e376ad3',1,'unsubscribe():&#160;homescreen.c']]],
+ ['usage',['usage',['../df/dac/test_8cpp.html#a64a6014565bb3e03294ec4a952d5add0',1,'test.cpp']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/classes_0.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/classes_0.html
new file mode 100644
index 0000000..1c3e406
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/classes_0.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="classes_0.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/classes_0.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/classes_0.js
new file mode 100644
index 0000000..d8326d8
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/classes_0.js
@@ -0,0 +1,4 @@
+var searchData=
+[
+ ['event',['event',['../df/d7d/structevent.html',1,'']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/classes_1.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/classes_1.html
new file mode 100644
index 0000000..a8e7069
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/classes_1.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="classes_1.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/classes_1.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/classes_1.js
new file mode 100644
index 0000000..b1b5692
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/classes_1.js
@@ -0,0 +1,4 @@
+var searchData=
+[
+ ['libhomescreen',['LibHomeScreen',['../de/dd0/class_lib_home_screen.html',1,'']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/close.png b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/close.png
new file mode 100644
index 0000000..9342d3d
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/close.png
Binary files differ
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/defines_0.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/defines_0.html
new file mode 100644
index 0000000..5b25204
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/defines_0.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="defines_0.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/defines_0.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/defines_0.js
new file mode 100644
index 0000000..86d3841
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/defines_0.js
@@ -0,0 +1,4 @@
+var searchData=
+[
+ ['_5fgnu_5fsource',['_GNU_SOURCE',['../d0/d1e/homescreen_8c.html#a369266c24eacffb87046522897a570d5',1,'homescreen.c']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/defines_1.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/defines_1.html
new file mode 100644
index 0000000..91488cb
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/defines_1.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="defines_1.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/defines_1.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/defines_1.js
new file mode 100644
index 0000000..d7b44ea
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/defines_1.js
@@ -0,0 +1,4 @@
+var searchData=
+[
+ ['afb_5fbinding_5fversion',['AFB_BINDING_VERSION',['../d0/d1e/homescreen_8c.html#ad2c1fbc92ba364fcf83f15e6d0af66f0',1,'AFB_BINDING_VERSION():&#160;homescreen.c'],['../d3/d3d/hs-helper_8h.html#ad2c1fbc92ba364fcf83f15e6d0af66f0',1,'AFB_BINDING_VERSION():&#160;hs-helper.h']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/defines_2.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/defines_2.html
new file mode 100644
index 0000000..8655993
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/defines_2.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="defines_2.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/defines_2.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/defines_2.js
new file mode 100644
index 0000000..edba057
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/defines_2.js
@@ -0,0 +1,4 @@
+var searchData=
+[
+ ['command_5fevent_5fnum',['COMMAND_EVENT_NUM',['../d0/d1e/homescreen_8c.html#a09f43d9e7e1c5d2198c0d66024b4500e',1,'homescreen.c']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/defines_3.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/defines_3.html
new file mode 100644
index 0000000..a55d3ff
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/defines_3.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="defines_3.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/defines_3.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/defines_3.js
new file mode 100644
index 0000000..02b9aaf
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/defines_3.js
@@ -0,0 +1,4 @@
+var searchData=
+[
+ ['event_5fsubscribe_5ferror_5fcode',['EVENT_SUBSCRIBE_ERROR_CODE',['../d0/d1e/homescreen_8c.html#a9a68ed04201d9390bb85b2c6ab1d7250',1,'homescreen.c']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/defines_4.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/defines_4.html
new file mode 100644
index 0000000..54da39a
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/defines_4.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="defines_4.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/defines_4.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/defines_4.js
new file mode 100644
index 0000000..e8bbac7
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/defines_4.js
@@ -0,0 +1,8 @@
+var searchData=
+[
+ ['hmi_5fdebug',['HMI_DEBUG',['../df/d76/hmi-debug_8h.html#a0d26d8b8201011dade787236519711c0',1,'hmi-debug.h']]],
+ ['hmi_5ferror',['HMI_ERROR',['../df/d76/hmi-debug_8h.html#a65bb6c7cfe38f8a724beab5059d36fb2',1,'hmi-debug.h']]],
+ ['hmi_5finfo',['HMI_INFO',['../df/d76/hmi-debug_8h.html#a11b249a67108f0f4c50a0fc8a3eb4f5c',1,'hmi-debug.h']]],
+ ['hmi_5fnotice',['HMI_NOTICE',['../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15',1,'hmi-debug.h']]],
+ ['hmi_5fwarning',['HMI_WARNING',['../df/d76/hmi-debug_8h.html#a25361812432cd2480bc8f1a8e56ecbf7',1,'hmi-debug.h']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enums_0.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enums_0.html
new file mode 100644
index 0000000..ee343ac
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enums_0.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="enums_0.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enums_0.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enums_0.js
new file mode 100644
index 0000000..dbff9d7
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enums_0.js
@@ -0,0 +1,4 @@
+var searchData=
+[
+ ['eventtype',['EventType',['../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154',1,'LibHomeScreen']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enums_1.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enums_1.html
new file mode 100644
index 0000000..3fd210a
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enums_1.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="enums_1.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enums_1.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enums_1.js
new file mode 100644
index 0000000..da1c230
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enums_1.js
@@ -0,0 +1,4 @@
+var searchData=
+[
+ ['log_5flevel',['LOG_LEVEL',['../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583',1,'hmi-debug.h']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enums_2.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enums_2.html
new file mode 100644
index 0000000..a042e52
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enums_2.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="enums_2.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enums_2.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enums_2.js
new file mode 100644
index 0000000..99b5d97
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enums_2.js
@@ -0,0 +1,4 @@
+var searchData=
+[
+ ['req_5ferror',['REQ_ERROR',['../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899',1,'hs-helper.h']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enumvalues_0.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enumvalues_0.html
new file mode 100644
index 0000000..9387b6a
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enumvalues_0.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="enumvalues_0.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enumvalues_0.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enumvalues_0.js
new file mode 100644
index 0000000..f00671f
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enumvalues_0.js
@@ -0,0 +1,6 @@
+var searchData=
+[
+ ['event_5fonscreenmessage',['Event_OnScreenMessage',['../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154aea56fa32a124a8ddcbea127755280a1d',1,'LibHomeScreen']]],
+ ['event_5fonscreenreply',['Event_OnScreenReply',['../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154acae91db4efc2394fd701f581d277a3fd',1,'LibHomeScreen']]],
+ ['event_5ftapshortcut',['Event_TapShortcut',['../de/dd0/class_lib_home_screen.html#a82616c91ac211d2ad08e709b524bf154a4b0a82d501e4db5fbfe25c254c92896f',1,'LibHomeScreen']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enumvalues_1.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enumvalues_1.html
new file mode 100644
index 0000000..f622aba
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enumvalues_1.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="enumvalues_1.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enumvalues_1.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enumvalues_1.js
new file mode 100644
index 0000000..49ed77c
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enumvalues_1.js
@@ -0,0 +1,10 @@
+var searchData=
+[
+ ['log_5flevel_5fdebug',['LOG_LEVEL_DEBUG',['../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a538b2b6e011479d408ecd2be0f6d6177',1,'hmi-debug.h']]],
+ ['log_5flevel_5ferror',['LOG_LEVEL_ERROR',['../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a5b40f003febbc3b535649d63f4b8a44f',1,'hmi-debug.h']]],
+ ['log_5flevel_5finfo',['LOG_LEVEL_INFO',['../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583aedee1e3159bfe7d918b6e29873c5aee4',1,'hmi-debug.h']]],
+ ['log_5flevel_5fmax',['LOG_LEVEL_MAX',['../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a0459003454bc8bb17752e6d8e5787444',1,'hmi-debug.h']]],
+ ['log_5flevel_5fnone',['LOG_LEVEL_NONE',['../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a69dacb1837e1e37c6ed34cc2ee1d8848',1,'hmi-debug.h']]],
+ ['log_5flevel_5fnotice',['LOG_LEVEL_NOTICE',['../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a23ae4d711a7bbb3900240cb7316b4b4e',1,'hmi-debug.h']]],
+ ['log_5flevel_5fwarning',['LOG_LEVEL_WARNING',['../df/d76/hmi-debug_8h.html#aa5a9053636a30269210c54e734e0d583a5b4dd81b4dc7eefbc55ba03415c627ef',1,'hmi-debug.h']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enumvalues_2.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enumvalues_2.html
new file mode 100644
index 0000000..d499078
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enumvalues_2.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="enumvalues_2.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enumvalues_2.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enumvalues_2.js
new file mode 100644
index 0000000..4ba24e9
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enumvalues_2.js
@@ -0,0 +1,4 @@
+var searchData=
+[
+ ['not_5fnumber',['NOT_NUMBER',['../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899aa223eed65c9bee2bf1f4cdecaf90d66a',1,'hs-helper.h']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enumvalues_3.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enumvalues_3.html
new file mode 100644
index 0000000..b4fc3ee
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enumvalues_3.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="enumvalues_3.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enumvalues_3.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enumvalues_3.js
new file mode 100644
index 0000000..f931fd3
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enumvalues_3.js
@@ -0,0 +1,4 @@
+var searchData=
+[
+ ['out_5frange',['OUT_RANGE',['../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899add1c84bf80c5f80741ee8f37fef1e12b',1,'hs-helper.h']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enumvalues_4.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enumvalues_4.html
new file mode 100644
index 0000000..d6f69ac
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enumvalues_4.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="enumvalues_4.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enumvalues_4.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enumvalues_4.js
new file mode 100644
index 0000000..3acc711
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/enumvalues_4.js
@@ -0,0 +1,5 @@
+var searchData=
+[
+ ['req_5ffail',['REQ_FAIL',['../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899a96a855966bc63045222b3dcac524cee1',1,'hs-helper.h']]],
+ ['req_5fok',['REQ_OK',['../d3/d3d/hs-helper_8h.html#aa49f1dbbf26f01627a5737cf43aad899ab093abb14c097b3b7719debb04d5e8ee',1,'hs-helper.h']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/files_0.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/files_0.html
new file mode 100644
index 0000000..4f272b8
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/files_0.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="files_0.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/files_0.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/files_0.js
new file mode 100644
index 0000000..388fa9c
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/files_0.js
@@ -0,0 +1,7 @@
+var searchData=
+[
+ ['hmi_2ddebug_2eh',['hmi-debug.h',['../df/d76/hmi-debug_8h.html',1,'']]],
+ ['homescreen_2ec',['homescreen.c',['../d0/d1e/homescreen_8c.html',1,'']]],
+ ['hs_2dhelper_2ec',['hs-helper.c',['../dd/d1d/hs-helper_8c.html',1,'']]],
+ ['hs_2dhelper_2eh',['hs-helper.h',['../d3/d3d/hs-helper_8h.html',1,'']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/files_1.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/files_1.html
new file mode 100644
index 0000000..dcce422
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/files_1.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="files_1.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/files_1.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/files_1.js
new file mode 100644
index 0000000..f3df5fb
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/files_1.js
@@ -0,0 +1,5 @@
+var searchData=
+[
+ ['libhomescreen_2ecpp',['libhomescreen.cpp',['../d0/d8a/libhomescreen_8cpp.html',1,'']]],
+ ['libhomescreen_2ehpp',['libhomescreen.hpp',['../df/d43/libhomescreen_8hpp.html',1,'']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/files_2.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/files_2.html
new file mode 100644
index 0000000..d5c6c3b
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/files_2.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="files_2.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/files_2.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/files_2.js
new file mode 100644
index 0000000..9fae8fd
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/files_2.js
@@ -0,0 +1,4 @@
+var searchData=
+[
+ ['test_2ecpp',['test.cpp',['../df/dac/test_8cpp.html',1,'']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_0.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_0.html
new file mode 100644
index 0000000..4e6d87d
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_0.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="functions_0.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_0.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_0.js
new file mode 100644
index 0000000..2d6dcae
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_0.js
@@ -0,0 +1,8 @@
+var searchData=
+[
+ ['_5fhmi_5flog',['_HMI_LOG',['../df/d76/hmi-debug_8h.html#a0846b9d51e2e0612c4825a9a581aa40a',1,'hmi-debug.h']]],
+ ['_5fon_5fcall_5fstatic',['_on_call_static',['../d0/d8a/libhomescreen_8cpp.html#a782a05fde0f1c17e0c4c8f972a3f53c8',1,'libhomescreen.cpp']]],
+ ['_5fon_5fevent_5fstatic',['_on_event_static',['../d0/d8a/libhomescreen_8cpp.html#a3df86185aa9453726556da201d95a6f9',1,'libhomescreen.cpp']]],
+ ['_5fon_5fhangup_5fstatic',['_on_hangup_static',['../d0/d8a/libhomescreen_8cpp.html#a73c05b96c151e5e46c28585ccb143c1c',1,'libhomescreen.cpp']]],
+ ['_5fon_5freply_5fstatic',['_on_reply_static',['../d0/d8a/libhomescreen_8cpp.html#a7778933bffa862c63fa0a1b8219faa8b',1,'libhomescreen.cpp']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_1.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_1.html
new file mode 100644
index 0000000..b343e2d
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_1.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="functions_1.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_1.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_1.js
new file mode 100644
index 0000000..f277ddd
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_1.js
@@ -0,0 +1,5 @@
+var searchData=
+[
+ ['call',['call',['../de/dd0/class_lib_home_screen.html#a527b49dcfe581be6275d0eb2236ba37f',1,'LibHomeScreen::call(const std::string &amp;verb, struct json_object *arg)'],['../de/dd0/class_lib_home_screen.html#ab5e8e8ab7d53e0f114e9e907fcbb7643',1,'LibHomeScreen::call(const char *verb, struct json_object *arg)']]],
+ ['call_5ftest',['call_test',['../df/dac/test_8cpp.html#aa9b3c43c212b49edee82ac30a11aa255',1,'test.cpp']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_2.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_2.html
new file mode 100644
index 0000000..ecce2f3
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_2.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="functions_2.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_2.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_2.js
new file mode 100644
index 0000000..cde5399
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_2.js
@@ -0,0 +1,4 @@
+var searchData=
+[
+ ['event_5floop_5frun',['event_loop_run',['../d0/d8a/libhomescreen_8cpp.html#aa73353e1bf62c68b6b0aba7a1e4e275e',1,'libhomescreen.cpp']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_3.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_3.html
new file mode 100644
index 0000000..15f06ab
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_3.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="functions_3.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_3.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_3.js
new file mode 100644
index 0000000..15928c8
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_3.js
@@ -0,0 +1,6 @@
+var searchData=
+[
+ ['get_5fvalue_5fint16',['get_value_int16',['../dd/d1d/hs-helper_8c.html#a2e62366684e39ea94436bf017e416827',1,'get_value_int16(const struct afb_req request, const char *source, int16_t *out_id):&#160;hs-helper.c'],['../d3/d3d/hs-helper_8h.html#a2e62366684e39ea94436bf017e416827',1,'get_value_int16(const struct afb_req request, const char *source, int16_t *out_id):&#160;hs-helper.c']]],
+ ['get_5fvalue_5fint32',['get_value_int32',['../dd/d1d/hs-helper_8c.html#ac5b0370643c520377afd3fd4891918d2',1,'get_value_int32(const struct afb_req request, const char *source, int32_t *out_id):&#160;hs-helper.c'],['../d3/d3d/hs-helper_8h.html#ac5b0370643c520377afd3fd4891918d2',1,'get_value_int32(const struct afb_req request, const char *source, int32_t *out_id):&#160;hs-helper.c']]],
+ ['get_5fvalue_5fuint16',['get_value_uint16',['../dd/d1d/hs-helper_8c.html#a649900645417f2df3a70b9ad67529f53',1,'get_value_uint16(const struct afb_req request, const char *source, uint16_t *out_id):&#160;hs-helper.c'],['../d3/d3d/hs-helper_8h.html#a649900645417f2df3a70b9ad67529f53',1,'get_value_uint16(const struct afb_req request, const char *source, uint16_t *out_id):&#160;hs-helper.c']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_4.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_4.html
new file mode 100644
index 0000000..8985ff2
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_4.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="functions_4.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_4.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_4.js
new file mode 100644
index 0000000..5932c24
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_4.js
@@ -0,0 +1,8 @@
+var searchData=
+[
+ ['has_5fverb',['has_verb',['../d0/d8a/libhomescreen_8cpp.html#a7a2176c3d71fec0f09dcb2aa0866b17e',1,'libhomescreen.cpp']]],
+ ['hs_5fadd_5fobject_5fto_5fjson_5fobject',['hs_add_object_to_json_object',['../dd/d1d/hs-helper_8c.html#a1ba31a6a94515ff1730ba0043a67d59e',1,'hs_add_object_to_json_object(struct json_object *j_obj, int count,...):&#160;hs-helper.c'],['../d3/d3d/hs-helper_8h.html#a1ba31a6a94515ff1730ba0043a67d59e',1,'hs_add_object_to_json_object(struct json_object *j_obj, int count,...):&#160;hs-helper.c']]],
+ ['hs_5fadd_5fobject_5fto_5fjson_5fobject_5ffunc',['hs_add_object_to_json_object_func',['../dd/d1d/hs-helper_8c.html#ae83604a37134e7bdee3ce4f10bb0b47a',1,'hs_add_object_to_json_object_func(struct json_object *j_obj, const char *verb_name, int count,...):&#160;hs-helper.c'],['../d3/d3d/hs-helper_8h.html#ae83604a37134e7bdee3ce4f10bb0b47a',1,'hs_add_object_to_json_object_func(struct json_object *j_obj, const char *verb_name, int count,...):&#160;hs-helper.c']]],
+ ['hs_5fadd_5fobject_5fto_5fjson_5fobject_5fstr',['hs_add_object_to_json_object_str',['../dd/d1d/hs-helper_8c.html#a8777c53f1d4d5412f19b134ad85ffedf',1,'hs_add_object_to_json_object_str(struct json_object *j_obj, int count,...):&#160;hs-helper.c'],['../d3/d3d/hs-helper_8h.html#a8777c53f1d4d5412f19b134ad85ffedf',1,'hs_add_object_to_json_object_str(struct json_object *j_obj, int count,...):&#160;hs-helper.c']]],
+ ['hs_5fsearch_5fevent_5fname_5findex',['hs_search_event_name_index',['../dd/d1d/hs-helper_8c.html#a2ff1b894941c3b461ca8119079c4146a',1,'hs_search_event_name_index(const char *value):&#160;hs-helper.c'],['../d3/d3d/hs-helper_8h.html#a2ff1b894941c3b461ca8119079c4146a',1,'hs_search_event_name_index(const char *value):&#160;hs-helper.c']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_5.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_5.html
new file mode 100644
index 0000000..0314918
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_5.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="functions_5.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_5.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_5.js
new file mode 100644
index 0000000..a3186af
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_5.js
@@ -0,0 +1,4 @@
+var searchData=
+[
+ ['init',['init',['../de/dd0/class_lib_home_screen.html#a6a57b573cc767725762ba9beab032220',1,'LibHomeScreen::init()'],['../d0/d1e/homescreen_8c.html#a00cbbc0f3f4452db078ae511684a6adc',1,'init():&#160;homescreen.c']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_6.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_6.html
new file mode 100644
index 0000000..c506123
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_6.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="functions_6.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_6.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_6.js
new file mode 100644
index 0000000..ef5d50e
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_6.js
@@ -0,0 +1,4 @@
+var searchData=
+[
+ ['libhomescreen',['LibHomeScreen',['../de/dd0/class_lib_home_screen.html#a724bd949c4154fad041f96a15ef0f5dc',1,'LibHomeScreen::LibHomeScreen()'],['../de/dd0/class_lib_home_screen.html#a0fff2f703c8ce184eb9edd133e0f4137',1,'LibHomeScreen::LibHomeScreen(const LibHomeScreen &amp;)=delete']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_7.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_7.html
new file mode 100644
index 0000000..83a7b84
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_7.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="functions_7.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_7.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_7.js
new file mode 100644
index 0000000..65e8f49
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_7.js
@@ -0,0 +1,4 @@
+var searchData=
+[
+ ['main',['main',['../df/dac/test_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627',1,'test.cpp']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_8.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_8.html
new file mode 100644
index 0000000..b55f0e6
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_8.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="functions_8.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_8.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_8.js
new file mode 100644
index 0000000..5038b19
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_8.js
@@ -0,0 +1,15 @@
+var searchData=
+[
+ ['on_5fcall',['on_call',['../de/dd0/class_lib_home_screen.html#a608638eb87b2772a3dcc92d8ca8f3596',1,'LibHomeScreen']]],
+ ['on_5fevent',['on_event',['../de/dd0/class_lib_home_screen.html#a9c4885b51b43ab24a548d49fb3ab2de3',1,'LibHomeScreen']]],
+ ['on_5fhangup',['on_hangup',['../de/dd0/class_lib_home_screen.html#ab1c1fa69f24b981e824dd9fb810c4b74',1,'LibHomeScreen']]],
+ ['on_5freply',['on_reply',['../de/dd0/class_lib_home_screen.html#a248d9648c6186287a7632ec1c75fc9c5',1,'LibHomeScreen']]],
+ ['on_5fscreen_5fmessage',['on_screen_message',['../d0/d1e/homescreen_8c.html#a640cf8ed97d804c5ed1c09a349056338',1,'homescreen.c']]],
+ ['on_5fscreen_5freply',['on_screen_reply',['../d0/d1e/homescreen_8c.html#a2f380055d7d69828115d2a8951634933',1,'homescreen.c']]],
+ ['onev',['onEv',['../df/dac/test_8cpp.html#a6a2874c419fe5936fcccadc7e6cf268e',1,'test.cpp']]],
+ ['onevent',['onevent',['../d0/d1e/homescreen_8c.html#a1279893c0fe937311a81e0a98fb4cf1c',1,'homescreen.c']]],
+ ['onrep',['onRep',['../df/dac/test_8cpp.html#a6d3cb4886e7afd45bd56b49800da932d',1,'test.cpp']]],
+ ['onscreenmessage',['onScreenMessage',['../de/dd0/class_lib_home_screen.html#ac336482036a72b51a822725f1929523c',1,'LibHomeScreen']]],
+ ['onscreenreply',['onScreenReply',['../de/dd0/class_lib_home_screen.html#a6c065f41f2c5d1f58d2763bfb4da9c37',1,'LibHomeScreen']]],
+ ['operator_3d',['operator=',['../de/dd0/class_lib_home_screen.html#a23bc17798453cfca50904562736f6b25',1,'LibHomeScreen']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_9.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_9.html
new file mode 100644
index 0000000..c73f07b
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_9.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="functions_9.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_9.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_9.js
new file mode 100644
index 0000000..fe196ed
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_9.js
@@ -0,0 +1,5 @@
+var searchData=
+[
+ ['pingsample',['pingSample',['../d0/d1e/homescreen_8c.html#af48cab759d4ae0ddbfcdd60f4051ba05',1,'homescreen.c']]],
+ ['preinit',['preinit',['../d0/d1e/homescreen_8c.html#a83d646edf54a6a082f69121bc89a08de',1,'homescreen.c']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_a.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_a.html
new file mode 100644
index 0000000..f10ad63
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_a.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="functions_a.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_a.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_a.js
new file mode 100644
index 0000000..eefb399
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_a.js
@@ -0,0 +1,4 @@
+var searchData=
+[
+ ['registercallback',['registerCallback',['../de/dd0/class_lib_home_screen.html#a2789e8a5372202cc36f48e71dbb9b7cf',1,'LibHomeScreen']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_b.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_b.html
new file mode 100644
index 0000000..172ea1b
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_b.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="functions_b.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_b.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_b.js
new file mode 100644
index 0000000..657855b
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_b.js
@@ -0,0 +1,6 @@
+var searchData=
+[
+ ['set_5fevent_5fhandler',['set_event_handler',['../de/dd0/class_lib_home_screen.html#ab1b0e08bf35415de9064afed899e9f85',1,'LibHomeScreen']]],
+ ['split',['split',['../df/dac/test_8cpp.html#aafb7f182b8bb6ba92354dde1658d86a4',1,'test.cpp']]],
+ ['subscribe',['subscribe',['../de/dd0/class_lib_home_screen.html#aa4c189807b75d070f567967f0d690738',1,'LibHomeScreen::subscribe()'],['../d0/d1e/homescreen_8c.html#a4ff0c8b506669e5622a6ee168134d8f1',1,'subscribe():&#160;homescreen.c']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_c.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_c.html
new file mode 100644
index 0000000..99492ba
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_c.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="functions_c.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_c.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_c.js
new file mode 100644
index 0000000..655c02c
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_c.js
@@ -0,0 +1,5 @@
+var searchData=
+[
+ ['tap_5fshortcut',['tap_shortcut',['../d0/d1e/homescreen_8c.html#a096eae5c8f297f9df142a406eea56227',1,'homescreen.c']]],
+ ['tapshortcut',['tapShortcut',['../de/dd0/class_lib_home_screen.html#afb571c9577087b47065eb23e7fdbc903',1,'LibHomeScreen']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_d.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_d.html
new file mode 100644
index 0000000..5be9ecc
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_d.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="functions_d.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_d.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_d.js
new file mode 100644
index 0000000..1f66bcf
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_d.js
@@ -0,0 +1,5 @@
+var searchData=
+[
+ ['unsubscribe',['unsubscribe',['../de/dd0/class_lib_home_screen.html#aac03a45cbd453ba69ddb00c1016930a6',1,'LibHomeScreen::unsubscribe()'],['../d0/d1e/homescreen_8c.html#ab92621255d7370c6dd8a0f1a8e376ad3',1,'unsubscribe():&#160;homescreen.c']]],
+ ['usage',['usage',['../df/dac/test_8cpp.html#a64a6014565bb3e03294ec4a952d5add0',1,'test.cpp']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_e.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_e.html
new file mode 100644
index 0000000..e256cb6
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_e.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="functions_e.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_e.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_e.js
new file mode 100644
index 0000000..5b08f6d
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/functions_e.js
@@ -0,0 +1,4 @@
+var searchData=
+[
+ ['_7elibhomescreen',['~LibHomeScreen',['../de/dd0/class_lib_home_screen.html#a249902aebf71a5383ca8ec6ae558d095',1,'LibHomeScreen']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/mag_sel.png b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/mag_sel.png
new file mode 100644
index 0000000..81f6040
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/mag_sel.png
Binary files differ
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/nomatches.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/nomatches.html
new file mode 100644
index 0000000..b1ded27
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/nomatches.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/search.css b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/search.css
new file mode 100644
index 0000000..3cf9df9
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/search.css
@@ -0,0 +1,271 @@
+/*---------------- Search Box */
+
+#FSearchBox {
+ float: left;
+}
+
+#MSearchBox {
+ white-space : nowrap;
+ float: none;
+ margin-top: 8px;
+ right: 0px;
+ width: 170px;
+ height: 24px;
+ z-index: 102;
+}
+
+#MSearchBox .left
+{
+ display:block;
+ position:absolute;
+ left:10px;
+ width:20px;
+ height:19px;
+ background:url('search_l.png') no-repeat;
+ background-position:right;
+}
+
+#MSearchSelect {
+ display:block;
+ position:absolute;
+ width:20px;
+ height:19px;
+}
+
+.left #MSearchSelect {
+ left:4px;
+}
+
+.right #MSearchSelect {
+ right:5px;
+}
+
+#MSearchField {
+ display:block;
+ position:absolute;
+ height:19px;
+ background:url('search_m.png') repeat-x;
+ border:none;
+ width:115px;
+ margin-left:20px;
+ padding-left:4px;
+ color: #909090;
+ outline: none;
+ font: 9pt Arial, Verdana, sans-serif;
+ -webkit-border-radius: 0px;
+}
+
+#FSearchBox #MSearchField {
+ margin-left:15px;
+}
+
+#MSearchBox .right {
+ display:block;
+ position:absolute;
+ right:10px;
+ top:8px;
+ width:20px;
+ height:19px;
+ background:url('search_r.png') no-repeat;
+ background-position:left;
+}
+
+#MSearchClose {
+ display: none;
+ position: absolute;
+ top: 4px;
+ background : none;
+ border: none;
+ margin: 0px 4px 0px 0px;
+ padding: 0px 0px;
+ outline: none;
+}
+
+.left #MSearchClose {
+ left: 6px;
+}
+
+.right #MSearchClose {
+ right: 2px;
+}
+
+.MSearchBoxActive #MSearchField {
+ color: #000000;
+}
+
+/*---------------- Search filter selection */
+
+#MSearchSelectWindow {
+ display: none;
+ position: absolute;
+ left: 0; top: 0;
+ border: 1px solid #90A5CE;
+ background-color: #F9FAFC;
+ z-index: 10001;
+ padding-top: 4px;
+ padding-bottom: 4px;
+ -moz-border-radius: 4px;
+ -webkit-border-top-left-radius: 4px;
+ -webkit-border-top-right-radius: 4px;
+ -webkit-border-bottom-left-radius: 4px;
+ -webkit-border-bottom-right-radius: 4px;
+ -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
+}
+
+.SelectItem {
+ font: 8pt Arial, Verdana, sans-serif;
+ padding-left: 2px;
+ padding-right: 12px;
+ border: 0px;
+}
+
+span.SelectionMark {
+ margin-right: 4px;
+ font-family: monospace;
+ outline-style: none;
+ text-decoration: none;
+}
+
+a.SelectItem {
+ display: block;
+ outline-style: none;
+ color: #000000;
+ text-decoration: none;
+ padding-left: 6px;
+ padding-right: 12px;
+}
+
+a.SelectItem:focus,
+a.SelectItem:active {
+ color: #000000;
+ outline-style: none;
+ text-decoration: none;
+}
+
+a.SelectItem:hover {
+ color: #FFFFFF;
+ background-color: #3D578C;
+ outline-style: none;
+ text-decoration: none;
+ cursor: pointer;
+ display: block;
+}
+
+/*---------------- Search results window */
+
+iframe#MSearchResults {
+ width: 60ex;
+ height: 15em;
+}
+
+#MSearchResultsWindow {
+ display: none;
+ position: absolute;
+ left: 0; top: 0;
+ border: 1px solid #000;
+ background-color: #EEF1F7;
+ z-index:10000;
+}
+
+/* ----------------------------------- */
+
+
+#SRIndex {
+ clear:both;
+ padding-bottom: 15px;
+}
+
+.SREntry {
+ font-size: 10pt;
+ padding-left: 1ex;
+}
+
+.SRPage .SREntry {
+ font-size: 8pt;
+ padding: 1px 5px;
+}
+
+body.SRPage {
+ margin: 5px 2px;
+}
+
+.SRChildren {
+ padding-left: 3ex; padding-bottom: .5em
+}
+
+.SRPage .SRChildren {
+ display: none;
+}
+
+.SRSymbol {
+ font-weight: bold;
+ color: #425E97;
+ font-family: Arial, Verdana, sans-serif;
+ text-decoration: none;
+ outline: none;
+}
+
+a.SRScope {
+ display: block;
+ color: #425E97;
+ font-family: Arial, Verdana, sans-serif;
+ text-decoration: none;
+ outline: none;
+}
+
+a.SRSymbol:focus, a.SRSymbol:active,
+a.SRScope:focus, a.SRScope:active {
+ text-decoration: underline;
+}
+
+span.SRScope {
+ padding-left: 4px;
+}
+
+.SRPage .SRStatus {
+ padding: 2px 5px;
+ font-size: 8pt;
+ font-style: italic;
+}
+
+.SRResult {
+ display: none;
+}
+
+DIV.searchresults {
+ margin-left: 10px;
+ margin-right: 10px;
+}
+
+/*---------------- External search page results */
+
+.searchresult {
+ background-color: #F0F3F8;
+}
+
+.pages b {
+ color: white;
+ padding: 5px 5px 3px 5px;
+ background-image: url("../tab_a.png");
+ background-repeat: repeat-x;
+ text-shadow: 0 1px 1px #000000;
+}
+
+.pages {
+ line-height: 17px;
+ margin-left: 4px;
+ text-decoration: none;
+}
+
+.hl {
+ font-weight: bold;
+}
+
+#searchresults {
+ margin-bottom: 20px;
+}
+
+.searchpages {
+ margin-top: 10px;
+}
+
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/search.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/search.js
new file mode 100644
index 0000000..dedce3b
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/search.js
@@ -0,0 +1,791 @@
+function convertToId(search)
+{
+ var result = '';
+ for (i=0;i<search.length;i++)
+ {
+ var c = search.charAt(i);
+ var cn = c.charCodeAt(0);
+ if (c.match(/[a-z0-9\u0080-\uFFFF]/))
+ {
+ result+=c;
+ }
+ else if (cn<16)
+ {
+ result+="_0"+cn.toString(16);
+ }
+ else
+ {
+ result+="_"+cn.toString(16);
+ }
+ }
+ return result;
+}
+
+function getXPos(item)
+{
+ var x = 0;
+ if (item.offsetWidth)
+ {
+ while (item && item!=document.body)
+ {
+ x += item.offsetLeft;
+ item = item.offsetParent;
+ }
+ }
+ return x;
+}
+
+function getYPos(item)
+{
+ var y = 0;
+ if (item.offsetWidth)
+ {
+ while (item && item!=document.body)
+ {
+ y += item.offsetTop;
+ item = item.offsetParent;
+ }
+ }
+ return y;
+}
+
+/* A class handling everything associated with the search panel.
+
+ Parameters:
+ name - The name of the global variable that will be
+ storing this instance. Is needed to be able to set timeouts.
+ resultPath - path to use for external files
+*/
+function SearchBox(name, resultsPath, inFrame, label)
+{
+ if (!name || !resultsPath) { alert("Missing parameters to SearchBox."); }
+
+ // ---------- Instance variables
+ this.name = name;
+ this.resultsPath = resultsPath;
+ this.keyTimeout = 0;
+ this.keyTimeoutLength = 500;
+ this.closeSelectionTimeout = 300;
+ this.lastSearchValue = "";
+ this.lastResultsPage = "";
+ this.hideTimeout = 0;
+ this.searchIndex = 0;
+ this.searchActive = false;
+ this.insideFrame = inFrame;
+ this.searchLabel = label;
+
+ // ----------- DOM Elements
+
+ this.DOMSearchField = function()
+ { return document.getElementById("MSearchField"); }
+
+ this.DOMSearchSelect = function()
+ { return document.getElementById("MSearchSelect"); }
+
+ this.DOMSearchSelectWindow = function()
+ { return document.getElementById("MSearchSelectWindow"); }
+
+ this.DOMPopupSearchResults = function()
+ { return document.getElementById("MSearchResults"); }
+
+ this.DOMPopupSearchResultsWindow = function()
+ { return document.getElementById("MSearchResultsWindow"); }
+
+ this.DOMSearchClose = function()
+ { return document.getElementById("MSearchClose"); }
+
+ this.DOMSearchBox = function()
+ { return document.getElementById("MSearchBox"); }
+
+ // ------------ Event Handlers
+
+ // Called when focus is added or removed from the search field.
+ this.OnSearchFieldFocus = function(isActive)
+ {
+ this.Activate(isActive);
+ }
+
+ this.OnSearchSelectShow = function()
+ {
+ var searchSelectWindow = this.DOMSearchSelectWindow();
+ var searchField = this.DOMSearchSelect();
+
+ if (this.insideFrame)
+ {
+ var left = getXPos(searchField);
+ var top = getYPos(searchField);
+ left += searchField.offsetWidth + 6;
+ top += searchField.offsetHeight;
+
+ // show search selection popup
+ searchSelectWindow.style.display='block';
+ left -= searchSelectWindow.offsetWidth;
+ searchSelectWindow.style.left = left + 'px';
+ searchSelectWindow.style.top = top + 'px';
+ }
+ else
+ {
+ var left = getXPos(searchField);
+ var top = getYPos(searchField);
+ top += searchField.offsetHeight;
+
+ // show search selection popup
+ searchSelectWindow.style.display='block';
+ searchSelectWindow.style.left = left + 'px';
+ searchSelectWindow.style.top = top + 'px';
+ }
+
+ // stop selection hide timer
+ if (this.hideTimeout)
+ {
+ clearTimeout(this.hideTimeout);
+ this.hideTimeout=0;
+ }
+ return false; // to avoid "image drag" default event
+ }
+
+ this.OnSearchSelectHide = function()
+ {
+ this.hideTimeout = setTimeout(this.name +".CloseSelectionWindow()",
+ this.closeSelectionTimeout);
+ }
+
+ // Called when the content of the search field is changed.
+ this.OnSearchFieldChange = function(evt)
+ {
+ if (this.keyTimeout) // kill running timer
+ {
+ clearTimeout(this.keyTimeout);
+ this.keyTimeout = 0;
+ }
+
+ var e = (evt) ? evt : window.event; // for IE
+ if (e.keyCode==40 || e.keyCode==13)
+ {
+ if (e.shiftKey==1)
+ {
+ this.OnSearchSelectShow();
+ var win=this.DOMSearchSelectWindow();
+ for (i=0;i<win.childNodes.length;i++)
+ {
+ var child = win.childNodes[i]; // get span within a
+ if (child.className=='SelectItem')
+ {
+ child.focus();
+ return;
+ }
+ }
+ return;
+ }
+ else if (window.frames.MSearchResults.searchResults)
+ {
+ var elem = window.frames.MSearchResults.searchResults.NavNext(0);
+ if (elem) elem.focus();
+ }
+ }
+ else if (e.keyCode==27) // Escape out of the search field
+ {
+ this.DOMSearchField().blur();
+ this.DOMPopupSearchResultsWindow().style.display = 'none';
+ this.DOMSearchClose().style.display = 'none';
+ this.lastSearchValue = '';
+ this.Activate(false);
+ return;
+ }
+
+ // strip whitespaces
+ var searchValue = this.DOMSearchField().value.replace(/ +/g, "");
+
+ if (searchValue != this.lastSearchValue) // search value has changed
+ {
+ if (searchValue != "") // non-empty search
+ {
+ // set timer for search update
+ this.keyTimeout = setTimeout(this.name + '.Search()',
+ this.keyTimeoutLength);
+ }
+ else // empty search field
+ {
+ this.DOMPopupSearchResultsWindow().style.display = 'none';
+ this.DOMSearchClose().style.display = 'none';
+ this.lastSearchValue = '';
+ }
+ }
+ }
+
+ this.SelectItemCount = function(id)
+ {
+ var count=0;
+ var win=this.DOMSearchSelectWindow();
+ for (i=0;i<win.childNodes.length;i++)
+ {
+ var child = win.childNodes[i]; // get span within a
+ if (child.className=='SelectItem')
+ {
+ count++;
+ }
+ }
+ return count;
+ }
+
+ this.SelectItemSet = function(id)
+ {
+ var i,j=0;
+ var win=this.DOMSearchSelectWindow();
+ for (i=0;i<win.childNodes.length;i++)
+ {
+ var child = win.childNodes[i]; // get span within a
+ if (child.className=='SelectItem')
+ {
+ var node = child.firstChild;
+ if (j==id)
+ {
+ node.innerHTML='&#8226;';
+ }
+ else
+ {
+ node.innerHTML='&#160;';
+ }
+ j++;
+ }
+ }
+ }
+
+ // Called when an search filter selection is made.
+ // set item with index id as the active item
+ this.OnSelectItem = function(id)
+ {
+ this.searchIndex = id;
+ this.SelectItemSet(id);
+ var searchValue = this.DOMSearchField().value.replace(/ +/g, "");
+ if (searchValue!="" && this.searchActive) // something was found -> do a search
+ {
+ this.Search();
+ }
+ }
+
+ this.OnSearchSelectKey = function(evt)
+ {
+ var e = (evt) ? evt : window.event; // for IE
+ if (e.keyCode==40 && this.searchIndex<this.SelectItemCount()) // Down
+ {
+ this.searchIndex++;
+ this.OnSelectItem(this.searchIndex);
+ }
+ else if (e.keyCode==38 && this.searchIndex>0) // Up
+ {
+ this.searchIndex--;
+ this.OnSelectItem(this.searchIndex);
+ }
+ else if (e.keyCode==13 || e.keyCode==27)
+ {
+ this.OnSelectItem(this.searchIndex);
+ this.CloseSelectionWindow();
+ this.DOMSearchField().focus();
+ }
+ return false;
+ }
+
+ // --------- Actions
+
+ // Closes the results window.
+ this.CloseResultsWindow = function()
+ {
+ this.DOMPopupSearchResultsWindow().style.display = 'none';
+ this.DOMSearchClose().style.display = 'none';
+ this.Activate(false);
+ }
+
+ this.CloseSelectionWindow = function()
+ {
+ this.DOMSearchSelectWindow().style.display = 'none';
+ }
+
+ // Performs a search.
+ this.Search = function()
+ {
+ this.keyTimeout = 0;
+
+ // strip leading whitespace
+ var searchValue = this.DOMSearchField().value.replace(/^ +/, "");
+
+ var code = searchValue.toLowerCase().charCodeAt(0);
+ var idxChar = searchValue.substr(0, 1).toLowerCase();
+ if ( 0xD800 <= code && code <= 0xDBFF && searchValue > 1) // surrogate pair
+ {
+ idxChar = searchValue.substr(0, 2);
+ }
+
+ var resultsPage;
+ var resultsPageWithSearch;
+ var hasResultsPage;
+
+ var idx = indexSectionsWithContent[this.searchIndex].indexOf(idxChar);
+ if (idx!=-1)
+ {
+ var hexCode=idx.toString(16);
+ resultsPage = this.resultsPath + '/' + indexSectionNames[this.searchIndex] + '_' + hexCode + '.html';
+ resultsPageWithSearch = resultsPage+'?'+escape(searchValue);
+ hasResultsPage = true;
+ }
+ else // nothing available for this search term
+ {
+ resultsPage = this.resultsPath + '/nomatches.html';
+ resultsPageWithSearch = resultsPage;
+ hasResultsPage = false;
+ }
+
+ window.frames.MSearchResults.location = resultsPageWithSearch;
+ var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow();
+
+ if (domPopupSearchResultsWindow.style.display!='block')
+ {
+ var domSearchBox = this.DOMSearchBox();
+ this.DOMSearchClose().style.display = 'inline';
+ if (this.insideFrame)
+ {
+ var domPopupSearchResults = this.DOMPopupSearchResults();
+ domPopupSearchResultsWindow.style.position = 'relative';
+ domPopupSearchResultsWindow.style.display = 'block';
+ var width = document.body.clientWidth - 8; // the -8 is for IE :-(
+ domPopupSearchResultsWindow.style.width = width + 'px';
+ domPopupSearchResults.style.width = width + 'px';
+ }
+ else
+ {
+ var domPopupSearchResults = this.DOMPopupSearchResults();
+ var left = getXPos(domSearchBox) + 150; // domSearchBox.offsetWidth;
+ var top = getYPos(domSearchBox) + 20; // domSearchBox.offsetHeight + 1;
+ domPopupSearchResultsWindow.style.display = 'block';
+ left -= domPopupSearchResults.offsetWidth;
+ domPopupSearchResultsWindow.style.top = top + 'px';
+ domPopupSearchResultsWindow.style.left = left + 'px';
+ }
+ }
+
+ this.lastSearchValue = searchValue;
+ this.lastResultsPage = resultsPage;
+ }
+
+ // -------- Activation Functions
+
+ // Activates or deactivates the search panel, resetting things to
+ // their default values if necessary.
+ this.Activate = function(isActive)
+ {
+ if (isActive || // open it
+ this.DOMPopupSearchResultsWindow().style.display == 'block'
+ )
+ {
+ this.DOMSearchBox().className = 'MSearchBoxActive';
+
+ var searchField = this.DOMSearchField();
+
+ if (searchField.value == this.searchLabel) // clear "Search" term upon entry
+ {
+ searchField.value = '';
+ this.searchActive = true;
+ }
+ }
+ else if (!isActive) // directly remove the panel
+ {
+ this.DOMSearchBox().className = 'MSearchBoxInactive';
+ this.DOMSearchField().value = this.searchLabel;
+ this.searchActive = false;
+ this.lastSearchValue = ''
+ this.lastResultsPage = '';
+ }
+ }
+}
+
+// -----------------------------------------------------------------------
+
+// The class that handles everything on the search results page.
+function SearchResults(name)
+{
+ // The number of matches from the last run of <Search()>.
+ this.lastMatchCount = 0;
+ this.lastKey = 0;
+ this.repeatOn = false;
+
+ // Toggles the visibility of the passed element ID.
+ this.FindChildElement = function(id)
+ {
+ var parentElement = document.getElementById(id);
+ var element = parentElement.firstChild;
+
+ while (element && element!=parentElement)
+ {
+ if (element.nodeName == 'DIV' && element.className == 'SRChildren')
+ {
+ return element;
+ }
+
+ if (element.nodeName == 'DIV' && element.hasChildNodes())
+ {
+ element = element.firstChild;
+ }
+ else if (element.nextSibling)
+ {
+ element = element.nextSibling;
+ }
+ else
+ {
+ do
+ {
+ element = element.parentNode;
+ }
+ while (element && element!=parentElement && !element.nextSibling);
+
+ if (element && element!=parentElement)
+ {
+ element = element.nextSibling;
+ }
+ }
+ }
+ }
+
+ this.Toggle = function(id)
+ {
+ var element = this.FindChildElement(id);
+ if (element)
+ {
+ if (element.style.display == 'block')
+ {
+ element.style.display = 'none';
+ }
+ else
+ {
+ element.style.display = 'block';
+ }
+ }
+ }
+
+ // Searches for the passed string. If there is no parameter,
+ // it takes it from the URL query.
+ //
+ // Always returns true, since other documents may try to call it
+ // and that may or may not be possible.
+ this.Search = function(search)
+ {
+ if (!search) // get search word from URL
+ {
+ search = window.location.search;
+ search = search.substring(1); // Remove the leading '?'
+ search = unescape(search);
+ }
+
+ search = search.replace(/^ +/, ""); // strip leading spaces
+ search = search.replace(/ +$/, ""); // strip trailing spaces
+ search = search.toLowerCase();
+ search = convertToId(search);
+
+ var resultRows = document.getElementsByTagName("div");
+ var matches = 0;
+
+ var i = 0;
+ while (i < resultRows.length)
+ {
+ var row = resultRows.item(i);
+ if (row.className == "SRResult")
+ {
+ var rowMatchName = row.id.toLowerCase();
+ rowMatchName = rowMatchName.replace(/^sr\d*_/, ''); // strip 'sr123_'
+
+ if (search.length<=rowMatchName.length &&
+ rowMatchName.substr(0, search.length)==search)
+ {
+ row.style.display = 'block';
+ matches++;
+ }
+ else
+ {
+ row.style.display = 'none';
+ }
+ }
+ i++;
+ }
+ document.getElementById("Searching").style.display='none';
+ if (matches == 0) // no results
+ {
+ document.getElementById("NoMatches").style.display='block';
+ }
+ else // at least one result
+ {
+ document.getElementById("NoMatches").style.display='none';
+ }
+ this.lastMatchCount = matches;
+ return true;
+ }
+
+ // return the first item with index index or higher that is visible
+ this.NavNext = function(index)
+ {
+ var focusItem;
+ while (1)
+ {
+ var focusName = 'Item'+index;
+ focusItem = document.getElementById(focusName);
+ if (focusItem && focusItem.parentNode.parentNode.style.display=='block')
+ {
+ break;
+ }
+ else if (!focusItem) // last element
+ {
+ break;
+ }
+ focusItem=null;
+ index++;
+ }
+ return focusItem;
+ }
+
+ this.NavPrev = function(index)
+ {
+ var focusItem;
+ while (1)
+ {
+ var focusName = 'Item'+index;
+ focusItem = document.getElementById(focusName);
+ if (focusItem && focusItem.parentNode.parentNode.style.display=='block')
+ {
+ break;
+ }
+ else if (!focusItem) // last element
+ {
+ break;
+ }
+ focusItem=null;
+ index--;
+ }
+ return focusItem;
+ }
+
+ this.ProcessKeys = function(e)
+ {
+ if (e.type == "keydown")
+ {
+ this.repeatOn = false;
+ this.lastKey = e.keyCode;
+ }
+ else if (e.type == "keypress")
+ {
+ if (!this.repeatOn)
+ {
+ if (this.lastKey) this.repeatOn = true;
+ return false; // ignore first keypress after keydown
+ }
+ }
+ else if (e.type == "keyup")
+ {
+ this.lastKey = 0;
+ this.repeatOn = false;
+ }
+ return this.lastKey!=0;
+ }
+
+ this.Nav = function(evt,itemIndex)
+ {
+ var e = (evt) ? evt : window.event; // for IE
+ if (e.keyCode==13) return true;
+ if (!this.ProcessKeys(e)) return false;
+
+ if (this.lastKey==38) // Up
+ {
+ var newIndex = itemIndex-1;
+ var focusItem = this.NavPrev(newIndex);
+ if (focusItem)
+ {
+ var child = this.FindChildElement(focusItem.parentNode.parentNode.id);
+ if (child && child.style.display == 'block') // children visible
+ {
+ var n=0;
+ var tmpElem;
+ while (1) // search for last child
+ {
+ tmpElem = document.getElementById('Item'+newIndex+'_c'+n);
+ if (tmpElem)
+ {
+ focusItem = tmpElem;
+ }
+ else // found it!
+ {
+ break;
+ }
+ n++;
+ }
+ }
+ }
+ if (focusItem)
+ {
+ focusItem.focus();
+ }
+ else // return focus to search field
+ {
+ parent.document.getElementById("MSearchField").focus();
+ }
+ }
+ else if (this.lastKey==40) // Down
+ {
+ var newIndex = itemIndex+1;
+ var focusItem;
+ var item = document.getElementById('Item'+itemIndex);
+ var elem = this.FindChildElement(item.parentNode.parentNode.id);
+ if (elem && elem.style.display == 'block') // children visible
+ {
+ focusItem = document.getElementById('Item'+itemIndex+'_c0');
+ }
+ if (!focusItem) focusItem = this.NavNext(newIndex);
+ if (focusItem) focusItem.focus();
+ }
+ else if (this.lastKey==39) // Right
+ {
+ var item = document.getElementById('Item'+itemIndex);
+ var elem = this.FindChildElement(item.parentNode.parentNode.id);
+ if (elem) elem.style.display = 'block';
+ }
+ else if (this.lastKey==37) // Left
+ {
+ var item = document.getElementById('Item'+itemIndex);
+ var elem = this.FindChildElement(item.parentNode.parentNode.id);
+ if (elem) elem.style.display = 'none';
+ }
+ else if (this.lastKey==27) // Escape
+ {
+ parent.searchBox.CloseResultsWindow();
+ parent.document.getElementById("MSearchField").focus();
+ }
+ else if (this.lastKey==13) // Enter
+ {
+ return true;
+ }
+ return false;
+ }
+
+ this.NavChild = function(evt,itemIndex,childIndex)
+ {
+ var e = (evt) ? evt : window.event; // for IE
+ if (e.keyCode==13) return true;
+ if (!this.ProcessKeys(e)) return false;
+
+ if (this.lastKey==38) // Up
+ {
+ if (childIndex>0)
+ {
+ var newIndex = childIndex-1;
+ document.getElementById('Item'+itemIndex+'_c'+newIndex).focus();
+ }
+ else // already at first child, jump to parent
+ {
+ document.getElementById('Item'+itemIndex).focus();
+ }
+ }
+ else if (this.lastKey==40) // Down
+ {
+ var newIndex = childIndex+1;
+ var elem = document.getElementById('Item'+itemIndex+'_c'+newIndex);
+ if (!elem) // last child, jump to parent next parent
+ {
+ elem = this.NavNext(itemIndex+1);
+ }
+ if (elem)
+ {
+ elem.focus();
+ }
+ }
+ else if (this.lastKey==27) // Escape
+ {
+ parent.searchBox.CloseResultsWindow();
+ parent.document.getElementById("MSearchField").focus();
+ }
+ else if (this.lastKey==13) // Enter
+ {
+ return true;
+ }
+ return false;
+ }
+}
+
+function setKeyActions(elem,action)
+{
+ elem.setAttribute('onkeydown',action);
+ elem.setAttribute('onkeypress',action);
+ elem.setAttribute('onkeyup',action);
+}
+
+function setClassAttr(elem,attr)
+{
+ elem.setAttribute('class',attr);
+ elem.setAttribute('className',attr);
+}
+
+function createResults()
+{
+ var results = document.getElementById("SRResults");
+ for (var e=0; e<searchData.length; e++)
+ {
+ var id = searchData[e][0];
+ var srResult = document.createElement('div');
+ srResult.setAttribute('id','SR_'+id);
+ setClassAttr(srResult,'SRResult');
+ var srEntry = document.createElement('div');
+ setClassAttr(srEntry,'SREntry');
+ var srLink = document.createElement('a');
+ srLink.setAttribute('id','Item'+e);
+ setKeyActions(srLink,'return searchResults.Nav(event,'+e+')');
+ setClassAttr(srLink,'SRSymbol');
+ srLink.innerHTML = searchData[e][1][0];
+ srEntry.appendChild(srLink);
+ if (searchData[e][1].length==2) // single result
+ {
+ srLink.setAttribute('href',searchData[e][1][1][0]);
+ if (searchData[e][1][1][1])
+ {
+ srLink.setAttribute('target','_parent');
+ }
+ var srScope = document.createElement('span');
+ setClassAttr(srScope,'SRScope');
+ srScope.innerHTML = searchData[e][1][1][2];
+ srEntry.appendChild(srScope);
+ }
+ else // multiple results
+ {
+ srLink.setAttribute('href','javascript:searchResults.Toggle("SR_'+id+'")');
+ var srChildren = document.createElement('div');
+ setClassAttr(srChildren,'SRChildren');
+ for (var c=0; c<searchData[e][1].length-1; c++)
+ {
+ var srChild = document.createElement('a');
+ srChild.setAttribute('id','Item'+e+'_c'+c);
+ setKeyActions(srChild,'return searchResults.NavChild(event,'+e+','+c+')');
+ setClassAttr(srChild,'SRScope');
+ srChild.setAttribute('href',searchData[e][1][c+1][0]);
+ if (searchData[e][1][c+1][1])
+ {
+ srChild.setAttribute('target','_parent');
+ }
+ srChild.innerHTML = searchData[e][1][c+1][2];
+ srChildren.appendChild(srChild);
+ }
+ srEntry.appendChild(srChildren);
+ }
+ srResult.appendChild(srEntry);
+ results.appendChild(srResult);
+ }
+}
+
+function init_search()
+{
+ var results = document.getElementById("MSearchSelectWindow");
+ for (var key in indexSectionLabels)
+ {
+ var link = document.createElement('a');
+ link.setAttribute('class','SelectItem');
+ link.setAttribute('onclick','searchBox.OnSelectItem('+key+')');
+ link.href='javascript:void(0)';
+ link.innerHTML='<span class="SelectionMark">&#160;</span>'+indexSectionLabels[key];
+ results.appendChild(link);
+ }
+ searchBox.OnSelectItem(0);
+}
+
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/search_l.png b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/search_l.png
new file mode 100644
index 0000000..c872f4d
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/search_l.png
Binary files differ
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/search_m.png b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/search_m.png
new file mode 100644
index 0000000..b429a16
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/search_m.png
Binary files differ
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/search_r.png b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/search_r.png
new file mode 100644
index 0000000..97ee8b4
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/search_r.png
Binary files differ
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/searchdata.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/searchdata.js
new file mode 100644
index 0000000..d69b699
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/searchdata.js
@@ -0,0 +1,39 @@
+var indexSectionsWithContent =
+{
+ 0: "_aceghilmnoprstuv~",
+ 1: "el",
+ 2: "hlt",
+ 3: "_ceghilmoprstu~",
+ 4: "_aehnv",
+ 5: "hr",
+ 6: "elr",
+ 7: "elnor",
+ 8: "_aceh"
+};
+
+var indexSectionNames =
+{
+ 0: "all",
+ 1: "classes",
+ 2: "files",
+ 3: "functions",
+ 4: "variables",
+ 5: "typedefs",
+ 6: "enums",
+ 7: "enumvalues",
+ 8: "defines"
+};
+
+var indexSectionLabels =
+{
+ 0: "All",
+ 1: "Classes",
+ 2: "Files",
+ 3: "Functions",
+ 4: "Variables",
+ 5: "Typedefs",
+ 6: "Enumerations",
+ 7: "Enumerator",
+ 8: "Macros"
+};
+
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/typedefs_0.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/typedefs_0.html
new file mode 100644
index 0000000..05722e1
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/typedefs_0.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="typedefs_0.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/typedefs_0.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/typedefs_0.js
new file mode 100644
index 0000000..5a33afe
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/typedefs_0.js
@@ -0,0 +1,4 @@
+var searchData=
+[
+ ['handler_5ffunc',['handler_func',['../de/dd0/class_lib_home_screen.html#a334f11f81c84c98d18284215dcaada3a',1,'LibHomeScreen']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/typedefs_1.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/typedefs_1.html
new file mode 100644
index 0000000..b77c533
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/typedefs_1.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="typedefs_1.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/typedefs_1.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/typedefs_1.js
new file mode 100644
index 0000000..eac379f
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/typedefs_1.js
@@ -0,0 +1,4 @@
+var searchData=
+[
+ ['req_5ferror',['REQ_ERROR',['../d3/d3d/hs-helper_8h.html#ab0d62ccfa9c3ab87f090f67c3d50adce',1,'hs-helper.h']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/variables_0.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/variables_0.html
new file mode 100644
index 0000000..74ce807
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/variables_0.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="variables_0.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/variables_0.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/variables_0.js
new file mode 100644
index 0000000..e4cf187
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/variables_0.js
@@ -0,0 +1,7 @@
+var searchData=
+[
+ ['_5fapplication_5fname',['_application_name',['../d0/d1e/homescreen_8c.html#a1f2c79fa6801b63751e270d67994fe81',1,'homescreen.c']]],
+ ['_5fdisplay_5fmessage',['_display_message',['../d0/d1e/homescreen_8c.html#abfd6c1d6f316fa952b11553f8f275e92',1,'homescreen.c']]],
+ ['_5ferror',['_error',['../d0/d1e/homescreen_8c.html#aed1c5296a2e6d34945507a0fca17a376',1,'homescreen.c']]],
+ ['_5freply_5fmessage',['_reply_message',['../d0/d1e/homescreen_8c.html#a79b0f0b481161527ccb80e83da143219',1,'homescreen.c']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/variables_1.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/variables_1.html
new file mode 100644
index 0000000..84237b6
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/variables_1.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="variables_1.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/variables_1.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/variables_1.js
new file mode 100644
index 0000000..8fd9e58
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/variables_1.js
@@ -0,0 +1,6 @@
+var searchData=
+[
+ ['afbbindingv2',['afbBindingV2',['../d0/d1e/homescreen_8c.html#ae2a62ab481a2922cbfc788193857a12e',1,'homescreen.c']]],
+ ['api',['API',['../d0/d8a/libhomescreen_8cpp.html#a1e2d6e77dd8f0162f830058579eab42f',1,'libhomescreen.cpp']]],
+ ['api_5flist',['api_list',['../de/dd0/class_lib_home_screen.html#a5593ff5ac78f6495ccb649904cf0ab08',1,'LibHomeScreen']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/variables_2.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/variables_2.html
new file mode 100644
index 0000000..5c9de1a
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/variables_2.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="variables_2.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/variables_2.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/variables_2.js
new file mode 100644
index 0000000..af57c7f
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/variables_2.js
@@ -0,0 +1,11 @@
+var searchData=
+[
+ ['error_5fflag',['ERROR_FLAG',['../df/d76/hmi-debug_8h.html#a13d4c7647aad2e84766f8b48a6caab09',1,'hmi-debug.h']]],
+ ['ev_5fon_5fscreen_5fmessage',['ev_on_screen_message',['../d0/d1e/homescreen_8c.html#af7cfc4f688bb898c09291252c4cb832c',1,'homescreen.c']]],
+ ['ev_5fon_5fscreen_5freply',['ev_on_screen_reply',['../d0/d1e/homescreen_8c.html#a5c225341e0ecbae0585302ef754a55ec',1,'homescreen.c']]],
+ ['ev_5freserved',['ev_reserved',['../d0/d1e/homescreen_8c.html#a25fbdcc4e5787e3f41d99f4a71e86611',1,'homescreen.c']]],
+ ['ev_5ftap_5fshortcut',['ev_tap_shortcut',['../d0/d1e/homescreen_8c.html#a2af1ff5a4cbf03125e61e903832035f5',1,'homescreen.c']]],
+ ['event',['event',['../df/d7d/structevent.html#a58726ebc551d36562ac3f9e1fe293214',1,'event']]],
+ ['event_5flist',['event_list',['../de/dd0/class_lib_home_screen.html#a6a6d8a4d33a006a08652e7377a4c29e9',1,'LibHomeScreen::event_list()'],['../d0/d1e/homescreen_8c.html#a1c3c5bfa861dcb58d9e9d216d893864c',1,'event_list():&#160;homescreen.c']]],
+ ['evlist',['evlist',['../d3/d3d/hs-helper_8h.html#a0cd84b1a2184c9b84d1b7bf24582f28e',1,'hs-helper.h']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/variables_3.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/variables_3.html
new file mode 100644
index 0000000..f95e34c
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/variables_3.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="variables_3.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/variables_3.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/variables_3.js
new file mode 100644
index 0000000..f464178
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/variables_3.js
@@ -0,0 +1,4 @@
+var searchData=
+[
+ ['hs',['hs',['../df/dac/test_8cpp.html#a529acbd1fed9d98a587edfa62309fa8d',1,'test.cpp']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/variables_4.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/variables_4.html
new file mode 100644
index 0000000..d7db285
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/variables_4.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="variables_4.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/variables_4.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/variables_4.js
new file mode 100644
index 0000000..6a1e2f2
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/variables_4.js
@@ -0,0 +1,4 @@
+var searchData=
+[
+ ['name',['name',['../df/d7d/structevent.html#a45c6cfb7961a21a3366db067e4cc59ab',1,'event']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/variables_5.html b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/variables_5.html
new file mode 100644
index 0000000..7bbceeb
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/variables_5.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="variables_5.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/variables_5.js b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/variables_5.js
new file mode 100644
index 0000000..954e53b
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/search/variables_5.js
@@ -0,0 +1,4 @@
+var searchData=
+[
+ ['verbs',['verbs',['../d0/d1e/homescreen_8c.html#acad6dadf60fac3d701e488e4fcd11c89',1,'homescreen.c']]]
+];
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/splitbar.png b/demo#3/common/agl-service-homescreen/doc/api-ref/html/splitbar.png
new file mode 100644
index 0000000..fe895f2
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/splitbar.png
Binary files differ
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/sync_off.png b/demo#3/common/agl-service-homescreen/doc/api-ref/html/sync_off.png
new file mode 100644
index 0000000..3b443fc
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/sync_off.png
Binary files differ
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/sync_on.png b/demo#3/common/agl-service-homescreen/doc/api-ref/html/sync_on.png
new file mode 100644
index 0000000..e08320f
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/sync_on.png
Binary files differ
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/tab_a.png b/demo#3/common/agl-service-homescreen/doc/api-ref/html/tab_a.png
new file mode 100644
index 0000000..3b725c4
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/tab_a.png
Binary files differ
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/tab_b.png b/demo#3/common/agl-service-homescreen/doc/api-ref/html/tab_b.png
new file mode 100644
index 0000000..e2b4a86
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/tab_b.png
Binary files differ
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/tab_h.png b/demo#3/common/agl-service-homescreen/doc/api-ref/html/tab_h.png
new file mode 100644
index 0000000..fd5cb70
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/tab_h.png
Binary files differ
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/tab_s.png b/demo#3/common/agl-service-homescreen/doc/api-ref/html/tab_s.png
new file mode 100644
index 0000000..ab478c9
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/tab_s.png
Binary files differ
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/html/tabs.css b/demo#3/common/agl-service-homescreen/doc/api-ref/html/tabs.css
new file mode 100644
index 0000000..a28614b
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/html/tabs.css
@@ -0,0 +1 @@
+.sm{position:relative;z-index:9999}.sm,.sm ul,.sm li{display:block;list-style:none;margin:0;padding:0;line-height:normal;direction:ltr;text-align:left;-webkit-tap-highlight-color:rgba(0,0,0,0)}.sm-rtl,.sm-rtl ul,.sm-rtl li{direction:rtl;text-align:right}.sm>li>h1,.sm>li>h2,.sm>li>h3,.sm>li>h4,.sm>li>h5,.sm>li>h6{margin:0;padding:0}.sm ul{display:none}.sm li,.sm a{position:relative}.sm a{display:block}.sm a.disabled{cursor:not-allowed}.sm:after{content:"\00a0";display:block;height:0;font:0/0 serif;clear:both;visibility:hidden;overflow:hidden}.sm,.sm *,.sm *:before,.sm *:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}#doc-content{overflow:auto;display:block;padding:0;margin:0;-webkit-overflow-scrolling:touch}.sm-dox{background-image:url("tab_b.png")}.sm-dox a,.sm-dox a:focus,.sm-dox a:hover,.sm-dox a:active{padding:0 12px;padding-right:43px;font-family:"Lucida Grande","Geneva","Helvetica",Arial,sans-serif;font-size:13px;font-weight:bold;line-height:36px;text-decoration:none;text-shadow:0 1px 1px rgba(255,255,255,0.9);color:#283a5d;outline:0}.sm-dox a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox a.current{color:#d23600}.sm-dox a.disabled{color:#bbb}.sm-dox a span.sub-arrow{position:absolute;top:50%;margin-top:-14px;left:auto;right:3px;width:28px;height:28px;overflow:hidden;font:bold 12px/28px monospace!important;text-align:center;text-shadow:none;background:rgba(255,255,255,0.5);-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox a.highlighted span.sub-arrow:before{display:block;content:'-'}.sm-dox>li:first-child>a,.sm-dox>li:first-child>:not(ul) a{-moz-border-radius:5px 5px 0 0;-webkit-border-radius:5px;border-radius:5px 5px 0 0}.sm-dox>li:last-child>a,.sm-dox>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul{-moz-border-radius:0 0 5px 5px;-webkit-border-radius:0;border-radius:0 0 5px 5px}.sm-dox>li:last-child>a.highlighted,.sm-dox>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox ul{background:rgba(162,162,162,0.1)}.sm-dox ul a,.sm-dox ul a:focus,.sm-dox ul a:hover,.sm-dox ul a:active{font-size:12px;border-left:8px solid transparent;line-height:36px;text-shadow:none;background-color:white;background-image:none}.sm-dox ul a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox ul ul a,.sm-dox ul ul a:hover,.sm-dox ul ul a:focus,.sm-dox ul ul a:active{border-left:16px solid transparent}.sm-dox ul ul ul a,.sm-dox ul ul ul a:hover,.sm-dox ul ul ul a:focus,.sm-dox ul ul ul a:active{border-left:24px solid transparent}.sm-dox ul ul ul ul a,.sm-dox ul ul ul ul a:hover,.sm-dox ul ul ul ul a:focus,.sm-dox ul ul ul ul a:active{border-left:32px solid transparent}.sm-dox ul ul ul ul ul a,.sm-dox ul ul ul ul ul a:hover,.sm-dox ul ul ul ul ul a:focus,.sm-dox ul ul ul ul ul a:active{border-left:40px solid transparent}@media(min-width:768px){.sm-dox ul{position:absolute;width:12em}.sm-dox li{float:left}.sm-dox.sm-rtl li{float:right}.sm-dox ul li,.sm-dox.sm-rtl ul li,.sm-dox.sm-vertical li{float:none}.sm-dox a{white-space:nowrap}.sm-dox ul a,.sm-dox.sm-vertical a{white-space:normal}.sm-dox .sm-nowrap>li>a,.sm-dox .sm-nowrap>li>:not(ul) a{white-space:nowrap}.sm-dox{padding:0 10px;background-image:url("tab_b.png");line-height:36px}.sm-dox a span.sub-arrow{top:50%;margin-top:-2px;right:12px;width:0;height:0;border-width:4px;border-style:solid dashed dashed dashed;border-color:#283a5d transparent transparent transparent;background:transparent;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox a,.sm-dox a:focus,.sm-dox a:active,.sm-dox a:hover,.sm-dox a.highlighted{padding:0 12px;background-image:url("tab_s.png");background-repeat:no-repeat;background-position:right;-moz-border-radius:0!important;-webkit-border-radius:0;border-radius:0!important}.sm-dox a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox a:hover span.sub-arrow{border-color:white transparent transparent transparent}.sm-dox a.has-submenu{padding-right:24px}.sm-dox li{border-top:0}.sm-dox>li>ul:before,.sm-dox>li>ul:after{content:'';position:absolute;top:-18px;left:30px;width:0;height:0;overflow:hidden;border-width:9px;border-style:dashed dashed solid dashed;border-color:transparent transparent #bbb transparent}.sm-dox>li>ul:after{top:-16px;left:31px;border-width:8px;border-color:transparent transparent #fff transparent}.sm-dox ul{border:1px solid #bbb;padding:5px 0;background:#fff;-moz-border-radius:5px!important;-webkit-border-radius:5px;border-radius:5px!important;-moz-box-shadow:0 5px 9px rgba(0,0,0,0.2);-webkit-box-shadow:0 5px 9px rgba(0,0,0,0.2);box-shadow:0 5px 9px rgba(0,0,0,0.2)}.sm-dox ul a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-color:transparent transparent transparent #555;border-style:dashed dashed dashed solid}.sm-dox ul a,.sm-dox ul a:hover,.sm-dox ul a:focus,.sm-dox ul a:active,.sm-dox ul a.highlighted{color:#555;background-image:none;border:0!important;color:#555;background-image:none}.sm-dox ul a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox ul a:hover span.sub-arrow{border-color:transparent transparent transparent white}.sm-dox span.scroll-up,.sm-dox span.scroll-down{position:absolute;display:none;visibility:hidden;overflow:hidden;background:#fff;height:36px}.sm-dox span.scroll-up:hover,.sm-dox span.scroll-down:hover{background:#eee}.sm-dox span.scroll-up:hover span.scroll-up-arrow,.sm-dox span.scroll-up:hover span.scroll-down-arrow{border-color:transparent transparent #d23600 transparent}.sm-dox span.scroll-down:hover span.scroll-down-arrow{border-color:#d23600 transparent transparent transparent}.sm-dox span.scroll-up-arrow,.sm-dox span.scroll-down-arrow{position:absolute;top:0;left:50%;margin-left:-6px;width:0;height:0;overflow:hidden;border-width:6px;border-style:dashed dashed solid dashed;border-color:transparent transparent #555 transparent}.sm-dox span.scroll-down-arrow{top:8px;border-style:solid dashed dashed dashed;border-color:#555 transparent transparent transparent}.sm-dox.sm-rtl a.has-submenu{padding-right:12px;padding-left:24px}.sm-dox.sm-rtl a span.sub-arrow{right:auto;left:12px}.sm-dox.sm-rtl.sm-vertical a.has-submenu{padding:10px 20px}.sm-dox.sm-rtl.sm-vertical a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-rtl>li>ul:before{left:auto;right:30px}.sm-dox.sm-rtl>li>ul:after{left:auto;right:31px}.sm-dox.sm-rtl ul a.has-submenu{padding:10px 20px!important}.sm-dox.sm-rtl ul a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-vertical{padding:10px 0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox.sm-vertical a{padding:10px 20px}.sm-dox.sm-vertical a:hover,.sm-dox.sm-vertical a:focus,.sm-dox.sm-vertical a:active,.sm-dox.sm-vertical a.highlighted{background:#fff}.sm-dox.sm-vertical a.disabled{background-image:url("tab_b.png")}.sm-dox.sm-vertical a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-style:dashed dashed dashed solid;border-color:transparent transparent transparent #555}.sm-dox.sm-vertical>li>ul:before,.sm-dox.sm-vertical>li>ul:after{display:none}.sm-dox.sm-vertical ul a{padding:10px 20px}.sm-dox.sm-vertical ul a:hover,.sm-dox.sm-vertical ul a:focus,.sm-dox.sm-vertical ul a:active,.sm-dox.sm-vertical ul a.highlighted{background:#eee}.sm-dox.sm-vertical ul a.disabled{background:#fff}} \ No newline at end of file
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/latex/annotated.tex b/demo#3/common/agl-service-homescreen/doc/api-ref/latex/annotated.tex
new file mode 100644
index 0000000..a2fba4c
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/latex/annotated.tex
@@ -0,0 +1,5 @@
+\section{Class List}
+Here are the classes, structs, unions and interfaces with brief descriptions\+:\begin{DoxyCompactList}
+\item\contentsline{section}{\hyperlink{structevent}{event} }{\pageref{structevent}}{}
+\item\contentsline{section}{\hyperlink{class_lib_home_screen}{Lib\+Home\+Screen} }{\pageref{class_lib_home_screen}}{}
+\end{DoxyCompactList}
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/latex/d0/d1e/homescreen_8c.tex b/demo#3/common/agl-service-homescreen/doc/api-ref/latex/d0/d1e/homescreen_8c.tex
new file mode 100644
index 0000000..150bacb
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/latex/d0/d1e/homescreen_8c.tex
@@ -0,0 +1,599 @@
+\hypertarget{homescreen_8c}{}\section{src/homescreen.c File Reference}
+\label{homescreen_8c}\index{src/homescreen.\+c@{src/homescreen.\+c}}
+{\ttfamily \#include $<$afb/afb-\/binding.\+h$>$}\newline
+{\ttfamily \#include $<$stdio.\+h$>$}\newline
+{\ttfamily \#include $<$string.\+h$>$}\newline
+{\ttfamily \#include $<$stdlib.\+h$>$}\newline
+{\ttfamily \#include $<$stdint.\+h$>$}\newline
+{\ttfamily \#include $<$unistd.\+h$>$}\newline
+{\ttfamily \#include $<$json-\/c/json.\+h$>$}\newline
+{\ttfamily \#include $<$glib.\+h$>$}\newline
+{\ttfamily \#include $<$pthread.\+h$>$}\newline
+{\ttfamily \#include \char`\"{}hs-\/helper.\+h\char`\"{}}\newline
+\subsection*{Classes}
+\begin{DoxyCompactItemize}
+\item
+struct \hyperlink{structevent}{event}
+\end{DoxyCompactItemize}
+\subsection*{Macros}
+\begin{DoxyCompactItemize}
+\item
+\#define \hyperlink{homescreen_8c_a369266c24eacffb87046522897a570d5}{\+\_\+\+G\+N\+U\+\_\+\+S\+O\+U\+R\+CE}
+\item
+\#define \hyperlink{homescreen_8c_ad2c1fbc92ba364fcf83f15e6d0af66f0}{A\+F\+B\+\_\+\+B\+I\+N\+D\+I\+N\+G\+\_\+\+V\+E\+R\+S\+I\+ON}~2
+\item
+\#define \hyperlink{homescreen_8c_a09f43d9e7e1c5d2198c0d66024b4500e}{C\+O\+M\+M\+A\+N\+D\+\_\+\+E\+V\+E\+N\+T\+\_\+\+N\+UM}~4
+\item
+\#define \hyperlink{homescreen_8c_a9a68ed04201d9390bb85b2c6ab1d7250}{E\+V\+E\+N\+T\+\_\+\+S\+U\+B\+S\+C\+R\+I\+B\+E\+\_\+\+E\+R\+R\+O\+R\+\_\+\+C\+O\+DE}~100
+\end{DoxyCompactItemize}
+\subsection*{Functions}
+\begin{DoxyCompactItemize}
+\item
+static void \hyperlink{homescreen_8c_af48cab759d4ae0ddbfcdd60f4051ba05}{ping\+Sample} (struct afb\+\_\+req request)
+\item
+static void \hyperlink{homescreen_8c_a096eae5c8f297f9df142a406eea56227}{tap\+\_\+shortcut} (struct afb\+\_\+req request)
+\item
+static void \hyperlink{homescreen_8c_a640cf8ed97d804c5ed1c09a349056338}{on\+\_\+screen\+\_\+message} (struct afb\+\_\+req request)
+\item
+static void \hyperlink{homescreen_8c_a2f380055d7d69828115d2a8951634933}{on\+\_\+screen\+\_\+reply} (struct afb\+\_\+req request)
+\item
+static void \hyperlink{homescreen_8c_a4ff0c8b506669e5622a6ee168134d8f1}{subscribe} (struct afb\+\_\+req request)
+\item
+static void \hyperlink{homescreen_8c_ab92621255d7370c6dd8a0f1a8e376ad3}{unsubscribe} (struct afb\+\_\+req request)
+\item
+static int \hyperlink{homescreen_8c_a83d646edf54a6a082f69121bc89a08de}{preinit} ()
+\item
+static int \hyperlink{homescreen_8c_a00cbbc0f3f4452db078ae511684a6adc}{init} ()
+\item
+static void \hyperlink{homescreen_8c_a1279893c0fe937311a81e0a98fb4cf1c}{onevent} (const char $\ast$\hyperlink{structevent}{event}, struct json\+\_\+object $\ast$object)
+\end{DoxyCompactItemize}
+\subsection*{Variables}
+\begin{DoxyCompactItemize}
+\item
+static struct \hyperlink{structevent}{event} \hyperlink{homescreen_8c_a1c3c5bfa861dcb58d9e9d216d893864c}{event\+\_\+list} \mbox{[}\hyperlink{homescreen_8c_a09f43d9e7e1c5d2198c0d66024b4500e}{C\+O\+M\+M\+A\+N\+D\+\_\+\+E\+V\+E\+N\+T\+\_\+\+N\+UM}\mbox{]}
+\item
+static struct afb\+\_\+event \hyperlink{homescreen_8c_a2af1ff5a4cbf03125e61e903832035f5}{ev\+\_\+tap\+\_\+shortcut}
+\item
+static struct afb\+\_\+event \hyperlink{homescreen_8c_af7cfc4f688bb898c09291252c4cb832c}{ev\+\_\+on\+\_\+screen\+\_\+message}
+\item
+static struct afb\+\_\+event \hyperlink{homescreen_8c_a5c225341e0ecbae0585302ef754a55ec}{ev\+\_\+on\+\_\+screen\+\_\+reply}
+\item
+static struct afb\+\_\+event \hyperlink{homescreen_8c_a25fbdcc4e5787e3f41d99f4a71e86611}{ev\+\_\+reserved}
+\item
+static const char \hyperlink{homescreen_8c_aed1c5296a2e6d34945507a0fca17a376}{\+\_\+error} \mbox{[}$\,$\mbox{]} = \char`\"{}error\char`\"{}
+\item
+static const char \hyperlink{homescreen_8c_a1f2c79fa6801b63751e270d67994fe81}{\+\_\+application\+\_\+name} \mbox{[}$\,$\mbox{]} = \char`\"{}application\+\_\+name\char`\"{}
+\item
+static const char \hyperlink{homescreen_8c_abfd6c1d6f316fa952b11553f8f275e92}{\+\_\+display\+\_\+message} \mbox{[}$\,$\mbox{]} = \char`\"{}display\+\_\+message\char`\"{}
+\item
+static const char \hyperlink{homescreen_8c_a79b0f0b481161527ccb80e83da143219}{\+\_\+reply\+\_\+message} \mbox{[}$\,$\mbox{]} = \char`\"{}reply\+\_\+message\char`\"{}
+\item
+static const struct afb\+\_\+verb\+\_\+v2 \hyperlink{homescreen_8c_acad6dadf60fac3d701e488e4fcd11c89}{verbs} \mbox{[}$\,$\mbox{]}
+\item
+const struct afb\+\_\+binding\+\_\+v2 \hyperlink{homescreen_8c_ae2a62ab481a2922cbfc788193857a12e}{afb\+Binding\+V2}
+\end{DoxyCompactItemize}
+
+
+\subsection{Macro Definition Documentation}
+\mbox{\Hypertarget{homescreen_8c_a369266c24eacffb87046522897a570d5}\label{homescreen_8c_a369266c24eacffb87046522897a570d5}}
+\index{homescreen.\+c@{homescreen.\+c}!\+\_\+\+G\+N\+U\+\_\+\+S\+O\+U\+R\+CE@{\+\_\+\+G\+N\+U\+\_\+\+S\+O\+U\+R\+CE}}
+\index{\+\_\+\+G\+N\+U\+\_\+\+S\+O\+U\+R\+CE@{\+\_\+\+G\+N\+U\+\_\+\+S\+O\+U\+R\+CE}!homescreen.\+c@{homescreen.\+c}}
+\subsubsection{\texorpdfstring{\+\_\+\+G\+N\+U\+\_\+\+S\+O\+U\+R\+CE}{\_GNU\_SOURCE}}
+{\footnotesize\ttfamily \#define \+\_\+\+G\+N\+U\+\_\+\+S\+O\+U\+R\+CE}
+
+
+
+Definition at line 17 of file homescreen.\+c.
+
+\mbox{\Hypertarget{homescreen_8c_ad2c1fbc92ba364fcf83f15e6d0af66f0}\label{homescreen_8c_ad2c1fbc92ba364fcf83f15e6d0af66f0}}
+\index{homescreen.\+c@{homescreen.\+c}!A\+F\+B\+\_\+\+B\+I\+N\+D\+I\+N\+G\+\_\+\+V\+E\+R\+S\+I\+ON@{A\+F\+B\+\_\+\+B\+I\+N\+D\+I\+N\+G\+\_\+\+V\+E\+R\+S\+I\+ON}}
+\index{A\+F\+B\+\_\+\+B\+I\+N\+D\+I\+N\+G\+\_\+\+V\+E\+R\+S\+I\+ON@{A\+F\+B\+\_\+\+B\+I\+N\+D\+I\+N\+G\+\_\+\+V\+E\+R\+S\+I\+ON}!homescreen.\+c@{homescreen.\+c}}
+\subsubsection{\texorpdfstring{A\+F\+B\+\_\+\+B\+I\+N\+D\+I\+N\+G\+\_\+\+V\+E\+R\+S\+I\+ON}{AFB\_BINDING\_VERSION}}
+{\footnotesize\ttfamily \#define A\+F\+B\+\_\+\+B\+I\+N\+D\+I\+N\+G\+\_\+\+V\+E\+R\+S\+I\+ON~2}
+
+
+
+Definition at line 18 of file homescreen.\+c.
+
+\mbox{\Hypertarget{homescreen_8c_a09f43d9e7e1c5d2198c0d66024b4500e}\label{homescreen_8c_a09f43d9e7e1c5d2198c0d66024b4500e}}
+\index{homescreen.\+c@{homescreen.\+c}!C\+O\+M\+M\+A\+N\+D\+\_\+\+E\+V\+E\+N\+T\+\_\+\+N\+UM@{C\+O\+M\+M\+A\+N\+D\+\_\+\+E\+V\+E\+N\+T\+\_\+\+N\+UM}}
+\index{C\+O\+M\+M\+A\+N\+D\+\_\+\+E\+V\+E\+N\+T\+\_\+\+N\+UM@{C\+O\+M\+M\+A\+N\+D\+\_\+\+E\+V\+E\+N\+T\+\_\+\+N\+UM}!homescreen.\+c@{homescreen.\+c}}
+\subsubsection{\texorpdfstring{C\+O\+M\+M\+A\+N\+D\+\_\+\+E\+V\+E\+N\+T\+\_\+\+N\+UM}{COMMAND\_EVENT\_NUM}}
+{\footnotesize\ttfamily \#define C\+O\+M\+M\+A\+N\+D\+\_\+\+E\+V\+E\+N\+T\+\_\+\+N\+UM~4}
+
+
+
+Definition at line 31 of file homescreen.\+c.
+
+\mbox{\Hypertarget{homescreen_8c_a9a68ed04201d9390bb85b2c6ab1d7250}\label{homescreen_8c_a9a68ed04201d9390bb85b2c6ab1d7250}}
+\index{homescreen.\+c@{homescreen.\+c}!E\+V\+E\+N\+T\+\_\+\+S\+U\+B\+S\+C\+R\+I\+B\+E\+\_\+\+E\+R\+R\+O\+R\+\_\+\+C\+O\+DE@{E\+V\+E\+N\+T\+\_\+\+S\+U\+B\+S\+C\+R\+I\+B\+E\+\_\+\+E\+R\+R\+O\+R\+\_\+\+C\+O\+DE}}
+\index{E\+V\+E\+N\+T\+\_\+\+S\+U\+B\+S\+C\+R\+I\+B\+E\+\_\+\+E\+R\+R\+O\+R\+\_\+\+C\+O\+DE@{E\+V\+E\+N\+T\+\_\+\+S\+U\+B\+S\+C\+R\+I\+B\+E\+\_\+\+E\+R\+R\+O\+R\+\_\+\+C\+O\+DE}!homescreen.\+c@{homescreen.\+c}}
+\subsubsection{\texorpdfstring{E\+V\+E\+N\+T\+\_\+\+S\+U\+B\+S\+C\+R\+I\+B\+E\+\_\+\+E\+R\+R\+O\+R\+\_\+\+C\+O\+DE}{EVENT\_SUBSCRIBE\_ERROR\_CODE}}
+{\footnotesize\ttfamily \#define E\+V\+E\+N\+T\+\_\+\+S\+U\+B\+S\+C\+R\+I\+B\+E\+\_\+\+E\+R\+R\+O\+R\+\_\+\+C\+O\+DE~100}
+
+
+
+Definition at line 32 of file homescreen.\+c.
+
+
+
+\subsection{Function Documentation}
+\mbox{\Hypertarget{homescreen_8c_a00cbbc0f3f4452db078ae511684a6adc}\label{homescreen_8c_a00cbbc0f3f4452db078ae511684a6adc}}
+\index{homescreen.\+c@{homescreen.\+c}!init@{init}}
+\index{init@{init}!homescreen.\+c@{homescreen.\+c}}
+\subsubsection{\texorpdfstring{init()}{init()}}
+{\footnotesize\ttfamily static int init (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}
+
+
+
+Definition at line 277 of file homescreen.\+c.
+
+
+\begin{DoxyCode}
+278 \{
+279 \hyperlink{hmi-debug_8h_abc0d6e0760017d8ae48b836925b2ef15}{HMI\_NOTICE}(\textcolor{stringliteral}{"homescreen-service"},\textcolor{stringliteral}{"binding init"});
+280
+281 \hyperlink{homescreen_8c_a2af1ff5a4cbf03125e61e903832035f5}{ev\_tap\_shortcut} = afb\_daemon\_make\_event(\hyperlink{hs-helper_8h_a0cd84b1a2184c9b84d1b7bf24582f28e}{evlist}[0]);
+282 \hyperlink{homescreen_8c_af7cfc4f688bb898c09291252c4cb832c}{ev\_on\_screen\_message} = afb\_daemon\_make\_event(\hyperlink{hs-helper_8h_a0cd84b1a2184c9b84d1b7bf24582f28e}{evlist}[1]);
+283 \hyperlink{homescreen_8c_a5c225341e0ecbae0585302ef754a55ec}{ev\_on\_screen\_reply} = afb\_daemon\_make\_event(\hyperlink{hs-helper_8h_a0cd84b1a2184c9b84d1b7bf24582f28e}{evlist}[2]);
+284 \hyperlink{homescreen_8c_a25fbdcc4e5787e3f41d99f4a71e86611}{ev\_reserved} = afb\_daemon\_make\_event(\hyperlink{hs-helper_8h_a0cd84b1a2184c9b84d1b7bf24582f28e}{evlist}[3]);
+285
+286 \hyperlink{homescreen_8c_a1c3c5bfa861dcb58d9e9d216d893864c}{event\_list}[0].\hyperlink{structevent_a45c6cfb7961a21a3366db067e4cc59ab}{name} = \hyperlink{hs-helper_8h_a0cd84b1a2184c9b84d1b7bf24582f28e}{evlist}[0];
+287 \hyperlink{homescreen_8c_a1c3c5bfa861dcb58d9e9d216d893864c}{event\_list}[0].\hyperlink{structevent_a58726ebc551d36562ac3f9e1fe293214}{event} = &\hyperlink{homescreen_8c_a2af1ff5a4cbf03125e61e903832035f5}{ev\_tap\_shortcut};
+288
+289 \hyperlink{homescreen_8c_a1c3c5bfa861dcb58d9e9d216d893864c}{event\_list}[1].\hyperlink{structevent_a45c6cfb7961a21a3366db067e4cc59ab}{name} = \hyperlink{hs-helper_8h_a0cd84b1a2184c9b84d1b7bf24582f28e}{evlist}[1];
+290 \hyperlink{homescreen_8c_a1c3c5bfa861dcb58d9e9d216d893864c}{event\_list}[1].\hyperlink{structevent_a58726ebc551d36562ac3f9e1fe293214}{event} = &\hyperlink{homescreen_8c_af7cfc4f688bb898c09291252c4cb832c}{ev\_on\_screen\_message};
+291
+292 \hyperlink{homescreen_8c_a1c3c5bfa861dcb58d9e9d216d893864c}{event\_list}[2].\hyperlink{structevent_a45c6cfb7961a21a3366db067e4cc59ab}{name} = \hyperlink{hs-helper_8h_a0cd84b1a2184c9b84d1b7bf24582f28e}{evlist}[2];
+293 \hyperlink{homescreen_8c_a1c3c5bfa861dcb58d9e9d216d893864c}{event\_list}[2].\hyperlink{structevent_a58726ebc551d36562ac3f9e1fe293214}{event} = &\hyperlink{homescreen_8c_a5c225341e0ecbae0585302ef754a55ec}{ev\_on\_screen\_reply};
+294
+295 \hyperlink{homescreen_8c_a1c3c5bfa861dcb58d9e9d216d893864c}{event\_list}[3].\hyperlink{structevent_a45c6cfb7961a21a3366db067e4cc59ab}{name} = \hyperlink{hs-helper_8h_a0cd84b1a2184c9b84d1b7bf24582f28e}{evlist}[3];
+296 \hyperlink{homescreen_8c_a1c3c5bfa861dcb58d9e9d216d893864c}{event\_list}[3].\hyperlink{structevent_a58726ebc551d36562ac3f9e1fe293214}{event} = &\hyperlink{homescreen_8c_a25fbdcc4e5787e3f41d99f4a71e86611}{ev\_reserved};
+297
+298 \textcolor{keywordflow}{return} 0;
+299 \}
+\end{DoxyCode}
+\mbox{\Hypertarget{homescreen_8c_a640cf8ed97d804c5ed1c09a349056338}\label{homescreen_8c_a640cf8ed97d804c5ed1c09a349056338}}
+\index{homescreen.\+c@{homescreen.\+c}!on\+\_\+screen\+\_\+message@{on\+\_\+screen\+\_\+message}}
+\index{on\+\_\+screen\+\_\+message@{on\+\_\+screen\+\_\+message}!homescreen.\+c@{homescreen.\+c}}
+\subsubsection{\texorpdfstring{on\+\_\+screen\+\_\+message()}{on\_screen\_message()}}
+{\footnotesize\ttfamily static void on\+\_\+screen\+\_\+message (\begin{DoxyParamCaption}\item[{struct afb\+\_\+req}]{request }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}
+
+Home\+Screen On\+Screen message
+
+\subparagraph*{Parameters}
+
+Request key
+\begin{DoxyItemize}
+\item display\+\_\+message \+: message for display
+\end{DoxyItemize}
+
+\subparagraph*{Return}
+
+Nothing
+
+Definition at line 114 of file homescreen.\+c.
+
+
+\begin{DoxyCode}
+115 \{
+116 \hyperlink{hmi-debug_8h_abc0d6e0760017d8ae48b836925b2ef15}{HMI\_NOTICE}(\textcolor{stringliteral}{"homescreen-service"},\textcolor{stringliteral}{"is called."});
+117
+118 \textcolor{keywordtype}{int} ret = 0;
+119 \textcolor{keyword}{const} \textcolor{keywordtype}{char}* value = afb\_req\_value(request, \hyperlink{homescreen_8c_abfd6c1d6f316fa952b11553f8f275e92}{\_display\_message});
+120 \textcolor{keywordflow}{if} (value) \{
+121
+122 \hyperlink{hmi-debug_8h_abc0d6e0760017d8ae48b836925b2ef15}{HMI\_NOTICE}(\textcolor{stringliteral}{"homescreen-service"},\textcolor{stringliteral}{"request params = %s."}, value);
+123
+124 \textcolor{keyword}{struct }json\_object* push\_obj = json\_object\_new\_object();
+125 \hyperlink{hs-helper_8c_a8777c53f1d4d5412f19b134ad85ffedf}{hs\_add\_object\_to\_json\_object\_str}( push\_obj, 2,
+126 \hyperlink{homescreen_8c_abfd6c1d6f316fa952b11553f8f275e92}{\_display\_message}, value);
+127 afb\_event\_push(\hyperlink{homescreen_8c_af7cfc4f688bb898c09291252c4cb832c}{ev\_on\_screen\_message}, push\_obj);
+128 \} \textcolor{keywordflow}{else} \{
+129 afb\_req\_fail\_f(request, \textcolor{stringliteral}{"failed"}, \textcolor{stringliteral}{"called %s, Unknown palameter"}, \_\_FUNCTION\_\_);
+130 \textcolor{keywordflow}{return};
+131 \}
+132
+133 \textcolor{comment}{// response to HomeScreen}
+134 \textcolor{keyword}{struct }json\_object *res = json\_object\_new\_object();
+135 \hyperlink{hs-helper_8c_ae83604a37134e7bdee3ce4f10bb0b47a}{hs\_add\_object\_to\_json\_object\_func}(res, \_\_FUNCTION\_\_, 2,
+136 \hyperlink{homescreen_8c_aed1c5296a2e6d34945507a0fca17a376}{\_error}, ret);
+137 afb\_req\_success(request, res, \textcolor{stringliteral}{"afb\_event\_push event [on\_screen\_message]"});
+138 \}
+\end{DoxyCode}
+\mbox{\Hypertarget{homescreen_8c_a2f380055d7d69828115d2a8951634933}\label{homescreen_8c_a2f380055d7d69828115d2a8951634933}}
+\index{homescreen.\+c@{homescreen.\+c}!on\+\_\+screen\+\_\+reply@{on\+\_\+screen\+\_\+reply}}
+\index{on\+\_\+screen\+\_\+reply@{on\+\_\+screen\+\_\+reply}!homescreen.\+c@{homescreen.\+c}}
+\subsubsection{\texorpdfstring{on\+\_\+screen\+\_\+reply()}{on\_screen\_reply()}}
+{\footnotesize\ttfamily static void on\+\_\+screen\+\_\+reply (\begin{DoxyParamCaption}\item[{struct afb\+\_\+req}]{request }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}
+
+Home\+Screen On\+Screen Reply
+
+\subparagraph*{Parameters}
+
+Request key
+\begin{DoxyItemize}
+\item reply\+\_\+message \+: message for reply
+\end{DoxyItemize}
+
+\subparagraph*{Return}
+
+Nothing
+
+Definition at line 151 of file homescreen.\+c.
+
+
+\begin{DoxyCode}
+152 \{
+153 \hyperlink{hmi-debug_8h_abc0d6e0760017d8ae48b836925b2ef15}{HMI\_NOTICE}(\textcolor{stringliteral}{"homescreen-service"},\textcolor{stringliteral}{"is called."});
+154
+155 \textcolor{keywordtype}{int} ret = 0;
+156 \textcolor{keyword}{const} \textcolor{keywordtype}{char}* value = afb\_req\_value(request, \hyperlink{homescreen_8c_a79b0f0b481161527ccb80e83da143219}{\_reply\_message});
+157 \textcolor{keywordflow}{if} (value) \{
+158
+159 \hyperlink{hmi-debug_8h_abc0d6e0760017d8ae48b836925b2ef15}{HMI\_NOTICE}(\textcolor{stringliteral}{"homescreen-service"},\textcolor{stringliteral}{"request params = %s."}, value);
+160
+161 \textcolor{keyword}{struct }json\_object* push\_obj = json\_object\_new\_object();
+162 \hyperlink{hs-helper_8c_a8777c53f1d4d5412f19b134ad85ffedf}{hs\_add\_object\_to\_json\_object\_str}( push\_obj, 2,
+163 \hyperlink{homescreen_8c_a79b0f0b481161527ccb80e83da143219}{\_reply\_message}, value);
+164 afb\_event\_push(\hyperlink{homescreen_8c_a5c225341e0ecbae0585302ef754a55ec}{ev\_on\_screen\_reply}, push\_obj);
+165 \} \textcolor{keywordflow}{else} \{
+166 afb\_req\_fail\_f(request, \textcolor{stringliteral}{"failed"}, \textcolor{stringliteral}{"called %s, Unknown palameter"}, \_\_FUNCTION\_\_);
+167 \textcolor{keywordflow}{return};
+168 \}
+169
+170 \textcolor{comment}{// response to HomeScreen}
+171 \textcolor{keyword}{struct }json\_object *res = json\_object\_new\_object();
+172 \hyperlink{hs-helper_8c_ae83604a37134e7bdee3ce4f10bb0b47a}{hs\_add\_object\_to\_json\_object\_func}(res, \_\_FUNCTION\_\_, 2,
+173 \hyperlink{homescreen_8c_aed1c5296a2e6d34945507a0fca17a376}{\_error}, ret);
+174 afb\_req\_success(request, res, \textcolor{stringliteral}{"afb\_event\_push event [on\_screen\_reply]"});
+175 \}
+\end{DoxyCode}
+\mbox{\Hypertarget{homescreen_8c_a1279893c0fe937311a81e0a98fb4cf1c}\label{homescreen_8c_a1279893c0fe937311a81e0a98fb4cf1c}}
+\index{homescreen.\+c@{homescreen.\+c}!onevent@{onevent}}
+\index{onevent@{onevent}!homescreen.\+c@{homescreen.\+c}}
+\subsubsection{\texorpdfstring{onevent()}{onevent()}}
+{\footnotesize\ttfamily static void onevent (\begin{DoxyParamCaption}\item[{const char $\ast$}]{event, }\item[{struct json\+\_\+object $\ast$}]{object }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}
+
+
+
+Definition at line 301 of file homescreen.\+c.
+
+
+\begin{DoxyCode}
+302 \{
+303 \hyperlink{hmi-debug_8h_abc0d6e0760017d8ae48b836925b2ef15}{HMI\_NOTICE}(\textcolor{stringliteral}{"homescreen-service"},\textcolor{stringliteral}{"on\_event %s"}, \hyperlink{structevent}{event});
+304 \}
+\end{DoxyCode}
+\mbox{\Hypertarget{homescreen_8c_af48cab759d4ae0ddbfcdd60f4051ba05}\label{homescreen_8c_af48cab759d4ae0ddbfcdd60f4051ba05}}
+\index{homescreen.\+c@{homescreen.\+c}!ping\+Sample@{ping\+Sample}}
+\index{ping\+Sample@{ping\+Sample}!homescreen.\+c@{homescreen.\+c}}
+\subsubsection{\texorpdfstring{ping\+Sample()}{pingSample()}}
+{\footnotesize\ttfamily static void ping\+Sample (\begin{DoxyParamCaption}\item[{struct afb\+\_\+req}]{request }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}
+
+
+
+Definition at line 57 of file homescreen.\+c.
+
+
+\begin{DoxyCode}
+58 \{
+59 \textcolor{keyword}{static} \textcolor{keywordtype}{int} pingcount = 0;
+60 afb\_req\_success\_f(request, json\_object\_new\_int(pingcount), \textcolor{stringliteral}{"Ping count = %d"}, pingcount);
+61 \hyperlink{hmi-debug_8h_abc0d6e0760017d8ae48b836925b2ef15}{HMI\_NOTICE}(\textcolor{stringliteral}{"homescreen-service"},\textcolor{stringliteral}{"Verbosity macro at level notice invoked at ping invocation
+ count = %d"}, pingcount);
+62 pingcount++;
+63 \}
+\end{DoxyCode}
+\mbox{\Hypertarget{homescreen_8c_a83d646edf54a6a082f69121bc89a08de}\label{homescreen_8c_a83d646edf54a6a082f69121bc89a08de}}
+\index{homescreen.\+c@{homescreen.\+c}!preinit@{preinit}}
+\index{preinit@{preinit}!homescreen.\+c@{homescreen.\+c}}
+\subsubsection{\texorpdfstring{preinit()}{preinit()}}
+{\footnotesize\ttfamily static int preinit (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}
+
+
+
+Definition at line 271 of file homescreen.\+c.
+
+
+\begin{DoxyCode}
+272 \{
+273 \hyperlink{hmi-debug_8h_abc0d6e0760017d8ae48b836925b2ef15}{HMI\_NOTICE}(\textcolor{stringliteral}{"homescreen-service"},\textcolor{stringliteral}{"binding preinit (was register)"});
+274 \textcolor{keywordflow}{return} 0;
+275 \}
+\end{DoxyCode}
+\mbox{\Hypertarget{homescreen_8c_a4ff0c8b506669e5622a6ee168134d8f1}\label{homescreen_8c_a4ff0c8b506669e5622a6ee168134d8f1}}
+\index{homescreen.\+c@{homescreen.\+c}!subscribe@{subscribe}}
+\index{subscribe@{subscribe}!homescreen.\+c@{homescreen.\+c}}
+\subsubsection{\texorpdfstring{subscribe()}{subscribe()}}
+{\footnotesize\ttfamily static void subscribe (\begin{DoxyParamCaption}\item[{struct afb\+\_\+req}]{request }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}
+
+Subscribe event
+
+\subparagraph*{Parameters}
+
+
+\begin{DoxyItemize}
+\item event \+: Event name. Event list is written in \hyperlink{libhomescreen_8cpp}{libhomescreen.\+cpp}
+\end{DoxyItemize}
+
+\subparagraph*{Return}
+
+Nothing
+
+\subparagraph*{Note}
+
+Definition at line 189 of file homescreen.\+c.
+
+
+\begin{DoxyCode}
+190 \{
+191 \textcolor{keyword}{const} \textcolor{keywordtype}{char} *value = afb\_req\_value(request, \textcolor{stringliteral}{"event"});
+192 \hyperlink{hmi-debug_8h_abc0d6e0760017d8ae48b836925b2ef15}{HMI\_NOTICE}(\textcolor{stringliteral}{"homescreen-service"},\textcolor{stringliteral}{"value is %s"}, value);
+193 \textcolor{keywordtype}{int} ret = 0;
+194 \textcolor{keywordflow}{if}(value) \{
+195 \textcolor{keywordtype}{int} index = \hyperlink{hs-helper_8c_a2ff1b894941c3b461ca8119079c4146a}{hs\_search\_event\_name\_index}(value);
+196 \textcolor{keywordflow}{if}(index < 0)
+197 \{
+198 \hyperlink{hmi-debug_8h_abc0d6e0760017d8ae48b836925b2ef15}{HMI\_NOTICE}(\textcolor{stringliteral}{"homescreen-service"},\textcolor{stringliteral}{"dedicated event doesn't exist"});
+199 ret = \hyperlink{homescreen_8c_a9a68ed04201d9390bb85b2c6ab1d7250}{EVENT\_SUBSCRIBE\_ERROR\_CODE};
+200 \}
+201 \textcolor{keywordflow}{else}
+202 \{
+203 afb\_req\_subscribe(request, *\hyperlink{homescreen_8c_a1c3c5bfa861dcb58d9e9d216d893864c}{event\_list}[index].\hyperlink{structevent}{event});
+204 \}
+205 \}
+206 \textcolor{keywordflow}{else}\{
+207 \hyperlink{hmi-debug_8h_abc0d6e0760017d8ae48b836925b2ef15}{HMI\_NOTICE}(\textcolor{stringliteral}{"homescreen-service"},\textcolor{stringliteral}{"Please input event name"});
+208 ret = \hyperlink{homescreen_8c_a9a68ed04201d9390bb85b2c6ab1d7250}{EVENT\_SUBSCRIBE\_ERROR\_CODE};
+209 \}
+210 \textcolor{comment}{/*create response json object*/}
+211 \textcolor{keyword}{struct }json\_object *res = json\_object\_new\_object();
+212 \hyperlink{hs-helper_8c_ae83604a37134e7bdee3ce4f10bb0b47a}{hs\_add\_object\_to\_json\_object\_func}(res, \_\_FUNCTION\_\_, 2,
+213 \hyperlink{homescreen_8c_aed1c5296a2e6d34945507a0fca17a376}{\_error}, ret);
+214 afb\_req\_success\_f(request, res, \textcolor{stringliteral}{"homescreen binder subscribe event name [%s]"}, value);
+215 \}
+\end{DoxyCode}
+\mbox{\Hypertarget{homescreen_8c_a096eae5c8f297f9df142a406eea56227}\label{homescreen_8c_a096eae5c8f297f9df142a406eea56227}}
+\index{homescreen.\+c@{homescreen.\+c}!tap\+\_\+shortcut@{tap\+\_\+shortcut}}
+\index{tap\+\_\+shortcut@{tap\+\_\+shortcut}!homescreen.\+c@{homescreen.\+c}}
+\subsubsection{\texorpdfstring{tap\+\_\+shortcut()}{tap\_shortcut()}}
+{\footnotesize\ttfamily static void tap\+\_\+shortcut (\begin{DoxyParamCaption}\item[{struct afb\+\_\+req}]{request }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}
+
+tap\+\_\+shortcut notify for homescreen When Shortcut area is tapped, notify these applciations
+
+\subparagraph*{Parameters}
+
+Request key
+\begin{DoxyItemize}
+\item application\+\_\+name \+: application name
+\end{DoxyItemize}
+
+\subparagraph*{Return}
+
+Nothing
+
+Definition at line 77 of file homescreen.\+c.
+
+
+\begin{DoxyCode}
+78 \{
+79 \hyperlink{hmi-debug_8h_abc0d6e0760017d8ae48b836925b2ef15}{HMI\_NOTICE}(\textcolor{stringliteral}{"homescreen-service"},\textcolor{stringliteral}{"is called."});
+80
+81 \textcolor{keywordtype}{int} ret = 0;
+82 \textcolor{keyword}{const} \textcolor{keywordtype}{char}* value = afb\_req\_value(request, \hyperlink{homescreen_8c_a1f2c79fa6801b63751e270d67994fe81}{\_application\_name});
+83 \textcolor{keywordflow}{if} (value) \{
+84
+85 \hyperlink{hmi-debug_8h_abc0d6e0760017d8ae48b836925b2ef15}{HMI\_NOTICE}(\textcolor{stringliteral}{"homescreen-service"},\textcolor{stringliteral}{"request params = %s."}, value);
+86
+87 \textcolor{keyword}{struct }json\_object* push\_obj = json\_object\_new\_object();
+88 \hyperlink{hs-helper_8c_a8777c53f1d4d5412f19b134ad85ffedf}{hs\_add\_object\_to\_json\_object\_str}( push\_obj, 2,
+89 \hyperlink{homescreen_8c_a1f2c79fa6801b63751e270d67994fe81}{\_application\_name}, value);
+90 afb\_event\_push(\hyperlink{homescreen_8c_a2af1ff5a4cbf03125e61e903832035f5}{ev\_tap\_shortcut}, push\_obj);
+91 \} \textcolor{keywordflow}{else} \{
+92 afb\_req\_fail\_f(request, \textcolor{stringliteral}{"failed"}, \textcolor{stringliteral}{"called %s, Unknown palameter"}, \_\_FUNCTION\_\_);
+93 \textcolor{keywordflow}{return};
+94 \}
+95
+96 \textcolor{comment}{// response to HomeScreen}
+97 \textcolor{keyword}{struct }json\_object *res = json\_object\_new\_object();
+98 \hyperlink{hs-helper_8c_ae83604a37134e7bdee3ce4f10bb0b47a}{hs\_add\_object\_to\_json\_object\_func}(res, \_\_FUNCTION\_\_, 2,
+99 \hyperlink{homescreen_8c_aed1c5296a2e6d34945507a0fca17a376}{\_error}, ret);
+100 afb\_req\_success(request, res, \textcolor{stringliteral}{"afb\_event\_push event [tap\_shortcut]"});
+101 \}
+\end{DoxyCode}
+\mbox{\Hypertarget{homescreen_8c_ab92621255d7370c6dd8a0f1a8e376ad3}\label{homescreen_8c_ab92621255d7370c6dd8a0f1a8e376ad3}}
+\index{homescreen.\+c@{homescreen.\+c}!unsubscribe@{unsubscribe}}
+\index{unsubscribe@{unsubscribe}!homescreen.\+c@{homescreen.\+c}}
+\subsubsection{\texorpdfstring{unsubscribe()}{unsubscribe()}}
+{\footnotesize\ttfamily static void unsubscribe (\begin{DoxyParamCaption}\item[{struct afb\+\_\+req}]{request }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}
+
+Unsubscribe event
+
+\subparagraph*{Parameters}
+
+
+\begin{DoxyItemize}
+\item event \+: Event name. Event list is written in \hyperlink{libhomescreen_8cpp}{libhomescreen.\+cpp}
+\end{DoxyItemize}
+
+\subparagraph*{Return}
+
+Nothing
+
+\subparagraph*{Note}
+
+Definition at line 229 of file homescreen.\+c.
+
+
+\begin{DoxyCode}
+230 \{
+231 \textcolor{keyword}{const} \textcolor{keywordtype}{char} *value = afb\_req\_value(request, \textcolor{stringliteral}{"event"});
+232 \hyperlink{hmi-debug_8h_abc0d6e0760017d8ae48b836925b2ef15}{HMI\_NOTICE}(\textcolor{stringliteral}{"homescreen-service"},\textcolor{stringliteral}{"value is %s"}, value);
+233 \textcolor{keywordtype}{int} ret = 0;
+234 \textcolor{keywordflow}{if}(value) \{
+235 \textcolor{keywordtype}{int} index = \hyperlink{hs-helper_8c_a2ff1b894941c3b461ca8119079c4146a}{hs\_search\_event\_name\_index}(value);
+236 \textcolor{keywordflow}{if}(index < 0)
+237 \{
+238 \hyperlink{hmi-debug_8h_abc0d6e0760017d8ae48b836925b2ef15}{HMI\_NOTICE}(\textcolor{stringliteral}{"homescreen-service"},\textcolor{stringliteral}{"dedicated event doesn't exist"});
+239 ret = \hyperlink{homescreen_8c_a9a68ed04201d9390bb85b2c6ab1d7250}{EVENT\_SUBSCRIBE\_ERROR\_CODE};
+240 \}
+241 \textcolor{keywordflow}{else}
+242 \{
+243 afb\_req\_unsubscribe(request, *\hyperlink{homescreen_8c_a1c3c5bfa861dcb58d9e9d216d893864c}{event\_list}[index].\hyperlink{structevent}{event});
+244 \}
+245 \}
+246 \textcolor{keywordflow}{else}\{
+247 \hyperlink{hmi-debug_8h_abc0d6e0760017d8ae48b836925b2ef15}{HMI\_NOTICE}(\textcolor{stringliteral}{"homescreen-service"},\textcolor{stringliteral}{"Please input event name"});
+248 ret = \hyperlink{homescreen_8c_a9a68ed04201d9390bb85b2c6ab1d7250}{EVENT\_SUBSCRIBE\_ERROR\_CODE};
+249 \}
+250 \textcolor{comment}{/*create response json object*/}
+251 \textcolor{keyword}{struct }json\_object *res = json\_object\_new\_object();
+252 \hyperlink{hs-helper_8c_ae83604a37134e7bdee3ce4f10bb0b47a}{hs\_add\_object\_to\_json\_object\_func}(res, \_\_FUNCTION\_\_, 2,
+253 \hyperlink{homescreen_8c_aed1c5296a2e6d34945507a0fca17a376}{\_error}, ret);
+254 afb\_req\_success\_f(request, res, \textcolor{stringliteral}{"homescreen binder unsubscribe event name [%s]"}, value);
+255 \}
+\end{DoxyCode}
+
+
+\subsection{Variable Documentation}
+\mbox{\Hypertarget{homescreen_8c_a1f2c79fa6801b63751e270d67994fe81}\label{homescreen_8c_a1f2c79fa6801b63751e270d67994fe81}}
+\index{homescreen.\+c@{homescreen.\+c}!\+\_\+application\+\_\+name@{\+\_\+application\+\_\+name}}
+\index{\+\_\+application\+\_\+name@{\+\_\+application\+\_\+name}!homescreen.\+c@{homescreen.\+c}}
+\subsubsection{\texorpdfstring{\+\_\+application\+\_\+name}{\_application\_name}}
+{\footnotesize\ttfamily const char \+\_\+application\+\_\+name\mbox{[}$\,$\mbox{]} = \char`\"{}application\+\_\+name\char`\"{}\hspace{0.3cm}{\ttfamily [static]}}
+
+
+
+Definition at line 49 of file homescreen.\+c.
+
+\mbox{\Hypertarget{homescreen_8c_abfd6c1d6f316fa952b11553f8f275e92}\label{homescreen_8c_abfd6c1d6f316fa952b11553f8f275e92}}
+\index{homescreen.\+c@{homescreen.\+c}!\+\_\+display\+\_\+message@{\+\_\+display\+\_\+message}}
+\index{\+\_\+display\+\_\+message@{\+\_\+display\+\_\+message}!homescreen.\+c@{homescreen.\+c}}
+\subsubsection{\texorpdfstring{\+\_\+display\+\_\+message}{\_display\_message}}
+{\footnotesize\ttfamily const char \+\_\+display\+\_\+message\mbox{[}$\,$\mbox{]} = \char`\"{}display\+\_\+message\char`\"{}\hspace{0.3cm}{\ttfamily [static]}}
+
+
+
+Definition at line 50 of file homescreen.\+c.
+
+\mbox{\Hypertarget{homescreen_8c_aed1c5296a2e6d34945507a0fca17a376}\label{homescreen_8c_aed1c5296a2e6d34945507a0fca17a376}}
+\index{homescreen.\+c@{homescreen.\+c}!\+\_\+error@{\+\_\+error}}
+\index{\+\_\+error@{\+\_\+error}!homescreen.\+c@{homescreen.\+c}}
+\subsubsection{\texorpdfstring{\+\_\+error}{\_error}}
+{\footnotesize\ttfamily const char \+\_\+error\mbox{[}$\,$\mbox{]} = \char`\"{}error\char`\"{}\hspace{0.3cm}{\ttfamily [static]}}
+
+
+
+Definition at line 47 of file homescreen.\+c.
+
+\mbox{\Hypertarget{homescreen_8c_a79b0f0b481161527ccb80e83da143219}\label{homescreen_8c_a79b0f0b481161527ccb80e83da143219}}
+\index{homescreen.\+c@{homescreen.\+c}!\+\_\+reply\+\_\+message@{\+\_\+reply\+\_\+message}}
+\index{\+\_\+reply\+\_\+message@{\+\_\+reply\+\_\+message}!homescreen.\+c@{homescreen.\+c}}
+\subsubsection{\texorpdfstring{\+\_\+reply\+\_\+message}{\_reply\_message}}
+{\footnotesize\ttfamily const char \+\_\+reply\+\_\+message\mbox{[}$\,$\mbox{]} = \char`\"{}reply\+\_\+message\char`\"{}\hspace{0.3cm}{\ttfamily [static]}}
+
+
+
+Definition at line 51 of file homescreen.\+c.
+
+\mbox{\Hypertarget{homescreen_8c_ae2a62ab481a2922cbfc788193857a12e}\label{homescreen_8c_ae2a62ab481a2922cbfc788193857a12e}}
+\index{homescreen.\+c@{homescreen.\+c}!afb\+Binding\+V2@{afb\+Binding\+V2}}
+\index{afb\+Binding\+V2@{afb\+Binding\+V2}!homescreen.\+c@{homescreen.\+c}}
+\subsubsection{\texorpdfstring{afb\+Binding\+V2}{afbBindingV2}}
+{\footnotesize\ttfamily const struct afb\+\_\+binding\+\_\+v2 afb\+Binding\+V2}
+
+{\bfseries Initial value\+:}
+\begin{DoxyCode}
+= \{
+ .api = \textcolor{stringliteral}{"homescreen"},
+ .specification = NULL,
+ .verbs = \hyperlink{homescreen_8c_acad6dadf60fac3d701e488e4fcd11c89}{verbs},
+ .preinit = \hyperlink{homescreen_8c_a83d646edf54a6a082f69121bc89a08de}{preinit},
+ .init = \hyperlink{homescreen_8c_a00cbbc0f3f4452db078ae511684a6adc}{init},
+ .onevent = \hyperlink{homescreen_8c_a1279893c0fe937311a81e0a98fb4cf1c}{onevent}
+\}
+\end{DoxyCode}
+
+
+Definition at line 306 of file homescreen.\+c.
+
+\mbox{\Hypertarget{homescreen_8c_af7cfc4f688bb898c09291252c4cb832c}\label{homescreen_8c_af7cfc4f688bb898c09291252c4cb832c}}
+\index{homescreen.\+c@{homescreen.\+c}!ev\+\_\+on\+\_\+screen\+\_\+message@{ev\+\_\+on\+\_\+screen\+\_\+message}}
+\index{ev\+\_\+on\+\_\+screen\+\_\+message@{ev\+\_\+on\+\_\+screen\+\_\+message}!homescreen.\+c@{homescreen.\+c}}
+\subsubsection{\texorpdfstring{ev\+\_\+on\+\_\+screen\+\_\+message}{ev\_on\_screen\_message}}
+{\footnotesize\ttfamily struct afb\+\_\+event ev\+\_\+on\+\_\+screen\+\_\+message\hspace{0.3cm}{\ttfamily [static]}}
+
+
+
+Definition at line 43 of file homescreen.\+c.
+
+\mbox{\Hypertarget{homescreen_8c_a5c225341e0ecbae0585302ef754a55ec}\label{homescreen_8c_a5c225341e0ecbae0585302ef754a55ec}}
+\index{homescreen.\+c@{homescreen.\+c}!ev\+\_\+on\+\_\+screen\+\_\+reply@{ev\+\_\+on\+\_\+screen\+\_\+reply}}
+\index{ev\+\_\+on\+\_\+screen\+\_\+reply@{ev\+\_\+on\+\_\+screen\+\_\+reply}!homescreen.\+c@{homescreen.\+c}}
+\subsubsection{\texorpdfstring{ev\+\_\+on\+\_\+screen\+\_\+reply}{ev\_on\_screen\_reply}}
+{\footnotesize\ttfamily struct afb\+\_\+event ev\+\_\+on\+\_\+screen\+\_\+reply\hspace{0.3cm}{\ttfamily [static]}}
+
+
+
+Definition at line 44 of file homescreen.\+c.
+
+\mbox{\Hypertarget{homescreen_8c_a25fbdcc4e5787e3f41d99f4a71e86611}\label{homescreen_8c_a25fbdcc4e5787e3f41d99f4a71e86611}}
+\index{homescreen.\+c@{homescreen.\+c}!ev\+\_\+reserved@{ev\+\_\+reserved}}
+\index{ev\+\_\+reserved@{ev\+\_\+reserved}!homescreen.\+c@{homescreen.\+c}}
+\subsubsection{\texorpdfstring{ev\+\_\+reserved}{ev\_reserved}}
+{\footnotesize\ttfamily struct afb\+\_\+event ev\+\_\+reserved\hspace{0.3cm}{\ttfamily [static]}}
+
+
+
+Definition at line 45 of file homescreen.\+c.
+
+\mbox{\Hypertarget{homescreen_8c_a2af1ff5a4cbf03125e61e903832035f5}\label{homescreen_8c_a2af1ff5a4cbf03125e61e903832035f5}}
+\index{homescreen.\+c@{homescreen.\+c}!ev\+\_\+tap\+\_\+shortcut@{ev\+\_\+tap\+\_\+shortcut}}
+\index{ev\+\_\+tap\+\_\+shortcut@{ev\+\_\+tap\+\_\+shortcut}!homescreen.\+c@{homescreen.\+c}}
+\subsubsection{\texorpdfstring{ev\+\_\+tap\+\_\+shortcut}{ev\_tap\_shortcut}}
+{\footnotesize\ttfamily struct afb\+\_\+event ev\+\_\+tap\+\_\+shortcut\hspace{0.3cm}{\ttfamily [static]}}
+
+
+
+Definition at line 42 of file homescreen.\+c.
+
+\mbox{\Hypertarget{homescreen_8c_a1c3c5bfa861dcb58d9e9d216d893864c}\label{homescreen_8c_a1c3c5bfa861dcb58d9e9d216d893864c}}
+\index{homescreen.\+c@{homescreen.\+c}!event\+\_\+list@{event\+\_\+list}}
+\index{event\+\_\+list@{event\+\_\+list}!homescreen.\+c@{homescreen.\+c}}
+\subsubsection{\texorpdfstring{event\+\_\+list}{event\_list}}
+{\footnotesize\ttfamily struct \hyperlink{structevent}{event} event\+\_\+list\mbox{[}\hyperlink{homescreen_8c_a09f43d9e7e1c5d2198c0d66024b4500e}{C\+O\+M\+M\+A\+N\+D\+\_\+\+E\+V\+E\+N\+T\+\_\+\+N\+UM}\mbox{]}\hspace{0.3cm}{\ttfamily [static]}}
+
+
+
+Definition at line 40 of file homescreen.\+c.
+
+\mbox{\Hypertarget{homescreen_8c_acad6dadf60fac3d701e488e4fcd11c89}\label{homescreen_8c_acad6dadf60fac3d701e488e4fcd11c89}}
+\index{homescreen.\+c@{homescreen.\+c}!verbs@{verbs}}
+\index{verbs@{verbs}!homescreen.\+c@{homescreen.\+c}}
+\subsubsection{\texorpdfstring{verbs}{verbs}}
+{\footnotesize\ttfamily const struct afb\+\_\+verb\+\_\+v2 verbs\mbox{[}$\,$\mbox{]}\hspace{0.3cm}{\ttfamily [static]}}
+
+{\bfseries Initial value\+:}
+\begin{DoxyCode}
+= \{
+
+ \{ .verb = \textcolor{stringliteral}{"ping"}, .session = AFB\_SESSION\_NONE, .callback =
+ \hyperlink{homescreen_8c_af48cab759d4ae0ddbfcdd60f4051ba05}{pingSample}, .auth = NULL \},
+ \{ .verb = \textcolor{stringliteral}{"tap\_shortcut"}, .session = AFB\_SESSION\_NONE, .callback =
+ \hyperlink{homescreen_8c_a096eae5c8f297f9df142a406eea56227}{tap\_shortcut}, .auth = NULL \},
+ \{ .verb = \textcolor{stringliteral}{"on\_screen\_message"}, .session = AFB\_SESSION\_NONE, .callback =
+ \hyperlink{homescreen_8c_a640cf8ed97d804c5ed1c09a349056338}{on\_screen\_message}, .auth = NULL \},
+ \{ .verb = \textcolor{stringliteral}{"on\_screen\_reply"}, .session = AFB\_SESSION\_NONE, .callback =
+ \hyperlink{homescreen_8c_a2f380055d7d69828115d2a8951634933}{on\_screen\_reply}, .auth = NULL \},
+ \{ .verb = \textcolor{stringliteral}{"subscribe"}, .session = AFB\_SESSION\_NONE, .callback =
+ \hyperlink{homescreen_8c_a4ff0c8b506669e5622a6ee168134d8f1}{subscribe}, .auth = NULL \},
+ \{ .verb = \textcolor{stringliteral}{"unsubscribe"}, .session = AFB\_SESSION\_NONE, .callback =
+ \hyperlink{homescreen_8c_ab92621255d7370c6dd8a0f1a8e376ad3}{unsubscribe}, .auth = NULL \},
+ \{NULL \}
+\}
+\end{DoxyCode}
+
+
+Definition at line 260 of file homescreen.\+c.
+
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/latex/d0/d8a/libhomescreen_8cpp.tex b/demo#3/common/agl-service-homescreen/doc/api-ref/latex/d0/d8a/libhomescreen_8cpp.tex
new file mode 100644
index 0000000..3a824b9
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/latex/d0/d8a/libhomescreen_8cpp.tex
@@ -0,0 +1,157 @@
+\hypertarget{libhomescreen_8cpp}{}\section{libhomescreen/libhomescreen.cpp File Reference}
+\label{libhomescreen_8cpp}\index{libhomescreen/libhomescreen.\+cpp@{libhomescreen/libhomescreen.\+cpp}}
+{\ttfamily \#include $<$stdarg.\+h$>$}\newline
+{\ttfamily \#include $<$sys/socket.\+h$>$}\newline
+{\ttfamily \#include $<$iostream$>$}\newline
+{\ttfamily \#include $<$algorithm$>$}\newline
+{\ttfamily \#include $<$thread$>$}\newline
+{\ttfamily \#include $<$errno.\+h$>$}\newline
+{\ttfamily \#include $<$cassert$>$}\newline
+{\ttfamily \#include $<$cctype$>$}\newline
+{\ttfamily \#include $<$cerrno$>$}\newline
+{\ttfamily \#include $<$cstdio$>$}\newline
+{\ttfamily \#include $<$cstdlib$>$}\newline
+{\ttfamily \#include $<$cstring$>$}\newline
+{\ttfamily \#include $<$libhomescreen.\+hpp$>$}\newline
+{\ttfamily \#include \char`\"{}hmi-\/debug.\+h\char`\"{}}\newline
+\subsection*{Functions}
+\begin{DoxyCompactItemize}
+\item
+static bool \hyperlink{libhomescreen_8cpp_a7a2176c3d71fec0f09dcb2aa0866b17e}{has\+\_\+verb} (const string \&verb)
+\item
+static void \hyperlink{libhomescreen_8cpp_a73c05b96c151e5e46c28585ccb143c1c}{\+\_\+on\+\_\+hangup\+\_\+static} (void $\ast$closure, struct afb\+\_\+wsj1 $\ast$wsj)
+\item
+static void \hyperlink{libhomescreen_8cpp_a782a05fde0f1c17e0c4c8f972a3f53c8}{\+\_\+on\+\_\+call\+\_\+static} (void $\ast$closure, const char $\ast$api, const char $\ast$verb, struct afb\+\_\+wsj1\+\_\+msg $\ast$msg)
+\item
+static void \hyperlink{libhomescreen_8cpp_a3df86185aa9453726556da201d95a6f9}{\+\_\+on\+\_\+event\+\_\+static} (void $\ast$closure, const char $\ast$\hyperlink{structevent}{event}, struct afb\+\_\+wsj1\+\_\+msg $\ast$msg)
+\item
+static void \hyperlink{libhomescreen_8cpp_a7778933bffa862c63fa0a1b8219faa8b}{\+\_\+on\+\_\+reply\+\_\+static} (void $\ast$closure, struct afb\+\_\+wsj1\+\_\+msg $\ast$msg)
+\item
+static void $\ast$ \hyperlink{libhomescreen_8cpp_aa73353e1bf62c68b6b0aba7a1e4e275e}{event\+\_\+loop\+\_\+run} (void $\ast$args)
+\end{DoxyCompactItemize}
+\subsection*{Variables}
+\begin{DoxyCompactItemize}
+\item
+static const char \hyperlink{libhomescreen_8cpp_a1e2d6e77dd8f0162f830058579eab42f}{A\+PI} \mbox{[}$\,$\mbox{]} = \char`\"{}homescreen\char`\"{}
+\end{DoxyCompactItemize}
+
+
+\subsection{Function Documentation}
+\mbox{\Hypertarget{libhomescreen_8cpp_a782a05fde0f1c17e0c4c8f972a3f53c8}\label{libhomescreen_8cpp_a782a05fde0f1c17e0c4c8f972a3f53c8}}
+\index{libhomescreen.\+cpp@{libhomescreen.\+cpp}!\+\_\+on\+\_\+call\+\_\+static@{\+\_\+on\+\_\+call\+\_\+static}}
+\index{\+\_\+on\+\_\+call\+\_\+static@{\+\_\+on\+\_\+call\+\_\+static}!libhomescreen.\+cpp@{libhomescreen.\+cpp}}
+\subsubsection{\texorpdfstring{\+\_\+on\+\_\+call\+\_\+static()}{\_on\_call\_static()}}
+{\footnotesize\ttfamily static void \+\_\+on\+\_\+call\+\_\+static (\begin{DoxyParamCaption}\item[{void $\ast$}]{closure, }\item[{const char $\ast$}]{api, }\item[{const char $\ast$}]{verb, }\item[{struct afb\+\_\+wsj1\+\_\+msg $\ast$}]{msg }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}
+
+
+
+Definition at line 64 of file libhomescreen.\+cpp.
+
+
+\begin{DoxyCode}
+65 \{
+66 \textcolor{comment}{/* LibHomeScreen is not called from other process */}
+67 \}
+\end{DoxyCode}
+\mbox{\Hypertarget{libhomescreen_8cpp_a3df86185aa9453726556da201d95a6f9}\label{libhomescreen_8cpp_a3df86185aa9453726556da201d95a6f9}}
+\index{libhomescreen.\+cpp@{libhomescreen.\+cpp}!\+\_\+on\+\_\+event\+\_\+static@{\+\_\+on\+\_\+event\+\_\+static}}
+\index{\+\_\+on\+\_\+event\+\_\+static@{\+\_\+on\+\_\+event\+\_\+static}!libhomescreen.\+cpp@{libhomescreen.\+cpp}}
+\subsubsection{\texorpdfstring{\+\_\+on\+\_\+event\+\_\+static()}{\_on\_event\_static()}}
+{\footnotesize\ttfamily static void \+\_\+on\+\_\+event\+\_\+static (\begin{DoxyParamCaption}\item[{void $\ast$}]{closure, }\item[{const char $\ast$}]{event, }\item[{struct afb\+\_\+wsj1\+\_\+msg $\ast$}]{msg }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}
+
+
+
+Definition at line 69 of file libhomescreen.\+cpp.
+
+
+\begin{DoxyCode}
+70 \{
+71 \textcolor{keyword}{static\_cast<}\hyperlink{class_lib_home_screen}{LibHomeScreen}*\textcolor{keyword}{>}(closure)->on\_event(NULL,\hyperlink{structevent}{event},msg);
+72 \}
+\end{DoxyCode}
+\mbox{\Hypertarget{libhomescreen_8cpp_a73c05b96c151e5e46c28585ccb143c1c}\label{libhomescreen_8cpp_a73c05b96c151e5e46c28585ccb143c1c}}
+\index{libhomescreen.\+cpp@{libhomescreen.\+cpp}!\+\_\+on\+\_\+hangup\+\_\+static@{\+\_\+on\+\_\+hangup\+\_\+static}}
+\index{\+\_\+on\+\_\+hangup\+\_\+static@{\+\_\+on\+\_\+hangup\+\_\+static}!libhomescreen.\+cpp@{libhomescreen.\+cpp}}
+\subsubsection{\texorpdfstring{\+\_\+on\+\_\+hangup\+\_\+static()}{\_on\_hangup\_static()}}
+{\footnotesize\ttfamily static void \+\_\+on\+\_\+hangup\+\_\+static (\begin{DoxyParamCaption}\item[{void $\ast$}]{closure, }\item[{struct afb\+\_\+wsj1 $\ast$}]{wsj }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}
+
+websocket
+
+Definition at line 59 of file libhomescreen.\+cpp.
+
+
+\begin{DoxyCode}
+60 \{
+61 \textcolor{keyword}{static\_cast<}\hyperlink{class_lib_home_screen}{LibHomeScreen}*\textcolor{keyword}{>}(closure)->on\_hangup(NULL,wsj);
+62 \}
+\end{DoxyCode}
+\mbox{\Hypertarget{libhomescreen_8cpp_a7778933bffa862c63fa0a1b8219faa8b}\label{libhomescreen_8cpp_a7778933bffa862c63fa0a1b8219faa8b}}
+\index{libhomescreen.\+cpp@{libhomescreen.\+cpp}!\+\_\+on\+\_\+reply\+\_\+static@{\+\_\+on\+\_\+reply\+\_\+static}}
+\index{\+\_\+on\+\_\+reply\+\_\+static@{\+\_\+on\+\_\+reply\+\_\+static}!libhomescreen.\+cpp@{libhomescreen.\+cpp}}
+\subsubsection{\texorpdfstring{\+\_\+on\+\_\+reply\+\_\+static()}{\_on\_reply\_static()}}
+{\footnotesize\ttfamily static void \+\_\+on\+\_\+reply\+\_\+static (\begin{DoxyParamCaption}\item[{void $\ast$}]{closure, }\item[{struct afb\+\_\+wsj1\+\_\+msg $\ast$}]{msg }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}
+
+
+
+Definition at line 74 of file libhomescreen.\+cpp.
+
+
+\begin{DoxyCode}
+75 \{
+76 \textcolor{keyword}{static\_cast<}\hyperlink{class_lib_home_screen}{LibHomeScreen}*\textcolor{keyword}{>}(closure)->on\_reply(NULL,msg);
+77 \}
+\end{DoxyCode}
+\mbox{\Hypertarget{libhomescreen_8cpp_aa73353e1bf62c68b6b0aba7a1e4e275e}\label{libhomescreen_8cpp_aa73353e1bf62c68b6b0aba7a1e4e275e}}
+\index{libhomescreen.\+cpp@{libhomescreen.\+cpp}!event\+\_\+loop\+\_\+run@{event\+\_\+loop\+\_\+run}}
+\index{event\+\_\+loop\+\_\+run@{event\+\_\+loop\+\_\+run}!libhomescreen.\+cpp@{libhomescreen.\+cpp}}
+\subsubsection{\texorpdfstring{event\+\_\+loop\+\_\+run()}{event\_loop\_run()}}
+{\footnotesize\ttfamily static void$\ast$ event\+\_\+loop\+\_\+run (\begin{DoxyParamCaption}\item[{void $\ast$}]{args }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}
+
+
+
+Definition at line 201 of file libhomescreen.\+cpp.
+
+
+\begin{DoxyCode}
+202 \{
+203 \textcolor{keyword}{struct }sd\_event* loop = (\textcolor{keyword}{struct }sd\_event*)(args);
+204 \hyperlink{hmi-debug_8h_a0d26d8b8201011dade787236519711c0}{HMI\_DEBUG}(\textcolor{stringliteral}{"libhomescreen"},\textcolor{stringliteral}{"start eventloop"});
+205 \textcolor{keywordflow}{for}(;;)
+206 sd\_event\_run(loop, 30000000);
+207 \}
+\end{DoxyCode}
+\mbox{\Hypertarget{libhomescreen_8cpp_a7a2176c3d71fec0f09dcb2aa0866b17e}\label{libhomescreen_8cpp_a7a2176c3d71fec0f09dcb2aa0866b17e}}
+\index{libhomescreen.\+cpp@{libhomescreen.\+cpp}!has\+\_\+verb@{has\+\_\+verb}}
+\index{has\+\_\+verb@{has\+\_\+verb}!libhomescreen.\+cpp@{libhomescreen.\+cpp}}
+\subsubsection{\texorpdfstring{has\+\_\+verb()}{has\_verb()}}
+{\footnotesize\ttfamily static bool has\+\_\+verb (\begin{DoxyParamCaption}\item[{const string \&}]{verb }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}
+
+
+
+Definition at line 518 of file libhomescreen.\+cpp.
+
+
+\begin{DoxyCode}
+519 \{
+520 \hyperlink{hmi-debug_8h_a0d26d8b8201011dade787236519711c0}{HMI\_DEBUG}(\textcolor{stringliteral}{"libhomescreen"},\textcolor{stringliteral}{"verb is %s"}, verb.c\_str());
+521 \textcolor{keywordflow}{if}(find(\hyperlink{class_lib_home_screen_a5593ff5ac78f6495ccb649904cf0ab08}{LibHomeScreen::api\_list}.begin(),
+ \hyperlink{class_lib_home_screen_a5593ff5ac78f6495ccb649904cf0ab08}{LibHomeScreen::api\_list}.end(), verb) !=
+ \hyperlink{class_lib_home_screen_a5593ff5ac78f6495ccb649904cf0ab08}{LibHomeScreen::api\_list}.end())
+522 \textcolor{keywordflow}{return} \textcolor{keyword}{true};
+523 \textcolor{keywordflow}{else}
+524 \textcolor{keywordflow}{return} \textcolor{keyword}{false};
+525 \}
+\end{DoxyCode}
+
+
+\subsection{Variable Documentation}
+\mbox{\Hypertarget{libhomescreen_8cpp_a1e2d6e77dd8f0162f830058579eab42f}\label{libhomescreen_8cpp_a1e2d6e77dd8f0162f830058579eab42f}}
+\index{libhomescreen.\+cpp@{libhomescreen.\+cpp}!A\+PI@{A\+PI}}
+\index{A\+PI@{A\+PI}!libhomescreen.\+cpp@{libhomescreen.\+cpp}}
+\subsubsection{\texorpdfstring{A\+PI}{API}}
+{\footnotesize\ttfamily const char A\+PI\mbox{[}$\,$\mbox{]} = \char`\"{}homescreen\char`\"{}\hspace{0.3cm}{\ttfamily [static]}}
+
+
+
+Definition at line 36 of file libhomescreen.\+cpp.
+
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/latex/d3/d3d/hs-helper_8h.tex b/demo#3/common/agl-service-homescreen/doc/api-ref/latex/d3/d3d/hs-helper_8h.tex
new file mode 100644
index 0000000..d6e9808
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/latex/d3/d3d/hs-helper_8h.tex
@@ -0,0 +1,345 @@
+\hypertarget{hs-helper_8h}{}\section{src/hs-\/helper.h File Reference}
+\label{hs-helper_8h}\index{src/hs-\/helper.\+h@{src/hs-\/helper.\+h}}
+{\ttfamily \#include $<$afb/afb-\/binding.\+h$>$}\newline
+{\ttfamily \#include $<$stdint.\+h$>$}\newline
+{\ttfamily \#include $<$glib.\+h$>$}\newline
+{\ttfamily \#include $<$errno.\+h$>$}\newline
+{\ttfamily \#include \char`\"{}hmi-\/debug.\+h\char`\"{}}\newline
+\subsection*{Macros}
+\begin{DoxyCompactItemize}
+\item
+\#define \hyperlink{hs-helper_8h_ad2c1fbc92ba364fcf83f15e6d0af66f0}{A\+F\+B\+\_\+\+B\+I\+N\+D\+I\+N\+G\+\_\+\+V\+E\+R\+S\+I\+ON}~2
+\end{DoxyCompactItemize}
+\subsection*{Typedefs}
+\begin{DoxyCompactItemize}
+\item
+typedef enum \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899}{R\+E\+Q\+\_\+\+E\+R\+R\+OR} \hyperlink{hs-helper_8h_ab0d62ccfa9c3ab87f090f67c3d50adce}{R\+E\+Q\+\_\+\+E\+R\+R\+OR}
+\end{DoxyCompactItemize}
+\subsection*{Enumerations}
+\begin{DoxyCompactItemize}
+\item
+enum \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899}{R\+E\+Q\+\_\+\+E\+R\+R\+OR} \{ \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899a96a855966bc63045222b3dcac524cee1}{R\+E\+Q\+\_\+\+F\+A\+IL} = -\/1,
+\hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899ab093abb14c097b3b7719debb04d5e8ee}{R\+E\+Q\+\_\+\+OK} =0,
+\hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899aa223eed65c9bee2bf1f4cdecaf90d66a}{N\+O\+T\+\_\+\+N\+U\+M\+B\+ER},
+\hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899add1c84bf80c5f80741ee8f37fef1e12b}{O\+U\+T\+\_\+\+R\+A\+N\+GE}
+ \}
+\end{DoxyCompactItemize}
+\subsection*{Functions}
+\begin{DoxyCompactItemize}
+\item
+\hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899}{R\+E\+Q\+\_\+\+E\+R\+R\+OR} \hyperlink{hs-helper_8h_a649900645417f2df3a70b9ad67529f53}{get\+\_\+value\+\_\+uint16} (const struct afb\+\_\+req request, const char $\ast$source, uint16\+\_\+t $\ast$out\+\_\+id)
+\item
+\hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899}{R\+E\+Q\+\_\+\+E\+R\+R\+OR} \hyperlink{hs-helper_8h_a2e62366684e39ea94436bf017e416827}{get\+\_\+value\+\_\+int16} (const struct afb\+\_\+req request, const char $\ast$source, int16\+\_\+t $\ast$out\+\_\+id)
+\item
+\hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899}{R\+E\+Q\+\_\+\+E\+R\+R\+OR} \hyperlink{hs-helper_8h_ac5b0370643c520377afd3fd4891918d2}{get\+\_\+value\+\_\+int32} (const struct afb\+\_\+req request, const char $\ast$source, int32\+\_\+t $\ast$out\+\_\+id)
+\item
+void \hyperlink{hs-helper_8h_a1ba31a6a94515ff1730ba0043a67d59e}{hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object} (struct json\+\_\+object $\ast$j\+\_\+obj, int count,...)
+\item
+void \hyperlink{hs-helper_8h_a8777c53f1d4d5412f19b134ad85ffedf}{hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object\+\_\+str} (struct json\+\_\+object $\ast$j\+\_\+obj, int count,...)
+\item
+void \hyperlink{hs-helper_8h_ae83604a37134e7bdee3ce4f10bb0b47a}{hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object\+\_\+func} (struct json\+\_\+object $\ast$j\+\_\+obj, const char $\ast$verb\+\_\+name, int count,...)
+\item
+int \hyperlink{hs-helper_8h_a2ff1b894941c3b461ca8119079c4146a}{hs\+\_\+search\+\_\+event\+\_\+name\+\_\+index} (const char $\ast$value)
+\end{DoxyCompactItemize}
+\subsection*{Variables}
+\begin{DoxyCompactItemize}
+\item
+static const char $\ast$ \hyperlink{hs-helper_8h_a0cd84b1a2184c9b84d1b7bf24582f28e}{evlist} \mbox{[}$\,$\mbox{]}
+\end{DoxyCompactItemize}
+
+
+\subsection{Macro Definition Documentation}
+\mbox{\Hypertarget{hs-helper_8h_ad2c1fbc92ba364fcf83f15e6d0af66f0}\label{hs-helper_8h_ad2c1fbc92ba364fcf83f15e6d0af66f0}}
+\index{hs-\/helper.\+h@{hs-\/helper.\+h}!A\+F\+B\+\_\+\+B\+I\+N\+D\+I\+N\+G\+\_\+\+V\+E\+R\+S\+I\+ON@{A\+F\+B\+\_\+\+B\+I\+N\+D\+I\+N\+G\+\_\+\+V\+E\+R\+S\+I\+ON}}
+\index{A\+F\+B\+\_\+\+B\+I\+N\+D\+I\+N\+G\+\_\+\+V\+E\+R\+S\+I\+ON@{A\+F\+B\+\_\+\+B\+I\+N\+D\+I\+N\+G\+\_\+\+V\+E\+R\+S\+I\+ON}!hs-\/helper.\+h@{hs-\/helper.\+h}}
+\subsubsection{\texorpdfstring{A\+F\+B\+\_\+\+B\+I\+N\+D\+I\+N\+G\+\_\+\+V\+E\+R\+S\+I\+ON}{AFB\_BINDING\_VERSION}}
+{\footnotesize\ttfamily \#define A\+F\+B\+\_\+\+B\+I\+N\+D\+I\+N\+G\+\_\+\+V\+E\+R\+S\+I\+ON~2}
+
+
+
+Definition at line 19 of file hs-\/helper.\+h.
+
+
+
+\subsection{Typedef Documentation}
+\mbox{\Hypertarget{hs-helper_8h_ab0d62ccfa9c3ab87f090f67c3d50adce}\label{hs-helper_8h_ab0d62ccfa9c3ab87f090f67c3d50adce}}
+\index{hs-\/helper.\+h@{hs-\/helper.\+h}!R\+E\+Q\+\_\+\+E\+R\+R\+OR@{R\+E\+Q\+\_\+\+E\+R\+R\+OR}}
+\index{R\+E\+Q\+\_\+\+E\+R\+R\+OR@{R\+E\+Q\+\_\+\+E\+R\+R\+OR}!hs-\/helper.\+h@{hs-\/helper.\+h}}
+\subsubsection{\texorpdfstring{R\+E\+Q\+\_\+\+E\+R\+R\+OR}{REQ\_ERROR}}
+{\footnotesize\ttfamily typedef enum \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899}{R\+E\+Q\+\_\+\+E\+R\+R\+OR} \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899}{R\+E\+Q\+\_\+\+E\+R\+R\+OR}}
+
+
+
+\subsection{Enumeration Type Documentation}
+\mbox{\Hypertarget{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899}\label{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899}}
+\index{hs-\/helper.\+h@{hs-\/helper.\+h}!R\+E\+Q\+\_\+\+E\+R\+R\+OR@{R\+E\+Q\+\_\+\+E\+R\+R\+OR}}
+\index{R\+E\+Q\+\_\+\+E\+R\+R\+OR@{R\+E\+Q\+\_\+\+E\+R\+R\+OR}!hs-\/helper.\+h@{hs-\/helper.\+h}}
+\subsubsection{\texorpdfstring{R\+E\+Q\+\_\+\+E\+R\+R\+OR}{REQ\_ERROR}}
+{\footnotesize\ttfamily enum \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899}{R\+E\+Q\+\_\+\+E\+R\+R\+OR}}
+
+\begin{DoxyEnumFields}{Enumerator}
+\raisebox{\heightof{T}}[0pt][0pt]{\index{R\+E\+Q\+\_\+\+F\+A\+IL@{R\+E\+Q\+\_\+\+F\+A\+IL}!hs-\/helper.\+h@{hs-\/helper.\+h}}\index{hs-\/helper.\+h@{hs-\/helper.\+h}!R\+E\+Q\+\_\+\+F\+A\+IL@{R\+E\+Q\+\_\+\+F\+A\+IL}}}\mbox{\Hypertarget{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899a96a855966bc63045222b3dcac524cee1}\label{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899a96a855966bc63045222b3dcac524cee1}}
+R\+E\+Q\+\_\+\+F\+A\+IL&\\
+\hline
+
+\raisebox{\heightof{T}}[0pt][0pt]{\index{R\+E\+Q\+\_\+\+OK@{R\+E\+Q\+\_\+\+OK}!hs-\/helper.\+h@{hs-\/helper.\+h}}\index{hs-\/helper.\+h@{hs-\/helper.\+h}!R\+E\+Q\+\_\+\+OK@{R\+E\+Q\+\_\+\+OK}}}\mbox{\Hypertarget{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899ab093abb14c097b3b7719debb04d5e8ee}\label{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899ab093abb14c097b3b7719debb04d5e8ee}}
+R\+E\+Q\+\_\+\+OK&\\
+\hline
+
+\raisebox{\heightof{T}}[0pt][0pt]{\index{N\+O\+T\+\_\+\+N\+U\+M\+B\+ER@{N\+O\+T\+\_\+\+N\+U\+M\+B\+ER}!hs-\/helper.\+h@{hs-\/helper.\+h}}\index{hs-\/helper.\+h@{hs-\/helper.\+h}!N\+O\+T\+\_\+\+N\+U\+M\+B\+ER@{N\+O\+T\+\_\+\+N\+U\+M\+B\+ER}}}\mbox{\Hypertarget{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899aa223eed65c9bee2bf1f4cdecaf90d66a}\label{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899aa223eed65c9bee2bf1f4cdecaf90d66a}}
+N\+O\+T\+\_\+\+N\+U\+M\+B\+ER&\\
+\hline
+
+\raisebox{\heightof{T}}[0pt][0pt]{\index{O\+U\+T\+\_\+\+R\+A\+N\+GE@{O\+U\+T\+\_\+\+R\+A\+N\+GE}!hs-\/helper.\+h@{hs-\/helper.\+h}}\index{hs-\/helper.\+h@{hs-\/helper.\+h}!O\+U\+T\+\_\+\+R\+A\+N\+GE@{O\+U\+T\+\_\+\+R\+A\+N\+GE}}}\mbox{\Hypertarget{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899add1c84bf80c5f80741ee8f37fef1e12b}\label{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899add1c84bf80c5f80741ee8f37fef1e12b}}
+O\+U\+T\+\_\+\+R\+A\+N\+GE&\\
+\hline
+
+\end{DoxyEnumFields}
+
+
+Definition at line 26 of file hs-\/helper.\+h.
+
+
+\begin{DoxyCode}
+27 \{
+28 \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899a96a855966bc63045222b3dcac524cee1}{REQ\_FAIL} = -1,
+29 \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899ab093abb14c097b3b7719debb04d5e8ee}{REQ\_OK}=0,
+30 \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899aa223eed65c9bee2bf1f4cdecaf90d66a}{NOT\_NUMBER},
+31 \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899add1c84bf80c5f80741ee8f37fef1e12b}{OUT\_RANGE}
+32 \}\hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899}{REQ\_ERROR};
+\end{DoxyCode}
+
+
+\subsection{Function Documentation}
+\mbox{\Hypertarget{hs-helper_8h_a2e62366684e39ea94436bf017e416827}\label{hs-helper_8h_a2e62366684e39ea94436bf017e416827}}
+\index{hs-\/helper.\+h@{hs-\/helper.\+h}!get\+\_\+value\+\_\+int16@{get\+\_\+value\+\_\+int16}}
+\index{get\+\_\+value\+\_\+int16@{get\+\_\+value\+\_\+int16}!hs-\/helper.\+h@{hs-\/helper.\+h}}
+\subsubsection{\texorpdfstring{get\+\_\+value\+\_\+int16()}{get\_value\_int16()}}
+{\footnotesize\ttfamily \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899}{R\+E\+Q\+\_\+\+E\+R\+R\+OR} get\+\_\+value\+\_\+int16 (\begin{DoxyParamCaption}\item[{const struct afb\+\_\+req}]{request, }\item[{const char $\ast$}]{source, }\item[{int16\+\_\+t $\ast$}]{out\+\_\+id }\end{DoxyParamCaption})}
+
+
+
+Definition at line 48 of file hs-\/helper.\+c.
+
+
+\begin{DoxyCode}
+49 \{
+50 \textcolor{keywordtype}{char}* endptr;
+51 \textcolor{keyword}{const} \textcolor{keywordtype}{char}* tmp = afb\_req\_value (request, source);
+52 \textcolor{keywordflow}{if}(!tmp)
+53 \{
+54 \textcolor{keywordflow}{return} \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899a96a855966bc63045222b3dcac524cee1}{REQ\_FAIL};
+55 \}
+56 \textcolor{keywordtype}{long} tmp\_id = strtol(tmp,&endptr,10);
+57
+58 \textcolor{comment}{/* error check of range */}
+59 \textcolor{keywordflow}{if}( (tmp\_id > INT16\_MAX) || (tmp\_id < INT16\_MIN) )
+60 \{
+61 \textcolor{keywordflow}{return} \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899add1c84bf80c5f80741ee8f37fef1e12b}{OUT\_RANGE};
+62 \}
+63 \textcolor{keywordflow}{if}(*endptr != \textcolor{charliteral}{'\(\backslash\)0'})
+64 \{
+65 \textcolor{keywordflow}{return} \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899aa223eed65c9bee2bf1f4cdecaf90d66a}{NOT\_NUMBER};
+66 \}
+67
+68 *out\_id = (int16\_t)tmp\_id;
+69 \textcolor{keywordflow}{return} \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899ab093abb14c097b3b7719debb04d5e8ee}{REQ\_OK};
+70 \}
+\end{DoxyCode}
+\mbox{\Hypertarget{hs-helper_8h_ac5b0370643c520377afd3fd4891918d2}\label{hs-helper_8h_ac5b0370643c520377afd3fd4891918d2}}
+\index{hs-\/helper.\+h@{hs-\/helper.\+h}!get\+\_\+value\+\_\+int32@{get\+\_\+value\+\_\+int32}}
+\index{get\+\_\+value\+\_\+int32@{get\+\_\+value\+\_\+int32}!hs-\/helper.\+h@{hs-\/helper.\+h}}
+\subsubsection{\texorpdfstring{get\+\_\+value\+\_\+int32()}{get\_value\_int32()}}
+{\footnotesize\ttfamily \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899}{R\+E\+Q\+\_\+\+E\+R\+R\+OR} get\+\_\+value\+\_\+int32 (\begin{DoxyParamCaption}\item[{const struct afb\+\_\+req}]{request, }\item[{const char $\ast$}]{source, }\item[{int32\+\_\+t $\ast$}]{out\+\_\+id }\end{DoxyParamCaption})}
+
+
+
+Definition at line 72 of file hs-\/helper.\+c.
+
+
+\begin{DoxyCode}
+73 \{
+74 \textcolor{keywordtype}{char}* endptr;
+75 \textcolor{keyword}{const} \textcolor{keywordtype}{char}* tmp = afb\_req\_value (request, source);
+76 \textcolor{keywordflow}{if}(!tmp)
+77 \{
+78 \textcolor{keywordflow}{return} \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899a96a855966bc63045222b3dcac524cee1}{REQ\_FAIL};
+79 \}
+80 \textcolor{keywordtype}{long} tmp\_id = strtol(tmp,&endptr,10);
+81
+82 \textcolor{comment}{/* error check of range */}
+83 \textcolor{keywordflow}{if}( (tmp\_id > INT32\_MAX) || (tmp\_id < INT32\_MIN) )
+84 \{
+85 \textcolor{keywordflow}{return} \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899add1c84bf80c5f80741ee8f37fef1e12b}{OUT\_RANGE};
+86 \}
+87 \textcolor{keywordflow}{if}(*endptr != \textcolor{charliteral}{'\(\backslash\)0'})
+88 \{
+89 \textcolor{keywordflow}{return} \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899aa223eed65c9bee2bf1f4cdecaf90d66a}{NOT\_NUMBER};
+90 \}
+91
+92 *out\_id = (int32\_t)tmp\_id;
+93 \textcolor{keywordflow}{return} \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899ab093abb14c097b3b7719debb04d5e8ee}{REQ\_OK};
+94 \}
+\end{DoxyCode}
+\mbox{\Hypertarget{hs-helper_8h_a649900645417f2df3a70b9ad67529f53}\label{hs-helper_8h_a649900645417f2df3a70b9ad67529f53}}
+\index{hs-\/helper.\+h@{hs-\/helper.\+h}!get\+\_\+value\+\_\+uint16@{get\+\_\+value\+\_\+uint16}}
+\index{get\+\_\+value\+\_\+uint16@{get\+\_\+value\+\_\+uint16}!hs-\/helper.\+h@{hs-\/helper.\+h}}
+\subsubsection{\texorpdfstring{get\+\_\+value\+\_\+uint16()}{get\_value\_uint16()}}
+{\footnotesize\ttfamily \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899}{R\+E\+Q\+\_\+\+E\+R\+R\+OR} get\+\_\+value\+\_\+uint16 (\begin{DoxyParamCaption}\item[{const struct afb\+\_\+req}]{request, }\item[{const char $\ast$}]{source, }\item[{uint16\+\_\+t $\ast$}]{out\+\_\+id }\end{DoxyParamCaption})}
+
+
+
+Definition at line 24 of file hs-\/helper.\+c.
+
+
+\begin{DoxyCode}
+25 \{
+26 \textcolor{keywordtype}{char}* endptr;
+27 \textcolor{keyword}{const} \textcolor{keywordtype}{char}* tmp = afb\_req\_value (request, source);
+28 \textcolor{keywordflow}{if}(!tmp)
+29 \{
+30 \textcolor{keywordflow}{return} \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899a96a855966bc63045222b3dcac524cee1}{REQ\_FAIL};
+31 \}
+32 \textcolor{keywordtype}{long} tmp\_id = strtol(tmp,&endptr,10);
+33
+34 \textcolor{comment}{/* error check of range */}
+35 \textcolor{keywordflow}{if}( (tmp\_id > UINT16\_MAX) || (tmp\_id < 0) )
+36 \{
+37 \textcolor{keywordflow}{return} \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899add1c84bf80c5f80741ee8f37fef1e12b}{OUT\_RANGE};
+38 \}
+39 \textcolor{keywordflow}{if}(*endptr != \textcolor{charliteral}{'\(\backslash\)0'})
+40 \{
+41 \textcolor{keywordflow}{return} \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899aa223eed65c9bee2bf1f4cdecaf90d66a}{NOT\_NUMBER};
+42 \}
+43
+44 *out\_id = (uint16\_t)tmp\_id;
+45 \textcolor{keywordflow}{return} \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899ab093abb14c097b3b7719debb04d5e8ee}{REQ\_OK};
+46 \}
+\end{DoxyCode}
+\mbox{\Hypertarget{hs-helper_8h_a1ba31a6a94515ff1730ba0043a67d59e}\label{hs-helper_8h_a1ba31a6a94515ff1730ba0043a67d59e}}
+\index{hs-\/helper.\+h@{hs-\/helper.\+h}!hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object@{hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object}}
+\index{hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object@{hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object}!hs-\/helper.\+h@{hs-\/helper.\+h}}
+\subsubsection{\texorpdfstring{hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object()}{hs\_add\_object\_to\_json\_object()}}
+{\footnotesize\ttfamily void hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object (\begin{DoxyParamCaption}\item[{struct json\+\_\+object $\ast$}]{j\+\_\+obj, }\item[{int}]{count, }\item[{}]{... }\end{DoxyParamCaption})}
+
+
+
+Definition at line 96 of file hs-\/helper.\+c.
+
+
+\begin{DoxyCode}
+97 \{
+98 va\_list args;
+99 va\_start(args, count);
+100 \textcolor{keywordflow}{for}(\textcolor{keywordtype}{int} i = 0; i < count; ++i )
+101 \{
+102 \textcolor{keywordtype}{char} *key = va\_arg(args, \textcolor{keywordtype}{char}*);
+103 \textcolor{keywordtype}{int} value = va\_arg(args, \textcolor{keywordtype}{int});
+104 json\_object\_object\_add(j\_obj, key, json\_object\_new\_int((int32\_t)value));
+105 ++i;
+106 \}
+107 va\_end(args);
+108 \}
+\end{DoxyCode}
+\mbox{\Hypertarget{hs-helper_8h_ae83604a37134e7bdee3ce4f10bb0b47a}\label{hs-helper_8h_ae83604a37134e7bdee3ce4f10bb0b47a}}
+\index{hs-\/helper.\+h@{hs-\/helper.\+h}!hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object\+\_\+func@{hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object\+\_\+func}}
+\index{hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object\+\_\+func@{hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object\+\_\+func}!hs-\/helper.\+h@{hs-\/helper.\+h}}
+\subsubsection{\texorpdfstring{hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object\+\_\+func()}{hs\_add\_object\_to\_json\_object\_func()}}
+{\footnotesize\ttfamily void hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object\+\_\+func (\begin{DoxyParamCaption}\item[{struct json\+\_\+object $\ast$}]{j\+\_\+obj, }\item[{const char $\ast$}]{verb\+\_\+name, }\item[{int}]{count, }\item[{}]{... }\end{DoxyParamCaption})}
+
+
+
+Definition at line 125 of file hs-\/helper.\+c.
+
+
+\begin{DoxyCode}
+126 \{
+127 va\_list args;
+128 va\_start(args, count);
+129
+130 json\_object\_object\_add(j\_obj,\textcolor{stringliteral}{"verb"}, json\_object\_new\_string(verb\_name));
+131
+132 \textcolor{keywordflow}{for}(\textcolor{keywordtype}{int} i = 0; i < count; ++i )
+133 \{
+134 \textcolor{keywordtype}{char} *key = va\_arg(args, \textcolor{keywordtype}{char}*);
+135 \textcolor{keywordtype}{int} value = va\_arg(args, \textcolor{keywordtype}{int});
+136 json\_object\_object\_add(j\_obj, key, json\_object\_new\_int((int32\_t)value));
+137 ++i;
+138 \}
+139 va\_end(args);
+140 \}
+\end{DoxyCode}
+\mbox{\Hypertarget{hs-helper_8h_a8777c53f1d4d5412f19b134ad85ffedf}\label{hs-helper_8h_a8777c53f1d4d5412f19b134ad85ffedf}}
+\index{hs-\/helper.\+h@{hs-\/helper.\+h}!hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object\+\_\+str@{hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object\+\_\+str}}
+\index{hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object\+\_\+str@{hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object\+\_\+str}!hs-\/helper.\+h@{hs-\/helper.\+h}}
+\subsubsection{\texorpdfstring{hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object\+\_\+str()}{hs\_add\_object\_to\_json\_object\_str()}}
+{\footnotesize\ttfamily void hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object\+\_\+str (\begin{DoxyParamCaption}\item[{struct json\+\_\+object $\ast$}]{j\+\_\+obj, }\item[{int}]{count, }\item[{}]{... }\end{DoxyParamCaption})}
+
+
+
+Definition at line 110 of file hs-\/helper.\+c.
+
+
+\begin{DoxyCode}
+111 \{
+112 va\_list args;
+113 va\_start(args, count);
+114 \textcolor{keywordflow}{for}(\textcolor{keywordtype}{int} i = 0; i < count; ++i )
+115 \{
+116 \textcolor{keywordtype}{char} *key = va\_arg(args, \textcolor{keywordtype}{char}*);
+117 \textcolor{keywordtype}{char} *value = va\_arg(args, \textcolor{keywordtype}{char}*);
+118 json\_object\_object\_add(j\_obj, key, json\_object\_new\_string(value));
+119 ++i;
+120 \}
+121 va\_end(args);
+122 \}
+\end{DoxyCode}
+\mbox{\Hypertarget{hs-helper_8h_a2ff1b894941c3b461ca8119079c4146a}\label{hs-helper_8h_a2ff1b894941c3b461ca8119079c4146a}}
+\index{hs-\/helper.\+h@{hs-\/helper.\+h}!hs\+\_\+search\+\_\+event\+\_\+name\+\_\+index@{hs\+\_\+search\+\_\+event\+\_\+name\+\_\+index}}
+\index{hs\+\_\+search\+\_\+event\+\_\+name\+\_\+index@{hs\+\_\+search\+\_\+event\+\_\+name\+\_\+index}!hs-\/helper.\+h@{hs-\/helper.\+h}}
+\subsubsection{\texorpdfstring{hs\+\_\+search\+\_\+event\+\_\+name\+\_\+index()}{hs\_search\_event\_name\_index()}}
+{\footnotesize\ttfamily int hs\+\_\+search\+\_\+event\+\_\+name\+\_\+index (\begin{DoxyParamCaption}\item[{const char $\ast$}]{value }\end{DoxyParamCaption})}
+
+
+
+Definition at line 142 of file hs-\/helper.\+c.
+
+
+\begin{DoxyCode}
+143 \{
+144 \textcolor{keywordtype}{size\_t} buf\_size = 50;
+145 \textcolor{keywordtype}{size\_t} size = \textcolor{keyword}{sizeof} \hyperlink{hs-helper_8h_a0cd84b1a2184c9b84d1b7bf24582f28e}{evlist} / \textcolor{keyword}{sizeof} *\hyperlink{hs-helper_8h_a0cd84b1a2184c9b84d1b7bf24582f28e}{evlist};
+146 \textcolor{keywordtype}{int} ret = -1;
+147 \textcolor{keywordflow}{for}(\textcolor{keywordtype}{size\_t} i = 0 ; i < size ; ++i)
+148 \{
+149 \textcolor{keywordflow}{if}(!strncmp(value, \hyperlink{hs-helper_8h_a0cd84b1a2184c9b84d1b7bf24582f28e}{evlist}[i], buf\_size))
+150 \{
+151 ret = i;
+152 \textcolor{keywordflow}{break};
+153 \}
+154 \}
+155 \textcolor{keywordflow}{return} ret;
+156 \}
+\end{DoxyCode}
+
+
+\subsection{Variable Documentation}
+\mbox{\Hypertarget{hs-helper_8h_a0cd84b1a2184c9b84d1b7bf24582f28e}\label{hs-helper_8h_a0cd84b1a2184c9b84d1b7bf24582f28e}}
+\index{hs-\/helper.\+h@{hs-\/helper.\+h}!evlist@{evlist}}
+\index{evlist@{evlist}!hs-\/helper.\+h@{hs-\/helper.\+h}}
+\subsubsection{\texorpdfstring{evlist}{evlist}}
+{\footnotesize\ttfamily const char$\ast$ evlist\mbox{[}$\,$\mbox{]}\hspace{0.3cm}{\ttfamily [static]}}
+
+{\bfseries Initial value\+:}
+\begin{DoxyCode}
+= \{
+ \textcolor{stringliteral}{"tap\_shortcut"},
+ \textcolor{stringliteral}{"on\_screen\_message"},
+ \textcolor{stringliteral}{"on\_screen\_reply"},
+ \textcolor{stringliteral}{"reserved"}
+ \}
+\end{DoxyCode}
+
+
+Definition at line 34 of file hs-\/helper.\+h.
+
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/latex/dd/d1d/hs-helper_8c.tex b/demo#3/common/agl-service-homescreen/doc/api-ref/latex/dd/d1d/hs-helper_8c.tex
new file mode 100644
index 0000000..407da09
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/latex/dd/d1d/hs-helper_8c.tex
@@ -0,0 +1,238 @@
+\hypertarget{hs-helper_8c}{}\section{src/hs-\/helper.c File Reference}
+\label{hs-helper_8c}\index{src/hs-\/helper.\+c@{src/hs-\/helper.\+c}}
+{\ttfamily \#include \char`\"{}hs-\/helper.\+h\char`\"{}}\newline
+{\ttfamily \#include $<$stdlib.\+h$>$}\newline
+{\ttfamily \#include $<$string.\+h$>$}\newline
+{\ttfamily \#include $<$limits.\+h$>$}\newline
+{\ttfamily \#include $<$json-\/c/json.\+h$>$}\newline
+{\ttfamily \#include $<$stdarg.\+h$>$}\newline
+\subsection*{Functions}
+\begin{DoxyCompactItemize}
+\item
+\hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899}{R\+E\+Q\+\_\+\+E\+R\+R\+OR} \hyperlink{hs-helper_8c_a649900645417f2df3a70b9ad67529f53}{get\+\_\+value\+\_\+uint16} (const struct afb\+\_\+req request, const char $\ast$source, uint16\+\_\+t $\ast$out\+\_\+id)
+\item
+\hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899}{R\+E\+Q\+\_\+\+E\+R\+R\+OR} \hyperlink{hs-helper_8c_a2e62366684e39ea94436bf017e416827}{get\+\_\+value\+\_\+int16} (const struct afb\+\_\+req request, const char $\ast$source, int16\+\_\+t $\ast$out\+\_\+id)
+\item
+\hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899}{R\+E\+Q\+\_\+\+E\+R\+R\+OR} \hyperlink{hs-helper_8c_ac5b0370643c520377afd3fd4891918d2}{get\+\_\+value\+\_\+int32} (const struct afb\+\_\+req request, const char $\ast$source, int32\+\_\+t $\ast$out\+\_\+id)
+\item
+void \hyperlink{hs-helper_8c_a1ba31a6a94515ff1730ba0043a67d59e}{hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object} (struct json\+\_\+object $\ast$j\+\_\+obj, int count,...)
+\item
+void \hyperlink{hs-helper_8c_a8777c53f1d4d5412f19b134ad85ffedf}{hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object\+\_\+str} (struct json\+\_\+object $\ast$j\+\_\+obj, int count,...)
+\item
+void \hyperlink{hs-helper_8c_ae83604a37134e7bdee3ce4f10bb0b47a}{hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object\+\_\+func} (struct json\+\_\+object $\ast$j\+\_\+obj, const char $\ast$verb\+\_\+name, int count,...)
+\item
+int \hyperlink{hs-helper_8c_a2ff1b894941c3b461ca8119079c4146a}{hs\+\_\+search\+\_\+event\+\_\+name\+\_\+index} (const char $\ast$value)
+\end{DoxyCompactItemize}
+
+
+\subsection{Function Documentation}
+\mbox{\Hypertarget{hs-helper_8c_a2e62366684e39ea94436bf017e416827}\label{hs-helper_8c_a2e62366684e39ea94436bf017e416827}}
+\index{hs-\/helper.\+c@{hs-\/helper.\+c}!get\+\_\+value\+\_\+int16@{get\+\_\+value\+\_\+int16}}
+\index{get\+\_\+value\+\_\+int16@{get\+\_\+value\+\_\+int16}!hs-\/helper.\+c@{hs-\/helper.\+c}}
+\subsubsection{\texorpdfstring{get\+\_\+value\+\_\+int16()}{get\_value\_int16()}}
+{\footnotesize\ttfamily \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899}{R\+E\+Q\+\_\+\+E\+R\+R\+OR} get\+\_\+value\+\_\+int16 (\begin{DoxyParamCaption}\item[{const struct afb\+\_\+req}]{request, }\item[{const char $\ast$}]{source, }\item[{int16\+\_\+t $\ast$}]{out\+\_\+id }\end{DoxyParamCaption})}
+
+
+
+Definition at line 48 of file hs-\/helper.\+c.
+
+
+\begin{DoxyCode}
+49 \{
+50 \textcolor{keywordtype}{char}* endptr;
+51 \textcolor{keyword}{const} \textcolor{keywordtype}{char}* tmp = afb\_req\_value (request, source);
+52 \textcolor{keywordflow}{if}(!tmp)
+53 \{
+54 \textcolor{keywordflow}{return} \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899a96a855966bc63045222b3dcac524cee1}{REQ\_FAIL};
+55 \}
+56 \textcolor{keywordtype}{long} tmp\_id = strtol(tmp,&endptr,10);
+57
+58 \textcolor{comment}{/* error check of range */}
+59 \textcolor{keywordflow}{if}( (tmp\_id > INT16\_MAX) || (tmp\_id < INT16\_MIN) )
+60 \{
+61 \textcolor{keywordflow}{return} \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899add1c84bf80c5f80741ee8f37fef1e12b}{OUT\_RANGE};
+62 \}
+63 \textcolor{keywordflow}{if}(*endptr != \textcolor{charliteral}{'\(\backslash\)0'})
+64 \{
+65 \textcolor{keywordflow}{return} \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899aa223eed65c9bee2bf1f4cdecaf90d66a}{NOT\_NUMBER};
+66 \}
+67
+68 *out\_id = (int16\_t)tmp\_id;
+69 \textcolor{keywordflow}{return} \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899ab093abb14c097b3b7719debb04d5e8ee}{REQ\_OK};
+70 \}
+\end{DoxyCode}
+\mbox{\Hypertarget{hs-helper_8c_ac5b0370643c520377afd3fd4891918d2}\label{hs-helper_8c_ac5b0370643c520377afd3fd4891918d2}}
+\index{hs-\/helper.\+c@{hs-\/helper.\+c}!get\+\_\+value\+\_\+int32@{get\+\_\+value\+\_\+int32}}
+\index{get\+\_\+value\+\_\+int32@{get\+\_\+value\+\_\+int32}!hs-\/helper.\+c@{hs-\/helper.\+c}}
+\subsubsection{\texorpdfstring{get\+\_\+value\+\_\+int32()}{get\_value\_int32()}}
+{\footnotesize\ttfamily \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899}{R\+E\+Q\+\_\+\+E\+R\+R\+OR} get\+\_\+value\+\_\+int32 (\begin{DoxyParamCaption}\item[{const struct afb\+\_\+req}]{request, }\item[{const char $\ast$}]{source, }\item[{int32\+\_\+t $\ast$}]{out\+\_\+id }\end{DoxyParamCaption})}
+
+
+
+Definition at line 72 of file hs-\/helper.\+c.
+
+
+\begin{DoxyCode}
+73 \{
+74 \textcolor{keywordtype}{char}* endptr;
+75 \textcolor{keyword}{const} \textcolor{keywordtype}{char}* tmp = afb\_req\_value (request, source);
+76 \textcolor{keywordflow}{if}(!tmp)
+77 \{
+78 \textcolor{keywordflow}{return} \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899a96a855966bc63045222b3dcac524cee1}{REQ\_FAIL};
+79 \}
+80 \textcolor{keywordtype}{long} tmp\_id = strtol(tmp,&endptr,10);
+81
+82 \textcolor{comment}{/* error check of range */}
+83 \textcolor{keywordflow}{if}( (tmp\_id > INT32\_MAX) || (tmp\_id < INT32\_MIN) )
+84 \{
+85 \textcolor{keywordflow}{return} \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899add1c84bf80c5f80741ee8f37fef1e12b}{OUT\_RANGE};
+86 \}
+87 \textcolor{keywordflow}{if}(*endptr != \textcolor{charliteral}{'\(\backslash\)0'})
+88 \{
+89 \textcolor{keywordflow}{return} \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899aa223eed65c9bee2bf1f4cdecaf90d66a}{NOT\_NUMBER};
+90 \}
+91
+92 *out\_id = (int32\_t)tmp\_id;
+93 \textcolor{keywordflow}{return} \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899ab093abb14c097b3b7719debb04d5e8ee}{REQ\_OK};
+94 \}
+\end{DoxyCode}
+\mbox{\Hypertarget{hs-helper_8c_a649900645417f2df3a70b9ad67529f53}\label{hs-helper_8c_a649900645417f2df3a70b9ad67529f53}}
+\index{hs-\/helper.\+c@{hs-\/helper.\+c}!get\+\_\+value\+\_\+uint16@{get\+\_\+value\+\_\+uint16}}
+\index{get\+\_\+value\+\_\+uint16@{get\+\_\+value\+\_\+uint16}!hs-\/helper.\+c@{hs-\/helper.\+c}}
+\subsubsection{\texorpdfstring{get\+\_\+value\+\_\+uint16()}{get\_value\_uint16()}}
+{\footnotesize\ttfamily \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899}{R\+E\+Q\+\_\+\+E\+R\+R\+OR} get\+\_\+value\+\_\+uint16 (\begin{DoxyParamCaption}\item[{const struct afb\+\_\+req}]{request, }\item[{const char $\ast$}]{source, }\item[{uint16\+\_\+t $\ast$}]{out\+\_\+id }\end{DoxyParamCaption})}
+
+
+
+Definition at line 24 of file hs-\/helper.\+c.
+
+
+\begin{DoxyCode}
+25 \{
+26 \textcolor{keywordtype}{char}* endptr;
+27 \textcolor{keyword}{const} \textcolor{keywordtype}{char}* tmp = afb\_req\_value (request, source);
+28 \textcolor{keywordflow}{if}(!tmp)
+29 \{
+30 \textcolor{keywordflow}{return} \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899a96a855966bc63045222b3dcac524cee1}{REQ\_FAIL};
+31 \}
+32 \textcolor{keywordtype}{long} tmp\_id = strtol(tmp,&endptr,10);
+33
+34 \textcolor{comment}{/* error check of range */}
+35 \textcolor{keywordflow}{if}( (tmp\_id > UINT16\_MAX) || (tmp\_id < 0) )
+36 \{
+37 \textcolor{keywordflow}{return} \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899add1c84bf80c5f80741ee8f37fef1e12b}{OUT\_RANGE};
+38 \}
+39 \textcolor{keywordflow}{if}(*endptr != \textcolor{charliteral}{'\(\backslash\)0'})
+40 \{
+41 \textcolor{keywordflow}{return} \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899aa223eed65c9bee2bf1f4cdecaf90d66a}{NOT\_NUMBER};
+42 \}
+43
+44 *out\_id = (uint16\_t)tmp\_id;
+45 \textcolor{keywordflow}{return} \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899ab093abb14c097b3b7719debb04d5e8ee}{REQ\_OK};
+46 \}
+\end{DoxyCode}
+\mbox{\Hypertarget{hs-helper_8c_a1ba31a6a94515ff1730ba0043a67d59e}\label{hs-helper_8c_a1ba31a6a94515ff1730ba0043a67d59e}}
+\index{hs-\/helper.\+c@{hs-\/helper.\+c}!hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object@{hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object}}
+\index{hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object@{hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object}!hs-\/helper.\+c@{hs-\/helper.\+c}}
+\subsubsection{\texorpdfstring{hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object()}{hs\_add\_object\_to\_json\_object()}}
+{\footnotesize\ttfamily void hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object (\begin{DoxyParamCaption}\item[{struct json\+\_\+object $\ast$}]{j\+\_\+obj, }\item[{int}]{count, }\item[{}]{... }\end{DoxyParamCaption})}
+
+
+
+Definition at line 96 of file hs-\/helper.\+c.
+
+
+\begin{DoxyCode}
+97 \{
+98 va\_list args;
+99 va\_start(args, count);
+100 \textcolor{keywordflow}{for}(\textcolor{keywordtype}{int} i = 0; i < count; ++i )
+101 \{
+102 \textcolor{keywordtype}{char} *key = va\_arg(args, \textcolor{keywordtype}{char}*);
+103 \textcolor{keywordtype}{int} value = va\_arg(args, \textcolor{keywordtype}{int});
+104 json\_object\_object\_add(j\_obj, key, json\_object\_new\_int((int32\_t)value));
+105 ++i;
+106 \}
+107 va\_end(args);
+108 \}
+\end{DoxyCode}
+\mbox{\Hypertarget{hs-helper_8c_ae83604a37134e7bdee3ce4f10bb0b47a}\label{hs-helper_8c_ae83604a37134e7bdee3ce4f10bb0b47a}}
+\index{hs-\/helper.\+c@{hs-\/helper.\+c}!hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object\+\_\+func@{hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object\+\_\+func}}
+\index{hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object\+\_\+func@{hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object\+\_\+func}!hs-\/helper.\+c@{hs-\/helper.\+c}}
+\subsubsection{\texorpdfstring{hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object\+\_\+func()}{hs\_add\_object\_to\_json\_object\_func()}}
+{\footnotesize\ttfamily void hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object\+\_\+func (\begin{DoxyParamCaption}\item[{struct json\+\_\+object $\ast$}]{j\+\_\+obj, }\item[{const char $\ast$}]{verb\+\_\+name, }\item[{int}]{count, }\item[{}]{... }\end{DoxyParamCaption})}
+
+
+
+Definition at line 125 of file hs-\/helper.\+c.
+
+
+\begin{DoxyCode}
+126 \{
+127 va\_list args;
+128 va\_start(args, count);
+129
+130 json\_object\_object\_add(j\_obj,\textcolor{stringliteral}{"verb"}, json\_object\_new\_string(verb\_name));
+131
+132 \textcolor{keywordflow}{for}(\textcolor{keywordtype}{int} i = 0; i < count; ++i )
+133 \{
+134 \textcolor{keywordtype}{char} *key = va\_arg(args, \textcolor{keywordtype}{char}*);
+135 \textcolor{keywordtype}{int} value = va\_arg(args, \textcolor{keywordtype}{int});
+136 json\_object\_object\_add(j\_obj, key, json\_object\_new\_int((int32\_t)value));
+137 ++i;
+138 \}
+139 va\_end(args);
+140 \}
+\end{DoxyCode}
+\mbox{\Hypertarget{hs-helper_8c_a8777c53f1d4d5412f19b134ad85ffedf}\label{hs-helper_8c_a8777c53f1d4d5412f19b134ad85ffedf}}
+\index{hs-\/helper.\+c@{hs-\/helper.\+c}!hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object\+\_\+str@{hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object\+\_\+str}}
+\index{hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object\+\_\+str@{hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object\+\_\+str}!hs-\/helper.\+c@{hs-\/helper.\+c}}
+\subsubsection{\texorpdfstring{hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object\+\_\+str()}{hs\_add\_object\_to\_json\_object\_str()}}
+{\footnotesize\ttfamily void hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object\+\_\+str (\begin{DoxyParamCaption}\item[{struct json\+\_\+object $\ast$}]{j\+\_\+obj, }\item[{int}]{count, }\item[{}]{... }\end{DoxyParamCaption})}
+
+
+
+Definition at line 110 of file hs-\/helper.\+c.
+
+
+\begin{DoxyCode}
+111 \{
+112 va\_list args;
+113 va\_start(args, count);
+114 \textcolor{keywordflow}{for}(\textcolor{keywordtype}{int} i = 0; i < count; ++i )
+115 \{
+116 \textcolor{keywordtype}{char} *key = va\_arg(args, \textcolor{keywordtype}{char}*);
+117 \textcolor{keywordtype}{char} *value = va\_arg(args, \textcolor{keywordtype}{char}*);
+118 json\_object\_object\_add(j\_obj, key, json\_object\_new\_string(value));
+119 ++i;
+120 \}
+121 va\_end(args);
+122 \}
+\end{DoxyCode}
+\mbox{\Hypertarget{hs-helper_8c_a2ff1b894941c3b461ca8119079c4146a}\label{hs-helper_8c_a2ff1b894941c3b461ca8119079c4146a}}
+\index{hs-\/helper.\+c@{hs-\/helper.\+c}!hs\+\_\+search\+\_\+event\+\_\+name\+\_\+index@{hs\+\_\+search\+\_\+event\+\_\+name\+\_\+index}}
+\index{hs\+\_\+search\+\_\+event\+\_\+name\+\_\+index@{hs\+\_\+search\+\_\+event\+\_\+name\+\_\+index}!hs-\/helper.\+c@{hs-\/helper.\+c}}
+\subsubsection{\texorpdfstring{hs\+\_\+search\+\_\+event\+\_\+name\+\_\+index()}{hs\_search\_event\_name\_index()}}
+{\footnotesize\ttfamily int hs\+\_\+search\+\_\+event\+\_\+name\+\_\+index (\begin{DoxyParamCaption}\item[{const char $\ast$}]{value }\end{DoxyParamCaption})}
+
+
+
+Definition at line 142 of file hs-\/helper.\+c.
+
+
+\begin{DoxyCode}
+143 \{
+144 \textcolor{keywordtype}{size\_t} buf\_size = 50;
+145 \textcolor{keywordtype}{size\_t} size = \textcolor{keyword}{sizeof} \hyperlink{hs-helper_8h_a0cd84b1a2184c9b84d1b7bf24582f28e}{evlist} / \textcolor{keyword}{sizeof} *\hyperlink{hs-helper_8h_a0cd84b1a2184c9b84d1b7bf24582f28e}{evlist};
+146 \textcolor{keywordtype}{int} ret = -1;
+147 \textcolor{keywordflow}{for}(\textcolor{keywordtype}{size\_t} i = 0 ; i < size ; ++i)
+148 \{
+149 \textcolor{keywordflow}{if}(!strncmp(value, \hyperlink{hs-helper_8h_a0cd84b1a2184c9b84d1b7bf24582f28e}{evlist}[i], buf\_size))
+150 \{
+151 ret = i;
+152 \textcolor{keywordflow}{break};
+153 \}
+154 \}
+155 \textcolor{keywordflow}{return} ret;
+156 \}
+\end{DoxyCode}
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/latex/de/dd0/class_lib_home_screen.tex b/demo#3/common/agl-service-homescreen/doc/api-ref/latex/de/dd0/class_lib_home_screen.tex
new file mode 100644
index 0000000..ce14de7
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/latex/de/dd0/class_lib_home_screen.tex
@@ -0,0 +1,732 @@
+\hypertarget{class_lib_home_screen}{}\section{Lib\+Home\+Screen Class Reference}
+\label{class_lib_home_screen}\index{Lib\+Home\+Screen@{Lib\+Home\+Screen}}
+
+
+{\ttfamily \#include $<$libhomescreen.\+hpp$>$}
+
+\subsection*{Public Types}
+\begin{DoxyCompactItemize}
+\item
+enum \hyperlink{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154}{Event\+Type} \{ \hyperlink{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154a4b0a82d501e4db5fbfe25c254c92896f}{Event\+\_\+\+Tap\+Shortcut} = 1,
+\hyperlink{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154aea56fa32a124a8ddcbea127755280a1d}{Event\+\_\+\+On\+Screen\+Message},
+\hyperlink{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154acae91db4efc2394fd701f581d277a3fd}{Event\+\_\+\+On\+Screen\+Reply}
+ \}
+\item
+using \hyperlink{class_lib_home_screen_a334f11f81c84c98d18284215dcaada3a}{handler\+\_\+func} = std\+::function$<$ void(json\+\_\+object $\ast$)$>$
+\end{DoxyCompactItemize}
+\subsection*{Public Member Functions}
+\begin{DoxyCompactItemize}
+\item
+\hyperlink{class_lib_home_screen_a724bd949c4154fad041f96a15ef0f5dc}{Lib\+Home\+Screen} ()
+\item
+\hyperlink{class_lib_home_screen_a249902aebf71a5383ca8ec6ae558d095}{$\sim$\+Lib\+Home\+Screen} ()
+\item
+\hyperlink{class_lib_home_screen_a0fff2f703c8ce184eb9edd133e0f4137}{Lib\+Home\+Screen} (const \hyperlink{class_lib_home_screen}{Lib\+Home\+Screen} \&)=delete
+\item
+\hyperlink{class_lib_home_screen}{Lib\+Home\+Screen} \& \hyperlink{class_lib_home_screen_a23bc17798453cfca50904562736f6b25}{operator=} (const \hyperlink{class_lib_home_screen}{Lib\+Home\+Screen} \&)=delete
+\item
+int \hyperlink{class_lib_home_screen_a6a57b573cc767725762ba9beab032220}{init} (const int port, const std\+::string \&token)
+\item
+int \hyperlink{class_lib_home_screen_afb571c9577087b47065eb23e7fdbc903}{tap\+Shortcut} (const char $\ast$application\+\_\+name)
+\item
+int \hyperlink{class_lib_home_screen_ac336482036a72b51a822725f1929523c}{on\+Screen\+Message} (const char $\ast$display\+\_\+message)
+\item
+int \hyperlink{class_lib_home_screen_a6c065f41f2c5d1f58d2763bfb4da9c37}{on\+Screen\+Reply} (const char $\ast$reply\+\_\+message)
+\item
+void \hyperlink{class_lib_home_screen_ab1b0e08bf35415de9064afed899e9f85}{set\+\_\+event\+\_\+handler} (enum \hyperlink{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154}{Event\+Type} et, \hyperlink{class_lib_home_screen_a334f11f81c84c98d18284215dcaada3a}{handler\+\_\+func} f)
+\item
+void \hyperlink{class_lib_home_screen_a2789e8a5372202cc36f48e71dbb9b7cf}{register\+Callback} (void($\ast$event\+\_\+cb)(const std\+::string \&\hyperlink{structevent}{event}, struct json\+\_\+object $\ast$event\+\_\+contents), void($\ast$reply\+\_\+cb)(struct json\+\_\+object $\ast$reply\+\_\+contents), void($\ast$hangup\+\_\+cb)(void)=nullptr)
+\item
+int \hyperlink{class_lib_home_screen_a527b49dcfe581be6275d0eb2236ba37f}{call} (const std\+::string \&verb, struct json\+\_\+object $\ast$arg)
+\item
+int \hyperlink{class_lib_home_screen_ab5e8e8ab7d53e0f114e9e907fcbb7643}{call} (const char $\ast$verb, struct json\+\_\+object $\ast$arg)
+\item
+int \hyperlink{class_lib_home_screen_aa4c189807b75d070f567967f0d690738}{subscribe} (const std\+::string \&event\+\_\+name)
+\item
+int \hyperlink{class_lib_home_screen_aac03a45cbd453ba69ddb00c1016930a6}{unsubscribe} (const std\+::string \&event\+\_\+name)
+\item
+void \hyperlink{class_lib_home_screen_ab1c1fa69f24b981e824dd9fb810c4b74}{on\+\_\+hangup} (void $\ast$closure, struct afb\+\_\+wsj1 $\ast$wsj)
+\item
+void \hyperlink{class_lib_home_screen_a608638eb87b2772a3dcc92d8ca8f3596}{on\+\_\+call} (void $\ast$closure, const char $\ast$api, const char $\ast$verb, struct afb\+\_\+wsj1\+\_\+msg $\ast$msg)
+\item
+void \hyperlink{class_lib_home_screen_a9c4885b51b43ab24a548d49fb3ab2de3}{on\+\_\+event} (void $\ast$closure, const char $\ast$\hyperlink{structevent}{event}, struct afb\+\_\+wsj1\+\_\+msg $\ast$msg)
+\item
+void \hyperlink{class_lib_home_screen_a248d9648c6186287a7632ec1c75fc9c5}{on\+\_\+reply} (void $\ast$closure, struct afb\+\_\+wsj1\+\_\+msg $\ast$msg)
+\end{DoxyCompactItemize}
+\subsection*{Static Public Attributes}
+\begin{DoxyCompactItemize}
+\item
+static const std\+::vector$<$ std\+::string $>$ \hyperlink{class_lib_home_screen_a5593ff5ac78f6495ccb649904cf0ab08}{api\+\_\+list}
+\item
+static const std\+::vector$<$ std\+::string $>$ \hyperlink{class_lib_home_screen_a6a6d8a4d33a006a08652e7377a4c29e9}{event\+\_\+list}
+\end{DoxyCompactItemize}
+
+
+\subsection{Detailed Description}
+
+
+Definition at line 32 of file libhomescreen.\+hpp.
+
+
+
+\subsection{Member Typedef Documentation}
+\mbox{\Hypertarget{class_lib_home_screen_a334f11f81c84c98d18284215dcaada3a}\label{class_lib_home_screen_a334f11f81c84c98d18284215dcaada3a}}
+\index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!handler\+\_\+func@{handler\+\_\+func}}
+\index{handler\+\_\+func@{handler\+\_\+func}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}
+\subsubsection{\texorpdfstring{handler\+\_\+func}{handler\_func}}
+{\footnotesize\ttfamily using \hyperlink{class_lib_home_screen_a334f11f81c84c98d18284215dcaada3a}{Lib\+Home\+Screen\+::handler\+\_\+func} = std\+::function$<$void(json\+\_\+object$\ast$)$>$}
+
+
+
+Definition at line 42 of file libhomescreen.\+hpp.
+
+
+
+\subsection{Member Enumeration Documentation}
+\mbox{\Hypertarget{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154}\label{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154}}
+\index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!Event\+Type@{Event\+Type}}
+\index{Event\+Type@{Event\+Type}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}
+\subsubsection{\texorpdfstring{Event\+Type}{EventType}}
+{\footnotesize\ttfamily enum \hyperlink{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154}{Lib\+Home\+Screen\+::\+Event\+Type}}
+
+\begin{DoxyEnumFields}{Enumerator}
+\raisebox{\heightof{T}}[0pt][0pt]{\index{Event\+\_\+\+Tap\+Shortcut@{Event\+\_\+\+Tap\+Shortcut}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}\index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!Event\+\_\+\+Tap\+Shortcut@{Event\+\_\+\+Tap\+Shortcut}}}\mbox{\Hypertarget{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154a4b0a82d501e4db5fbfe25c254c92896f}\label{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154a4b0a82d501e4db5fbfe25c254c92896f}}
+Event\+\_\+\+Tap\+Shortcut&\\
+\hline
+
+\raisebox{\heightof{T}}[0pt][0pt]{\index{Event\+\_\+\+On\+Screen\+Message@{Event\+\_\+\+On\+Screen\+Message}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}\index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!Event\+\_\+\+On\+Screen\+Message@{Event\+\_\+\+On\+Screen\+Message}}}\mbox{\Hypertarget{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154aea56fa32a124a8ddcbea127755280a1d}\label{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154aea56fa32a124a8ddcbea127755280a1d}}
+Event\+\_\+\+On\+Screen\+Message&\\
+\hline
+
+\raisebox{\heightof{T}}[0pt][0pt]{\index{Event\+\_\+\+On\+Screen\+Reply@{Event\+\_\+\+On\+Screen\+Reply}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}\index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!Event\+\_\+\+On\+Screen\+Reply@{Event\+\_\+\+On\+Screen\+Reply}}}\mbox{\Hypertarget{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154acae91db4efc2394fd701f581d277a3fd}\label{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154acae91db4efc2394fd701f581d277a3fd}}
+Event\+\_\+\+On\+Screen\+Reply&\\
+\hline
+
+\end{DoxyEnumFields}
+
+
+Definition at line 44 of file libhomescreen.\+hpp.
+
+
+\begin{DoxyCode}
+44 \{
+45 \hyperlink{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154a4b0a82d501e4db5fbfe25c254c92896f}{Event\_TapShortcut} = 1,
+46 \hyperlink{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154aea56fa32a124a8ddcbea127755280a1d}{Event\_OnScreenMessage},
+47 \hyperlink{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154acae91db4efc2394fd701f581d277a3fd}{Event\_OnScreenReply}
+48 \};
+\end{DoxyCode}
+
+
+\subsection{Constructor \& Destructor Documentation}
+\mbox{\Hypertarget{class_lib_home_screen_a724bd949c4154fad041f96a15ef0f5dc}\label{class_lib_home_screen_a724bd949c4154fad041f96a15ef0f5dc}}
+\index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}
+\index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}
+\subsubsection{\texorpdfstring{Lib\+Home\+Screen()}{LibHomeScreen()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
+{\footnotesize\ttfamily Lib\+Home\+Screen\+::\+Lib\+Home\+Screen (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}
+
+constructor
+
+Definition at line 83 of file libhomescreen.\+cpp.
+
+
+\begin{DoxyCode}
+84 \{
+85 \}
+\end{DoxyCode}
+\mbox{\Hypertarget{class_lib_home_screen_a249902aebf71a5383ca8ec6ae558d095}\label{class_lib_home_screen_a249902aebf71a5383ca8ec6ae558d095}}
+\index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!````~Lib\+Home\+Screen@{$\sim$\+Lib\+Home\+Screen}}
+\index{````~Lib\+Home\+Screen@{$\sim$\+Lib\+Home\+Screen}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}
+\subsubsection{\texorpdfstring{$\sim$\+Lib\+Home\+Screen()}{~LibHomeScreen()}}
+{\footnotesize\ttfamily Lib\+Home\+Screen\+::$\sim$\+Lib\+Home\+Screen (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}
+
+destructor
+
+Definition at line 90 of file libhomescreen.\+cpp.
+
+
+\begin{DoxyCode}
+91 \{
+92 \textcolor{keywordflow}{if}(mploop)
+93 \{
+94 sd\_event\_unref(mploop);
+95 \}
+96 \textcolor{keywordflow}{if}(sp\_websock != NULL)
+97 \{
+98 afb\_wsj1\_unref(sp\_websock);
+99 \}
+100 \}
+\end{DoxyCode}
+\mbox{\Hypertarget{class_lib_home_screen_a0fff2f703c8ce184eb9edd133e0f4137}\label{class_lib_home_screen_a0fff2f703c8ce184eb9edd133e0f4137}}
+\index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}
+\index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}
+\subsubsection{\texorpdfstring{Lib\+Home\+Screen()}{LibHomeScreen()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
+{\footnotesize\ttfamily Lib\+Home\+Screen\+::\+Lib\+Home\+Screen (\begin{DoxyParamCaption}\item[{const \hyperlink{class_lib_home_screen}{Lib\+Home\+Screen} \&}]{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [delete]}}
+
+
+
+\subsection{Member Function Documentation}
+\mbox{\Hypertarget{class_lib_home_screen_a527b49dcfe581be6275d0eb2236ba37f}\label{class_lib_home_screen_a527b49dcfe581be6275d0eb2236ba37f}}
+\index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!call@{call}}
+\index{call@{call}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}
+\subsubsection{\texorpdfstring{call()}{call()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
+{\footnotesize\ttfamily int Lib\+Home\+Screen\+::call (\begin{DoxyParamCaption}\item[{const std\+::string \&}]{verb, }\item[{struct json\+\_\+object $\ast$}]{arg }\end{DoxyParamCaption})}
+
+\mbox{\Hypertarget{class_lib_home_screen_ab5e8e8ab7d53e0f114e9e907fcbb7643}\label{class_lib_home_screen_ab5e8e8ab7d53e0f114e9e907fcbb7643}}
+\index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!call@{call}}
+\index{call@{call}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}
+\subsubsection{\texorpdfstring{call()}{call()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
+{\footnotesize\ttfamily int Lib\+Home\+Screen\+::call (\begin{DoxyParamCaption}\item[{const char $\ast$}]{verb, }\item[{struct json\+\_\+object $\ast$}]{arg }\end{DoxyParamCaption})}
+
+This function calls the A\+PI of Home\+Screen via Web\+Socket This function is overload function of \char`\"{}call\char`\"{}
+
+\subparagraph*{Parameters}
+
+
+\begin{DoxyItemize}
+\item verb \mbox{[}in\mbox{]} \+: This argument should be specified to the A\+PI name (e.\+g. \char`\"{}tap\+\_\+shortcut\char`\"{})
+\item arg \mbox{[}in\mbox{]} \+: This argument should be specified to the argument of A\+PI. And this argument expects J\+S\+ON object
+\end{DoxyItemize}
+
+\subparagraph*{Return}
+
+
+\begin{DoxyItemize}
+\item Returns 0 on success or -\/1 in case of error.
+\end{DoxyItemize}
+
+\subparagraph*{Note}
+
+To call Home\+Screen\textquotesingle{}s A\+P\+Is, the application should set its function name, arguments to J\+S\+ON format.
+
+Definition at line 360 of file libhomescreen.\+cpp.
+
+
+\begin{DoxyCode}
+361 \{
+362 \textcolor{keywordtype}{int} ret;
+363 \textcolor{keywordflow}{if}(!sp\_websock)
+364 \{
+365 \textcolor{keywordflow}{return} -1;
+366 \}
+367 \textcolor{keywordflow}{if} (!\hyperlink{libhomescreen_8cpp_a7a2176c3d71fec0f09dcb2aa0866b17e}{has\_verb}(\textcolor{keywordtype}{string}(verb)))
+368 \{
+369 \hyperlink{hmi-debug_8h_a65bb6c7cfe38f8a724beab5059d36fb2}{HMI\_ERROR}(\textcolor{stringliteral}{"libhomescreen"},\textcolor{stringliteral}{"verb doesn't exit"});
+370 \textcolor{keywordflow}{return} -1;
+371 \}
+372 ret = afb\_wsj1\_call\_j(sp\_websock, \hyperlink{libhomescreen_8cpp_a1e2d6e77dd8f0162f830058579eab42f}{API}, verb, arg, \hyperlink{libhomescreen_8cpp_a7778933bffa862c63fa0a1b8219faa8b}{\_on\_reply\_static}, \textcolor{keyword}{this});
+373 \textcolor{keywordflow}{if} (ret < 0) \{
+374 \hyperlink{hmi-debug_8h_a65bb6c7cfe38f8a724beab5059d36fb2}{HMI\_ERROR}(\textcolor{stringliteral}{"libhomescreen"},\textcolor{stringliteral}{"Failed to call verb:%s"},verb);
+375 \}
+376 \textcolor{keywordflow}{return} ret;
+377 \}
+\end{DoxyCode}
+\mbox{\Hypertarget{class_lib_home_screen_a6a57b573cc767725762ba9beab032220}\label{class_lib_home_screen_a6a57b573cc767725762ba9beab032220}}
+\index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!init@{init}}
+\index{init@{init}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}
+\subsubsection{\texorpdfstring{init()}{init()}}
+{\footnotesize\ttfamily int Lib\+Home\+Screen\+::init (\begin{DoxyParamCaption}\item[{const int}]{port, }\item[{const std\+::string \&}]{token }\end{DoxyParamCaption})}
+
+This function is initializer
+
+\subparagraph*{Parameters}
+
+
+\begin{DoxyItemize}
+\item port \mbox{[}in\mbox{]} \+: This argument should be specified to the port number to be used for websocket
+\item token \mbox{[}in\mbox{]} \+: This argument should be specified to the token to be used for websocket
+\end{DoxyItemize}
+
+\subparagraph*{Return}
+
+Nothing
+
+\subparagraph*{Note}
+
+Use this constructor
+
+Definition at line 116 of file libhomescreen.\+cpp.
+
+
+\begin{DoxyCode}
+117 \{
+118 \textcolor{keywordtype}{int} ret = 0;
+119 \textcolor{keywordflow}{if}(port > 0 && token.size() > 0)
+120 \{
+121 mport = port;
+122 mtoken = token;
+123 \}
+124 \textcolor{keywordflow}{else}
+125 \{
+126 \hyperlink{hmi-debug_8h_a65bb6c7cfe38f8a724beab5059d36fb2}{HMI\_ERROR}(\textcolor{stringliteral}{"libhomescreen"},\textcolor{stringliteral}{"port and token should be > 0, Initial port and token uses."});
+127 \}
+128
+129 ret = initialize\_websocket();
+130 \textcolor{keywordflow}{if}(ret != 0 )
+131 \{
+132 \hyperlink{hmi-debug_8h_a65bb6c7cfe38f8a724beab5059d36fb2}{HMI\_ERROR}(\textcolor{stringliteral}{"libhomescreen"},\textcolor{stringliteral}{"Failed to initialize websocket"});
+133 \}
+134 \textcolor{keywordflow}{else}\{
+135 \hyperlink{hmi-debug_8h_a0d26d8b8201011dade787236519711c0}{HMI\_DEBUG}(\textcolor{stringliteral}{"libhomescreen"},\textcolor{stringliteral}{"Initialized"});
+136 \}
+137
+138 \textcolor{keywordflow}{return} ret;
+139 \}
+\end{DoxyCode}
+\mbox{\Hypertarget{class_lib_home_screen_a608638eb87b2772a3dcc92d8ca8f3596}\label{class_lib_home_screen_a608638eb87b2772a3dcc92d8ca8f3596}}
+\index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!on\+\_\+call@{on\+\_\+call}}
+\index{on\+\_\+call@{on\+\_\+call}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}
+\subsubsection{\texorpdfstring{on\+\_\+call()}{on\_call()}}
+{\footnotesize\ttfamily void Lib\+Home\+Screen\+::on\+\_\+call (\begin{DoxyParamCaption}\item[{void $\ast$}]{closure, }\item[{const char $\ast$}]{api, }\item[{const char $\ast$}]{verb, }\item[{struct afb\+\_\+wsj1\+\_\+msg $\ast$}]{msg }\end{DoxyParamCaption})}
+
+
+
+Definition at line 448 of file libhomescreen.\+cpp.
+
+
+\begin{DoxyCode}
+449 \{
+450 \}
+\end{DoxyCode}
+\mbox{\Hypertarget{class_lib_home_screen_a9c4885b51b43ab24a548d49fb3ab2de3}\label{class_lib_home_screen_a9c4885b51b43ab24a548d49fb3ab2de3}}
+\index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!on\+\_\+event@{on\+\_\+event}}
+\index{on\+\_\+event@{on\+\_\+event}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}
+\subsubsection{\texorpdfstring{on\+\_\+event()}{on\_event()}}
+{\footnotesize\ttfamily void Lib\+Home\+Screen\+::on\+\_\+event (\begin{DoxyParamCaption}\item[{void $\ast$}]{closure, }\item[{const char $\ast$}]{event, }\item[{struct afb\+\_\+wsj1\+\_\+msg $\ast$}]{msg }\end{DoxyParamCaption})}
+
+
+
+Definition at line 458 of file libhomescreen.\+cpp.
+
+
+\begin{DoxyCode}
+459 \{
+460 \hyperlink{hmi-debug_8h_a0d26d8b8201011dade787236519711c0}{HMI\_DEBUG}(\textcolor{stringliteral}{"libhomescreen"},\textcolor{stringliteral}{"event: (%s) msg: (%s)."}, \hyperlink{structevent}{event}, afb\_wsj1\_msg\_object\_s(msg));
+461
+462 \textcolor{keywordflow}{if} (strstr(\hyperlink{structevent}{event}, \hyperlink{libhomescreen_8cpp_a1e2d6e77dd8f0162f830058579eab42f}{API}) == NULL) \{
+463 \textcolor{keywordflow}{return};
+464 \}
+465
+466 \textcolor{keyword}{struct }json\_object* ev\_contents = afb\_wsj1\_msg\_object\_j(msg);
+467 \textcolor{keyword}{struct }json\_object *json\_data = json\_object\_object\_get(ev\_contents, \textcolor{stringliteral}{"data"});
+468
+469 \textcolor{keywordflow}{if}(onEvent != \textcolor{keyword}{nullptr})
+470 \{
+471 \textcolor{keyword}{const} \textcolor{keywordtype}{string} ev(\hyperlink{structevent}{event});
+472 onEvent(ev, ev\_contents);
+473 \}
+474
+475 \textcolor{keyword}{const} \textcolor{keywordtype}{char}* event\_only = strchr(\hyperlink{structevent}{event}, \textcolor{charliteral}{'/'});
+476 \textcolor{keywordflow}{if} (event\_only != \textcolor{keyword}{nullptr}) \{
+477 event\_only = event\_only + 1;
+478 \}
+479
+480 \textcolor{keywordflow}{if} (strcasecmp(event\_only, \hyperlink{class_lib_home_screen_a6a6d8a4d33a006a08652e7377a4c29e9}{LibHomeScreen::event\_list}[0].c\_str()) == 0) \{
+481 \textcolor{keyword}{auto} i = this->handlers.find(\hyperlink{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154a4b0a82d501e4db5fbfe25c254c92896f}{Event\_TapShortcut});
+482 \textcolor{keywordflow}{if} ( i != this->handlers.end() ) \{
+483 i->second(json\_data);
+484 \}
+485 \}
+486 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (strcasecmp(event\_only, \hyperlink{class_lib_home_screen_a6a6d8a4d33a006a08652e7377a4c29e9}{LibHomeScreen::event\_list}[1].c\_str()) == 0) \{
+487 \textcolor{keyword}{auto} i = this->handlers.find(\hyperlink{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154aea56fa32a124a8ddcbea127755280a1d}{Event\_OnScreenMessage});
+488 \textcolor{keywordflow}{if} ( i != this->handlers.end() ) \{
+489 i->second(json\_data);
+490 \}
+491 \}
+492 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (strcasecmp(event\_only, \hyperlink{class_lib_home_screen_a6a6d8a4d33a006a08652e7377a4c29e9}{LibHomeScreen::event\_list}[2].c\_str()) == 0) \{
+493 \textcolor{keyword}{auto} i = this->handlers.find(\hyperlink{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154acae91db4efc2394fd701f581d277a3fd}{Event\_OnScreenReply});
+494 \textcolor{keywordflow}{if} ( i != this->handlers.end() ) \{
+495 i->second(json\_data);
+496 \}
+497 \}
+498
+499 json\_object\_put(ev\_contents);
+500 \}
+\end{DoxyCode}
+\mbox{\Hypertarget{class_lib_home_screen_ab1c1fa69f24b981e824dd9fb810c4b74}\label{class_lib_home_screen_ab1c1fa69f24b981e824dd9fb810c4b74}}
+\index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!on\+\_\+hangup@{on\+\_\+hangup}}
+\index{on\+\_\+hangup@{on\+\_\+hangup}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}
+\subsubsection{\texorpdfstring{on\+\_\+hangup()}{on\_hangup()}}
+{\footnotesize\ttfamily void Lib\+Home\+Screen\+::on\+\_\+hangup (\begin{DoxyParamCaption}\item[{void $\ast$}]{closure, }\item[{struct afb\+\_\+wsj1 $\ast$}]{wsj }\end{DoxyParamCaption})}
+
+
+
+Definition at line 439 of file libhomescreen.\+cpp.
+
+
+\begin{DoxyCode}
+440 \{
+441 \hyperlink{hmi-debug_8h_a0d26d8b8201011dade787236519711c0}{HMI\_DEBUG}(\textcolor{stringliteral}{"libhomescreen"},\textcolor{stringliteral}{"%s called"}, \_\_FUNCTION\_\_);
+442 \textcolor{keywordflow}{if}(onHangup != \textcolor{keyword}{nullptr})
+443 \{
+444 onHangup();
+445 \}
+446 \}
+\end{DoxyCode}
+\mbox{\Hypertarget{class_lib_home_screen_a248d9648c6186287a7632ec1c75fc9c5}\label{class_lib_home_screen_a248d9648c6186287a7632ec1c75fc9c5}}
+\index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!on\+\_\+reply@{on\+\_\+reply}}
+\index{on\+\_\+reply@{on\+\_\+reply}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}
+\subsubsection{\texorpdfstring{on\+\_\+reply()}{on\_reply()}}
+{\footnotesize\ttfamily void Lib\+Home\+Screen\+::on\+\_\+reply (\begin{DoxyParamCaption}\item[{void $\ast$}]{closure, }\item[{struct afb\+\_\+wsj1\+\_\+msg $\ast$}]{msg }\end{DoxyParamCaption})}
+
+msg is like (\{\char`\"{}response\char`\"{}\+:\{\char`\"{}verb\char`\"{}\+:\char`\"{}subscribe\char`\"{},\char`\"{}error\char`\"{}\+:0\},\char`\"{}jtype\char`\"{}\+:\char`\"{}afb-\/reply\char`\"{},\char`\"{}request\char`\"{}\+:\{\char`\"{}status\char`\"{}\+:\char`\"{}success\char`\"{},\char`\"{}info\char`\"{}\+:\char`\"{}homescreen binder subscribe event name \mbox{[}on\+\_\+screen\+\_\+message\mbox{]}\char`\"{}\}\}) msg is like (\{\char`\"{}response\char`\"{}\+:\{\char`\"{}verb\char`\"{}\+:\char`\"{}tap\+\_\+shortcut\char`\"{},\char`\"{}error\char`\"{}\+:0\},\char`\"{}jtype\char`\"{}\+:\char`\"{}afb-\/reply\char`\"{},\char`\"{}request\char`\"{}\+:\{\char`\"{}status\char`\"{}\+:\char`\"{}success\char`\"{},\char`\"{}info\char`\"{}\+:\char`\"{}afb\+\_\+event\+\_\+push event \mbox{[}tap\+\_\+shortcut\mbox{]}\char`\"{}\}\})
+
+Definition at line 506 of file libhomescreen.\+cpp.
+
+
+\begin{DoxyCode}
+507 \{
+508 \hyperlink{hmi-debug_8h_a0d26d8b8201011dade787236519711c0}{HMI\_DEBUG}(\textcolor{stringliteral}{"libhomescreen"},\textcolor{stringliteral}{"msg: (%s)"}, afb\_wsj1\_msg\_object\_s(msg));
+509 \textcolor{keywordflow}{if}(onReply != \textcolor{keyword}{nullptr})
+510 \{
+511 \textcolor{keyword}{struct }json\_object* reply = afb\_wsj1\_msg\_object\_j(msg);
+512 onReply(reply);
+513
+514 json\_object\_put(reply);
+515 \}
+516 \}
+\end{DoxyCode}
+\mbox{\Hypertarget{class_lib_home_screen_ac336482036a72b51a822725f1929523c}\label{class_lib_home_screen_ac336482036a72b51a822725f1929523c}}
+\index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!on\+Screen\+Message@{on\+Screen\+Message}}
+\index{on\+Screen\+Message@{on\+Screen\+Message}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}
+\subsubsection{\texorpdfstring{on\+Screen\+Message()}{onScreenMessage()}}
+{\footnotesize\ttfamily int Lib\+Home\+Screen\+::on\+Screen\+Message (\begin{DoxyParamCaption}\item[{const char $\ast$}]{display\+\_\+message }\end{DoxyParamCaption})}
+
+Sending on\+Screen message event
+
+Sending On\+Screen message event to Home\+Screen from applications
+
+\subparagraph*{Parameters}
+
+
+\begin{DoxyItemize}
+\item display\+\_\+message \mbox{[}in\mbox{]} \+: message for display
+\end{DoxyItemize}
+
+\subparagraph*{Return}
+
+
+\begin{DoxyItemize}
+\item Returns 0 on success or -\/1 in case of error.
+\end{DoxyItemize}
+
+Definition at line 244 of file libhomescreen.\+cpp.
+
+
+\begin{DoxyCode}
+245 \{
+246 \textcolor{keywordflow}{if}(!sp\_websock)
+247 \{
+248 \textcolor{keywordflow}{return} -1;
+249 \}
+250
+251 \textcolor{keyword}{struct }json\_object* j\_obj = json\_object\_new\_object();
+252 \textcolor{keyword}{struct }json\_object* val = json\_object\_new\_string(display\_message);
+253 json\_object\_object\_add(j\_obj, \textcolor{stringliteral}{"display\_message"}, val);
+254 \textcolor{keywordflow}{return} this->\hyperlink{class_lib_home_screen_a527b49dcfe581be6275d0eb2236ba37f}{call}(\textcolor{stringliteral}{"on\_screen\_message"}, j\_obj);
+255 \}
+\end{DoxyCode}
+\mbox{\Hypertarget{class_lib_home_screen_a6c065f41f2c5d1f58d2763bfb4da9c37}\label{class_lib_home_screen_a6c065f41f2c5d1f58d2763bfb4da9c37}}
+\index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!on\+Screen\+Reply@{on\+Screen\+Reply}}
+\index{on\+Screen\+Reply@{on\+Screen\+Reply}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}
+\subsubsection{\texorpdfstring{on\+Screen\+Reply()}{onScreenReply()}}
+{\footnotesize\ttfamily int Lib\+Home\+Screen\+::on\+Screen\+Reply (\begin{DoxyParamCaption}\item[{const char $\ast$}]{reply\+\_\+message }\end{DoxyParamCaption})}
+
+Sending on\+Screen reply event
+
+Sending On\+Screen reply event to applications from Home\+Screen
+
+\subparagraph*{Parameters}
+
+
+\begin{DoxyItemize}
+\item reply\+\_\+message \mbox{[}in\mbox{]} \+: message for reply
+\end{DoxyItemize}
+
+\subparagraph*{Return}
+
+
+\begin{DoxyItemize}
+\item Returns 0 on success or -\/1 in case of error.
+\end{DoxyItemize}
+
+Definition at line 268 of file libhomescreen.\+cpp.
+
+
+\begin{DoxyCode}
+269 \{
+270 \textcolor{keywordflow}{if}(!sp\_websock)
+271 \{
+272 \textcolor{keywordflow}{return} -1;
+273 \}
+274
+275 \textcolor{keyword}{struct }json\_object* j\_obj = json\_object\_new\_object();
+276 \textcolor{keyword}{struct }json\_object* val = json\_object\_new\_string(reply\_message);
+277 json\_object\_object\_add(j\_obj, \textcolor{stringliteral}{"reply\_message"}, val);
+278 \textcolor{keywordflow}{return} this->\hyperlink{class_lib_home_screen_a527b49dcfe581be6275d0eb2236ba37f}{call}(\textcolor{stringliteral}{"on\_screen\_reply"}, j\_obj);
+279 \}
+\end{DoxyCode}
+\mbox{\Hypertarget{class_lib_home_screen_a23bc17798453cfca50904562736f6b25}\label{class_lib_home_screen_a23bc17798453cfca50904562736f6b25}}
+\index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!operator=@{operator=}}
+\index{operator=@{operator=}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}
+\subsubsection{\texorpdfstring{operator=()}{operator=()}}
+{\footnotesize\ttfamily \hyperlink{class_lib_home_screen}{Lib\+Home\+Screen}\& Lib\+Home\+Screen\+::operator= (\begin{DoxyParamCaption}\item[{const \hyperlink{class_lib_home_screen}{Lib\+Home\+Screen} \&}]{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [delete]}}
+
+\mbox{\Hypertarget{class_lib_home_screen_a2789e8a5372202cc36f48e71dbb9b7cf}\label{class_lib_home_screen_a2789e8a5372202cc36f48e71dbb9b7cf}}
+\index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!register\+Callback@{register\+Callback}}
+\index{register\+Callback@{register\+Callback}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}
+\subsubsection{\texorpdfstring{register\+Callback()}{registerCallback()}}
+{\footnotesize\ttfamily void Lib\+Home\+Screen\+::register\+Callback (\begin{DoxyParamCaption}\item[{void($\ast$)(const std\+::string \&\hyperlink{structevent}{event}, struct json\+\_\+object $\ast$event\+\_\+contents)}]{event\+\_\+cb, }\item[{void($\ast$)(struct json\+\_\+object $\ast$reply\+\_\+contents)}]{reply\+\_\+cb, }\item[{void($\ast$)(void)}]{hangup\+\_\+cb = {\ttfamily nullptr} }\end{DoxyParamCaption})}
+
+This function register callback function for reply/event message from home screen
+
+\subparagraph*{Parameters}
+
+
+\begin{DoxyItemize}
+\item event\+\_\+cb \mbox{[}in\mbox{]} \+: This argument should be specified to the callback for subscribed event
+\item reply\+\_\+cb \mbox{[}in\mbox{]} \+: This argument should be specified to the reply callback for call function
+\end{DoxyItemize}
+
+\subparagraph*{Return}
+
+Nothing
+
+\subparagraph*{Note}
+
+Event callback is invoked by home screen for event you subscribed. If you would like to get event, please call subscribe function before/after this function
+
+Definition at line 155 of file libhomescreen.\+cpp.
+
+
+\begin{DoxyCode}
+159 \{
+160 onEvent = event\_cb;
+161 onReply = reply\_cb;
+162 onHangup = hangup\_cb;
+163 \}
+\end{DoxyCode}
+\mbox{\Hypertarget{class_lib_home_screen_ab1b0e08bf35415de9064afed899e9f85}\label{class_lib_home_screen_ab1b0e08bf35415de9064afed899e9f85}}
+\index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!set\+\_\+event\+\_\+handler@{set\+\_\+event\+\_\+handler}}
+\index{set\+\_\+event\+\_\+handler@{set\+\_\+event\+\_\+handler}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}
+\subsubsection{\texorpdfstring{set\+\_\+event\+\_\+handler()}{set\_event\_handler()}}
+{\footnotesize\ttfamily void Lib\+Home\+Screen\+::set\+\_\+event\+\_\+handler (\begin{DoxyParamCaption}\item[{enum \hyperlink{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154}{Event\+Type}}]{et, }\item[{\hyperlink{class_lib_home_screen_a334f11f81c84c98d18284215dcaada3a}{handler\+\_\+func}}]{f }\end{DoxyParamCaption})}
+
+Setting Event Handler
+
+Setting event handler for Homescreen
+
+\subparagraph*{Parameters}
+
+
+\begin{DoxyItemize}
+\item et \mbox{[}in\mbox{]} \+: event name
+\item f \mbox{[}in\mbox{]} \+: event handler
+\end{DoxyItemize}
+
+\subparagraph*{Return}
+
+Nothing
+
+Definition at line 293 of file libhomescreen.\+cpp.
+
+
+\begin{DoxyCode}
+294 \{
+295 \textcolor{keywordflow}{if} (et >= 1 && et <= 3) \{
+296 \textcolor{keywordflow}{switch} (et) \{
+297 \textcolor{keywordflow}{case} \hyperlink{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154a4b0a82d501e4db5fbfe25c254c92896f}{Event\_TapShortcut}:
+298 this->\hyperlink{class_lib_home_screen_aa4c189807b75d070f567967f0d690738}{subscribe}(\hyperlink{class_lib_home_screen_a6a6d8a4d33a006a08652e7377a4c29e9}{LibHomeScreen::event\_list}[0]);
+299 \textcolor{keywordflow}{break};
+300 \textcolor{keywordflow}{case} \hyperlink{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154aea56fa32a124a8ddcbea127755280a1d}{Event\_OnScreenMessage}:
+301 this->\hyperlink{class_lib_home_screen_aa4c189807b75d070f567967f0d690738}{subscribe}(\hyperlink{class_lib_home_screen_a6a6d8a4d33a006a08652e7377a4c29e9}{LibHomeScreen::event\_list}[1]);
+302 \textcolor{keywordflow}{break};
+303 \textcolor{keywordflow}{case} \hyperlink{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154acae91db4efc2394fd701f581d277a3fd}{Event\_OnScreenReply}:
+304 this->\hyperlink{class_lib_home_screen_aa4c189807b75d070f567967f0d690738}{subscribe}(\hyperlink{class_lib_home_screen_a6a6d8a4d33a006a08652e7377a4c29e9}{LibHomeScreen::event\_list}[2]);
+305 \textcolor{keywordflow}{break};
+306 \}
+307
+308 this->handlers[et] = std::move(f);
+309 \}
+310 \}
+\end{DoxyCode}
+\mbox{\Hypertarget{class_lib_home_screen_aa4c189807b75d070f567967f0d690738}\label{class_lib_home_screen_aa4c189807b75d070f567967f0d690738}}
+\index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!subscribe@{subscribe}}
+\index{subscribe@{subscribe}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}
+\subsubsection{\texorpdfstring{subscribe()}{subscribe()}}
+{\footnotesize\ttfamily int Lib\+Home\+Screen\+::subscribe (\begin{DoxyParamCaption}\item[{const std\+::string \&}]{event\+\_\+name }\end{DoxyParamCaption})}
+
+Register callback function for each event
+
+\subparagraph*{Parameters}
+
+
+\begin{DoxyItemize}
+\item event\+\_\+name \mbox{[}in\mbox{]} \+: This argument should be specified to the event name
+\end{DoxyItemize}
+
+\subparagraph*{Return}
+
+
+\begin{DoxyItemize}
+\item Returns 0 on success or -\/1 in case of error.
+\end{DoxyItemize}
+
+\subparagraph*{Note}
+
+This function enables to get an event to your callback function.
+
+Definition at line 392 of file libhomescreen.\+cpp.
+
+
+\begin{DoxyCode}
+393 \{
+394 \textcolor{keywordflow}{if}(!sp\_websock)
+395 \{
+396 \textcolor{keywordflow}{return} -1;
+397 \}
+398 \textcolor{keyword}{struct }json\_object* j\_obj = json\_object\_new\_object();
+399 json\_object\_object\_add(j\_obj, \textcolor{stringliteral}{"event"}, json\_object\_new\_string(event\_name.c\_str()));
+400
+401 \textcolor{keywordtype}{int} ret = afb\_wsj1\_call\_j(sp\_websock, \hyperlink{libhomescreen_8cpp_a1e2d6e77dd8f0162f830058579eab42f}{API}, \textcolor{stringliteral}{"subscribe"}, j\_obj,
+ \hyperlink{libhomescreen_8cpp_a7778933bffa862c63fa0a1b8219faa8b}{\_on\_reply\_static}, \textcolor{keyword}{this});
+402 \textcolor{keywordflow}{if} (ret < 0) \{
+403 \hyperlink{hmi-debug_8h_a65bb6c7cfe38f8a724beab5059d36fb2}{HMI\_ERROR}(\textcolor{stringliteral}{"libhomescreen"},\textcolor{stringliteral}{"Failed to call verb:%s"},\_\_FUNCTION\_\_);
+404 \}
+405 \textcolor{keywordflow}{return} ret;
+406 \}
+\end{DoxyCode}
+\mbox{\Hypertarget{class_lib_home_screen_afb571c9577087b47065eb23e7fdbc903}\label{class_lib_home_screen_afb571c9577087b47065eb23e7fdbc903}}
+\index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!tap\+Shortcut@{tap\+Shortcut}}
+\index{tap\+Shortcut@{tap\+Shortcut}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}
+\subsubsection{\texorpdfstring{tap\+Shortcut()}{tapShortcut()}}
+{\footnotesize\ttfamily int Lib\+Home\+Screen\+::tap\+Shortcut (\begin{DoxyParamCaption}\item[{const char $\ast$}]{application\+\_\+name }\end{DoxyParamCaption})}
+
+Sending Short\+Cut Icon tapped event
+
+When Home\+Screen shortcut area is tapped, sending a event
+
+\subparagraph*{Parameters}
+
+
+\begin{DoxyItemize}
+\item application\+\_\+name \mbox{[}in\mbox{]} \+: Tapped application name (label)
+\end{DoxyItemize}
+
+\subparagraph*{Return}
+
+
+\begin{DoxyItemize}
+\item Returns 0 on success or -\/1 in case of error.
+\end{DoxyItemize}
+
+Definition at line 220 of file libhomescreen.\+cpp.
+
+
+\begin{DoxyCode}
+221 \{
+222 \textcolor{keywordflow}{if}(!sp\_websock)
+223 \{
+224 \textcolor{keywordflow}{return} -1;
+225 \}
+226
+227 \textcolor{keyword}{struct }json\_object* j\_obj = json\_object\_new\_object();
+228 \textcolor{keyword}{struct }json\_object* val = json\_object\_new\_string(application\_name);
+229 json\_object\_object\_add(j\_obj, \textcolor{stringliteral}{"application\_name"}, val);
+230 \textcolor{keywordflow}{return} this->\hyperlink{class_lib_home_screen_a527b49dcfe581be6275d0eb2236ba37f}{call}(\textcolor{stringliteral}{"tap\_shortcut"}, j\_obj);
+231 \}
+\end{DoxyCode}
+\mbox{\Hypertarget{class_lib_home_screen_aac03a45cbd453ba69ddb00c1016930a6}\label{class_lib_home_screen_aac03a45cbd453ba69ddb00c1016930a6}}
+\index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!unsubscribe@{unsubscribe}}
+\index{unsubscribe@{unsubscribe}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}
+\subsubsection{\texorpdfstring{unsubscribe()}{unsubscribe()}}
+{\footnotesize\ttfamily int Lib\+Home\+Screen\+::unsubscribe (\begin{DoxyParamCaption}\item[{const std\+::string \&}]{event\+\_\+name }\end{DoxyParamCaption})}
+
+Unregister callback function for each event
+
+\subparagraph*{Parameters}
+
+
+\begin{DoxyItemize}
+\item event\+\_\+name \mbox{[}in\mbox{]} \+: This argument should be specified to the event name
+\end{DoxyItemize}
+
+\subparagraph*{Return}
+
+
+\begin{DoxyItemize}
+\item Returns 0 on success or -\/1 in case of error.
+\end{DoxyItemize}
+
+\subparagraph*{Note}
+
+This function disables to get an event to your callback function.
+
+Definition at line 421 of file libhomescreen.\+cpp.
+
+
+\begin{DoxyCode}
+422 \{
+423 \textcolor{keywordflow}{if}(!sp\_websock)
+424 \{
+425 \textcolor{keywordflow}{return} -1;
+426 \}
+427 \textcolor{keyword}{struct }json\_object* j\_obj = json\_object\_new\_object();
+428 json\_object\_object\_add(j\_obj, \textcolor{stringliteral}{"event"}, json\_object\_new\_string(event\_name.c\_str()));
+429
+430 \textcolor{keywordtype}{int} ret = afb\_wsj1\_call\_j(sp\_websock, \hyperlink{libhomescreen_8cpp_a1e2d6e77dd8f0162f830058579eab42f}{API}, \textcolor{stringliteral}{"unsubscribe"}, j\_obj,
+ \hyperlink{libhomescreen_8cpp_a7778933bffa862c63fa0a1b8219faa8b}{\_on\_reply\_static}, \textcolor{keyword}{this});
+431 \textcolor{keywordflow}{if} (ret < 0) \{
+432 \hyperlink{hmi-debug_8h_a65bb6c7cfe38f8a724beab5059d36fb2}{HMI\_ERROR}(\textcolor{stringliteral}{"libhomescreen"},\textcolor{stringliteral}{"Failed to call verb:%s"},\_\_FUNCTION\_\_);
+433 \}
+434 \textcolor{keywordflow}{return} ret;
+435 \}
+\end{DoxyCode}
+
+
+\subsection{Member Data Documentation}
+\mbox{\Hypertarget{class_lib_home_screen_a5593ff5ac78f6495ccb649904cf0ab08}\label{class_lib_home_screen_a5593ff5ac78f6495ccb649904cf0ab08}}
+\index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!api\+\_\+list@{api\+\_\+list}}
+\index{api\+\_\+list@{api\+\_\+list}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}
+\subsubsection{\texorpdfstring{api\+\_\+list}{api\_list}}
+{\footnotesize\ttfamily const std\+::vector$<$ std\+::string $>$ Lib\+Home\+Screen\+::api\+\_\+list\hspace{0.3cm}{\ttfamily [static]}}
+
+{\bfseries Initial value\+:}
+\begin{DoxyCode}
+\{
+ std::string(\textcolor{stringliteral}{"ping"}),
+ std::string(\textcolor{stringliteral}{"tap\_shortcut"}),
+ std::string(\textcolor{stringliteral}{"on\_screen\_message"}),
+ std::string(\textcolor{stringliteral}{"on\_screen\_reply"}),
+ std::string(\textcolor{stringliteral}{"subscribe"}),
+ std::string(\textcolor{stringliteral}{"unsubscribe"})
+\}
+\end{DoxyCode}
+
+
+Definition at line 50 of file libhomescreen.\+hpp.
+
+\mbox{\Hypertarget{class_lib_home_screen_a6a6d8a4d33a006a08652e7377a4c29e9}\label{class_lib_home_screen_a6a6d8a4d33a006a08652e7377a4c29e9}}
+\index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!event\+\_\+list@{event\+\_\+list}}
+\index{event\+\_\+list@{event\+\_\+list}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}
+\subsubsection{\texorpdfstring{event\+\_\+list}{event\_list}}
+{\footnotesize\ttfamily const std\+::vector$<$ std\+::string $>$ Lib\+Home\+Screen\+::event\+\_\+list\hspace{0.3cm}{\ttfamily [static]}}
+
+{\bfseries Initial value\+:}
+\begin{DoxyCode}
+\{
+ std::string(\textcolor{stringliteral}{"tap\_shortcut"}),
+ std::string(\textcolor{stringliteral}{"on\_screen\_message"}),
+ std::string(\textcolor{stringliteral}{"on\_screen\_reply"}),
+ std::string(\textcolor{stringliteral}{"none"})
+\}
+\end{DoxyCode}
+
+
+Definition at line 51 of file libhomescreen.\+hpp.
+
+
+
+The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
+\item
+include/\hyperlink{libhomescreen_8hpp}{libhomescreen.\+hpp}\item
+libhomescreen/\hyperlink{libhomescreen_8cpp}{libhomescreen.\+cpp}\end{DoxyCompactItemize}
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/latex/df/d43/libhomescreen_8hpp.tex b/demo#3/common/agl-service-homescreen/doc/api-ref/latex/df/d43/libhomescreen_8hpp.tex
new file mode 100644
index 0000000..a88a588
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/latex/df/d43/libhomescreen_8hpp.tex
@@ -0,0 +1,16 @@
+\hypertarget{libhomescreen_8hpp}{}\section{include/libhomescreen.hpp File Reference}
+\label{libhomescreen_8hpp}\index{include/libhomescreen.\+hpp@{include/libhomescreen.\+hpp}}
+{\ttfamily \#include $<$vector$>$}\newline
+{\ttfamily \#include $<$map$>$}\newline
+{\ttfamily \#include $<$string$>$}\newline
+{\ttfamily \#include $<$functional$>$}\newline
+{\ttfamily \#include $<$json-\/c/json.\+h$>$}\newline
+{\ttfamily \#include $<$systemd/sd-\/event.\+h$>$}\newline
+{\ttfamily \#include $<$afb/afb-\/binding.\+h$>$}\newline
+{\ttfamily \#include $<$afb/afb-\/wsj1.\+h$>$}\newline
+{\ttfamily \#include $<$afb/afb-\/ws-\/client.\+h$>$}\newline
+\subsection*{Classes}
+\begin{DoxyCompactItemize}
+\item
+class \hyperlink{class_lib_home_screen}{Lib\+Home\+Screen}
+\end{DoxyCompactItemize}
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/latex/df/d76/hmi-debug_8h.tex b/demo#3/common/agl-service-homescreen/doc/api-ref/latex/df/d76/hmi-debug_8h.tex
new file mode 100644
index 0000000..4f5a64c
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/latex/df/d76/hmi-debug_8h.tex
@@ -0,0 +1,202 @@
+\hypertarget{hmi-debug_8h}{}\section{include/hmi-\/debug.h File Reference}
+\label{hmi-debug_8h}\index{include/hmi-\/debug.\+h@{include/hmi-\/debug.\+h}}
+{\ttfamily \#include $<$time.\+h$>$}\newline
+{\ttfamily \#include $<$stdio.\+h$>$}\newline
+{\ttfamily \#include $<$afb/afb-\/binding.\+h$>$}\newline
+\subsection*{Macros}
+\begin{DoxyCompactItemize}
+\item
+\#define \hyperlink{hmi-debug_8h_a65bb6c7cfe38f8a724beab5059d36fb2}{H\+M\+I\+\_\+\+E\+R\+R\+OR}(prefix, args, ...)~\hyperlink{hmi-debug_8h_a0846b9d51e2e0612c4825a9a581aa40a}{\+\_\+\+H\+M\+I\+\_\+\+L\+OG}(\hyperlink{hmi-debug_8h_aa5a9053636a30269210c54e734e0d583a5b40f003febbc3b535649d63f4b8a44f}{L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+E\+R\+R\+OR}, \+\_\+\+\_\+\+F\+I\+L\+E\+\_\+\+\_\+, \+\_\+\+\_\+\+F\+U\+N\+C\+T\+I\+O\+N\+\_\+\+\_\+, \+\_\+\+\_\+\+L\+I\+N\+E\+\_\+\+\_\+, prefix, args, \#\#\+\_\+\+\_\+\+V\+A\+\_\+\+A\+R\+G\+S\+\_\+\+\_\+)
+\item
+\#define \hyperlink{hmi-debug_8h_a25361812432cd2480bc8f1a8e56ecbf7}{H\+M\+I\+\_\+\+W\+A\+R\+N\+I\+NG}(prefix, args, ...)~\hyperlink{hmi-debug_8h_a0846b9d51e2e0612c4825a9a581aa40a}{\+\_\+\+H\+M\+I\+\_\+\+L\+OG}(\hyperlink{hmi-debug_8h_aa5a9053636a30269210c54e734e0d583a5b4dd81b4dc7eefbc55ba03415c627ef}{L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+W\+A\+R\+N\+I\+NG}, \+\_\+\+\_\+\+F\+I\+L\+E\+\_\+\+\_\+, \+\_\+\+\_\+\+F\+U\+N\+C\+T\+I\+O\+N\+\_\+\+\_\+,\+\_\+\+\_\+\+L\+I\+N\+E\+\_\+\+\_\+, prefix, args,\#\#\+\_\+\+\_\+\+V\+A\+\_\+\+A\+R\+G\+S\+\_\+\+\_\+)
+\item
+\#define \hyperlink{hmi-debug_8h_abc0d6e0760017d8ae48b836925b2ef15}{H\+M\+I\+\_\+\+N\+O\+T\+I\+CE}(prefix, args, ...)~\hyperlink{hmi-debug_8h_a0846b9d51e2e0612c4825a9a581aa40a}{\+\_\+\+H\+M\+I\+\_\+\+L\+OG}(\hyperlink{hmi-debug_8h_aa5a9053636a30269210c54e734e0d583a23ae4d711a7bbb3900240cb7316b4b4e}{L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+N\+O\+T\+I\+CE}, \+\_\+\+\_\+\+F\+I\+L\+E\+\_\+\+\_\+, \+\_\+\+\_\+\+F\+U\+N\+C\+T\+I\+O\+N\+\_\+\+\_\+,\+\_\+\+\_\+\+L\+I\+N\+E\+\_\+\+\_\+, prefix, args,\#\#\+\_\+\+\_\+\+V\+A\+\_\+\+A\+R\+G\+S\+\_\+\+\_\+)
+\item
+\#define \hyperlink{hmi-debug_8h_a11b249a67108f0f4c50a0fc8a3eb4f5c}{H\+M\+I\+\_\+\+I\+N\+FO}(prefix, args, ...)~\hyperlink{hmi-debug_8h_a0846b9d51e2e0612c4825a9a581aa40a}{\+\_\+\+H\+M\+I\+\_\+\+L\+OG}(\hyperlink{hmi-debug_8h_aa5a9053636a30269210c54e734e0d583aedee1e3159bfe7d918b6e29873c5aee4}{L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+I\+N\+FO}, \+\_\+\+\_\+\+F\+I\+L\+E\+\_\+\+\_\+, \+\_\+\+\_\+\+F\+U\+N\+C\+T\+I\+O\+N\+\_\+\+\_\+,\+\_\+\+\_\+\+L\+I\+N\+E\+\_\+\+\_\+, prefix, args,\#\#\+\_\+\+\_\+\+V\+A\+\_\+\+A\+R\+G\+S\+\_\+\+\_\+)
+\item
+\#define \hyperlink{hmi-debug_8h_a0d26d8b8201011dade787236519711c0}{H\+M\+I\+\_\+\+D\+E\+B\+UG}(prefix, args, ...)~\hyperlink{hmi-debug_8h_a0846b9d51e2e0612c4825a9a581aa40a}{\+\_\+\+H\+M\+I\+\_\+\+L\+OG}(\hyperlink{hmi-debug_8h_aa5a9053636a30269210c54e734e0d583a538b2b6e011479d408ecd2be0f6d6177}{L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+D\+E\+B\+UG}, \+\_\+\+\_\+\+F\+I\+L\+E\+\_\+\+\_\+, \+\_\+\+\_\+\+F\+U\+N\+C\+T\+I\+O\+N\+\_\+\+\_\+,\+\_\+\+\_\+\+L\+I\+N\+E\+\_\+\+\_\+, prefix, args,\#\#\+\_\+\+\_\+\+V\+A\+\_\+\+A\+R\+G\+S\+\_\+\+\_\+)
+\end{DoxyCompactItemize}
+\subsection*{Enumerations}
+\begin{DoxyCompactItemize}
+\item
+enum \hyperlink{hmi-debug_8h_aa5a9053636a30269210c54e734e0d583}{L\+O\+G\+\_\+\+L\+E\+V\+EL} \{ \newline
+\hyperlink{hmi-debug_8h_aa5a9053636a30269210c54e734e0d583a69dacb1837e1e37c6ed34cc2ee1d8848}{L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+N\+O\+NE} = 0,
+\hyperlink{hmi-debug_8h_aa5a9053636a30269210c54e734e0d583a5b40f003febbc3b535649d63f4b8a44f}{L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+E\+R\+R\+OR},
+\hyperlink{hmi-debug_8h_aa5a9053636a30269210c54e734e0d583a5b4dd81b4dc7eefbc55ba03415c627ef}{L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+W\+A\+R\+N\+I\+NG},
+\hyperlink{hmi-debug_8h_aa5a9053636a30269210c54e734e0d583a23ae4d711a7bbb3900240cb7316b4b4e}{L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+N\+O\+T\+I\+CE},
+\newline
+\hyperlink{hmi-debug_8h_aa5a9053636a30269210c54e734e0d583aedee1e3159bfe7d918b6e29873c5aee4}{L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+I\+N\+FO},
+\hyperlink{hmi-debug_8h_aa5a9053636a30269210c54e734e0d583a538b2b6e011479d408ecd2be0f6d6177}{L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+D\+E\+B\+UG},
+\hyperlink{hmi-debug_8h_aa5a9053636a30269210c54e734e0d583a0459003454bc8bb17752e6d8e5787444}{L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+M\+AX} = L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+E\+R\+R\+OR
+ \}
+\end{DoxyCompactItemize}
+\subsection*{Functions}
+\begin{DoxyCompactItemize}
+\item
+static void \hyperlink{hmi-debug_8h_a0846b9d51e2e0612c4825a9a581aa40a}{\+\_\+\+H\+M\+I\+\_\+\+L\+OG} (enum \hyperlink{hmi-debug_8h_aa5a9053636a30269210c54e734e0d583}{L\+O\+G\+\_\+\+L\+E\+V\+EL} level, const char $\ast$file, const char $\ast$func, const int line, const char $\ast$prefix, const char $\ast$log,...)
+\end{DoxyCompactItemize}
+\subsection*{Variables}
+\begin{DoxyCompactItemize}
+\item
+static char \hyperlink{hmi-debug_8h_a13d4c7647aad2e84766f8b48a6caab09}{E\+R\+R\+O\+R\+\_\+\+F\+L\+AG} \mbox{[}6\mbox{]}\mbox{[}20\mbox{]} = \{\char`\"{}N\+O\+NE\char`\"{}, \char`\"{}E\+R\+R\+OR\char`\"{}, \char`\"{}W\+A\+R\+N\+I\+NG\char`\"{}, \char`\"{}N\+O\+T\+I\+CE\char`\"{}, \char`\"{}I\+N\+FO\char`\"{}, \char`\"{}D\+E\+B\+UG\char`\"{}\}
+\end{DoxyCompactItemize}
+
+
+\subsection{Macro Definition Documentation}
+\mbox{\Hypertarget{hmi-debug_8h_a0d26d8b8201011dade787236519711c0}\label{hmi-debug_8h_a0d26d8b8201011dade787236519711c0}}
+\index{hmi-\/debug.\+h@{hmi-\/debug.\+h}!H\+M\+I\+\_\+\+D\+E\+B\+UG@{H\+M\+I\+\_\+\+D\+E\+B\+UG}}
+\index{H\+M\+I\+\_\+\+D\+E\+B\+UG@{H\+M\+I\+\_\+\+D\+E\+B\+UG}!hmi-\/debug.\+h@{hmi-\/debug.\+h}}
+\subsubsection{\texorpdfstring{H\+M\+I\+\_\+\+D\+E\+B\+UG}{HMI\_DEBUG}}
+{\footnotesize\ttfamily \#define H\+M\+I\+\_\+\+D\+E\+B\+UG(\begin{DoxyParamCaption}\item[{}]{prefix, }\item[{}]{args, }\item[{}]{... }\end{DoxyParamCaption})~\hyperlink{hmi-debug_8h_a0846b9d51e2e0612c4825a9a581aa40a}{\+\_\+\+H\+M\+I\+\_\+\+L\+OG}(\hyperlink{hmi-debug_8h_aa5a9053636a30269210c54e734e0d583a538b2b6e011479d408ecd2be0f6d6177}{L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+D\+E\+B\+UG}, \+\_\+\+\_\+\+F\+I\+L\+E\+\_\+\+\_\+, \+\_\+\+\_\+\+F\+U\+N\+C\+T\+I\+O\+N\+\_\+\+\_\+,\+\_\+\+\_\+\+L\+I\+N\+E\+\_\+\+\_\+, prefix, args,\#\#\+\_\+\+\_\+\+V\+A\+\_\+\+A\+R\+G\+S\+\_\+\+\_\+)}
+
+
+
+Definition at line 22 of file hmi-\/debug.\+h.
+
+\mbox{\Hypertarget{hmi-debug_8h_a65bb6c7cfe38f8a724beab5059d36fb2}\label{hmi-debug_8h_a65bb6c7cfe38f8a724beab5059d36fb2}}
+\index{hmi-\/debug.\+h@{hmi-\/debug.\+h}!H\+M\+I\+\_\+\+E\+R\+R\+OR@{H\+M\+I\+\_\+\+E\+R\+R\+OR}}
+\index{H\+M\+I\+\_\+\+E\+R\+R\+OR@{H\+M\+I\+\_\+\+E\+R\+R\+OR}!hmi-\/debug.\+h@{hmi-\/debug.\+h}}
+\subsubsection{\texorpdfstring{H\+M\+I\+\_\+\+E\+R\+R\+OR}{HMI\_ERROR}}
+{\footnotesize\ttfamily \#define H\+M\+I\+\_\+\+E\+R\+R\+OR(\begin{DoxyParamCaption}\item[{}]{prefix, }\item[{}]{args, }\item[{}]{... }\end{DoxyParamCaption})~\hyperlink{hmi-debug_8h_a0846b9d51e2e0612c4825a9a581aa40a}{\+\_\+\+H\+M\+I\+\_\+\+L\+OG}(\hyperlink{hmi-debug_8h_aa5a9053636a30269210c54e734e0d583a5b40f003febbc3b535649d63f4b8a44f}{L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+E\+R\+R\+OR}, \+\_\+\+\_\+\+F\+I\+L\+E\+\_\+\+\_\+, \+\_\+\+\_\+\+F\+U\+N\+C\+T\+I\+O\+N\+\_\+\+\_\+, \+\_\+\+\_\+\+L\+I\+N\+E\+\_\+\+\_\+, prefix, args, \#\#\+\_\+\+\_\+\+V\+A\+\_\+\+A\+R\+G\+S\+\_\+\+\_\+)}
+
+
+
+Definition at line 18 of file hmi-\/debug.\+h.
+
+\mbox{\Hypertarget{hmi-debug_8h_a11b249a67108f0f4c50a0fc8a3eb4f5c}\label{hmi-debug_8h_a11b249a67108f0f4c50a0fc8a3eb4f5c}}
+\index{hmi-\/debug.\+h@{hmi-\/debug.\+h}!H\+M\+I\+\_\+\+I\+N\+FO@{H\+M\+I\+\_\+\+I\+N\+FO}}
+\index{H\+M\+I\+\_\+\+I\+N\+FO@{H\+M\+I\+\_\+\+I\+N\+FO}!hmi-\/debug.\+h@{hmi-\/debug.\+h}}
+\subsubsection{\texorpdfstring{H\+M\+I\+\_\+\+I\+N\+FO}{HMI\_INFO}}
+{\footnotesize\ttfamily \#define H\+M\+I\+\_\+\+I\+N\+FO(\begin{DoxyParamCaption}\item[{}]{prefix, }\item[{}]{args, }\item[{}]{... }\end{DoxyParamCaption})~\hyperlink{hmi-debug_8h_a0846b9d51e2e0612c4825a9a581aa40a}{\+\_\+\+H\+M\+I\+\_\+\+L\+OG}(\hyperlink{hmi-debug_8h_aa5a9053636a30269210c54e734e0d583aedee1e3159bfe7d918b6e29873c5aee4}{L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+I\+N\+FO}, \+\_\+\+\_\+\+F\+I\+L\+E\+\_\+\+\_\+, \+\_\+\+\_\+\+F\+U\+N\+C\+T\+I\+O\+N\+\_\+\+\_\+,\+\_\+\+\_\+\+L\+I\+N\+E\+\_\+\+\_\+, prefix, args,\#\#\+\_\+\+\_\+\+V\+A\+\_\+\+A\+R\+G\+S\+\_\+\+\_\+)}
+
+
+
+Definition at line 21 of file hmi-\/debug.\+h.
+
+\mbox{\Hypertarget{hmi-debug_8h_abc0d6e0760017d8ae48b836925b2ef15}\label{hmi-debug_8h_abc0d6e0760017d8ae48b836925b2ef15}}
+\index{hmi-\/debug.\+h@{hmi-\/debug.\+h}!H\+M\+I\+\_\+\+N\+O\+T\+I\+CE@{H\+M\+I\+\_\+\+N\+O\+T\+I\+CE}}
+\index{H\+M\+I\+\_\+\+N\+O\+T\+I\+CE@{H\+M\+I\+\_\+\+N\+O\+T\+I\+CE}!hmi-\/debug.\+h@{hmi-\/debug.\+h}}
+\subsubsection{\texorpdfstring{H\+M\+I\+\_\+\+N\+O\+T\+I\+CE}{HMI\_NOTICE}}
+{\footnotesize\ttfamily \#define H\+M\+I\+\_\+\+N\+O\+T\+I\+CE(\begin{DoxyParamCaption}\item[{}]{prefix, }\item[{}]{args, }\item[{}]{... }\end{DoxyParamCaption})~\hyperlink{hmi-debug_8h_a0846b9d51e2e0612c4825a9a581aa40a}{\+\_\+\+H\+M\+I\+\_\+\+L\+OG}(\hyperlink{hmi-debug_8h_aa5a9053636a30269210c54e734e0d583a23ae4d711a7bbb3900240cb7316b4b4e}{L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+N\+O\+T\+I\+CE}, \+\_\+\+\_\+\+F\+I\+L\+E\+\_\+\+\_\+, \+\_\+\+\_\+\+F\+U\+N\+C\+T\+I\+O\+N\+\_\+\+\_\+,\+\_\+\+\_\+\+L\+I\+N\+E\+\_\+\+\_\+, prefix, args,\#\#\+\_\+\+\_\+\+V\+A\+\_\+\+A\+R\+G\+S\+\_\+\+\_\+)}
+
+
+
+Definition at line 20 of file hmi-\/debug.\+h.
+
+\mbox{\Hypertarget{hmi-debug_8h_a25361812432cd2480bc8f1a8e56ecbf7}\label{hmi-debug_8h_a25361812432cd2480bc8f1a8e56ecbf7}}
+\index{hmi-\/debug.\+h@{hmi-\/debug.\+h}!H\+M\+I\+\_\+\+W\+A\+R\+N\+I\+NG@{H\+M\+I\+\_\+\+W\+A\+R\+N\+I\+NG}}
+\index{H\+M\+I\+\_\+\+W\+A\+R\+N\+I\+NG@{H\+M\+I\+\_\+\+W\+A\+R\+N\+I\+NG}!hmi-\/debug.\+h@{hmi-\/debug.\+h}}
+\subsubsection{\texorpdfstring{H\+M\+I\+\_\+\+W\+A\+R\+N\+I\+NG}{HMI\_WARNING}}
+{\footnotesize\ttfamily \#define H\+M\+I\+\_\+\+W\+A\+R\+N\+I\+NG(\begin{DoxyParamCaption}\item[{}]{prefix, }\item[{}]{args, }\item[{}]{... }\end{DoxyParamCaption})~\hyperlink{hmi-debug_8h_a0846b9d51e2e0612c4825a9a581aa40a}{\+\_\+\+H\+M\+I\+\_\+\+L\+OG}(\hyperlink{hmi-debug_8h_aa5a9053636a30269210c54e734e0d583a5b4dd81b4dc7eefbc55ba03415c627ef}{L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+W\+A\+R\+N\+I\+NG}, \+\_\+\+\_\+\+F\+I\+L\+E\+\_\+\+\_\+, \+\_\+\+\_\+\+F\+U\+N\+C\+T\+I\+O\+N\+\_\+\+\_\+,\+\_\+\+\_\+\+L\+I\+N\+E\+\_\+\+\_\+, prefix, args,\#\#\+\_\+\+\_\+\+V\+A\+\_\+\+A\+R\+G\+S\+\_\+\+\_\+)}
+
+
+
+Definition at line 19 of file hmi-\/debug.\+h.
+
+
+
+\subsection{Enumeration Type Documentation}
+\mbox{\Hypertarget{hmi-debug_8h_aa5a9053636a30269210c54e734e0d583}\label{hmi-debug_8h_aa5a9053636a30269210c54e734e0d583}}
+\index{hmi-\/debug.\+h@{hmi-\/debug.\+h}!L\+O\+G\+\_\+\+L\+E\+V\+EL@{L\+O\+G\+\_\+\+L\+E\+V\+EL}}
+\index{L\+O\+G\+\_\+\+L\+E\+V\+EL@{L\+O\+G\+\_\+\+L\+E\+V\+EL}!hmi-\/debug.\+h@{hmi-\/debug.\+h}}
+\subsubsection{\texorpdfstring{L\+O\+G\+\_\+\+L\+E\+V\+EL}{LOG\_LEVEL}}
+{\footnotesize\ttfamily enum \hyperlink{hmi-debug_8h_aa5a9053636a30269210c54e734e0d583}{L\+O\+G\+\_\+\+L\+E\+V\+EL}}
+
+\begin{DoxyEnumFields}{Enumerator}
+\raisebox{\heightof{T}}[0pt][0pt]{\index{L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+N\+O\+NE@{L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+N\+O\+NE}!hmi-\/debug.\+h@{hmi-\/debug.\+h}}\index{hmi-\/debug.\+h@{hmi-\/debug.\+h}!L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+N\+O\+NE@{L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+N\+O\+NE}}}\mbox{\Hypertarget{hmi-debug_8h_aa5a9053636a30269210c54e734e0d583a69dacb1837e1e37c6ed34cc2ee1d8848}\label{hmi-debug_8h_aa5a9053636a30269210c54e734e0d583a69dacb1837e1e37c6ed34cc2ee1d8848}}
+L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+N\+O\+NE&\\
+\hline
+
+\raisebox{\heightof{T}}[0pt][0pt]{\index{L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+E\+R\+R\+OR@{L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+E\+R\+R\+OR}!hmi-\/debug.\+h@{hmi-\/debug.\+h}}\index{hmi-\/debug.\+h@{hmi-\/debug.\+h}!L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+E\+R\+R\+OR@{L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+E\+R\+R\+OR}}}\mbox{\Hypertarget{hmi-debug_8h_aa5a9053636a30269210c54e734e0d583a5b40f003febbc3b535649d63f4b8a44f}\label{hmi-debug_8h_aa5a9053636a30269210c54e734e0d583a5b40f003febbc3b535649d63f4b8a44f}}
+L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+E\+R\+R\+OR&\\
+\hline
+
+\raisebox{\heightof{T}}[0pt][0pt]{\index{L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+W\+A\+R\+N\+I\+NG@{L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+W\+A\+R\+N\+I\+NG}!hmi-\/debug.\+h@{hmi-\/debug.\+h}}\index{hmi-\/debug.\+h@{hmi-\/debug.\+h}!L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+W\+A\+R\+N\+I\+NG@{L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+W\+A\+R\+N\+I\+NG}}}\mbox{\Hypertarget{hmi-debug_8h_aa5a9053636a30269210c54e734e0d583a5b4dd81b4dc7eefbc55ba03415c627ef}\label{hmi-debug_8h_aa5a9053636a30269210c54e734e0d583a5b4dd81b4dc7eefbc55ba03415c627ef}}
+L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+W\+A\+R\+N\+I\+NG&\\
+\hline
+
+\raisebox{\heightof{T}}[0pt][0pt]{\index{L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+N\+O\+T\+I\+CE@{L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+N\+O\+T\+I\+CE}!hmi-\/debug.\+h@{hmi-\/debug.\+h}}\index{hmi-\/debug.\+h@{hmi-\/debug.\+h}!L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+N\+O\+T\+I\+CE@{L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+N\+O\+T\+I\+CE}}}\mbox{\Hypertarget{hmi-debug_8h_aa5a9053636a30269210c54e734e0d583a23ae4d711a7bbb3900240cb7316b4b4e}\label{hmi-debug_8h_aa5a9053636a30269210c54e734e0d583a23ae4d711a7bbb3900240cb7316b4b4e}}
+L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+N\+O\+T\+I\+CE&\\
+\hline
+
+\raisebox{\heightof{T}}[0pt][0pt]{\index{L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+I\+N\+FO@{L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+I\+N\+FO}!hmi-\/debug.\+h@{hmi-\/debug.\+h}}\index{hmi-\/debug.\+h@{hmi-\/debug.\+h}!L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+I\+N\+FO@{L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+I\+N\+FO}}}\mbox{\Hypertarget{hmi-debug_8h_aa5a9053636a30269210c54e734e0d583aedee1e3159bfe7d918b6e29873c5aee4}\label{hmi-debug_8h_aa5a9053636a30269210c54e734e0d583aedee1e3159bfe7d918b6e29873c5aee4}}
+L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+I\+N\+FO&\\
+\hline
+
+\raisebox{\heightof{T}}[0pt][0pt]{\index{L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+D\+E\+B\+UG@{L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+D\+E\+B\+UG}!hmi-\/debug.\+h@{hmi-\/debug.\+h}}\index{hmi-\/debug.\+h@{hmi-\/debug.\+h}!L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+D\+E\+B\+UG@{L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+D\+E\+B\+UG}}}\mbox{\Hypertarget{hmi-debug_8h_aa5a9053636a30269210c54e734e0d583a538b2b6e011479d408ecd2be0f6d6177}\label{hmi-debug_8h_aa5a9053636a30269210c54e734e0d583a538b2b6e011479d408ecd2be0f6d6177}}
+L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+D\+E\+B\+UG&\\
+\hline
+
+\raisebox{\heightof{T}}[0pt][0pt]{\index{L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+M\+AX@{L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+M\+AX}!hmi-\/debug.\+h@{hmi-\/debug.\+h}}\index{hmi-\/debug.\+h@{hmi-\/debug.\+h}!L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+M\+AX@{L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+M\+AX}}}\mbox{\Hypertarget{hmi-debug_8h_aa5a9053636a30269210c54e734e0d583a0459003454bc8bb17752e6d8e5787444}\label{hmi-debug_8h_aa5a9053636a30269210c54e734e0d583a0459003454bc8bb17752e6d8e5787444}}
+L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+M\+AX&\\
+\hline
+
+\end{DoxyEnumFields}
+
+
+Definition at line 8 of file hmi-\/debug.\+h.
+
+
+\begin{DoxyCode}
+8 \{
+9 \hyperlink{hmi-debug_8h_aa5a9053636a30269210c54e734e0d583a69dacb1837e1e37c6ed34cc2ee1d8848}{LOG\_LEVEL\_NONE} = 0,
+10 \hyperlink{hmi-debug_8h_aa5a9053636a30269210c54e734e0d583a5b40f003febbc3b535649d63f4b8a44f}{LOG\_LEVEL\_ERROR},
+11 \hyperlink{hmi-debug_8h_aa5a9053636a30269210c54e734e0d583a5b4dd81b4dc7eefbc55ba03415c627ef}{LOG\_LEVEL\_WARNING},
+12 \hyperlink{hmi-debug_8h_aa5a9053636a30269210c54e734e0d583a23ae4d711a7bbb3900240cb7316b4b4e}{LOG\_LEVEL\_NOTICE},
+13 \hyperlink{hmi-debug_8h_aa5a9053636a30269210c54e734e0d583aedee1e3159bfe7d918b6e29873c5aee4}{LOG\_LEVEL\_INFO},
+14 \hyperlink{hmi-debug_8h_aa5a9053636a30269210c54e734e0d583a538b2b6e011479d408ecd2be0f6d6177}{LOG\_LEVEL\_DEBUG},
+15 \hyperlink{hmi-debug_8h_aa5a9053636a30269210c54e734e0d583a0459003454bc8bb17752e6d8e5787444}{LOG\_LEVEL\_MAX} = \hyperlink{hmi-debug_8h_aa5a9053636a30269210c54e734e0d583a5b40f003febbc3b535649d63f4b8a44f}{LOG\_LEVEL\_ERROR}
+16 \};
+\end{DoxyCode}
+
+
+\subsection{Function Documentation}
+\mbox{\Hypertarget{hmi-debug_8h_a0846b9d51e2e0612c4825a9a581aa40a}\label{hmi-debug_8h_a0846b9d51e2e0612c4825a9a581aa40a}}
+\index{hmi-\/debug.\+h@{hmi-\/debug.\+h}!\+\_\+\+H\+M\+I\+\_\+\+L\+OG@{\+\_\+\+H\+M\+I\+\_\+\+L\+OG}}
+\index{\+\_\+\+H\+M\+I\+\_\+\+L\+OG@{\+\_\+\+H\+M\+I\+\_\+\+L\+OG}!hmi-\/debug.\+h@{hmi-\/debug.\+h}}
+\subsubsection{\texorpdfstring{\+\_\+\+H\+M\+I\+\_\+\+L\+O\+G()}{\_HMI\_LOG()}}
+{\footnotesize\ttfamily static void \+\_\+\+H\+M\+I\+\_\+\+L\+OG (\begin{DoxyParamCaption}\item[{enum \hyperlink{hmi-debug_8h_aa5a9053636a30269210c54e734e0d583}{L\+O\+G\+\_\+\+L\+E\+V\+EL}}]{level, }\item[{const char $\ast$}]{file, }\item[{const char $\ast$}]{func, }\item[{const int}]{line, }\item[{const char $\ast$}]{prefix, }\item[{const char $\ast$}]{log, }\item[{}]{... }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}
+
+
+
+Definition at line 26 of file hmi-\/debug.\+h.
+
+
+\begin{DoxyCode}
+27 \{
+28 \textcolor{keyword}{const} \textcolor{keywordtype}{int} log\_level = (getenv(\textcolor{stringliteral}{"USE\_HMI\_DEBUG"}) == NULL)?0:atoi(getenv(\textcolor{stringliteral}{"USE\_HMI\_DEBUG"}));
+29 \textcolor{keywordflow}{if}(log\_level < level)
+30 \{
+31 \textcolor{keywordflow}{return};
+32 \}
+33
+34 \textcolor{keywordtype}{char} *message;
+35 \textcolor{keyword}{struct }timespec tp;
+36 \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} time;
+37
+38 clock\_gettime(CLOCK\_REALTIME, &tp);
+39 time = (tp.tv\_sec * 1000000L) + (tp.tv\_nsec / 1000);
+40
+41 va\_list args;
+42 va\_start(args, log);
+43 \textcolor{keywordflow}{if} (log == NULL || vasprintf(&message, log, args) < 0)
+44 message = NULL;
+45 fprintf(stderr, \textcolor{stringliteral}{"[%10.3f] [%s %s] [%s:%d] >>> %s \(\backslash\)n"}, time / 1000.0, prefix,
+ \hyperlink{hmi-debug_8h_a13d4c7647aad2e84766f8b48a6caab09}{ERROR\_FLAG}[level], func, line, message);
+46 va\_end(args);
+47 free(message);
+48 \}
+\end{DoxyCode}
+
+
+\subsection{Variable Documentation}
+\mbox{\Hypertarget{hmi-debug_8h_a13d4c7647aad2e84766f8b48a6caab09}\label{hmi-debug_8h_a13d4c7647aad2e84766f8b48a6caab09}}
+\index{hmi-\/debug.\+h@{hmi-\/debug.\+h}!E\+R\+R\+O\+R\+\_\+\+F\+L\+AG@{E\+R\+R\+O\+R\+\_\+\+F\+L\+AG}}
+\index{E\+R\+R\+O\+R\+\_\+\+F\+L\+AG@{E\+R\+R\+O\+R\+\_\+\+F\+L\+AG}!hmi-\/debug.\+h@{hmi-\/debug.\+h}}
+\subsubsection{\texorpdfstring{E\+R\+R\+O\+R\+\_\+\+F\+L\+AG}{ERROR\_FLAG}}
+{\footnotesize\ttfamily char E\+R\+R\+O\+R\+\_\+\+F\+L\+AG\mbox{[}6\mbox{]}\mbox{[}20\mbox{]} = \{\char`\"{}N\+O\+NE\char`\"{}, \char`\"{}E\+R\+R\+OR\char`\"{}, \char`\"{}W\+A\+R\+N\+I\+NG\char`\"{}, \char`\"{}N\+O\+T\+I\+CE\char`\"{}, \char`\"{}I\+N\+FO\char`\"{}, \char`\"{}D\+E\+B\+UG\char`\"{}\}\hspace{0.3cm}{\ttfamily [static]}}
+
+
+
+Definition at line 24 of file hmi-\/debug.\+h.
+
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/latex/df/d7d/structevent.tex b/demo#3/common/agl-service-homescreen/doc/api-ref/latex/df/d7d/structevent.tex
new file mode 100644
index 0000000..d33a2da
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/latex/df/d7d/structevent.tex
@@ -0,0 +1,44 @@
+\hypertarget{structevent}{}\section{event Struct Reference}
+\label{structevent}\index{event@{event}}
+\subsection*{Public Attributes}
+\begin{DoxyCompactItemize}
+\item
+const char $\ast$ \hyperlink{structevent_a45c6cfb7961a21a3366db067e4cc59ab}{name}
+\item
+struct afb\+\_\+event $\ast$ \hyperlink{structevent_a58726ebc551d36562ac3f9e1fe293214}{event}
+\end{DoxyCompactItemize}
+
+
+\subsection{Detailed Description}
+
+
+Definition at line 35 of file homescreen.\+c.
+
+
+
+\subsection{Member Data Documentation}
+\mbox{\Hypertarget{structevent_a58726ebc551d36562ac3f9e1fe293214}\label{structevent_a58726ebc551d36562ac3f9e1fe293214}}
+\index{event@{event}!event@{event}}
+\index{event@{event}!event@{event}}
+\subsubsection{\texorpdfstring{event}{event}}
+{\footnotesize\ttfamily struct afb\+\_\+event$\ast$ event\+::event}
+
+
+
+Definition at line 37 of file homescreen.\+c.
+
+\mbox{\Hypertarget{structevent_a45c6cfb7961a21a3366db067e4cc59ab}\label{structevent_a45c6cfb7961a21a3366db067e4cc59ab}}
+\index{event@{event}!name@{name}}
+\index{name@{name}!event@{event}}
+\subsubsection{\texorpdfstring{name}{name}}
+{\footnotesize\ttfamily const char$\ast$ event\+::name}
+
+
+
+Definition at line 36 of file homescreen.\+c.
+
+
+
+The documentation for this struct was generated from the following file\+:\begin{DoxyCompactItemize}
+\item
+src/\hyperlink{homescreen_8c}{homescreen.\+c}\end{DoxyCompactItemize}
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/latex/df/dac/test_8cpp.tex b/demo#3/common/agl-service-homescreen/doc/api-ref/latex/df/dac/test_8cpp.tex
new file mode 100644
index 0000000..92ef1df
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/latex/df/dac/test_8cpp.tex
@@ -0,0 +1,275 @@
+\hypertarget{test_8cpp}{}\section{libhomescreen/test.cpp File Reference}
+\label{test_8cpp}\index{libhomescreen/test.\+cpp@{libhomescreen/test.\+cpp}}
+{\ttfamily \#include $<$libhomescreen.\+hpp$>$}\newline
+{\ttfamily \#include $<$iostream$>$}\newline
+{\ttfamily \#include $<$glib-\/2.\+0/glib.\+h$>$}\newline
+{\ttfamily \#include $<$fcntl.\+h$>$}\newline
+{\ttfamily \#include $<$string$>$}\newline
+{\ttfamily \#include $<$sys/types.\+h$>$}\newline
+{\ttfamily \#include $<$sys/stat.\+h$>$}\newline
+{\ttfamily \#include $<$thread$>$}\newline
+{\ttfamily \#include $<$exception$>$}\newline
+{\ttfamily \#include $<$vector$>$}\newline
+{\ttfamily \#include $<$sstream$>$}\newline
+{\ttfamily \#include $<$functional$>$}\newline
+\subsection*{Functions}
+\begin{DoxyCompactItemize}
+\item
+static vector$<$ string $>$ \hyperlink{test_8cpp_aafb7f182b8bb6ba92354dde1658d86a4}{split} (const string \&str, char sep)
+\item
+static void \hyperlink{test_8cpp_a64a6014565bb3e03294ec4a952d5add0}{usage} ()
+\item
+static void \hyperlink{test_8cpp_aa9b3c43c212b49edee82ac30a11aa255}{call\+\_\+test} ()
+\item
+static void \hyperlink{test_8cpp_a6d3cb4886e7afd45bd56b49800da932d}{on\+Rep} (struct json\+\_\+object $\ast$reply\+\_\+contents)
+\item
+static void \hyperlink{test_8cpp_a6a2874c419fe5936fcccadc7e6cf268e}{on\+Ev} (const string \&\hyperlink{structevent}{event}, struct json\+\_\+object $\ast$event\+\_\+contents)
+\item
+int \hyperlink{test_8cpp_a3c04138a5bfe5d72780bb7e82a18e627}{main} (int argc, char $\ast$$\ast$argv)
+\end{DoxyCompactItemize}
+\subsection*{Variables}
+\begin{DoxyCompactItemize}
+\item
+\hyperlink{class_lib_home_screen}{Lib\+Home\+Screen} $\ast$ \hyperlink{test_8cpp_a529acbd1fed9d98a587edfa62309fa8d}{hs}
+\end{DoxyCompactItemize}
+
+
+\subsection{Function Documentation}
+\mbox{\Hypertarget{test_8cpp_aa9b3c43c212b49edee82ac30a11aa255}\label{test_8cpp_aa9b3c43c212b49edee82ac30a11aa255}}
+\index{test.\+cpp@{test.\+cpp}!call\+\_\+test@{call\+\_\+test}}
+\index{call\+\_\+test@{call\+\_\+test}!test.\+cpp@{test.\+cpp}}
+\subsubsection{\texorpdfstring{call\+\_\+test()}{call\_test()}}
+{\footnotesize\ttfamily static void call\+\_\+test (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}
+
+
+
+Definition at line 51 of file test.\+cpp.
+
+
+\begin{DoxyCode}
+52 \{
+53 \textcolor{keywordtype}{string} command;
+54
+55 cout << \textcolor{stringliteral}{"input verb and argments"} << endl;
+56
+57 \textcolor{comment}{/* read the buffer */}
+58 \textcolor{keywordflow}{for}(;;)\{
+59 \textcolor{keywordtype}{char} line[1023];
+60 cin.getline(line, \textcolor{keyword}{sizeof}(line));
+61 command = line;
+62 \textcolor{keywordflow}{if}(command.empty())\{
+63 \textcolor{keywordflow}{continue};
+64 \}
+65
+66 vector<string> v\_command = \hyperlink{test_8cpp_aafb7f182b8bb6ba92354dde1658d86a4}{split}(command, \textcolor{charliteral}{' '});
+67 \textcolor{comment}{/*for(auto itr = v\_command.begin(); itr != v\_command.end(); ++itr)}
+68 \textcolor{comment}{ \{}
+69 \textcolor{comment}{ cout << *itr <<endl;}
+70 \textcolor{comment}{ \}*/}
+71 \textcolor{keywordtype}{size\_t} num = v\_command.size();
+72 \textcolor{keywordflow}{if}(num % 2 == 0)\{
+73 cout << \textcolor{stringliteral}{"If command contains args, please input <key,value> in argument part"} << endl;
+74 \textcolor{keywordflow}{continue};
+75 \}
+76 \textcolor{comment}{/* create json object */}
+77 \textcolor{keyword}{struct }json\_object* j\_obj = json\_object\_new\_object();
+78 \textcolor{keywordflow}{for}(\textcolor{keywordtype}{int} i = 1;i < (v\_command.size()) ;++i)\{
+79 \textcolor{keyword}{struct }json\_object* val = json\_object\_new\_string(v\_command[i+1].c\_str());
+80 json\_object\_object\_add(j\_obj, v\_command[i].c\_str(), val);
+81 ++i;
+82 \}
+83 \textcolor{comment}{/* call verb via LibHomeScreen */}
+84 \hyperlink{test_8cpp_a529acbd1fed9d98a587edfa62309fa8d}{hs}->\hyperlink{class_lib_home_screen_a527b49dcfe581be6275d0eb2236ba37f}{call}(v\_command[0], j\_obj);
+85 \textcolor{comment}{/* free vector */}
+86 vector<string>().swap(v\_command);
+87 string().swap(command);
+88 \}
+89 \}
+\end{DoxyCode}
+\mbox{\Hypertarget{test_8cpp_a3c04138a5bfe5d72780bb7e82a18e627}\label{test_8cpp_a3c04138a5bfe5d72780bb7e82a18e627}}
+\index{test.\+cpp@{test.\+cpp}!main@{main}}
+\index{main@{main}!test.\+cpp@{test.\+cpp}}
+\subsubsection{\texorpdfstring{main()}{main()}}
+{\footnotesize\ttfamily int main (\begin{DoxyParamCaption}\item[{int}]{argc, }\item[{char $\ast$$\ast$}]{argv }\end{DoxyParamCaption})}
+
+
+
+Definition at line 117 of file test.\+cpp.
+
+
+\begin{DoxyCode}
+118 \{
+119 \textcolor{keywordtype}{int} ret;
+120 \textcolor{keywordflow}{if}(argc == 1)
+121 \{
+122 printf(\textcolor{stringliteral}{"Please input port num in first argument, and token in second argument"});
+123 \hyperlink{test_8cpp_a64a6014565bb3e03294ec4a952d5add0}{usage}();
+124 \textcolor{keywordflow}{return} 0;
+125 \}
+126 \textcolor{keywordflow}{if}(argc == 2)
+127 \{
+128 \textcolor{keywordtype}{string} av(argv[1]);
+129 \textcolor{keywordflow}{if}( (av == \textcolor{stringliteral}{"-h"}) || (av == \textcolor{stringliteral}{"--help"}))
+130 \{
+131 \hyperlink{test_8cpp_a64a6014565bb3e03294ec4a952d5add0}{usage}();
+132 \textcolor{keywordflow}{return} 0;
+133 \}
+134 \}
+135
+136 \textcolor{keywordtype}{string} port\_string(argv[1]);
+137 \textcolor{keywordtype}{string} token(argv[2]);
+138 \textcolor{keywordtype}{char}* endptr;
+139 \textcolor{keywordtype}{long} port = strtol(port\_string.c\_str(),&endptr,10);
+140
+141 \textcolor{comment}{/* error check of range */}
+142 \textcolor{keywordflow}{if}( (port > 20000) || (port < 0) )
+143 \{
+144 printf(\textcolor{stringliteral}{"input under 20000(temporary number)"});
+145 \textcolor{keywordflow}{return} 0;
+146 \}
+147 \textcolor{keywordflow}{if}(*endptr != \textcolor{charliteral}{'\(\backslash\)0'})
+148 \{
+149 printf(\textcolor{stringliteral}{"not number"});
+150 \textcolor{keywordflow}{return} 0;
+151 \}
+152
+153 cout << \textcolor{stringliteral}{"Call test for LibHomeScreen"} << endl;
+154 \hyperlink{test_8cpp_a529acbd1fed9d98a587edfa62309fa8d}{hs} = \textcolor{keyword}{new} \hyperlink{class_lib_home_screen}{LibHomeScreen}();
+155 \hyperlink{test_8cpp_a529acbd1fed9d98a587edfa62309fa8d}{hs}->\hyperlink{class_lib_home_screen_a6a57b573cc767725762ba9beab032220}{init}(port, token);
+156
+157 \textcolor{comment}{// hs->registerCallback(&onEv, &onRep);}
+158 \textcolor{comment}{//}
+159 \textcolor{comment}{// hs->subscribe(event\_list[0]); // tap\_shortcut event subscribe}
+160 \textcolor{comment}{// hs->subscribe(event\_list[1]);}
+161
+162 \hyperlink{test_8cpp_a529acbd1fed9d98a587edfa62309fa8d}{hs}->\hyperlink{class_lib_home_screen_ab1b0e08bf35415de9064afed899e9f85}{set\_event\_handler}(\hyperlink{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154a4b0a82d501e4db5fbfe25c254c92896f}{LibHomeScreen::Event\_TapShortcut}
+ , [](json\_object *\textcolor{keywordtype}{object})\{
+163 \textcolor{keyword}{const} \textcolor{keywordtype}{char} *application\_name = json\_object\_get\_string(
+164 json\_object\_object\_get(\textcolor{keywordtype}{object}, \textcolor{stringliteral}{"application\_name"}));
+165 cout << \textcolor{stringliteral}{"set\_event\_handler Event\_TapShortcut application\_name = "} << application\_name << endl;
+166 \});
+167
+168 \hyperlink{test_8cpp_a529acbd1fed9d98a587edfa62309fa8d}{hs}->\hyperlink{class_lib_home_screen_ab1b0e08bf35415de9064afed899e9f85}{set\_event\_handler}(\hyperlink{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154aea56fa32a124a8ddcbea127755280a1d}{LibHomeScreen::Event\_OnScreenMessage}
+ , [](json\_object *\textcolor{keywordtype}{object})\{
+169 \textcolor{keyword}{const} \textcolor{keywordtype}{char} *display\_message = json\_object\_get\_string(
+170 json\_object\_object\_get(\textcolor{keywordtype}{object}, \textcolor{stringliteral}{"display\_message"}));
+171 cout << \textcolor{stringliteral}{"set\_event\_handler Event\_OnScreenMessage display\_message = "} << display\_message << endl;
+172 \});
+173
+174 \hyperlink{test_8cpp_a529acbd1fed9d98a587edfa62309fa8d}{hs}->\hyperlink{class_lib_home_screen_ab1b0e08bf35415de9064afed899e9f85}{set\_event\_handler}(\hyperlink{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154acae91db4efc2394fd701f581d277a3fd}{LibHomeScreen::Event\_OnScreenReply}
+ , [](json\_object *\textcolor{keywordtype}{object})\{
+175 \textcolor{keyword}{const} \textcolor{keywordtype}{char} *reply\_message = json\_object\_get\_string(
+176 json\_object\_object\_get(\textcolor{keywordtype}{object}, \textcolor{stringliteral}{"reply\_message"}));
+177 cout << \textcolor{stringliteral}{"set\_event\_handler Event\_OnScreenReply reply\_message = "} << reply\_message << endl;
+178 \});
+179
+180 \textcolor{keywordflow}{if} (ret < 0) \{
+181 printf(\textcolor{stringliteral}{"failed to create event loop"});
+182 \textcolor{keywordflow}{return} -1;
+183 \}
+184
+185 \hyperlink{test_8cpp_aa9b3c43c212b49edee82ac30a11aa255}{call\_test}();
+186
+187 \textcolor{keywordflow}{return} 0;
+188 \}
+\end{DoxyCode}
+\mbox{\Hypertarget{test_8cpp_a6a2874c419fe5936fcccadc7e6cf268e}\label{test_8cpp_a6a2874c419fe5936fcccadc7e6cf268e}}
+\index{test.\+cpp@{test.\+cpp}!on\+Ev@{on\+Ev}}
+\index{on\+Ev@{on\+Ev}!test.\+cpp@{test.\+cpp}}
+\subsubsection{\texorpdfstring{on\+Ev()}{onEv()}}
+{\footnotesize\ttfamily static void on\+Ev (\begin{DoxyParamCaption}\item[{const string \&}]{event, }\item[{struct json\+\_\+object $\ast$}]{event\+\_\+contents }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}
+
+
+
+Definition at line 98 of file test.\+cpp.
+
+
+\begin{DoxyCode}
+99 \{
+100 \textcolor{keyword}{const} \textcolor{keywordtype}{char}* str = json\_object\_to\_json\_string(event\_contents);
+101 cout << \textcolor{stringliteral}{"test.cpp [CB onEvent]: event: "} << \textcolor{keyword}{event}.c\_str() << \textcolor{stringliteral}{" contents: "} << str << endl;
+102 \textcolor{comment}{//json\_object\_put(event\_contents); do not release!!!}
+103 \}
+\end{DoxyCode}
+\mbox{\Hypertarget{test_8cpp_a6d3cb4886e7afd45bd56b49800da932d}\label{test_8cpp_a6d3cb4886e7afd45bd56b49800da932d}}
+\index{test.\+cpp@{test.\+cpp}!on\+Rep@{on\+Rep}}
+\index{on\+Rep@{on\+Rep}!test.\+cpp@{test.\+cpp}}
+\subsubsection{\texorpdfstring{on\+Rep()}{onRep()}}
+{\footnotesize\ttfamily static void on\+Rep (\begin{DoxyParamCaption}\item[{struct json\+\_\+object $\ast$}]{reply\+\_\+contents }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}
+
+
+
+Definition at line 91 of file test.\+cpp.
+
+
+\begin{DoxyCode}
+92 \{
+93 \textcolor{keyword}{const} \textcolor{keywordtype}{char}* str = json\_object\_to\_json\_string(reply\_contents);
+94 cout << \textcolor{stringliteral}{"test.cpp [CB onRep]: "} << str << endl;
+95 \textcolor{comment}{//json\_object\_put(reply\_contents); do not release!!!}
+96 \}
+\end{DoxyCode}
+\mbox{\Hypertarget{test_8cpp_aafb7f182b8bb6ba92354dde1658d86a4}\label{test_8cpp_aafb7f182b8bb6ba92354dde1658d86a4}}
+\index{test.\+cpp@{test.\+cpp}!split@{split}}
+\index{split@{split}!test.\+cpp@{test.\+cpp}}
+\subsubsection{\texorpdfstring{split()}{split()}}
+{\footnotesize\ttfamily static vector$<$ string $>$ split (\begin{DoxyParamCaption}\item[{const string \&}]{str, }\item[{char}]{sep }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}
+
+
+
+Definition at line 105 of file test.\+cpp.
+
+
+\begin{DoxyCode}
+106 \{
+107 vector<string> v;
+108 stringstream ss(str);
+109 \textcolor{keywordtype}{string} buffer;
+110 \textcolor{keywordflow}{while}( getline(ss, buffer, sep) ) \{
+111 \textcolor{keywordflow}{if}(!buffer.empty())
+112 v.push\_back(buffer);
+113 \}
+114 \textcolor{keywordflow}{return} v;
+115 \}
+\end{DoxyCode}
+\mbox{\Hypertarget{test_8cpp_a64a6014565bb3e03294ec4a952d5add0}\label{test_8cpp_a64a6014565bb3e03294ec4a952d5add0}}
+\index{test.\+cpp@{test.\+cpp}!usage@{usage}}
+\index{usage@{usage}!test.\+cpp@{test.\+cpp}}
+\subsubsection{\texorpdfstring{usage()}{usage()}}
+{\footnotesize\ttfamily static void usage (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}
+
+
+
+Definition at line 35 of file test.\+cpp.
+
+
+\begin{DoxyCode}
+36 \{
+37 cout << \textcolor{stringliteral}{"verb "}<< \textcolor{stringliteral}{"key:arg"} << endl;
+38 cout << \textcolor{stringliteral}{"example:"} << endl;
+39 cout << \textcolor{stringliteral}{"ping"} << endl;
+40 cout << \textcolor{stringliteral}{"------- -------- --- "} << endl;
+41 cout << \textcolor{stringliteral}{" verb key value"} << endl;
+42 cout << \textcolor{stringliteral}{"verb list:"} << endl;
+43 \textcolor{keywordflow}{for}(\textcolor{keyword}{auto} itr = \hyperlink{class_lib_home_screen_a5593ff5ac78f6495ccb649904cf0ab08}{LibHomeScreen::api\_list}.begin(); itr !=
+ \hyperlink{class_lib_home_screen_a5593ff5ac78f6495ccb649904cf0ab08}{LibHomeScreen::api\_list}.end(); ++itr)
+44 \{
+45 cout << \textcolor{stringliteral}{" "} << *itr << endl;
+46 \}
+47 \textcolor{comment}{// Todo output api list}
+48 exit(0);
+49 \}
+\end{DoxyCode}
+
+
+\subsection{Variable Documentation}
+\mbox{\Hypertarget{test_8cpp_a529acbd1fed9d98a587edfa62309fa8d}\label{test_8cpp_a529acbd1fed9d98a587edfa62309fa8d}}
+\index{test.\+cpp@{test.\+cpp}!hs@{hs}}
+\index{hs@{hs}!test.\+cpp@{test.\+cpp}}
+\subsubsection{\texorpdfstring{hs}{hs}}
+{\footnotesize\ttfamily \hyperlink{class_lib_home_screen}{Lib\+Home\+Screen}$\ast$ hs}
+
+
+
+Definition at line 33 of file test.\+cpp.
+
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/latex/dir_0f70dc74e67ded1ed6ea12b5a24cac83.tex b/demo#3/common/agl-service-homescreen/doc/api-ref/latex/dir_0f70dc74e67ded1ed6ea12b5a24cac83.tex
new file mode 100644
index 0000000..ddf11f0
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/latex/dir_0f70dc74e67ded1ed6ea12b5a24cac83.tex
@@ -0,0 +1,7 @@
+\hypertarget{dir_0f70dc74e67ded1ed6ea12b5a24cac83}{}\section{include/libhomescreen Directory Reference}
+\label{dir_0f70dc74e67ded1ed6ea12b5a24cac83}\index{include/libhomescreen Directory Reference@{include/libhomescreen Directory Reference}}
+\subsection*{Files}
+\begin{DoxyCompactItemize}
+\item
+file \hyperlink{libhomescreen_8hpp}{libhomescreen.\+hpp}
+\end{DoxyCompactItemize}
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/latex/dir_65f76d62445e9e84c0450b12bf77c3bc.tex b/demo#3/common/agl-service-homescreen/doc/api-ref/latex/dir_65f76d62445e9e84c0450b12bf77c3bc.tex
new file mode 100644
index 0000000..ae40678
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/latex/dir_65f76d62445e9e84c0450b12bf77c3bc.tex
@@ -0,0 +1,9 @@
+\hypertarget{dir_65f76d62445e9e84c0450b12bf77c3bc}{}\section{libhomescreen Directory Reference}
+\label{dir_65f76d62445e9e84c0450b12bf77c3bc}\index{libhomescreen Directory Reference@{libhomescreen Directory Reference}}
+\subsection*{Files}
+\begin{DoxyCompactItemize}
+\item
+file \hyperlink{libhomescreen_8cpp}{libhomescreen.\+cpp}
+\item
+file \hyperlink{test_8cpp}{test.\+cpp}
+\end{DoxyCompactItemize}
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/latex/dir_68267d1309a1af8e8297ef4c3efbcdba.tex b/demo#3/common/agl-service-homescreen/doc/api-ref/latex/dir_68267d1309a1af8e8297ef4c3efbcdba.tex
new file mode 100644
index 0000000..4a60c25
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/latex/dir_68267d1309a1af8e8297ef4c3efbcdba.tex
@@ -0,0 +1,11 @@
+\hypertarget{dir_68267d1309a1af8e8297ef4c3efbcdba}{}\section{src Directory Reference}
+\label{dir_68267d1309a1af8e8297ef4c3efbcdba}\index{src Directory Reference@{src Directory Reference}}
+\subsection*{Files}
+\begin{DoxyCompactItemize}
+\item
+file \hyperlink{homescreen_8c}{homescreen.\+c}
+\item
+file \hyperlink{hs-helper_8c}{hs-\/helper.\+c}
+\item
+file \hyperlink{hs-helper_8h}{hs-\/helper.\+h}
+\end{DoxyCompactItemize}
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/latex/dir_a01af9eb3c502936dfd53c3f8e45721d.tex b/demo#3/common/agl-service-homescreen/doc/api-ref/latex/dir_a01af9eb3c502936dfd53c3f8e45721d.tex
new file mode 100644
index 0000000..d46199f
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/latex/dir_a01af9eb3c502936dfd53c3f8e45721d.tex
@@ -0,0 +1,11 @@
+\hypertarget{dir_a01af9eb3c502936dfd53c3f8e45721d}{}\section{homescreen\+\_\+service Directory Reference}
+\label{dir_a01af9eb3c502936dfd53c3f8e45721d}\index{homescreen\+\_\+service Directory Reference@{homescreen\+\_\+service Directory Reference}}
+\subsection*{Files}
+\begin{DoxyCompactItemize}
+\item
+file \hyperlink{homescreen_8c}{homescreen.\+c}
+\item
+file \hyperlink{hs-helper_8c}{hs-\/helper.\+c}
+\item
+file \hyperlink{hs-helper_8h}{hs-\/helper.\+h}
+\end{DoxyCompactItemize}
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/latex/dir_d44c64559bbebec7f509842c48db8b23.tex b/demo#3/common/agl-service-homescreen/doc/api-ref/latex/dir_d44c64559bbebec7f509842c48db8b23.tex
new file mode 100644
index 0000000..c00f852
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/latex/dir_d44c64559bbebec7f509842c48db8b23.tex
@@ -0,0 +1,9 @@
+\hypertarget{dir_d44c64559bbebec7f509842c48db8b23}{}\section{include Directory Reference}
+\label{dir_d44c64559bbebec7f509842c48db8b23}\index{include Directory Reference@{include Directory Reference}}
+\subsection*{Files}
+\begin{DoxyCompactItemize}
+\item
+file \hyperlink{hmi-debug_8h}{hmi-\/debug.\+h}
+\item
+file \hyperlink{libhomescreen_8hpp}{libhomescreen.\+hpp}
+\end{DoxyCompactItemize}
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/latex/doxygen.sty b/demo#3/common/agl-service-homescreen/doc/api-ref/latex/doxygen.sty
new file mode 100644
index 0000000..e457acc
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/latex/doxygen.sty
@@ -0,0 +1,503 @@
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{doxygen}
+
+% Packages used by this style file
+\RequirePackage{alltt}
+\RequirePackage{array}
+\RequirePackage{calc}
+\RequirePackage{float}
+\RequirePackage{ifthen}
+\RequirePackage{verbatim}
+\RequirePackage[table]{xcolor}
+\RequirePackage{longtable}
+\RequirePackage{tabu}
+\RequirePackage{tabularx}
+\RequirePackage{multirow}
+
+%---------- Internal commands used in this style file ----------------
+
+\newcommand{\ensurespace}[1]{%
+ \begingroup%
+ \setlength{\dimen@}{#1}%
+ \vskip\z@\@plus\dimen@%
+ \penalty -100\vskip\z@\@plus -\dimen@%
+ \vskip\dimen@%
+ \penalty 9999%
+ \vskip -\dimen@%
+ \vskip\z@skip% hide the previous |\vskip| from |\addvspace|
+ \endgroup%
+}
+
+\newcommand{\DoxyLabelFont}{}
+\newcommand{\entrylabel}[1]{%
+ {%
+ \parbox[b]{\labelwidth-4pt}{%
+ \makebox[0pt][l]{\DoxyLabelFont#1}%
+ \vspace{1.5\baselineskip}%
+ }%
+ }%
+}
+
+\newenvironment{DoxyDesc}[1]{%
+ \ensurespace{4\baselineskip}%
+ \begin{list}{}{%
+ \settowidth{\labelwidth}{20pt}%
+ \setlength{\parsep}{0pt}%
+ \setlength{\itemsep}{0pt}%
+ \setlength{\leftmargin}{\labelwidth+\labelsep}%
+ \renewcommand{\makelabel}{\entrylabel}%
+ }%
+ \item[#1]%
+}{%
+ \end{list}%
+}
+
+\newsavebox{\xrefbox}
+\newlength{\xreflength}
+\newcommand{\xreflabel}[1]{%
+ \sbox{\xrefbox}{#1}%
+ \setlength{\xreflength}{\wd\xrefbox}%
+ \ifthenelse{\xreflength>\labelwidth}{%
+ \begin{minipage}{\textwidth}%
+ \setlength{\parindent}{0pt}%
+ \hangindent=15pt\bfseries #1\vspace{1.2\itemsep}%
+ \end{minipage}%
+ }{%
+ \parbox[b]{\labelwidth}{\makebox[0pt][l]{\textbf{#1}}}%
+ }%
+}
+
+%---------- Commands used by doxygen LaTeX output generator ----------
+
+% Used by <pre> ... </pre>
+\newenvironment{DoxyPre}{%
+ \small%
+ \begin{alltt}%
+}{%
+ \end{alltt}%
+ \normalsize%
+}
+
+% Used by @code ... @endcode
+\newenvironment{DoxyCode}{%
+ \par%
+ \scriptsize%
+ \begin{alltt}%
+}{%
+ \end{alltt}%
+ \normalsize%
+}
+
+% Used by @example, @include, @includelineno and @dontinclude
+\newenvironment{DoxyCodeInclude}{%
+ \DoxyCode%
+}{%
+ \endDoxyCode%
+}
+
+% Used by @verbatim ... @endverbatim
+\newenvironment{DoxyVerb}{%
+ \footnotesize%
+ \verbatim%
+}{%
+ \endverbatim%
+ \normalsize%
+}
+
+% Used by @verbinclude
+\newenvironment{DoxyVerbInclude}{%
+ \DoxyVerb%
+}{%
+ \endDoxyVerb%
+}
+
+% Used by numbered lists (using '-#' or <ol> ... </ol>)
+\newenvironment{DoxyEnumerate}{%
+ \enumerate%
+}{%
+ \endenumerate%
+}
+
+% Used by bullet lists (using '-', @li, @arg, or <ul> ... </ul>)
+\newenvironment{DoxyItemize}{%
+ \itemize%
+}{%
+ \enditemize%
+}
+
+% Used by description lists (using <dl> ... </dl>)
+\newenvironment{DoxyDescription}{%
+ \description%
+}{%
+ \enddescription%
+}
+
+% Used by @image, @dotfile, @dot ... @enddot, and @msc ... @endmsc
+% (only if caption is specified)
+\newenvironment{DoxyImage}{%
+ \begin{figure}[H]%
+ \begin{center}%
+}{%
+ \end{center}%
+ \end{figure}%
+}
+
+% Used by @image, @dotfile, @dot ... @enddot, and @msc ... @endmsc
+% (only if no caption is specified)
+\newenvironment{DoxyImageNoCaption}{%
+ \begin{center}%
+}{%
+ \end{center}%
+}
+
+% Used by @attention
+\newenvironment{DoxyAttention}[1]{%
+ \begin{DoxyDesc}{#1}%
+}{%
+ \end{DoxyDesc}%
+}
+
+% Used by @author and @authors
+\newenvironment{DoxyAuthor}[1]{%
+ \begin{DoxyDesc}{#1}%
+}{%
+ \end{DoxyDesc}%
+}
+
+% Used by @date
+\newenvironment{DoxyDate}[1]{%
+ \begin{DoxyDesc}{#1}%
+}{%
+ \end{DoxyDesc}%
+}
+
+% Used by @invariant
+\newenvironment{DoxyInvariant}[1]{%
+ \begin{DoxyDesc}{#1}%
+}{%
+ \end{DoxyDesc}%
+}
+
+% Used by @note
+\newenvironment{DoxyNote}[1]{%
+ \begin{DoxyDesc}{#1}%
+}{%
+ \end{DoxyDesc}%
+}
+
+% Used by @post
+\newenvironment{DoxyPostcond}[1]{%
+ \begin{DoxyDesc}{#1}%
+}{%
+ \end{DoxyDesc}%
+}
+
+% Used by @pre
+\newenvironment{DoxyPrecond}[1]{%
+ \begin{DoxyDesc}{#1}%
+}{%
+ \end{DoxyDesc}%
+}
+
+% Used by @copyright
+\newenvironment{DoxyCopyright}[1]{%
+ \begin{DoxyDesc}{#1}%
+}{%
+ \end{DoxyDesc}%
+}
+
+% Used by @remark
+\newenvironment{DoxyRemark}[1]{%
+ \begin{DoxyDesc}{#1}%
+}{%
+ \end{DoxyDesc}%
+}
+
+% Used by @return and @returns
+\newenvironment{DoxyReturn}[1]{%
+ \begin{DoxyDesc}{#1}%
+}{%
+ \end{DoxyDesc}%
+}
+
+% Used by @since
+\newenvironment{DoxySince}[1]{%
+ \begin{DoxyDesc}{#1}%
+}{%
+ \end{DoxyDesc}%
+}
+
+% Used by @see
+\newenvironment{DoxySeeAlso}[1]{%
+ \begin{DoxyDesc}{#1}%
+}{%
+ \end{DoxyDesc}%
+}
+
+% Used by @version
+\newenvironment{DoxyVersion}[1]{%
+ \begin{DoxyDesc}{#1}%
+}{%
+ \end{DoxyDesc}%
+}
+
+% Used by @warning
+\newenvironment{DoxyWarning}[1]{%
+ \begin{DoxyDesc}{#1}%
+}{%
+ \end{DoxyDesc}%
+}
+
+% Used by @internal
+\newenvironment{DoxyInternal}[1]{%
+ \paragraph*{#1}%
+}{%
+}
+
+% Used by @par and @paragraph
+\newenvironment{DoxyParagraph}[1]{%
+ \begin{list}{}{%
+ \settowidth{\labelwidth}{40pt}%
+ \setlength{\leftmargin}{\labelwidth}%
+ \setlength{\parsep}{0pt}%
+ \setlength{\itemsep}{-4pt}%
+ \renewcommand{\makelabel}{\entrylabel}%
+ }%
+ \item[#1]%
+}{%
+ \end{list}%
+}
+
+% Used by parameter lists
+\newenvironment{DoxyParams}[2][]{%
+ \tabulinesep=1mm%
+ \par%
+ \ifthenelse{\equal{#1}{}}%
+ {\begin{longtabu} spread 0pt [l]{|X[-1,l]|X[-1,l]|}}% name + description
+ {\ifthenelse{\equal{#1}{1}}%
+ {\begin{longtabu} spread 0pt [l]{|X[-1,l]|X[-1,l]|X[-1,l]|}}% in/out + name + desc
+ {\begin{longtabu} spread 0pt [l]{|X[-1,l]|X[-1,l]|X[-1,l]|X[-1,l]|}}% in/out + type + name + desc
+ }
+ \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #2}\\[1ex]%
+ \hline%
+ \endfirsthead%
+ \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #2}\\[1ex]%
+ \hline%
+ \endhead%
+}{%
+ \end{longtabu}%
+ \vspace{6pt}%
+}
+
+% Used for fields of simple structs
+\newenvironment{DoxyFields}[1]{%
+ \tabulinesep=1mm%
+ \par%
+ \begin{longtabu} spread 0pt [l]{|X[-1,r]|X[-1,l]|X[-1,l]|}%
+ \multicolumn{3}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]%
+ \hline%
+ \endfirsthead%
+ \multicolumn{3}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]%
+ \hline%
+ \endhead%
+}{%
+ \end{longtabu}%
+ \vspace{6pt}%
+}
+
+% Used for fields simple class style enums
+\newenvironment{DoxyEnumFields}[1]{%
+ \tabulinesep=1mm%
+ \par%
+ \begin{longtabu} spread 0pt [l]{|X[-1,r]|X[-1,l]|}%
+ \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]%
+ \hline%
+ \endfirsthead%
+ \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]%
+ \hline%
+ \endhead%
+}{%
+ \end{longtabu}%
+ \vspace{6pt}%
+}
+
+% Used for parameters within a detailed function description
+\newenvironment{DoxyParamCaption}{%
+ \renewcommand{\item}[2][]{\\ \hspace*{2.0cm} ##1 {\em ##2}}%
+}{%
+}
+
+% Used by return value lists
+\newenvironment{DoxyRetVals}[1]{%
+ \tabulinesep=1mm%
+ \par%
+ \begin{longtabu} spread 0pt [l]{|X[-1,r]|X[-1,l]|}%
+ \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]%
+ \hline%
+ \endfirsthead%
+ \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]%
+ \hline%
+ \endhead%
+}{%
+ \end{longtabu}%
+ \vspace{6pt}%
+}
+
+% Used by exception lists
+\newenvironment{DoxyExceptions}[1]{%
+ \tabulinesep=1mm%
+ \par%
+ \begin{longtabu} spread 0pt [l]{|X[-1,r]|X[-1,l]|}%
+ \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]%
+ \hline%
+ \endfirsthead%
+ \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]%
+ \hline%
+ \endhead%
+}{%
+ \end{longtabu}%
+ \vspace{6pt}%
+}
+
+% Used by template parameter lists
+\newenvironment{DoxyTemplParams}[1]{%
+ \tabulinesep=1mm%
+ \par%
+ \begin{longtabu} spread 0pt [l]{|X[-1,r]|X[-1,l]|}%
+ \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]%
+ \hline%
+ \endfirsthead%
+ \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]%
+ \hline%
+ \endhead%
+}{%
+ \end{longtabu}%
+ \vspace{6pt}%
+}
+
+% Used for member lists
+\newenvironment{DoxyCompactItemize}{%
+ \begin{itemize}%
+ \setlength{\itemsep}{-3pt}%
+ \setlength{\parsep}{0pt}%
+ \setlength{\topsep}{0pt}%
+ \setlength{\partopsep}{0pt}%
+}{%
+ \end{itemize}%
+}
+
+% Used for member descriptions
+\newenvironment{DoxyCompactList}{%
+ \begin{list}{}{%
+ \setlength{\leftmargin}{0.5cm}%
+ \setlength{\itemsep}{0pt}%
+ \setlength{\parsep}{0pt}%
+ \setlength{\topsep}{0pt}%
+ \renewcommand{\makelabel}{\hfill}%
+ }%
+}{%
+ \end{list}%
+}
+
+% Used for reference lists (@bug, @deprecated, @todo, etc.)
+\newenvironment{DoxyRefList}{%
+ \begin{list}{}{%
+ \setlength{\labelwidth}{10pt}%
+ \setlength{\leftmargin}{\labelwidth}%
+ \addtolength{\leftmargin}{\labelsep}%
+ \renewcommand{\makelabel}{\xreflabel}%
+ }%
+}{%
+ \end{list}%
+}
+
+% Used by @bug, @deprecated, @todo, etc.
+\newenvironment{DoxyRefDesc}[1]{%
+ \begin{list}{}{%
+ \renewcommand\makelabel[1]{\textbf{##1}}%
+ \settowidth\labelwidth{\makelabel{#1}}%
+ \setlength\leftmargin{\labelwidth+\labelsep}%
+ }%
+}{%
+ \end{list}%
+}
+
+% Used by parameter lists and simple sections
+\newenvironment{Desc}
+{\begin{list}{}{%
+ \settowidth{\labelwidth}{20pt}%
+ \setlength{\parsep}{0pt}%
+ \setlength{\itemsep}{0pt}%
+ \setlength{\leftmargin}{\labelwidth+\labelsep}%
+ \renewcommand{\makelabel}{\entrylabel}%
+ }
+}{%
+ \end{list}%
+}
+
+% Used by tables
+\newcommand{\PBS}[1]{\let\temp=\\#1\let\\=\temp}%
+\newenvironment{TabularC}[1]%
+{\tabulinesep=1mm
+\begin{longtabu} spread 0pt [c]{*#1{|X[-1]}|}}%
+{\end{longtabu}\par}%
+
+\newenvironment{TabularNC}[1]%
+{\begin{tabu} spread 0pt [l]{*#1{|X[-1]}|}}%
+{\end{tabu}\par}%
+
+% Used for member group headers
+\newenvironment{Indent}{%
+ \begin{list}{}{%
+ \setlength{\leftmargin}{0.5cm}%
+ }%
+ \item[]\ignorespaces%
+}{%
+ \unskip%
+ \end{list}%
+}
+
+% Used when hyperlinks are turned off
+\newcommand{\doxyref}[3]{%
+ \textbf{#1} (\textnormal{#2}\,\pageref{#3})%
+}
+
+% Used to link to a table when hyperlinks are turned on
+\newcommand{\doxytablelink}[2]{%
+ \ref{#1}%
+}
+
+% Used to link to a table when hyperlinks are turned off
+\newcommand{\doxytableref}[3]{%
+ \ref{#3}%
+}
+
+% Used by @addindex
+\newcommand{\lcurly}{\{}
+\newcommand{\rcurly}{\}}
+
+% Colors used for syntax highlighting
+\definecolor{comment}{rgb}{0.5,0.0,0.0}
+\definecolor{keyword}{rgb}{0.0,0.5,0.0}
+\definecolor{keywordtype}{rgb}{0.38,0.25,0.125}
+\definecolor{keywordflow}{rgb}{0.88,0.5,0.0}
+\definecolor{preprocessor}{rgb}{0.5,0.38,0.125}
+\definecolor{stringliteral}{rgb}{0.0,0.125,0.25}
+\definecolor{charliteral}{rgb}{0.0,0.5,0.5}
+\definecolor{vhdldigit}{rgb}{1.0,0.0,1.0}
+\definecolor{vhdlkeyword}{rgb}{0.43,0.0,0.43}
+\definecolor{vhdllogic}{rgb}{1.0,0.0,0.0}
+\definecolor{vhdlchar}{rgb}{0.0,0.0,0.0}
+
+% Color used for table heading
+\newcommand{\tableheadbgcolor}{lightgray}%
+
+% Version of hypertarget with correct landing location
+\newcommand{\Hypertarget}[1]{\Hy@raisedlink{\hypertarget{#1}{}}}
+
+% Define caption that is also suitable in a table
+\makeatletter
+\def\doxyfigcaption{%
+\refstepcounter{figure}%
+\@dblarg{\@caption{figure}}}
+\makeatother
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/latex/files.tex b/demo#3/common/agl-service-homescreen/doc/api-ref/latex/files.tex
new file mode 100644
index 0000000..d348dbe
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/latex/files.tex
@@ -0,0 +1,10 @@
+\section{File List}
+Here is a list of all files with brief descriptions\+:\begin{DoxyCompactList}
+\item\contentsline{section}{include/\hyperlink{hmi-debug_8h}{hmi-\/debug.\+h} }{\pageref{hmi-debug_8h}}{}
+\item\contentsline{section}{include/\hyperlink{libhomescreen_8hpp}{libhomescreen.\+hpp} }{\pageref{libhomescreen_8hpp}}{}
+\item\contentsline{section}{libhomescreen/\hyperlink{libhomescreen_8cpp}{libhomescreen.\+cpp} }{\pageref{libhomescreen_8cpp}}{}
+\item\contentsline{section}{libhomescreen/\hyperlink{test_8cpp}{test.\+cpp} }{\pageref{test_8cpp}}{}
+\item\contentsline{section}{src/\hyperlink{homescreen_8c}{homescreen.\+c} }{\pageref{homescreen_8c}}{}
+\item\contentsline{section}{src/\hyperlink{hs-helper_8c}{hs-\/helper.\+c} }{\pageref{hs-helper_8c}}{}
+\item\contentsline{section}{src/\hyperlink{hs-helper_8h}{hs-\/helper.\+h} }{\pageref{hs-helper_8h}}{}
+\end{DoxyCompactList}
diff --git a/demo#3/common/agl-service-homescreen/doc/api-ref/latex/refman.tex b/demo#3/common/agl-service-homescreen/doc/api-ref/latex/refman.tex
new file mode 100644
index 0000000..1559bf7
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/api-ref/latex/refman.tex
@@ -0,0 +1,166 @@
+\documentclass[twoside]{book}
+
+% Packages required by doxygen
+\usepackage{fixltx2e}
+\usepackage{calc}
+\usepackage{doxygen}
+\usepackage[export]{adjustbox} % also loads graphicx
+\usepackage{graphicx}
+\usepackage[utf8]{inputenc}
+\usepackage{makeidx}
+\usepackage{multicol}
+\usepackage{multirow}
+\PassOptionsToPackage{warn}{textcomp}
+\usepackage{textcomp}
+\usepackage[nointegrals]{wasysym}
+\usepackage[table]{xcolor}
+
+% Font selection
+\usepackage[T1]{fontenc}
+\usepackage[scaled=.90]{helvet}
+\usepackage{courier}
+\usepackage{amssymb}
+\usepackage{sectsty}
+\renewcommand{\familydefault}{\sfdefault}
+\allsectionsfont{%
+ \fontseries{bc}\selectfont%
+ \color{darkgray}%
+}
+\renewcommand{\DoxyLabelFont}{%
+ \fontseries{bc}\selectfont%
+ \color{darkgray}%
+}
+\newcommand{\+}{\discretionary{\mbox{\scriptsize$\hookleftarrow$}}{}{}}
+
+% Page & text layout
+\usepackage{geometry}
+\geometry{%
+ a4paper,%
+ top=2.5cm,%
+ bottom=2.5cm,%
+ left=2.5cm,%
+ right=2.5cm%
+}
+\tolerance=750
+\hfuzz=15pt
+\hbadness=750
+\setlength{\emergencystretch}{15pt}
+\setlength{\parindent}{0cm}
+\setlength{\parskip}{3ex plus 2ex minus 2ex}
+\makeatletter
+\renewcommand{\paragraph}{%
+ \@startsection{paragraph}{4}{0ex}{-1.0ex}{1.0ex}{%
+ \normalfont\normalsize\bfseries\SS@parafont%
+ }%
+}
+\renewcommand{\subparagraph}{%
+ \@startsection{subparagraph}{5}{0ex}{-1.0ex}{1.0ex}{%
+ \normalfont\normalsize\bfseries\SS@subparafont%
+ }%
+}
+\makeatother
+
+% Headers & footers
+\usepackage{fancyhdr}
+\pagestyle{fancyplain}
+\fancyhead[LE]{\fancyplain{}{\bfseries\thepage}}
+\fancyhead[CE]{\fancyplain{}{}}
+\fancyhead[RE]{\fancyplain{}{\bfseries\leftmark}}
+\fancyhead[LO]{\fancyplain{}{\bfseries\rightmark}}
+\fancyhead[CO]{\fancyplain{}{}}
+\fancyhead[RO]{\fancyplain{}{\bfseries\thepage}}
+\fancyfoot[LE]{\fancyplain{}{}}
+\fancyfoot[CE]{\fancyplain{}{}}
+\fancyfoot[RE]{\fancyplain{}{\bfseries\scriptsize Generated by Doxygen }}
+\fancyfoot[LO]{\fancyplain{}{\bfseries\scriptsize Generated by Doxygen }}
+\fancyfoot[CO]{\fancyplain{}{}}
+\fancyfoot[RO]{\fancyplain{}{}}
+\renewcommand{\footrulewidth}{0.4pt}
+\renewcommand{\chaptermark}[1]{%
+ \markboth{#1}{}%
+}
+\renewcommand{\sectionmark}[1]{%
+ \markright{\thesection\ #1}%
+}
+
+% Indices & bibliography
+\usepackage{natbib}
+\usepackage[titles]{tocloft}
+\setcounter{tocdepth}{3}
+\setcounter{secnumdepth}{5}
+\makeindex
+
+% Hyperlinks (required, but should be loaded last)
+\usepackage{ifpdf}
+\ifpdf
+ \usepackage[pdftex,pagebackref=true]{hyperref}
+\else
+ \usepackage[ps2pdf,pagebackref=true]{hyperref}
+\fi
+\hypersetup{%
+ colorlinks=true,%
+ linkcolor=blue,%
+ citecolor=blue,%
+ unicode%
+}
+
+% Custom commands
+\newcommand{\clearemptydoublepage}{%
+ \newpage{\pagestyle{empty}\cleardoublepage}%
+}
+
+\usepackage{caption}
+\captionsetup{labelsep=space,justification=centering,font={bf},singlelinecheck=off,skip=4pt,position=top}
+
+%===== C O N T E N T S =====
+
+\begin{document}
+
+% Titlepage & ToC
+\hypersetup{pageanchor=false,
+ bookmarksnumbered=true,
+ pdfencoding=unicode
+ }
+\pagenumbering{alph}
+\begin{titlepage}
+\vspace*{7cm}
+\begin{center}%
+{\Large Home\+Screen\+Binding }\\
+\vspace*{1cm}
+{\large Generated by Doxygen 1.8.13}\\
+\end{center}
+\end{titlepage}
+\clearemptydoublepage
+\pagenumbering{roman}
+\tableofcontents
+\clearemptydoublepage
+\pagenumbering{arabic}
+\hypersetup{pageanchor=true}
+
+%--- Begin generated contents ---
+\chapter{Class Index}
+\input{annotated}
+\chapter{File Index}
+\input{files}
+\chapter{Class Documentation}
+\input{df/d7d/structevent}
+\input{de/dd0/class_lib_home_screen}
+\chapter{File Documentation}
+\input{df/d76/hmi-debug_8h}
+\input{df/d43/libhomescreen_8hpp}
+\input{d0/d8a/libhomescreen_8cpp}
+\input{df/dac/test_8cpp}
+\input{d0/d1e/homescreen_8c}
+\input{dd/d1d/hs-helper_8c}
+\input{d3/d3d/hs-helper_8h}
+%--- End generated contents ---
+
+% Index
+\backmatter
+\newpage
+\phantomsection
+\clearemptydoublepage
+\addcontentsline{toc}{chapter}{Index}
+\printindex
+
+\end{document}
diff --git a/demo#3/common/agl-service-homescreen/doc/parts/.keep b/demo#3/common/agl-service-homescreen/doc/parts/.keep
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/parts/.keep
diff --git a/demo#3/common/agl-service-homescreen/doc/parts/initialize-registercallback.svg b/demo#3/common/agl-service-homescreen/doc/parts/initialize-registercallback.svg
new file mode 100644
index 0000000..cc861db
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/parts/initialize-registercallback.svg
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="330px" preserveAspectRatio="none" style="width:436px;height:330px;" version="1.1" viewBox="0 0 436 330" width="436px" zoomAndPan="magnify"><defs><filter height="300%" id="f1rrry8f9c71eg" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><text fill="#000000" font-family="sans-serif" font-size="14" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="412" x="12" y="22.9951">Application initialization phase (ex. registerCallback)</text><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="58.5" x2="58.5" y1="81.5938" y2="273.5234"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="194.5" x2="194.5" y1="81.5938" y2="273.5234"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="335.5" x2="335.5" y1="81.5938" y2="273.5234"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="27" x="42.5" y="78.292">App</text><ellipse cx="59" cy="49.2969" fill="#FEFECE" filter="url(#f1rrry8f9c71eg)" rx="12" ry="12" style="stroke: #A80036; stroke-width: 2.0;"/><line style="stroke: #A80036; stroke-width: 2.0;" x1="47" x2="71" y1="63.2969" y2="63.2969"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="27" x="42.5" y="285.5186">App</text><ellipse cx="59" cy="304.8203" fill="#FEFECE" filter="url(#f1rrry8f9c71eg)" rx="12" ry="12" style="stroke: #A80036; stroke-width: 2.0;"/><line style="stroke: #A80036; stroke-width: 2.0;" x1="47" x2="71" y1="318.8203" y2="318.8203"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="135" x="124.5" y="78.292">HomeScreenBinder</text><ellipse cx="195" cy="49.2969" fill="#FEFECE" filter="url(#f1rrry8f9c71eg)" rx="12" ry="12" style="stroke: #A80036; stroke-width: 2.0;"/><line style="stroke: #A80036; stroke-width: 2.0;" x1="183" x2="207" y1="63.2969" y2="63.2969"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="135" x="124.5" y="285.5186">HomeScreenBinder</text><ellipse cx="195" cy="304.8203" fill="#FEFECE" filter="url(#f1rrry8f9c71eg)" rx="12" ry="12" style="stroke: #A80036; stroke-width: 2.0;"/><line style="stroke: #A80036; stroke-width: 2.0;" x1="183" x2="207" y1="318.8203" y2="318.8203"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="114" x="275.5" y="78.292">HomeScreenGUI</text><ellipse cx="335.5" cy="49.2969" fill="#FEFECE" filter="url(#f1rrry8f9c71eg)" rx="12" ry="12" style="stroke: #A80036; stroke-width: 2.0;"/><line style="stroke: #A80036; stroke-width: 2.0;" x1="323.5" x2="347.5" y1="63.2969" y2="63.2969"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="114" x="275.5" y="285.5186">HomeScreenGUI</text><ellipse cx="335.5" cy="304.8203" fill="#FEFECE" filter="url(#f1rrry8f9c71eg)" rx="12" ry="12" style="stroke: #A80036; stroke-width: 2.0;"/><line style="stroke: #A80036; stroke-width: 2.0;" x1="323.5" x2="347.5" y1="318.8203" y2="318.8203"/><polygon fill="#A80036" points="183,108.5938,193,112.5938,183,116.5938,187,112.5938" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="59" x2="189" y1="112.5938" y2="112.5938"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="99" x="66" y="107.6606">init(port, token)</text><polygon fill="#A80036" points="183,137.7266,193,141.7266,183,145.7266,187,141.7266" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="59" x2="189" y1="141.7266" y2="141.7266"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="71" x="66" y="136.7935">subscribe()</text><polygon fill="#FBFB77" filter="url(#f1rrry8f9c71eg)" points="40.5,154.8594,40.5,224.8594,345.5,224.8594,345.5,164.8594,335.5,154.8594,40.5,154.8594" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="335.5" x2="335.5" y1="154.8594" y2="164.8594"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="345.5" x2="335.5" y1="164.8594" y2="164.8594"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="284" x="46.5" y="171.9263">Register the event the App wishes to receive</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="94" x="46.5" y="187.0591">・tap_shortcut</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="145" x="46.5" y="202.1919">・on_screen_message</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="117" x="46.5" y="217.3247">・on_screen_reply</text><polygon fill="#A80036" points="183,251.3906,193,255.3906,183,259.3906,187,255.3906" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="59" x2="189" y1="255.3906" y2="255.3906"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="112" x="66" y="250.4575">registerCallback()</text><!--
+@startuml
+title Application initialization phase (ex. registerCallback)
+entity App
+entity HomeScreenBinder
+entity HomeScreenGUI
+App->HomeScreenBinder: init(port, token)
+App->HomeScreenBinder: subscribe()
+
+note over HomeScreenBinder
+ Register the event the App wishes to receive
+ ・tap_shortcut
+ ・on_screen_message
+ ・on_screen_reply
+end note
+
+App->HomeScreenBinder: registerCallback()
+@enduml
+
+PlantUML version 1.2017.18(Fri Oct 06 16:56:32 UTC 2017)
+(GPL source distribution)
+Java Runtime: Java(TM) SE Runtime Environment
+JVM: Java HotSpot(TM) 64-Bit Server VM
+Java Version: 1.7.0_25-b15
+Operating System: Linux
+Default Encoding: UTF-8
+Language: en
+Country: US
+--></g></svg> \ No newline at end of file
diff --git a/demo#3/common/agl-service-homescreen/doc/parts/initialize-set-event-handler.svg b/demo#3/common/agl-service-homescreen/doc/parts/initialize-set-event-handler.svg
new file mode 100644
index 0000000..176ec1f
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/parts/initialize-set-event-handler.svg
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="301px" preserveAspectRatio="none" style="width:452px;height:301px;" version="1.1" viewBox="0 0 452 301" width="452px" zoomAndPan="magnify"><defs><filter height="300%" id="fo5flcejoga9p" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><text fill="#000000" font-family="sans-serif" font-size="14" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="428" x="12" y="22.9951">Application initialization phase (ex. set_event_handler)</text><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="57.5" x2="57.5" y1="81.5938" y2="244.3906"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="209.5" x2="209.5" y1="81.5938" y2="244.3906"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="350.5" x2="350.5" y1="81.5938" y2="244.3906"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="27" x="41.5" y="78.292">App</text><ellipse cx="58" cy="49.2969" fill="#FEFECE" filter="url(#fo5flcejoga9p)" rx="12" ry="12" style="stroke: #A80036; stroke-width: 2.0;"/><line style="stroke: #A80036; stroke-width: 2.0;" x1="46" x2="70" y1="63.2969" y2="63.2969"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="27" x="41.5" y="256.3857">App</text><ellipse cx="58" cy="275.6875" fill="#FEFECE" filter="url(#fo5flcejoga9p)" rx="12" ry="12" style="stroke: #A80036; stroke-width: 2.0;"/><line style="stroke: #A80036; stroke-width: 2.0;" x1="46" x2="70" y1="289.6875" y2="289.6875"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="135" x="139.5" y="78.292">HomeScreenBinder</text><ellipse cx="210" cy="49.2969" fill="#FEFECE" filter="url(#fo5flcejoga9p)" rx="12" ry="12" style="stroke: #A80036; stroke-width: 2.0;"/><line style="stroke: #A80036; stroke-width: 2.0;" x1="198" x2="222" y1="63.2969" y2="63.2969"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="135" x="139.5" y="256.3857">HomeScreenBinder</text><ellipse cx="210" cy="275.6875" fill="#FEFECE" filter="url(#fo5flcejoga9p)" rx="12" ry="12" style="stroke: #A80036; stroke-width: 2.0;"/><line style="stroke: #A80036; stroke-width: 2.0;" x1="198" x2="222" y1="289.6875" y2="289.6875"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="114" x="290.5" y="78.292">HomeScreenGUI</text><ellipse cx="350.5" cy="49.2969" fill="#FEFECE" filter="url(#fo5flcejoga9p)" rx="12" ry="12" style="stroke: #A80036; stroke-width: 2.0;"/><line style="stroke: #A80036; stroke-width: 2.0;" x1="338.5" x2="362.5" y1="63.2969" y2="63.2969"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="114" x="290.5" y="256.3857">HomeScreenGUI</text><ellipse cx="350.5" cy="275.6875" fill="#FEFECE" filter="url(#fo5flcejoga9p)" rx="12" ry="12" style="stroke: #A80036; stroke-width: 2.0;"/><line style="stroke: #A80036; stroke-width: 2.0;" x1="338.5" x2="362.5" y1="289.6875" y2="289.6875"/><polygon fill="#A80036" points="198,108.5938,208,112.5938,198,116.5938,202,112.5938" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="58" x2="204" y1="112.5938" y2="112.5938"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="99" x="65" y="107.6606">init(port, token)</text><polygon fill="#A80036" points="198,137.7266,208,141.7266,198,145.7266,202,141.7266" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="58" x2="204" y1="141.7266" y2="141.7266"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="128" x="65" y="136.7935">set_event_handler()</text><polygon fill="#FBFB77" filter="url(#fo5flcejoga9p)" points="49.5,154.8594,49.5,224.8594,365.5,224.8594,365.5,164.8594,355.5,154.8594,49.5,154.8594" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="355.5" x2="355.5" y1="154.8594" y2="164.8594"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="365.5" x2="355.5" y1="164.8594" y2="164.8594"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="295" x="55.5" y="171.9263">setup event handler the App wishes to receive</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="244" x="55.5" y="187.0591">・LibHomeScreen::Event_TapShortcut</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="286" x="55.5" y="202.1919">・LibHomeScreen::Event_OnScreenMessage</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="263" x="55.5" y="217.3247">・LibHomeScreen::Event_OnScreenReply</text><!--
+@startuml
+title Application initialization phase (ex. set_event_handler)
+entity App
+entity HomeScreenBinder
+entity HomeScreenGUI
+App->HomeScreenBinder: init(port, token)
+App->HomeScreenBinder: set_event_handler()
+
+note over HomeScreenBinder
+ setup event handler the App wishes to receive
+ ・LibHomeScreen::Event_TapShortcut
+ ・LibHomeScreen::Event_OnScreenMessage
+ ・LibHomeScreen::Event_OnScreenReply
+end note
+@enduml
+
+PlantUML version 1.2017.18(Fri Oct 06 16:56:32 UTC 2017)
+(GPL source distribution)
+Java Runtime: Java(TM) SE Runtime Environment
+JVM: Java HotSpot(TM) 64-Bit Server VM
+Java Version: 1.7.0_25-b15
+Operating System: Linux
+Default Encoding: UTF-8
+Language: en
+Country: US
+--></g></svg> \ No newline at end of file
diff --git a/demo#3/common/agl-service-homescreen/doc/parts/initialize.svg b/demo#3/common/agl-service-homescreen/doc/parts/initialize.svg
new file mode 100644
index 0000000..6e66c99
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/parts/initialize.svg
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="399px" preserveAspectRatio="none" style="width:383px;height:399px;" version="1.1" viewBox="0 0 383 399" width="383px" zoomAndPan="magnify"><defs><filter height="300%" id="f1d1g4haip41mn" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><text fill="#000000" font-family="sans-serif" font-size="14" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="238" x="73.5" y="22.9951">Application initialization phase</text><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="24" x2="24" y1="81.5938" y2="341.7891"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="176" x2="176" y1="81.5938" y2="341.7891"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="317" x2="317" y1="81.5938" y2="341.7891"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="27" x="8" y="78.292">App</text><ellipse cx="24.5" cy="49.2969" fill="#FEFECE" filter="url(#f1d1g4haip41mn)" rx="12" ry="12" style="stroke: #A80036; stroke-width: 2.0;"/><line style="stroke: #A80036; stroke-width: 2.0;" x1="12.5" x2="36.5" y1="63.2969" y2="63.2969"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="27" x="8" y="353.7842">App</text><ellipse cx="24.5" cy="373.0859" fill="#FEFECE" filter="url(#f1d1g4haip41mn)" rx="12" ry="12" style="stroke: #A80036; stroke-width: 2.0;"/><line style="stroke: #A80036; stroke-width: 2.0;" x1="12.5" x2="36.5" y1="387.0859" y2="387.0859"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="135" x="106" y="78.292">HomeScreenBinder</text><ellipse cx="176.5" cy="49.2969" fill="#FEFECE" filter="url(#f1d1g4haip41mn)" rx="12" ry="12" style="stroke: #A80036; stroke-width: 2.0;"/><line style="stroke: #A80036; stroke-width: 2.0;" x1="164.5" x2="188.5" y1="63.2969" y2="63.2969"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="135" x="106" y="353.7842">HomeScreenBinder</text><ellipse cx="176.5" cy="373.0859" fill="#FEFECE" filter="url(#f1d1g4haip41mn)" rx="12" ry="12" style="stroke: #A80036; stroke-width: 2.0;"/><line style="stroke: #A80036; stroke-width: 2.0;" x1="164.5" x2="188.5" y1="387.0859" y2="387.0859"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="114" x="257" y="78.292">HomeScreenGUI</text><ellipse cx="317" cy="49.2969" fill="#FEFECE" filter="url(#f1d1g4haip41mn)" rx="12" ry="12" style="stroke: #A80036; stroke-width: 2.0;"/><line style="stroke: #A80036; stroke-width: 2.0;" x1="305" x2="329" y1="63.2969" y2="63.2969"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="114" x="257" y="353.7842">HomeScreenGUI</text><ellipse cx="317" cy="373.0859" fill="#FEFECE" filter="url(#f1d1g4haip41mn)" rx="12" ry="12" style="stroke: #A80036; stroke-width: 2.0;"/><line style="stroke: #A80036; stroke-width: 2.0;" x1="305" x2="329" y1="387.0859" y2="387.0859"/><polygon fill="#A80036" points="164.5,108.5938,174.5,112.5938,164.5,116.5938,168.5,112.5938" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="24.5" x2="170.5" y1="112.5938" y2="112.5938"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="99" x="31.5" y="107.6606">init(port, token)</text><polygon fill="#A80036" points="164.5,137.7266,174.5,141.7266,164.5,145.7266,168.5,141.7266" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="24.5" x2="170.5" y1="141.7266" y2="141.7266"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="71" x="31.5" y="136.7935">subscribe()</text><polygon fill="#FBFB77" filter="url(#f1d1g4haip41mn)" points="54,154.8594,54,194.8594,295,194.8594,295,164.8594,285,154.8594,54,154.8594" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="285" x2="285" y1="154.8594" y2="164.8594"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="295" x2="285" y1="164.8594" y2="164.8594"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="220" x="60" y="171.9263">Appが受信したいイベントを登録する</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="94" x="60" y="187.0591">・tap_shortcut</text><polygon fill="#A80036" points="164.5,221.125,174.5,225.125,164.5,229.125,168.5,225.125" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="24.5" x2="170.5" y1="225.125" y2="225.125"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="112" x="31.5" y="220.1919">registerCallback()</text><polygon fill="#A80036" points="164.5,250.2578,174.5,254.2578,164.5,258.2578,168.5,254.2578" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="24.5" x2="170.5" y1="254.2578" y2="254.2578"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="128" x="31.5" y="249.3247">set_event_handler()</text><polygon fill="#FBFB77" filter="url(#f1d1g4haip41mn)" points="31,267.3906,31,322.3906,318,322.3906,318,277.3906,308,267.3906,31,267.3906" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="308" x2="308" y1="267.3906" y2="277.3906"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="318" x2="308" y1="277.3906" y2="277.3906"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="195" x="37" y="284.4575">イベント受信のコールバック登録</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="206" x="37" y="299.5903">registerCallbackによる登録または</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="266" x="37" y="314.7231">set_event_handlerによる登録どちらかでOK</text><!--
+@startuml
+title Application initialization phase
+entity App
+entity HomeScreenBinder
+entity HomeScreenGUI
+App->HomeScreenBinder: init(port, token)
+App->HomeScreenBinder: subscribe()
+
+note over HomeScreenBinder
+ Appが受信したいイベントを登録する
+ ・tap_shortcut
+end note
+
+App->HomeScreenBinder: registerCallback()
+App->HomeScreenBinder: set_event_handler()
+
+note over HomeScreenBinder
+ イベント受信のコールバック登録
+ registerCallbackによる登録または
+ set_event_handlerによる登録どちらかでOK
+end note
+@enduml
+
+PlantUML version 1.2017.18beta10(Unknown compile time)
+(GPL source distribution)
+Java Runtime: Java(TM) SE Runtime Environment
+JVM: Java HotSpot(TM) 64-Bit Server VM
+Java Version: 1.7.0_25-b15
+Operating System: Linux
+Default Encoding: UTF-8
+Language: en
+Country: US
+--></g></svg> \ No newline at end of file
diff --git a/demo#3/common/agl-service-homescreen/doc/parts/on_screen_message.svg b/demo#3/common/agl-service-homescreen/doc/parts/on_screen_message.svg
new file mode 100644
index 0000000..66ceed3
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/parts/on_screen_message.svg
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="411px" preserveAspectRatio="none" style="width:799px;height:411px;" version="1.1" viewBox="0 0 799 411" width="799px" zoomAndPan="magnify"><defs><filter height="300%" id="f4ukdfhh6ocv4" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><text fill="#000000" font-family="sans-serif" font-size="14" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="480" x="159.5" y="22.9951">Application Callback Event On Screen Message / Reply phase</text><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="145" x2="145" y1="81.5938" y2="354.6563"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="407" x2="407" y1="81.5938" y2="354.6563"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="642.5" x2="642.5" y1="81.5938" y2="354.6563"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="27" x="129" y="78.292">App</text><ellipse cx="145.5" cy="49.2969" fill="#FEFECE" filter="url(#f4ukdfhh6ocv4)" rx="12" ry="12" style="stroke: #A80036; stroke-width: 2.0;"/><line style="stroke: #A80036; stroke-width: 2.0;" x1="133.5" x2="157.5" y1="63.2969" y2="63.2969"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="27" x="129" y="366.6514">App</text><ellipse cx="145.5" cy="385.9531" fill="#FEFECE" filter="url(#f4ukdfhh6ocv4)" rx="12" ry="12" style="stroke: #A80036; stroke-width: 2.0;"/><line style="stroke: #A80036; stroke-width: 2.0;" x1="133.5" x2="157.5" y1="399.9531" y2="399.9531"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="135" x="337" y="78.292">HomeScreenBinder</text><ellipse cx="407.5" cy="49.2969" fill="#FEFECE" filter="url(#f4ukdfhh6ocv4)" rx="12" ry="12" style="stroke: #A80036; stroke-width: 2.0;"/><line style="stroke: #A80036; stroke-width: 2.0;" x1="395.5" x2="419.5" y1="63.2969" y2="63.2969"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="135" x="337" y="366.6514">HomeScreenBinder</text><ellipse cx="407.5" cy="385.9531" fill="#FEFECE" filter="url(#f4ukdfhh6ocv4)" rx="12" ry="12" style="stroke: #A80036; stroke-width: 2.0;"/><line style="stroke: #A80036; stroke-width: 2.0;" x1="395.5" x2="419.5" y1="399.9531" y2="399.9531"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="114" x="582.5" y="78.292">HomeScreenGUI</text><ellipse cx="642.5" cy="49.2969" fill="#FEFECE" filter="url(#f4ukdfhh6ocv4)" rx="12" ry="12" style="stroke: #A80036; stroke-width: 2.0;"/><line style="stroke: #A80036; stroke-width: 2.0;" x1="630.5" x2="654.5" y1="63.2969" y2="63.2969"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="114" x="582.5" y="366.6514">HomeScreenGUI</text><ellipse cx="642.5" cy="385.9531" fill="#FEFECE" filter="url(#f4ukdfhh6ocv4)" rx="12" ry="12" style="stroke: #A80036; stroke-width: 2.0;"/><line style="stroke: #A80036; stroke-width: 2.0;" x1="630.5" x2="654.5" y1="399.9531" y2="399.9531"/><polygon fill="#A80036" points="418.5,108.5938,408.5,112.5938,418.5,116.5938,414.5,112.5938" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="412.5" x2="641.5" y1="112.5938" y2="112.5938"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="128" x="424.5" y="107.6606">set_event_handler()</text><polygon fill="#FBFB77" filter="url(#f4ukdfhh6ocv4)" points="493,125.7266,493,150.7266,787,150.7266,787,135.7266,777,125.7266,493,125.7266" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="777" x2="777" y1="125.7266" y2="135.7266"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="787" x2="777" y1="135.7266" y2="135.7266"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="273" x="499" y="142.7935">LibHomeScreen::Event_OnScreenMessage</text><polygon fill="#A80036" points="395.5,176.8594,405.5,180.8594,395.5,184.8594,399.5,180.8594" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="145.5" x2="401.5" y1="180.8594" y2="180.8594"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="128" x="152.5" y="175.9263">set_event_handler()</text><polygon fill="#FBFB77" filter="url(#f4ukdfhh6ocv4)" points="8,193.9922,8,218.9922,279,218.9922,279,203.9922,269,193.9922,8,193.9922" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="269" x2="269" y1="193.9922" y2="203.9922"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="279" x2="269" y1="203.9922" y2="203.9922"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="250" x="14" y="211.0591">LibHomeScreen::Event_OnScreenReply</text><polygon fill="#A80036" points="395.5,245.125,405.5,249.125,395.5,253.125,399.5,249.125" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="145.5" x2="401.5" y1="249.125" y2="249.125"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="238" x="152.5" y="244.1919">onScreenMessage(display_message)</text><polygon fill="#A80036" points="630.5,274.2578,640.5,278.2578,630.5,282.2578,634.5,278.2578" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="407.5" x2="636.5" y1="278.2578" y2="278.2578"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="211" x="414.5" y="273.3247">event_handler(display_message)</text><polygon fill="#A80036" points="418.5,303.3906,408.5,307.3906,418.5,311.3906,414.5,307.3906" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="412.5" x2="641.5" y1="307.3906" y2="307.3906"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="202" x="424.5" y="302.4575">onScreenReply(reply_message)</text><polygon fill="#A80036" points="156.5,332.5234,146.5,336.5234,156.5,340.5234,152.5,336.5234" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="150.5" x2="406.5" y1="336.5234" y2="336.5234"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="198" x="162.5" y="331.5903">event_handler(reply_message)</text><!--
+@startuml
+title Application Callback Event On Screen Message / Reply phase
+entity App
+entity HomeScreenBinder
+entity HomeScreenGUI
+
+HomeScreenGUI->HomeScreenBinder: set_event_handler()
+
+note over HomeScreenGUI
+ LibHomeScreen::Event_OnScreenMessage
+end note
+
+
+App->HomeScreenBinder: set_event_handler()
+
+note over App
+ LibHomeScreen::Event_OnScreenReply
+end note
+
+App->HomeScreenBinder: onScreenMessage(display_message)
+HomeScreenBinder->HomeScreenGUI: event_handler(display_message)
+HomeScreenGUI->HomeScreenBinder: onScreenReply(reply_message)
+HomeScreenBinder->App: event_handler(reply_message)
+@enduml
+
+PlantUML version 1.2017.18(Fri Oct 06 16:56:32 UTC 2017)
+(GPL source distribution)
+Java Runtime: Java(TM) SE Runtime Environment
+JVM: Java HotSpot(TM) 64-Bit Server VM
+Java Version: 1.7.0_25-b15
+Operating System: Linux
+Default Encoding: UTF-8
+Language: en
+Country: US
+--></g></svg> \ No newline at end of file
diff --git a/demo#3/common/agl-service-homescreen/doc/parts/software-stack.png b/demo#3/common/agl-service-homescreen/doc/parts/software-stack.png
new file mode 100644
index 0000000..e449868
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/parts/software-stack.png
Binary files differ
diff --git a/demo#3/common/agl-service-homescreen/doc/parts/tap_shortcut.svg b/demo#3/common/agl-service-homescreen/doc/parts/tap_shortcut.svg
new file mode 100644
index 0000000..d454164
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/doc/parts/tap_shortcut.svg
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="285px" preserveAspectRatio="none" style="width:662px;height:285px;" version="1.1" viewBox="0 0 662 285" width="662px" zoomAndPan="magnify"><defs><filter height="300%" id="fijzwybejitm5" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><text fill="#000000" font-family="sans-serif" font-size="14" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="361" x="151.75" y="22.9951">Application Callback Event TapShortcut phase</text><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="135" x2="135" y1="81.5938" y2="228.125"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="373" x2="373" y1="81.5938" y2="228.125"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="596.5" x2="596.5" y1="81.5938" y2="228.125"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="27" x="119" y="78.292">App</text><ellipse cx="135.5" cy="49.2969" fill="#FEFECE" filter="url(#fijzwybejitm5)" rx="12" ry="12" style="stroke: #A80036; stroke-width: 2.0;"/><line style="stroke: #A80036; stroke-width: 2.0;" x1="123.5" x2="147.5" y1="63.2969" y2="63.2969"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="27" x="119" y="240.1201">App</text><ellipse cx="135.5" cy="259.4219" fill="#FEFECE" filter="url(#fijzwybejitm5)" rx="12" ry="12" style="stroke: #A80036; stroke-width: 2.0;"/><line style="stroke: #A80036; stroke-width: 2.0;" x1="123.5" x2="147.5" y1="273.4219" y2="273.4219"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="135" x="303" y="78.292">HomeScreenBinder</text><ellipse cx="373.5" cy="49.2969" fill="#FEFECE" filter="url(#fijzwybejitm5)" rx="12" ry="12" style="stroke: #A80036; stroke-width: 2.0;"/><line style="stroke: #A80036; stroke-width: 2.0;" x1="361.5" x2="385.5" y1="63.2969" y2="63.2969"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="135" x="303" y="240.1201">HomeScreenBinder</text><ellipse cx="373.5" cy="259.4219" fill="#FEFECE" filter="url(#fijzwybejitm5)" rx="12" ry="12" style="stroke: #A80036; stroke-width: 2.0;"/><line style="stroke: #A80036; stroke-width: 2.0;" x1="361.5" x2="385.5" y1="273.4219" y2="273.4219"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="114" x="536.5" y="78.292">HomeScreenGUI</text><ellipse cx="596.5" cy="49.2969" fill="#FEFECE" filter="url(#fijzwybejitm5)" rx="12" ry="12" style="stroke: #A80036; stroke-width: 2.0;"/><line style="stroke: #A80036; stroke-width: 2.0;" x1="584.5" x2="608.5" y1="63.2969" y2="63.2969"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="114" x="536.5" y="240.1201">HomeScreenGUI</text><ellipse cx="596.5" cy="259.4219" fill="#FEFECE" filter="url(#fijzwybejitm5)" rx="12" ry="12" style="stroke: #A80036; stroke-width: 2.0;"/><line style="stroke: #A80036; stroke-width: 2.0;" x1="584.5" x2="608.5" y1="273.4219" y2="273.4219"/><polygon fill="#A80036" points="361.5,108.5938,371.5,112.5938,361.5,116.5938,365.5,112.5938" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="135.5" x2="367.5" y1="112.5938" y2="112.5938"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="128" x="142.5" y="107.6606">set_event_handler()</text><polygon fill="#FBFB77" filter="url(#fijzwybejitm5)" points="8,125.7266,8,150.7266,260,150.7266,260,135.7266,250,125.7266,8,125.7266" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="250" x2="250" y1="125.7266" y2="135.7266"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="260" x2="250" y1="135.7266" y2="135.7266"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="231" x="14" y="142.7935">LibHomeScreen::Event_TapShortcut</text><polygon fill="#A80036" points="384.5,176.8594,374.5,180.8594,384.5,184.8594,380.5,180.8594" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="378.5" x2="595.5" y1="180.8594" y2="180.8594"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="199" x="390.5" y="175.9263">tapShortcut(application_name)</text><polygon fill="#A80036" points="146.5,205.9922,136.5,209.9922,146.5,213.9922,142.5,209.9922" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="140.5" x2="372.5" y1="209.9922" y2="209.9922"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="214" x="152.5" y="205.0591">event_handler(application_name)</text><!--
+@startuml
+title Application Callback Event TapShortcut phase
+entity App
+entity HomeScreenBinder
+entity HomeScreenGUI
+App->HomeScreenBinder: set_event_handler()
+
+note over App
+ LibHomeScreen::Event_TapShortcut
+end note
+
+HomeScreenGUI->HomeScreenBinder: tapShortcut(application_name)
+HomeScreenBinder->App: event_handler(application_name)
+@enduml
+
+PlantUML version 1.2017.18(Fri Oct 06 16:56:32 UTC 2017)
+(GPL source distribution)
+Java Runtime: Java(TM) SE Runtime Environment
+JVM: Java HotSpot(TM) 64-Bit Server VM
+Java Version: 1.7.0_25-b15
+Operating System: Linux
+Default Encoding: UTF-8
+Language: en
+Country: US
+--></g></svg> \ No newline at end of file
diff --git a/demo#3/common/agl-service-homescreen/package/root/config.xml b/demo#3/common/agl-service-homescreen/package/root/config.xml
new file mode 100644
index 0000000..89703b2
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/package/root/config.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<widget xmlns="http://www.w3.org/ns/widgets" id="homescreen-service-2017" version="0.1">
+ <name>homescreen-service-2017</name>
+ <icon src="icon.svg"/>
+ <content src="config.xml" type="application/vnd.agl.service"/>
+ <description>HomeScreen Binding service</description>
+ <author>TOYOTA</author>
+ <license>APL 2.0</license>
+ <feature name="urn:AGL:widget:required-permission">
+ <param name="urn:AGL:permission::public:hidden" value="required" />
+ <param name="urn:AGL:permission::system:run-by-default" value="required" />
+ <param name="http://tizen.org/privilege/internal/dbus" value="required" />
+ </feature>
+ <feature name="urn:AGL:widget:provided-api">
+ <param name="homescreen" value="ws" />
+ </feature>
+ <feature name="urn:AGL:widget:required-binding">
+ <param name="lib/homescreen-service.so" value="local" />
+ </feature>
+</widget>
diff --git a/demo#3/common/agl-service-homescreen/package/root/icon.svg b/demo#3/common/agl-service-homescreen/package/root/icon.svg
new file mode 100644
index 0000000..6628784
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/package/root/icon.svg
@@ -0,0 +1,283 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Generator: Adobe Illustrator 21.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+
+<svg
+ xmlns:i="&amp;ns_ai;"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ version="1.1"
+ x="0px"
+ y="0px"
+ viewBox="0 0 320 320"
+ style="enable-background:new 0 0 320 320;"
+ xml:space="preserve"
+ id="svg2"
+ inkscape:version="0.91 r13725"
+ sodipodi:docname="icon.svg"><metadata
+ id="metadata1292"><rdf:RDF><cc:Work
+ rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
+ id="defs1290" /><sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="2560"
+ inkscape:window-height="1464"
+ id="namedview1288"
+ showgrid="false"
+ inkscape:zoom="0.7375"
+ inkscape:cx="-697.62712"
+ inkscape:cy="160"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg2" /><style
+ type="text/css"
+ id="style4">
+ .st0{display:none;}
+ .st1{display:inline;}
+ .st2{opacity:0.4;fill:url(#SVGID_1_);}
+ .st3{fill:url(#SVGID_2_);}
+ .st4{fill:#FFFFFF;}
+ .st5{font-family:'Roboto-Regular';}
+ .st6{font-size:25px;}
+ .st7{letter-spacing:6;}
+ .st8{fill:url(#SVGID_3_);}
+ .st9{fill:url(#SVGID_4_);}
+ .st10{fill:url(#SVGID_5_);}
+ .st11{fill:url(#SVGID_6_);}
+ .st12{fill:url(#SVGID_7_);}
+ .st13{fill:url(#SVGID_8_);}
+ .st14{fill:url(#SVGID_9_);}
+ .st15{fill:url(#SVGID_10_);}
+ .st16{fill:url(#SVGID_11_);}
+ .st17{fill:url(#SVGID_12_);}
+ .st18{fill:url(#SVGID_13_);}
+ .st19{fill:url(#SVGID_14_);}
+ .st20{fill:url(#SVGID_15_);}
+ .st21{fill:url(#SVGID_16_);}
+ .st22{fill:url(#SVGID_17_);}
+ .st23{fill:url(#SVGID_18_);}
+ .st24{opacity:0.29;}
+ .st25{fill:url(#SVGID_19_);}
+ .st26{fill:url(#SVGID_20_);}
+ .st27{fill:url(#SVGID_21_);}
+ .st28{fill:url(#SVGID_22_);}
+ .st29{fill:url(#SVGID_23_);}
+ .st30{fill:url(#SVGID_24_);}
+ .st31{fill:url(#SVGID_25_);}
+ .st32{fill:url(#SVGID_26_);}
+ .st33{fill:url(#SVGID_27_);}
+ .st34{fill:url(#SVGID_28_);}
+ .st35{fill:url(#SVGID_29_);}
+ .st36{fill:url(#SVGID_30_);}
+ .st37{fill:url(#SVGID_31_);}
+ .st38{fill:url(#SVGID_32_);}
+ .st39{fill:url(#SVGID_33_);}
+ .st40{fill:url(#SVGID_34_);}
+ .st41{fill:url(#SVGID_35_);}
+ .st42{fill:url(#SVGID_36_);}
+ .st43{opacity:0.4;fill:url(#SVGID_37_);}
+ .st44{fill:url(#SVGID_38_);}
+ .st45{fill:url(#SVGID_39_);}
+ .st46{fill:url(#SVGID_40_);}
+ .st47{fill:url(#SVGID_41_);}
+ .st48{fill:url(#SVGID_42_);}
+ .st49{fill:url(#SVGID_43_);}
+ .st50{fill:url(#SVGID_44_);}
+ .st51{display:inline;opacity:0.29;}
+ .st52{display:inline;fill:url(#SVGID_45_);}
+ .st53{display:inline;fill:url(#SVGID_46_);}
+ .st54{display:inline;fill:#FFFFFF;}
+ .st55{display:inline;fill:url(#SVGID_47_);}
+ .st56{display:inline;fill:url(#SVGID_48_);}
+ .st57{display:inline;fill:url(#SVGID_49_);}
+ .st58{display:inline;fill:url(#SVGID_50_);}
+ .st59{display:inline;fill:url(#SVGID_51_);}
+ .st60{display:inline;fill:url(#SVGID_52_);}
+ .st61{opacity:0.4;fill:url(#SVGID_53_);}
+ .st62{fill:url(#SVGID_54_);}
+ .st63{fill:url(#SVGID_55_);}
+ .st64{fill:url(#SVGID_56_);}
+ .st65{fill:url(#SVGID_57_);}
+ .st66{fill:url(#SVGID_58_);}
+ .st67{opacity:0.4;fill:url(#SVGID_59_);}
+ .st68{fill:url(#SVGID_60_);}
+ .st69{fill:url(#SVGID_61_);}
+ .st70{fill:url(#SVGID_62_);}
+ .st71{fill:url(#SVGID_63_);}
+ .st72{fill:url(#SVGID_64_);}
+ .st73{fill:url(#SVGID_65_);}
+ .st74{fill:url(#SVGID_66_);}
+ .st75{fill:url(#SVGID_67_);}
+ .st76{fill:url(#SVGID_68_);}
+ .st77{fill:url(#SVGID_69_);}
+ .st78{fill:url(#SVGID_70_);}
+ .st79{fill:url(#SVGID_71_);}
+ .st80{fill:url(#SVGID_72_);}
+ .st81{fill:url(#SVGID_73_);}
+ .st82{fill:url(#SVGID_74_);}
+ .st83{fill:url(#SVGID_75_);}
+ .st84{fill:url(#SVGID_76_);}
+ .st85{fill:url(#SVGID_77_);}
+ .st86{fill:url(#SVGID_78_);}
+ .st87{fill:url(#SVGID_79_);}
+ .st88{fill:url(#SVGID_80_);}
+ .st89{fill:url(#SVGID_81_);}
+ .st90{fill:url(#SVGID_82_);}
+ .st91{fill:url(#SVGID_83_);}
+ .st92{fill:url(#SVGID_84_);}
+ .st93{fill:url(#SVGID_85_);}
+ .st94{fill:url(#SVGID_86_);}
+ .st95{opacity:0.4;fill:url(#SVGID_87_);}
+ .st96{fill:url(#SVGID_88_);}
+ .st97{fill:url(#SVGID_89_);}
+ .st98{fill:url(#SVGID_90_);}
+ .st99{display:inline;fill:url(#SVGID_91_);}
+ .st100{display:inline;fill:url(#SVGID_92_);}
+ .st101{fill:url(#SVGID_93_);}
+ .st102{fill:url(#SVGID_94_);}
+ .st103{opacity:0.4;fill:url(#SVGID_95_);}
+ .st104{fill:url(#SVGID_96_);}
+ .st105{fill:url(#SVGID_97_);}
+ .st106{fill:url(#SVGID_98_);}
+ .st107{fill:url(#SVGID_99_);}
+ .st108{fill:url(#SVGID_100_);}
+ .st109{fill:url(#SVGID_101_);}
+ .st110{display:inline;fill:url(#SVGID_102_);}
+ .st111{display:inline;fill:url(#SVGID_103_);}
+ .st112{fill:url(#SVGID_104_);}
+ .st113{fill:url(#SVGID_105_);}
+ .st114{fill:url(#SVGID_106_);}
+ .st115{fill:url(#SVGID_107_);}
+ .st116{fill:url(#SVGID_108_);}
+ .st117{opacity:0.4;fill:url(#SVGID_109_);}
+ .st118{fill:url(#SVGID_110_);}
+ .st119{fill:url(#SVGID_111_);}
+ .st120{fill:url(#SVGID_112_);}
+ .st121{fill:url(#SVGID_113_);}
+ .st122{fill:url(#SVGID_114_);}
+ .st123{opacity:0.4;fill:url(#SVGID_115_);}
+ .st124{fill:url(#SVGID_116_);}
+ .st125{fill:url(#SVGID_117_);}
+ .st126{fill:url(#SVGID_118_);}
+ .st127{fill:url(#SVGID_119_);}
+ .st128{fill:url(#SVGID_120_);}
+ .st129{fill:url(#SVGID_121_);}
+ .st130{fill:url(#SVGID_122_);}
+</style><switch
+ id="switch6"><g
+ i:extraneous="self"
+ id="g8"><g
+ id="Settings_Active"><circle
+ class="st24"
+ cx="159.7"
+ cy="133.4"
+ r="101.9"
+ id="circle1230" /><linearGradient
+ id="SVGID_119_"
+ gradientUnits="userSpaceOnUse"
+ x1="115.9317"
+ y1="254.1836"
+ x2="256.3852"
+ y2="-133.5267"><stop
+ offset="0"
+ style="stop-color:#8BC53F"
+ id="stop1233" /><stop
+ offset="2.015080e-02"
+ style="stop-color:#7CCB56;stop-opacity:0.9678"
+ id="stop1235" /><stop
+ offset="6.089833e-02"
+ style="stop-color:#62D67D;stop-opacity:0.9028"
+ id="stop1237" /><stop
+ offset="0.1057"
+ style="stop-color:#4BDFA0;stop-opacity:0.8312"
+ id="stop1239" /><stop
+ offset="0.1543"
+ style="stop-color:#38E7BE;stop-opacity:0.7537"
+ id="stop1241" /><stop
+ offset="0.2077"
+ style="stop-color:#28EED6;stop-opacity:0.6684"
+ id="stop1243" /><stop
+ offset="0.2681"
+ style="stop-color:#1CF3E8;stop-opacity:0.572"
+ id="stop1245" /><stop
+ offset="0.3394"
+ style="stop-color:#13F6F5;stop-opacity:0.4581"
+ id="stop1247" /><stop
+ offset="0.4323"
+ style="stop-color:#0EF8FD;stop-opacity:0.3098"
+ id="stop1249" /><stop
+ offset="0.6264"
+ style="stop-color:#0DF9FF;stop-opacity:0"
+ id="stop1251" /></linearGradient><circle
+ class="st127"
+ cx="159.7"
+ cy="133.4"
+ r="101.9"
+ id="circle1253" /><linearGradient
+ id="SVGID_120_"
+ gradientUnits="userSpaceOnUse"
+ x1="4.0481"
+ y1="287.9492"
+ x2="320.4859"
+ y2="-15.4029"
+ gradientTransform="matrix(1 5.464556e-03 -5.464556e-03 1 -2.0192 -3.0212)"><stop
+ offset="0"
+ style="stop-color:#59FF7F"
+ id="stop1256" /><stop
+ offset="1"
+ style="stop-color:#6BFBFF"
+ id="stop1258" /></linearGradient><path
+ class="st128"
+ d="M160,238.8c-0.2,0-0.4,0-0.6,0c-58-0.3-104.9-47.7-104.6-105.7C55.2,75.3,102.3,28.5,160,28.5 c0.2,0,0.4,0,0.6,0c58,0.3,104.9,47.7,104.6,105.7l0,0C264.8,192,217.7,238.8,160,238.8z M160,32.2 c-55.7,0-101.2,45.2-101.5,100.9c-0.3,55.9,45,101.7,100.9,102c0.2,0,0.4,0,0.6,0c55.7,0,101.2-45.2,101.5-100.9 c0.3-55.9-45-101.7-100.9-102C160.4,32.2,160.2,32.2,160,32.2z"
+ id="path1260" /><g
+ id="g1262"><text
+ transform="matrix(1 0 0 1 75.4379 284.7129)"
+ class="st4 st5 st6 st7"
+ id="text1264">SETTINGS</text>
+<g
+ id="g1266"><g
+ id="g1268"><g
+ id="g1270"><linearGradient
+ id="SVGID_121_"
+ gradientUnits="userSpaceOnUse"
+ x1="79.1804"
+ y1="226.0817"
+ x2="282.752"
+ y2="-4.8609"><stop
+ offset="0"
+ style="stop-color:#59FF7F"
+ id="stop1273" /><stop
+ offset="1"
+ style="stop-color:#6BFBFF"
+ id="stop1275" /></linearGradient><path
+ class="st129"
+ d="M159.9,163.9c-16.3,0-29.5-13.2-29.5-29.4s13.2-29.4,29.5-29.4v3.9c-14.1,0-25.5,11.4-25.5,25.5 c0,14,11.5,25.5,25.5,25.5c14.1,0,25.6-11.4,25.6-25.5h3.9C189.4,150.7,176.2,163.9,159.9,163.9z"
+ id="path1277" /></g><g
+ id="g1279"><linearGradient
+ id="SVGID_122_"
+ gradientUnits="userSpaceOnUse"
+ x1="79.2457"
+ y1="226.1393"
+ x2="282.8174"
+ y2="-4.8033"><stop
+ offset="0"
+ style="stop-color:#59FF7F"
+ id="stop1282" /><stop
+ offset="1"
+ style="stop-color:#6BFBFF"
+ id="stop1284" /></linearGradient><path
+ class="st130"
+ d="M171.7,197.4h-23.4c-2.2,0-4-1.8-4-3.9V181c-2-0.7-4-1.5-6-2.5l-8.8,8.8c-1.5,1.5-4,1.5-5.6-0.1 l-16.6-16.6c-1.6-1.6-1.6-4.1-0.1-5.6l8.7-8.7c-1-2-1.8-4-2.5-6.1h-12.3c-2.2,0-3.9-1.8-3.9-4v-23.4c0-2.2,1.8-4,3.9-4h12.3 c0.9-2.6,1.9-5.1,3.2-7.4l3.5,1.8c-1.4,2.6-2.5,5.3-3.4,8.1l-0.4,1.4h-15.2l0,23.5l15.2,0.1l0.4,1.4c0.9,2.8,2,5.5,3.4,8 l0.7,1.3L110,167.8l16.6,16.6l10.9-10.8l1.3,0.7c2.6,1.4,5.2,2.5,8,3.3l1.4,0.4v15.4l23.5,0l0.1-15.4l1.4-0.4 c2.7-0.8,5.4-1.9,7.9-3.3l1.3-0.7l10.9,10.9l16.6-16.6l-10.8-11l0.7-1.3c1.4-2.6,2.5-5.2,3.3-7.9l0.4-1.4h15.4l0-23.5 l-15.3-0.1l-0.4-1.4c-0.8-2.8-1.9-5.5-3.3-8l-0.7-1.3l10.8-10.8l-16.6-16.6l-10.8,10.7l-1.3-0.7c-2.6-1.4-5.3-2.5-8.1-3.4 l-1.4-0.4V75.6l-23.5,0l-0.1,15.1l-1.4,0.4c-2.8,0.9-5.6,2-8.1,3.4l-1.3,0.7l-10.7-10.7L107.2,104c-1.5-1.5-1.5-4,0.1-5.6 l16.5-16.5c0.8-0.8,1.8-1.3,2.9-1.2c1,0,2,0.4,2.7,1.1l8.7,8.6c2-1,4-1.8,6.2-2.5V75.6c0-2.2,1.8-3.9,4-3.9h23.4 c2.2,0,4,1.8,4,3.9v12.3c2.1,0.7,4.1,1.6,6.1,2.5l8.7-8.7c0.7-0.7,1.7-1.1,2.7-1.1h0c1.1,0,2.1,0.4,2.9,1.2l16.6,16.6 c0.8,0.8,1.2,1.8,1.2,2.9c0,1-0.4,2-1.1,2.7l-8.8,8.8c1,2,1.8,4,2.5,6h12.4c2.2,0,3.9,1.8,3.9,4v23.4c0,2.2-1.8,4-3.9,4 h-12.5c-0.7,2-1.5,4-2.5,6l8.9,8.9c1.5,1.5,1.5,4-0.1,5.6l-16.6,16.6c-0.8,0.8-1.8,1.2-2.9,1.2h0c-1,0-2-0.4-2.7-1.1 l-8.9-8.9c-1.9,1-3.9,1.8-5.9,2.5v12.5C175.7,195.6,173.9,197.4,171.7,197.4z"
+ id="path1286" /></g></g></g></g></g></g></switch></svg> \ No newline at end of file
diff --git a/demo#3/common/agl-service-homescreen/src/CMakeLists.txt b/demo#3/common/agl-service-homescreen/src/CMakeLists.txt
new file mode 100644
index 0000000..bf8b33f
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/src/CMakeLists.txt
@@ -0,0 +1,69 @@
+#
+# Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+cmake_minimum_required(VERSION 2.8)
+
+set(TARGETS_HSBINDER homescreen-service)
+
+INCLUDE(FindThreads)
+FIND_PACKAGE(Threads)
+
+pkg_check_modules(hs_binding_depends afb-daemon glib-2.0 gio-2.0 gio-unix-2.0 json-c)
+set(binding_hs_sources
+ homescreen.cpp
+ hs-helper.cpp
+ hs-clientmanager.cpp
+ hs-client.cpp)
+
+link_libraries(-Wl,--as-needed -Wl,--gc-sections -Wl,--no-undefined)
+include_directories(${PROJECT_SOURCE_DIR}/include)
+add_library(${TARGETS_HSBINDER} MODULE ${binding_hs_sources})
+
+target_compile_options(${TARGETS_HSBINDER} PRIVATE ${hs_binding_depends_CFLAGS})
+if(DEFINED DEBUGMODE)
+ target_compile_options(${TARGETS_HSBINDER} PRIVATE -g -O0)
+else(DEFINED DEBUGMODE)
+ target_compile_options(${TARGETS_HSBINDER} PRIVATE -g -O2)
+endif(DEFINED DEBUGMODE)
+
+target_include_directories(${TARGETS_HSBINDER} PRIVATE ${hs_binding_depends_INCLUDE_DIRS})
+target_link_libraries(${TARGETS_HSBINDER} ${CMAKE_THREAD_LIBS_INIT} ${link_libraries} ${hs_binding_depends_LIBRARIES})
+
+# Binder exposes a unique public entry point
+
+set_target_properties(${TARGETS_HSBINDER} PROPERTIES
+ PREFIX ""
+ LINK_FLAGS "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/export.map"
+ )
+
+# installation directory
+#INSTALL(TARGETS ${TARGETS_HSBINDER}
+# LIBRARY DESTINATION ${binding_install_dir})
+
+if(NOT EXISTS ${PROJECT_BINARY_DIR}/package)
+ add_custom_command(TARGET ${TARGETS_HSBINDER} POST_BUILD
+ COMMAND cp -rf ${PROJECT_SOURCE_DIR}/package ${PROJECT_BINARY_DIR}
+ )
+endif()
+
+add_custom_command(TARGET ${TARGETS_HSBINDER} POST_BUILD
+ COMMAND mkdir -p ${PROJECT_BINARY_DIR}/package/root/lib
+ COMMAND cp -rf ${PROJECT_BINARY_DIR}/src/${TARGETS_HSBINDER}.so ${PROJECT_BINARY_DIR}/package/root/lib
+)
+
+add_custom_target(package DEPENDS ${PROJECT_BINARY_DIR}/package/root
+ COMMAND wgtpkg-pack -f -o ${PROJECT_BINARY_DIR}/package/${TARGETS_HSBINDER}-2017.wgt ${PROJECT_BINARY_DIR}/package/root
+)
diff --git a/demo#3/common/agl-service-homescreen/src/export.map b/demo#3/common/agl-service-homescreen/src/export.map
new file mode 100644
index 0000000..f3961c0
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/src/export.map
@@ -0,0 +1 @@
+{ global: afbBindingV*; local: *; }; \ No newline at end of file
diff --git a/demo#3/common/agl-service-homescreen/src/hmi-debug.h b/demo#3/common/agl-service-homescreen/src/hmi-debug.h
new file mode 100644
index 0000000..3c71ff5
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/src/hmi-debug.h
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __HMI_DEBUG_H__
+#define __HMI_DEBUG_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <time.h>
+#include <stdio.h>
+#include <stdarg.h>
+#include <string.h>
+#include <stdlib.h>
+
+enum LOG_LEVEL{
+ LOG_LEVEL_NONE = 0,
+ LOG_LEVEL_ERROR,
+ LOG_LEVEL_WARNING,
+ LOG_LEVEL_NOTICE,
+ LOG_LEVEL_INFO,
+ LOG_LEVEL_DEBUG,
+ LOG_LEVEL_MAX = LOG_LEVEL_DEBUG
+};
+
+#define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__)
+
+#define HMI_ERROR(prefix, args,...) _HMI_LOG(LOG_LEVEL_ERROR, __FILENAME__, __FUNCTION__, __LINE__, prefix, args, ##__VA_ARGS__)
+#define HMI_WARNING(prefix, args,...) _HMI_LOG(LOG_LEVEL_WARNING, __FILENAME__, __FUNCTION__,__LINE__, prefix, args,##__VA_ARGS__)
+#define HMI_NOTICE(prefix, args,...) _HMI_LOG(LOG_LEVEL_NOTICE, __FILENAME__, __FUNCTION__,__LINE__, prefix, args,##__VA_ARGS__)
+#define HMI_INFO(prefix, args,...) _HMI_LOG(LOG_LEVEL_INFO, __FILENAME__, __FUNCTION__,__LINE__, prefix, args,##__VA_ARGS__)
+#define HMI_DEBUG(prefix, args,...) _HMI_LOG(LOG_LEVEL_DEBUG, __FILENAME__, __FUNCTION__,__LINE__, prefix, args,##__VA_ARGS__)
+
+static char ERROR_FLAG[6][20] = {"NONE", "ERROR", "WARNING", "NOTICE", "INFO", "DEBUG"};
+
+static void _HMI_LOG(enum LOG_LEVEL level, const char* file, const char* func, const int line, const char* prefix, const char* log, ...)
+{
+ const int log_level = (getenv("USE_HMI_DEBUG") == NULL)?LOG_LEVEL_ERROR:atoi(getenv("USE_HMI_DEBUG"));
+ if(log_level < level)
+ {
+ return;
+ }
+
+ char *message;
+ struct timespec tp;
+ unsigned int time;
+
+ clock_gettime(CLOCK_REALTIME, &tp);
+ time = (tp.tv_sec * 1000000L) + (tp.tv_nsec / 1000);
+
+ va_list args;
+ va_start(args, log);
+ if (log == NULL || vasprintf(&message, log, args) < 0)
+ message = NULL;
+ fprintf(stderr, "[%10.3f] [%s %s] [%s, %s(), Line:%d] >>> %s \n", time / 1000.0, prefix, ERROR_FLAG[level], file, func, line, message);
+ va_end(args);
+ free(message);
+}
+
+#ifdef __cplusplus
+}
+#endif
+#endif //__HMI_DEBUG_H__ \ No newline at end of file
diff --git a/demo#3/common/agl-service-homescreen/src/homescreen.cpp b/demo#3/common/agl-service-homescreen/src/homescreen.cpp
new file mode 100644
index 0000000..db739ee
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/src/homescreen.cpp
@@ -0,0 +1,449 @@
+/*
+ * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+#include <memory>
+#include <algorithm>
+#include "hs-helper.h"
+#include "hmi-debug.h"
+#include "hs-clientmanager.h"
+
+#define EVENT_SUBSCRIBE_ERROR_CODE 100
+
+const char _error[] = "error";
+const char _application_name[] = "application_name";
+const char _display_message[] = "display_message";
+const char _reply_message[] = "reply_message";
+const char _args[] = "args";
+const char _parameter[] = "parameter";
+
+static HS_ClientManager* g_client_manager = HS_ClientManager::instance();
+
+static std::unordered_map<std::string, HS_Client*> g_client_map;
+
+/*
+********** Method of HomeScreen Service (API) **********
+*/
+
+static void pingSample(struct afb_req request)
+{
+ static int pingcount = 0;
+ afb_req_success_f(request, json_object_new_int(pingcount), "Ping count = %d", pingcount);
+ HMI_NOTICE("homescreen-service","Verbosity macro at level notice invoked at ping invocation count = %d", pingcount);
+ pingcount++;
+}
+
+/**
+ * tap_shortcut notify for homescreen
+ * When Shortcut area is tapped, notify these applciations
+ *
+ * #### Parameters
+ * Request key
+ * - application_name : application name
+ *
+ * #### Return
+ * None
+ *
+ */
+static void tap_shortcut (struct afb_req request)
+{
+ HMI_NOTICE("homescreen-service","called.");
+
+ int ret = 0;
+ const char* value = afb_req_value(request, _application_name);
+ if (value) {
+ HMI_NOTICE("homescreen-service","request params = %s.", value);
+ // first step get appid from appname, next step change appname to appid
+ std::string appid(value);
+ std::transform(appid.begin(), appid.end(), appid.begin(), ::tolower);
+ HS_Client* client = g_client_manager->find(appid);
+ if(client != nullptr) {
+ if(client->tap_shortcut(value) != 0) {
+ afb_req_fail_f(request, "afb_event_push failed", "called %s.", __FUNCTION__);
+ return;
+ }
+ }
+ else {
+ // app is not started, do nothing
+ }
+ } else {
+ afb_req_fail_f(request, "failed", "called %s, Unknown palameter", __FUNCTION__);
+ return;
+ }
+
+ // response to HomeScreen
+ struct json_object *res = json_object_new_object();
+ hs_add_object_to_json_object_func(res, __FUNCTION__, 2,
+ _error, ret);
+ afb_req_success(request, res, "afb_event_push event [tap_shortcut]");
+}
+
+/**
+ * showWindow event
+ *
+ * #### Parameters
+ * - id : app's id
+ * - parameter : parameter from app to new window
+ *
+ * #### Return
+ * None
+ *
+ */
+static void showWindow(struct afb_req request)
+{
+ HMI_NOTICE("homescreen-service","called.");
+
+ int ret = 0;
+ const char* value = afb_req_value(request, _application_name);
+ if (value) {
+ HMI_NOTICE("homescreen-service","request params = %s.", value);
+ // first step get appid from appname, next step change appname to appid
+ std::string appid(value);
+ std::transform(appid.begin(), appid.end(), appid.begin(), ::tolower);
+ HS_Client* client = g_client_manager->find(appid);
+ if(client != nullptr) {
+ if(client->showWindow(request, value) != 0) {
+ afb_req_fail_f(request, "afb_event_push failed", "called %s.", __FUNCTION__);
+ return;
+ }
+ }
+ else {
+ // app is not started, do nothing
+ }
+ } else {
+ afb_req_fail_f(request, "failed", "called %s, Unknown palameter", __FUNCTION__);
+ return;
+ }
+
+ // response to HomeScreen
+ struct json_object *res = json_object_new_object();
+ hs_add_object_to_json_object_func(res, __FUNCTION__, 2,
+ _error, ret);
+ afb_req_success(request, res, "afb_event_push event [showWindow]");
+}
+
+/**
+ * HomeScreen OnScreen message
+ *
+ * #### Parameters
+ * Request key
+ * - display_message : message for display
+ *
+ * #### Return
+ * None
+ *
+ */
+static void on_screen_message (struct afb_req request)
+{
+ HMI_NOTICE("homescreen-service","called.");
+
+ int ret = 0;
+ const char* value = afb_req_value(request, _display_message);
+ if (value) {
+
+ HMI_NOTICE("homescreen-service","request params = %s.", value);
+ for(auto m : g_client_manager->getAllClient()) {
+ if(m->on_screen_message(request, value) != 0) {
+ afb_req_fail_f(request, "afb_event_push failed", "called %s.", __FUNCTION__);
+ return;
+ }
+ }
+ } else {
+ afb_req_fail_f(request, "failed", "called %s, Unknown palameter", __FUNCTION__);
+ return;
+ }
+
+ // response to HomeScreen
+ struct json_object *res = json_object_new_object();
+ hs_add_object_to_json_object_func(res, __FUNCTION__, 2,
+ _error, ret);
+ afb_req_success(request, res, "afb_event_push event [on_screen_message]");
+}
+
+/**
+ * HomeScreen OnScreen Reply
+ *
+ * #### Parameters
+ * Request key
+ * - reply_message : message for reply
+ *
+ * #### Return
+ * None
+ *
+ */
+static void on_screen_reply (struct afb_req request)
+{
+ HMI_NOTICE("homescreen-service","called.");
+
+ int ret = 0;
+ const char* value = afb_req_value(request, _reply_message);
+ if (value) {
+
+ HMI_NOTICE("homescreen-service","request params = %s.", value);
+ for(auto m : g_client_manager->getAllClient()) {
+ if(m->on_screen_reply(request, value) != 0) {
+ afb_req_fail_f(request, "afb_event_push failed", "called %s.", __FUNCTION__);
+ return;
+ }
+ }
+ } else {
+ afb_req_fail_f(request, "failed", "called %s, Unknown palameter", __FUNCTION__);
+ return;
+ }
+
+ // response to HomeScreen
+ struct json_object *res = json_object_new_object();
+ hs_add_object_to_json_object_func(res, __FUNCTION__, 2,
+ _error, ret);
+ afb_req_success(request, res, "afb_event_push event [on_screen_reply]");
+}
+
+/**
+ * Subscribe event
+ *
+ * #### Parameters
+ * - event : Event name. Event list is written in libhomescreen.cpp
+ *
+ * #### Return
+ * None
+ *
+ */
+static void subscribe(struct afb_req request)
+{
+ const char *value = afb_req_value(request, "event");
+ HMI_NOTICE("homescreen-service","value is %s", value);
+ int ret = 0;
+ if(value) {
+ std::string appid(afb_req_get_application_id(request));
+ std::transform(appid.begin(), appid.end(), appid.begin(), ::tolower);
+ if(g_client_manager->getClient(request, appid)->subscribe(request, value) != 0) {
+ afb_req_fail_f(request, "afb_req_subscribe failed", "called %s.", __FUNCTION__);
+ return;
+ }
+ }
+ else {
+ HMI_NOTICE("homescreen-service","Please input event name");
+ ret = EVENT_SUBSCRIBE_ERROR_CODE;
+ }
+ /*create response json object*/
+ struct json_object *res = json_object_new_object();
+ hs_add_object_to_json_object_func(res, __FUNCTION__, 2,
+ _error, ret);
+ afb_req_success_f(request, res, "homescreen binder subscribe event name [%s]", value);
+}
+
+/**
+ * Unsubscribe event
+ *
+ * #### Parameters
+ * - event : Event name. Event list is written in libhomescreen.cpp
+ *
+ * #### Return
+ * None
+ *
+ */
+static void unsubscribe(struct afb_req request)
+{
+ const char *value = afb_req_value(request, "event");
+ HMI_NOTICE("homescreen-service","value is %s", value);
+ int ret = 0;
+ if(value) {
+ std::string appid(afb_req_get_application_id(request));
+ std::transform(appid.begin(), appid.end(), appid.begin(), ::tolower);
+ HS_Client* client = g_client_manager->find(appid);
+ if(client != nullptr) {
+ if(client->unsubscribe(request, value) != 0) {
+ afb_req_fail_f(request, "afb_req_unsubscribe failed", "called %s.", __FUNCTION__);
+ return;
+ }
+ }
+ else {
+ HMI_NOTICE("homescreen-service","not find app's client, unsubscribe failed");
+ ret = EVENT_SUBSCRIBE_ERROR_CODE;
+ }
+ }
+ else{
+ HMI_NOTICE("homescreen-service","Please input event name");
+ ret = EVENT_SUBSCRIBE_ERROR_CODE;
+ }
+ /*create response json object*/
+ struct json_object *res = json_object_new_object();
+ hs_add_object_to_json_object_func(res, __FUNCTION__, 2,
+ _error, ret);
+ afb_req_success_f(request, res, "homescreen binder unsubscribe event name [%s]", value);
+}
+
+/**
+ * allocateRestriction event
+ *
+ * #### Parameters
+ * - value : the json contents to Restriction App.
+ * {"area":"area id"}
+ *
+ * #### Return
+ * None
+ *
+ */
+static void allocateRestriction(struct afb_req request)
+{
+ HMI_NOTICE("homescreen-service","called.");
+
+ int ret = 0;
+ const char* value = afb_req_value(request, _args);
+ if (value) {
+ HMI_NOTICE("homescreen-service","request args = %s.", value);
+ HS_Client* client = g_client_manager->find(std::string("restriction"));
+ if(client != nullptr) {
+ if(client->allocateRestriction(request, value) != 0) {
+ afb_req_fail_f(request, "afb_event_push failed", "called %s.", __FUNCTION__);
+ return;
+ }
+ }
+ else {
+ // app is not started, do nothing
+ }
+ } else {
+ afb_req_fail_f(request, "failed", "called %s, Unknown palameter", __FUNCTION__);
+ return;
+ }
+
+ // response to Application
+ struct json_object *res = json_object_new_object();
+ hs_add_object_to_json_object_func(res, __FUNCTION__, 2,
+ _error, ret);
+ afb_req_success(request, res, "afb_event_push event [allocateRestriction]");
+}
+
+/**
+ * releaseRestriction event
+ *
+ * #### Parameters
+ * - value : the json contents to Restriction App.
+ * {"area":"area id"}
+ *
+ * #### Return
+ * None
+ *
+ */
+static void releaseRestriction(struct afb_req request)
+{
+ HMI_NOTICE("homescreen-service","called.");
+
+ int ret = 0;
+ const char* value = afb_req_value(request, _args);
+ if (value) {
+ HMI_NOTICE("homescreen-service","request args = %s.", value);
+ HS_Client* client = g_client_manager->find(std::string("restriction"));
+ if(client != nullptr) {
+ if(client->releaseRestriction(request, value) != 0) {
+ afb_req_fail_f(request, "afb_event_push failed", "called %s.", __FUNCTION__);
+ return;
+ }
+ }
+ else {
+ // app is not started, do nothing
+ }
+ } else {
+ afb_req_fail_f(request, "failed", "called %s, Unknown palameter", __FUNCTION__);
+ return;
+ }
+
+ // response to Application
+ struct json_object *res = json_object_new_object();
+ hs_add_object_to_json_object_func(res, __FUNCTION__, 2,
+ _error, ret);
+ afb_req_success(request, res, "afb_event_push event [releaseRestriction]");
+}
+
+/*
+ * array of the verbs exported to afb-daemon
+ */
+static const struct afb_verb_v2 verbs[]= {
+ /* VERB'S NAME FUNCTION TO CALL authorisation some info SESSION MANAGEMENT */
+ { .verb = "ping", .callback = pingSample, .auth = NULL, .info = NULL, .session = AFB_SESSION_NONE },
+ { .verb = "tap_shortcut", .callback = tap_shortcut, .auth = NULL, .info = NULL, .session = AFB_SESSION_NONE },
+ { .verb = "showWindow", .callback = showWindow, .auth = NULL, .info = NULL, .session = AFB_SESSION_NONE, },
+ { .verb = "on_screen_message", .callback = on_screen_message, .auth = NULL, .info = NULL, .session = AFB_SESSION_NONE },
+ { .verb = "on_screen_reply", .callback = on_screen_reply, .auth = NULL, .info = NULL, .session = AFB_SESSION_NONE },
+ { .verb = "subscribe", .callback = subscribe, .auth = NULL, .info = NULL, .session = AFB_SESSION_NONE },
+ { .verb = "unsubscribe", .callback = unsubscribe, .auth = NULL, .info = NULL, .session = AFB_SESSION_NONE },
+ { .verb = "allocateRestriction", .callback = allocateRestriction, .auth = NULL, .info = NULL, .session = AFB_SESSION_NONE, },
+ { .verb = "releaseRestriction", .callback = releaseRestriction, .auth = NULL, .info = NULL, .session = AFB_SESSION_NONE, },
+ {NULL } /* marker for end of the array */
+};
+
+/**
+ * homescreen binding preinit function
+ *
+ * #### Parameters
+ * - null
+ *
+ * #### Return
+ * None
+ *
+ */
+static int preinit()
+{
+ HMI_NOTICE("homescreen-service","binding preinit (was register)");
+ return 0;
+}
+
+/**
+ * homescreen binding init function
+ *
+ * #### Parameters
+ * - null
+ *
+ * #### Return
+ * None
+ *
+ */
+static int init()
+{
+ HMI_NOTICE("homescreen-service","binding init");
+
+ g_client_manager->init();
+
+ return 0;
+}
+
+/**
+ * homescreen binding event function
+ *
+ * #### Parameters
+ * - event : event name
+ * - object : event json object
+ *
+ * #### Return
+ * None
+ *
+ */
+static void onevent(const char *event, struct json_object *object)
+{
+ HMI_NOTICE("homescreen-service","on_event %s", event);
+}
+
+const struct afb_binding_v2 afbBindingV2 = {
+ .api = "homescreen",
+ .specification = NULL,
+ .info = NULL,
+ .verbs = verbs,
+ .preinit = preinit,
+ .init = init,
+ .onevent = onevent
+};
diff --git a/demo#3/common/agl-service-homescreen/src/hs-client.cpp b/demo#3/common/agl-service-homescreen/src/hs-client.cpp
new file mode 100644
index 0000000..b2f9215
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/src/hs-client.cpp
@@ -0,0 +1,255 @@
+/*
+ * Copyright (c) 2018 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "hs-client.h"
+#include "hs-helper.h"
+#include "hmi-debug.h"
+
+static const char _type[] = "type";
+
+/**
+ * HS_Client construction function
+ *
+ * #### Parameters
+ * - id: app's id
+ *
+ * #### Return
+ * None
+ *
+ */
+HS_Client::HS_Client(struct afb_req request, std::string id) : my_id(id)
+{
+ HMI_NOTICE("homescreen-service","called.");
+ my_event = afb_daemon_make_event(id.c_str());
+}
+
+/**
+ * HS_Client destruction function
+ *
+ * #### Parameters
+ * - null
+ *
+ * #### Return
+ * None
+ *
+ */
+HS_Client::~HS_Client()
+{
+ HMI_NOTICE("homescreen-service","called.");
+ afb_event_unref(my_event);
+}
+
+/**
+ * push tap_shortcut event
+ *
+ * #### Parameters
+ * - appname: app's name.
+ *
+ * #### Return
+ * result
+ *
+ */
+int HS_Client::tap_shortcut(const char* appname)
+{
+ if(!checkEvent(__FUNCTION__))
+ return 0;
+
+ HMI_NOTICE("homescreen-service","%s application_name = %s.", __FUNCTION__, appname);
+ struct json_object* push_obj = json_object_new_object();
+ hs_add_object_to_json_object_str( push_obj, 4, _application_name, appname,
+ _type, __FUNCTION__);
+ afb_event_push(my_event, push_obj);
+ return 0;
+}
+
+/**
+ * push showWindow event
+ *
+ * #### Parameters
+ * - appname: app's name.
+ *
+ * #### Return
+ * result
+ *
+ */
+int HS_Client::showWindow(struct afb_req request, const char* appname)
+{
+ if(!checkEvent(__FUNCTION__))
+ return 0;
+
+ HMI_NOTICE("homescreen-service","%s application_name = %s.", __FUNCTION__, appname);
+ struct json_object* push_obj = json_object_new_object();
+ hs_add_object_to_json_object_str( push_obj, 4, _application_name, appname,
+ _type, __FUNCTION__);
+ const char *param = afb_req_value(request, _parameter);
+ json_object_object_add(push_obj, _parameter, json_tokener_parse(param));
+ afb_event_push(my_event, push_obj);
+ return 0;
+}
+/**
+ * push on_screen_message event
+ *
+ * #### Parameters
+ * - message: post message.
+ *
+ * #### Return
+ * result
+ *
+ */
+int HS_Client::on_screen_message(struct afb_req request, const char* message)
+{
+ if(!checkEvent(__FUNCTION__))
+ return 0;
+
+ HMI_NOTICE("homescreen-service","push %s event message [%s].", __FUNCTION__, message);
+ struct json_object* push_obj = json_object_new_object();
+ hs_add_object_to_json_object_str( push_obj, 4, _display_message, message,
+ _type, __FUNCTION__);
+ afb_event_push(my_event, push_obj);
+ return 0;
+}
+
+/**
+ * push on_screen_reply event
+ *
+ * #### Parameters
+ * - message: reply message.
+ *
+ * #### Return
+ * result
+ *
+ */
+int HS_Client::on_screen_reply(struct afb_req request, const char* message)
+{
+ if(!checkEvent(__FUNCTION__))
+ return 0;
+
+ HMI_NOTICE("homescreen-service","push %s event message [%s].", __FUNCTION__, message);
+ struct json_object* push_obj = json_object_new_object();
+ hs_add_object_to_json_object_str( push_obj, 4, _reply_message, message,
+ _type, __FUNCTION__);
+ afb_event_push(my_event, push_obj);
+ return 0;
+}
+
+/**
+ * subscribe event
+ *
+ * #### Parameters
+ * - event: homescreen event, tap_shortcut etc.
+ *
+ * #### Return
+ * result
+ *
+ */
+int HS_Client::subscribe(struct afb_req request, const char* event)
+{
+ int ret = 0;
+ auto ip = event_list.find(std::string(event));
+ if(ip == event_list.end()) {
+ event_list[std::string(event)] = 0;
+ ret = afb_req_subscribe(request, my_event);
+ }
+ return ret;
+}
+
+/**
+ * unsubscribe event
+ *
+ * #### Parameters
+ * - event: homescreen event, tap_shortcut etc.
+ *
+ * #### Return
+ * result
+ *
+ */
+int HS_Client::unsubscribe(struct afb_req request, const char* event)
+{
+ int ret = 0;
+ event_list.erase(std::string(event));
+ if(event_list.empty()) {
+ ret = afb_req_unsubscribe(request, my_event);
+ }
+ return ret;
+}
+
+/**
+ * allocate restriction
+ *
+ * #### Parameters
+ * - area: display area.
+ *
+ * #### Return
+ * result
+ *
+ */
+int HS_Client::allocateRestriction(struct afb_req request, const char* area)
+{
+ if(!checkEvent(__FUNCTION__))
+ return 0;
+
+ HMI_NOTICE("homescreen-service","%s area=%s.", __FUNCTION__, area);
+ struct json_object* push_obj = json_object_new_object();
+ hs_add_object_to_json_object_str( push_obj, 4, _application_name, "restriction",
+ _type, __FUNCTION__);
+ json_object_object_add(push_obj, _args, json_tokener_parse(area));
+ afb_event_push(my_event, push_obj);
+ return 0;
+}
+
+/**
+ * release restriction
+ *
+ * #### Parameters
+ * - area: display area.
+ *
+ * #### Return
+ * result
+ *
+ */
+int HS_Client::releaseRestriction(struct afb_req request, const char* area)
+{
+ if(!checkEvent(__FUNCTION__))
+ return 0;
+
+ HMI_NOTICE("homescreen-service","%s area=%s.", __FUNCTION__, area);
+ struct json_object* push_obj = json_object_new_object();
+ hs_add_object_to_json_object_str( push_obj, 4, _application_name, "restriction",
+ _type, __FUNCTION__);
+ json_object_object_add(push_obj, _args, json_tokener_parse(area));
+ afb_event_push(my_event, push_obj);
+ return 0;
+}
+
+/**
+ * check if client subscribe event
+ *
+ * #### Parameters
+ * - event: homescreen event, tap_shortcut etc.
+ *
+ * #### Return
+ * true: found
+ * false: not found
+ *
+ */
+bool HS_Client::checkEvent(const char* event)
+{
+ auto ip = event_list.find(std::string(event));
+ if(ip == event_list.end())
+ return false;
+ else
+ return true;
+}
diff --git a/demo#3/common/agl-service-homescreen/src/hs-client.h b/demo#3/common/agl-service-homescreen/src/hs-client.h
new file mode 100644
index 0000000..bd881e6
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/src/hs-client.h
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2018 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef HOMESCREEN_CLIENT_H
+#define HOMESCREEN_CLIENT_H
+
+#include <string>
+#include <unordered_map>
+#include "hs-helper.h"
+
+
+class HS_Client {
+public:
+ HS_Client(struct afb_req request, const char* id) : HS_Client(request, std::string(id)){}
+ HS_Client(struct afb_req request, std::string id);
+ HS_Client(HS_Client&) = delete;
+ HS_Client &operator=(HS_Client&) = delete;
+ ~HS_Client();
+
+ int tap_shortcut(const char* appname);
+ int showWindow(struct afb_req request, const char* appname);
+ int on_screen_message (struct afb_req request, const char* message);
+ int on_screen_reply (struct afb_req request, const char* message);
+ int subscribe(struct afb_req request, const char* event);
+ int unsubscribe(struct afb_req request, const char* event);
+ int allocateRestriction(struct afb_req request, const char* area);
+ int releaseRestriction(struct afb_req request, const char* area);
+
+private:
+ bool checkEvent(const char* event);
+
+private:
+ std::string my_id;
+ struct afb_event my_event;
+ std::unordered_map<std::string, int> event_list;
+
+};
+
+#endif // HOMESCREEN_CLIENT_H \ No newline at end of file
diff --git a/demo#3/common/agl-service-homescreen/src/hs-clientmanager.cpp b/demo#3/common/agl-service-homescreen/src/hs-clientmanager.cpp
new file mode 100644
index 0000000..3dea3a6
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/src/hs-clientmanager.cpp
@@ -0,0 +1,219 @@
+/*
+ * Copyright (c) 2018 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "hs-clientmanager.h"
+#include "hmi-debug.h"
+
+HS_ClientManager* HS_ClientManager::me = nullptr;
+
+static void cbRemoveClientCtxt(void *data)
+{
+ HS_ClientManager::instance()->removeClientCtxt(data);
+}
+
+/**
+ * HS_ClientManager construction function
+ *
+ * #### Parameters
+ * - Nothing
+ *
+ * #### Return
+ * None
+ *
+ */
+HS_ClientManager::HS_ClientManager()
+{
+}
+
+/**
+ * get instance
+ *
+ * #### Parameters
+ * - Nothing
+ *
+ * #### Return
+ * HS_ClientManager instance pointer
+ *
+ */
+HS_ClientManager* HS_ClientManager::instance(void)
+{
+ if(me == nullptr)
+ me = new HS_ClientManager();
+
+ return me;
+}
+
+/**
+ * HS_ClientManager init function
+ *
+ * #### Parameters
+ * - Nothing
+ *
+ * #### Return
+ * init result
+ *
+ */
+int HS_ClientManager::init(void)
+{
+ HMI_NOTICE("homescreen-service","called.");
+ // TODO : connect to windowmanger
+ // get applist from appfw
+}
+
+/**
+ * find HS_Client in client_list
+ *
+ * #### Parameters
+ * - appid: app's id
+ *
+ * #### Return
+ * found HS_Client pointer
+ *
+ */
+HS_Client* HS_ClientManager::find(std::string appid)
+{
+ std::lock_guard<std::mutex> lock(this->mtx);
+ HS_Client* p = nullptr;
+ auto ip = client_list.find(appid);
+ if(ip != client_list.end()) {
+ p = client_list[appid];
+ }
+ return p;
+}
+
+/**
+ * get HS_Client
+ *
+ * #### Parameters
+ * - appid: app's id
+ *
+ * #### Return
+ * found HS_Client pointer
+ *
+ */
+HS_Client* HS_ClientManager::getClient(afb_req req, std::string appid)
+{
+ std::lock_guard<std::mutex> lock(this->mtx);
+ HS_Client* p = nullptr;
+ auto ip = client_list.find(appid);
+ if(ip != client_list.end()) {
+ p = client_list[appid];
+ }
+ else {
+ appid2ctxt[appid] = createClientCtxt(req, appid);
+ p = addClient(req, appid);
+ }
+ return p;
+}
+
+/**
+ * get HS_Client pointers set
+ *
+ * #### Parameters
+ * - Nothing
+ *
+ * #### Return
+ * HS_Client pointers set
+ *
+ */
+std::vector<HS_Client*> HS_ClientManager::getAllClient(void)
+{
+ std::lock_guard<std::mutex> lock(this->mtx);
+ std::vector<HS_Client*> v;
+ for(auto a : client_list)
+ v.push_back(a.second);
+ return v;
+}
+
+/**
+ * create client's afb_req_context
+ *
+ * #### Parameters
+ * - appid: app's id
+ *
+ * #### Return
+ * HS_ClientCtxt pointer
+ *
+ */
+HS_ClientCtxt* HS_ClientManager::createClientCtxt(afb_req req, std::string appid)
+{
+ HS_ClientCtxt *ctxt = (HS_ClientCtxt *)afb_req_context_get(req);
+ if (!ctxt)
+ {
+ HMI_NOTICE("homescreen-service", "create new session for %s", appid.c_str());
+ HS_ClientCtxt *ctxt = new HS_ClientCtxt(appid.c_str());
+ afb_req_session_set_LOA(req, 1);
+ afb_req_context_set(req, ctxt, cbRemoveClientCtxt);
+ }
+ return ctxt;
+}
+
+/**
+ * add Client
+ *
+ * #### Parameters
+ * - ctxt: app's id
+ *
+ * #### Return
+ * HS_Client pointer
+ *
+ */
+HS_Client* HS_ClientManager::addClient(afb_req req, std::string appid)
+{
+ return (client_list[appid] = new HS_Client(req, appid));
+}
+
+/**
+ * remove Client
+ *
+ * #### Parameters
+ * - appid: app's id
+ *
+ * #### Return
+ * None
+ *
+ */
+void HS_ClientManager::removeClient(std::string appid)
+{
+ delete client_list[appid];
+ client_list.erase(appid);
+}
+
+/**
+ * remove Client from list
+ *
+ * #### Parameters
+ * - data: HS_ClientCtxt pointer
+ *
+ * #### Return
+ * None
+ *
+ */
+void HS_ClientManager::removeClientCtxt(void *data)
+{
+ HS_ClientCtxt *ctxt = (HS_ClientCtxt *)data;
+ if(ctxt == nullptr)
+ {
+ HMI_ERROR("homescreen-service", "data is nullptr");
+ return;
+ }
+
+ HMI_NOTICE("homescreen-service", "remove app %s", ctxt->id.c_str());
+ std::lock_guard<std::mutex> lock(this->mtx);
+ removeClient(ctxt->id);
+ delete appid2ctxt[ctxt->id];
+ appid2ctxt.erase(ctxt->id);
+}
diff --git a/demo#3/common/agl-service-homescreen/src/hs-clientmanager.h b/demo#3/common/agl-service-homescreen/src/hs-clientmanager.h
new file mode 100644
index 0000000..cb49088
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/src/hs-clientmanager.h
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2018 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef HOMESCREEN_CLIENTMANAGER_H
+#define HOMESCREEN_CLIENTMANAGER_H
+
+#include <string>
+#include <vector>
+#include <mutex>
+#include <memory>
+#include <unordered_map>
+#include "hs-helper.h"
+#include "hs-client.h"
+
+typedef struct HS_ClientCtxt
+{
+ std::string id;
+ HS_ClientCtxt(const char *appid)
+ {
+ id = appid;
+ }
+} HS_ClientCtxt;
+
+
+class HS_ClientManager {
+public:
+ HS_ClientManager();
+ ~HS_ClientManager() = default;
+ HS_ClientManager(HS_ClientManager const &) = delete;
+ HS_ClientManager &operator=(HS_ClientManager const &) = delete;
+ HS_ClientManager(HS_ClientManager &&) = delete;
+ HS_ClientManager &operator=(HS_ClientManager &&) = delete;
+
+ static HS_ClientManager* instance(void);
+ int init(void);
+ HS_Client* find(std::string appid);
+ HS_Client* getClient(afb_req req, std::string appid);
+ std::vector<HS_Client*> getAllClient(void);
+ void removeClientCtxt(void *data);
+
+private:
+ HS_ClientCtxt* createClientCtxt(afb_req req, std::string appid);
+ HS_Client* addClient(afb_req req, std::string appid);
+ void removeClient(std::string appid);
+
+private:
+ static HS_ClientManager* me;
+ std::unordered_map<std::string, HS_Client*> client_list;
+ std::unordered_map<std::string, HS_ClientCtxt*> appid2ctxt;
+ std::mutex mtx;
+};
+
+#endif // HOMESCREEN_CLIENTMANAGER_H \ No newline at end of file
diff --git a/demo#3/common/agl-service-homescreen/src/hs-helper.cpp b/demo#3/common/agl-service-homescreen/src/hs-helper.cpp
new file mode 100644
index 0000000..8780cc0
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/src/hs-helper.cpp
@@ -0,0 +1,246 @@
+/*
+ * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <string.h>
+#include <cstdarg>
+#include "hs-helper.h"
+
+
+const char* evlist[] = {
+ "tap_shortcut",
+ "showWindow",
+ "on_screen_message",
+ "on_screen_reply",
+ "allocateRestriction",
+ "releaseRestriction",
+ "reserved"
+ };
+
+/**
+ * get uint16 value from source
+ *
+ * #### Parameters
+ * - request : Describes the request by bindings from afb-daemon
+ * - source : input source
+ * - out_id : output uint16 value
+ *
+ * #### Return
+ * error code
+ *
+ */
+REQ_ERROR get_value_uint16(const struct afb_req request, const char *source, uint16_t *out_id)
+{
+ char* endptr;
+ const char* tmp = afb_req_value (request, source);
+ if(!tmp)
+ {
+ return REQ_FAIL;
+ }
+ long tmp_id = strtol(tmp,&endptr,10);
+
+ /* error check of range */
+ if( (tmp_id > UINT16_MAX) || (tmp_id < 0) )
+ {
+ return OUT_RANGE;
+ }
+ if(*endptr != '\0')
+ {
+ return NOT_NUMBER;
+ }
+
+ *out_id = (uint16_t)tmp_id;
+ return REQ_OK;
+}
+
+/**
+ * get int16 value from source
+ *
+ * #### Parameters
+ * - request : Describes the request by bindings from afb-daemon
+ * - source : input source
+ * - out_id : output int16 value
+ *
+ * #### Return
+ * error code
+ *
+ */
+REQ_ERROR get_value_int16(const struct afb_req request, const char *source, int16_t *out_id)
+{
+ char* endptr;
+ const char* tmp = afb_req_value (request, source);
+ if(!tmp)
+ {
+ return REQ_FAIL;
+ }
+ long tmp_id = strtol(tmp,&endptr,10);
+
+ /* error check of range */
+ if( (tmp_id > INT16_MAX) || (tmp_id < INT16_MIN) )
+ {
+ return OUT_RANGE;
+ }
+ if(*endptr != '\0')
+ {
+ return NOT_NUMBER;
+ }
+
+ *out_id = (int16_t)tmp_id;
+ return REQ_OK;
+}
+
+/**
+ * get int32 value from source
+ *
+ * #### Parameters
+ * - request : Describes the request by bindings from afb-daemon
+ * - source : input source
+ * - out_id : output int32 value
+ *
+ * #### Return
+ * error code
+ *
+ */
+REQ_ERROR get_value_int32(const struct afb_req request, const char *source, int32_t *out_id)
+{
+ char* endptr;
+ const char* tmp = afb_req_value (request, source);
+ if(!tmp)
+ {
+ return REQ_FAIL;
+ }
+ long tmp_id = strtol(tmp,&endptr,10);
+
+ /* error check of range */
+ if( (tmp_id > INT32_MAX) || (tmp_id < INT32_MIN) )
+ {
+ return OUT_RANGE;
+ }
+ if(*endptr != '\0')
+ {
+ return NOT_NUMBER;
+ }
+
+ *out_id = (int32_t)tmp_id;
+ return REQ_OK;
+}
+
+/**
+ * add int object to json object
+ *
+ * #### Parameters
+ * - j_obj : the json object will join in int json object
+ * - count : input parameter number
+ * - ... : parameter list
+ *
+ * #### Return
+ * None
+ *
+ */
+void hs_add_object_to_json_object(struct json_object* j_obj, int count,...)
+{
+ va_list args;
+ va_start(args, count);
+ for(int i = 0; i < count; ++i )
+ {
+ char *key = va_arg(args, char*);
+ int value = va_arg(args, int);
+ json_object_object_add(j_obj, key, json_object_new_int((int32_t)value));
+ ++i;
+ }
+ va_end(args);
+}
+
+/**
+ * add string object to json object
+ *
+ * #### Parameters
+ * - j_obj : the json object will join in string json object
+ * - count : input parameter number
+ * - ... : parameter list
+ *
+ * #### Return
+ * None
+ *
+ */
+void hs_add_object_to_json_object_str(struct json_object* j_obj, int count,...)
+{
+ va_list args;
+ va_start(args, count);
+ for(int i = 0; i < count; ++i )
+ {
+ char *key = va_arg(args, char*);
+ char *value = va_arg(args, char*);
+ json_object_object_add(j_obj, key, json_object_new_string(value));
+ ++i;
+ }
+ va_end(args);
+}
+
+/**
+ * add new json object to json object
+ *
+ * #### Parameters
+ * - j_obj : the json object will join in new json object
+ * - verb_name : new json object's verb value
+ * - count : input parameter number
+ * - ... : parameter list
+ *
+ * #### Return
+ * None
+ *
+ */
+void hs_add_object_to_json_object_func(struct json_object* j_obj, const char* verb_name, int count, ...)
+{
+ va_list args;
+ va_start(args, count);
+
+ json_object_object_add(j_obj,"verb", json_object_new_string(verb_name));
+
+ for(int i = 0; i < count; ++i )
+ {
+ char *key = va_arg(args, char*);
+ int value = va_arg(args, int);
+ json_object_object_add(j_obj, key, json_object_new_int((int32_t)value));
+ ++i;
+ }
+ va_end(args);
+}
+
+/**
+ * search event position in event list
+ *
+ * #### Parameters
+ * - value : searched event name
+ *
+ * #### Return
+ * event's index in event list
+ *
+ */
+int hs_search_event_name_index(const char* value)
+{
+ size_t buf_size = 50;
+ size_t size = sizeof evlist / sizeof *evlist;
+ int ret = -1;
+ for(size_t i = 0 ; i < size ; ++i)
+ {
+ if(!strncmp(value, evlist[i], buf_size))
+ {
+ ret = i;
+ break;
+ }
+ }
+ return ret;
+}
diff --git a/demo#3/common/agl-service-homescreen/src/hs-helper.h b/demo#3/common/agl-service-homescreen/src/hs-helper.h
new file mode 100644
index 0000000..b2354e0
--- /dev/null
+++ b/demo#3/common/agl-service-homescreen/src/hs-helper.h
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef HOMESCREEN_HELPER_H
+#define HOMESCREEN_HELPER_H
+#define AFB_BINDING_VERSION 2
+#include <afb/afb-binding.h>
+#include <json-c/json.h>
+
+
+typedef enum REQ_ERROR
+{
+ REQ_FAIL = -1,
+ REQ_OK=0,
+ NOT_NUMBER,
+ OUT_RANGE
+}REQ_ERROR;
+
+extern const char* evlist[];
+extern const char _error[];
+extern const char _application_name[];
+extern const char _display_message[];
+extern const char _reply_message[];
+extern const char _args[];
+extern const char _parameter[];
+
+REQ_ERROR get_value_uint16(const struct afb_req request, const char *source, uint16_t *out_id);
+REQ_ERROR get_value_int16(const struct afb_req request, const char *source, int16_t *out_id);
+REQ_ERROR get_value_int32(const struct afb_req request, const char *source, int32_t *out_id);
+void hs_add_object_to_json_object(struct json_object* j_obj, int count, ...);
+void hs_add_object_to_json_object_str(struct json_object* j_obj, int count, ...);
+void hs_add_object_to_json_object_func(struct json_object* j_obj, const char* verb_name, int count, ...);
+int hs_search_event_name_index(const char* value);
+
+#endif /*HOMESCREEN_HELPER_H*/
diff --git a/demo#3/common/agl-service-windowmanager/CMakeLists.txt b/demo#3/common/agl-service-windowmanager/CMakeLists.txt
new file mode 100644
index 0000000..7cf640f
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/CMakeLists.txt
@@ -0,0 +1,68 @@
+#
+# Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+cmake_minimum_required(VERSION 2.8)
+
+project(WindowManagerTMC)
+
+set(PACKAGE_VERSION_MAJOR 0)
+set(PACKAGE_VERSION_MINOR 0)
+set(PACKAGE_VERSION_REVISION 1)
+set(PACKAGE_VERSION "${PACKAGE_VERSION_MAJOR}.${PACKAGE_VERSION_MINOR}.${PACKAGE_VERSION_REVISION}")
+
+find_package(PkgConfig REQUIRED)
+include(GNUInstallDirs)
+
+macro(wlproto var_basename proto_xml_basename)
+ if("${WLSCAN}" STREQUAL "")
+ find_program(WLSCAN NAMES wayland-scanner)
+ endif()
+
+ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/protocol)
+ set(proto_dir "${CMAKE_CURRENT_SOURCE_DIR}/protocol")
+ elseif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../protocol)
+ set(proto_dir "${CMAKE_CURRENT_SOURCE_DIR}/../protocol")
+ else()
+ message(FATAL_ERROR "Could not find ${CMAKE_CURRENT_SOURCE_DIR}/protocol or ${CMAKE_CURRENT_SOURCE_DIR}/../protocol")
+ endif()
+
+ add_custom_command(
+ OUTPUT
+ ${proto_xml_basename}-protocol.c
+ #${proto_xml_basename}-server-protocol.h
+ ${proto_xml_basename}-client-protocol.h
+ MAIN_DEPENDENCY ${proto_dir}/${proto_xml_basename}.xml
+ COMMAND ${WLSCAN} code < ${proto_dir}/${proto_xml_basename}.xml > ${proto_xml_basename}-protocol.c
+ #COMMAND ${WLSCAN} server-header < ${proto_dir}/${proto_xml_basename}.xml > ${proto_xml_basename}-server-protocol.h
+ COMMAND ${WLSCAN} client-header < ${proto_dir}/${proto_xml_basename}.xml > ${proto_xml_basename}-client-protocol.h
+ )
+
+ set(${var_basename}_PROTO ${CMAKE_CURRENT_BINARY_DIR}/${proto_xml_basename}-protocol.c)
+ set(${var_basename}_CLIENT ${CMAKE_CURRENT_BINARY_DIR}/${proto_xml_basename}-client-protocol.h)
+ #set(${var_basename}_SERVER ${CMAKE_CURRENT_BINARY_DIR}/${proto_xml_basename}-server-protocol.h)
+
+ include_directories(${CMAKE_CURRENT_BINARY_DIR})
+endmacro()
+
+set(SANITIZER_MODE "none" CACHE STRING "Build using a specific sanitizer (e.g. 'address', 'thread', 'leak', 'undefined'), depends on compiler; default none")
+
+set(LINK_LIBCXX OFF CACHE BOOL "Link against LLVMs libc++")
+
+# Add PolicyManager as plugin
+set(PLUGIN_PM policy_manager)
+add_subdirectory(${PLUGIN_PM})
+
+add_subdirectory(src)
diff --git a/demo#3/common/agl-service-windowmanager/LICENSE b/demo#3/common/agl-service-windowmanager/LICENSE
new file mode 100644
index 0000000..f433b1a
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/LICENSE
@@ -0,0 +1,177 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
diff --git a/demo#3/common/agl-service-windowmanager/LICENSE.MIT b/demo#3/common/agl-service-windowmanager/LICENSE.MIT
new file mode 100644
index 0000000..0f2dc0f
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/LICENSE.MIT
@@ -0,0 +1,20 @@
+Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/demo#3/common/agl-service-windowmanager/README.md b/demo#3/common/agl-service-windowmanager/README.md
new file mode 100644
index 0000000..17389a8
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/README.md
@@ -0,0 +1,14 @@
+This is a WindowManager implementation for the AGL Project.
+===========================================================
+
+See http://docs.automotivelinux.org/docs/apis_services/en/dev/
+
+**NOTE**
+This Window Manager is master (meter cluster) mode by default.
+If use slave (IVI) mode, please execute sclipt `change_to_slave_mode.sh` on target as follows:
+```
+$ scp ./change_to_slave_mode.sh root@<target_ip_addr>:~
+$ ssh root@<target_ip_addr>
+# sync
+# ./change_to_slave_mode.sh
+```
diff --git a/demo#3/common/agl-service-windowmanager/change_to_slave_mode.sh b/demo#3/common/agl-service-windowmanager/change_to_slave_mode.sh
new file mode 100755
index 0000000..32a70ee
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/change_to_slave_mode.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+sed -i.orig -e 's/\"mode\": \"master\"/\"mode\": \"slave\"/' /var/local/lib/afm/applications/windowmanager-service-2017/0.1/etc/connection.json
+
+
diff --git a/demo#3/common/agl-service-windowmanager/doc/ApplicationGuide.md b/demo#3/common/agl-service-windowmanager/doc/ApplicationGuide.md
new file mode 100644
index 0000000..2240bb1
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/doc/ApplicationGuide.md
@@ -0,0 +1,757 @@
+**Window Manager Application Guide**
+====
+<div align="right">Revision: 0.5</div>
+<div align="right">TOYOTA MOTOR CORPORATION</div>
+<div align="right">20th/Mar/2018</div>
+
+* * *
+<div id="Table\ of\ content"></div>
+
+Table of content
+============
+- [Introduction](#Introduction)
+ - [Intended audience](#Intended\ audience)
+ - [Scope of this Document](#Scope\ of\ this\ Document)
+ - [Known Issues](#Known\ Issues)
+ - [External libraries](#External\ libraries)
+ - [Client Library](#Client\ Library)
+- [Concepts](#Concepts)
+ - [Layers](#Layers)
+ - [Surfaces](#Surfaces)
+- [Configuration](#Configuration)
+ - [Configuration Items](#Configuration\ Items)
+- [Building and Running](#Building\ and\ Running)
+ - [Dependencies](#Dependencies)
+ - [Build Configuration](#Build\ Configuration)
+- [Implementation Notes](#Implementation\ Notes)
+ - [Structure](#Structure)
+- [Sequence](#Sequence)
+- [Binding API](#Binding\ API)
+ - [LibWindowmanager](#LibWindowmanager)
+ - [Methods](#Methods)
+ - [Errors](#Errors)
+ - [Usage](#Usage)
+ - [Events](#Events)
+- [Sample](#Sample)
+
+
+<div id="Introduction"></div>
+
+Introduction
+============
+
+This window manager implements simple layout switching of applications on
+multiple layers and with different layer layouts.
+
+<div id="Intended\ audience"></div>
+
+Intended audience
+-----------------
+
+This document is intended for developers and system integrators who
+need to know, how the window manager works and how it is to be used.
+
+<div id="Scope\ of\ this\ Document"></div>
+
+Scope of this Document
+----------------------
+
+This document covers the window manager that was implemented for TMC and
+delivered to the Automotive Grade Linux (AGL) project. It includes its
+implementation details, concepts of operation, configuration and usage.
+
+It does not include
+
+- document of the underlying architecture, see
+ [HMI-Framework](https://wiki.automotivelinux.org/hmiframework).
+
+- document of the AGL application framework and its technologies,
+ see [AGL Application
+ Framework](https://wiki.automotivelinux.org/agl-distro/app-framework).
+
+It is highly recommended to have a good understanding of these documents
+and projects before using the window manager.
+
+<div id="Known\ Issues"></div>
+
+Known Issues
+------------
+
+Currently there is a one known issues:
+
+- Only single-surface Qt applications are support through the
+ libwindowmanager library. This is a limitation of how Qt creates surface
+ IDs for the ivi-application interface.
+
+<div id="External\ libraries"></div>
+
+External libraries
+------------------
+
+This project includes a copy of version 2.1.1 the excellent [C++11 JSON
+library by Niels Lohmann](https://github.com/nlohmann/json).
+
+<div id="Client\ Library"></div>
+
+Client Library
+--------------
+
+A client library implementation that internally uses the *libafbwsc*, is
+provided in the `libwindowmanager`.
+
+<div id="Concepts"></div>
+
+Concepts
+========
+
+The window manager implements a couple of concepts in order to allow
+efficient implementation.
+
+<div id="Layers"></div>
+
+Layers
+------
+
+Layers are entities that are stacked on top of each other. Each layer
+has an ID which is used for the ivi-controller interface, but this ID
+also implicitly specifies its stacking order, from lowest to highest.
+
+Layers are always full-screen. We do not use layer dimensions as a way
+to setup the scene, rather - each layer has a layout attached to it,
+which specifies an area that is used by surfaces to draw on.
+
+Additionally, layers will generally leave surfaces on below layers
+activated, and only disable surfaces on layers the are above the
+currently used layer.
+
+It is possible to deactivate these surfaces on lower layers explicitly
+using the `DeactivateSurface` API call.
+
+<div id="Surfaces"></div>
+
+Surfaces
+--------
+
+Surfaces are *placed* on layers according to their name. The surface
+will then be resized to dimensions, according to the layer's layout
+configuration.
+
+
+<div id="Configuration"></div>
+
+Configuration
+=============
+
+The window manager is configured with the *layers.json* configuration
+file, by default it is searched in `${AFM_APP_INSTALL_DIR}/etc/layers.json`.
+Note, that the window manager will use default configuration unless this configuration is found.
+
+A sample configuration is provided with the window manager
+implementation, this sample is installed to ${AFM_APP_INSTALL_DIR}/etc/layers.json.
+
+Note:
+Currently, window manager doesn't block the application displaying because "Fallback" is set by default. If the "Fallback" is not set in layers.json, window manager blocks the application displaying. In such a situation, you have to add your role(application name) at "role" in layers.json.
+
+<div id="Configuration\ Items"></div>
+
+Configuration Items
+-------------------
+
+This section describes configuration items available through
+`layers.json`. It will do this, by first providing an example, and then
+going into its components.
+
+### main\_surface
+
+ "main_surface": {
+ "surface_role": "HomeScreen",
+ },
+
+The `main_surface` object describes a surface that will internally be
+treated as the main surface - usually this mean *HomeScreen*. The only
+special handling this surface receives, is that it is not allowed to
+deactivate it. Placement of this surface on an layer is done by the
+other configuration described below.
+
+- `surface_role` this configuration item specifies the name of the
+ main surface. Set this to e.g. `HomeScreen`.
+
+### mappings
+
+This configuration item is a list of surface-name to layer mappings.
+
+#### surface to layer mapping
+
+ "mappings": [
+ {
+ "role": "^HomeScreen$",
+ "name": "HomeScreen",
+ "layer_id": 1000,
+ "area": { "type": "full" },
+ "comment": "Single layer map for the HomeScreen"
+ },
+ {
+ "role": "MediaPlayer|Radio|Phone|Navigation|HVAC|Settings|Dashboard|POI|Mixer",
+ "name": "apps",
+ "layer_id": 1001,
+ "area": { "type": "rect", "rect": { "x": 0, "y": 218, "width": -1, "height": -433 } },
+ "comment": "Range of IDs that will always be placed on layer 1001, negative rect values are interpreted as output_size.dimension - $value",
+
+ "split_layouts": [
+ {
+ "name": "Navigation",
+ "main_match": "Navigation",
+ "sub_match": "HVAC|MediaPlayer",
+ "priority": 1000
+ }
+ ]
+ },
+ {
+ "role": "^OnScreen.*",
+ "name": "popups",
+ "layer_id": 9999,
+ "area": { "type": "rect", "rect": { "x": 0, "y": 760, "width": -1, "height": 400 } },
+ "comment": "Range of IDs that will always be placed on the popup layer, that gets a very high 'dummy' id of 9999"
+ }
+ ]
+
+Each mapping defines the following items to map corresponding surfaces
+to a layer.
+
+- `role` defines a regular expression that application drawing names
+ are matched against. If applications match this regular expression,
+ the surface will be visible on this layer.
+
+- `name` is just a name definition for this layer, it has no
+ functional use apart from identifying a layer with a name.
+
+- `layer_id` specifies which ID this layer will use.
+
+- `area` is an object that defines the area assigned to surfaces.
+
+- `split_layouts` is an optional item, that - if present - defines a
+ number of possible split-screen layouts for this layer.
+
+#### Area
+
+Areas can be either `full` or `rect`, whereas `full` means a full-screen
+layer, this is mostly useful for the main\_surface or HomeScreen layer.
+`rect` declares a layer drawing area specified as a rectangle with start
+coordinates `x` and `y` as well as its dimensions `width` and `height`.
+
+The dimensions can be specified relative to the screen dimensions. For
+this negative values for width and height must be used.
+
+For example, a full-screen surface can have the following `rect`
+definition:
+
+ "rect": { "x": 0,
+ "y": 0,
+ "width": -1,
+ "height": -1 }
+
+A surface that leaves a 200pixel margin on the top and bottom can use
+the following `rect` definition:
+
+ "rect": { "x": 0,
+ "y": 200,
+ "width": -1,
+ "height": -401 }
+
+So the expression for the actual surface dimensions when using
+screen-size-relative values will be:
+
+ actual_width = screen_width + 1 + width
+ actual_height = screen_height + 1 + height
+
+Or in other words, to leave an `N` wide border around a surface, the
+actual value in the dimension configuration needs to be `-N - 1`, and
+appropriate offsets need to be set for `x` and `y`.
+
+#### split\_layouts
+
+This configuration item allows the specification of split-screen layouts
+on layers for certain surfaces.
+
+A split screen layout always has a *main* surface and a *sub* surface.
+In order to enter a split screen layout, first the *main* surface of the
+layout must be activated, and then the *sub* surface. In order to
+disable the split layout, one of the two participating surface must be
+deactivated (or a surface on a layer below the current one must be
+activated).
+
+ "split_layouts": [
+ {
+ "name": "Navigation",
+ "main_match": "Navigation",
+ "sub_match": "HVAC|MediaPlayer",
+ }
+ ]
+
+A split layout object has the following attributes:
+
+- `name` defines its name, it has no actual function other then a way
+ to identify this split layout.
+
+- `main_match` is a regular expression that matches for the *main*
+ surface of this split layout.
+
+- `sub_match` is a regular expression that matches for the *sub*
+ surface of this layout.
+
+In the above example only the surface with drawing name
+`Navigation` will be used as the *main* surface, and the surfaces
+with drawing name `HVAC` or `MediaPlayer` can be used as a *sub* surface for
+this layout.
+
+The names must still match the layer's role match!
+
+<div id="Building\ and\ Running"></div>
+
+Building and Running
+====================
+
+<div id="Dependencies"></div>
+
+Dependencies
+------------
+
+Build dependencies are as follows:
+
+- afb-daemon &gt;= 1.0
+
+- libsystemd &gt;= 222
+
+- wayland-client &gt;= 1.11
+
+- wayland-ivi-extension &gt;= 2.0.2 (until eel, wayland-ivi-extension &gt;= 1.13)
+
+- cmake &gt;= 2.8
+
+<div id="Supported environment"></div>
+
+Supported environment
+-------------------
+
+| Item | Description |
+|:------------|:----------------------------------|
+| AGL version | Electric Eel |
+| Hardware | Renesas R-Car Starter Kit Pro(M3) |
+
+
+<div id="Build\ Configuration"></div>
+
+Build Configuration
+-------------------
+
+**Download recipe**
+If repo is already done, please start with git clone
+
+```
+$ mkdir WORK
+$ cd WORK
+$ repo init -u https://gerrit.automotivelinux.org/gerrit/AGL/AGL-repo
+$ repo sync
+
+```
+
+Then you can get the following recipe.
+
+* `meta-agl-devel/meta-hmi-framework/recipes-graphics/agl-service-windowmanager-2017`
+
+* `meta-agl-devel/meta-hmi-framework/recipes-graphics/libwindowmanager`
+
+**Bitbake**
+
+```
+$ source meta-agl/scripts/aglsetup.sh -m m3ulcb agl-demo
+$ bitbake agl-demo-platform
+```
+
+<div id="Implementation\ Notes"></div>
+
+Implementation Notes
+====================
+
+The window manager is implemented as a app-framework-binder binding.
+That means, the build produces one shared object that exports a binding
+interface.
+
+<div id="Structure"></div>
+
+Structure
+---------
+
+The implementation is loosely split across the following source files:
+
+- `main.cpp`: The program entry point as used by the afb-daemon. This
+ file defines the afbBindingV2 symbol that is used by the afb-daemon
+ in order to load a binding. It also defines the wayland fd event
+ dispatcher and some globals to be used (as context for the afb calls
+ we receive).
+
+- `app.cpp` / `app.hpp`: This is the main window manager
+ logic implementation.
+
+- `config.cpp` / `config.hpp`: Very simple configuration
+ item interface.
+
+- `controller_hooks.hpp`: hook functions called by the wayland
+ controller to call into the window manager instance. Only a very limited number
+ of events are passed to the window manager, which allowed the usage of
+ such a simple interface.
+
+- `json_helper.cpp` / `json_helper.hpp`: Smaller json related
+ helper functions.
+
+- `layers.cpp` / `layers.hpp`: Actually hold all the data from
+ layers.json configuration, do some transformations and service the
+ window manager implementation.
+
+- `layout.cpp` / `layout.hpp`: Very simple layout state for the
+ implementation of split layouts and tracking of the
+ surfaces involved.
+
+- `policy.hpp`: PolicyManager implementation stub. Gets passed the
+ current and new layout on layout switch and can decide upon it being
+ valid or not.
+
+- `result.hpp`: Simple result class around
+ `std::experimental::optional` that additionally can hold a
+ `char const *` to describe the error.
+
+- `util.cpp` / `util.hpp`: general utility functions and structs - and
+ preprocessor definitions (e.g. `log*()` to AFB logging functions.
+
+- `wayland_ivi_wm.cpp` / `wayland_ivi_wm.hpp`: A C++ object-oriented
+ libwayland-client wrapper. It is instanced in `main.cpp` and handles
+ all our wayland needs. These files are in master. In eel, the name
+ of these files are `wayland.cpp` / `wayland.hpp`
+
+<div id="Sequence"></div>
+
+Sequence
+===============
+
+To understand the sequence between application and window manager, refer to the [spec document](https://wiki.automotivelinux.org/windowmanager).
+
+
+<div id="Binding\ API"></div>
+
+Binding API
+===============
+
+Each function returns a reply containing at least a failed or successful
+result of the call, additionally, when calls return something, it is
+noted.
+
+<div id="LibWindowmanager"></div>
+
+LibWindowmanager
+------
+
+This is the public interface of the class `LibWindowmanager`.
+
+ class LibWindowmanager
+ {
+ public:
+ LibWindowmanager();
+ ~LibWindowmanager();
+
+ enum EventType {
+ Event_Active = 0,
+ Event_Inactive,
+
+ Event_Visible,
+ Event_Invisible,
+
+ Event_SyncDraw,
+ Event_FlushDraw,
+ };
+
+ int init(int port, char const *token);
+
+ // Window manager API
+ int requestSurface(json_object *object);
+ int requestSurfaceXDG(json_object *object);
+ int activateSurface(json_object *object);
+ int deactivateSurface(json_object *object);
+ int endDraw(json_object *object);
+ int getDisplayInfo(json_object *object);
+ int getAreaInfo(json_object *in_obj, json_object *out_obj);
+
+ int getAreaInfo(const char *label, json_object *out_obj);
+
+ void set_event_handler(enum EventType et, handler_fun f);
+
+ };
+
+<div id="Methods"></div>
+
+Methods
+-------
+
+### init(int port, char const *token)
+
+Initialize the Binding communication.
+
+The `token` parameter is a string consisting of only alphanumeric characters.
+If these conditions are not met, the LibWindowmanager instance will not initialize,
+i.e. this call will return `-EINVAL`.
+
+The `port` parameter is the port the afb daemon is listening on, an
+invalid port will lead to a failure of the call and return `-EINVAL`.
+
+### requestSurface(json_object *object)
+
+**args: `{ 'kKeyDrawingName': 'application name' }`**
+This method requests a surface with the label given from the *Window Manager*.
+It will return `surface id` a client application can use, and
+`-errno` on failure. Additionally, on the standard error, messages are
+logged to help debugging the issue.
+
+### requestSurfaceXDG(json_object *object)
+
+**args: `{ 'kKeyDrawingName': 'application name', 'kKeyIviId': 'ivi id' }`**
+This method is mainly intended for *xdglauncher* that controls xdg application such as chromium.
+It will return `surface id` xdglauncher uses, and
+`-errno` on failure. Additionally, on the standard error, messages are
+logged to help debugging the issue.
+
+### activateSurface(json_object *object)
+
+**args: `{ 'kKeyDrawingName': 'application name', 'kKeyDrawingArea': 'layout' }`**
+This method is mainly intended for *manager* applications that control
+other applications (think an application manager or the *HomeScreen*).
+It instructs the window manager to activate the surface with the given
+*label*.
+
+This method only is effective after the actual window or surface was
+created by the application.
+
+### deactivateSurface(json_object *object)
+
+**args: `{ 'kKeyDrawingName': 'application name' }`**
+This method is mainly intended for *manager* applications that control other applications.
+In adition, this is for applications that overrides other applications such like popup message.
+In this case, popup surface requests to be hidden. It instructs the window manager to deactivate the surface associated with the given label. Note, that deactivating a surface also means to implicitly activate another (the last active or if not available *main surface* or *HomeScreen*.)
+
+This method only is effective after the actual window or surface was
+created by the application.
+
+### endDraw(json_object *object)
+
+**args: `{ 'kKeyDrawingName': 'application name' }`**
+This function is called from a client application when it is done
+drawing its surface content.
+
+It is not crucial to make this call at every time a drawing is finished
+- it is mainly intended to allow the window manager to synchronize
+drawing in case of layout switch. The exact semantics are explained in
+the next [Events](#_events) Section.
+
+### getDisplayInfo(json_object *object)
+
+**args: `{ }`**
+This function gets the display information as follows:
+ - width[pixel]
+ - height[pixel]
+ - width[mm]
+ - height[mm]
+
+It outputs the display information for json_object in the argument as follows:
+ `{"width_pixel": int value of width[pixel], "height_pixel": int value of height[pixel],
+ "width_mm": int value of width[mm], "height_mm": int value of height[mm]}`
+
+It should be called after calling init().
+It should not be called in the event handler because it occurs hang-up.
+
+#### NOTE
+It uses wl_output::geometry() for getting physical width[mm] and height[mm] of the display,
+but the value is different with measured value.
+
+ - value from wl_output::geometry(): width:320 height:520
+ - measured value : width:193 height:343
+
+### getAreaInfo(json_object *in_obj, json_object *out_obj)
+
+**args1: `{ 'kKeyDrawingName': 'application name' }`**
+**args2: `{ }`**
+This function gets the information of area drawn by the application as follows:
+ - x-coordinate
+ - y-coordinate
+ - width
+ - height
+
+It outputs the area information for json_object in the 2nd argument as follows:
+ `{"x": int value of x-coordinate, "y": int value of y-coordinate,
+ "width": int value of width, "height": int value of height}`
+
+It should be called after calling activateSurface().
+It should not be called in the event handler because it occurs hang-up.
+
+#### NOTE
+The same information can given by SyncDraw event.
+
+### getAreaInfo(const char *label, json_object *out_obj)
+
+**args1: String of application name**
+**args2: `{ }`**
+This function is same with `getAreaInfo(json_object *in_obj, json_object *out_obj)`,
+but only has difference of 1st argument.
+
+### set\_event\_handler(enum EventType et, handler_fun f)
+
+This method needs to be used to register event handlers for the WM
+events described in the EventType enum. Only one hendler for each
+EventType is possible, i.e. if it is called multiple times with the same
+EventType the previous handler will be replaced.
+
+The `func` handler functions will receive the label of the surface this
+event is targeted at.
+
+See Section [Events](#_events) for more detailed information about event
+delivery to client applications.
+
+<div id="Errors"></div>
+
+Errors
+------
+
+Methods returning an `int` signal successful operation when returning
+`0`. In case of an error, an error value is returned as a negative errno
+value. E.g. `-EINVAL` to signal that some input value was invalid.
+
+Additionally, logging of error messages is done on the standard error
+file descriptor to help debugging the issue.
+
+<div id="Usage"></div>
+
+Usage
+-----
+
+### Initialization of LibWindowmanager
+
+Before usage of the LibWindowmanager, the method `init()` must be
+called once, it will return `-errno` in case of an error and log
+diagnostic messages to stderr.
+
+### Request a surface
+
+When creating a surface with *Qt* - it is necessary to request a surface
+from the WM, internally this will communicate with the window manager
+binding. Only after `requestSurface()` was successful, a surface should
+be created.
+
+This is also true for *QML* applications, where only after the
+`requestSurface()` should the load of the resource be done. The method
+returns `surface id` a client application can use
+after the surface was requested successfully.
+
+#### Workings of requestSurface()
+
+`LibWindowmanager::requestSurface()` calls the AFB binding verb
+`requestsurface` of the `windowmanager` API. This API call will return a
+numeric ID to be used when creating the surface. This ID is never
+explicitly returned to the client application, instead, it is set in the
+application environment in order for *Qt* to then use it when creating
+the surface.
+
+With the current *Qt* implementation this means, that only one surface
+will be available to client applications, as subsequent windows will
+increment this numeric ID internally - which then will lead to IDs that
+cannot be known by the window manager as there is no direct
+communication from *Qt* to the WM.
+
+<div id="Events"></div>
+
+Events
+------
+
+Events are a way for the *Window Manager* to propagate information to
+client applications. It was vital for the project to implement a number
+of events, that mirror functionality that is already present in the
+wayland protocol.
+
+All events have the surface label as argument - a way to enable future
+multi-surface applications.
+
+As already stated above, this is currently not possible with the way
+*Qt* implements its surface ID setting.
+
+### Active and Inactive Events
+
+These events signal an application that it was activated or deactivated
+respectively. Usually this means it was switched visible - which means
+the surface will now be on the screen and therefor continue to render.
+
+- `Active(json_object *object)`
+ args: { 'kKeyDrawingName': 'application name' }
+ Signal that the surface with the name
+ `kKeyDrawingName` is now active.
+
+- `Inactive(json_object *object)`
+ args: { 'kKeyDrawingName': 'application name' }
+ Signal that the surface with the
+ name `kKeyDrawingName` is now inactive. This usually means, the layout
+ got changed, and the surface is now considered inactive
+ (or sleeping).
+
+### Visible and Invisible
+
+These events signal an application that it was switched to be visible or
+invisible respectively. These events also are handled implicitly through
+the wayland protocol by means of `wl_surface::enter` and
+`wl_surface::leave` events to the client.
+
+- `Visible(json_object *object)`
+ args: { 'kKeyDrawingName': 'application name' }
+ Signal applications, that the
+ surface with name `kKeyDrawingName` is now visible.
+
+- `Invisible(json_object *object)`
+ args: { 'kKeyDrawingName': 'application name' }
+ Signal applications that the
+ surface with name `kKeyDrawingName` is now invisible.
+
+### SyncDraw and FlushDraw
+
+These events instruct applications that they should redraw their surface
+contents - again, this is handled implicitly by the wayland protocol.
+
+`SyncDraw` is sent to the application when it has to redraw its surface.
+
+`FlushDraw` is sent to the application when it should swap its buffers,
+that is *signal* the compositor that its surface contains new content.
+
+- `SyncDraw(json_object *object)`
+ args: { 'kKeyDrawingName': 'application name', 'kKeyDrawingArea': 'layout',
+ 'kKeyDrawingRect': { "x": int value of x-coordinate, "y": int value of y-coordinate,
+ "width": int value of width, "height": int value of height } }
+ Signal applications, that the
+ surface with name `kKeyDrawingArea` needs to redraw its content
+ in the layout with name `kKeyDrawingArea` - this
+ usually is sent when the surface geometry changed.
+ And the area position and size are included with name `kKeyDrawingRect`.
+
+- `FlushDraw(json_object *object)`
+ args: { 'kKeyDrawingName': 'application name' }
+ Signal applications, that the
+ surface with name `kKeyDrawingArea` can now be swapped to its newly
+ drawn content as the window manager is ready to activate a new
+ layout (i.e. a new surface geometry).
+
+<div id="Sample"></div>
+
+Sample
+============
+
+In order to enable application to use the `WM` surface registration
+function the above described steps need to be implemented.
+
+As a minimal example the usage and initialization can look like the
+following.
+
+Repo: `apps/agl-service-homescreen-2017`
+Path: `sample/template/main.c`
+
diff --git a/demo#3/common/agl-service-windowmanager/export.map b/demo#3/common/agl-service-windowmanager/export.map
new file mode 100644
index 0000000..ee2f413
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/export.map
@@ -0,0 +1 @@
+{ global: afbBindingV*; local: *; };
diff --git a/demo#3/common/agl-service-windowmanager/layers.json b/demo#3/common/agl-service-windowmanager/layers.json
new file mode 100644
index 0000000..fddd258
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/layers.json
@@ -0,0 +1,47 @@
+{
+ "comment": "Surface ID to Layer ID mapping",
+
+ "main_surface": {
+ "surface_role": "HomeScreen",
+ "comment": "This surface should never be made invisible (The HomeScreen)"
+ },
+
+ "mappings": [
+ {
+ "role": "BackGroundLayer",
+ "name": "BackGroundLayer",
+ "layer_id": 999,
+ "comment": "Single BackGround layer map for the map, radio, music and video"
+ },
+ {
+ "role": "homescreen",
+ "name": "FarHomeScreen",
+ "layer_id": 1000,
+ "comment": "FarHomeScreen is the part of HomeScreen. The z order of this layer is lower than NearHomeScreen"
+ },
+ {
+ "role": "music|video|browser|radio|phone|map|hvac|settings|dashboard|poi|mixer|sdl|launcher|fallback",
+ "name": "Apps",
+ "layer_id": 1001,
+ "comment": "Range of IDs that will always be placed on layer 1001"
+ },
+ {
+ "role": "software_keyboard",
+ "name": "NearHomeScreen",
+ "layer_id": 1002,
+ "comment": "NearHomeScreen is the part of HomeScreen. The z order of this layer is upper than FarHomeScreen"
+ },
+ {
+ "role": "restriction",
+ "name": "Restriction",
+ "layer_id": 1003,
+ "comment": "This layer is for restriction notification. This is used by restriction role"
+ },
+ {
+ "role": "^on_screen.*",
+ "name": "OnScreen",
+ "layer_id": 9999,
+ "comment": "Range of IDs that will always be placed on the OnScreen layer, that gets a very high 'dummy' id of 9999"
+ }
+ ]
+}
diff --git a/demo#3/common/agl-service-windowmanager/layers_setting.json b/demo#3/common/agl-service-windowmanager/layers_setting.json
new file mode 100644
index 0000000..1b58a3a
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/layers_setting.json
@@ -0,0 +1,69 @@
+{
+ "description": "Layer mapping",
+ "mappings": [
+ {
+ "name": "BackGroundLayer",
+ "role" : "map|radio|music|video",
+ "type" : "stack",
+ "id_range_begin": 0,
+ "id_range_end": 0,
+ "comment": "Work Around: This is evacuation layer that not stopping event loop"
+ },
+ {
+ "name": "FarHomeScreen",
+ "role": "",
+ "type": "stack",
+ "id_range_begin": 100,
+ "id_range_end": 199,
+ "comment": "FarHomeScreen is the part of HomeScreen. The z order of this layer is lower than NearHomeScreen"
+ },
+ {
+ "name": "Apps",
+ "role": "music|video|browser|radio|phone|map|navigation|hvac|settings|dashboard|poi|mixer|sdl|launcher|receiver|tachometer|fallback",
+ "type": "tile",
+ "id_range_begin": 1000,
+ "id_range_end": 2999,
+ "comment": "Range of IDs that will always be placed on layer 1001"
+ },
+ {
+ "name": "NearHomeScreen",
+ "role": "homescreen",
+ "type": "tile",
+ "id_range_begin": 3000,
+ "id_range_end": 3000,
+ "comment": "TOYOTA special software keyboard"
+ },
+ {
+ "name": "Application Popup Layer",
+ "role": "popup*",
+ "type": "stack",
+ "id_range_begin": 4000,
+ "id_range_end": 4999,
+ "comment": "[T.B.D]This layer is for application popup layer"
+ },
+ {
+ "name": "Restriction",
+ "role": "restriction",
+ "type": "stack",
+ "id_range_begin": 5000,
+ "id_range_end": 5999,
+ "comment": "This layer is for restriction notification. This is used by restriction role"
+ },
+ {
+ "name": "OnScreen",
+ "role": "^on_screen*",
+ "type": "stack",
+ "id_range_begin": 6000,
+ "id_range_end": 6999,
+ "comment": "Range of IDs that will always be placed on the OnScreen layer, that gets a very high 'dummy' id of 9999"
+ },
+ {
+ "name": "Remote",
+ "role": "tbtnavi",
+ "type": "stack",
+ "id_range_begin": 9000,
+ "id_range_end": 9999,
+ "comment": "Range of IDs that will always be placed on the OnScreen layer, that gets a very high 'dummy' id of 9999"
+ }
+ ]
+}
diff --git a/demo#3/common/agl-service-windowmanager/package/root/config.xml b/demo#3/common/agl-service-windowmanager/package/root/config.xml
new file mode 100644
index 0000000..e297b28
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/package/root/config.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<widget xmlns="http://www.w3.org/ns/widgets" id="windowmanager-service-2017" version="0.1">
+ <name>windowmanager-service-2017</name>
+ <content src="config.xml" type="application/vnd.agl.service"/>
+ <description>Window Manager</description>
+ <author>TOYOTA</author>
+ <license>APL 2.0</license>
+ <feature name="urn:AGL:widget:required-permission">
+ <param name="urn:AGL:permission::public:hidden" value="required" />
+ <param name="urn:AGL:permission::system:run-by-default" value="required" />
+ <param name="urn:AGL:permission:afm:system:runner" value="required" />
+ </feature>
+ <feature name="urn:AGL:widget:provided-api">
+ <param name="windowmanager" value="ws" />
+ </feature>
+ <feature name="urn:AGL:widget:required-api">
+ <param name="low-can" value="ws" />
+ <param name="lib/windowmanager-service.so" value="local" />
+ <param name="afm-main" value="ws" />
+ </feature>
+</widget>
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/CMakeLists.txt b/demo#3/common/agl-service-windowmanager/policy_manager/CMakeLists.txt
new file mode 100644
index 0000000..5903340
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/CMakeLists.txt
@@ -0,0 +1,104 @@
+#
+# Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+include(FindPkgConfig)
+pkg_check_modules(AFB REQUIRED afb-daemon)
+pkg_check_modules(SD REQUIRED libsystemd>=222)
+
+# Set name of STM
+#set(STM_DIR stub)
+set(STM_DIR zipc)
+
+# Select roles.json
+if(zipc MATCHES ${STM_DIR})
+ # if trying to show split layout, change from OFF to ON
+ set(TRY_SPLIT_LAYOUT ON CACHE BOOL "Enable to show split layout")
+
+ if(${TRY_SPLIT_LAYOUT})
+ set(ROLES_CONFIG_FILE_NAME roles.json.zipc.split)
+ else()
+ set(ROLES_CONFIG_FILE_NAME roles.json.zipc)
+ endif()
+else()
+ set(ROLES_CONFIG_FILE_NAME roles.json)
+endif()
+
+# Add STM directory
+add_subdirectory(stm/${STM_DIR})
+
+set(TARGETS_PM ${PLUGIN_PM})
+
+add_library(${TARGETS_PM}
+ SHARED
+ policy_manager.cpp
+ stm/stm.c
+ ../src/util.cpp
+)
+
+target_include_directories(${TARGETS_PM}
+ PRIVATE
+ ${AFB_INCLUDE_DIRS}
+ ${SD_INCLUDE_DIRS}
+ ../include
+ ../src
+ ./
+ ./stm
+ ./stm/${STM_DIR}
+)
+
+target_link_libraries(${TARGETS_PM}
+ PRIVATE
+ ${AFB_LIBRARIES}
+ ${SD_LIBRARIES}
+ pmstm
+)
+
+target_compile_definitions(${TARGETS_PM}
+ PRIVATE
+ _GNU_SOURCE
+)
+
+target_compile_options(${TARGETS_PM}
+ PRIVATE
+ -Wall -Wextra -Wno-unused-parameter -Wno-comment)
+
+set_target_properties(${TARGETS_PM}
+ PROPERTIES
+ CXX_EXTENSIONS OFF
+ CXX_STANDARD 14
+ CXX_STANDARD_REQUIRED ON
+
+ C_EXTENSIONS OFF
+ C_STANDARD 99
+ C_STANDARD_REQUIRED ON
+
+ LINK_FLAGS "-Wl,-rpath,'$ORIGIN'"
+)
+
+if (LINK_LIBCXX)
+ set_target_properties(${TARGETS_PM}
+ PROPERTIES
+ LINK_FLAGS "-lc++ -Wl,-rpath,'$ORIGIN'"
+ )
+endif()
+
+add_custom_command(TARGET ${TARGETS_PM} POST_BUILD
+ COMMAND mkdir -p ${PROJECT_BINARY_DIR}/package/root/lib
+ COMMAND cp -f ${PROJECT_BINARY_DIR}/${PLUGIN_PM}/lib${PLUGIN_PM}.so ${PROJECT_BINARY_DIR}/package/root/lib
+ COMMAND mkdir -p ${PROJECT_BINARY_DIR}/package/root/etc
+ COMMAND cp -f ${PROJECT_SOURCE_DIR}/${PLUGIN_PM}/config/layouts.json ${PROJECT_BINARY_DIR}/package/root/etc
+ COMMAND cp -f ${PROJECT_SOURCE_DIR}/${PLUGIN_PM}/config/${ROLES_CONFIG_FILE_NAME} ${PROJECT_BINARY_DIR}/package/root/etc/roles.json
+)
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/config/layouts.json b/demo#3/common/agl-service-windowmanager/policy_manager/config/layouts.json
new file mode 100644
index 0000000..b12bce1
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/config/layouts.json
@@ -0,0 +1,371 @@
+{
+ "ecus": [
+ {
+ "name": "master",
+ "layouts": [
+ {
+ "name": "homescreen",
+ "areas": [
+ {
+ "name": "fullscreen",
+ "category": "homescreen"
+ }
+ ]
+ },
+ {
+ "name": "splitable.split",
+ "areas": [
+ {
+ "name": "split.main",
+ "category": "splitable_main"
+ },
+ {
+ "name": "split.sub",
+ "category": "splitable_sub"
+ }
+ ]
+ },
+ {
+ "name": "general.normal",
+ "areas": [
+ {
+ "name": "normal.full",
+ "category": "general"
+ }
+ ]
+ },
+ {
+ "name": "software_keyboard",
+ "areas": [
+ {
+ "name": "software_keyboard",
+ "category": "software_keyboard"
+ }
+ ]
+ },
+ {
+ "name": "pop_up",
+ "areas": [
+ {
+ "name": "on_screen",
+ "category": "pop_up"
+ }
+ ]
+ },
+ {
+ "name": "system_alert",
+ "areas": [
+ {
+ "name": "on_screen",
+ "category": "system_alert"
+ }
+ ]
+ },
+ {
+ "name": "tbt",
+ "areas": [
+ {
+ "name": "normal.full",
+ "category": "tbt"
+ }
+ ]
+ },
+ {
+ "name": "remote_tbt",
+ "areas": [
+ {
+ "name": "master.split.sub",
+ "category": "tbt"
+ }
+ ]
+ },
+ {
+ "name": "meter.normal",
+ "areas": [
+ {
+ "name": "normal.full",
+ "category": "meter"
+ }
+ ]
+ },
+ {
+ "name": "meter_receiver",
+ "areas": [
+ {
+ "name": "split.main",
+ "category": "meter"
+ },
+ {
+ "name": "split.sub",
+ "category": "receiver"
+ }
+ ]
+ },
+ {
+ "name": "meter_splitable",
+ "areas": [
+ {
+ "name": "split.main",
+ "category": "meter"
+ },
+ {
+ "name": "split.sub",
+ "category": "splitable_sub"
+ }
+ ]
+ },
+ {
+ "name": "splitable_receiver",
+ "areas": [
+ {
+ "name": "split.main",
+ "category": "splitable_main"
+ },
+ {
+ "name": "split.sub",
+ "category": "receiver"
+ }
+ ]
+ },
+ {
+ "name": "receiver.split",
+ "areas": [
+ {
+ "name": "split.sub",
+ "category": "receiver"
+ }
+ ]
+ },
+ {
+ "name": "debug.normal",
+ "areas": [
+ {
+ "name": "normal.full",
+ "category": "debug"
+ }
+ ]
+ },
+ {
+ "name": "debug.split.main",
+ "areas": [
+ {
+ "name": "split.main",
+ "category": "debug"
+ }
+ ]
+ },
+ {
+ "name": "debug.split.sub",
+ "areas": [
+ {
+ "name": "split.sub",
+ "category": "debug"
+ }
+ ]
+ },
+ {
+ "name": "debug.fullscreen",
+ "areas": [
+ {
+ "name": "fullscreen",
+ "category": "debug"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "slave",
+ "layouts": [
+ {
+ "name": "homescreen",
+ "areas": [
+ {
+ "name": "fullscreen",
+ "category": "homescreen"
+ }
+ ]
+ },
+ {
+ "name": "map.normal",
+ "areas": [
+ {
+ "name": "normal.full",
+ "category": "map"
+ }
+ ]
+ },
+ {
+ "name": "map.split",
+ "areas": [
+ {
+ "name": "split.main",
+ "category": "map"
+ },
+ {
+ "name": "split.sub",
+ "category": "splitable"
+ }
+ ]
+ },
+ {
+ "name": "map.fullscreen",
+ "areas": [
+ {
+ "name": "fullscreen",
+ "category": "map"
+ }
+ ]
+ },
+ {
+ "name": "splitable.normal",
+ "areas": [
+ {
+ "name": "normal.full",
+ "category": "splitable"
+ }
+ ]
+ },
+ {
+ "name": "splitable.split",
+ "areas": [
+ {
+ "name": "split.main",
+ "category": "splitable"
+ },
+ {
+ "name": "split.sub",
+ "category": "splitable"
+ }
+ ]
+ },
+ {
+ "name": "general.normal",
+ "areas": [
+ {
+ "name": "normal.full",
+ "category": "general"
+ }
+ ]
+ },
+ {
+ "name": "system.normal",
+ "areas": [
+ {
+ "name": "normal.full",
+ "category": "system"
+ }
+ ]
+ },
+ {
+ "name": "software_keyboard",
+ "areas": [
+ {
+ "name": "software_keyboard",
+ "category": "software_keyboard"
+ }
+ ]
+ },
+ {
+ "name": "restriction.normal",
+ "areas": [
+ {
+ "name": "restriction.normal",
+ "category": "restriction"
+ }
+ ]
+ },
+ {
+ "name": "restriction.split.main",
+ "areas": [
+ {
+ "name": "restriction.split.main",
+ "category": "restriction"
+ }
+ ]
+ },
+ {
+ "name": "restriction.split.sub",
+ "areas": [
+ {
+ "name": "restriction.split.sub",
+ "category": "restriction"
+ }
+ ]
+ },
+ {
+ "name": "pop_up",
+ "areas": [
+ {
+ "name": "on_screen",
+ "category": "pop_up"
+ }
+ ]
+ },
+ {
+ "name": "system_alert",
+ "areas": [
+ {
+ "name": "on_screen",
+ "category": "system_alert"
+ }
+ ]
+ },
+ {
+ "name": "tbt",
+ "areas": [
+ {
+ "name": "normal.full",
+ "category": "tbt"
+ }
+ ]
+ },
+ {
+ "name": "remote_tbt",
+ "areas": [
+ {
+ "name": "master.split.sub",
+ "category": "tbt"
+ }
+ ]
+ },
+ {
+ "name": "debug.normal",
+ "areas": [
+ {
+ "name": "normal.full",
+ "category": "debug"
+ }
+ ]
+ },
+ {
+ "name": "debug.split.main",
+ "areas": [
+ {
+ "name": "split.main",
+ "category": "debug"
+ }
+ ]
+ },
+ {
+ "name": "debug.split.sub",
+ "areas": [
+ {
+ "name": "split.sub",
+ "category": "debug"
+ }
+ ]
+ },
+ {
+ "name": "debug.fullscreen",
+ "areas": [
+ {
+ "name": "fullscreen",
+ "category": "debug"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/config/roles.json b/demo#3/common/agl-service-windowmanager/policy_manager/config/roles.json
new file mode 100644
index 0000000..c657fec
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/config/roles.json
@@ -0,0 +1,52 @@
+{
+ "roles":[
+ {
+ "category": "homescreen",
+ "role": "homescreen",
+ "area": "fullscreen",
+ "layer": "homescreen",
+ },
+ {
+ "category": "debug",
+ "role": "launcher | map | poi | browser | sdl | mixer | radio | hvac | debug | phone | video | music | settings | dashboard | fallback",
+ "area": "normal.full | split.main | split.sub | fullscreen",
+ "layer": "apps",
+ },
+ {
+ "category": "software_keyboard",
+ "role": "software_keyboard",
+ "area": "software_keyboard",
+ "layer": "near_homescreen",
+ },
+ {
+ "category": "restriction",
+ "role": "restriction",
+ "area": "restriction.normal | restriction.split.main | restriction.split.sub",
+ "layer": "restriction",
+ },
+ {
+ "category": "pop_up",
+ "role": "on_screen | on_screen_phone",
+ "area": "on_screen",
+ "layer": "on_screen",
+ },
+ {
+ "category": "system_alert",
+ "role": "system_alert",
+ "area": "on_screen",
+ "layer": "on_screen",
+ },
+ {
+ "category": "tbt",
+ "role": "tbt",
+ "area": "normal.full | master.split.sub",
+ "layer": "remote",
+ },
+ {
+ "category": "receiver",
+ "role": "receiver",
+ "area": "normal.full | split.main | split.sub",
+ "layer": "apps",
+ }
+ ]
+}
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/config/roles.json.zipc b/demo#3/common/agl-service-windowmanager/policy_manager/config/roles.json.zipc
new file mode 100644
index 0000000..facb1d8
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/config/roles.json.zipc
@@ -0,0 +1,52 @@
+{
+ "roles":[
+ {
+ "category": "homescreen",
+ "role": "homescreen",
+ "area": "fullscreen",
+ "layer": "homescreen",
+ },
+ {
+ "category": "map",
+ "role": "map",
+ "area": "normal.full | split.main",
+ "layer": "apps",
+ },
+ {
+ "category": "general",
+ "role": "launcher | poi | browser | sdl | mixer | radio | hvac | debug | phone | video | music | fallback",
+ "area": "normal.full",
+ "layer": "apps",
+ },
+ {
+ "category": "system",
+ "role": "settings | dashboard",
+ "area": "normal.full",
+ "layer": "apps",
+ },
+ {
+ "category": "software_keyboard",
+ "role": "software_keyboard",
+ "area": "software_keyboard",
+ "layer": "near_homescreen",
+ },
+ {
+ "category": "restriction",
+ "role": "restriction",
+ "area": "restriction.normal | restriction.split.main | restriction.split.sub",
+ "layer": "restriction",
+ },
+ {
+ "category": "pop_up",
+ "role": "on_screen | on_screen_phone",
+ "area": "on_screen",
+ "layer": "on_screen",
+ },
+ {
+ "category": "system_alert",
+ "role": "system_alert",
+ "area": "on_screen",
+ "layer": "on_screen",
+ }
+ ]
+}
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/config/roles.json.zipc.split b/demo#3/common/agl-service-windowmanager/policy_manager/config/roles.json.zipc.split
new file mode 100644
index 0000000..e21e961
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/config/roles.json.zipc.split
@@ -0,0 +1,151 @@
+{
+ "ecus": [
+ {
+ "name": "master",
+ "roles":[
+ {
+ "category": "homescreen",
+ "role": "homescreen",
+ "area": "fullscreen",
+ "layer": "homescreen",
+ },
+ {
+ "category": "general",
+ "role": "launcher | browser | debug | settings | hvac | dashboard | fallback",
+ "area": "normal.full",
+ "description": "For split test, video and music are moved to category:splitable",
+ "layer": "apps",
+ },
+ {
+ "category": "splitable_main",
+ "role": "mixer | video | phone",
+ "area": "split.main",
+ "description": "For split test, video and music are included here",
+ "layer": "apps",
+ },
+ {
+ "category": "splitable_sub",
+ "role": "music | radio | poi",
+ "area": "split.sub",
+ "description": "For split test, video and music are included here",
+ "layer": "apps",
+ },
+ {
+ "category": "software_keyboard",
+ "role": "software_keyboard",
+ "area": "software_keyboard",
+ "layer": "near_homescreen",
+ },
+ {
+ "category": "pop_up",
+ "role": "on_screen | on_screen_phone | onscreen",
+ "area": "on_screen",
+ "layer": "on_screen",
+ },
+ {
+ "category": "system_alert",
+ "role": "system_alert",
+ "area": "on_screen",
+ "layer": "on_screen",
+ },
+ {
+ "category": "tbt",
+ "role": "tbtnavi",
+ "area": "master.split.sub",
+ "layer": "remote",
+ },
+ {
+ "category": "meter",
+ "role": "tachometer",
+ "area": "split.main | normal.full",
+ "layer": "apps",
+ },
+ {
+ "category": "receiver",
+ "role": "receiver",
+ "area": "split.sub | normal.full",
+ "layer": "apps",
+ }
+ ]
+ },
+ {
+ "name": "slave",
+ "roles":[
+ {
+ "category": "homescreen",
+ "role": "homescreen",
+ "area": "fullscreen",
+ "layer": "homescreen",
+ },
+ {
+ "category": "map",
+ "role": "navigation",
+ "area": "normal.full | split.main | fullscreen",
+ "layer": "apps",
+ },
+ {
+ "category": "general",
+ "role": "launcher | poi | browser | mixer | radio | hvac | debug | phone | fallback",
+ "area": "normal.full",
+ "description": "For split test, video and music are moved to category:splitable",
+ "layer": "apps",
+ },
+ {
+ "category": "system",
+ "role": "settings | dashboard",
+ "area": "normal.full",
+ "layer": "apps",
+ },
+ {
+ "category": "splitable",
+ "role": "video | music | sdl | webbrowser | eb",
+ "area": "normal.full | split.main | split.sub",
+ "description": "For split test, video and music are included here",
+ "layer": "apps",
+ },
+ {
+ "category": "software_keyboard",
+ "role": "software_keyboard",
+ "area": "software_keyboard",
+ "layer": "near_homescreen",
+ },
+ {
+ "category": "restriction",
+ "role": "restriction",
+ "area": "restriction.normal | restriction.split.main | restriction.split.sub",
+ "layer": "restriction",
+ },
+ {
+ "category": "pop_up",
+ "role": "on_screen | on_screen_phone | onscreen",
+ "area": "on_screen",
+ "layer": "on_screen",
+ },
+ {
+ "category": "system_alert",
+ "role": "system_alert",
+ "area": "on_screen",
+ "layer": "on_screen",
+ },
+ {
+ "category": "tbt",
+ "role": "tbtnavi",
+ "area": "master.split.sub",
+ "layer": "remote",
+ },
+ {
+ "category": "meter",
+ "role": "tachometer",
+ "area": "split.main | normal.full",
+ "layer": "apps",
+ },
+ {
+ "category": "receiver",
+ "role": "receiver",
+ "area": "split.sub | normal.full",
+ "layer": "apps",
+ }
+ ]
+ }
+ ]
+}
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/policy_manager.cpp b/demo#3/common/agl-service-windowmanager/policy_manager/policy_manager.cpp
new file mode 100644
index 0000000..05f2ccb
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/policy_manager.cpp
@@ -0,0 +1,1677 @@
+/*
+ * Copyright (c) 2018 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <fstream>
+#include <sstream>
+#include <istream>
+#include <thread>
+#include <map>
+#include <algorithm>
+#include <json-c/json.h>
+#include "policy_manager.hpp"
+#include "util.hpp"
+
+extern "C"
+{
+#define AFB_BINDING_VERSION 2
+#include <afb/afb-binding.h>
+#include <systemd/sd-event.h>
+#include "stm.h"
+}
+
+namespace pm
+{
+static const char kPathRolesConfigFile[] = "/etc/roles.json";
+static const char kPathLayoutsConfigFile[] = "/etc/layouts.json";
+
+static const int kInvisibleRoleHistoryNum = 5;
+
+static PolicyManager *g_context;
+
+static int transitionStateWrapper(sd_event_source *source, void *data)
+{
+ int ret = g_context->transitionState(source, data);
+ return ret;
+}
+
+static int timerEventWrapper(sd_event_source *source, uint64_t usec, void *data)
+{
+ int ret = g_context->timerEvent(source, usec, data);
+ return ret;
+}
+
+} // namespace pm
+
+PolicyManager::PolicyManager()
+ : eventname2no(),
+ categoryname2no(),
+ areaname2no(),
+ role2category(),
+ category2role(),
+ category2areas()
+{
+ this->p_crr_state = new (StmState);
+ this->p_prv_state = new (StmState);
+}
+
+PolicyManager::~PolicyManager()
+{
+ delete this->p_crr_state;
+ delete this->p_prv_state;
+}
+
+int PolicyManager::initialize(std::string ecu_name)
+{
+ int ret = 0;
+
+ // Set ECU name
+ this->ecu_name = ecu_name;
+
+ // Create convert map
+ for (int i = StmEvtNoMin; i <= StmEvtNoMax; i++)
+ {
+ HMI_DEBUG("event name:%s no:%d", kStmEventName[i], i);
+ this->eventname2no[kStmEventName[i]] = i;
+ }
+
+ for (int i = StmCtgNoMin; i <= StmCtgNoMax; i++)
+ {
+ HMI_DEBUG("category name:%s no:%d", kStmCategoryName[i], i);
+ this->categoryname2no[kStmCategoryName[i]] = i;
+ }
+
+ for (int i = StmAreaNoMin; i <= StmAreaNoMax; i++)
+ {
+ HMI_DEBUG("area name:%s no:%d", kStmAreaName[i], i);
+ this->areaname2no[kStmAreaName[i]] = i;
+ }
+
+ // Load roles config
+ ret = this->loadRolesConfigFile();
+ if (0 > ret)
+ {
+ HMI_ERROR("Load roles config file Error!!");
+ return ret;
+ }
+
+ // Load layouts config
+ ret = this->loadLayoutsConfigFile();
+ if (0 > ret)
+ {
+ HMI_ERROR("Load layouts config file Error!!");
+ return ret;
+ }
+
+ // Initialize state which is managed by PolicyManager
+ this->initializeState();
+
+ // Initialize StateTransitioner
+ stmInitialize(ecu_name.c_str());
+
+ // Store instance
+ pm::g_context = this;
+
+ return ret;
+}
+
+void PolicyManager::registerCallback(CallbackTable callback)
+{
+ this->callback.onStateTransitioned = callback.onStateTransitioned;
+ this->callback.onError = callback.onError;
+}
+
+int PolicyManager::setInputEventData(json_object *json_in)
+{
+ // Check arguments
+ if (nullptr == json_in)
+ {
+ HMI_ERROR("Argument is NULL!!");
+ return -1;
+ }
+
+ // Get event from json_object
+ const char *event = this->getStringFromJson(json_in, "event");
+ int event_no = StmEvtNoNone;
+ if (nullptr != event)
+ {
+ // Convert name to number
+ auto itr = this->eventname2no.find(event);
+ if (this->eventname2no.end() != itr)
+ {
+ event_no = this->eventname2no[event];
+ HMI_DEBUG("event(%s:%d)", event, event_no);
+ }
+ else
+ {
+ HMI_ERROR("Invalid event name!!");
+ return -1;
+ }
+ }
+ else
+ {
+ HMI_ERROR("Event is not set!!");
+ return -1;
+ }
+
+ // Get role from json_object
+ const char *role = this->getStringFromJson(json_in, "role");
+ std::string category = "";
+ int category_no = StmCtgNoNone;
+ if (nullptr != role)
+ {
+ HMI_DEBUG("role(%s)", role);
+
+ // Convert role to category
+ auto itr = this->role2category.find(role);
+ if (this->role2category.end() != itr)
+ {
+ category = this->role2category[role];
+ }
+ else
+ {
+ itr = this->role2category.find("fallback");
+ if (this->role2category.end() != itr)
+ {
+ HMI_DEBUG("Role:%s is not registered in roles config file, fallback as normal app", role);
+ category = this->role2category["fallback"];
+ }
+ }
+
+ if ("" != category)
+ {
+ // Convert name to number
+ category_no = categoryname2no[category];
+ HMI_DEBUG("category(%s:%d)", category.c_str(), category_no);
+ }
+ }
+ if (StmCtgNoNone == category_no)
+ {
+ role = "";
+ }
+
+ // Get area from json_object
+ const char *area = this->getStringFromJson(json_in, "area");
+ int area_no = StmAreaNoNone;
+ if ((nullptr != area) && (StmCtgNoNone != category_no))
+ {
+ for (const auto &x : this->category2areas[category])
+ {
+ if (x == std::string(area))
+ {
+ area_no = this->areaname2no[area];
+ break;
+ }
+ }
+ if (StmAreaNoNone == area_no)
+ {
+ area = this->category2areas[category].front().c_str();
+ area_no = this->areaname2no[area];
+ }
+ HMI_DEBUG("area(%s:%d)", area, area_no);
+ }
+
+ // Set event info to the queue
+ EventInfo event_info;
+ int event_id = STM_CREATE_EVENT_ID(event_no, category_no, area_no);
+ event_info.event = event_id;
+ event_info.role = std::string(role);
+ event_info.delay = 0;
+ this->event_info_queue.push(event_info);
+
+ return 0;
+}
+
+int PolicyManager::executeStateTransition()
+{
+ int ret;
+ EventInfo event_info;
+
+ // Get event info from queue and delete
+ event_info = this->event_info_queue.front();
+ this->event_info_queue.pop();
+
+ // Set event info to check policy
+ ret = this->setStateTransitionProcessToSystemd(event_info.event,
+ event_info.delay,
+ event_info.role);
+ return ret;
+}
+
+void PolicyManager::undoState()
+{
+ HMI_DEBUG("Undo State !!!");
+
+ // Undo state of STM
+ stmUndoState();
+
+ HMI_DEBUG(">>>>>>>>>> BEFORE UNDO");
+ this->dumpLayerState(this->crr_layers);
+
+ this->crr_layers = this->prv_layers;
+ this->crr_invisible_role_history = this->prv_invisible_role_history;
+
+ HMI_DEBUG(">>>>>>>>>> AFTER UNDO");
+ this->dumpLayerState(this->crr_layers);
+}
+
+void PolicyManager::initializeState()
+{
+ this->initializeModeState();
+ this->initializeLayerState();
+}
+
+void PolicyManager::initializeModeState()
+{
+ Mode init_car_ele;
+ init_car_ele.state = "none";
+ init_car_ele.changed = false;
+
+ for (int i = StmCarElementNoMin; i <= StmCarElementNoMax; i++)
+ {
+ const char *car_ele_name = kStmCarElementName[i];
+ this->crr_car_elements[car_ele_name] = init_car_ele;
+ }
+
+ this->prv_car_elements = this->crr_car_elements;
+}
+
+void PolicyManager::initializeLayerState()
+{
+ AreaState init_area;
+ LayoutState init_layout;
+ init_area.name = kStmAreaName[StmAreaNoNone];
+ init_area.category = kStmCategoryName[StmCtgNoNone];
+ init_area.role = "";
+ init_layout.name = kStmLayoutName[StmLayoutNoNone];
+ init_layout.area_list.push_back(init_area);
+
+ for (int i = StmLayerNoMin; i <= StmLayerNoMax; i++)
+ {
+ const char *layer_name = kStmLayerName[i];
+ this->crr_layers[layer_name].name = layer_name;
+ this->crr_layers[layer_name].layout_state = init_layout;
+ this->crr_layers[layer_name].changed = false;
+ }
+
+ this->prv_layers = this->crr_layers;
+}
+
+void PolicyManager::addStateToJson(const char *name, bool changed,
+ std::string state, json_object **json_out)
+{
+ if ((nullptr == name) || (nullptr == json_out))
+ {
+ HMI_ERROR("Invalid argument!!!");
+ return;
+ }
+
+ json_object_object_add(*json_out, "name", json_object_new_string(name));
+ json_object_object_add(*json_out, "state", json_object_new_string(state.c_str()));
+ json_object_object_add(*json_out, "changed", json_object_new_boolean(changed));
+}
+
+void PolicyManager::addStateToJson(const char *layer_name, bool changed,
+ AreaList area_list, json_object **json_out)
+{
+ if ((nullptr == layer_name) || (nullptr == json_out))
+ {
+ HMI_ERROR("Invalid argument!!!");
+ return;
+ }
+
+ json_object *json_areas = json_object_new_array();
+ json_object *json_tmp;
+ for (const auto &as : area_list)
+ {
+ json_tmp = json_object_new_object();
+ json_object_object_add(json_tmp, "name", json_object_new_string(as.name.c_str()));
+ json_object_object_add(json_tmp, "role", json_object_new_string(as.role.c_str()));
+ json_object_array_add(json_areas, json_tmp);
+ }
+
+ json_object_object_add(*json_out, "name", json_object_new_string(layer_name));
+ json_object_object_add(*json_out, "changed", json_object_new_boolean(changed));
+ json_object_object_add(*json_out, "areas", json_areas);
+}
+
+void PolicyManager::updateState(int event_id)
+{
+ this->updateModeState();
+ this->updateLayer(event_id);
+}
+
+void PolicyManager::updateModeState()
+{
+ int car_state_no;
+ std::string car_state;
+ bool changed;
+
+ // Store previous layers
+ this->prv_car_elements = this->crr_car_elements;
+
+ // Update car elements
+ HMI_DEBUG(">>> CAR ELEMENTS");
+ for (int car_ele_no = StmCarElementNoMin;
+ car_ele_no <= StmCarElementNoMax; car_ele_no++)
+ {
+ const char *car_ele_name = kStmCarElementName[car_ele_no];
+
+ car_state_no = this->p_crr_state->car_element[car_ele_no].state;
+ car_state = kStmCarElementStateNameList[car_ele_no][car_state_no];
+ changed = (this->p_crr_state->car_element[car_ele_no].changed) ? true : false;
+
+ this->crr_car_elements[car_ele_name].state = car_state;
+ this->crr_car_elements[car_ele_name].changed = changed;
+
+ HMI_DEBUG(">>> >>> NAME: %s", car_ele_name);
+ HMI_DEBUG(">>> >>> >>> STATE:%s", car_state.c_str());
+ HMI_DEBUG(">>> >>> >>> CHANGED:%s", (changed) ? "true" : "false");
+ }
+}
+
+void PolicyManager::updateLayer(int event_id)
+{
+ for (int layer_no = StmLayerNoMin;
+ layer_no <= StmLayerNoMax; layer_no++)
+ {
+ HMI_DEBUG(">>> LAYER:%s CHANGED:%d LAYOUT:%s",
+ kStmLayerName[layer_no], this->p_crr_state->layer[layer_no].changed,
+ kStmLayoutName[this->p_crr_state->layer[layer_no].state]);
+ }
+
+ // Store previous layers
+ this->prv_layers = this->crr_layers;
+
+ // Store previous role history
+ this->prv_invisible_role_history = this->crr_invisible_role_history;
+
+ // Update layers
+ for (int layer_no = StmLayerNoMin;
+ layer_no <= StmLayerNoMax; layer_no++)
+ {
+ const char *layer_name = kStmLayerName[layer_no];
+
+ // If restriction mode is changed to mode2 on,
+ // store current state for state of restriction mode off
+ if (this->changedRestrictionModeTo2On() ||
+ this->changedLightstatusBrakeOnToOff())
+ {
+ HMI_DEBUG("Store current state for state of restriction mode off");
+ this->prv_layers_car_stop[layer_name] = this->crr_layers[layer_name];
+ }
+
+ // This layer is changed?
+ int changed = this->p_crr_state->layer[layer_no].changed;
+ if (changed)
+ {
+ HMI_DEBUG(">>>>>>>>>> Update layout of layer:%s", layer_name);
+
+ // Get current layout name of this layer
+ int crr_layout_state_no = this->p_crr_state->layer[layer_no].state;
+ std::string crr_layout_name = std::string(kStmLayoutName[crr_layout_state_no]);
+
+ LayoutState crr_layout_state;
+ changed = this->updateLayout(event_id, layer_no,
+ crr_layout_name, crr_layout_state);
+
+ // Update current layout of this layer
+ this->crr_layers[layer_name].layout_state = crr_layout_state;
+ }
+ else
+ {
+ int category_no = STM_GET_CATEGORY_FROM_ID(event_id);
+ std::string req_ctg = kStmCategoryName[category_no];
+ std::string req_role = this->req_role_list[event_id];
+ for (const auto &ctg : this->layer2categories[layer_name])
+ {
+ if (ctg == req_ctg)
+ {
+ // If layer is not changed and requested role is in this layer,
+ // push requested role to history stack
+ // because the application which has this role have been started
+ HMI_DEBUG("Add requested role to history "
+ "because the application which has this role have been started");
+ this->pushInvisibleRoleHistory(req_ctg, req_role);
+ }
+ }
+ }
+
+ // Update changed flag
+ this->crr_layers[layer_name].changed = (changed) ? true : false;
+ }
+
+ // Erase role for the event_id from list
+ this->req_role_list.erase(event_id);
+
+ HMI_DEBUG(">>>>>>>>>> DUMP LAYERS (BEFORE)");
+ this->dumpLayerState(this->prv_layers);
+
+ HMI_DEBUG(">>>>>>>>>> DUMP LAYERS (AFTER)");
+ this->dumpLayerState(this->crr_layers);
+
+ this->dumpInvisibleRoleHistory();
+}
+
+int PolicyManager::updateLayout(int event_id, int layer_no,
+ std::string crr_layout_name, LayoutState &crr_layout_state)
+{
+ int changed = 1;
+
+ int event_no = STM_GET_EVENT_FROM_ID(event_id);
+ int category_no = STM_GET_CATEGORY_FROM_ID(event_id);
+ int area_no = STM_GET_AREA_FROM_ID(event_id);
+
+ std::string req_evt = kStmEventName[event_no];
+ std::string req_ctg = kStmCategoryName[category_no];
+ std::string req_area = kStmAreaName[area_no];
+ std::string req_role = this->req_role_list[event_id];
+
+ const char *layer_name = kStmLayerName[layer_no];
+
+ // Get previous layout name of this layer
+ LayoutState prv_layout_state = this->prv_layers[layer_name].layout_state;
+ std::string prv_layout_name = prv_layout_state.name;
+
+ if (this->changedRestrictionMode2OnToOther() ||
+ this->changedLightstatusBrakeOffToOn())
+ {
+ // If restriction mode is changed from mode2 -> mode1,
+ // restore state of restriction mode off
+ HMI_DEBUG("Restriction mode is changed from mode2 -> mode1, so restore state of restriction mode off");
+ crr_layout_state = this->prv_layers_car_stop[layer_name].layout_state;
+ crr_layout_name = crr_layout_state.name;
+ if ((prv_layout_name == crr_layout_name) &&
+ (kStmAreaName[StmAreaNoNone] == crr_layout_name))
+ {
+ changed = 0;
+ }
+ else
+ {
+ // If the roles which is exist in previous layout is not in current,
+ // push to role history
+ for (const auto &prv_as : prv_layout_state.area_list)
+ {
+ for (const auto &crr_as : crr_layout_state.area_list)
+ {
+ if (prv_as.role == crr_as.role)
+ break;
+ }
+
+ this->pushInvisibleRoleHistory(prv_as.category, prv_as.role);
+ }
+ }
+ }
+ else if ((prv_layout_name == crr_layout_name) &&
+ (kStmLayoutName[StmLayoutNoNone] == crr_layout_name))
+ {
+ // If previous and current layout are none
+ // Copy previous layout state for current
+ crr_layout_state = prv_layout_state;
+ changed = 0;
+ }
+ else
+ {
+ crr_layout_state = prv_layout_state;
+ changed = 1;
+
+ HMI_DEBUG("-- layout name previous:%s current:%s",
+ prv_layout_name.c_str(), crr_layout_name.c_str());
+ if (prv_layout_name == crr_layout_name)
+ {
+ HMI_DEBUG("---- Previous layout is same with current");
+ }
+ else
+ {
+ // If previous layout is NOT same with current,
+ // current areas is set with default value
+ HMI_DEBUG("---- Previous layout is NOT same with current");
+ crr_layout_state.name = this->default_layouts[crr_layout_name].name;
+ crr_layout_state.category_num = this->default_layouts[crr_layout_name].category_num;
+ crr_layout_state.area_list = this->default_layouts[crr_layout_name].area_list;
+ }
+
+ // Create candidate list
+ std::map<std::string, AreaList> cand_list;
+ // for (int ctg_no = StmCtgNoMin;
+ // ctg_no <= StmCtgNoMax; ctg_no++)
+ // {
+ for (const auto &ctg : this->layer2categories[layer_name])
+ {
+ // if (ctg_no == StmCtgNoNone)
+ // {
+ // continue;
+ // }
+
+ // const char *ctg = kStmCategoryName[ctg_no];
+ HMI_DEBUG("-- Create candidate list for ctg:%s", ctg.c_str());
+
+ AreaList tmp_cand_list;
+ int candidate_num = 0;
+ int blank_num = crr_layout_state.category_num[ctg];
+
+ // If requested event is "activate"
+ // and there are requested category and area,
+ // update area with requested role in current layout.
+ bool request_for_this_layer = false;
+ std::string used_role = "";
+ if ((ctg == req_ctg) && ("activate" == req_evt))
+ {
+ HMI_DEBUG("---- Requested event is activate");
+ for (AreaState &as : crr_layout_state.area_list)
+ {
+ if (as.category == req_ctg)
+ {
+ request_for_this_layer = true;
+
+ if (as.name == req_area)
+ {
+ as.role = req_role;
+ used_role = req_role;
+ blank_num--;
+ HMI_DEBUG("------ Update current layout: area:%s category:%s role:%s",
+ as.name.c_str(), as.category.c_str(), as.role.c_str());
+ break;
+ }
+ }
+ }
+ }
+
+ // Create candidate list for category from the previous displayed categories
+ for (AreaState area_state : prv_layout_state.area_list)
+ {
+ if ((ctg == area_state.category) &&
+ (used_role != area_state.role))
+ {
+ // If there is the category
+ // which is same with new category and not used for updating yet,
+ // push it to list
+ HMI_DEBUG("---- Push previous(category:%s role:%s) to candidate list",
+ area_state.category.c_str(), area_state.role.c_str());
+ tmp_cand_list.push_back(area_state);
+ candidate_num++;
+ }
+ }
+
+ // If NOT updated by requested area:
+ // there is not requested area in new layout,
+ // so push requested role to candidate list
+ if (request_for_this_layer && ("" == used_role))
+ {
+ HMI_DEBUG("---- Push request(area:%s category:%s role:%s) to candidate list",
+ req_area.c_str(), req_ctg.c_str(), req_role.c_str());
+ AreaState area_state;
+ area_state.name = req_area;
+ area_state.category = req_ctg;
+ area_state.role = req_role;
+ tmp_cand_list.push_back(area_state);
+ candidate_num++;
+ }
+
+ HMI_DEBUG("---- blank_num:%d candidate_num:%d", blank_num, candidate_num);
+
+ // Compare number of candidate/blank,
+ // And remove role in order of the oldest as necessary
+ if (candidate_num < blank_num)
+ {
+ // Refer history stack
+ // and add to the top of tmp_cand_list in order to the newest
+ while (candidate_num != blank_num)
+ {
+ AreaState area_state;
+ area_state.name = kStmAreaName[StmAreaNoNone];
+ area_state.category = ctg;
+ area_state.role = this->popInvisibleRoleHistory(ctg);
+ if ("" == area_state.role)
+ {
+ HMI_ERROR("There is no role in history stack!!");
+ }
+ tmp_cand_list.push_back(area_state);
+ HMI_DEBUG("------ Add role:%s to candidate list",
+ area_state.role.c_str());
+ candidate_num++;
+ }
+ }
+ else if (candidate_num > blank_num)
+ {
+ // Remove the oldest role from candidate list
+ while (candidate_num != blank_num)
+ {
+ std::string removed_role = tmp_cand_list.begin()->role;
+ HMI_DEBUG("------ Remove the oldest role:%s from candidate list",
+ removed_role.c_str());
+ tmp_cand_list.erase(tmp_cand_list.begin());
+ candidate_num--;
+
+ // Push removed data to history stack
+ this->pushInvisibleRoleHistory(ctg, removed_role);
+
+ // Remove from current layout
+ for (AreaState &as : crr_layout_state.area_list)
+ {
+ if (as.role == removed_role)
+ {
+ as.role = "";
+ }
+ }
+ }
+ }
+ else
+ { // (candidate_num == blank_num)
+ // nop
+ }
+
+ cand_list[ctg] = tmp_cand_list;
+ }
+
+ // Update areas
+ HMI_DEBUG("-- Update areas by using candidate list");
+ for (AreaState &as : crr_layout_state.area_list)
+ {
+ HMI_DEBUG("---- Check area:%s category:%s role:%s",
+ as.name.c_str(), as.category.c_str(), as.role.c_str());
+ if ("" == as.role)
+ {
+ HMI_DEBUG("------ Update this area with role:%s",
+ cand_list[as.category].begin()->role.c_str());
+ as.role = cand_list[as.category].begin()->role;
+ cand_list[as.category].erase(cand_list[as.category].begin());
+ }
+ }
+ }
+ return changed;
+}
+
+void PolicyManager::createOutputInformation(json_object **json_out)
+{
+ json_object *json_tmp;
+
+ // Create car element information
+ // {
+ // "car_elements": [
+ // {
+ // "parking_brake": {
+ // "changed": <bool>,
+ // "state": <const char*>
+ // },
+ // ...
+ // },
+ json_object *json_car_ele = json_object_new_array();
+ const char *car_ele_name;
+ for (int car_ele_no = StmCarElementNoMin;
+ car_ele_no <= StmCarElementNoMax; car_ele_no++)
+ {
+ car_ele_name = kStmCarElementName[car_ele_no];
+ json_tmp = json_object_new_object();
+ this->addStateToJson(car_ele_name,
+ this->crr_car_elements[car_ele_name].changed,
+ this->crr_car_elements[car_ele_name].state,
+ &json_tmp);
+ json_object_array_add(json_car_ele, json_tmp);
+ }
+ json_object_object_add(*json_out, "car_elements", json_car_ele);
+
+ // Create layout information
+ //
+ // "layers": [
+ // {
+ // "homescreen": {
+ // "changed": <bool>,
+ // "areas": [
+ // {
+ // "name":<const char*>,
+ // "role":<const char*>
+ // }.
+ // ...
+ // ]
+ // }
+ // },
+ // ...
+ json_object *json_layer = json_object_new_array();
+ const char *layer_name;
+ for (int layer_no = StmLayerNoMin;
+ layer_no <= StmLayerNoMax; layer_no++)
+ {
+ layer_name = kStmLayerName[layer_no];
+ json_tmp = json_object_new_object();
+ this->addStateToJson(layer_name,
+ this->crr_layers[layer_name].changed,
+ this->crr_layers[layer_name].layout_state.area_list,
+ &json_tmp);
+ json_object_array_add(json_layer, json_tmp);
+ }
+ json_object_object_add(*json_out, "layers", json_layer);
+}
+
+void PolicyManager::controlTimerEvent()
+{
+ if (this->p_crr_state->car_element[StmCarElementNoRunning].changed)
+ {
+ if (StmRunningNoRun == this->p_crr_state->car_element[StmCarElementNoRunning].state)
+ {
+ // Set delay event(restriction mode on)
+ this->setStateTransitionProcessToSystemd(StmEvtNoRestrictionModeOn,
+ 3000, "");
+ }
+ else if (StmRunningNoStop ==
+ this->p_crr_state->car_element[StmCarElementNoRunning].state)
+ {
+ // Stop timer for restriction on event
+ if (this->event_source_list.find(StmEvtNoRestrictionModeOn) !=
+ this->event_source_list.end())
+ {
+ HMI_DEBUG("Stop timer for restriction on");
+ sd_event_source *event_source = this->event_source_list[StmEvtNoRestrictionModeOn];
+ int ret = sd_event_source_set_enabled(event_source, SD_EVENT_OFF);
+ if (0 > ret)
+ {
+ HMI_ERROR("Failed to stop timer");
+ }
+ }
+
+ // Set event(restriction mode off)
+ this->setStateTransitionProcessToSystemd(StmEvtNoRestrictionModeOff, 0, "");
+ }
+ }
+}
+
+int PolicyManager::transitionState(sd_event_source *source, void *data)
+{
+ HMI_DEBUG(">>>>>>>>>> START STATE TRANSITION");
+
+ int event_id = *((int *)data);
+
+ int event_no, category_no, area_no;
+ event_no = STM_GET_EVENT_FROM_ID(event_id);
+ category_no = STM_GET_CATEGORY_FROM_ID(event_id);
+ area_no = STM_GET_AREA_FROM_ID(event_id);
+ HMI_DEBUG(">>>>>>>>>> EVENT:%s CATEGORY:%s AREA:%s",
+ kStmEventName[event_no],
+ kStmCategoryName[category_no],
+ kStmAreaName[area_no]);
+
+ // Store current state
+ *(this->p_prv_state) = *(this->p_crr_state);
+
+ // Transition state
+ int ret = stmTransitionState(event_id, this->p_crr_state);
+ if (0 > ret)
+ {
+ HMI_ERROR("Failed transition state");
+ if (nullptr != this->callback.onError)
+ {
+ json_object *json_out = json_object_new_object();
+ json_object_object_add(json_out, "message",
+ json_object_new_string("Failed to transition state"));
+ json_object_object_add(json_out, "event",
+ json_object_new_string(kStmEventName[event_no]));
+ json_object_object_add(json_out, "role",
+ json_object_new_string(this->req_role_list[event_id].c_str()));
+ json_object_object_add(json_out, "area",
+ json_object_new_string(kStmAreaName[area_no]));
+ this->callback.onError(json_out);
+ json_object_put(json_out);
+ }
+ return -1;
+ }
+
+ // Update state which is managed by PolicyManager
+ this->updateState(event_id);
+
+ // Create output information for ResourceManager
+ json_object *json_out = json_object_new_object();
+ this->createOutputInformation(&json_out);
+
+ // Notify changed state
+ if (nullptr != this->callback.onStateTransitioned)
+ {
+ this->callback.onStateTransitioned(json_out);
+ }
+
+ // Start/Stop timer events
+ this->controlTimerEvent();
+
+ // Release json_object
+ json_object_put(json_out);
+
+ // Release data
+ delete (int *)data;
+
+ // Destroy sd_event_source object
+ sd_event_source_unref(source);
+
+ // Remove event source from list
+ if (this->event_source_list.find(event_id) != this->event_source_list.end())
+ {
+ this->event_source_list.erase(event_id);
+ }
+
+ HMI_DEBUG(">>>>>>>>>> FINISH STATE TRANSITION");
+ return 0;
+}
+
+int PolicyManager::timerEvent(sd_event_source *source, uint64_t usec, void *data)
+{
+ HMI_DEBUG("Call");
+
+ int ret = this->transitionState(source, data);
+ return ret;
+}
+
+int PolicyManager::setStateTransitionProcessToSystemd(int event_id, uint64_t delay_ms, std::string role)
+{
+ struct sd_event_source *event_source;
+ HMI_DEBUG("event_id:0x%x delay:%d role:%s", event_id, delay_ms, role.c_str());
+
+ if (0 == delay_ms)
+ {
+ int ret = sd_event_add_defer(afb_daemon_get_event_loop(), &event_source,
+ &pm::transitionStateWrapper, new int(event_id));
+ if (0 > ret)
+ {
+ HMI_ERROR("Faild to sd_event_add_defer: errno:%d", ret);
+ return -1;
+ }
+ }
+ else
+ {
+ // Get current time
+ struct timespec time_spec;
+ clock_gettime(CLOCK_BOOTTIME, &time_spec);
+
+ // Calculate timer fired time
+ uint64_t usec = (time_spec.tv_sec * 1000000) + (time_spec.tv_nsec / 1000) + (delay_ms * 1000);
+
+ // Set timer
+ int ret = sd_event_add_time(afb_daemon_get_event_loop(), &event_source,
+ CLOCK_BOOTTIME, usec, 1,
+ &pm::timerEventWrapper, new int(event_id));
+ if (0 > ret)
+ {
+ HMI_ERROR("Faild to sd_event_add_time: errno:%d", ret);
+ return -1;
+ }
+ }
+ // Store event source
+ this->event_source_list[event_id] = event_source;
+ // Store requested role
+ this->req_role_list[event_id] = role;
+ return 0;
+}
+
+bool PolicyManager::changedRestrictionModeTo2On()
+{
+ // TODO: If possible thie process should be include in zipc stm in the future
+ if (this->p_crr_state->car_element[StmCarElementNoRestrictionMode].changed &&
+ (StmRestrictionModeSttNoOn != this->p_prv_state->car_element[StmCarElementNoRestrictionMode].state) &&
+ (StmRestrictionModeSttNoOn == this->p_crr_state->car_element[StmCarElementNoRestrictionMode].state))
+ {
+ return true;
+ }
+ return false;
+}
+
+bool PolicyManager::changedRestrictionMode2OnToOther()
+{
+ // TODO: If possible thie process should be include in zipc stm in the future
+ if (this->p_crr_state->car_element[StmCarElementNoRestrictionMode].changed &&
+ (StmRestrictionModeSttNoOn == this->p_prv_state->car_element[StmCarElementNoRestrictionMode].state) &&
+ (StmRestrictionModeSttNoOn != this->p_crr_state->car_element[StmCarElementNoRestrictionMode].state))
+ {
+ return true;
+ }
+ return false;
+}
+
+bool PolicyManager::changedLightstatusBrakeOffToOn()
+{
+ // TODO: For master
+ // If possible thie process should be include in zipc stm in the future
+ if (("master" == this->ecu_name) &&
+ this->p_crr_state->car_element[StmCarElementNoLightstatusBrake].changed &&
+ (StmLightstatusBrakeSttNoOff == this->p_prv_state->car_element[StmCarElementNoLightstatusBrake].state) &&
+ (StmLightstatusBrakeSttNoOn == this->p_crr_state->car_element[StmCarElementNoLightstatusBrake].state))
+ {
+ return true;
+ }
+ return false;
+}
+
+bool PolicyManager::changedLightstatusBrakeOnToOff()
+{
+ // TODO: For master
+ // If possible thie process should be include in zipc stm in the future
+ if (("master" == this->ecu_name) &&
+ this->p_crr_state->car_element[StmCarElementNoLightstatusBrake].changed &&
+ (StmLightstatusBrakeSttNoOn == this->p_prv_state->car_element[StmCarElementNoLightstatusBrake].state) &&
+ (StmLightstatusBrakeSttNoOff == this->p_crr_state->car_element[StmCarElementNoLightstatusBrake].state))
+ {
+ return true;
+ }
+ return false;
+}
+
+int PolicyManager::loadRolesConfigFile()
+{
+ std::string file_name;
+
+ // Get afm application installed dir
+ char const *afm_app_install_dir = getenv("AFM_APP_INSTALL_DIR");
+ HMI_DEBUG("afm_app_install_dir:%s", afm_app_install_dir);
+
+ if (!afm_app_install_dir)
+ {
+ HMI_ERROR("AFM_APP_INSTALL_DIR is not defined");
+ }
+ else
+ {
+ file_name = std::string(afm_app_install_dir) + std::string(pm::kPathRolesConfigFile);
+ }
+
+ // Load roles config file
+ json_object *json_obj;
+ int ret = this->inputJsonFilie(file_name.c_str(), &json_obj);
+ if (0 > ret)
+ {
+ HMI_ERROR("Could not open %s, so use default role information", pm::kPathRolesConfigFile);
+ json_obj = json_tokener_parse(kDefaultRolesConfig);
+ }
+ HMI_DEBUG("json_obj dump:%s", json_object_get_string(json_obj));
+
+ // Parse ecus
+ json_object *json_cfg;
+ if (!json_object_object_get_ex(json_obj, "ecus", &json_cfg))
+ {
+ HMI_ERROR("Parse Error!!");
+ return -1;
+ }
+
+ int num_ecu = json_object_array_length(json_cfg);
+ HMI_DEBUG("json_cfg(ecus) len:%d", num_ecu);
+
+ const char* c_ecu_name;
+ json_object *json_ecu;
+ for (int i = 0; i < num_ecu; i++)
+ {
+ json_ecu= json_object_array_get_idx(json_cfg, i);
+
+ c_ecu_name = this->getStringFromJson(json_ecu, "name");
+ if (nullptr == c_ecu_name)
+ {
+ HMI_ERROR("Parse Error!!");
+ return -1;
+ }
+
+ if (std::string(c_ecu_name) == this->ecu_name)
+ {
+ break;
+ }
+ else
+ {
+ json_ecu = nullptr;
+ }
+ }
+
+ if (!json_ecu)
+ {
+ HMI_ERROR("Areas for ecu:%s is NOT exist!!", this->ecu_name.c_str());
+ return -1;
+ }
+
+ // Parse roles
+ json_object *json_roles;
+ if (!json_object_object_get_ex(json_ecu, "roles", &json_roles))
+ {
+ HMI_ERROR("Parse Error!!");
+ return -1;
+ }
+
+ int len = json_object_array_length(json_roles);
+ HMI_DEBUG("json_cfg len:%d", len);
+ HMI_DEBUG("json_cfg dump:%s", json_object_get_string(json_roles));
+
+ json_object *json_tmp;
+ const char *category;
+ const char *roles;
+ const char *areas;
+ const char *layer;
+ for (int i = 0; i < len; i++)
+ {
+ json_tmp = json_object_array_get_idx(json_roles, i);
+
+ category = this->getStringFromJson(json_tmp, "category");
+ roles = this->getStringFromJson(json_tmp, "role");
+ areas = this->getStringFromJson(json_tmp, "area");
+ layer = this->getStringFromJson(json_tmp, "layer");
+
+ if ((nullptr == category) || (nullptr == roles) ||
+ (nullptr == areas) || (nullptr == layer))
+ {
+ HMI_ERROR("Parse Error!!");
+ return -1;
+ }
+
+ // Parse roles by '|'
+ std::vector<std::string> vct_roles;
+ vct_roles = this->parseString(std::string(roles), '|');
+
+ // Parse areas by '|'
+ Areas vct_areas;
+ vct_areas = this->parseString(std::string(areas), '|');
+
+ // Set role, category, areas
+ for (auto itr = vct_roles.begin(); itr != vct_roles.end(); ++itr)
+ {
+ this->role2category[*itr] = std::string(category);
+ }
+ this->category2role[category] = std::string(roles);
+ this->category2areas[category] = vct_areas;
+ this->layer2categories[layer].push_back(category);
+ }
+
+ // Check
+ HMI_DEBUG("Check role2category");
+ for (const auto &x : this->role2category)
+ {
+ HMI_DEBUG("key:%s, val:%s", x.first.c_str(), x.second.c_str());
+ }
+
+ HMI_DEBUG("Check category2role");
+ for (const auto &x : this->category2role)
+ {
+ HMI_DEBUG("key:%s, val:%s", x.first.c_str(), x.second.c_str());
+ }
+
+ HMI_DEBUG("Check category2areas");
+ for (const auto &x : this->category2areas)
+ {
+ for (const auto &y : x.second)
+ {
+ HMI_DEBUG("key:%s, val:%s", x.first.c_str(), y.c_str());
+ }
+ }
+
+ HMI_DEBUG("Check layer2categories");
+ for (const auto &x : this->layer2categories)
+ {
+ for (const auto &y : x.second)
+ {
+ HMI_DEBUG("key:%s, val:%s", x.first.c_str(), y.c_str());
+ }
+ }
+ return 0;
+}
+
+int PolicyManager::loadLayoutsConfigFile()
+{
+ HMI_DEBUG("Call");
+
+ // Get afm application installed dir
+ char const *afm_app_install_dir = getenv("AFM_APP_INSTALL_DIR");
+ HMI_DEBUG("afm_app_install_dir:%s", afm_app_install_dir);
+
+ std::string file_name;
+ if (!afm_app_install_dir)
+ {
+ HMI_ERROR("AFM_APP_INSTALL_DIR is not defined");
+ }
+ else
+ {
+ file_name = std::string(afm_app_install_dir) + std::string(pm::kPathLayoutsConfigFile);
+ }
+
+ // Load states config file
+ json_object *json_obj;
+ int ret = this->inputJsonFilie(file_name.c_str(), &json_obj);
+ if (0 > ret)
+ {
+ HMI_DEBUG("Could not open %s, so use default layout information", pm::kPathLayoutsConfigFile);
+ json_obj = json_tokener_parse(kDefaultLayoutsConfig);
+ }
+ HMI_DEBUG("json_obj dump:%s", json_object_get_string(json_obj));
+
+ // Parse ecus
+ json_object *json_cfg;
+ if (!json_object_object_get_ex(json_obj, "ecus", &json_cfg))
+ {
+ HMI_ERROR("Parse Error!!");
+ return -1;
+ }
+
+ int num_ecu = json_object_array_length(json_cfg);
+ HMI_DEBUG("json_cfg(ecus) len:%d", num_ecu);
+
+ const char* c_ecu_name;
+ json_object *json_ecu;
+ for (int i = 0; i < num_ecu; i++)
+ {
+ json_ecu= json_object_array_get_idx(json_cfg, i);
+
+ c_ecu_name = this->getStringFromJson(json_ecu, "name");
+ if (nullptr == c_ecu_name)
+ {
+ HMI_ERROR("Parse Error!!");
+ return -1;
+ }
+
+ if (std::string(c_ecu_name) == this->ecu_name)
+ {
+ break;
+ }
+ else
+ {
+ json_ecu = nullptr;
+ }
+ }
+
+ if (!json_ecu)
+ {
+ HMI_ERROR("Areas for ecu:%s is NOT exist!!", this->ecu_name.c_str());
+ return -1;
+ }
+
+ // Perse layouts
+ HMI_DEBUG("Perse layouts");
+ json_object *json_layouts;
+ if (!json_object_object_get_ex(json_ecu, "layouts", &json_layouts))
+ {
+ HMI_ERROR("Parse Error!!");
+ return -1;
+ }
+
+ int len = json_object_array_length(json_layouts);
+ HMI_DEBUG("json_layouts len:%d", len);
+ HMI_DEBUG("json_layouts dump:%s", json_object_get_string(json_layouts));
+
+ const char *layout;
+ const char *role;
+ const char *category;
+ for (int i = 0; i < len; i++)
+ {
+ json_object *json_tmp = json_object_array_get_idx(json_layouts, i);
+
+ layout = this->getStringFromJson(json_tmp, "name");
+ if (nullptr == layout)
+ {
+ HMI_ERROR("Parse Error!!");
+ return -1;
+ }
+ HMI_DEBUG("> layout:%s", layout);
+
+ json_object *json_area_array;
+ if (!json_object_object_get_ex(json_tmp, "areas", &json_area_array))
+ {
+ HMI_ERROR("Parse Error!!");
+ return -1;
+ }
+
+ int len_area = json_object_array_length(json_area_array);
+ HMI_DEBUG("json_area_array len:%d", len_area);
+ HMI_DEBUG("json_area_array dump:%s", json_object_get_string(json_area_array));
+
+ LayoutState layout_state;
+ AreaState area_state;
+ std::map<std::string, int> category_num;
+ for (int ctg_no = StmCtgNoMin;
+ ctg_no <= StmCtgNoMax; ctg_no++)
+ {
+ const char *ctg_name = kStmCategoryName[ctg_no];
+ category_num[ctg_name] = 0;
+ }
+
+ for (int j = 0; j < len_area; j++)
+ {
+ json_object *json_area = json_object_array_get_idx(json_area_array, j);
+
+ // Get area name
+ const char *area = this->getStringFromJson(json_area, "name");
+ if (nullptr == area)
+ {
+ HMI_ERROR("Parse Error!!");
+ return -1;
+ }
+ area_state.name = std::string(area);
+ HMI_DEBUG(">> area:%s", area);
+
+ // Get app attribute of the area
+ category = this->getStringFromJson(json_area, "category");
+ if (nullptr == category)
+ {
+ HMI_ERROR("Parse Error!!");
+ return -1;
+ }
+ area_state.category = std::string(category);
+ category_num[category]++;
+ HMI_DEBUG(">>> category:%s", category);
+
+ role = this->getStringFromJson(json_area, "role");
+ if (nullptr != role)
+ {
+ // Role is NOT essential here
+ area_state.role = std::string(role);
+ }
+ else
+ {
+ area_state.role = std::string("");
+ }
+ HMI_DEBUG(">>> role:%s", role);
+
+ layout_state.area_list.push_back(area_state);
+ }
+
+ layout_state.name = layout;
+ layout_state.category_num = category_num;
+ this->default_layouts[layout] = layout_state;
+ }
+
+ // initialize for none layout
+ LayoutState none_layout_state;
+ memset(&none_layout_state, 0, sizeof(none_layout_state));
+ none_layout_state.name = "none";
+ this->default_layouts["none"] = none_layout_state;
+
+ // Check
+ for (auto itr_layout = this->default_layouts.begin();
+ itr_layout != this->default_layouts.end(); ++itr_layout)
+ {
+ HMI_DEBUG(">>> layout:%s", itr_layout->first.c_str());
+
+ for (auto itr_area = itr_layout->second.area_list.begin();
+ itr_area != itr_layout->second.area_list.end(); ++itr_area)
+ {
+ HMI_DEBUG(">>> >>> area :%s", itr_area->name.c_str());
+ HMI_DEBUG(">>> >>> category:%s", itr_area->category.c_str());
+ HMI_DEBUG(">>> >>> role :%s", itr_area->role.c_str());
+ }
+ }
+
+ // Release json_object
+ json_object_put(json_obj);
+
+ return 0;
+}
+
+void PolicyManager::pushInvisibleRoleHistory(std::string category, std::string role)
+{
+ auto i = std::remove_if(this->crr_invisible_role_history[category].begin(),
+ this->crr_invisible_role_history[category].end(),
+ [role](std::string x) { return (role == x); });
+
+ if (this->crr_invisible_role_history[category].end() != i)
+ {
+ this->crr_invisible_role_history[category].erase(i);
+ }
+
+ this->crr_invisible_role_history[category].push_back(role);
+
+ if (pm::kInvisibleRoleHistoryNum < crr_invisible_role_history[category].size())
+ {
+ this->crr_invisible_role_history[category].erase(
+ this->crr_invisible_role_history[category].begin());
+ }
+}
+
+std::string PolicyManager::popInvisibleRoleHistory(std::string category)
+{
+ std::string role;
+ if (crr_invisible_role_history[category].empty())
+ {
+ role = "";
+ }
+ else
+ {
+ role = this->crr_invisible_role_history[category].back();
+ this->crr_invisible_role_history[category].pop_back();
+ }
+ return role;
+}
+
+const char *PolicyManager::getStringFromJson(json_object *obj, const char *key)
+{
+ json_object *tmp;
+ if (!json_object_object_get_ex(obj, key, &tmp))
+ {
+ HMI_DEBUG("Not found key \"%s\"", key);
+ return nullptr;
+ }
+
+ return json_object_get_string(tmp);
+}
+
+int PolicyManager::inputJsonFilie(const char *file, json_object **obj)
+{
+ const int input_size = 128;
+ int ret = -1;
+
+ HMI_DEBUG("Input file: %s", file);
+
+ // Open json file
+ FILE *fp = fopen(file, "rb");
+ if (nullptr == fp)
+ {
+ HMI_ERROR("Could not open file");
+ return ret;
+ }
+
+ // Parse file data
+ struct json_tokener *tokener = json_tokener_new();
+ enum json_tokener_error json_error;
+ char buffer[input_size];
+ int block_cnt = 1;
+ while (1)
+ {
+ size_t len = fread(buffer, sizeof(char), input_size, fp);
+ *obj = json_tokener_parse_ex(tokener, buffer, len);
+ if (nullptr != *obj)
+ {
+ HMI_DEBUG("File input is success");
+ ret = 0;
+ break;
+ }
+
+ json_error = json_tokener_get_error(tokener);
+ if ((json_tokener_continue != json_error) || (input_size > len))
+ {
+ HMI_ERROR("Failed to parse file (byte:%d err:%s)",
+ (input_size * block_cnt), json_tokener_error_desc(json_error));
+ HMI_ERROR("\n%s", buffer);
+ *obj = nullptr;
+ break;
+ }
+ block_cnt++;
+ }
+
+ // Close json file
+ fclose(fp);
+
+ // Free json_tokener
+ json_tokener_free(tokener);
+
+ return ret;
+}
+
+void PolicyManager::dumpLayerState(std::unordered_map<std::string, LayerState> &layers)
+{
+ HMI_DEBUG("-------------------------------------------------------------------------------------------------------");
+ HMI_DEBUG("|%-15s|%s|%-20s|%-20s|%-20s|%-20s|",
+ "LAYER", "C", "LAYOUT", "AREA", "CATEGORY", "ROLE");
+ for (const auto &itr : layers)
+ {
+ LayerState ls = itr.second;
+ const char* layer = ls.name.c_str();
+ const char* changed = (ls.changed) ? "T" : "f";
+ const char* layout = ls.layout_state.name.c_str();
+ bool first = true;
+ for (const auto &as : ls.layout_state.area_list)
+ {
+ if (first)
+ {
+ first = false;
+ HMI_DEBUG("|%-15s|%1s|%-20s|%-20s|%-20s|%-20s|",
+ layer, changed, layout,
+ as.name.c_str(), as.category.c_str(), as.role.c_str());
+ }
+ else
+ HMI_DEBUG("|%-15s|%1s|%-20s|%-20s|%-20s|%-20s|",
+ "", "", "", as.name.c_str(), as.category.c_str(), as.role.c_str());
+ }
+ }
+ HMI_DEBUG("-------------------------------------------------------------------------------------------------------");
+}
+
+void PolicyManager::dumpInvisibleRoleHistory()
+{
+ HMI_DEBUG(">>>>>>>>>> DUMP INVISIBLE ROLE HISTORY ( category [older > newer] )");
+ for (int ctg_no = StmCtgNoMin; ctg_no <= StmCtgNoMax; ctg_no++)
+ {
+ if (ctg_no == StmCtgNoNone)
+ continue;
+
+ std::string category = std::string(kStmCategoryName[ctg_no]);
+
+ std::string str = category + " [ ";
+ for (const auto &i : this->crr_invisible_role_history[category])
+ str += (i + " > ");
+
+ str += "]";
+ HMI_DEBUG("%s", str.c_str());
+ }
+}
+
+std::vector<std::string> PolicyManager::parseString(std::string str, char delimiter)
+{
+ // Parse string by delimiter
+ std::vector<std::string> vct;
+ std::stringstream ss{str};
+ std::string buf;
+ while (std::getline(ss, buf, delimiter))
+ {
+ if (!buf.empty())
+ {
+ // Delete space and push back to vector
+ vct.push_back(this->deleteSpace(buf));
+ }
+ }
+ return vct;
+}
+
+std::string PolicyManager::deleteSpace(std::string str)
+{
+ std::string ret = str;
+ size_t pos;
+ while ((pos = ret.find_first_of(" ")) != std::string::npos)
+ {
+ ret.erase(pos, 1);
+ }
+ return ret;
+}
+
+const char *PolicyManager::kDefaultRolesConfig = "{ \
+ \"roles\":[ \
+ { \
+ \"category\": \"homescreen\", \
+ \"role\": \"homescreen\", \
+ \"area\": \"fullscreen\", \
+ }, \
+ { \
+ \"category\": \"map\", \
+ \"role\": \"map\", \
+ \"area\": \"normal.full | split.main\", \
+ }, \
+ { \
+ \"category\": \"general\", \
+ \"role\": \"launcher | poi | browser | sdl | mixer | radio | hvac | debug | phone | video | music\", \
+ \"area\": \"normal.full\", \
+ }, \
+ { \
+ \"category\": \"system\", \
+ \"role\": \"settings | dashboard\", \
+ \"area\": \"normal.full\", \
+ }, \
+ { \
+ \"category\": \"software_keyboard\", \
+ \"role\": \"software_keyboard\", \
+ \"area\": \"software_keyboard\", \
+ }, \
+ { \
+ \"category\": \"restriction\", \
+ \"role\": \"restriction\", \
+ \"area\": \"restriction.normal | restriction.split.main | restriction.split.sub\", \
+ }, \
+ { \
+ \"category\": \"pop_up\", \
+ \"role\": \"pop_up\", \
+ \"area\": \"on_screen\", \
+ }, \
+ { \
+ \"category\": \"system_alert\", \
+ \"role\": \"system_alert\", \
+ \"area\": \"on_screen\", \
+ } \
+ ] \
+}";
+
+const char *PolicyManager::kDefaultLayoutsConfig = "{ \
+ \"layouts\": [ \
+ { \
+ \"name\": \"homescreen\", \
+ \"layer\": \"far_homescreen\", \
+ \"areas\": [ \
+ { \
+ \"name\": \"fullscreen\", \
+ \"category\": \"homescreen\" \
+ } \
+ ] \
+ }, \
+ { \
+ \"name\": \"map.normal\", \
+ \"layer\": \"apps\", \
+ \"areas\": [ \
+ { \
+ \"name\": \"normal.full\", \
+ \"category\": \"map\" \
+ } \
+ ] \
+ }, \
+ { \
+ \"name\": \"map.split\", \
+ \"layer\": \"apps\", \
+ \"areas\": [ \
+ { \
+ \"name\": \"split.main\", \
+ \"category\": \"map\" \
+ }, \
+ { \
+ \"name\": \"split.sub\", \
+ \"category\": \"splitable\" \
+ } \
+ ] \
+ }, \
+ { \
+ \"name\": \"map.fullscreen\", \
+ \"layer\": \"apps\", \
+ \"areas\": [ \
+ { \
+ \"name\": \"fullscreen\", \
+ \"category\": \"map\" \
+ } \
+ ] \
+ }, \
+ { \
+ \"name\": \"splitable.normal\", \
+ \"layer\": \"apps\", \
+ \"areas\": [ \
+ { \
+ \"name\": \"normal.full\", \
+ \"category\": \"splitable\" \
+ } \
+ ] \
+ }, \
+ { \
+ \"name\": \"splitable.split\", \
+ \"layer\": \"apps\", \
+ \"areas\": [ \
+ { \
+ \"name\": \"split.main\", \
+ \"category\": \"splitable\" \
+ }, \
+ { \
+ \"name\": \"split.sub\", \
+ \"category\": \"splitable\" \
+ } \
+ ] \
+ }, \
+ { \
+ \"name\": \"general.normal\", \
+ \"layer\": \"apps\", \
+ \"areas\": [ \
+ { \
+ \"name\": \"normal.full\", \
+ \"category\": \"general\" \
+ } \
+ ] \
+ }, \
+ { \
+ \"name\": \"system.normal\", \
+ \"layer\": \"apps\", \
+ \"areas\": [ \
+ { \
+ \"name\": \"normal.full\", \
+ \"category\": \"system\" \
+ } \
+ ] \
+ }, \
+ { \
+ \"name\": \"software_keyboard\", \
+ \"layer\": \"near_homescreen\", \
+ \"areas\": [ \
+ { \
+ \"name\": \"software_keyboard\", \
+ \"category\": \"software_keyboard\" \
+ } \
+ ] \
+ }, \
+ { \
+ \"name\": \"restriction.normal\", \
+ \"layer\": \"restriction\", \
+ \"areas\": [ \
+ { \
+ \"name\": \"restriction.normal\", \
+ \"category\": \"restriction\" \
+ } \
+ ] \
+ }, \
+ { \
+ \"name\": \"restriction.split.main\", \
+ \"layer\": \"restriction\", \
+ \"areas\": [ \
+ { \
+ \"name\": \"restriction.split.main\", \
+ \"category\": \"restriction\" \
+ } \
+ ] \
+ }, \
+ { \
+ \"name\": \"restriction.split.sub\", \
+ \"layer\": \"restriction\", \
+ \"areas\": [ \
+ { \
+ \"name\": \"restriction.split.sub\", \
+ \"category\": \"restriction\" \
+ } \
+ ] \
+ }, \
+ { \
+ \"name\": \"pop_up\", \
+ \"layer\": \"on_screen\", \
+ \"areas\": [ \
+ { \
+ \"name\": \"on_screen\", \
+ \"category\": \"pop_up\" \
+ } \
+ ] \
+ }, \
+ { \
+ \"name\": \"system_alert\", \
+ \"layer\": \"on_screen\", \
+ \"areas\": [ \
+ { \
+ \"name\": \"on_screen\", \
+ \"category\": \"system_alert\" \
+ } \
+ ] \
+ } \
+ ] \
+}";
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/policy_manager.hpp b/demo#3/common/agl-service-windowmanager/policy_manager/policy_manager.hpp
new file mode 100644
index 0000000..61fbf06
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/policy_manager.hpp
@@ -0,0 +1,174 @@
+/*
+ * Copyright (c) 2018 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef TMCAGLWM_POLICY_MANAGER_HPP
+#define TMCAGLWM_POLICY_MANAGER_HPP
+
+#include <functional>
+#include <unordered_map>
+#include <vector>
+#include <queue>
+
+struct json_object;
+struct sd_event;
+struct sd_event_source;
+struct StmState;
+
+class PolicyManager
+{
+ public:
+ explicit PolicyManager();
+ ~PolicyManager();
+
+ using Handler = std::function<void(json_object *)>;
+
+ typedef struct
+ {
+ Handler onStateTransitioned;
+ Handler onError;
+ } CallbackTable;
+
+ int initialize(std::string ecu_name);
+ void registerCallback(CallbackTable callback_table);
+ int setInputEventData(json_object *json_in);
+ int executeStateTransition();
+ void undoState();
+
+ // Do not use these functions
+ int transitionState(sd_event_source *source, void *data);
+ int timerEvent(sd_event_source *source, uint64_t usec, void *data);
+
+ private:
+ // Disable copy and move
+ PolicyManager(PolicyManager const &) = delete;
+ PolicyManager &operator=(PolicyManager const &) = delete;
+ PolicyManager(PolicyManager &&) = delete;
+ PolicyManager &operator=(PolicyManager &&) = delete;
+
+ typedef struct EventInfo
+ {
+ int event;
+ std::string role;
+ uint64_t delay;
+ } EventInfo;
+
+ typedef struct AreaState
+ {
+ std::string name;
+ std::string category;
+ std::string role;
+ } AreaState;
+
+ typedef std::vector<AreaState> AreaList;
+ typedef struct LayoutState
+ {
+ std::string name;
+ std::map<std::string, int> category_num;
+ AreaList area_list;
+ } LayoutState;
+
+ typedef struct LayerState
+ {
+ std::string name;
+ LayoutState layout_state;
+ bool changed;
+ } LayerState;
+
+ typedef struct Mode
+ {
+ std::string state;
+ bool changed;
+ } Mode;
+
+ typedef std::vector<std::string> Areas;
+ typedef std::vector<std::string> Categories;
+ typedef std::vector<std::string> Roles;
+
+ StmState *p_crr_state;
+ StmState *p_prv_state;
+
+ // Convert map
+ std::unordered_map<std::string, int> eventname2no;
+ std::unordered_map<std::string, int> categoryname2no;
+ std::unordered_map<std::string, int> areaname2no;
+
+ std::unordered_map<std::string, std::string> role2category;
+ std::unordered_map<std::string, std::string> category2role;
+ std::unordered_map<std::string, Areas> category2areas;
+ std::unordered_map<std::string, Categories> layer2categories;
+
+ std::queue<EventInfo> event_info_queue;
+ std::map<int, struct sd_event_source *> event_source_list;
+ std::map<int, std::string> req_role_list;
+
+ CallbackTable callback;
+
+ std::unordered_map<std::string, Mode> prv_car_elements;
+ std::unordered_map<std::string, Mode> crr_car_elements;
+
+ std::unordered_map<std::string, LayerState> prv_layers;
+ std::unordered_map<std::string, LayerState> crr_layers;
+
+ std::unordered_map<std::string, LayerState> prv_layers_car_stop;
+
+ std::unordered_map<std::string, LayoutState> default_layouts;
+
+ std::map<std::string, Roles> crr_invisible_role_history;
+ std::map<std::string, Roles> prv_invisible_role_history;
+
+ std::string ecu_name;
+
+ void initializeState();
+ void initializeModeState();
+ void initializeLayerState();
+ void updateState(int event_id);
+ void updateModeState();
+ void updateLayer(int event_id);
+ int updateLayout(int event_id, int layer_no,
+ std::string crr_layout_name, LayoutState &crr_layout_state);
+ void createOutputInformation(json_object **json_out);
+ void controlTimerEvent();
+ int setStateTransitionProcessToSystemd(int event, uint64_t delay_ms, std::string role);
+
+ void pushInvisibleRoleHistory(std::string category, std::string role);
+ std::string popInvisibleRoleHistory(std::string category);
+
+ bool changedRestrictionModeTo2On();
+ bool changedRestrictionMode2OnToOther();
+ bool changedLightstatusBrakeOffToOn();
+ bool changedLightstatusBrakeOnToOff();
+
+ int loadRolesConfigFile();
+ int loadLayoutsConfigFile();
+
+ void dumpLayerState(std::unordered_map<std::string, LayerState> &layers);
+ void dumpInvisibleRoleHistory();
+
+ void addStateToJson(const char *name, bool changed,
+ std::string state, json_object **json_out);
+ void addStateToJson(const char *layer_name, bool changed,
+ AreaList area_list, json_object **json_out);
+ const char *getStringFromJson(json_object *obj, const char *key);
+ int inputJsonFilie(const char *file, json_object **obj);
+
+ std::vector<std::string> parseString(std::string str, char delimiter);
+ std::string deleteSpace(std::string str);
+
+ static const char *kDefaultRolesConfig;
+ static const char *kDefaultLayoutsConfig;
+};
+
+#endif // TMCAGLWM_POLICY_MANAGER_HPP
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/stm.c b/demo#3/common/agl-service-windowmanager/policy_manager/stm/stm.c
new file mode 100644
index 0000000..1c4170d
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/stm.c
@@ -0,0 +1,176 @@
+/*
+ * Copyright (c) 2018 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <string.h>
+#include "stm.h"
+#include "stm_inner.h"
+
+const char* kStmEventName[] = {
+ "none",
+ "activate",
+ "deactivate",
+ "trans_gear_neutral",
+ "trans_gear_not_neutral",
+ "parking_brake_off",
+ "parking_brake_on",
+ "accel_pedal_off",
+ "accel_pedal_on",
+ "lamp_off",
+ "lamp_on",
+ "lightstatus_brake_off",
+ "lightstatus_brake_on",
+ "restriction_mode_off",
+ "restriction_mode_on",
+ "undo",
+};
+
+const char* kStmCategoryName[] = {
+ "none",
+ "homescreen",
+ "map",
+ "general",
+ "splitable",
+ "splitable_main",
+ "splitable_sub",
+ "pop_up",
+ "system_alert",
+ "restriction",
+ "system",
+ "software_keyboard",
+ "tbt",
+ "meter",
+ "receiver",
+ "debug",
+};
+
+const char* kStmAreaName[] = {
+ "none",
+ "fullscreen",
+ "normal.full",
+ "split.main",
+ "split.sub",
+ "on_screen",
+ "restriction.normal",
+ "restriction.split.main",
+ "restriction.split.sub",
+ "software_keyboard",
+ "master.split.sub",
+};
+
+const char* kStmLayoutName[] = {
+ "none",
+ "pop_up",
+ "system_alert",
+ "map.normal",
+ "map.split",
+ "map.fullscreen",
+ "splitable.normal",
+ "splitable.split",
+ "general.normal",
+ "homescreen",
+ "restriction.normal",
+ "restriction.split.main",
+ "restriction.split.sub",
+ "system.normal",
+ "software_keyboard",
+ "tbt",
+ "remote_tbt",
+ "meter.normal",
+ "meter_receiver",
+ "meter_splitable",
+ "splitable_receiver",
+ "receiver.split",
+ "debug.normal",
+ "debug.split.main",
+ "debug.split.sub",
+ "debug.fullscreen",
+};
+
+const char* kStmLayerName[] = {
+ "homescreen",
+ "apps",
+ "near_homescreen",
+ "restriction",
+ "on_screen",
+ "remote",
+};
+
+const char* kStmCarElementName[] = {
+ "trans_gear",
+ "parking_brake",
+ "accel_pedal",
+ "running",
+ "lamp",
+ "lightstatus_brake",
+ "restriction_mode",
+};
+
+const char* kStmTransGearStateName[] = {
+ "neutral",
+ "not_neutral"
+};
+
+const char* kStmParkingBrakeStateName[] = {
+ "off",
+ "on"
+};
+
+const char* kStmAccelPedalStateName[] = {
+ "off",
+ "on"
+};
+
+const char* kStmRunningSttNo2Name[] = {
+ "stop",
+ "run"
+};
+
+const char* kStmLampStateName[] = {
+ "off",
+ "on"
+};
+
+const char* kStmLightstatusBrakeStateName[] = {
+ "off",
+ "on"
+};
+
+const char* kStmRestrictionModeStateName[] = {
+ "off",
+ "on",
+};
+
+const char** kStmCarElementStateNameList[] = {
+ kStmTransGearStateName,
+ kStmParkingBrakeStateName,
+ kStmAccelPedalStateName,
+ kStmRunningSttNo2Name,
+ kStmLampStateName,
+ kStmLightstatusBrakeStateName,
+ kStmRestrictionModeStateName,
+};
+
+void stmInitialize(const char *ecu_name) {
+ stmInitializeInner(ecu_name);
+}
+
+int stmTransitionState(int event, StmState* state) {
+ return stmTransitionStateInner(event, state);
+}
+
+void stmUndoState() {
+ stmUndoStateInner();
+}
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/stm.h b/demo#3/common/agl-service-windowmanager/policy_manager/stm/stm.h
new file mode 100644
index 0000000..685a43b
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/stm.h
@@ -0,0 +1,233 @@
+/*
+ * Copyright (c) 2018 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef TMCAGLWM_STM_HPP
+#define TMCAGLWM_STM_HPP
+
+#define STM_TRUE 1
+#define STM_FALSE 0
+
+#define STM_CREATE_EVENT_ID(evt, ctg, area) \
+ ((evt) | ((ctg) << 8) | ((area) << 16))
+
+#define STM_GET_EVENT_FROM_ID(id) \
+ ((id) & 0xFF)
+
+#define STM_GET_CATEGORY_FROM_ID(id) \
+ (((id) >> 8) & 0xFF)
+
+#define STM_GET_AREA_FROM_ID(id) \
+ (((id) >> 16) & 0xFF)
+
+// Event number
+enum StmEvtNo {
+ StmEvtNoNone = 0,
+ StmEvtNoActivate,
+ StmEvtNoDeactivate,
+ StmEvtNoTransGearN,
+ StmEvtNoTransGearNotN,
+ StmEvtNoParkingBrakeOff,
+ StmEvtNoParkingBrakeOn,
+ StmEvtNoAccelPedalOff,
+ StmEvtNoAccelPedalOn,
+ StmEvtNoLampOff,
+ StmEvtNoLampOn,
+ StmEvtNoLightstatusBrakeOff,
+ StmEvtNoLightstatusBrakeOn,
+ StmEvtNoRestrictionModeOff,
+ StmEvtNoRestrictionModeOn,
+ StmEvtNoUndo,
+
+ StmEvtNoNum,
+
+ StmEvtNoMin = StmEvtNoNone,
+ StmEvtNoMax = StmEvtNoNum - 1,
+};
+
+// Category number
+enum StmCtgNo {
+ StmCtgNoNone = 0,
+ StmCtgNoHomescreen,
+ StmCtgNoMap,
+ StmCtgNoGeneral,
+ StmCtgNoSplitable,
+ StmCtgNoSplitableMain,
+ StmCtgNoSplitableSub,
+ StmCtgNoPopUp,
+ StmCtgNoSystemAlert,
+ StmCtgNoRestriction,
+ StmCtgNoSystem,
+ StmCtgNoSoftwareKeyboard,
+ StmCtgNoTbt,
+ StmCtgNoMeter,
+ StmCtgNoReceiver,
+ StmCtgNoDebug,
+
+ StmCtgNoNum,
+
+ StmCtgNoMin = StmCtgNoNone,
+ StmCtgNoMax = StmCtgNoNum - 1,
+};
+
+// Area number
+enum StmAreaNo {
+ StmAreaNoNone = 0,
+ StmAreaNoFullscreen,
+ StmAreaNoNormal,
+ StmAreaNoSplitMain,
+ StmAreaNoSplitSub,
+ StmAreaNoOnScreen,
+ StmAreaNoRestrictionNormal,
+ StmAreaNoRestrictionSplitMain,
+ StmAreaNoRestrictionSplitSub,
+ StmAreaNoSoftwareKyeboard,
+ StmAreaNoMasterSplitSub,
+
+ StmAreaNoNum,
+
+ StmAreaNoMin = StmAreaNoNone,
+ StmAreaNoMax = StmAreaNoNum - 1,
+};
+
+// Layer number
+enum StmLayerNo {
+ StmLayerNoHomescreen = 0,
+ StmLayerNoApps,
+ StmLayerNoNearHomescreen,
+ StmLayerNoRestriction,
+ StmLayerNoOnScreen,
+ StmLayerNoRemote,
+
+ StmLayerNoNum,
+
+ StmLayerNoMin = StmLayerNoHomescreen,
+ StmLayerNoMax = StmLayerNoNum - 1,
+};
+
+// Layout kind number
+enum StmLayoutNo {
+ StmLayoutNoNone = 0,
+ StmLayoutNoPopUp,
+ StmLayoutNoSysAlt,
+ StmLayoutNoMapNml,
+ StmLayoutNoMapSpl,
+ StmLayoutNoMapFll,
+ StmLayoutNoSplNml,
+ StmLayoutNoSplSpl,
+ StmLayoutNoGenNml,
+ StmLayoutNoHms,
+ StmLayoutNoRstNml,
+ StmLayoutNoRstSplMain,
+ StmLayoutNoRstSplSub,
+ StmLayoutNoSysNml,
+ StmLayoutNoSftKbd,
+ StmLayoutNoTbt,
+ StmLayoutNoRmtTbt,
+ StmLayoutNoMtrNml,
+ StmLayoutNoMtrRcv,
+ StmLayoutNoMtrSpl,
+ StmLayoutNoSplRcv,
+ StmLayoutNoRcvSpl,
+ StmLayoutNoDbgNml,
+ StmLayoutNoDbgSplMain,
+ StmLayoutNoDbgSplSub,
+ StmLayoutNoDbgFll,
+
+ StmLayoutNoNum,
+
+ StmLayoutNoMin = StmLayoutNoNone,
+ StmLayoutNoMax = StmLayoutNoNum - 1,
+};
+
+// Enum for mode state
+enum StmTransGearStt {
+ StmTransGearSttNoN = 0,
+ StmTransGearSttNoNotN
+};
+
+enum StmParkingBrakeStt {
+ StmParkingBrakeSttNoOff = 0,
+ StmParkingBrakeSttNoOn
+};
+
+enum StmAccelPedalStt {
+ StmAccelPedalSttNoOff = 0,
+ StmAccelPedalSttNoOn
+};
+
+enum StmCarStt {
+ StmRunningNoStop = 0,
+ StmRunningNoRun
+};
+
+enum StmLampStt {
+ StmLampSttNoOff = 0,
+ StmLampSttNoOn
+};
+
+enum StmLightstatusBrakeStt {
+ StmLightstatusBrakeSttNoOff = 0,
+ StmLightstatusBrakeSttNoOn
+};
+
+enum StmRestrictionModeSttNo {
+ StmRestrictionModeSttNoOff = 0,
+ StmRestrictionModeSttNoOn,
+};
+
+// Mode kind number
+enum StmCarElementNo {
+ StmCarElementNoTransGear = 0,
+ StmCarElementNoParkingBrake,
+ StmCarElementNoAccelPedal,
+ StmCarElementNoRunning,
+ StmCarElementNoLamp,
+ StmCarElementNoLightstatusBrake,
+ StmCarElementNoRestrictionMode,
+
+ StmCarElementNoNum,
+
+ StmCarElementNoMin = StmCarElementNoTransGear,
+ StmCarElementNoMax = StmCarElementNoNum - 1,
+};
+
+// String for state
+extern const char* kStmEventName[];
+extern const char* kStmCategoryName[];
+extern const char* kStmAreaName[];
+extern const char* kStmLayoutName[];
+extern const char* kStmLayerName[];
+extern const char* kStmCarElementName[];
+extern const char** kStmCarElementStateNameList[];
+
+// Struct for state
+typedef struct StmBaseState {
+ int changed;
+ int state;
+} StmBaseState;
+
+typedef struct StmState {
+ StmBaseState car_element[StmCarElementNoNum];
+ StmBaseState layer[StmLayerNoNum];
+} StmState;
+
+// API
+void stmInitialize(const char *ecu_name);
+int stmTransitionState(int event_no, StmState* state);
+void stmUndoState();
+
+
+#endif // TMCAGLWM_STM_HPP
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/stub/CMakeLists.txt b/demo#3/common/agl-service-windowmanager/policy_manager/stm/stub/CMakeLists.txt
new file mode 100644
index 0000000..81f0e00
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/stub/CMakeLists.txt
@@ -0,0 +1,44 @@
+#
+# Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+set(TARGETS_STM pmstm)
+
+add_library(${TARGETS_STM}
+ STATIC
+ ./stm_inner.c
+)
+
+target_include_directories(${TARGETS_STM}
+ PRIVATE
+ ../
+ ./
+)
+
+target_compile_definitions(${TARGETS_STM}
+ PRIVATE
+ _GNU_SOURCE
+)
+
+target_compile_options(${TARGETS_STM}
+ PRIVATE
+ -Wall -Wextra -Wno-unused-parameter -Wno-comment)
+
+set_target_properties(${TARGETS_STM}
+ PROPERTIES
+ C_EXTENSIONS OFF
+ C_STANDARD 99
+ C_STANDARD_REQUIRED ON
+)
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/stub/stm_inner.c b/demo#3/common/agl-service-windowmanager/policy_manager/stm/stub/stm_inner.c
new file mode 100644
index 0000000..2ae2cf0
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/stub/stm_inner.c
@@ -0,0 +1,185 @@
+/*
+ * Copyright (c) 2018 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <string.h>
+#include "stm.h"
+#include "stm_inner.h"
+
+static StmState g_stm_crr_state;
+static StmState g_stm_prv_state;
+
+void stmInitializeInner() {
+ // Initialize previous state
+ memset(&g_stm_prv_state, 0, sizeof(g_stm_prv_state));
+
+ // Initialize current state
+ g_stm_crr_state = g_stm_prv_state;
+}
+
+int stmTransitionStateInner(int event, StmState* state) {
+ int event_no, category_no, area_no;
+
+ event_no = STM_GET_EVENT_FROM_ID(event);
+ category_no = STM_GET_CATEGORY_FROM_ID(event);
+ area_no = STM_GET_AREA_FROM_ID(event);
+
+ // Backup previous state
+ g_stm_prv_state = g_stm_crr_state;
+
+ // -------------------------------------------------------
+ // There is no policy table by default.
+ // Therefore update each layers
+ // to draw the applications in requested area
+ // in accordance with inputed activate/deactivate events.
+ // -------------------------------------------------------
+ if (StmEvtNoActivate == event_no)
+ {
+ if (StmCtgNoHomescreen == category_no)
+ {
+ g_stm_crr_state.layer[StmLayerNoHomescreen].state = StmLayoutNoHms;
+ g_stm_crr_state.layer[StmLayerNoHomescreen].changed = STM_TRUE;
+
+ // For AGL JIRA SPEC-1407
+ // Apps layer is invisibled only when Homescreen app is started already
+ if (StmLayoutNoHms == g_stm_prv_state.layer[StmLayerNoHomescreen].state)
+ {
+ g_stm_crr_state.layer[StmLayerNoApps].state = StmLayoutNoNone;
+ g_stm_crr_state.layer[StmLayerNoApps].changed = STM_TRUE;
+ }
+ }
+ else if (StmCtgNoDebug == category_no)
+ {
+ if (StmAreaNoNormal == area_no)
+ {
+ g_stm_crr_state.layer[StmLayerNoApps].state = StmLayoutNoDbgNml;
+ }
+ else if (StmAreaNoSplitMain == area_no)
+ {
+ g_stm_crr_state.layer[StmLayerNoApps].state = StmLayoutNoDbgSplMain;
+ }
+ else if (StmAreaNoSplitSub == area_no)
+ {
+ g_stm_crr_state.layer[StmLayerNoApps].state = StmLayoutNoDbgSplSub;
+ }
+ else if (StmAreaNoFullscreen == area_no)
+ {
+ g_stm_crr_state.layer[StmLayerNoApps].state = StmLayoutNoDbgFll;
+ }
+ g_stm_crr_state.layer[StmLayerNoApps].changed = STM_TRUE;
+ }
+ else if (StmCtgNoSoftwareKeyboard == category_no)
+ {
+ g_stm_crr_state.layer[StmLayerNoNearHomescreen].state = StmLayoutNoSftKbd;
+ g_stm_crr_state.layer[StmLayerNoNearHomescreen].changed = STM_TRUE;
+ }
+ else if (StmCtgNoPopUp == category_no)
+ {
+ g_stm_crr_state.layer[StmLayerNoOnScreen].state = StmLayoutNoPopUp;
+ g_stm_crr_state.layer[StmLayerNoOnScreen].changed = STM_TRUE;
+ }
+ else if (StmCtgNoSystemAlert == category_no)
+ {
+ g_stm_crr_state.layer[StmLayerNoOnScreen].state = StmLayoutNoSysAlt;
+ g_stm_crr_state.layer[StmLayerNoOnScreen].changed = STM_TRUE;
+ }
+ else if (StmCtgNoTbt == category_no)
+ {
+ if (StmAreaNoMasterSplitSub == area_no)
+ {
+ g_stm_crr_state.layer[StmLayerNoApps].state = StmLayoutNoRcvSpl;
+ g_stm_crr_state.layer[StmLayerNoApps].changed = STM_TRUE;
+
+ g_stm_crr_state.layer[StmLayerNoRemote].state = StmLayoutNoRmtTbt;
+ g_stm_crr_state.layer[StmLayerNoRemote].changed = STM_TRUE;
+ }
+ else if (StmAreaNoNormal == area_no)
+ {
+ g_stm_crr_state.layer[StmLayerNoRemote].state = StmLayoutNoTbt;
+ g_stm_crr_state.layer[StmLayerNoRemote].changed = STM_TRUE;
+ }
+ }
+ else if (StmCtgNoReceiver == category_no)
+ {
+ g_stm_crr_state.layer[StmLayerNoApps].state = StmLayoutNoRcvSpl;
+ g_stm_crr_state.layer[StmLayerNoApps].changed = STM_TRUE;
+ }
+ else if (StmCtgNoMeter == category_no)
+ {
+ g_stm_crr_state.layer[StmLayerNoApps].state = StmLayoutNoMtrNml;
+ g_stm_crr_state.layer[StmLayerNoApps].changed = STM_TRUE;
+ }
+ }
+ else if (StmEvtNoDeactivate == event_no)
+ {
+ if (StmCtgNoHomescreen == category_no)
+ {
+ g_stm_crr_state.layer[StmLayerNoHomescreen].state = StmLayoutNoNone;
+ g_stm_crr_state.layer[StmLayerNoHomescreen].changed = STM_TRUE;
+ }
+ else if (StmCtgNoDebug == category_no)
+ {
+ if ((StmLayoutNoDbgNml == g_stm_prv_state.layer[StmLayerNoApps].state) ||
+ (StmLayoutNoDbgSplMain == g_stm_prv_state.layer[StmLayerNoApps].state) ||
+ (StmLayoutNoDbgSplSub == g_stm_prv_state.layer[StmLayerNoApps].state) ||
+ (StmLayoutNoDbgFll == g_stm_prv_state.layer[StmLayerNoApps].state))
+ {
+ g_stm_crr_state.layer[StmLayerNoApps].state = StmLayoutNoNone;
+ g_stm_crr_state.layer[StmLayerNoApps].changed = STM_TRUE;
+ }
+ }
+ else if (StmCtgNoSoftwareKeyboard == category_no)
+ {
+ if (StmLayoutNoSftKbd == g_stm_prv_state.layer[StmLayerNoNearHomescreen].state )
+ {
+ g_stm_crr_state.layer[StmLayerNoNearHomescreen].state = StmLayoutNoNone;
+ g_stm_crr_state.layer[StmLayerNoNearHomescreen].changed = STM_TRUE;
+ }
+ }
+ else if (StmCtgNoPopUp == category_no)
+ {
+ if (StmLayoutNoPopUp == g_stm_prv_state.layer[StmLayerNoOnScreen].state )
+ {
+ g_stm_crr_state.layer[StmLayerNoOnScreen].state = StmLayoutNoNone;
+ g_stm_crr_state.layer[StmLayerNoOnScreen].changed = STM_TRUE;
+ }
+ }
+ else if (StmCtgNoSystemAlert == category_no)
+ {
+ if (StmLayoutNoSysAlt == g_stm_prv_state.layer[StmLayerNoOnScreen].state )
+ {
+ g_stm_crr_state.layer[StmLayerNoOnScreen].state = StmLayoutNoNone;
+ g_stm_crr_state.layer[StmLayerNoOnScreen].changed = STM_TRUE;
+ }
+ }
+ else if (StmCtgNoTbt == category_no)
+ {
+ if (StmLayoutNoRmtTbt == g_stm_prv_state.layer[StmLayerNoRemote].state)
+ {
+ g_stm_crr_state.layer[StmLayerNoRemote].state = StmLayoutNoNone;
+ g_stm_crr_state.layer[StmLayerNoRemote].changed = STM_TRUE;
+ }
+ }
+ }
+
+ // Copy current state for return
+ memcpy(state, &g_stm_crr_state, sizeof(g_stm_crr_state));
+
+ return 0;
+}
+
+void stmUndoStateInner() {
+ g_stm_crr_state = g_stm_prv_state;
+}
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/stub/stm_inner.h b/demo#3/common/agl-service-windowmanager/policy_manager/stm/stub/stm_inner.h
new file mode 100644
index 0000000..7079447
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/stub/stm_inner.h
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2018 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef TMCAGLWM_STM_INNER_HPP
+#define TMCAGLWM_STM_INNER_HPP
+
+struct StmState;
+
+// API
+void stmInitializeInner();
+int stmTransitionStateInner(int event_no, StmState* state);
+void stmUndoStateInner();
+
+#endif // TMCAGLWM_STM_INNER_HPP
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/CMakeLists.txt b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/CMakeLists.txt
new file mode 100644
index 0000000..abbdc41
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/CMakeLists.txt
@@ -0,0 +1,95 @@
+#
+# Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+set(TARGETS_STM pmstm)
+
+set(ST_DIR StateTransitionor)
+set(ST_DIR_CMN Common)
+set(ST_DIR_AL ${ST_DIR}/AppsLayer)
+set(ST_DIR_HS ${ST_DIR}/HomeScreenLayer)
+set(ST_DIR_NHS ${ST_DIR}/NearHomeScreen)
+set(ST_DIR_OS ${ST_DIR}/OnScreenlayer)
+set(ST_DIR_RL ${ST_DIR}/RestrictionLayer)
+set(ST_DIR_RM ${ST_DIR}/RestrictionMode)
+set(ST_DIR_AP ${ST_DIR}/AccelPedal)
+set(ST_DIR_CS ${ST_DIR}/CarState)
+set(ST_DIR_LSB ${ST_DIR}/LightStatusBrake)
+
+set(ST_DIR_MST_AL ${ST_DIR}/master/layer/apps)
+set(ST_DIR_MST_RMT ${ST_DIR}/master/layer/remote)
+
+
+add_library(${TARGETS_STM}
+ STATIC
+ ${ST_DIR}/ZST_StateTransitionor_func.c
+ ${ST_DIR}/ZST_StateTransitionor_var.c
+ ${ST_DIR_AL}/ZAPL_AppsLayer.c
+ ${ST_DIR_AL}/ZAPL_Apps_func.c
+ ${ST_DIR_HS}/ZHSL_HomeScreen.c
+ ${ST_DIR_HS}/ZHSL_HomeScreen_func.c
+ ${ST_DIR_NHS}/ZNHL_NearHomescreen.c
+ ${ST_DIR_NHS}/ZNHL_NearHomeScreen_func.c
+ ${ST_DIR_OS}/ZOSL_OslMain.c
+ ${ST_DIR_OS}/ZOSL_OnScreen_func.c
+ ${ST_DIR_RL}/ZREL_RelMain.c
+ ${ST_DIR_RL}/ZREL_Restriction_func.c
+ ${ST_DIR_RM}/ZREM_RestrictionMode.c
+ ${ST_DIR_RM}/ZREM_RestrictionMode_func.c
+ ${ST_DIR_AP}/ZACCEL_AccelPedal.c
+ ${ST_DIR_AP}/ZACCEL_AccelPedalState_func.c
+ ${ST_DIR_CS}/ZCAR_CarState.c
+ ${ST_DIR_CS}/ZCAR_CarState_func.c
+ ${ST_DIR_LSB}/ZLIGHT_LightstatusBrake.c
+ ${ST_DIR_LSB}/ZLIGHT_LightstatusBrakeStatus_func.c
+ ./stm_master_apps.c
+ ./stm_master_remote.c
+ ${ST_DIR_MST_AL}/Zmaster_apps_apps_main.c
+ ${ST_DIR_MST_RMT}/Zmaster_remote_remote.c
+)
+
+target_include_directories(${TARGETS_STM}
+ PRIVATE
+ ./
+ ./${ST_DIR}
+ ./${ST_DIR_AL}
+ ./${ST_DIR_HS}
+ ./${ST_DIR_NHS}
+ ./${ST_DIR_OS}
+ ./${ST_DIR_RL}
+ ./${ST_DIR_RM}
+ ./${ST_DIR_AP}
+ ./${ST_DIR_CS}
+ ./${ST_DIR_LSB}
+ ./${ST_DIR_MST_AL}
+ ./${ST_DIR_MST_RMT}
+ ./${ST_DIR_CMN}
+)
+
+target_compile_definitions(${TARGETS_STM}
+ PRIVATE
+ _GNU_SOURCE
+)
+
+target_compile_options(${TARGETS_STM}
+ PRIVATE
+ -Wall -Wextra -Wno-unused-parameter -Wno-comment)
+
+set_target_properties(${TARGETS_STM}
+ PROPERTIES
+ C_EXTENSIONS OFF
+ C_STANDARD 99
+ C_STANDARD_REQUIRED ON
+)
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/Common/Event.h b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/Common/Event.h
new file mode 100644
index 0000000..3601b08
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/Common/Event.h
@@ -0,0 +1,6 @@
+#ifndef ZHEADER_EVENT_H
+#define ZHEADER_EVENT_H
+
+#define ZEVENT_NULL ( 0U )
+
+#endif
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/Common/MisraCType.h b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/Common/MisraCType.h
new file mode 100644
index 0000000..5a535fb
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/Common/MisraCType.h
@@ -0,0 +1,16 @@
+#ifndef ZHEADER_MISRACTYPE_H
+#define ZHEADER_MISRACTYPE_H
+
+typedef char char_t;
+typedef signed char int8_t;
+typedef unsigned char uint8_t;
+typedef signed short int16_t;
+typedef unsigned short uint16_t;
+typedef signed int int32_t;
+typedef unsigned int uint32_t;
+typedef signed long int64_t;
+typedef unsigned long uint64_t;
+typedef float float32_t;
+typedef double float64_t;
+
+#endif
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/Common/ZCommonInclude.h b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/Common/ZCommonInclude.h
new file mode 100644
index 0000000..6b9b84b
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/Common/ZCommonInclude.h
@@ -0,0 +1,16 @@
+#ifndef ZHEADER_ZCOMMONINCLUDE_H
+#define ZHEADER_ZCOMMONINCLUDE_H
+
+#define ZFALSE ( 0U )
+#define ZTRUE ( 1U )
+
+#define ZNULL ( 0x00 )
+
+#define ZEVENT_NONHIT ( -1 )
+
+#define ZRET_NORMAL ( 0U )
+#define ZRET_ERROR ( 1U )
+#define ZRET_NONACTIVE ( 2U )
+typedef unsigned char ZeRetType;
+
+#endif
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/AccelPedal/ZACCEL_AccelPedal.c b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/AccelPedal/ZACCEL_AccelPedal.c
new file mode 100644
index 0000000..fa692ee
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/AccelPedal/ZACCEL_AccelPedal.c
@@ -0,0 +1,117 @@
+/************************************************************/
+/* ZACCEL_AccelPedal.c */
+/* AccelPedal State transition model source file */
+/* ZIPC Designer Version 1.2.0 */
+/************************************************************/
+#include "../ZST_include.h"
+
+/* State management variable */
+static uint8_t ZACCEL_AccelPedalState[ZACCEL_ACCELPEDALSTATENOMAX];
+
+static void ZACCEL_AccelPedals0e1( void );
+static void ZACCEL_AccelPedals1e0( void );
+static void ZACCEL_AccelPedals0Event( void );
+static void ZACCEL_AccelPedals1Event( void );
+
+/****************************************/
+/* Action function */
+/* STM : AccelPedal */
+/* State : accel_pedal_off( No 0 ) */
+/* Event : evt_accel_pedal_on( No 1 ) */
+/****************************************/
+static void ZACCEL_AccelPedals0e1( void )
+{
+ ZACCEL_AccelPedalState[ZACCEL_ACCELPEDAL] = ( uint8_t )ZACCEL_ACCELPEDALS1;
+ stm_aps_start_activity_accel_pedal_on();
+}
+
+/****************************************/
+/* Action function */
+/* STM : AccelPedal */
+/* State : accel_pedal_on( No 1 ) */
+/* Event : evt_accel_pedal_off( No 0 )*/
+/****************************************/
+static void ZACCEL_AccelPedals1e0( void )
+{
+ ZACCEL_AccelPedalState[ZACCEL_ACCELPEDAL] = ( uint8_t )ZACCEL_ACCELPEDALS0;
+ stm_aps_start_activity_accel_pedal_off();
+}
+
+/****************************************/
+/* Event appraisal function */
+/* STM : AccelPedal */
+/* State : accel_pedal_off( No 0 ) */
+/****************************************/
+static void ZACCEL_AccelPedals0Event( void )
+{
+ /*evt_accel_pedal_on*/
+ if( g_stm_event == StmEvtNoAccelPedalOn )
+ {
+ ZACCEL_AccelPedals0e1();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+}
+
+/****************************************/
+/* Event appraisal function */
+/* STM : AccelPedal */
+/* State : accel_pedal_on( No 1 ) */
+/****************************************/
+static void ZACCEL_AccelPedals1Event( void )
+{
+ /*evt_accel_pedal_off*/
+ if( g_stm_event == StmEvtNoAccelPedalOff )
+ {
+ ZACCEL_AccelPedals1e0();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+}
+
+/****************************************/
+/* Event call function */
+/* STM : AccelPedal */
+/****************************************/
+void stm_aps_event_call( void )
+{
+ stm_aps_start_stm();
+ switch( ZACCEL_AccelPedalState[ZACCEL_ACCELPEDAL] )
+ {
+ case ZACCEL_ACCELPEDALS0:
+ ZACCEL_AccelPedals0Event();
+ break;
+ case ZACCEL_ACCELPEDALS1:
+ ZACCEL_AccelPedals1Event();
+ break;
+ default:
+ /*Not accessible to this else (default).*/
+ break;
+ }
+}
+
+/****************************************/
+/* Initial function */
+/* STM : AccelPedal */
+/****************************************/
+void stm_aps_initialize( void )
+{
+ ZACCEL_AccelPedalState[ZACCEL_ACCELPEDAL] = ( uint8_t )ZACCEL_ACCELPEDALS0;
+ stm_aps_start_activity_accel_pedal_off();
+}
+
+/****************************************/
+/* Terminate function */
+/* STM : AccelPedal */
+/****************************************/
+void ZACCEL_AccelPedalTerminate( void )
+{
+ ZACCEL_AccelPedalState[ZACCEL_ACCELPEDAL] = ( uint8_t )ZACCEL_ACCELPEDALTERMINATE;
+}
+
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/AccelPedal/ZACCEL_AccelPedal.h b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/AccelPedal/ZACCEL_AccelPedal.h
new file mode 100644
index 0000000..40da956
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/AccelPedal/ZACCEL_AccelPedal.h
@@ -0,0 +1,41 @@
+/************************************************************/
+/* ZACCEL_AccelPedal.h */
+/* AccelPedal State transition model header file */
+/* ZIPC Designer Version 1.2.0 */
+/************************************************************/
+#ifndef ZHEADER_ZACCEL_ACCELPEDAL_H
+#define ZHEADER_ZACCEL_ACCELPEDAL_H
+
+/*State management variable access define*/
+#define ZACCEL_ACCELPEDAL ( 0U )
+#define ZACCEL_ACCELPEDALS0 ( 0U )
+#define ZACCEL_ACCELPEDALS1 ( 1U )
+#define ZACCEL_ACCELPEDALSTATENOMAX ( 1U )
+
+/*End state define*/
+#define ZACCEL_ACCELPEDALEND ( 2U )
+/*Terminate state define*/
+#define ZACCEL_ACCELPEDALTERMINATE ( ZACCEL_ACCELPEDALEND + 1U )
+
+/*State no define*/
+#define ZACCEL_ACCELPEDALS0STATENO ( 0U )
+#define ZACCEL_ACCELPEDALS1STATENO ( 1U )
+
+/*State serial no define*/
+#define ZACCEL_ACCELPEDALS0STATESERIALNO ( 0U )
+#define ZACCEL_ACCELPEDALS1STATESERIALNO ( 1U )
+
+/*Event no define*/
+#define ZACCEL_ACCELPEDALE0EVENTNO ( 0U )
+#define ZACCEL_ACCELPEDALE1EVENTNO ( 1U )
+
+/*Event serial no define*/
+#define ZACCEL_ACCELPEDALE0EVENTSERIALNO ( 0U )
+#define ZACCEL_ACCELPEDALE1EVENTSERIALNO ( 1U )
+
+/*Extern function*/
+extern void stm_aps_event_call( void );
+extern void stm_aps_initialize( void );
+extern void ZACCEL_AccelPedalTerminate( void );
+
+#endif
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/AccelPedal/ZACCEL_AccelPedalState_func.c b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/AccelPedal/ZACCEL_AccelPedalState_func.c
new file mode 100644
index 0000000..1fd9c2a
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/AccelPedal/ZACCEL_AccelPedalState_func.c
@@ -0,0 +1,45 @@
+/************************************************************/
+/* ZACCEL_AccelPedalState_func.c */
+/* Function and variable source file */
+/* ZIPC Designer Version 1.2.0 */
+/************************************************************/
+#include "../ZST_include.h"
+
+/*************************************************************
+ Function definition
+*************************************************************/
+
+/*
+ * @name stm_aps_start_activity_accel_pedal_off
+ */
+void stm_aps_start_activity_accel_pedal_off() {
+ g_stm_crr_state.car_element[StmCarElementNoAccelPedal].state = StmAccelPedalSttNoOff;
+ g_stm_crr_state.car_element[StmCarElementNoAccelPedal].changed = STM_TRUE;
+}
+
+/*
+ * @name stm_aps_start_activity_accel_pedal_on
+ */
+void stm_aps_start_activity_accel_pedal_on() {
+ g_stm_crr_state.car_element[StmCarElementNoAccelPedal].state = StmAccelPedalSttNoOn;
+ g_stm_crr_state.car_element[StmCarElementNoAccelPedal].changed = STM_TRUE;
+}
+
+/*
+ * @name stm_aps_initialize_variable
+ */
+void stm_aps_initialize_variable() {
+ g_stm_prv_state.car_element[StmCarElementNoAccelPedal].state = StmAccelPedalSttNoOff;
+ g_stm_prv_state.car_element[StmCarElementNoAccelPedal].changed = STM_FALSE;
+
+ g_stm_crr_state.car_element[StmCarElementNoAccelPedal].state = StmAccelPedalSttNoOff;
+ g_stm_crr_state.car_element[StmCarElementNoAccelPedal].changed = STM_FALSE;
+}
+
+/*
+ * @name stm_aps_start_stm
+ */
+void stm_aps_start_stm() {
+ g_stm_prv_state.car_element[StmCarElementNoAccelPedal].state = g_stm_crr_state.car_element[StmCarElementNoAccelPedal].state;
+ g_stm_crr_state.car_element[StmCarElementNoAccelPedal].changed = STM_FALSE;
+}
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/AccelPedal/ZACCEL_AccelPedalState_func.h b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/AccelPedal/ZACCEL_AccelPedalState_func.h
new file mode 100644
index 0000000..7d36cd0
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/AccelPedal/ZACCEL_AccelPedalState_func.h
@@ -0,0 +1,14 @@
+/************************************************************/
+/* ZACCEL_AccelPedalState_func.h */
+/* Function and variable header file */
+/* ZIPC Designer Version 1.2.0 */
+/************************************************************/
+#ifndef ZHEADER_ZACCEL_ACCELPEDALSTATE_FUNC_H
+#define ZHEADER_ZACCEL_ACCELPEDALSTATE_FUNC_H
+
+extern void stm_aps_start_activity_accel_pedal_off();
+extern void stm_aps_start_activity_accel_pedal_on();
+extern void stm_aps_initialize_variable();
+extern void stm_aps_start_stm();
+
+#endif
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/AppsLayer/ZAPL_AppsLayer.c b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/AppsLayer/ZAPL_AppsLayer.c
new file mode 100644
index 0000000..9002810
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/AppsLayer/ZAPL_AppsLayer.c
@@ -0,0 +1,1991 @@
+/************************************************************/
+/* ZAPL_AppsLayer.c */
+/* AppsLayer State transition model source file */
+/* ZIPC Designer Version 1.2.0 */
+/************************************************************/
+#include "../ZST_include.h"
+
+/* State management variable */
+static uint8_t ZAPL_AppsLayerState[ZAPL_APPSLAYERSTATENOMAX];
+
+static void ZAPL_AppsLayers0StateEntry( void );
+static void ZAPL_AppsLayers1StateEntry( void );
+static void ZAPL_AppsLayers0e1( void );
+static void ZAPL_AppsLayers1e0( void );
+static void ZAPL_RestrictionModeOffs0e0( void );
+static void ZAPL_RestrictionModeOffs0e2( void );
+static void ZAPL_RestrictionModeOffs0e3( void );
+static void ZAPL_RestrictionModeOffs0e6( void );
+static void ZAPL_RestrictionModeOffs0e7( void );
+static void ZAPL_RestrictionModeOffs0e13( void );
+static void ZAPL_RestrictionModeOffs0e15( void );
+static void ZAPL_RestrictionModeOffs0e18( void );
+static void ZAPL_RestrictionModeOffs1e8( void );
+static void ZAPL_RestrictionModeOffs1e14( void );
+static void ZAPL_RestrictionModeOffs2e3( void );
+static void ZAPL_RestrictionModeOffs3e16( void );
+static void ZAPL_RestrictionModeOffs4e17( void );
+static void ZAPL_RestrictionModeOffs5e3( void );
+static void ZAPL_RestrictionModeOffs6e6( void );
+static void ZAPL_RestrictionModeOffs7e7( void );
+static void ZAPL_RestrictionModeOns0e1( void );
+static void ZAPL_RestrictionModeOns0e2( void );
+static void ZAPL_RestrictionModeOns1e0( void );
+static void ZAPL_RestrictionModeOns1e3( void );
+static void ZAPL_AppsLayers0Event( void );
+static void ZAPL_RestrictionModeOffs0Event( void );
+static void ZAPL_RestrictionModeOffs1Event( void );
+static void ZAPL_RestrictionModeOffs2Event( void );
+static void ZAPL_RestrictionModeOffs3Event( void );
+static void ZAPL_RestrictionModeOffs4Event( void );
+static void ZAPL_RestrictionModeOffs5Event( void );
+static void ZAPL_RestrictionModeOffs6Event( void );
+static void ZAPL_RestrictionModeOffs7Event( void );
+static void ZAPL_AppsLayers1Event( void );
+static void ZAPL_RestrictionModeOns0Event( void );
+static void ZAPL_RestrictionModeOns1Event( void );
+
+/****************************************/
+/* State start activity function */
+/* STM : AppsLayer */
+/* State : restriction_mode_off( No 0 ) */
+/****************************************/
+static void ZAPL_AppsLayers0StateEntry( void )
+{
+ switch( ZAPL_AppsLayerState[ZAPL_APPSLAYERS0F] )
+ {
+ case ZAPL_RESTRICTIONMODEOFFS0:
+ stm_apl_start_activity_none();
+ break;
+ case ZAPL_RESTRICTIONMODEOFFS1:
+ stm_apl_start_activity_map();
+ break;
+ case ZAPL_RESTRICTIONMODEOFFS2:
+ stm_apl_start_activity_map_split();
+ break;
+ case ZAPL_RESTRICTIONMODEOFFS3:
+ stm_apl_start_activity_map_fullscreen();
+ break;
+ case ZAPL_RESTRICTIONMODEOFFS4:
+ stm_apl_start_activity_splitable_normal();
+ break;
+ case ZAPL_RESTRICTIONMODEOFFS5:
+ stm_apl_start_activity_splitable_split();
+ break;
+ case ZAPL_RESTRICTIONMODEOFFS6:
+ stm_apl_start_activity_general();
+ break;
+ case ZAPL_RESTRICTIONMODEOFFS7:
+ stm_apl_start_activity_system();
+ break;
+ default:
+ /*Not accessible to this else (default).*/
+ break;
+ }
+}
+
+/****************************************/
+/* State start activity function */
+/* STM : AppsLayer */
+/* State : restriction_mode_on( No 1 )*/
+/****************************************/
+static void ZAPL_AppsLayers1StateEntry( void )
+{
+ switch( ZAPL_AppsLayerState[ZAPL_APPSLAYERS1F] )
+ {
+ case ZAPL_RESTRICTIONMODEONS0:
+ stm_apl_start_activity_map();
+ break;
+ case ZAPL_RESTRICTIONMODEONS1:
+ stm_apl_start_activity_map_fullscreen();
+ break;
+ default:
+ /*Not accessible to this else (default).*/
+ break;
+ }
+}
+
+/****************************************/
+/* Action function */
+/* STM : AppsLayer */
+/* State : restriction_mode_off( No 0 ) */
+/* Event : stt_prv_layer_apps_not_sys_nml( No 1 ) */
+/****************************************/
+static void ZAPL_AppsLayers0e1( void )
+{
+ ZAPL_AppsLayerState[ZAPL_APPSLAYER] = ( uint8_t )ZAPL_APPSLAYERS1;
+ ZAPL_AppsLayerState[ZAPL_APPSLAYERS1F] = ( uint8_t )ZAPL_RESTRICTIONMODEONS0;
+ ZAPL_AppsLayers1StateEntry();
+}
+
+/****************************************/
+/* Action function */
+/* STM : AppsLayer */
+/* State : restriction_mode_on( No 1 )*/
+/* Event : stt_restriction_mode_off( No 0 ) */
+/****************************************/
+static void ZAPL_AppsLayers1e0( void )
+{
+ ZAPL_AppsLayerState[ZAPL_APPSLAYER] = ( uint8_t )ZAPL_APPSLAYERS0;
+ ZAPL_AppsLayers0StateEntry();
+}
+
+/****************************************/
+/* Action function */
+/* STM : RestrictionModeOff */
+/* State : none( No 0 ) */
+/* Event : ara_normal( No 0 ) */
+/****************************************/
+static void ZAPL_RestrictionModeOffs0e0( void )
+{
+ ZAPL_AppsLayerState[ZAPL_APPSLAYERS0F] = ( uint8_t )ZAPL_RESTRICTIONMODEOFFS1;
+ stm_apl_start_activity_map();
+}
+
+/****************************************/
+/* Action function */
+/* STM : RestrictionModeOff */
+/* State : none( No 0 ) */
+/* Event : ara_fullscreen( No 2 ) */
+/****************************************/
+static void ZAPL_RestrictionModeOffs0e2( void )
+{
+ ZAPL_AppsLayerState[ZAPL_APPSLAYERS0F] = ( uint8_t )ZAPL_RESTRICTIONMODEOFFS3;
+ stm_apl_start_activity_map_fullscreen();
+}
+
+/****************************************/
+/* Action function */
+/* STM : RestrictionModeOff */
+/* State : none( No 0 ) */
+/* Event : ara_normal( No 3 ) */
+/****************************************/
+static void ZAPL_RestrictionModeOffs0e3( void )
+{
+ ZAPL_AppsLayerState[ZAPL_APPSLAYERS0F] = ( uint8_t )ZAPL_RESTRICTIONMODEOFFS4;
+ stm_apl_start_activity_splitable_normal();
+}
+
+/****************************************/
+/* Action function */
+/* STM : RestrictionModeOff */
+/* State : none( No 0 ) */
+/* Event : ara_normal( No 6 ) */
+/****************************************/
+static void ZAPL_RestrictionModeOffs0e6( void )
+{
+ ZAPL_AppsLayerState[ZAPL_APPSLAYERS0F] = ( uint8_t )ZAPL_RESTRICTIONMODEOFFS6;
+ stm_apl_start_activity_general();
+}
+
+/****************************************/
+/* Action function */
+/* STM : RestrictionModeOff */
+/* State : none( No 0 ) */
+/* Event : ara_normal( No 7 ) */
+/****************************************/
+static void ZAPL_RestrictionModeOffs0e7( void )
+{
+ ZAPL_AppsLayerState[ZAPL_APPSLAYERS0F] = ( uint8_t )ZAPL_RESTRICTIONMODEOFFS7;
+ stm_apl_start_activity_system();
+}
+
+/****************************************/
+/* Action function */
+/* STM : RestrictionModeOff */
+/* State : none( No 0 ) */
+/* Event : stt_prv_layer_apps_none( No 13 ) */
+/****************************************/
+static void ZAPL_RestrictionModeOffs0e13( void )
+{
+ stm_apl_start_activity_none();
+}
+
+/****************************************/
+/* Action function */
+/* STM : RestrictionModeOff */
+/* State : none( No 0 ) */
+/* Event : stt_prv_layer_apps_map_spl( No 15 ) */
+/****************************************/
+static void ZAPL_RestrictionModeOffs0e15( void )
+{
+ ZAPL_AppsLayerState[ZAPL_APPSLAYERS0F] = ( uint8_t )ZAPL_RESTRICTIONMODEOFFS2;
+ stm_apl_start_activity_map_split();
+}
+
+/****************************************/
+/* Action function */
+/* STM : RestrictionModeOff */
+/* State : none( No 0 ) */
+/* Event : stt_prv_layer_apps_spl_spl( No 18 ) */
+/****************************************/
+static void ZAPL_RestrictionModeOffs0e18( void )
+{
+ ZAPL_AppsLayerState[ZAPL_APPSLAYERS0F] = ( uint8_t )ZAPL_RESTRICTIONMODEOFFS5;
+ stm_apl_start_activity_splitable_split();
+}
+
+/****************************************/
+/* Action function */
+/* STM : RestrictionModeOff */
+/* State : map( No 1 ) */
+/* Event : ara_fullscreen( No 8 ) */
+/****************************************/
+static void ZAPL_RestrictionModeOffs1e8( void )
+{
+ ZAPL_AppsLayerState[ZAPL_APPSLAYERS0F] = ( uint8_t )ZAPL_RESTRICTIONMODEOFFS0;
+ stm_apl_start_activity_none();
+}
+
+/****************************************/
+/* Action function */
+/* STM : RestrictionModeOff */
+/* State : map( No 1 ) */
+/* Event : stt_prv_layer_apps_map_nml( No 14 ) */
+/****************************************/
+static void ZAPL_RestrictionModeOffs1e14( void )
+{
+ stm_apl_start_activity_map();
+}
+
+/****************************************/
+/* Action function */
+/* STM : RestrictionModeOff */
+/* State : map_split( No 2 ) */
+/* Event : ara_normal( No 3 ) */
+/****************************************/
+static void ZAPL_RestrictionModeOffs2e3( void )
+{
+ stm_apl_start_activity_map_split();
+}
+
+/****************************************/
+/* Action function */
+/* STM : RestrictionModeOff */
+/* State : map_fullscreen( No 3 ) */
+/* Event : stt_prv_layer_apps_map_fll( No 16 ) */
+/****************************************/
+static void ZAPL_RestrictionModeOffs3e16( void )
+{
+ stm_apl_start_activity_map_fullscreen();
+}
+
+/****************************************/
+/* Action function */
+/* STM : RestrictionModeOff */
+/* State : splitable_normal( No 4 ) */
+/* Event : stt_prv_layer_apps_spl_nml( No 17 ) */
+/****************************************/
+static void ZAPL_RestrictionModeOffs4e17( void )
+{
+ stm_apl_start_activity_splitable_normal();
+}
+
+/****************************************/
+/* Action function */
+/* STM : RestrictionModeOff */
+/* State : splitable_split( No 5 ) */
+/* Event : ara_normal( No 3 ) */
+/****************************************/
+static void ZAPL_RestrictionModeOffs5e3( void )
+{
+ stm_apl_start_activity_splitable_split();
+}
+
+/****************************************/
+/* Action function */
+/* STM : RestrictionModeOff */
+/* State : general( No 6 ) */
+/* Event : ara_normal( No 6 ) */
+/****************************************/
+static void ZAPL_RestrictionModeOffs6e6( void )
+{
+ stm_apl_start_activity_general();
+}
+
+/****************************************/
+/* Action function */
+/* STM : RestrictionModeOff */
+/* State : system( No 7 ) */
+/* Event : ara_normal( No 7 ) */
+/****************************************/
+static void ZAPL_RestrictionModeOffs7e7( void )
+{
+ stm_apl_start_activity_system();
+}
+
+/****************************************/
+/* Action function */
+/* STM : RestrictionModeOn */
+/* State : map( No 0 ) */
+/* Event : ara_fullscreen( No 1 ) */
+/****************************************/
+static void ZAPL_RestrictionModeOns0e1( void )
+{
+ ZAPL_AppsLayerState[ZAPL_APPSLAYERS1F] = ( uint8_t )ZAPL_RESTRICTIONMODEONS1;
+ stm_apl_start_activity_map_fullscreen();
+}
+
+/****************************************/
+/* Action function */
+/* STM : RestrictionModeOn */
+/* State : map( No 0 ) */
+/* Event : stt_prv_layer_apps_map_nml( No 2 ) */
+/****************************************/
+static void ZAPL_RestrictionModeOns0e2( void )
+{
+ stm_apl_start_activity_map();
+}
+
+/****************************************/
+/* Action function */
+/* STM : RestrictionModeOn */
+/* State : map_fullscreen( No 1 ) */
+/* Event : ara_normal( No 0 ) */
+/****************************************/
+static void ZAPL_RestrictionModeOns1e0( void )
+{
+ ZAPL_AppsLayerState[ZAPL_APPSLAYERS1F] = ( uint8_t )ZAPL_RESTRICTIONMODEONS0;
+ stm_apl_start_activity_map();
+}
+
+/****************************************/
+/* Action function */
+/* STM : RestrictionModeOn */
+/* State : map_fullscreen( No 1 ) */
+/* Event : stt_prv_layer_apps_map_fll( No 3 ) */
+/****************************************/
+static void ZAPL_RestrictionModeOns1e3( void )
+{
+ stm_apl_start_activity_map_fullscreen();
+}
+
+/****************************************/
+/* Event appraisal function */
+/* STM : AppsLayer */
+/* State : restriction_mode_off( No 0 ) */
+/****************************************/
+static void ZAPL_AppsLayers0Event( void )
+{
+ /*stt_restriction_mode_on*/
+ if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOn )
+ {
+ stm_apl_event_restriction_mode_on();
+ /*stt_map_is_activated*/
+ if( g_stm_map_is_activated == STM_TRUE )
+ {
+ /*stt_prv_layer_apps_not_sys_nml*/
+ if( g_stm_prv_state.layer[StmLayerNoApps].state != StmLayoutNoSysNml )
+ {
+ ZAPL_AppsLayers0e1();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+}
+
+/****************************************/
+/* Event appraisal function */
+/* STM : RestrictionModeOff */
+/* State : none( No 0 ) */
+/****************************************/
+static void ZAPL_RestrictionModeOffs0Event( void )
+{
+ /*stt_restriction_mode_off*/
+ if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOff )
+ {
+ /*evt_activate*/
+ if( g_stm_event == StmEvtNoActivate )
+ {
+ /*ctg_map*/
+ if( g_stm_category == StmCtgNoMap )
+ {
+ /*ara_normal*/
+ if( g_stm_area == StmAreaNoNormal )
+ {
+ ZAPL_RestrictionModeOffs0e0();
+ }
+ /*ara_fullscreen*/
+ else if( g_stm_area == StmAreaNoFullscreen )
+ {
+ ZAPL_RestrictionModeOffs0e2();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_splitable*/
+ else if( g_stm_category == StmCtgNoSplitable )
+ {
+ /*ara_normal*/
+ if( g_stm_area == StmAreaNoNormal )
+ {
+ ZAPL_RestrictionModeOffs0e3();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_general*/
+ else if( g_stm_category == StmCtgNoGeneral )
+ {
+ /*ara_normal*/
+ if( g_stm_area == StmAreaNoNormal )
+ {
+ ZAPL_RestrictionModeOffs0e6();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_system*/
+ else if( g_stm_category == StmCtgNoSystem )
+ {
+ /*ara_normal*/
+ if( g_stm_area == StmAreaNoNormal )
+ {
+ ZAPL_RestrictionModeOffs0e7();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*evt_undo*/
+ else if( g_stm_event == StmEvtNoUndo )
+ {
+ /*stt_prv_layer_apps_none*/
+ if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoNone )
+ {
+ ZAPL_RestrictionModeOffs0e13();
+ }
+ /*stt_prv_layer_apps_map_nml*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapNml )
+ {
+ ZAPL_RestrictionModeOffs0e0();
+ }
+ /*stt_prv_layer_apps_map_spl*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl )
+ {
+ ZAPL_RestrictionModeOffs0e15();
+ }
+ /*stt_prv_layer_apps_map_fll*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapFll )
+ {
+ ZAPL_RestrictionModeOffs0e2();
+ }
+ /*stt_prv_layer_apps_spl_nml*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml )
+ {
+ ZAPL_RestrictionModeOffs0e3();
+ }
+ /*stt_prv_layer_apps_spl_spl*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl )
+ {
+ ZAPL_RestrictionModeOffs0e18();
+ }
+ /*stt_prv_layer_apps_gen_nml*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml )
+ {
+ ZAPL_RestrictionModeOffs0e6();
+ }
+ /*stt_prv_layer_apps_sys_nml*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSysNml )
+ {
+ ZAPL_RestrictionModeOffs0e7();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+}
+
+/****************************************/
+/* Event appraisal function */
+/* STM : RestrictionModeOff */
+/* State : map( No 1 ) */
+/****************************************/
+static void ZAPL_RestrictionModeOffs1Event( void )
+{
+ /*stt_restriction_mode_off*/
+ if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOff )
+ {
+ /*evt_activate*/
+ if( g_stm_event == StmEvtNoActivate )
+ {
+ /*ctg_map*/
+ if( g_stm_category == StmCtgNoMap )
+ {
+ /*ara_fullscreen*/
+ if( g_stm_area == StmAreaNoFullscreen )
+ {
+ ZAPL_RestrictionModeOffs0e2();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_splitable*/
+ else if( g_stm_category == StmCtgNoSplitable )
+ {
+ /*ara_normal*/
+ if( g_stm_area == StmAreaNoNormal )
+ {
+ ZAPL_RestrictionModeOffs0e15();
+ }
+ /*ara_split_sub*/
+ else if( g_stm_area == StmAreaNoSplitSub )
+ {
+ ZAPL_RestrictionModeOffs0e15();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_general*/
+ else if( g_stm_category == StmCtgNoGeneral )
+ {
+ /*ara_normal*/
+ if( g_stm_area == StmAreaNoNormal )
+ {
+ ZAPL_RestrictionModeOffs0e6();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_system*/
+ else if( g_stm_category == StmCtgNoSystem )
+ {
+ /*ara_normal*/
+ if( g_stm_area == StmAreaNoNormal )
+ {
+ ZAPL_RestrictionModeOffs0e7();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_homescreen*/
+ else if( g_stm_category == StmCtgNoHomescreen )
+ {
+ /*ara_fullscreen*/
+ if( g_stm_area == StmAreaNoFullscreen )
+ {
+ ZAPL_RestrictionModeOffs1e8();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*evt_deactivate*/
+ else if( g_stm_event == StmEvtNoDeactivate )
+ {
+ /*ctg_map*/
+ if( g_stm_category == StmCtgNoMap )
+ {
+ ZAPL_RestrictionModeOffs1e8();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*evt_undo*/
+ else if( g_stm_event == StmEvtNoUndo )
+ {
+ /*stt_prv_layer_apps_none*/
+ if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoNone )
+ {
+ ZAPL_RestrictionModeOffs1e8();
+ }
+ /*stt_prv_layer_apps_map_nml*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapNml )
+ {
+ ZAPL_RestrictionModeOffs1e14();
+ }
+ /*stt_prv_layer_apps_map_spl*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl )
+ {
+ ZAPL_RestrictionModeOffs0e15();
+ }
+ /*stt_prv_layer_apps_map_fll*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapFll )
+ {
+ ZAPL_RestrictionModeOffs0e2();
+ }
+ /*stt_prv_layer_apps_spl_nml*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml )
+ {
+ ZAPL_RestrictionModeOffs0e3();
+ }
+ /*stt_prv_layer_apps_spl_spl*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl )
+ {
+ ZAPL_RestrictionModeOffs0e18();
+ }
+ /*stt_prv_layer_apps_gen_nml*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml )
+ {
+ ZAPL_RestrictionModeOffs0e6();
+ }
+ /*stt_prv_layer_apps_sys_nml*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSysNml )
+ {
+ ZAPL_RestrictionModeOffs0e7();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+}
+
+/****************************************/
+/* Event appraisal function */
+/* STM : RestrictionModeOff */
+/* State : map_split( No 2 ) */
+/****************************************/
+static void ZAPL_RestrictionModeOffs2Event( void )
+{
+ /*stt_restriction_mode_off*/
+ if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOff )
+ {
+ /*evt_activate*/
+ if( g_stm_event == StmEvtNoActivate )
+ {
+ /*ctg_map*/
+ if( g_stm_category == StmCtgNoMap )
+ {
+ /*ara_normal*/
+ if( g_stm_area == StmAreaNoNormal )
+ {
+ ZAPL_RestrictionModeOffs0e0();
+ }
+ /*ara_fullscreen*/
+ else if( g_stm_area == StmAreaNoFullscreen )
+ {
+ ZAPL_RestrictionModeOffs0e2();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_splitable*/
+ else if( g_stm_category == StmCtgNoSplitable )
+ {
+ /*ara_normal*/
+ if( g_stm_area == StmAreaNoNormal )
+ {
+ ZAPL_RestrictionModeOffs2e3();
+ }
+ /*ara_split_sub*/
+ else if( g_stm_area == StmAreaNoSplitSub )
+ {
+ ZAPL_RestrictionModeOffs2e3();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_general*/
+ else if( g_stm_category == StmCtgNoGeneral )
+ {
+ /*ara_normal*/
+ if( g_stm_area == StmAreaNoNormal )
+ {
+ ZAPL_RestrictionModeOffs0e6();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_system*/
+ else if( g_stm_category == StmCtgNoSystem )
+ {
+ /*ara_normal*/
+ if( g_stm_area == StmAreaNoNormal )
+ {
+ ZAPL_RestrictionModeOffs0e7();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_homescreen*/
+ else if( g_stm_category == StmCtgNoHomescreen )
+ {
+ /*ara_fullscreen*/
+ if( g_stm_area == StmAreaNoFullscreen )
+ {
+ ZAPL_RestrictionModeOffs1e8();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*evt_deactivate*/
+ else if( g_stm_event == StmEvtNoDeactivate )
+ {
+ /*ctg_map*/
+ if( g_stm_category == StmCtgNoMap )
+ {
+ ZAPL_RestrictionModeOffs0e3();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*evt_undo*/
+ else if( g_stm_event == StmEvtNoUndo )
+ {
+ /*stt_prv_layer_apps_none*/
+ if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoNone )
+ {
+ ZAPL_RestrictionModeOffs1e8();
+ }
+ /*stt_prv_layer_apps_map_nml*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapNml )
+ {
+ ZAPL_RestrictionModeOffs0e0();
+ }
+ /*stt_prv_layer_apps_map_spl*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl )
+ {
+ ZAPL_RestrictionModeOffs2e3();
+ }
+ /*stt_prv_layer_apps_map_fll*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapFll )
+ {
+ ZAPL_RestrictionModeOffs0e2();
+ }
+ /*stt_prv_layer_apps_spl_nml*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml )
+ {
+ ZAPL_RestrictionModeOffs0e3();
+ }
+ /*stt_prv_layer_apps_spl_spl*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl )
+ {
+ ZAPL_RestrictionModeOffs0e18();
+ }
+ /*stt_prv_layer_apps_gen_nml*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml )
+ {
+ ZAPL_RestrictionModeOffs0e6();
+ }
+ /*stt_prv_layer_apps_sys_nml*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSysNml )
+ {
+ ZAPL_RestrictionModeOffs0e7();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+}
+
+/****************************************/
+/* Event appraisal function */
+/* STM : RestrictionModeOff */
+/* State : map_fullscreen( No 3 ) */
+/****************************************/
+static void ZAPL_RestrictionModeOffs3Event( void )
+{
+ /*stt_restriction_mode_off*/
+ if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOff )
+ {
+ /*evt_activate*/
+ if( g_stm_event == StmEvtNoActivate )
+ {
+ /*ctg_map*/
+ if( g_stm_category == StmCtgNoMap )
+ {
+ /*ara_normal*/
+ if( g_stm_area == StmAreaNoNormal )
+ {
+ ZAPL_RestrictionModeOffs0e0();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_splitable*/
+ else if( g_stm_category == StmCtgNoSplitable )
+ {
+ /*ara_normal*/
+ if( g_stm_area == StmAreaNoNormal )
+ {
+ ZAPL_RestrictionModeOffs0e15();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_general*/
+ else if( g_stm_category == StmCtgNoGeneral )
+ {
+ /*ara_normal*/
+ if( g_stm_area == StmAreaNoNormal )
+ {
+ ZAPL_RestrictionModeOffs0e6();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_system*/
+ else if( g_stm_category == StmCtgNoSystem )
+ {
+ /*ara_normal*/
+ if( g_stm_area == StmAreaNoNormal )
+ {
+ ZAPL_RestrictionModeOffs0e7();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_homescreen*/
+ else if( g_stm_category == StmCtgNoHomescreen )
+ {
+ /*ara_fullscreen*/
+ if( g_stm_area == StmAreaNoFullscreen )
+ {
+ ZAPL_RestrictionModeOffs1e8();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*evt_deactivate*/
+ else if( g_stm_event == StmEvtNoDeactivate )
+ {
+ /*ctg_map*/
+ if( g_stm_category == StmCtgNoMap )
+ {
+ ZAPL_RestrictionModeOffs1e8();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*evt_undo*/
+ else if( g_stm_event == StmEvtNoUndo )
+ {
+ /*stt_prv_layer_apps_none*/
+ if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoNone )
+ {
+ ZAPL_RestrictionModeOffs1e8();
+ }
+ /*stt_prv_layer_apps_map_nml*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapNml )
+ {
+ ZAPL_RestrictionModeOffs0e0();
+ }
+ /*stt_prv_layer_apps_map_spl*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl )
+ {
+ ZAPL_RestrictionModeOffs0e15();
+ }
+ /*stt_prv_layer_apps_map_fll*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapFll )
+ {
+ ZAPL_RestrictionModeOffs3e16();
+ }
+ /*stt_prv_layer_apps_spl_nml*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml )
+ {
+ ZAPL_RestrictionModeOffs0e3();
+ }
+ /*stt_prv_layer_apps_spl_spl*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl )
+ {
+ ZAPL_RestrictionModeOffs0e18();
+ }
+ /*stt_prv_layer_apps_gen_nml*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml )
+ {
+ ZAPL_RestrictionModeOffs0e6();
+ }
+ /*stt_prv_layer_apps_sys_nml*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSysNml )
+ {
+ ZAPL_RestrictionModeOffs0e7();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+}
+
+/****************************************/
+/* Event appraisal function */
+/* STM : RestrictionModeOff */
+/* State : splitable_normal( No 4 ) */
+/****************************************/
+static void ZAPL_RestrictionModeOffs4Event( void )
+{
+ /*stt_restriction_mode_off*/
+ if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOff )
+ {
+ /*evt_activate*/
+ if( g_stm_event == StmEvtNoActivate )
+ {
+ /*ctg_map*/
+ if( g_stm_category == StmCtgNoMap )
+ {
+ /*ara_normal*/
+ if( g_stm_area == StmAreaNoNormal )
+ {
+ ZAPL_RestrictionModeOffs0e15();
+ }
+ /*ara_split_main*/
+ else if( g_stm_area == StmAreaNoSplitMain )
+ {
+ ZAPL_RestrictionModeOffs0e15();
+ }
+ /*ara_fullscreen*/
+ else if( g_stm_area == StmAreaNoFullscreen )
+ {
+ ZAPL_RestrictionModeOffs0e2();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_splitable*/
+ else if( g_stm_category == StmCtgNoSplitable )
+ {
+ /*ara_split_main*/
+ if( g_stm_area == StmAreaNoSplitMain )
+ {
+ ZAPL_RestrictionModeOffs0e18();
+ }
+ /*ara_split_sub*/
+ else if( g_stm_area == StmAreaNoSplitSub )
+ {
+ ZAPL_RestrictionModeOffs0e18();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_general*/
+ else if( g_stm_category == StmCtgNoGeneral )
+ {
+ /*ara_normal*/
+ if( g_stm_area == StmAreaNoNormal )
+ {
+ ZAPL_RestrictionModeOffs0e6();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_system*/
+ else if( g_stm_category == StmCtgNoSystem )
+ {
+ /*ara_normal*/
+ if( g_stm_area == StmAreaNoNormal )
+ {
+ ZAPL_RestrictionModeOffs0e7();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_homescreen*/
+ else if( g_stm_category == StmCtgNoHomescreen )
+ {
+ /*ara_fullscreen*/
+ if( g_stm_area == StmAreaNoFullscreen )
+ {
+ ZAPL_RestrictionModeOffs1e8();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*evt_deactivate*/
+ else if( g_stm_event == StmEvtNoDeactivate )
+ {
+ /*ctg_splitable*/
+ if( g_stm_category == StmCtgNoSplitable )
+ {
+ ZAPL_RestrictionModeOffs1e8();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*evt_undo*/
+ else if( g_stm_event == StmEvtNoUndo )
+ {
+ /*stt_prv_layer_apps_none*/
+ if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoNone )
+ {
+ ZAPL_RestrictionModeOffs1e8();
+ }
+ /*stt_prv_layer_apps_map_nml*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapNml )
+ {
+ ZAPL_RestrictionModeOffs0e0();
+ }
+ /*stt_prv_layer_apps_map_spl*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl )
+ {
+ ZAPL_RestrictionModeOffs0e15();
+ }
+ /*stt_prv_layer_apps_map_fll*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapFll )
+ {
+ ZAPL_RestrictionModeOffs0e2();
+ }
+ /*stt_prv_layer_apps_spl_nml*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml )
+ {
+ ZAPL_RestrictionModeOffs4e17();
+ }
+ /*stt_prv_layer_apps_spl_spl*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl )
+ {
+ ZAPL_RestrictionModeOffs0e18();
+ }
+ /*stt_prv_layer_apps_gen_nml*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml )
+ {
+ ZAPL_RestrictionModeOffs0e6();
+ }
+ /*stt_prv_layer_apps_sys_nml*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSysNml )
+ {
+ ZAPL_RestrictionModeOffs0e7();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+}
+
+/****************************************/
+/* Event appraisal function */
+/* STM : RestrictionModeOff */
+/* State : splitable_split( No 5 ) */
+/****************************************/
+static void ZAPL_RestrictionModeOffs5Event( void )
+{
+ /*stt_restriction_mode_off*/
+ if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOff )
+ {
+ /*evt_activate*/
+ if( g_stm_event == StmEvtNoActivate )
+ {
+ /*ctg_map*/
+ if( g_stm_category == StmCtgNoMap )
+ {
+ /*ara_normal*/
+ if( g_stm_area == StmAreaNoNormal )
+ {
+ ZAPL_RestrictionModeOffs0e15();
+ }
+ /*ara_split_main*/
+ else if( g_stm_area == StmAreaNoSplitMain )
+ {
+ ZAPL_RestrictionModeOffs0e15();
+ }
+ /*ara_fullscreen*/
+ else if( g_stm_area == StmAreaNoFullscreen )
+ {
+ ZAPL_RestrictionModeOffs0e2();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_splitable*/
+ else if( g_stm_category == StmCtgNoSplitable )
+ {
+ /*ara_normal*/
+ if( g_stm_area == StmAreaNoNormal )
+ {
+ ZAPL_RestrictionModeOffs5e3();
+ }
+ /*ara_split_main*/
+ else if( g_stm_area == StmAreaNoSplitMain )
+ {
+ ZAPL_RestrictionModeOffs5e3();
+ }
+ /*ara_split_sub*/
+ else if( g_stm_area == StmAreaNoSplitSub )
+ {
+ ZAPL_RestrictionModeOffs5e3();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_general*/
+ else if( g_stm_category == StmCtgNoGeneral )
+ {
+ /*ara_normal*/
+ if( g_stm_area == StmAreaNoNormal )
+ {
+ ZAPL_RestrictionModeOffs0e6();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_system*/
+ else if( g_stm_category == StmCtgNoSystem )
+ {
+ /*ara_normal*/
+ if( g_stm_area == StmAreaNoNormal )
+ {
+ ZAPL_RestrictionModeOffs0e7();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_homescreen*/
+ else if( g_stm_category == StmCtgNoHomescreen )
+ {
+ /*ara_fullscreen*/
+ if( g_stm_area == StmAreaNoFullscreen )
+ {
+ ZAPL_RestrictionModeOffs1e8();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*evt_deactivate*/
+ else if( g_stm_event == StmEvtNoDeactivate )
+ {
+ /*ctg_splitable*/
+ if( g_stm_category == StmCtgNoSplitable )
+ {
+ ZAPL_RestrictionModeOffs0e3();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*evt_undo*/
+ else if( g_stm_event == StmEvtNoUndo )
+ {
+ /*stt_prv_layer_apps_none*/
+ if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoNone )
+ {
+ ZAPL_RestrictionModeOffs1e8();
+ }
+ /*stt_prv_layer_apps_map_nml*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapNml )
+ {
+ ZAPL_RestrictionModeOffs0e0();
+ }
+ /*stt_prv_layer_apps_map_spl*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl )
+ {
+ ZAPL_RestrictionModeOffs0e15();
+ }
+ /*stt_prv_layer_apps_map_fll*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapFll )
+ {
+ ZAPL_RestrictionModeOffs0e2();
+ }
+ /*stt_prv_layer_apps_spl_nml*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml )
+ {
+ ZAPL_RestrictionModeOffs0e3();
+ }
+ /*stt_prv_layer_apps_spl_spl*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl )
+ {
+ ZAPL_RestrictionModeOffs5e3();
+ }
+ /*stt_prv_layer_apps_gen_nml*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml )
+ {
+ ZAPL_RestrictionModeOffs0e6();
+ }
+ /*stt_prv_layer_apps_sys_nml*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSysNml )
+ {
+ ZAPL_RestrictionModeOffs0e7();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+}
+
+/****************************************/
+/* Event appraisal function */
+/* STM : RestrictionModeOff */
+/* State : general( No 6 ) */
+/****************************************/
+static void ZAPL_RestrictionModeOffs6Event( void )
+{
+ /*stt_restriction_mode_off*/
+ if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOff )
+ {
+ /*evt_activate*/
+ if( g_stm_event == StmEvtNoActivate )
+ {
+ /*ctg_map*/
+ if( g_stm_category == StmCtgNoMap )
+ {
+ /*ara_normal*/
+ if( g_stm_area == StmAreaNoNormal )
+ {
+ ZAPL_RestrictionModeOffs0e0();
+ }
+ /*ara_fullscreen*/
+ else if( g_stm_area == StmAreaNoFullscreen )
+ {
+ ZAPL_RestrictionModeOffs0e2();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_splitable*/
+ else if( g_stm_category == StmCtgNoSplitable )
+ {
+ /*ara_normal*/
+ if( g_stm_area == StmAreaNoNormal )
+ {
+ ZAPL_RestrictionModeOffs0e3();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_general*/
+ else if( g_stm_category == StmCtgNoGeneral )
+ {
+ /*ara_normal*/
+ if( g_stm_area == StmAreaNoNormal )
+ {
+ ZAPL_RestrictionModeOffs6e6();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_system*/
+ else if( g_stm_category == StmCtgNoSystem )
+ {
+ /*ara_normal*/
+ if( g_stm_area == StmAreaNoNormal )
+ {
+ ZAPL_RestrictionModeOffs0e7();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_homescreen*/
+ else if( g_stm_category == StmCtgNoHomescreen )
+ {
+ /*ara_fullscreen*/
+ if( g_stm_area == StmAreaNoFullscreen )
+ {
+ ZAPL_RestrictionModeOffs1e8();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*evt_deactivate*/
+ else if( g_stm_event == StmEvtNoDeactivate )
+ {
+ /*ctg_general*/
+ if( g_stm_category == StmCtgNoGeneral )
+ {
+ ZAPL_RestrictionModeOffs1e8();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*evt_undo*/
+ else if( g_stm_event == StmEvtNoUndo )
+ {
+ /*stt_prv_layer_apps_none*/
+ if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoNone )
+ {
+ ZAPL_RestrictionModeOffs1e8();
+ }
+ /*stt_prv_layer_apps_map_nml*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapNml )
+ {
+ ZAPL_RestrictionModeOffs0e0();
+ }
+ /*stt_prv_layer_apps_map_spl*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl )
+ {
+ ZAPL_RestrictionModeOffs0e15();
+ }
+ /*stt_prv_layer_apps_map_fll*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapFll )
+ {
+ ZAPL_RestrictionModeOffs0e2();
+ }
+ /*stt_prv_layer_apps_spl_nml*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml )
+ {
+ ZAPL_RestrictionModeOffs0e3();
+ }
+ /*stt_prv_layer_apps_spl_spl*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl )
+ {
+ ZAPL_RestrictionModeOffs0e18();
+ }
+ /*stt_prv_layer_apps_gen_nml*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml )
+ {
+ ZAPL_RestrictionModeOffs6e6();
+ }
+ /*stt_prv_layer_apps_sys_nml*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSysNml )
+ {
+ ZAPL_RestrictionModeOffs0e7();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+}
+
+/****************************************/
+/* Event appraisal function */
+/* STM : RestrictionModeOff */
+/* State : system( No 7 ) */
+/****************************************/
+static void ZAPL_RestrictionModeOffs7Event( void )
+{
+ /*stt_restriction_mode_off*/
+ if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOff )
+ {
+ /*evt_activate*/
+ if( g_stm_event == StmEvtNoActivate )
+ {
+ /*ctg_map*/
+ if( g_stm_category == StmCtgNoMap )
+ {
+ /*ara_normal*/
+ if( g_stm_area == StmAreaNoNormal )
+ {
+ ZAPL_RestrictionModeOffs0e0();
+ }
+ /*ara_fullscreen*/
+ else if( g_stm_area == StmAreaNoFullscreen )
+ {
+ ZAPL_RestrictionModeOffs0e2();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_splitable*/
+ else if( g_stm_category == StmCtgNoSplitable )
+ {
+ /*ara_normal*/
+ if( g_stm_area == StmAreaNoNormal )
+ {
+ ZAPL_RestrictionModeOffs0e3();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_general*/
+ else if( g_stm_category == StmCtgNoGeneral )
+ {
+ /*ara_normal*/
+ if( g_stm_area == StmAreaNoNormal )
+ {
+ ZAPL_RestrictionModeOffs0e6();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_system*/
+ else if( g_stm_category == StmCtgNoSystem )
+ {
+ /*ara_normal*/
+ if( g_stm_area == StmAreaNoNormal )
+ {
+ ZAPL_RestrictionModeOffs7e7();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_homescreen*/
+ else if( g_stm_category == StmCtgNoHomescreen )
+ {
+ /*ara_fullscreen*/
+ if( g_stm_area == StmAreaNoFullscreen )
+ {
+ ZAPL_RestrictionModeOffs1e8();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*evt_deactivate*/
+ else if( g_stm_event == StmEvtNoDeactivate )
+ {
+ /*ctg_system*/
+ if( g_stm_category == StmCtgNoSystem )
+ {
+ ZAPL_RestrictionModeOffs1e8();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*evt_undo*/
+ else if( g_stm_event == StmEvtNoUndo )
+ {
+ /*stt_prv_layer_apps_none*/
+ if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoNone )
+ {
+ ZAPL_RestrictionModeOffs1e8();
+ }
+ /*stt_prv_layer_apps_map_nml*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapNml )
+ {
+ ZAPL_RestrictionModeOffs0e0();
+ }
+ /*stt_prv_layer_apps_map_spl*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl )
+ {
+ ZAPL_RestrictionModeOffs0e15();
+ }
+ /*stt_prv_layer_apps_map_fll*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapFll )
+ {
+ ZAPL_RestrictionModeOffs0e2();
+ }
+ /*stt_prv_layer_apps_spl_nml*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml )
+ {
+ ZAPL_RestrictionModeOffs0e3();
+ }
+ /*stt_prv_layer_apps_spl_spl*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl )
+ {
+ ZAPL_RestrictionModeOffs0e18();
+ }
+ /*stt_prv_layer_apps_gen_nml*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml )
+ {
+ ZAPL_RestrictionModeOffs0e6();
+ }
+ /*stt_prv_layer_apps_sys_nml*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSysNml )
+ {
+ ZAPL_RestrictionModeOffs7e7();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+}
+
+/****************************************/
+/* Event appraisal function */
+/* STM : AppsLayer */
+/* State : restriction_mode_on( No 1 )*/
+/****************************************/
+static void ZAPL_AppsLayers1Event( void )
+{
+ /*stt_restriction_mode_off*/
+ if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOff )
+ {
+ stm_apl_event_restriction_mode_off();
+ ZAPL_AppsLayers1e0();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+}
+
+/****************************************/
+/* Event appraisal function */
+/* STM : RestrictionModeOn */
+/* State : map( No 0 ) */
+/****************************************/
+static void ZAPL_RestrictionModeOns0Event( void )
+{
+ /*stt_restriction_mode_on*/
+ if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOn )
+ {
+ /*evt_activate*/
+ if( g_stm_event == StmEvtNoActivate )
+ {
+ /*ctg_map*/
+ if( g_stm_category == StmCtgNoMap )
+ {
+ /*ara_fullscreen*/
+ if( g_stm_area == StmAreaNoFullscreen )
+ {
+ ZAPL_RestrictionModeOns0e1();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*evt_undo*/
+ else if( g_stm_event == StmEvtNoUndo )
+ {
+ /*stt_prv_layer_apps_map_nml*/
+ if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapNml )
+ {
+ ZAPL_RestrictionModeOns0e2();
+ }
+ /*stt_prv_layer_apps_map_fll*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapFll )
+ {
+ ZAPL_RestrictionModeOns0e1();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+}
+
+/****************************************/
+/* Event appraisal function */
+/* STM : RestrictionModeOn */
+/* State : map_fullscreen( No 1 ) */
+/****************************************/
+static void ZAPL_RestrictionModeOns1Event( void )
+{
+ /*stt_restriction_mode_on*/
+ if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOn )
+ {
+ /*evt_activate*/
+ if( g_stm_event == StmEvtNoActivate )
+ {
+ /*ctg_map*/
+ if( g_stm_category == StmCtgNoMap )
+ {
+ /*ara_normal*/
+ if( g_stm_area == StmAreaNoNormal )
+ {
+ ZAPL_RestrictionModeOns1e0();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*evt_undo*/
+ else if( g_stm_event == StmEvtNoUndo )
+ {
+ /*stt_prv_layer_apps_map_nml*/
+ if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapNml )
+ {
+ ZAPL_RestrictionModeOns1e0();
+ }
+ /*stt_prv_layer_apps_map_fll*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapFll )
+ {
+ ZAPL_RestrictionModeOns1e3();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+}
+
+/****************************************/
+/* Event call function */
+/* STM : AppsLayer */
+/****************************************/
+void stm_apl_event_call( void )
+{
+ stm_apl_start_stm();
+ switch( ZAPL_AppsLayerState[ZAPL_APPSLAYER] )
+ {
+ case ZAPL_APPSLAYERS0:
+ switch( ZAPL_AppsLayerState[ZAPL_APPSLAYERS0F] )
+ {
+ case ZAPL_RESTRICTIONMODEOFFS0:
+ ZAPL_RestrictionModeOffs0Event();
+ break;
+ case ZAPL_RESTRICTIONMODEOFFS1:
+ ZAPL_RestrictionModeOffs1Event();
+ break;
+ case ZAPL_RESTRICTIONMODEOFFS2:
+ ZAPL_RestrictionModeOffs2Event();
+ break;
+ case ZAPL_RESTRICTIONMODEOFFS3:
+ ZAPL_RestrictionModeOffs3Event();
+ break;
+ case ZAPL_RESTRICTIONMODEOFFS4:
+ ZAPL_RestrictionModeOffs4Event();
+ break;
+ case ZAPL_RESTRICTIONMODEOFFS5:
+ ZAPL_RestrictionModeOffs5Event();
+ break;
+ case ZAPL_RESTRICTIONMODEOFFS6:
+ ZAPL_RestrictionModeOffs6Event();
+ break;
+ case ZAPL_RESTRICTIONMODEOFFS7:
+ ZAPL_RestrictionModeOffs7Event();
+ break;
+ default:
+ /*Not accessible to this else (default).*/
+ break;
+ }
+ ZAPL_AppsLayers0Event();
+ break;
+ case ZAPL_APPSLAYERS1:
+ switch( ZAPL_AppsLayerState[ZAPL_APPSLAYERS1F] )
+ {
+ case ZAPL_RESTRICTIONMODEONS0:
+ ZAPL_RestrictionModeOns0Event();
+ break;
+ case ZAPL_RESTRICTIONMODEONS1:
+ ZAPL_RestrictionModeOns1Event();
+ break;
+ default:
+ /*Not accessible to this else (default).*/
+ break;
+ }
+ ZAPL_AppsLayers1Event();
+ break;
+ default:
+ /*Not accessible to this else (default).*/
+ break;
+ }
+}
+
+/****************************************/
+/* Initial function */
+/* STM : AppsLayer */
+/****************************************/
+void stm_apl_initialize( void )
+{
+ ZAPL_AppsLayerState[ZAPL_APPSLAYER] = ( uint8_t )ZAPL_APPSLAYERS0;
+ ZAPL_AppsLayerState[ZAPL_APPSLAYERS0F] = ( uint8_t )ZAPL_RESTRICTIONMODEOFFS0;
+ ZAPL_AppsLayerState[ZAPL_APPSLAYERS1F] = ( uint8_t )ZAPL_RESTRICTIONMODEONS0;
+ ZAPL_AppsLayers0StateEntry();
+}
+
+/****************************************/
+/* Terminate function */
+/* STM : AppsLayer */
+/****************************************/
+void ZAPL_AppsLayerTerminate( void )
+{
+ ZAPL_AppsLayerState[ZAPL_APPSLAYER] = ( uint8_t )ZAPL_APPSLAYERTERMINATE;
+}
+
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/AppsLayer/ZAPL_AppsLayer.h b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/AppsLayer/ZAPL_AppsLayer.h
new file mode 100644
index 0000000..4cbbc10
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/AppsLayer/ZAPL_AppsLayer.h
@@ -0,0 +1,123 @@
+/************************************************************/
+/* ZAPL_AppsLayer.h */
+/* AppsLayer State transition model header file */
+/* ZIPC Designer Version 1.2.0 */
+/************************************************************/
+#ifndef ZHEADER_ZAPL_APPSLAYER_H
+#define ZHEADER_ZAPL_APPSLAYER_H
+
+/*State management variable access define*/
+#define ZAPL_APPSLAYER ( 0U )
+#define ZAPL_APPSLAYERS0F ( 1U )
+#define ZAPL_APPSLAYERS1F ( 2U )
+#define ZAPL_APPSLAYERS0 ( 0U )
+#define ZAPL_RESTRICTIONMODEOFFS0 ( 0U )
+#define ZAPL_RESTRICTIONMODEOFFS1 ( 1U )
+#define ZAPL_RESTRICTIONMODEOFFS2 ( 2U )
+#define ZAPL_RESTRICTIONMODEOFFS3 ( 3U )
+#define ZAPL_RESTRICTIONMODEOFFS4 ( 4U )
+#define ZAPL_RESTRICTIONMODEOFFS5 ( 5U )
+#define ZAPL_RESTRICTIONMODEOFFS6 ( 6U )
+#define ZAPL_RESTRICTIONMODEOFFS7 ( 7U )
+#define ZAPL_APPSLAYERS1 ( 1U )
+#define ZAPL_RESTRICTIONMODEONS0 ( 0U )
+#define ZAPL_RESTRICTIONMODEONS1 ( 1U )
+#define ZAPL_APPSLAYERSTATENOMAX ( 3U )
+
+/*End state define*/
+#define ZAPL_APPSLAYEREND ( 8U )
+/*Terminate state define*/
+#define ZAPL_APPSLAYERTERMINATE ( ZAPL_APPSLAYEREND + 1U )
+
+/*State no define*/
+#define ZAPL_APPSLAYERS0STATENO ( 0U )
+#define ZAPL_RESTRICTIONMODEOFFS0STATENO ( 0U )
+#define ZAPL_RESTRICTIONMODEOFFS1STATENO ( 1U )
+#define ZAPL_RESTRICTIONMODEOFFS2STATENO ( 2U )
+#define ZAPL_RESTRICTIONMODEOFFS3STATENO ( 3U )
+#define ZAPL_RESTRICTIONMODEOFFS4STATENO ( 4U )
+#define ZAPL_RESTRICTIONMODEOFFS5STATENO ( 5U )
+#define ZAPL_RESTRICTIONMODEOFFS6STATENO ( 6U )
+#define ZAPL_RESTRICTIONMODEOFFS7STATENO ( 7U )
+#define ZAPL_APPSLAYERS1STATENO ( 1U )
+#define ZAPL_RESTRICTIONMODEONS0STATENO ( 0U )
+#define ZAPL_RESTRICTIONMODEONS1STATENO ( 1U )
+
+/*State serial no define*/
+#define ZAPL_APPSLAYERS0STATESERIALNO ( 0U )
+#define ZAPL_RESTRICTIONMODEOFFS0STATESERIALNO ( 1U )
+#define ZAPL_RESTRICTIONMODEOFFS1STATESERIALNO ( 2U )
+#define ZAPL_RESTRICTIONMODEOFFS2STATESERIALNO ( 3U )
+#define ZAPL_RESTRICTIONMODEOFFS3STATESERIALNO ( 4U )
+#define ZAPL_RESTRICTIONMODEOFFS4STATESERIALNO ( 5U )
+#define ZAPL_RESTRICTIONMODEOFFS5STATESERIALNO ( 6U )
+#define ZAPL_RESTRICTIONMODEOFFS6STATESERIALNO ( 7U )
+#define ZAPL_RESTRICTIONMODEOFFS7STATESERIALNO ( 8U )
+#define ZAPL_APPSLAYERS1STATESERIALNO ( 9U )
+#define ZAPL_RESTRICTIONMODEONS0STATESERIALNO ( 10U )
+#define ZAPL_RESTRICTIONMODEONS1STATESERIALNO ( 11U )
+
+/*Event no define*/
+#define ZAPL_APPSLAYERE0EVENTNO ( 0U )
+#define ZAPL_APPSLAYERE1EVENTNO ( 1U )
+#define ZAPL_RESTRICTIONMODEOFFE0EVENTNO ( 0U )
+#define ZAPL_RESTRICTIONMODEOFFE1EVENTNO ( 1U )
+#define ZAPL_RESTRICTIONMODEOFFE2EVENTNO ( 2U )
+#define ZAPL_RESTRICTIONMODEOFFE3EVENTNO ( 3U )
+#define ZAPL_RESTRICTIONMODEOFFE4EVENTNO ( 4U )
+#define ZAPL_RESTRICTIONMODEOFFE5EVENTNO ( 5U )
+#define ZAPL_RESTRICTIONMODEOFFE6EVENTNO ( 6U )
+#define ZAPL_RESTRICTIONMODEOFFE7EVENTNO ( 7U )
+#define ZAPL_RESTRICTIONMODEOFFE8EVENTNO ( 8U )
+#define ZAPL_RESTRICTIONMODEOFFE9EVENTNO ( 9U )
+#define ZAPL_RESTRICTIONMODEOFFE10EVENTNO ( 10U )
+#define ZAPL_RESTRICTIONMODEOFFE11EVENTNO ( 11U )
+#define ZAPL_RESTRICTIONMODEOFFE12EVENTNO ( 12U )
+#define ZAPL_RESTRICTIONMODEOFFE13EVENTNO ( 13U )
+#define ZAPL_RESTRICTIONMODEOFFE14EVENTNO ( 14U )
+#define ZAPL_RESTRICTIONMODEOFFE15EVENTNO ( 15U )
+#define ZAPL_RESTRICTIONMODEOFFE16EVENTNO ( 16U )
+#define ZAPL_RESTRICTIONMODEOFFE17EVENTNO ( 17U )
+#define ZAPL_RESTRICTIONMODEOFFE18EVENTNO ( 18U )
+#define ZAPL_RESTRICTIONMODEOFFE19EVENTNO ( 19U )
+#define ZAPL_RESTRICTIONMODEOFFE20EVENTNO ( 20U )
+#define ZAPL_RESTRICTIONMODEONE0EVENTNO ( 0U )
+#define ZAPL_RESTRICTIONMODEONE1EVENTNO ( 1U )
+#define ZAPL_RESTRICTIONMODEONE2EVENTNO ( 2U )
+#define ZAPL_RESTRICTIONMODEONE3EVENTNO ( 3U )
+
+/*Event serial no define*/
+#define ZAPL_APPSLAYERE0EVENTSERIALNO ( 0U )
+#define ZAPL_APPSLAYERE1EVENTSERIALNO ( 1U )
+#define ZAPL_RESTRICTIONMODEOFFE0EVENTNO ( 0U )
+#define ZAPL_RESTRICTIONMODEOFFE1EVENTNO ( 1U )
+#define ZAPL_RESTRICTIONMODEOFFE2EVENTNO ( 2U )
+#define ZAPL_RESTRICTIONMODEOFFE3EVENTNO ( 3U )
+#define ZAPL_RESTRICTIONMODEOFFE4EVENTNO ( 4U )
+#define ZAPL_RESTRICTIONMODEOFFE5EVENTNO ( 5U )
+#define ZAPL_RESTRICTIONMODEOFFE6EVENTNO ( 6U )
+#define ZAPL_RESTRICTIONMODEOFFE7EVENTNO ( 7U )
+#define ZAPL_RESTRICTIONMODEOFFE8EVENTNO ( 8U )
+#define ZAPL_RESTRICTIONMODEOFFE9EVENTNO ( 9U )
+#define ZAPL_RESTRICTIONMODEOFFE10EVENTNO ( 10U )
+#define ZAPL_RESTRICTIONMODEOFFE11EVENTNO ( 11U )
+#define ZAPL_RESTRICTIONMODEOFFE12EVENTNO ( 12U )
+#define ZAPL_RESTRICTIONMODEOFFE13EVENTNO ( 13U )
+#define ZAPL_RESTRICTIONMODEOFFE14EVENTNO ( 14U )
+#define ZAPL_RESTRICTIONMODEOFFE15EVENTNO ( 15U )
+#define ZAPL_RESTRICTIONMODEOFFE16EVENTNO ( 16U )
+#define ZAPL_RESTRICTIONMODEOFFE17EVENTNO ( 17U )
+#define ZAPL_RESTRICTIONMODEOFFE18EVENTNO ( 18U )
+#define ZAPL_RESTRICTIONMODEOFFE19EVENTNO ( 19U )
+#define ZAPL_RESTRICTIONMODEOFFE20EVENTNO ( 20U )
+#define ZAPL_RESTRICTIONMODEONE0EVENTNO ( 0U )
+#define ZAPL_RESTRICTIONMODEONE1EVENTNO ( 1U )
+#define ZAPL_RESTRICTIONMODEONE2EVENTNO ( 2U )
+#define ZAPL_RESTRICTIONMODEONE3EVENTNO ( 3U )
+
+/*Extern function*/
+extern void stm_apl_event_call( void );
+extern void stm_apl_initialize( void );
+extern void ZAPL_AppsLayerTerminate( void );
+
+#endif
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/AppsLayer/ZAPL_Apps_func.c b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/AppsLayer/ZAPL_Apps_func.c
new file mode 100644
index 0000000..d2e7075
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/AppsLayer/ZAPL_Apps_func.c
@@ -0,0 +1,128 @@
+/************************************************************/
+/* ZAPL_Apps_func.c */
+/* Function and variable source file */
+/* ZIPC Designer Version 1.2.0 */
+/************************************************************/
+#include "../ZST_include.h"
+
+/*************************************************************
+ Function definition
+*************************************************************/
+
+/*
+ * @name stm_apl_start_activity_none
+ */
+void stm_apl_start_activity_none() {
+ g_stm_crr_state.layer[StmLayerNoApps].state = StmLayoutNoNone;
+ g_stm_crr_state.layer[StmLayerNoApps].changed = STM_TRUE;
+}
+
+/*
+ * @name stm_apl_start_activity_map
+ */
+void stm_apl_start_activity_map() {
+ g_stm_crr_state.layer[StmLayerNoApps].state = StmLayoutNoMapNml;
+ g_stm_crr_state.layer[StmLayerNoApps].changed = STM_TRUE;
+
+ if ((g_stm_event == StmEvtNoActivate)
+ && (g_stm_category == StmCtgNoMap)) {
+ g_stm_map_is_activated = STM_TRUE;
+ }
+}
+
+/*
+ * @name stm_apl_start_activity_map_split
+ */
+void stm_apl_start_activity_map_split() {
+ g_stm_crr_state.layer[StmLayerNoApps].state = StmLayoutNoMapSpl;
+ g_stm_crr_state.layer[StmLayerNoApps].changed = STM_TRUE;
+
+ if ((g_stm_event == StmEvtNoActivate)
+ && (g_stm_category == StmCtgNoMap)) {
+ g_stm_map_is_activated = STM_TRUE;
+ }
+}
+
+/*
+ * @name stm_apl_start_activity_map_fullscreen
+ */
+void stm_apl_start_activity_map_fullscreen() {
+ g_stm_crr_state.layer[StmLayerNoApps].state = StmLayoutNoMapFll;
+ g_stm_crr_state.layer[StmLayerNoApps].changed = STM_TRUE;
+
+ if ((g_stm_event == StmEvtNoActivate)
+ && (g_stm_category == StmCtgNoMap)) {
+ g_stm_map_is_activated = STM_TRUE;
+ }
+}
+
+/*
+ * @name stm_apl_start_activity_splitable_normal
+ */
+void stm_apl_start_activity_splitable_normal() {
+ g_stm_crr_state.layer[StmLayerNoApps].state = StmLayoutNoSplNml;
+ g_stm_crr_state.layer[StmLayerNoApps].changed = STM_TRUE;
+}
+
+/*
+ * @name stm_apl_start_activity_splitable_split
+ */
+void stm_apl_start_activity_splitable_split() {
+ g_stm_crr_state.layer[StmLayerNoApps].state = StmLayoutNoSplSpl;
+ g_stm_crr_state.layer[StmLayerNoApps].changed = STM_TRUE;
+}
+
+/*
+ * @name stm_apl_start_activity_general
+ */
+void stm_apl_start_activity_general() {
+ g_stm_crr_state.layer[StmLayerNoApps].state = StmLayoutNoGenNml;
+ g_stm_crr_state.layer[StmLayerNoApps].changed = STM_TRUE;
+}
+
+/*
+ * @name stm_apl_start_activity_system
+ */
+void stm_apl_start_activity_system() {
+ g_stm_crr_state.layer[StmLayerNoApps].state = StmLayoutNoSysNml;
+ g_stm_crr_state.layer[StmLayerNoApps].changed = STM_TRUE;
+}
+
+/*
+ * @name stm_apl_event_restriction_mode_off
+ */
+void stm_apl_event_restriction_mode_off() {
+ g_stm_crr_state.layer[StmLayerNoApps].state = g_prv_apps_state_car_stop;
+ g_stm_crr_state.layer[StmLayerNoApps].changed = STM_TRUE;
+}
+
+/*
+ * @name stm_apl_event_restriction_mode_on
+ */
+void stm_apl_event_restriction_mode_on() {
+ g_prv_apps_state_car_stop = g_stm_prv_state.layer[StmLayerNoApps].state;
+}
+
+/*
+ * @name stm_apl_initialize_variable
+ */
+void stm_apl_initialize_variable() {
+ g_stm_prv_state.layer[StmLayerNoApps].state = StmLayoutNoNone;
+ g_stm_prv_state.layer[StmLayerNoApps].changed = STM_FALSE;
+
+ g_stm_crr_state.layer[StmLayerNoApps].state = StmLayoutNoNone;
+ g_stm_crr_state.layer[StmLayerNoApps].changed = STM_FALSE;
+}
+
+/*
+ * @name stm_apl_start_stm
+ */
+void stm_apl_start_stm() {
+ if (g_stm_event == StmEvtNoUndo) {
+ // nop
+ }
+ else {
+ g_stm_prv_state.layer[StmLayerNoApps].state = g_stm_crr_state.layer[StmLayerNoApps].state;
+ }
+ g_stm_crr_state.layer[StmLayerNoApps].changed = STM_FALSE;
+}
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/AppsLayer/ZAPL_Apps_func.h b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/AppsLayer/ZAPL_Apps_func.h
new file mode 100644
index 0000000..4f74c9f
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/AppsLayer/ZAPL_Apps_func.h
@@ -0,0 +1,22 @@
+/************************************************************/
+/* ZAPL_Apps_func.h */
+/* Function and variable header file */
+/* ZIPC Designer Version 1.2.0 */
+/************************************************************/
+#ifndef ZHEADER_ZAPL_APPS_FUNC_H
+#define ZHEADER_ZAPL_APPS_FUNC_H
+
+extern void stm_apl_start_activity_none();
+extern void stm_apl_start_activity_map();
+extern void stm_apl_start_activity_map_split();
+extern void stm_apl_start_activity_map_fullscreen();
+extern void stm_apl_start_activity_splitable_normal();
+extern void stm_apl_start_activity_splitable_split();
+extern void stm_apl_start_activity_general();
+extern void stm_apl_start_activity_system();
+extern void stm_apl_event_restriction_mode_off();
+extern void stm_apl_event_restriction_mode_on();
+extern void stm_apl_initialize_variable();
+extern void stm_apl_start_stm();
+
+#endif
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/CarState/ZCAR_CarState.c b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/CarState/ZCAR_CarState.c
new file mode 100644
index 0000000..8e20123
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/CarState/ZCAR_CarState.c
@@ -0,0 +1,154 @@
+/************************************************************/
+/* ZCAR_CarState.c */
+/* CarState State transition model source file */
+/* ZIPC Designer Version 1.2.0 */
+/************************************************************/
+#include "../ZST_include.h"
+
+/* State management variable */
+static uint8_t ZCAR_CarStateState[ZCAR_CARSTATESTATENOMAX];
+
+static void ZCAR_CarStates0e1( void );
+static void ZCAR_CarStates1e0( void );
+static void ZCAR_CarStates0Event( void );
+static void ZCAR_CarStates1Event( void );
+
+/****************************************/
+/* Action function */
+/* STM : CarState */
+/* State : car_stop( No 0 ) */
+/* Event : stt_accel_pedal_on( No 1 ) */
+/****************************************/
+static void ZCAR_CarStates0e1( void )
+{
+ ZCAR_CarStateState[ZCAR_CARSTATE] = ( uint8_t )ZCAR_CARSTATES1;
+ stm_rns_start_activity_car_run();
+}
+
+/****************************************/
+/* Action function */
+/* STM : CarState */
+/* State : car_run( No 1 ) */
+/* Event : stt_accel_pedal_off( No 0 )*/
+/****************************************/
+static void ZCAR_CarStates1e0( void )
+{
+ ZCAR_CarStateState[ZCAR_CARSTATE] = ( uint8_t )ZCAR_CARSTATES0;
+ stm_rns_start_activity_car_stop();
+}
+
+/****************************************/
+/* Event appraisal function */
+/* STM : CarState */
+/* State : car_stop( No 0 ) */
+/****************************************/
+static void ZCAR_CarStates0Event( void )
+{
+ /*stt_lightstatus_brake_off*/
+ if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOff )
+ {
+ /*stt_accel_pedal_on*/
+ if( g_stm_crr_state.car_element[StmCarElementNoAccelPedal].state == StmAccelPedalSttNoOn )
+ {
+ ZCAR_CarStates0e1();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+}
+
+/****************************************/
+/* Event appraisal function */
+/* STM : CarState */
+/* State : car_run( No 1 ) */
+/****************************************/
+static void ZCAR_CarStates1Event( void )
+{
+ /*stt_lightstatus_brake_off*/
+ if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOff )
+ {
+ /*stt_accel_pedal_off*/
+ if( g_stm_crr_state.car_element[StmCarElementNoAccelPedal].state == StmAccelPedalSttNoOff )
+ {
+ ZCAR_CarStates1e0();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*stt_lightstatus_brake_on*/
+ else if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOn )
+ {
+ /*stt_accel_pedal_off*/
+ if( g_stm_crr_state.car_element[StmCarElementNoAccelPedal].state == StmAccelPedalSttNoOff )
+ {
+ ZCAR_CarStates1e0();
+ }
+ /*stt_accel_pedal_on*/
+ else if( g_stm_crr_state.car_element[StmCarElementNoAccelPedal].state == StmAccelPedalSttNoOn )
+ {
+ ZCAR_CarStates1e0();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+}
+
+/****************************************/
+/* Event call function */
+/* STM : CarState */
+/****************************************/
+void stm_rns_event_call( void )
+{
+ stm_rns_start_stm();
+ switch( ZCAR_CarStateState[ZCAR_CARSTATE] )
+ {
+ case ZCAR_CARSTATES0:
+ ZCAR_CarStates0Event();
+ break;
+ case ZCAR_CARSTATES1:
+ ZCAR_CarStates1Event();
+ break;
+ default:
+ /*Not accessible to this else (default).*/
+ break;
+ }
+}
+
+/****************************************/
+/* Initial function */
+/* STM : CarState */
+/****************************************/
+void stm_rns_initialize( void )
+{
+ ZCAR_CarStateState[ZCAR_CARSTATE] = ( uint8_t )ZCAR_CARSTATES0;
+ stm_rns_start_activity_car_stop();
+}
+
+/****************************************/
+/* Terminate function */
+/* STM : CarState */
+/****************************************/
+void ZCAR_CarStateTerminate( void )
+{
+ ZCAR_CarStateState[ZCAR_CARSTATE] = ( uint8_t )ZCAR_CARSTATETERMINATE;
+}
+
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/CarState/ZCAR_CarState.h b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/CarState/ZCAR_CarState.h
new file mode 100644
index 0000000..18003a7
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/CarState/ZCAR_CarState.h
@@ -0,0 +1,45 @@
+/************************************************************/
+/* ZCAR_CarState.h */
+/* CarState State transition model header file */
+/* ZIPC Designer Version 1.2.0 */
+/************************************************************/
+#ifndef ZHEADER_ZCAR_CARSTATE_H
+#define ZHEADER_ZCAR_CARSTATE_H
+
+/*State management variable access define*/
+#define ZCAR_CARSTATE ( 0U )
+#define ZCAR_CARSTATES0 ( 0U )
+#define ZCAR_CARSTATES1 ( 1U )
+#define ZCAR_CARSTATESTATENOMAX ( 1U )
+
+/*End state define*/
+#define ZCAR_CARSTATEEND ( 2U )
+/*Terminate state define*/
+#define ZCAR_CARSTATETERMINATE ( ZCAR_CARSTATEEND + 1U )
+
+/*State no define*/
+#define ZCAR_CARSTATES0STATENO ( 0U )
+#define ZCAR_CARSTATES1STATENO ( 1U )
+
+/*State serial no define*/
+#define ZCAR_CARSTATES0STATESERIALNO ( 0U )
+#define ZCAR_CARSTATES1STATESERIALNO ( 1U )
+
+/*Event no define*/
+#define ZCAR_CARSTATEE0EVENTNO ( 0U )
+#define ZCAR_CARSTATEE1EVENTNO ( 1U )
+#define ZCAR_CARSTATEE2EVENTNO ( 2U )
+#define ZCAR_CARSTATEE3EVENTNO ( 3U )
+
+/*Event serial no define*/
+#define ZCAR_CARSTATEE0EVENTSERIALNO ( 0U )
+#define ZCAR_CARSTATEE1EVENTSERIALNO ( 1U )
+#define ZCAR_CARSTATEE2EVENTSERIALNO ( 2U )
+#define ZCAR_CARSTATEE3EVENTSERIALNO ( 3U )
+
+/*Extern function*/
+extern void stm_rns_event_call( void );
+extern void stm_rns_initialize( void );
+extern void ZCAR_CarStateTerminate( void );
+
+#endif
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/CarState/ZCAR_CarState_func.c b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/CarState/ZCAR_CarState_func.c
new file mode 100644
index 0000000..d6cd5d1
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/CarState/ZCAR_CarState_func.c
@@ -0,0 +1,45 @@
+/************************************************************/
+/* ZCAR_CarState_func.c */
+/* Function and variable source file */
+/* ZIPC Designer Version 1.2.0 */
+/************************************************************/
+#include "../ZST_include.h"
+
+/*************************************************************
+ Function definition
+*************************************************************/
+
+/*
+ * @name stm_rns_start_activity_car_stop
+ */
+void stm_rns_start_activity_car_stop() {
+ g_stm_crr_state.car_element[StmCarElementNoRunning].state = StmRunningNoStop;
+ g_stm_crr_state.car_element[StmCarElementNoRunning].changed = STM_TRUE;
+}
+
+/*
+ * @name stm_rns_start_activity_car_run
+ */
+void stm_rns_start_activity_car_run() {
+ g_stm_crr_state.car_element[StmCarElementNoRunning].state = StmRunningNoRun;
+ g_stm_crr_state.car_element[StmCarElementNoRunning].changed = STM_TRUE;
+}
+
+/*
+ * @name stm_rns_initialize_variable
+ */
+void stm_rns_initialize_variable() {
+ g_stm_prv_state.car_element[StmCarElementNoRunning].state = StmRunningNoStop;
+ g_stm_prv_state.car_element[StmCarElementNoRunning].changed = STM_FALSE;
+
+ g_stm_crr_state.car_element[StmCarElementNoRunning].state = StmRunningNoStop;
+ g_stm_crr_state.car_element[StmCarElementNoRunning].changed = STM_FALSE;
+}
+
+/*
+ * @name stm_rns_start_stm
+ */
+void stm_rns_start_stm() {
+ g_stm_prv_state.car_element[StmCarElementNoRunning].state = g_stm_crr_state.car_element[StmCarElementNoRunning].state;
+ g_stm_crr_state.car_element[StmCarElementNoRunning].changed = STM_FALSE;
+}
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/CarState/ZCAR_CarState_func.h b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/CarState/ZCAR_CarState_func.h
new file mode 100644
index 0000000..8c1dc93
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/CarState/ZCAR_CarState_func.h
@@ -0,0 +1,14 @@
+/************************************************************/
+/* ZCAR_CarState_func.h */
+/* Function and variable header file */
+/* ZIPC Designer Version 1.2.0 */
+/************************************************************/
+#ifndef ZHEADER_ZCAR_CARSTATE_FUNC_H
+#define ZHEADER_ZCAR_CARSTATE_FUNC_H
+
+extern void stm_rns_start_activity_car_stop();
+extern void stm_rns_start_activity_car_run();
+extern void stm_rns_initialize_variable();
+extern void stm_rns_start_stm();
+
+#endif
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/HomeScreenLayer/ZHSL_HomeScreen.c b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/HomeScreenLayer/ZHSL_HomeScreen.c
new file mode 100644
index 0000000..1375c66
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/HomeScreenLayer/ZHSL_HomeScreen.c
@@ -0,0 +1,112 @@
+/************************************************************/
+/* ZHSL_HomeScreen.c */
+/* HomeScreen State transition model source file */
+/* ZIPC Designer Version 1.2.0 */
+/************************************************************/
+#include "../ZST_include.h"
+
+/* State management variable */
+static uint8_t ZHSL_HomeScreenState[ZHSL_HOMESCREENSTATENOMAX];
+
+static void ZHSL_HomeScreens0e0( void );
+static void ZHSL_HomeScreens0Event( void );
+static void ZHSL_HomeScreens1Event( void );
+
+/****************************************/
+/* Action function */
+/* STM : HomeScreen */
+/* State : none( No 0 ) */
+/* Event : ara_fullscreen( No 0 ) */
+/****************************************/
+static void ZHSL_HomeScreens0e0( void )
+{
+ ZHSL_HomeScreenState[ZHSL_HOMESCREEN] = ( uint8_t )ZHSL_HOMESCREENS1;
+ stm_hsl_start_activity_homescreen();
+}
+
+/****************************************/
+/* Event appraisal function */
+/* STM : HomeScreen */
+/* State : none( No 0 ) */
+/****************************************/
+static void ZHSL_HomeScreens0Event( void )
+{
+ /*evt_activate*/
+ if( g_stm_event == StmEvtNoActivate )
+ {
+ /*ctg_homescreen*/
+ if( g_stm_category == StmCtgNoHomescreen )
+ {
+ /*ara_fullscreen*/
+ if( g_stm_area == StmAreaNoFullscreen )
+ {
+ ZHSL_HomeScreens0e0();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+}
+
+/****************************************/
+/* Event appraisal function */
+/* STM : HomeScreen */
+/* State : homescreen( No 1 ) */
+/****************************************/
+static void ZHSL_HomeScreens1Event( void )
+{
+}
+
+/****************************************/
+/* Event call function */
+/* STM : HomeScreen */
+/****************************************/
+void stm_hsl_event_call( void )
+{
+ stm_hsl_start_stm();
+ switch( ZHSL_HomeScreenState[ZHSL_HOMESCREEN] )
+ {
+ case ZHSL_HOMESCREENS0:
+ ZHSL_HomeScreens0Event();
+ break;
+ case ZHSL_HOMESCREENS1:
+ ZHSL_HomeScreens1Event();
+ break;
+ default:
+ /*Not accessible to this else (default).*/
+ break;
+ }
+}
+
+/****************************************/
+/* Initial function */
+/* STM : HomeScreen */
+/****************************************/
+void stm_hsl_initialize( void )
+{
+ ZHSL_HomeScreenState[ZHSL_HOMESCREEN] = ( uint8_t )ZHSL_HOMESCREENS0;
+ stm_hsl_start_activity_none();
+}
+
+/****************************************/
+/* Terminate function */
+/* STM : HomeScreen */
+/****************************************/
+void ZHSL_HomeScreenTerminate( void )
+{
+ ZHSL_HomeScreenState[ZHSL_HOMESCREEN] = ( uint8_t )ZHSL_HOMESCREENTERMINATE;
+}
+
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/HomeScreenLayer/ZHSL_HomeScreen.h b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/HomeScreenLayer/ZHSL_HomeScreen.h
new file mode 100644
index 0000000..ffa8552
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/HomeScreenLayer/ZHSL_HomeScreen.h
@@ -0,0 +1,39 @@
+/************************************************************/
+/* ZHSL_HomeScreen.h */
+/* HomeScreen State transition model header file */
+/* ZIPC Designer Version 1.2.0 */
+/************************************************************/
+#ifndef ZHEADER_ZHSL_HOMESCREEN_H
+#define ZHEADER_ZHSL_HOMESCREEN_H
+
+/*State management variable access define*/
+#define ZHSL_HOMESCREEN ( 0U )
+#define ZHSL_HOMESCREENS0 ( 0U )
+#define ZHSL_HOMESCREENS1 ( 1U )
+#define ZHSL_HOMESCREENSTATENOMAX ( 1U )
+
+/*End state define*/
+#define ZHSL_HOMESCREENEND ( 2U )
+/*Terminate state define*/
+#define ZHSL_HOMESCREENTERMINATE ( ZHSL_HOMESCREENEND + 1U )
+
+/*State no define*/
+#define ZHSL_HOMESCREENS0STATENO ( 0U )
+#define ZHSL_HOMESCREENS1STATENO ( 1U )
+
+/*State serial no define*/
+#define ZHSL_HOMESCREENS0STATESERIALNO ( 0U )
+#define ZHSL_HOMESCREENS1STATESERIALNO ( 1U )
+
+/*Event no define*/
+#define ZHSL_HOMESCREENE0EVENTNO ( 0U )
+
+/*Event serial no define*/
+#define ZHSL_HOMESCREENE0EVENTSERIALNO ( 0U )
+
+/*Extern function*/
+extern void stm_hsl_event_call( void );
+extern void stm_hsl_initialize( void );
+extern void ZHSL_HomeScreenTerminate( void );
+
+#endif
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/HomeScreenLayer/ZHSL_HomeScreen_func.c b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/HomeScreenLayer/ZHSL_HomeScreen_func.c
new file mode 100644
index 0000000..4d50ab0
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/HomeScreenLayer/ZHSL_HomeScreen_func.c
@@ -0,0 +1,45 @@
+/************************************************************/
+/* ZHSL_HomeScreen_func.c */
+/* Function and variable source file */
+/* ZIPC Designer Version 1.2.0 */
+/************************************************************/
+#include "../ZST_include.h"
+
+/*************************************************************
+ Function definition
+*************************************************************/
+
+/*
+ * @name stm_hsl_start_activity_none
+ */
+void stm_hsl_start_activity_none() {
+ g_stm_crr_state.layer[StmLayerNoHomescreen].state = StmLayoutNoNone;
+ g_stm_crr_state.layer[StmLayerNoHomescreen].changed = STM_TRUE;
+}
+
+/*
+ * @name stm_hsl_start_activity_homescreen
+ */
+void stm_hsl_start_activity_homescreen() {
+ g_stm_crr_state.layer[StmLayerNoHomescreen].state = StmLayoutNoHms;
+ g_stm_crr_state.layer[StmLayerNoHomescreen].changed = STM_TRUE;
+}
+
+/*
+ * @name stm_hsl_initialize_variable
+ */
+void stm_hsl_initialize_variable() {
+ g_stm_prv_state.layer[StmLayerNoHomescreen].state = StmLayoutNoNone;
+ g_stm_prv_state.layer[StmLayerNoHomescreen].changed = STM_FALSE;
+
+ g_stm_crr_state.layer[StmLayerNoHomescreen].state = StmLayoutNoNone;
+ g_stm_crr_state.layer[StmLayerNoHomescreen].changed = STM_FALSE;
+}
+
+/*
+ * @name stm_hsl_start_stm
+ */
+void stm_hsl_start_stm() {
+ g_stm_prv_state.layer[StmLayerNoHomescreen].state = g_stm_crr_state.layer[StmLayerNoHomescreen].state;
+ g_stm_crr_state.layer[StmLayerNoHomescreen].changed = STM_FALSE;
+}
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/HomeScreenLayer/ZHSL_HomeScreen_func.h b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/HomeScreenLayer/ZHSL_HomeScreen_func.h
new file mode 100644
index 0000000..d5f4ab9
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/HomeScreenLayer/ZHSL_HomeScreen_func.h
@@ -0,0 +1,14 @@
+/************************************************************/
+/* ZHSL_HomeScreen_func.h */
+/* Function and variable header file */
+/* ZIPC Designer Version 1.2.0 */
+/************************************************************/
+#ifndef ZHEADER_ZHSL_HOMESCREEN_FUNC_H
+#define ZHEADER_ZHSL_HOMESCREEN_FUNC_H
+
+extern void stm_hsl_start_activity_none();
+extern void stm_hsl_start_activity_homescreen();
+extern void stm_hsl_initialize_variable();
+extern void stm_hsl_start_stm();
+
+#endif
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/LightStatusBrake/ZLIGHT_LightstatusBrake.c b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/LightStatusBrake/ZLIGHT_LightstatusBrake.c
new file mode 100644
index 0000000..8f65d32
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/LightStatusBrake/ZLIGHT_LightstatusBrake.c
@@ -0,0 +1,117 @@
+/************************************************************/
+/* ZLIGHT_LightstatusBrake.c */
+/* LightstatusBrake State transition model source file */
+/* ZIPC Designer Version 1.2.0 */
+/************************************************************/
+#include "../ZST_include.h"
+
+/* State management variable */
+static uint8_t ZLIGHT_LightstatusBrakeState[ZLIGHT_LIGHTSTATUSBRAKESTATENOMAX];
+
+static void ZLIGHT_LightstatusBrakes0e1( void );
+static void ZLIGHT_LightstatusBrakes1e0( void );
+static void ZLIGHT_LightstatusBrakes0Event( void );
+static void ZLIGHT_LightstatusBrakes1Event( void );
+
+/****************************************/
+/* Action function */
+/* STM : LightstatusBrake */
+/* State : lightstatus_brake_on( No 0 ) */
+/* Event : evt_lightstatus_brake_off( No 1 ) */
+/****************************************/
+static void ZLIGHT_LightstatusBrakes0e1( void )
+{
+ ZLIGHT_LightstatusBrakeState[ZLIGHT_LIGHTSTATUSBRAKE] = ( uint8_t )ZLIGHT_LIGHTSTATUSBRAKES1;
+ stm_lbs_start_activity_lightstatus_brake_off();
+}
+
+/****************************************/
+/* Action function */
+/* STM : LightstatusBrake */
+/* State : lightstatus_brake_off( No 1 ) */
+/* Event : evt_lightstatus_brake_on( No 0 ) */
+/****************************************/
+static void ZLIGHT_LightstatusBrakes1e0( void )
+{
+ ZLIGHT_LightstatusBrakeState[ZLIGHT_LIGHTSTATUSBRAKE] = ( uint8_t )ZLIGHT_LIGHTSTATUSBRAKES0;
+ stm_lbs_start_activity_lightstatus_brake_on();
+}
+
+/****************************************/
+/* Event appraisal function */
+/* STM : LightstatusBrake */
+/* State : lightstatus_brake_on( No 0 ) */
+/****************************************/
+static void ZLIGHT_LightstatusBrakes0Event( void )
+{
+ /*evt_lightstatus_brake_off*/
+ if( g_stm_event == StmEvtNoLightstatusBrakeOff )
+ {
+ ZLIGHT_LightstatusBrakes0e1();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+}
+
+/****************************************/
+/* Event appraisal function */
+/* STM : LightstatusBrake */
+/* State : lightstatus_brake_off( No 1 ) */
+/****************************************/
+static void ZLIGHT_LightstatusBrakes1Event( void )
+{
+ /*evt_lightstatus_brake_on*/
+ if( g_stm_event == StmEvtNoLightstatusBrakeOn )
+ {
+ ZLIGHT_LightstatusBrakes1e0();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+}
+
+/****************************************/
+/* Event call function */
+/* STM : LightstatusBrake */
+/****************************************/
+void stm_lbs_event_call( void )
+{
+ stm_lbs_start_stm();
+ switch( ZLIGHT_LightstatusBrakeState[ZLIGHT_LIGHTSTATUSBRAKE] )
+ {
+ case ZLIGHT_LIGHTSTATUSBRAKES0:
+ ZLIGHT_LightstatusBrakes0Event();
+ break;
+ case ZLIGHT_LIGHTSTATUSBRAKES1:
+ ZLIGHT_LightstatusBrakes1Event();
+ break;
+ default:
+ /*Not accessible to this else (default).*/
+ break;
+ }
+}
+
+/****************************************/
+/* Initial function */
+/* STM : LightstatusBrake */
+/****************************************/
+void stm_lbs_initialize( void )
+{
+ ZLIGHT_LightstatusBrakeState[ZLIGHT_LIGHTSTATUSBRAKE] = ( uint8_t )ZLIGHT_LIGHTSTATUSBRAKES0;
+ stm_lbs_start_activity_lightstatus_brake_on();
+}
+
+/****************************************/
+/* Terminate function */
+/* STM : LightstatusBrake */
+/****************************************/
+void ZLIGHT_LightstatusBrakeTerminate( void )
+{
+ ZLIGHT_LightstatusBrakeState[ZLIGHT_LIGHTSTATUSBRAKE] = ( uint8_t )ZLIGHT_LIGHTSTATUSBRAKETERMINATE;
+}
+
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/LightStatusBrake/ZLIGHT_LightstatusBrake.h b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/LightStatusBrake/ZLIGHT_LightstatusBrake.h
new file mode 100644
index 0000000..0ced0ec
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/LightStatusBrake/ZLIGHT_LightstatusBrake.h
@@ -0,0 +1,41 @@
+/************************************************************/
+/* ZLIGHT_LightstatusBrake.h */
+/* LightstatusBrake State transition model header file */
+/* ZIPC Designer Version 1.2.0 */
+/************************************************************/
+#ifndef ZHEADER_ZLIGHT_LIGHTSTATUSBRAKE_H
+#define ZHEADER_ZLIGHT_LIGHTSTATUSBRAKE_H
+
+/*State management variable access define*/
+#define ZLIGHT_LIGHTSTATUSBRAKE ( 0U )
+#define ZLIGHT_LIGHTSTATUSBRAKES0 ( 0U )
+#define ZLIGHT_LIGHTSTATUSBRAKES1 ( 1U )
+#define ZLIGHT_LIGHTSTATUSBRAKESTATENOMAX ( 1U )
+
+/*End state define*/
+#define ZLIGHT_LIGHTSTATUSBRAKEEND ( 2U )
+/*Terminate state define*/
+#define ZLIGHT_LIGHTSTATUSBRAKETERMINATE ( ZLIGHT_LIGHTSTATUSBRAKEEND + 1U )
+
+/*State no define*/
+#define ZLIGHT_LIGHTSTATUSBRAKES0STATENO ( 0U )
+#define ZLIGHT_LIGHTSTATUSBRAKES1STATENO ( 1U )
+
+/*State serial no define*/
+#define ZLIGHT_LIGHTSTATUSBRAKES0STATESERIALNO ( 0U )
+#define ZLIGHT_LIGHTSTATUSBRAKES1STATESERIALNO ( 1U )
+
+/*Event no define*/
+#define ZLIGHT_LIGHTSTATUSBRAKEE0EVENTNO ( 0U )
+#define ZLIGHT_LIGHTSTATUSBRAKEE1EVENTNO ( 1U )
+
+/*Event serial no define*/
+#define ZLIGHT_LIGHTSTATUSBRAKEE0EVENTSERIALNO ( 0U )
+#define ZLIGHT_LIGHTSTATUSBRAKEE1EVENTSERIALNO ( 1U )
+
+/*Extern function*/
+extern void stm_lbs_event_call( void );
+extern void stm_lbs_initialize( void );
+extern void ZLIGHT_LightstatusBrakeTerminate( void );
+
+#endif
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/LightStatusBrake/ZLIGHT_LightstatusBrakeStatus_func.c b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/LightStatusBrake/ZLIGHT_LightstatusBrakeStatus_func.c
new file mode 100644
index 0000000..70c7478
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/LightStatusBrake/ZLIGHT_LightstatusBrakeStatus_func.c
@@ -0,0 +1,45 @@
+/************************************************************/
+/* ZLIGHT_LightstatusBrakeStatus_func.c */
+/* Function and variable source file */
+/* ZIPC Designer Version 1.2.0 */
+/************************************************************/
+#include "../ZST_include.h"
+
+/*************************************************************
+ Function definition
+*************************************************************/
+
+/*
+ * @name stm_lbs_start_activity_lightstatus_brake_off
+ */
+void stm_lbs_start_activity_lightstatus_brake_off() {
+ g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state = StmLightstatusBrakeSttNoOff;
+ g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].changed = STM_TRUE;
+}
+
+/*
+ * @name stm_lbs_start_activity_lightstatus_brake_on
+ */
+void stm_lbs_start_activity_lightstatus_brake_on() {
+ g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state = StmLightstatusBrakeSttNoOn;
+ g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].changed = STM_TRUE;
+}
+
+/*
+ * @name stm_lbs_initialize_variable
+ */
+void stm_lbs_initialize_variable() {
+ g_stm_prv_state.car_element[StmCarElementNoLightstatusBrake].state = StmLightstatusBrakeSttNoOn;
+ g_stm_prv_state.car_element[StmCarElementNoLightstatusBrake].changed = STM_FALSE;
+
+ g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state = StmLightstatusBrakeSttNoOn;
+ g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].changed = STM_FALSE;
+}
+
+/*
+ * @name stm_lbs_start_stm
+ */
+void stm_lbs_start_stm() {
+ g_stm_prv_state.car_element[StmCarElementNoLightstatusBrake].state = g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state;
+ g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].changed = STM_FALSE;
+}
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/LightStatusBrake/ZLIGHT_LightstatusBrakeStatus_func.h b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/LightStatusBrake/ZLIGHT_LightstatusBrakeStatus_func.h
new file mode 100644
index 0000000..5ebd5b1
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/LightStatusBrake/ZLIGHT_LightstatusBrakeStatus_func.h
@@ -0,0 +1,14 @@
+/************************************************************/
+/* ZLIGHT_LightstatusBrakeStatus_func.h */
+/* Function and variable header file */
+/* ZIPC Designer Version 1.2.0 */
+/************************************************************/
+#ifndef ZHEADER_ZLIGHT_LIGHTSTATUSBRAKESTATUS_FUNC_H
+#define ZHEADER_ZLIGHT_LIGHTSTATUSBRAKESTATUS_FUNC_H
+
+extern void stm_lbs_start_activity_lightstatus_brake_off();
+extern void stm_lbs_start_activity_lightstatus_brake_on();
+extern void stm_lbs_initialize_variable();
+extern void stm_lbs_start_stm();
+
+#endif
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/NearHomeScreen/ZNHL_NearHomeScreen_func.c b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/NearHomeScreen/ZNHL_NearHomeScreen_func.c
new file mode 100644
index 0000000..dad2484
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/NearHomeScreen/ZNHL_NearHomeScreen_func.c
@@ -0,0 +1,65 @@
+/************************************************************/
+/* ZNHL_NearHomeScreen_func.c */
+/* Function and variable source file */
+/* ZIPC Designer Version 1.2.0 */
+/************************************************************/
+#include "../ZST_include.h"
+
+/*************************************************************
+ Function definition
+*************************************************************/
+
+/*
+ * @name stm_nhl_start_activity_none
+ */
+void stm_nhl_start_activity_none() {
+ g_stm_crr_state.layer[StmLayerNoNearHomescreen].state = StmLayoutNoNone;
+ g_stm_crr_state.layer[StmLayerNoNearHomescreen].changed = STM_TRUE;
+}
+
+/*
+ * @name stm_nhl_start_activity_software_keyboard
+ */
+void stm_nhl_start_activity_software_keyboard() {
+ g_stm_crr_state.layer[StmLayerNoNearHomescreen].state = StmLayoutNoSftKbd;
+ g_stm_crr_state.layer[StmLayerNoNearHomescreen].changed = STM_TRUE;
+}
+
+/*
+ * @name stm_nhl_event_restriction_mode_off
+ */
+void stm_nhl_event_restriction_mode_off() {
+ g_stm_crr_state.layer[StmLayerNoNearHomescreen].state = g_prv_near_homescreen_state_car_stop;
+ g_stm_crr_state.layer[StmLayerNoNearHomescreen].changed = STM_TRUE;
+}
+
+/*
+ * @name stm_nhl_event_restriction_mode_on
+ */
+void stm_nhl_event_restriction_mode_on() {
+ g_prv_near_homescreen_state_car_stop = g_stm_prv_state.layer[StmLayerNoNearHomescreen].state;
+}
+
+/*
+ * @name stm_nhl_initialize_variable
+ */
+void stm_nhl_initialize_variable() {
+ g_stm_prv_state.layer[StmLayerNoNearHomescreen].state = StmLayoutNoNone;
+ g_stm_prv_state.layer[StmLayerNoNearHomescreen].changed = STM_FALSE;
+
+ g_stm_crr_state.layer[StmLayerNoNearHomescreen].state = StmLayoutNoNone;
+ g_stm_crr_state.layer[StmLayerNoNearHomescreen].changed = STM_FALSE;
+}
+
+/*
+ * @name stm_nhl_start_stm
+ */
+void stm_nhl_start_stm() {
+ if (g_stm_event == StmEvtNoUndo) {
+ // nop
+ }
+ else {
+ g_stm_prv_state.layer[StmLayerNoNearHomescreen].state = g_stm_crr_state.layer[StmLayerNoNearHomescreen].state;
+ }
+ g_stm_crr_state.layer[StmLayerNoNearHomescreen].changed = STM_FALSE;
+}
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/NearHomeScreen/ZNHL_NearHomeScreen_func.h b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/NearHomeScreen/ZNHL_NearHomeScreen_func.h
new file mode 100644
index 0000000..d2b13f7
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/NearHomeScreen/ZNHL_NearHomeScreen_func.h
@@ -0,0 +1,16 @@
+/************************************************************/
+/* ZNHL_NearHomeScreen_func.h */
+/* Function and variable header file */
+/* ZIPC Designer Version 1.2.0 */
+/************************************************************/
+#ifndef ZHEADER_ZNHL_NEARHOMESCREEN_FUNC_H
+#define ZHEADER_ZNHL_NEARHOMESCREEN_FUNC_H
+
+extern void stm_nhl_start_activity_none();
+extern void stm_nhl_start_activity_software_keyboard();
+extern void stm_nhl_event_restriction_mode_off();
+extern void stm_nhl_event_restriction_mode_on();
+extern void stm_nhl_initialize_variable();
+extern void stm_nhl_start_stm();
+
+#endif
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/NearHomeScreen/ZNHL_NearHomescreen.c b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/NearHomeScreen/ZNHL_NearHomescreen.c
new file mode 100644
index 0000000..1c024b8
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/NearHomeScreen/ZNHL_NearHomescreen.c
@@ -0,0 +1,220 @@
+/************************************************************/
+/* ZNHL_NearHomescreen.c */
+/* NearHomescreen State transition model source file */
+/* ZIPC Designer Version 1.2.0 */
+/************************************************************/
+#include "../ZST_include.h"
+
+/* State management variable */
+static uint8_t ZNHL_NearHomescreenState[ZNHL_NEARHOMESCREENSTATENOMAX];
+
+static void ZNHL_NearHomescreens0e0( void );
+static void ZNHL_NearHomescreens0e3( void );
+static void ZNHL_NearHomescreens1e2( void );
+static void ZNHL_NearHomescreens1e4( void );
+static void ZNHL_NearHomescreens0Event( void );
+static void ZNHL_NearHomescreens1Event( void );
+
+/****************************************/
+/* Action function */
+/* STM : NearHomescreen */
+/* State : none( No 0 ) */
+/* Event : ara_software_keyboard( No 0 ) */
+/****************************************/
+static void ZNHL_NearHomescreens0e0( void )
+{
+ ZNHL_NearHomescreenState[ZNHL_NEARHOMESCREEN] = ( uint8_t )ZNHL_NEARHOMESCREENS1;
+ stm_nhl_start_activity_software_keyboard();
+}
+
+/****************************************/
+/* Action function */
+/* STM : NearHomescreen */
+/* State : none( No 0 ) */
+/* Event : stt_prv_layer_near_homescreen_none( No 3 ) */
+/****************************************/
+static void ZNHL_NearHomescreens0e3( void )
+{
+ stm_nhl_start_activity_none();
+}
+
+/****************************************/
+/* Action function */
+/* STM : NearHomescreen */
+/* State : software_keyboard( No 1 ) */
+/* Event : ctg_software_keyboard( No 2 ) */
+/****************************************/
+static void ZNHL_NearHomescreens1e2( void )
+{
+ ZNHL_NearHomescreenState[ZNHL_NEARHOMESCREEN] = ( uint8_t )ZNHL_NEARHOMESCREENS0;
+ stm_nhl_start_activity_none();
+}
+
+/****************************************/
+/* Action function */
+/* STM : NearHomescreen */
+/* State : software_keyboard( No 1 ) */
+/* Event : stt_prv_layer_near_homescreen_sft_kbd( No 4 ) */
+/****************************************/
+static void ZNHL_NearHomescreens1e4( void )
+{
+ stm_nhl_start_activity_software_keyboard();
+}
+
+/****************************************/
+/* Event appraisal function */
+/* STM : NearHomescreen */
+/* State : none( No 0 ) */
+/****************************************/
+static void ZNHL_NearHomescreens0Event( void )
+{
+ /*evt_activate*/
+ if( g_stm_event == StmEvtNoActivate )
+ {
+ /*ctg_software_keyboard*/
+ if( g_stm_category == StmCtgNoSoftwareKeyboard )
+ {
+ /*ara_software_keyboard*/
+ if( g_stm_area == StmAreaNoSoftwareKyeboard )
+ {
+ ZNHL_NearHomescreens0e0();
+ }
+ else
+ {
+ ZNHL_NearHomescreens0e0();
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*evt_undo*/
+ else if( g_stm_event == StmEvtNoUndo )
+ {
+ /*stt_prv_layer_near_homescreen_none*/
+ if( g_stm_prv_state.layer[StmLayerNoNearHomescreen].state == StmLayoutNoNone )
+ {
+ ZNHL_NearHomescreens0e3();
+ }
+ /*stt_prv_layer_near_homescreen_sft_kbd*/
+ else if( g_stm_prv_state.layer[StmLayerNoNearHomescreen].state == StmLayoutNoSftKbd )
+ {
+ ZNHL_NearHomescreens0e0();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+}
+
+/****************************************/
+/* Event appraisal function */
+/* STM : NearHomescreen */
+/* State : software_keyboard( No 1 ) */
+/****************************************/
+static void ZNHL_NearHomescreens1Event( void )
+{
+ /*evt_deactivate*/
+ if( g_stm_event == StmEvtNoDeactivate )
+ {
+ /*ctg_software_keyboard*/
+ if( g_stm_category == StmCtgNoSoftwareKeyboard )
+ {
+ ZNHL_NearHomescreens1e2();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*evt_undo*/
+ else if( g_stm_event == StmEvtNoUndo )
+ {
+ /*stt_prv_layer_near_homescreen_none*/
+ if( g_stm_prv_state.layer[StmLayerNoNearHomescreen].state == StmLayoutNoNone )
+ {
+ ZNHL_NearHomescreens1e2();
+ }
+ /*stt_prv_layer_near_homescreen_sft_kbd*/
+ else if( g_stm_prv_state.layer[StmLayerNoNearHomescreen].state == StmLayoutNoSftKbd )
+ {
+ ZNHL_NearHomescreens1e4();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*stt_lightstatus_brake_off*/
+ else if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOff )
+ {
+ ZNHL_NearHomescreens1e2();
+ }
+ /*stt_crr_layer_apps_changed*/
+ else if( g_stm_crr_state.layer[StmLayerNoApps].changed == STM_TRUE )
+ {
+ ZNHL_NearHomescreens1e2();
+ }
+ /*stt_crr_layer_hs_changed*/
+ else if( g_stm_crr_state.layer[StmLayerNoHomescreen].changed == STM_TRUE )
+ {
+ ZNHL_NearHomescreens1e2();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+}
+
+/****************************************/
+/* Event call function */
+/* STM : NearHomescreen */
+/****************************************/
+void stm_nhl_event_call( void )
+{
+ stm_nhl_start_stm();
+ switch( ZNHL_NearHomescreenState[ZNHL_NEARHOMESCREEN] )
+ {
+ case ZNHL_NEARHOMESCREENS0:
+ ZNHL_NearHomescreens0Event();
+ break;
+ case ZNHL_NEARHOMESCREENS1:
+ ZNHL_NearHomescreens1Event();
+ break;
+ default:
+ /*Not accessible to this else (default).*/
+ break;
+ }
+}
+
+/****************************************/
+/* Initial function */
+/* STM : NearHomescreen */
+/****************************************/
+void stm_nhl_initialize( void )
+{
+ ZNHL_NearHomescreenState[ZNHL_NEARHOMESCREEN] = ( uint8_t )ZNHL_NEARHOMESCREENS0;
+ stm_nhl_start_activity_none();
+}
+
+/****************************************/
+/* Terminate function */
+/* STM : NearHomescreen */
+/****************************************/
+void ZNHL_NearHomescreenTerminate( void )
+{
+ ZNHL_NearHomescreenState[ZNHL_NEARHOMESCREEN] = ( uint8_t )ZNHL_NEARHOMESCREENTERMINATE;
+}
+
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/NearHomeScreen/ZNHL_NearHomescreen.h b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/NearHomeScreen/ZNHL_NearHomescreen.h
new file mode 100644
index 0000000..f23775e
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/NearHomeScreen/ZNHL_NearHomescreen.h
@@ -0,0 +1,53 @@
+/************************************************************/
+/* ZNHL_NearHomescreen.h */
+/* NearHomescreen State transition model header file */
+/* ZIPC Designer Version 1.2.0 */
+/************************************************************/
+#ifndef ZHEADER_ZNHL_NEARHOMESCREEN_H
+#define ZHEADER_ZNHL_NEARHOMESCREEN_H
+
+/*State management variable access define*/
+#define ZNHL_NEARHOMESCREEN ( 0U )
+#define ZNHL_NEARHOMESCREENS0 ( 0U )
+#define ZNHL_NEARHOMESCREENS1 ( 1U )
+#define ZNHL_NEARHOMESCREENSTATENOMAX ( 1U )
+
+/*End state define*/
+#define ZNHL_NEARHOMESCREENEND ( 2U )
+/*Terminate state define*/
+#define ZNHL_NEARHOMESCREENTERMINATE ( ZNHL_NEARHOMESCREENEND + 1U )
+
+/*State no define*/
+#define ZNHL_NEARHOMESCREENS0STATENO ( 0U )
+#define ZNHL_NEARHOMESCREENS1STATENO ( 1U )
+
+/*State serial no define*/
+#define ZNHL_NEARHOMESCREENS0STATESERIALNO ( 0U )
+#define ZNHL_NEARHOMESCREENS1STATESERIALNO ( 1U )
+
+/*Event no define*/
+#define ZNHL_NEARHOMESCREENE0EVENTNO ( 0U )
+#define ZNHL_NEARHOMESCREENE1EVENTNO ( 1U )
+#define ZNHL_NEARHOMESCREENE2EVENTNO ( 2U )
+#define ZNHL_NEARHOMESCREENE3EVENTNO ( 3U )
+#define ZNHL_NEARHOMESCREENE4EVENTNO ( 4U )
+#define ZNHL_NEARHOMESCREENE5EVENTNO ( 5U )
+#define ZNHL_NEARHOMESCREENE6EVENTNO ( 6U )
+#define ZNHL_NEARHOMESCREENE7EVENTNO ( 7U )
+
+/*Event serial no define*/
+#define ZNHL_NEARHOMESCREENE0EVENTSERIALNO ( 0U )
+#define ZNHL_NEARHOMESCREENE1EVENTSERIALNO ( 1U )
+#define ZNHL_NEARHOMESCREENE2EVENTSERIALNO ( 2U )
+#define ZNHL_NEARHOMESCREENE3EVENTSERIALNO ( 3U )
+#define ZNHL_NEARHOMESCREENE4EVENTSERIALNO ( 4U )
+#define ZNHL_NEARHOMESCREENE5EVENTSERIALNO ( 5U )
+#define ZNHL_NEARHOMESCREENE6EVENTSERIALNO ( 6U )
+#define ZNHL_NEARHOMESCREENE7EVENTSERIALNO ( 7U )
+
+/*Extern function*/
+extern void stm_nhl_event_call( void );
+extern void stm_nhl_initialize( void );
+extern void ZNHL_NearHomescreenTerminate( void );
+
+#endif
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/OnScreenlayer/ZOSL_OnScreen_func.c b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/OnScreenlayer/ZOSL_OnScreen_func.c
new file mode 100644
index 0000000..c131608
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/OnScreenlayer/ZOSL_OnScreen_func.c
@@ -0,0 +1,72 @@
+/************************************************************/
+/* ZOSL_OnScreen_func.c */
+/* Function and variable source file */
+/* ZIPC Designer Version 1.2.0 */
+/************************************************************/
+#include "../ZST_include.h"
+
+/*************************************************************
+ Function definition
+*************************************************************/
+
+/*
+ * @name stm_osl_start_activity_none
+ */
+void stm_osl_start_activity_none() {
+ g_stm_crr_state.layer[StmLayerNoOnScreen].state = StmLayoutNoNone;
+ g_stm_crr_state.layer[StmLayerNoOnScreen].changed = STM_TRUE;
+}
+
+/*
+ * @name stm_osl_start_activity_pop_up
+ */
+void stm_osl_start_activity_pop_up() {
+ g_stm_crr_state.layer[StmLayerNoOnScreen].state = StmLayoutNoPopUp;
+ g_stm_crr_state.layer[StmLayerNoOnScreen].changed = STM_TRUE;
+}
+
+/*
+ * @name stm_osl_start_activity_system_alert
+ */
+void stm_osl_start_activity_system_alert() {
+ g_stm_crr_state.layer[StmLayerNoOnScreen].state = StmLayoutNoSysAlt;
+ g_stm_crr_state.layer[StmLayerNoOnScreen].changed = STM_TRUE;
+}
+
+/*
+ * @name stm_osl_event_restriction_mode_off
+ */
+void stm_osl_event_restriction_mode_off() {
+ g_stm_crr_state.layer[StmLayerNoOnScreen].state = g_prv_on_screen_state_car_stop;
+ g_stm_crr_state.layer[StmLayerNoOnScreen].changed = STM_TRUE;
+}
+
+/*
+ * @name stm_osl_event_restriction_mode_on
+ */
+void stm_osl_event_restriction_mode_on() {
+ g_prv_on_screen_state_car_stop = g_stm_prv_state.layer[StmLayerNoOnScreen].state;
+}
+/*
+ * @name stm_osl_initialize_variable
+ */
+void stm_osl_initialize_variable() {
+ g_stm_prv_state.layer[StmLayerNoOnScreen].state = StmLayoutNoNone;
+ g_stm_prv_state.layer[StmLayerNoOnScreen].changed = STM_FALSE;
+
+ g_stm_crr_state.layer[StmLayerNoOnScreen].state = StmLayoutNoNone;
+ g_stm_crr_state.layer[StmLayerNoOnScreen].changed = STM_FALSE;
+}
+
+/*
+ * @name stm_osl_start_stm
+ */
+void stm_osl_start_stm() {
+ if (g_stm_event == StmEvtNoUndo) {
+ // nop
+ }
+ else {
+ g_stm_prv_state.layer[StmLayerNoOnScreen].state = g_stm_crr_state.layer[StmLayerNoOnScreen].state;
+ }
+ g_stm_crr_state.layer[StmLayerNoOnScreen].changed = STM_FALSE;
+}
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/OnScreenlayer/ZOSL_OnScreen_func.h b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/OnScreenlayer/ZOSL_OnScreen_func.h
new file mode 100644
index 0000000..3edef28
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/OnScreenlayer/ZOSL_OnScreen_func.h
@@ -0,0 +1,17 @@
+/************************************************************/
+/* ZOSL_OnScreen_func.h */
+/* Function and variable header file */
+/* ZIPC Designer Version 1.2.0 */
+/************************************************************/
+#ifndef ZHEADER_ZOSL_ONSCREEN_FUNC_H
+#define ZHEADER_ZOSL_ONSCREEN_FUNC_H
+
+extern void stm_osl_start_activity_none();
+extern void stm_osl_start_activity_pop_up();
+extern void stm_osl_start_activity_system_alert();
+extern void stm_osl_event_restriction_mode_off();
+extern void stm_osl_event_restriction_mode_on();
+extern void stm_osl_initialize_variable();
+extern void stm_osl_start_stm();
+
+#endif
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/OnScreenlayer/ZOSL_OslMain.c b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/OnScreenlayer/ZOSL_OslMain.c
new file mode 100644
index 0000000..6b60219
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/OnScreenlayer/ZOSL_OslMain.c
@@ -0,0 +1,718 @@
+/************************************************************/
+/* ZOSL_OslMain.c */
+/* OslMain State transition model source file */
+/* ZIPC Designer Version 1.2.0 */
+/************************************************************/
+#include "../ZST_include.h"
+
+/* State management variable */
+static uint8_t ZOSL_OslMainState[ZOSL_OSLMAINSTATENOMAX];
+
+static void ZOSL_OslMains0StateEntry( void );
+static void ZOSL_OslMains1StateEntry( void );
+static void ZOSL_OslMains0e1( void );
+static void ZOSL_OslMains0e2( void );
+static void ZOSL_OslMains1e0( void );
+static void ZOSL_OslRestOffs0e0( void );
+static void ZOSL_OslRestOffs0e1( void );
+static void ZOSL_OslRestOffs0e4( void );
+static void ZOSL_OslRestOffs1e0( void );
+static void ZOSL_OslRestOffs1e2( void );
+static void ZOSL_OslRestOffs2e6( void );
+static void ZOSL_OslRestOns0e0( void );
+static void ZOSL_OslRestOns0e2( void );
+static void ZOSL_OslRestOns1e1( void );
+static void ZOSL_OslRestOns1e3( void );
+static void ZOSL_OslMains0Event( void );
+static void ZOSL_OslRestOffs0Event( void );
+static void ZOSL_OslRestOffs1Event( void );
+static void ZOSL_OslRestOffs2Event( void );
+static void ZOSL_OslMains1Event( void );
+static void ZOSL_OslRestOns0Event( void );
+static void ZOSL_OslRestOns1Event( void );
+
+/****************************************/
+/* State start activity function */
+/* STM : OslMain */
+/* State : restriction_mode_off( No 0 ) */
+/****************************************/
+static void ZOSL_OslMains0StateEntry( void )
+{
+ switch( ZOSL_OslMainState[ZOSL_OSLMAINS0F] )
+ {
+ case ZOSL_OSLRESTOFFS0:
+ stm_osl_start_activity_none();
+ break;
+ case ZOSL_OSLRESTOFFS1:
+ stm_osl_start_activity_pop_up();
+ break;
+ case ZOSL_OSLRESTOFFS2:
+ stm_osl_start_activity_system_alert();
+ break;
+ default:
+ /*Not accessible to this else (default).*/
+ break;
+ }
+}
+
+/****************************************/
+/* State start activity function */
+/* STM : OslMain */
+/* State : restriction_mode_on( No 1 )*/
+/****************************************/
+static void ZOSL_OslMains1StateEntry( void )
+{
+ switch( ZOSL_OslMainState[ZOSL_OSLMAINS1F] )
+ {
+ case ZOSL_OSLRESTONS0:
+ stm_osl_start_activity_none();
+ break;
+ case ZOSL_OSLRESTONS1:
+ stm_osl_start_activity_system_alert();
+ break;
+ default:
+ /*Not accessible to this else (default).*/
+ break;
+ }
+}
+
+/****************************************/
+/* Action function */
+/* STM : OslMain */
+/* State : restriction_mode_off( No 0 ) */
+/* Event : stt_crr_layer_on_screen_pop( No 1 ) */
+/****************************************/
+static void ZOSL_OslMains0e1( void )
+{
+ ZOSL_OslMainState[ZOSL_OSLMAIN] = ( uint8_t )ZOSL_OSLMAINS1;
+ ZOSL_OslMainState[ZOSL_OSLMAINS1F] = ( uint8_t )ZOSL_OSLRESTONS0;
+ ZOSL_OslMains1StateEntry();
+}
+
+/****************************************/
+/* Action function */
+/* STM : OslMain */
+/* State : restriction_mode_off( No 0 ) */
+/* Event : stt_crr_layer_on_screen_sys( No 2 ) */
+/****************************************/
+static void ZOSL_OslMains0e2( void )
+{
+ ZOSL_OslMainState[ZOSL_OSLMAIN] = ( uint8_t )ZOSL_OSLMAINS1;
+ ZOSL_OslMainState[ZOSL_OSLMAINS1F] = ( uint8_t )ZOSL_OSLRESTONS1;
+ ZOSL_OslMains1StateEntry();
+}
+
+/****************************************/
+/* Action function */
+/* STM : OslMain */
+/* State : restriction_mode_on( No 1 )*/
+/* Event : stt_restriction_mode_off( No 0 ) */
+/****************************************/
+static void ZOSL_OslMains1e0( void )
+{
+ ZOSL_OslMainState[ZOSL_OSLMAIN] = ( uint8_t )ZOSL_OSLMAINS0;
+ ZOSL_OslMains0StateEntry();
+}
+
+/****************************************/
+/* Action function */
+/* STM : OslRestOff */
+/* State : none( No 0 ) */
+/* Event : ara_onscreen( No 0 ) */
+/****************************************/
+static void ZOSL_OslRestOffs0e0( void )
+{
+ ZOSL_OslMainState[ZOSL_OSLMAINS0F] = ( uint8_t )ZOSL_OSLRESTOFFS1;
+ stm_osl_start_activity_pop_up();
+}
+
+/****************************************/
+/* Action function */
+/* STM : OslRestOff */
+/* State : none( No 0 ) */
+/* Event : ara_onscreen( No 1 ) */
+/****************************************/
+static void ZOSL_OslRestOffs0e1( void )
+{
+ ZOSL_OslMainState[ZOSL_OSLMAINS0F] = ( uint8_t )ZOSL_OSLRESTOFFS2;
+ stm_osl_start_activity_system_alert();
+}
+
+/****************************************/
+/* Action function */
+/* STM : OslRestOff */
+/* State : none( No 0 ) */
+/* Event : stt_prv_layer_on_screen_none( No 4 ) */
+/****************************************/
+static void ZOSL_OslRestOffs0e4( void )
+{
+ stm_osl_start_activity_none();
+}
+
+/****************************************/
+/* Action function */
+/* STM : OslRestOff */
+/* State : popup( No 1 ) */
+/* Event : ara_onscreen( No 0 ) */
+/****************************************/
+static void ZOSL_OslRestOffs1e0( void )
+{
+ stm_osl_start_activity_pop_up();
+}
+
+/****************************************/
+/* Action function */
+/* STM : OslRestOff */
+/* State : popup( No 1 ) */
+/* Event : ctg_popup( No 2 ) */
+/****************************************/
+static void ZOSL_OslRestOffs1e2( void )
+{
+ ZOSL_OslMainState[ZOSL_OSLMAINS0F] = ( uint8_t )ZOSL_OSLRESTOFFS0;
+ stm_osl_start_activity_none();
+}
+
+/****************************************/
+/* Action function */
+/* STM : OslRestOff */
+/* State : system_alert( No 2 ) */
+/* Event : stt_prv_layer_on_screen_sys_alt( No 6 ) */
+/****************************************/
+static void ZOSL_OslRestOffs2e6( void )
+{
+ stm_osl_start_activity_system_alert();
+}
+
+/****************************************/
+/* Action function */
+/* STM : OslRestOn */
+/* State : none( No 0 ) */
+/* Event : ara_onscreen( No 0 ) */
+/****************************************/
+static void ZOSL_OslRestOns0e0( void )
+{
+ ZOSL_OslMainState[ZOSL_OSLMAINS1F] = ( uint8_t )ZOSL_OSLRESTONS1;
+ stm_osl_start_activity_system_alert();
+}
+
+/****************************************/
+/* Action function */
+/* STM : OslRestOn */
+/* State : none( No 0 ) */
+/* Event : stt_prv_layer_on_screen_none( No 2 ) */
+/****************************************/
+static void ZOSL_OslRestOns0e2( void )
+{
+ stm_osl_start_activity_none();
+}
+
+/****************************************/
+/* Action function */
+/* STM : OslRestOn */
+/* State : system_alert( No 1 ) */
+/* Event : ctg_systemalert( No 1 ) */
+/****************************************/
+static void ZOSL_OslRestOns1e1( void )
+{
+ ZOSL_OslMainState[ZOSL_OSLMAINS1F] = ( uint8_t )ZOSL_OSLRESTONS0;
+ stm_osl_start_activity_none();
+}
+
+/****************************************/
+/* Action function */
+/* STM : OslRestOn */
+/* State : system_alert( No 1 ) */
+/* Event : stt_prv_layer_on_screen_sys_alt( No 3 ) */
+/****************************************/
+static void ZOSL_OslRestOns1e3( void )
+{
+ stm_osl_start_activity_system_alert();
+}
+
+/****************************************/
+/* Event appraisal function */
+/* STM : OslMain */
+/* State : restriction_mode_off( No 0 ) */
+/****************************************/
+static void ZOSL_OslMains0Event( void )
+{
+ /*stt_restriction_mode_on*/
+ if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOn )
+ {
+ stm_rel_event_restriction_mode_on();
+ /*stt_crr_layer_on_screen_pop*/
+ if( g_stm_crr_state.layer[StmLayerNoOnScreen].state == StmLayoutNoPopUp )
+ {
+ ZOSL_OslMains0e1();
+ }
+ /*stt_crr_layer_on_screen_sys*/
+ else if( g_stm_crr_state.layer[StmLayerNoOnScreen].state == StmLayoutNoSysAlt )
+ {
+ ZOSL_OslMains0e2();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+}
+
+/****************************************/
+/* Event appraisal function */
+/* STM : OslRestOff */
+/* State : none( No 0 ) */
+/****************************************/
+static void ZOSL_OslRestOffs0Event( void )
+{
+ /*stt_restriction_mode_off*/
+ if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOff )
+ {
+ /*evt_activate*/
+ if( g_stm_event == StmEvtNoActivate )
+ {
+ /*ctg_popup*/
+ if( g_stm_category == StmCtgNoPopUp )
+ {
+ /*ara_onscreen*/
+ if( g_stm_area == StmAreaNoOnScreen )
+ {
+ ZOSL_OslRestOffs0e0();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_systemalert*/
+ else if( g_stm_category == StmCtgNoSystemAlert )
+ {
+ /*ara_onscreen*/
+ if( g_stm_area == StmAreaNoOnScreen )
+ {
+ ZOSL_OslRestOffs0e1();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*evt_undo*/
+ else if( g_stm_event == StmEvtNoUndo )
+ {
+ /*stt_prv_layer_on_screen_none*/
+ if( g_stm_prv_state.layer[StmLayerNoOnScreen].state == StmLayoutNoNone )
+ {
+ ZOSL_OslRestOffs0e4();
+ }
+ /*stt_prv_layer_on_screen_pop_up*/
+ else if( g_stm_prv_state.layer[StmLayerNoOnScreen].state == StmLayoutNoPopUp )
+ {
+ ZOSL_OslRestOffs0e0();
+ }
+ /*stt_prv_layer_on_screen_sys_alt*/
+ else if( g_stm_prv_state.layer[StmLayerNoOnScreen].state == StmLayoutNoSysAlt )
+ {
+ ZOSL_OslRestOffs0e1();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+}
+
+/****************************************/
+/* Event appraisal function */
+/* STM : OslRestOff */
+/* State : popup( No 1 ) */
+/****************************************/
+static void ZOSL_OslRestOffs1Event( void )
+{
+ /*stt_restriction_mode_off*/
+ if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOff )
+ {
+ /*evt_activate*/
+ if( g_stm_event == StmEvtNoActivate )
+ {
+ /*ctg_popup*/
+ if( g_stm_category == StmCtgNoPopUp )
+ {
+ /*ara_onscreen*/
+ if( g_stm_area == StmAreaNoOnScreen )
+ {
+ ZOSL_OslRestOffs1e0();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_systemalert*/
+ else if( g_stm_category == StmCtgNoSystemAlert )
+ {
+ /*ara_onscreen*/
+ if( g_stm_area == StmAreaNoOnScreen )
+ {
+ ZOSL_OslRestOffs0e1();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*evt_deactivate*/
+ else if( g_stm_event == StmEvtNoDeactivate )
+ {
+ /*ctg_popup*/
+ if( g_stm_category == StmCtgNoPopUp )
+ {
+ ZOSL_OslRestOffs1e2();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*evt_undo*/
+ else if( g_stm_event == StmEvtNoUndo )
+ {
+ /*stt_prv_layer_on_screen_none*/
+ if( g_stm_prv_state.layer[StmLayerNoOnScreen].state == StmLayoutNoNone )
+ {
+ ZOSL_OslRestOffs1e2();
+ }
+ /*stt_prv_layer_on_screen_pop_up*/
+ else if( g_stm_prv_state.layer[StmLayerNoOnScreen].state == StmLayoutNoPopUp )
+ {
+ ZOSL_OslRestOffs1e0();
+ }
+ /*stt_prv_layer_on_screen_sys_alt*/
+ else if( g_stm_prv_state.layer[StmLayerNoOnScreen].state == StmLayoutNoSysAlt )
+ {
+ ZOSL_OslRestOffs0e1();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+}
+
+/****************************************/
+/* Event appraisal function */
+/* STM : OslRestOff */
+/* State : system_alert( No 2 ) */
+/****************************************/
+static void ZOSL_OslRestOffs2Event( void )
+{
+ /*stt_restriction_mode_off*/
+ if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOff )
+ {
+ /*evt_deactivate*/
+ if( g_stm_event == StmEvtNoDeactivate )
+ {
+ /*ctg_systemalert*/
+ if( g_stm_category == StmCtgNoSystemAlert )
+ {
+ ZOSL_OslRestOffs1e2();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*evt_undo*/
+ else if( g_stm_event == StmEvtNoUndo )
+ {
+ /*stt_prv_layer_on_screen_none*/
+ if( g_stm_prv_state.layer[StmLayerNoOnScreen].state == StmLayoutNoNone )
+ {
+ ZOSL_OslRestOffs1e2();
+ }
+ /*stt_prv_layer_on_screen_pop_up*/
+ else if( g_stm_prv_state.layer[StmLayerNoOnScreen].state == StmLayoutNoPopUp )
+ {
+ ZOSL_OslRestOffs0e0();
+ }
+ /*stt_prv_layer_on_screen_sys_alt*/
+ else if( g_stm_prv_state.layer[StmLayerNoOnScreen].state == StmLayoutNoSysAlt )
+ {
+ ZOSL_OslRestOffs2e6();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+}
+
+/****************************************/
+/* Event appraisal function */
+/* STM : OslMain */
+/* State : restriction_mode_on( No 1 )*/
+/****************************************/
+static void ZOSL_OslMains1Event( void )
+{
+ /*stt_restriction_mode_off*/
+ if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOff )
+ {
+ stm_rel_event_restriction_mode_off();
+ ZOSL_OslMains1e0();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+}
+
+/****************************************/
+/* Event appraisal function */
+/* STM : OslRestOn */
+/* State : none( No 0 ) */
+/****************************************/
+static void ZOSL_OslRestOns0Event( void )
+{
+ /*stt_restriction_mode_on*/
+ if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOn )
+ {
+ /*evt_activate*/
+ if( g_stm_event == StmEvtNoActivate )
+ {
+ /*ctg_systemalert*/
+ if( g_stm_category == StmCtgNoSystemAlert )
+ {
+ /*ara_onscreen*/
+ if( g_stm_area == StmAreaNoOnScreen )
+ {
+ ZOSL_OslRestOns0e0();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*evt_undo*/
+ else if( g_stm_event == StmEvtNoUndo )
+ {
+ /*stt_prv_layer_on_screen_none*/
+ if( g_stm_prv_state.layer[StmLayerNoOnScreen].state == StmLayoutNoNone )
+ {
+ ZOSL_OslRestOns0e2();
+ }
+ /*stt_prv_layer_on_screen_sys_alt*/
+ else if( g_stm_prv_state.layer[StmLayerNoOnScreen].state == StmLayoutNoSysAlt )
+ {
+ ZOSL_OslRestOns0e0();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+}
+
+/****************************************/
+/* Event appraisal function */
+/* STM : OslRestOn */
+/* State : system_alert( No 1 ) */
+/****************************************/
+static void ZOSL_OslRestOns1Event( void )
+{
+ /*stt_restriction_mode_on*/
+ if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOn )
+ {
+ /*evt_deactivate*/
+ if( g_stm_event == StmEvtNoDeactivate )
+ {
+ /*ctg_systemalert*/
+ if( g_stm_category == StmCtgNoSystemAlert )
+ {
+ ZOSL_OslRestOns1e1();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*evt_undo*/
+ else if( g_stm_event == StmEvtNoUndo )
+ {
+ /*stt_prv_layer_on_screen_none*/
+ if( g_stm_prv_state.layer[StmLayerNoOnScreen].state == StmLayoutNoNone )
+ {
+ ZOSL_OslRestOns1e1();
+ }
+ /*stt_prv_layer_on_screen_sys_alt*/
+ else if( g_stm_prv_state.layer[StmLayerNoOnScreen].state == StmLayoutNoSysAlt )
+ {
+ ZOSL_OslRestOns1e3();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+}
+
+/****************************************/
+/* Event call function */
+/* STM : OslMain */
+/****************************************/
+void stm_osl_event_call( void )
+{
+ stm_osl_start_stm();
+ switch( ZOSL_OslMainState[ZOSL_OSLMAIN] )
+ {
+ case ZOSL_OSLMAINS0:
+ switch( ZOSL_OslMainState[ZOSL_OSLMAINS0F] )
+ {
+ case ZOSL_OSLRESTOFFS0:
+ ZOSL_OslRestOffs0Event();
+ break;
+ case ZOSL_OSLRESTOFFS1:
+ ZOSL_OslRestOffs1Event();
+ break;
+ case ZOSL_OSLRESTOFFS2:
+ ZOSL_OslRestOffs2Event();
+ break;
+ default:
+ /*Not accessible to this else (default).*/
+ break;
+ }
+ ZOSL_OslMains0Event();
+ break;
+ case ZOSL_OSLMAINS1:
+ switch( ZOSL_OslMainState[ZOSL_OSLMAINS1F] )
+ {
+ case ZOSL_OSLRESTONS0:
+ ZOSL_OslRestOns0Event();
+ break;
+ case ZOSL_OSLRESTONS1:
+ ZOSL_OslRestOns1Event();
+ break;
+ default:
+ /*Not accessible to this else (default).*/
+ break;
+ }
+ ZOSL_OslMains1Event();
+ break;
+ default:
+ /*Not accessible to this else (default).*/
+ break;
+ }
+}
+
+/****************************************/
+/* Initial function */
+/* STM : OslMain */
+/****************************************/
+void stm_osl_initialize( void )
+{
+ ZOSL_OslMainState[ZOSL_OSLMAIN] = ( uint8_t )ZOSL_OSLMAINS0;
+ ZOSL_OslMainState[ZOSL_OSLMAINS0F] = ( uint8_t )ZOSL_OSLRESTOFFS0;
+ ZOSL_OslMainState[ZOSL_OSLMAINS1F] = ( uint8_t )ZOSL_OSLRESTONS0;
+ ZOSL_OslMains0StateEntry();
+}
+
+/****************************************/
+/* Terminate function */
+/* STM : OslMain */
+/****************************************/
+void ZOSL_OslMainTerminate( void )
+{
+ ZOSL_OslMainState[ZOSL_OSLMAIN] = ( uint8_t )ZOSL_OSLMAINTERMINATE;
+}
+
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/OnScreenlayer/ZOSL_OslMain.h b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/OnScreenlayer/ZOSL_OslMain.h
new file mode 100644
index 0000000..ee45304
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/OnScreenlayer/ZOSL_OslMain.h
@@ -0,0 +1,82 @@
+/************************************************************/
+/* ZOSL_OslMain.h */
+/* OslMain State transition model header file */
+/* ZIPC Designer Version 1.2.0 */
+/************************************************************/
+#ifndef ZHEADER_ZOSL_OSLMAIN_H
+#define ZHEADER_ZOSL_OSLMAIN_H
+
+/*State management variable access define*/
+#define ZOSL_OSLMAIN ( 0U )
+#define ZOSL_OSLMAINS0F ( 1U )
+#define ZOSL_OSLMAINS1F ( 2U )
+#define ZOSL_OSLMAINS0 ( 0U )
+#define ZOSL_OSLRESTOFFS0 ( 0U )
+#define ZOSL_OSLRESTOFFS1 ( 1U )
+#define ZOSL_OSLRESTOFFS2 ( 2U )
+#define ZOSL_OSLMAINS1 ( 1U )
+#define ZOSL_OSLRESTONS0 ( 0U )
+#define ZOSL_OSLRESTONS1 ( 1U )
+#define ZOSL_OSLMAINSTATENOMAX ( 3U )
+
+/*End state define*/
+#define ZOSL_OSLMAINEND ( 3U )
+/*Terminate state define*/
+#define ZOSL_OSLMAINTERMINATE ( ZOSL_OSLMAINEND + 1U )
+
+/*State no define*/
+#define ZOSL_OSLMAINS0STATENO ( 0U )
+#define ZOSL_OSLRESTOFFS0STATENO ( 0U )
+#define ZOSL_OSLRESTOFFS1STATENO ( 1U )
+#define ZOSL_OSLRESTOFFS2STATENO ( 2U )
+#define ZOSL_OSLMAINS1STATENO ( 1U )
+#define ZOSL_OSLRESTONS0STATENO ( 0U )
+#define ZOSL_OSLRESTONS1STATENO ( 1U )
+
+/*State serial no define*/
+#define ZOSL_OSLMAINS0STATESERIALNO ( 0U )
+#define ZOSL_OSLRESTOFFS0STATESERIALNO ( 1U )
+#define ZOSL_OSLRESTOFFS1STATESERIALNO ( 2U )
+#define ZOSL_OSLRESTOFFS2STATESERIALNO ( 3U )
+#define ZOSL_OSLMAINS1STATESERIALNO ( 4U )
+#define ZOSL_OSLRESTONS0STATESERIALNO ( 5U )
+#define ZOSL_OSLRESTONS1STATESERIALNO ( 6U )
+
+/*Event no define*/
+#define ZOSL_OSLMAINE0EVENTNO ( 0U )
+#define ZOSL_OSLMAINE1EVENTNO ( 1U )
+#define ZOSL_OSLMAINE2EVENTNO ( 2U )
+#define ZOSL_OSLRESTOFFE0EVENTNO ( 0U )
+#define ZOSL_OSLRESTOFFE1EVENTNO ( 1U )
+#define ZOSL_OSLRESTOFFE2EVENTNO ( 2U )
+#define ZOSL_OSLRESTOFFE3EVENTNO ( 3U )
+#define ZOSL_OSLRESTOFFE4EVENTNO ( 4U )
+#define ZOSL_OSLRESTOFFE5EVENTNO ( 5U )
+#define ZOSL_OSLRESTOFFE6EVENTNO ( 6U )
+#define ZOSL_OSLRESTONE0EVENTNO ( 0U )
+#define ZOSL_OSLRESTONE1EVENTNO ( 1U )
+#define ZOSL_OSLRESTONE2EVENTNO ( 2U )
+#define ZOSL_OSLRESTONE3EVENTNO ( 3U )
+
+/*Event serial no define*/
+#define ZOSL_OSLMAINE0EVENTSERIALNO ( 0U )
+#define ZOSL_OSLMAINE1EVENTSERIALNO ( 1U )
+#define ZOSL_OSLMAINE2EVENTSERIALNO ( 2U )
+#define ZOSL_OSLRESTOFFE0EVENTNO ( 0U )
+#define ZOSL_OSLRESTOFFE1EVENTNO ( 1U )
+#define ZOSL_OSLRESTOFFE2EVENTNO ( 2U )
+#define ZOSL_OSLRESTOFFE3EVENTNO ( 3U )
+#define ZOSL_OSLRESTOFFE4EVENTNO ( 4U )
+#define ZOSL_OSLRESTOFFE5EVENTNO ( 5U )
+#define ZOSL_OSLRESTOFFE6EVENTNO ( 6U )
+#define ZOSL_OSLRESTONE0EVENTNO ( 0U )
+#define ZOSL_OSLRESTONE1EVENTNO ( 1U )
+#define ZOSL_OSLRESTONE2EVENTNO ( 2U )
+#define ZOSL_OSLRESTONE3EVENTNO ( 3U )
+
+/*Extern function*/
+extern void stm_osl_event_call( void );
+extern void stm_osl_initialize( void );
+extern void ZOSL_OslMainTerminate( void );
+
+#endif
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/RestrictionLayer/ZREL_RelMain.c b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/RestrictionLayer/ZREL_RelMain.c
new file mode 100644
index 0000000..4c390ff
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/RestrictionLayer/ZREL_RelMain.c
@@ -0,0 +1,1003 @@
+/************************************************************/
+/* ZREL_RelMain.c */
+/* RelMain State transition model source file */
+/* ZIPC Designer Version 1.2.0 */
+/************************************************************/
+#include "../ZST_include.h"
+
+/* State management variable */
+static uint8_t ZREL_RelMainState[ZREL_RELMAINSTATENOMAX];
+
+static void ZREL_RelMains0StateEntry( void );
+static void ZREL_RelMains1StateEntry( void );
+static void ZREL_RelMains0e1( void );
+static void ZREL_RelMains1e0( void );
+static void ZREL_RelRestOffs0e0( void );
+static void ZREL_RelRestOffs0e1( void );
+static void ZREL_RelRestOffs0e8( void );
+static void ZREL_RelRestOffs0e13( void );
+static void ZREL_RelRestOffs1e1( void );
+static void ZREL_RelRestOffs1e4( void );
+static void ZREL_RelRestOffs2e15( void );
+static void ZREL_RelRestOffs3e0( void );
+static void ZREL_RelMains0Event( void );
+static void ZREL_RelRestOffs0Event( void );
+static void ZREL_RelRestOffs1Event( void );
+static void ZREL_RelRestOffs2Event( void );
+static void ZREL_RelRestOffs3Event( void );
+static void ZREL_RelMains1Event( void );
+static void ZREL_RelRestOns0Event( void );
+
+/****************************************/
+/* State start activity function */
+/* STM : RelMain */
+/* State : restriction_mode_off( No 0 ) */
+/****************************************/
+static void ZREL_RelMains0StateEntry( void )
+{
+ switch( ZREL_RelMainState[ZREL_RELMAINS0F] )
+ {
+ case ZREL_RELRESTOFFS0:
+ stm_rel_start_activity_none();
+ break;
+ case ZREL_RELRESTOFFS1:
+ stm_rel_start_activity_restriction_normal();
+ break;
+ case ZREL_RELRESTOFFS2:
+ stm_rel_start_activity_restriction_split_main();
+ break;
+ case ZREL_RELRESTOFFS3:
+ stm_rel_start_activity_restriction_split_sub();
+ break;
+ default:
+ /*Not accessible to this else (default).*/
+ break;
+ }
+}
+
+/****************************************/
+/* State start activity function */
+/* STM : RelMain */
+/* State : restriction_mode_on( No 1 )*/
+/****************************************/
+static void ZREL_RelMains1StateEntry( void )
+{
+ switch( ZREL_RelMainState[ZREL_RELMAINS1F] )
+ {
+ case ZREL_RELRESTONS0:
+ stm_rel_start_activity_none();
+ break;
+ default:
+ /*Not accessible to this else (default).*/
+ break;
+ }
+}
+
+/****************************************/
+/* Action function */
+/* STM : RelMain */
+/* State : restriction_mode_off( No 0 ) */
+/* Event : stt_restriction_mode_on( No 1 ) */
+/****************************************/
+static void ZREL_RelMains0e1( void )
+{
+ ZREL_RelMainState[ZREL_RELMAIN] = ( uint8_t )ZREL_RELMAINS1;
+ ZREL_RelMainState[ZREL_RELMAINS1F] = ( uint8_t )ZREL_RELRESTONS0;
+ ZREL_RelMains1StateEntry();
+}
+
+/****************************************/
+/* Action function */
+/* STM : RelMain */
+/* State : restriction_mode_on( No 1 )*/
+/* Event : stt_restriction_mode_off( No 0 ) */
+/****************************************/
+static void ZREL_RelMains1e0( void )
+{
+ ZREL_RelMainState[ZREL_RELMAIN] = ( uint8_t )ZREL_RELMAINS0;
+ ZREL_RelMains0StateEntry();
+}
+
+/****************************************/
+/* Action function */
+/* STM : RelRestOff */
+/* State : none( No 0 ) */
+/* Event : stt_crr_layer_apps_map_spl( No 0 ) */
+/****************************************/
+static void ZREL_RelRestOffs0e0( void )
+{
+ ZREL_RelMainState[ZREL_RELMAINS0F] = ( uint8_t )ZREL_RELRESTOFFS3;
+ stm_rel_start_activity_restriction_split_sub();
+}
+
+/****************************************/
+/* Action function */
+/* STM : RelRestOff */
+/* State : none( No 0 ) */
+/* Event : stt_crr_layer_apps_spl_nml( No 1 ) */
+/****************************************/
+static void ZREL_RelRestOffs0e1( void )
+{
+ ZREL_RelMainState[ZREL_RELMAINS0F] = ( uint8_t )ZREL_RELRESTOFFS1;
+ stm_rel_start_activity_restriction_normal();
+}
+
+/****************************************/
+/* Action function */
+/* STM : RelRestOff */
+/* State : none( No 0 ) */
+/* Event : ara_restriction_split_main( No 8 ) */
+/****************************************/
+static void ZREL_RelRestOffs0e8( void )
+{
+ ZREL_RelMainState[ZREL_RELMAINS0F] = ( uint8_t )ZREL_RELRESTOFFS2;
+ stm_rel_start_activity_restriction_split_main();
+}
+
+/****************************************/
+/* Action function */
+/* STM : RelRestOff */
+/* State : none( No 0 ) */
+/* Event : stt_prv_layer_rst_none( No 13 ) */
+/****************************************/
+static void ZREL_RelRestOffs0e13( void )
+{
+ stm_rel_start_activity_none();
+}
+
+/****************************************/
+/* Action function */
+/* STM : RelRestOff */
+/* State : restriction_normal( No 1 ) */
+/* Event : stt_crr_layer_apps_spl_nml( No 1 ) */
+/****************************************/
+static void ZREL_RelRestOffs1e1( void )
+{
+ stm_rel_start_activity_restriction_normal();
+}
+
+/****************************************/
+/* Action function */
+/* STM : RelRestOff */
+/* State : restriction_normal( No 1 ) */
+/* Event : ELSE( No 4 ) */
+/****************************************/
+static void ZREL_RelRestOffs1e4( void )
+{
+ ZREL_RelMainState[ZREL_RELMAINS0F] = ( uint8_t )ZREL_RELRESTOFFS0;
+ stm_rel_start_activity_none();
+}
+
+/****************************************/
+/* Action function */
+/* STM : RelRestOff */
+/* State : restriction_split_main( No 2 ) */
+/* Event : stt_prv_layer_rst_rst_spl_main( No 15 ) */
+/****************************************/
+static void ZREL_RelRestOffs2e15( void )
+{
+ stm_rel_start_activity_restriction_split_main();
+}
+
+/****************************************/
+/* Action function */
+/* STM : RelRestOff */
+/* State : restriction_split_sub( No 3 ) */
+/* Event : stt_crr_layer_apps_map_spl( No 0 ) */
+/****************************************/
+static void ZREL_RelRestOffs3e0( void )
+{
+ stm_rel_start_activity_restriction_split_sub();
+}
+
+/****************************************/
+/* Event appraisal function */
+/* STM : RelMain */
+/* State : restriction_mode_off( No 0 ) */
+/****************************************/
+static void ZREL_RelMains0Event( void )
+{
+ /*stt_restriction_mode_on*/
+ if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOn )
+ {
+ stm_rel_event_restriction_mode_on();
+ ZREL_RelMains0e1();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+}
+
+/****************************************/
+/* Event appraisal function */
+/* STM : RelRestOff */
+/* State : none( No 0 ) */
+/****************************************/
+static void ZREL_RelRestOffs0Event( void )
+{
+ /*stt_restriction_mode_off*/
+ if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOff )
+ {
+ /*stt_lightstatus_brake_off*/
+ if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOff )
+ {
+ /*stt_crr_layer_apps_changed*/
+ if( g_stm_crr_state.layer[StmLayerNoApps].changed == STM_TRUE )
+ {
+ /*stt_crr_layer_apps_map_spl*/
+ if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl )
+ {
+ ZREL_RelRestOffs0e0();
+ }
+ /*stt_crr_layer_apps_spl_nml*/
+ else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml )
+ {
+ ZREL_RelRestOffs0e1();
+ }
+ /*stt_crr_layer_apps_spl_spl*/
+ else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl )
+ {
+ ZREL_RelRestOffs0e1();
+ }
+ /*stt_crr_layer_apps_gen_nml*/
+ else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml )
+ {
+ ZREL_RelRestOffs0e1();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*evt_activate*/
+ else if( g_stm_event == StmEvtNoActivate )
+ {
+ /*ctg_restriction*/
+ if( g_stm_category == StmCtgNoRestriction )
+ {
+ /*ara_restriction_normal*/
+ if( g_stm_area == StmAreaNoRestrictionNormal )
+ {
+ /*stt_crr_layer_apps_spl_nml*/
+ if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml )
+ {
+ ZREL_RelRestOffs0e1();
+ }
+ /*stt_crr_layer_apps_map_spl*/
+ else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl )
+ {
+ ZREL_RelRestOffs0e0();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ara_restriction_split_main*/
+ else if( g_stm_area == StmAreaNoRestrictionSplitMain )
+ {
+ ZREL_RelRestOffs0e8();
+ }
+ /*ara_restriction_split_sub*/
+ else if( g_stm_area == StmAreaNoRestrictionSplitSub )
+ {
+ ZREL_RelRestOffs0e0();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*evt_undo*/
+ else if( g_stm_event == StmEvtNoUndo )
+ {
+ /*stt_prv_layer_rst_none*/
+ if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoNone )
+ {
+ ZREL_RelRestOffs0e13();
+ }
+ /*stt_prv_layer_rst_rst_nml*/
+ else if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoRstNml )
+ {
+ ZREL_RelRestOffs0e1();
+ }
+ /*stt_prv_layer_rst_rst_spl_main*/
+ else if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoRstSplMain )
+ {
+ ZREL_RelRestOffs0e8();
+ }
+ /*stt_prv_layer_rst_rst_spl_sub*/
+ else if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoRstSplSub )
+ {
+ ZREL_RelRestOffs0e0();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+}
+
+/****************************************/
+/* Event appraisal function */
+/* STM : RelRestOff */
+/* State : restriction_normal( No 1 ) */
+/****************************************/
+static void ZREL_RelRestOffs1Event( void )
+{
+ /*stt_restriction_mode_off*/
+ if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOff )
+ {
+ /*stt_lightstatus_brake_off*/
+ if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOff )
+ {
+ /*stt_crr_layer_apps_changed*/
+ if( g_stm_crr_state.layer[StmLayerNoApps].changed == STM_TRUE )
+ {
+ /*stt_crr_layer_apps_map_spl*/
+ if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl )
+ {
+ ZREL_RelRestOffs0e0();
+ }
+ /*stt_crr_layer_apps_spl_nml*/
+ else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml )
+ {
+ ZREL_RelRestOffs1e1();
+ }
+ /*stt_crr_layer_apps_spl_spl*/
+ else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl )
+ {
+ ZREL_RelRestOffs1e1();
+ }
+ /*stt_crr_layer_apps_gen_nml*/
+ else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml )
+ {
+ ZREL_RelRestOffs1e1();
+ }
+ else
+ {
+ ZREL_RelRestOffs1e4();
+ }
+ }
+ /*stt_crr_layer_hs_changed*/
+ else if( g_stm_crr_state.layer[StmLayerNoHomescreen].changed == STM_TRUE )
+ {
+ /*stt_crr_layer_hs_hms*/
+ if( g_stm_crr_state.layer[StmLayerNoHomescreen].state == StmLayoutNoHms )
+ {
+ ZREL_RelRestOffs1e4();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*evt_activate*/
+ else if( g_stm_event == StmEvtNoActivate )
+ {
+ /*ctg_restriction*/
+ if( g_stm_category == StmCtgNoRestriction )
+ {
+ /*ara_restriction_normal*/
+ if( g_stm_area == StmAreaNoRestrictionNormal )
+ {
+ /*stt_crr_layer_apps_map_spl*/
+ if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl )
+ {
+ ZREL_RelRestOffs0e0();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ara_restriction_split_main*/
+ else if( g_stm_area == StmAreaNoRestrictionSplitMain )
+ {
+ ZREL_RelRestOffs0e8();
+ }
+ /*ara_restriction_split_sub*/
+ else if( g_stm_area == StmAreaNoRestrictionSplitSub )
+ {
+ ZREL_RelRestOffs0e0();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_homescreen*/
+ else if( g_stm_category == StmCtgNoHomescreen )
+ {
+ /*ara_fullscreen*/
+ if( g_stm_area == StmAreaNoFullscreen )
+ {
+ ZREL_RelRestOffs1e4();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*evt_deactivate*/
+ else if( g_stm_event == StmEvtNoDeactivate )
+ {
+ /*ctg_restriction*/
+ if( g_stm_category == StmCtgNoRestriction )
+ {
+ ZREL_RelRestOffs1e4();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*stt_lightstatus_brake_on*/
+ else if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOn )
+ {
+ /*stt_prv_layer_rst_not_none*/
+ if( g_stm_prv_state.layer[StmLayerNoRestriction].state != StmLayoutNoNone )
+ {
+ ZREL_RelRestOffs1e4();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*evt_undo*/
+ else if( g_stm_event == StmEvtNoUndo )
+ {
+ /*stt_prv_layer_rst_none*/
+ if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoNone )
+ {
+ ZREL_RelRestOffs1e4();
+ }
+ /*stt_prv_layer_rst_rst_nml*/
+ else if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoRstNml )
+ {
+ ZREL_RelRestOffs1e1();
+ }
+ /*stt_prv_layer_rst_rst_spl_main*/
+ else if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoRstSplMain )
+ {
+ ZREL_RelRestOffs0e8();
+ }
+ /*stt_prv_layer_rst_rst_spl_sub*/
+ else if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoRstSplSub )
+ {
+ ZREL_RelRestOffs0e0();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+}
+
+/****************************************/
+/* Event appraisal function */
+/* STM : RelRestOff */
+/* State : restriction_split_main( No 2 ) */
+/****************************************/
+static void ZREL_RelRestOffs2Event( void )
+{
+ /*stt_restriction_mode_off*/
+ if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOff )
+ {
+ /*stt_lightstatus_brake_off*/
+ if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOff )
+ {
+ /*stt_crr_layer_apps_changed*/
+ if( g_stm_crr_state.layer[StmLayerNoApps].changed == STM_TRUE )
+ {
+ /*stt_crr_layer_apps_map_spl*/
+ if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl )
+ {
+ ZREL_RelRestOffs0e0();
+ }
+ /*stt_crr_layer_apps_spl_nml*/
+ else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml )
+ {
+ ZREL_RelRestOffs0e1();
+ }
+ /*stt_crr_layer_apps_spl_spl*/
+ else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl )
+ {
+ ZREL_RelRestOffs0e1();
+ }
+ /*stt_crr_layer_apps_gen_nml*/
+ else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml )
+ {
+ ZREL_RelRestOffs0e1();
+ }
+ else
+ {
+ ZREL_RelRestOffs1e4();
+ }
+ }
+ /*stt_crr_layer_hs_changed*/
+ else if( g_stm_crr_state.layer[StmLayerNoHomescreen].changed == STM_TRUE )
+ {
+ /*stt_crr_layer_hs_hms*/
+ if( g_stm_crr_state.layer[StmLayerNoHomescreen].state == StmLayoutNoHms )
+ {
+ ZREL_RelRestOffs1e4();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*evt_activate*/
+ else if( g_stm_event == StmEvtNoActivate )
+ {
+ /*ctg_restriction*/
+ if( g_stm_category == StmCtgNoRestriction )
+ {
+ /*ara_restriction_normal*/
+ if( g_stm_area == StmAreaNoRestrictionNormal )
+ {
+ /*stt_crr_layer_apps_spl_nml*/
+ if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml )
+ {
+ ZREL_RelRestOffs0e1();
+ }
+ /*stt_crr_layer_apps_map_spl*/
+ else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl )
+ {
+ ZREL_RelRestOffs0e0();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ara_restriction_split_sub*/
+ else if( g_stm_area == StmAreaNoRestrictionSplitSub )
+ {
+ ZREL_RelRestOffs0e1();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_homescreen*/
+ else if( g_stm_category == StmCtgNoHomescreen )
+ {
+ /*ara_fullscreen*/
+ if( g_stm_area == StmAreaNoFullscreen )
+ {
+ ZREL_RelRestOffs1e4();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*evt_deactivate*/
+ else if( g_stm_event == StmEvtNoDeactivate )
+ {
+ /*ctg_restriction*/
+ if( g_stm_category == StmCtgNoRestriction )
+ {
+ ZREL_RelRestOffs1e4();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*stt_lightstatus_brake_on*/
+ else if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOn )
+ {
+ /*stt_prv_layer_rst_not_none*/
+ if( g_stm_prv_state.layer[StmLayerNoRestriction].state != StmLayoutNoNone )
+ {
+ ZREL_RelRestOffs1e4();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*evt_undo*/
+ else if( g_stm_event == StmEvtNoUndo )
+ {
+ /*stt_prv_layer_rst_none*/
+ if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoNone )
+ {
+ ZREL_RelRestOffs1e4();
+ }
+ /*stt_prv_layer_rst_rst_nml*/
+ else if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoRstNml )
+ {
+ ZREL_RelRestOffs0e1();
+ }
+ /*stt_prv_layer_rst_rst_spl_main*/
+ else if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoRstSplMain )
+ {
+ ZREL_RelRestOffs2e15();
+ }
+ /*stt_prv_layer_rst_rst_spl_sub*/
+ else if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoRstSplSub )
+ {
+ ZREL_RelRestOffs0e0();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+}
+
+/****************************************/
+/* Event appraisal function */
+/* STM : RelRestOff */
+/* State : restriction_split_sub( No 3 ) */
+/****************************************/
+static void ZREL_RelRestOffs3Event( void )
+{
+ /*stt_restriction_mode_off*/
+ if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOff )
+ {
+ /*stt_lightstatus_brake_off*/
+ if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOff )
+ {
+ /*stt_crr_layer_apps_changed*/
+ if( g_stm_crr_state.layer[StmLayerNoApps].changed == STM_TRUE )
+ {
+ /*stt_crr_layer_apps_map_spl*/
+ if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl )
+ {
+ ZREL_RelRestOffs3e0();
+ }
+ /*stt_crr_layer_apps_spl_nml*/
+ else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml )
+ {
+ ZREL_RelRestOffs0e1();
+ }
+ /*stt_crr_layer_apps_spl_spl*/
+ else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl )
+ {
+ ZREL_RelRestOffs0e1();
+ }
+ /*stt_crr_layer_apps_gen_nml*/
+ else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml )
+ {
+ ZREL_RelRestOffs0e1();
+ }
+ else
+ {
+ ZREL_RelRestOffs1e4();
+ }
+ }
+ /*stt_crr_layer_hs_changed*/
+ else if( g_stm_crr_state.layer[StmLayerNoHomescreen].changed == STM_TRUE )
+ {
+ /*stt_crr_layer_hs_hms*/
+ if( g_stm_crr_state.layer[StmLayerNoHomescreen].state == StmLayoutNoHms )
+ {
+ ZREL_RelRestOffs1e4();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*evt_activate*/
+ else if( g_stm_event == StmEvtNoActivate )
+ {
+ /*ctg_restriction*/
+ if( g_stm_category == StmCtgNoRestriction )
+ {
+ /*ara_restriction_normal*/
+ if( g_stm_area == StmAreaNoRestrictionNormal )
+ {
+ /*stt_crr_layer_apps_spl_nml*/
+ if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml )
+ {
+ ZREL_RelRestOffs0e1();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ara_restriction_split_main*/
+ else if( g_stm_area == StmAreaNoRestrictionSplitMain )
+ {
+ ZREL_RelRestOffs0e1();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_homescreen*/
+ else if( g_stm_category == StmCtgNoHomescreen )
+ {
+ /*ara_fullscreen*/
+ if( g_stm_area == StmAreaNoFullscreen )
+ {
+ ZREL_RelRestOffs1e4();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*evt_deactivate*/
+ else if( g_stm_event == StmEvtNoDeactivate )
+ {
+ /*ctg_restriction*/
+ if( g_stm_category == StmCtgNoRestriction )
+ {
+ ZREL_RelRestOffs1e4();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*stt_lightstatus_brake_on*/
+ else if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOn )
+ {
+ /*stt_prv_layer_rst_not_none*/
+ if( g_stm_prv_state.layer[StmLayerNoRestriction].state != StmLayoutNoNone )
+ {
+ ZREL_RelRestOffs1e4();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*evt_undo*/
+ else if( g_stm_event == StmEvtNoUndo )
+ {
+ /*stt_prv_layer_rst_none*/
+ if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoNone )
+ {
+ ZREL_RelRestOffs1e4();
+ }
+ /*stt_prv_layer_rst_rst_nml*/
+ else if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoRstNml )
+ {
+ ZREL_RelRestOffs0e1();
+ }
+ /*stt_prv_layer_rst_rst_spl_main*/
+ else if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoRstSplMain )
+ {
+ ZREL_RelRestOffs0e8();
+ }
+ /*stt_prv_layer_rst_rst_spl_sub*/
+ else if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoRstSplSub )
+ {
+ ZREL_RelRestOffs3e0();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+}
+
+/****************************************/
+/* Event appraisal function */
+/* STM : RelMain */
+/* State : restriction_mode_on( No 1 )*/
+/****************************************/
+static void ZREL_RelMains1Event( void )
+{
+ /*stt_restriction_mode_off*/
+ if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOff )
+ {
+ stm_rel_event_restriction_mode_off();
+ ZREL_RelMains1e0();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+}
+
+/****************************************/
+/* Event appraisal function */
+/* STM : RelRestOn */
+/* State : none( No 0 ) */
+/****************************************/
+static void ZREL_RelRestOns0Event( void )
+{
+}
+
+/****************************************/
+/* Event call function */
+/* STM : RelMain */
+/****************************************/
+void stm_rel_event_call( void )
+{
+ stm_rel_start_stm();
+ switch( ZREL_RelMainState[ZREL_RELMAIN] )
+ {
+ case ZREL_RELMAINS0:
+ switch( ZREL_RelMainState[ZREL_RELMAINS0F] )
+ {
+ case ZREL_RELRESTOFFS0:
+ ZREL_RelRestOffs0Event();
+ break;
+ case ZREL_RELRESTOFFS1:
+ ZREL_RelRestOffs1Event();
+ break;
+ case ZREL_RELRESTOFFS2:
+ ZREL_RelRestOffs2Event();
+ break;
+ case ZREL_RELRESTOFFS3:
+ ZREL_RelRestOffs3Event();
+ break;
+ default:
+ /*Not accessible to this else (default).*/
+ break;
+ }
+ ZREL_RelMains0Event();
+ break;
+ case ZREL_RELMAINS1:
+ switch( ZREL_RelMainState[ZREL_RELMAINS1F] )
+ {
+ case ZREL_RELRESTONS0:
+ ZREL_RelRestOns0Event();
+ break;
+ default:
+ /*Not accessible to this else (default).*/
+ break;
+ }
+ ZREL_RelMains1Event();
+ break;
+ default:
+ /*Not accessible to this else (default).*/
+ break;
+ }
+}
+
+/****************************************/
+/* Initial function */
+/* STM : RelMain */
+/****************************************/
+void stm_rel_initialize( void )
+{
+ ZREL_RelMainState[ZREL_RELMAIN] = ( uint8_t )ZREL_RELMAINS0;
+ ZREL_RelMainState[ZREL_RELMAINS0F] = ( uint8_t )ZREL_RELRESTOFFS0;
+ ZREL_RelMainState[ZREL_RELMAINS1F] = ( uint8_t )ZREL_RELRESTONS0;
+ ZREL_RelMains0StateEntry();
+}
+
+/****************************************/
+/* Terminate function */
+/* STM : RelMain */
+/****************************************/
+void ZREL_RelMainTerminate( void )
+{
+ ZREL_RelMainState[ZREL_RELMAIN] = ( uint8_t )ZREL_RELMAINTERMINATE;
+}
+
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/RestrictionLayer/ZREL_RelMain.h b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/RestrictionLayer/ZREL_RelMain.h
new file mode 100644
index 0000000..ce82e7a
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/RestrictionLayer/ZREL_RelMain.h
@@ -0,0 +1,94 @@
+/************************************************************/
+/* ZREL_RelMain.h */
+/* RelMain State transition model header file */
+/* ZIPC Designer Version 1.2.0 */
+/************************************************************/
+#ifndef ZHEADER_ZREL_RELMAIN_H
+#define ZHEADER_ZREL_RELMAIN_H
+
+/*State management variable access define*/
+#define ZREL_RELMAIN ( 0U )
+#define ZREL_RELMAINS0F ( 1U )
+#define ZREL_RELMAINS1F ( 2U )
+#define ZREL_RELMAINS0 ( 0U )
+#define ZREL_RELRESTOFFS0 ( 0U )
+#define ZREL_RELRESTOFFS1 ( 1U )
+#define ZREL_RELRESTOFFS2 ( 2U )
+#define ZREL_RELRESTOFFS3 ( 3U )
+#define ZREL_RELMAINS1 ( 1U )
+#define ZREL_RELRESTONS0 ( 0U )
+#define ZREL_RELMAINSTATENOMAX ( 3U )
+
+/*End state define*/
+#define ZREL_RELMAINEND ( 4U )
+/*Terminate state define*/
+#define ZREL_RELMAINTERMINATE ( ZREL_RELMAINEND + 1U )
+
+/*State no define*/
+#define ZREL_RELMAINS0STATENO ( 0U )
+#define ZREL_RELRESTOFFS0STATENO ( 0U )
+#define ZREL_RELRESTOFFS1STATENO ( 1U )
+#define ZREL_RELRESTOFFS2STATENO ( 2U )
+#define ZREL_RELRESTOFFS3STATENO ( 3U )
+#define ZREL_RELMAINS1STATENO ( 1U )
+#define ZREL_RELRESTONS0STATENO ( 0U )
+
+/*State serial no define*/
+#define ZREL_RELMAINS0STATESERIALNO ( 0U )
+#define ZREL_RELRESTOFFS0STATESERIALNO ( 1U )
+#define ZREL_RELRESTOFFS1STATESERIALNO ( 2U )
+#define ZREL_RELRESTOFFS2STATESERIALNO ( 3U )
+#define ZREL_RELRESTOFFS3STATESERIALNO ( 4U )
+#define ZREL_RELMAINS1STATESERIALNO ( 5U )
+#define ZREL_RELRESTONS0STATESERIALNO ( 6U )
+
+/*Event no define*/
+#define ZREL_RELMAINE0EVENTNO ( 0U )
+#define ZREL_RELMAINE1EVENTNO ( 1U )
+#define ZREL_RELRESTOFFE0EVENTNO ( 0U )
+#define ZREL_RELRESTOFFE1EVENTNO ( 1U )
+#define ZREL_RELRESTOFFE2EVENTNO ( 2U )
+#define ZREL_RELRESTOFFE3EVENTNO ( 3U )
+#define ZREL_RELRESTOFFE4EVENTNO ( 4U )
+#define ZREL_RELRESTOFFE5EVENTNO ( 5U )
+#define ZREL_RELRESTOFFE6EVENTNO ( 6U )
+#define ZREL_RELRESTOFFE7EVENTNO ( 7U )
+#define ZREL_RELRESTOFFE8EVENTNO ( 8U )
+#define ZREL_RELRESTOFFE9EVENTNO ( 9U )
+#define ZREL_RELRESTOFFE10EVENTNO ( 10U )
+#define ZREL_RELRESTOFFE11EVENTNO ( 11U )
+#define ZREL_RELRESTOFFE12EVENTNO ( 12U )
+#define ZREL_RELRESTOFFE13EVENTNO ( 13U )
+#define ZREL_RELRESTOFFE14EVENTNO ( 14U )
+#define ZREL_RELRESTOFFE15EVENTNO ( 15U )
+#define ZREL_RELRESTOFFE16EVENTNO ( 16U )
+#define ZREL_RELRESTONE0EVENTNO ( 0U )
+
+/*Event serial no define*/
+#define ZREL_RELMAINE0EVENTSERIALNO ( 0U )
+#define ZREL_RELMAINE1EVENTSERIALNO ( 1U )
+#define ZREL_RELRESTOFFE0EVENTNO ( 0U )
+#define ZREL_RELRESTOFFE1EVENTNO ( 1U )
+#define ZREL_RELRESTOFFE2EVENTNO ( 2U )
+#define ZREL_RELRESTOFFE3EVENTNO ( 3U )
+#define ZREL_RELRESTOFFE4EVENTNO ( 4U )
+#define ZREL_RELRESTOFFE5EVENTNO ( 5U )
+#define ZREL_RELRESTOFFE6EVENTNO ( 6U )
+#define ZREL_RELRESTOFFE7EVENTNO ( 7U )
+#define ZREL_RELRESTOFFE8EVENTNO ( 8U )
+#define ZREL_RELRESTOFFE9EVENTNO ( 9U )
+#define ZREL_RELRESTOFFE10EVENTNO ( 10U )
+#define ZREL_RELRESTOFFE11EVENTNO ( 11U )
+#define ZREL_RELRESTOFFE12EVENTNO ( 12U )
+#define ZREL_RELRESTOFFE13EVENTNO ( 13U )
+#define ZREL_RELRESTOFFE14EVENTNO ( 14U )
+#define ZREL_RELRESTOFFE15EVENTNO ( 15U )
+#define ZREL_RELRESTOFFE16EVENTNO ( 16U )
+#define ZREL_RELRESTONE0EVENTNO ( 0U )
+
+/*Extern function*/
+extern void stm_rel_event_call( void );
+extern void stm_rel_initialize( void );
+extern void ZREL_RelMainTerminate( void );
+
+#endif
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/RestrictionLayer/ZREL_Restriction_func.c b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/RestrictionLayer/ZREL_Restriction_func.c
new file mode 100644
index 0000000..a1aa213
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/RestrictionLayer/ZREL_Restriction_func.c
@@ -0,0 +1,81 @@
+/************************************************************/
+/* ZREL_Restriction_func.c */
+/* Function and variable source file */
+/* ZIPC Designer Version 1.2.0 */
+/************************************************************/
+#include "../ZST_include.h"
+
+/*************************************************************
+ Function definition
+*************************************************************/
+
+/*
+ * @name stm_rel_start_activity_none
+ */
+void stm_rel_start_activity_none() {
+ g_stm_crr_state.layer[StmLayerNoRestriction].state = StmLayoutNoNone;
+ g_stm_crr_state.layer[StmLayerNoRestriction].changed = STM_TRUE;
+}
+
+/*
+ * @name stm_rel_start_activity_restriction_normal
+ */
+void stm_rel_start_activity_restriction_normal() {
+ g_stm_crr_state.layer[StmLayerNoRestriction].state = StmLayoutNoRstNml;
+ g_stm_crr_state.layer[StmLayerNoRestriction].changed = STM_TRUE;
+}
+
+/*
+ * @name stm_rel_start_activity_restriction_split_main
+ */
+void stm_rel_start_activity_restriction_split_main() {
+ g_stm_crr_state.layer[StmLayerNoRestriction].state = StmLayoutNoRstSplMain;
+ g_stm_crr_state.layer[StmLayerNoRestriction].changed = STM_TRUE;
+}
+
+/*
+ * @name stm_rel_start_activity_restriction_split_sub
+ */
+void stm_rel_start_activity_restriction_split_sub() {
+ g_stm_crr_state.layer[StmLayerNoRestriction].state = StmLayoutNoRstSplSub;
+ g_stm_crr_state.layer[StmLayerNoRestriction].changed = STM_TRUE;
+}
+
+/*
+ * @name stm_rel_event_restriction_mode_off
+ */
+void stm_rel_event_restriction_mode_off() {
+ g_stm_crr_state.layer[StmLayerNoRestriction].state = g_prv_restriction_state_car_stop;
+ g_stm_crr_state.layer[StmLayerNoRestriction].changed = STM_TRUE;
+}
+
+/*
+ * @name stm_rel_event_restriction_mode_on
+ */
+void stm_rel_event_restriction_mode_on() {
+ g_prv_restriction_state_car_stop = g_stm_prv_state.layer[StmLayerNoRestriction].state;
+}
+
+/*
+ * @name stm_rel_initialize_variable
+ */
+void stm_rel_initialize_variable() {
+ g_stm_prv_state.layer[StmLayerNoRestriction].state = StmLayoutNoNone;
+ g_stm_prv_state.layer[StmLayerNoRestriction].changed = STM_FALSE;
+
+ g_stm_crr_state.layer[StmLayerNoRestriction].state = StmLayoutNoNone;
+ g_stm_crr_state.layer[StmLayerNoRestriction].changed = STM_FALSE;
+}
+
+/*
+ * @name stm_rel_start_stm
+ */
+void stm_rel_start_stm() {
+ if (g_stm_event == StmEvtNoUndo) {
+ // nop
+ }
+ else {
+ g_stm_prv_state.layer[StmLayerNoRestriction].state = g_stm_crr_state.layer[StmLayerNoRestriction].state;
+ }
+ g_stm_crr_state.layer[StmLayerNoRestriction].changed = STM_FALSE;
+}
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/RestrictionLayer/ZREL_Restriction_func.h b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/RestrictionLayer/ZREL_Restriction_func.h
new file mode 100644
index 0000000..3763820
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/RestrictionLayer/ZREL_Restriction_func.h
@@ -0,0 +1,18 @@
+/************************************************************/
+/* ZREL_Restriction_func.h */
+/* Function and variable header file */
+/* ZIPC Designer Version 1.2.0 */
+/************************************************************/
+#ifndef ZHEADER_ZREL_RESTRICTION_FUNC_H
+#define ZHEADER_ZREL_RESTRICTION_FUNC_H
+
+extern void stm_rel_start_activity_none();
+extern void stm_rel_start_activity_restriction_normal();
+extern void stm_rel_start_activity_restriction_split_main();
+extern void stm_rel_start_activity_restriction_split_sub();
+extern void stm_rel_event_restriction_mode_off();
+extern void stm_rel_event_restriction_mode_on();
+extern void stm_rel_initialize_variable();
+extern void stm_rel_start_stm();
+
+#endif
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/RestrictionMode/ZREM_RestrictionMode.c b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/RestrictionMode/ZREM_RestrictionMode.c
new file mode 100644
index 0000000..2ba6a87
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/RestrictionMode/ZREM_RestrictionMode.c
@@ -0,0 +1,117 @@
+/************************************************************/
+/* ZREM_RestrictionMode.c */
+/* RestrictionMode State transition model source file */
+/* ZIPC Designer Version 1.2.0 */
+/************************************************************/
+#include "../ZST_include.h"
+
+/* State management variable */
+static uint8_t ZREM_RestrictionModeState[ZREM_RESTRICTIONMODESTATENOMAX];
+
+static void ZREM_RestrictionModes0e1( void );
+static void ZREM_RestrictionModes1e0( void );
+static void ZREM_RestrictionModes0Event( void );
+static void ZREM_RestrictionModes1Event( void );
+
+/****************************************/
+/* Action function */
+/* STM : RestrictionMode */
+/* State : restriction_mode_on( No 0 )*/
+/* Event : evt_restriction_mode_off( No 1 ) */
+/****************************************/
+static void ZREM_RestrictionModes0e1( void )
+{
+ ZREM_RestrictionModeState[ZREM_RESTRICTIONMODE] = ( uint8_t )ZREM_RESTRICTIONMODES1;
+ stm_rem_start_activity_restriction_mode_off();
+}
+
+/****************************************/
+/* Action function */
+/* STM : RestrictionMode */
+/* State : restriction_mode_off( No 1 ) */
+/* Event : evt_restriction_mode_on( No 0 ) */
+/****************************************/
+static void ZREM_RestrictionModes1e0( void )
+{
+ ZREM_RestrictionModeState[ZREM_RESTRICTIONMODE] = ( uint8_t )ZREM_RESTRICTIONMODES0;
+ stm_rem_start_activity_restriction_mode_on();
+}
+
+/****************************************/
+/* Event appraisal function */
+/* STM : RestrictionMode */
+/* State : restriction_mode_on( No 0 )*/
+/****************************************/
+static void ZREM_RestrictionModes0Event( void )
+{
+ /*evt_restriction_mode_off*/
+ if( g_stm_event == StmEvtNoRestrictionModeOff )
+ {
+ ZREM_RestrictionModes0e1();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+}
+
+/****************************************/
+/* Event appraisal function */
+/* STM : RestrictionMode */
+/* State : restriction_mode_off( No 1 ) */
+/****************************************/
+static void ZREM_RestrictionModes1Event( void )
+{
+ /*evt_restriction_mode_on*/
+ if( g_stm_event == StmEvtNoRestrictionModeOn )
+ {
+ ZREM_RestrictionModes1e0();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+}
+
+/****************************************/
+/* Event call function */
+/* STM : RestrictionMode */
+/****************************************/
+void stm_rem_event_call( void )
+{
+ stm_rem_start_stm();
+ switch( ZREM_RestrictionModeState[ZREM_RESTRICTIONMODE] )
+ {
+ case ZREM_RESTRICTIONMODES0:
+ ZREM_RestrictionModes0Event();
+ break;
+ case ZREM_RESTRICTIONMODES1:
+ ZREM_RestrictionModes1Event();
+ break;
+ default:
+ /*Not accessible to this else (default).*/
+ break;
+ }
+}
+
+/****************************************/
+/* Initial function */
+/* STM : RestrictionMode */
+/****************************************/
+void stm_rem_initialize( void )
+{
+ ZREM_RestrictionModeState[ZREM_RESTRICTIONMODE] = ( uint8_t )ZREM_RESTRICTIONMODES1;
+ stm_rem_start_activity_restriction_mode_off();
+}
+
+/****************************************/
+/* Terminate function */
+/* STM : RestrictionMode */
+/****************************************/
+void ZREM_RestrictionModeTerminate( void )
+{
+ ZREM_RestrictionModeState[ZREM_RESTRICTIONMODE] = ( uint8_t )ZREM_RESTRICTIONMODETERMINATE;
+}
+
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/RestrictionMode/ZREM_RestrictionMode.h b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/RestrictionMode/ZREM_RestrictionMode.h
new file mode 100644
index 0000000..4ce0cac
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/RestrictionMode/ZREM_RestrictionMode.h
@@ -0,0 +1,41 @@
+/************************************************************/
+/* ZREM_RestrictionMode.h */
+/* RestrictionMode State transition model header file */
+/* ZIPC Designer Version 1.2.0 */
+/************************************************************/
+#ifndef ZHEADER_ZREM_RESTRICTIONMODE_H
+#define ZHEADER_ZREM_RESTRICTIONMODE_H
+
+/*State management variable access define*/
+#define ZREM_RESTRICTIONMODE ( 0U )
+#define ZREM_RESTRICTIONMODES0 ( 0U )
+#define ZREM_RESTRICTIONMODES1 ( 1U )
+#define ZREM_RESTRICTIONMODESTATENOMAX ( 1U )
+
+/*End state define*/
+#define ZREM_RESTRICTIONMODEEND ( 2U )
+/*Terminate state define*/
+#define ZREM_RESTRICTIONMODETERMINATE ( ZREM_RESTRICTIONMODEEND + 1U )
+
+/*State no define*/
+#define ZREM_RESTRICTIONMODES0STATENO ( 0U )
+#define ZREM_RESTRICTIONMODES1STATENO ( 1U )
+
+/*State serial no define*/
+#define ZREM_RESTRICTIONMODES0STATESERIALNO ( 0U )
+#define ZREM_RESTRICTIONMODES1STATESERIALNO ( 1U )
+
+/*Event no define*/
+#define ZREM_RESTRICTIONMODEE0EVENTNO ( 0U )
+#define ZREM_RESTRICTIONMODEE1EVENTNO ( 1U )
+
+/*Event serial no define*/
+#define ZREM_RESTRICTIONMODEE0EVENTSERIALNO ( 0U )
+#define ZREM_RESTRICTIONMODEE1EVENTSERIALNO ( 1U )
+
+/*Extern function*/
+extern void stm_rem_event_call( void );
+extern void stm_rem_initialize( void );
+extern void ZREM_RestrictionModeTerminate( void );
+
+#endif
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/RestrictionMode/ZREM_RestrictionMode_func.c b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/RestrictionMode/ZREM_RestrictionMode_func.c
new file mode 100644
index 0000000..e920916
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/RestrictionMode/ZREM_RestrictionMode_func.c
@@ -0,0 +1,45 @@
+/************************************************************/
+/* ZREM_RestrictionMode_func.c */
+/* Function and variable source file */
+/* ZIPC Designer Version 1.2.0 */
+/************************************************************/
+#include "../ZST_include.h"
+
+/*************************************************************
+ Function definition
+*************************************************************/
+
+/*
+ * @name stm_rem_start_activity_restriction_mode_on
+ */
+void stm_rem_start_activity_restriction_mode_on() {
+ g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state = StmRestrictionModeSttNoOn;
+ g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].changed = STM_TRUE;
+}
+
+/*
+ * @name stm_rem_start_activity_restriction_mode_off
+ */
+void stm_rem_start_activity_restriction_mode_off() {
+ g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state = StmRestrictionModeSttNoOff;
+ g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].changed = STM_TRUE;
+}
+
+/*
+ * @name stm_rem_initialize_variable
+ */
+void stm_rem_initialize_variable() {
+ g_stm_prv_state.car_element[StmCarElementNoRestrictionMode].state = StmRestrictionModeSttNoOff;
+ g_stm_prv_state.car_element[StmCarElementNoRestrictionMode].changed = STM_FALSE;
+
+ g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state = StmRestrictionModeSttNoOff;
+ g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].changed = STM_FALSE;
+}
+
+/*
+ * @name stm_rem_start_stm
+ */
+void stm_rem_start_stm() {
+ g_stm_prv_state.car_element[StmCarElementNoRestrictionMode].state = g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state;
+ g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].changed = STM_FALSE;
+}
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/RestrictionMode/ZREM_RestrictionMode_func.h b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/RestrictionMode/ZREM_RestrictionMode_func.h
new file mode 100644
index 0000000..bbb6edf
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/RestrictionMode/ZREM_RestrictionMode_func.h
@@ -0,0 +1,14 @@
+/************************************************************/
+/* ZREM_RestrictionMode_func.h */
+/* Function and variable header file */
+/* ZIPC Designer Version 1.2.0 */
+/************************************************************/
+#ifndef ZHEADER_ZREM_RESTRICTIONMODE_FUNC_H
+#define ZHEADER_ZREM_RESTRICTIONMODE_FUNC_H
+
+extern void stm_rem_start_activity_restriction_mode_on();
+extern void stm_rem_start_activity_restriction_mode_off();
+extern void stm_rem_initialize_variable();
+extern void stm_rem_start_stm();
+
+#endif
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/ZST_StateTransitionor_def.h b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/ZST_StateTransitionor_def.h
new file mode 100644
index 0000000..0212a95
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/ZST_StateTransitionor_def.h
@@ -0,0 +1,15 @@
+/************************************************************/
+/* ZST_StateTransitionor_def.h */
+/* Define header file */
+/* ZIPC Designer Version 1.2.0 */
+/************************************************************/
+#ifndef ZHEADER_ZST_STATETRANSITIONOR_DEF_H
+#define ZHEADER_ZST_STATETRANSITIONOR_DEF_H
+
+/*************************************************************
+ Define definition
+*************************************************************/
+
+#include "../../../stm.h"
+
+#endif
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/ZST_StateTransitionor_func.c b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/ZST_StateTransitionor_func.c
new file mode 100644
index 0000000..daea2ca
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/ZST_StateTransitionor_func.c
@@ -0,0 +1,178 @@
+/************************************************************/
+/* ZST_StateTransitionor_func.c */
+/* Function and variable source file */
+/* ZIPC Designer Version 1.2.0 */
+/************************************************************/
+#include "ZST_include.h"
+#include "../stm_master_apps.h"
+#include "../stm_master_remote.h"
+
+/*************************************************************
+ Function definition
+*************************************************************/
+
+#include <string.h>
+#include <stdbool.h>
+
+static bool isMaster = false;
+
+//=================================
+// API
+//=================================
+/**
+ * Initialize STM
+ */
+void stmInitializeInner(const char *ecu_name) {
+
+ // TODO: Set master mode
+ if (0 == strcmp("master", ecu_name))
+ {
+ isMaster = true;
+ }
+
+ // Initialize previous state
+ memset(&g_stm_prv_state, 0, sizeof(g_stm_prv_state));
+
+ // Initialize current state
+ g_stm_crr_state = g_stm_prv_state;
+
+ /* Initialize LightstatusBrake state */
+ stm_lbs_initialize();
+ stm_lbs_initialize_variable();
+
+ /* Initialize AccelPedal state */
+ stm_aps_initialize();
+ stm_aps_initialize_variable();
+
+ /* Initialize car state */
+ stm_rns_initialize();
+ stm_rns_initialize_variable();
+
+ /* Initialize restriction mode state */
+ stm_rem_initialize();
+ stm_rem_initialize_variable();
+
+ // Initialize homecsreen layer
+ stm_hsl_initialize();
+ stm_hsl_initialize_variable();
+
+ if (isMaster)
+ {
+ // Initialize apps layer on master ecu
+ stm_master_apl_initialize();
+ stm_master_apl_initialize_valiable();
+ }
+ else
+ {
+ // Initialize apps layer
+ stm_apl_initialize();
+ stm_apl_initialize_variable();
+ }
+
+ // Initialize near_homecsreen layer
+ stm_nhl_initialize();
+ stm_nhl_initialize_variable();
+
+ /* Initialize restriction layer */
+ stm_rel_initialize();
+ stm_rel_initialize_variable();
+
+ if (isMaster)
+ {
+ // Initialize remote layer on master ecu
+ stm_mst_rmt_initialize();
+ stm_mst_rmt_initialize_valiable();
+ }
+
+ g_stm_map_is_activated = STM_FALSE;
+}
+
+/**
+ * Transition State
+ */
+int stmTransitionStateInner(int event_id, StmState* state) {
+ g_stm_event = STM_GET_EVENT_FROM_ID(event_id);
+ g_stm_category = STM_GET_CATEGORY_FROM_ID(event_id);
+ g_stm_area = STM_GET_AREA_FROM_ID(event_id);
+
+ // LightstatusBrake state
+ stm_lbs_event_call();
+
+ // AccelPedal state
+ stm_aps_event_call();
+
+ // Car state
+ stm_rns_event_call();
+
+ // restriction mode
+ stm_rem_event_call();
+
+ // homescreen layer
+ stm_hsl_event_call();
+
+ if (isMaster)
+ {
+ // apps layer on master ecu
+ stm_master_apl_event_call();
+ }
+ else
+ {
+ // apps layer
+ stm_apl_event_call();
+ }
+
+ // near_homecsreen layer
+ stm_nhl_event_call();
+
+ // restriction layer
+ stm_rel_event_call();
+
+ // on_screen layer
+ stm_osl_event_call();
+
+ if (isMaster)
+ {
+ // remote layer on master ecu
+ stm_mst_rmt_event_call();
+ }
+
+ // Copy current state for return
+ memcpy(state, &g_stm_crr_state, sizeof(g_stm_crr_state));
+
+ return 0;
+}
+
+/**
+ * Undo State
+ */
+void stmUndoStateInner() {
+ g_stm_event = StmEvtNoUndo;
+
+ if (isMaster)
+ {
+ // apps layer on master ecu
+ stm_master_apl_event_call();
+ }
+ else
+ {
+ // apps layer
+ stm_apl_event_call();
+ }
+
+ // near_homecsreen layer
+ stm_nhl_event_call();
+
+ // restriction layer
+ stm_rel_event_call();
+
+ // on_screen layer
+ stm_osl_event_call();
+
+ if (isMaster)
+ {
+ // remote layer on master ecu
+ stm_mst_rmt_event_call();
+ }
+
+ g_stm_crr_state = g_stm_prv_state;
+}
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/ZST_StateTransitionor_func.h b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/ZST_StateTransitionor_func.h
new file mode 100644
index 0000000..78c4636
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/ZST_StateTransitionor_func.h
@@ -0,0 +1,13 @@
+/************************************************************/
+/* ZST_StateTransitionor_func.h */
+/* Function and variable header file */
+/* ZIPC Designer Version 1.2.0 */
+/************************************************************/
+#ifndef ZHEADER_ZST_STATETRANSITIONOR_FUNC_H
+#define ZHEADER_ZST_STATETRANSITIONOR_FUNC_H
+
+extern void stmInitializeInner();
+extern int stmTransitionStateInner(int event_id, StmState* state);
+extern void stmUndoStateInner();
+
+#endif
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/ZST_StateTransitionor_var.c b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/ZST_StateTransitionor_var.c
new file mode 100644
index 0000000..a5e67ff
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/ZST_StateTransitionor_var.c
@@ -0,0 +1,56 @@
+/************************************************************/
+/* ZST_StateTransitionor_var.c */
+/* Function and variable source file */
+/* ZIPC Designer Version 1.2.0 */
+/************************************************************/
+#include "ZST_include.h"
+
+/*************************************************************
+ Variable definition
+*************************************************************/
+
+// Current state
+StmState g_stm_crr_state;
+
+// Previous state
+StmState g_stm_prv_state;
+
+/**
+ * g_stm_event
+ */
+int g_stm_event;
+
+/**
+ * g_stm_category
+ */
+int g_stm_category;
+
+/**
+ * g_stm_area
+ */
+int g_stm_area;
+
+/**
+ * g_stm_map_is_activated
+ */
+int g_stm_map_is_activated;
+
+/**
+ * g_prv_apps_state_car_stop
+ */
+int g_prv_apps_state_car_stop;
+
+/**
+ * g_prv_near_homescreen_state_car_stop
+ */
+int g_prv_near_homescreen_state_car_stop;
+
+/**
+ * g_prv_restriction_state_car_stop
+ */
+int g_prv_restriction_state_car_stop;
+
+/**
+ * g_prv_on_screen_state_car_stop
+ */
+int g_prv_on_screen_state_car_stop;
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/ZST_StateTransitionor_var.h b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/ZST_StateTransitionor_var.h
new file mode 100644
index 0000000..4cabced
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/ZST_StateTransitionor_var.h
@@ -0,0 +1,20 @@
+/************************************************************/
+/* ZST_StateTransitionor_var.h */
+/* Function and variable header file */
+/* ZIPC Designer Version 1.2.0 */
+/************************************************************/
+#ifndef ZHEADER_ZST_STATETRANSITIONOR_VAR_H
+#define ZHEADER_ZST_STATETRANSITIONOR_VAR_H
+
+extern StmState g_stm_crr_state;
+extern StmState g_stm_prv_state;
+extern int g_stm_event;
+extern int g_stm_category;
+extern int g_stm_area;
+extern int g_stm_map_is_activated;
+extern int g_prv_apps_state_car_stop;
+extern int g_prv_near_homescreen_state_car_stop;
+extern int g_prv_restriction_state_car_stop;
+extern int g_prv_on_screen_state_car_stop;
+
+#endif
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/ZST_include.h b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/ZST_include.h
new file mode 100644
index 0000000..2158660
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/ZST_include.h
@@ -0,0 +1,39 @@
+/************************************************************/
+/* ZST_include.h */
+/* Functional block ST include file */
+/* ZIPC Designer Version 1.2.0 */
+/************************************************************/
+
+#ifndef ZHEADER_ZST_INCLUDE_H
+#define ZHEADER_ZST_INCLUDE_H
+
+#include "../Common/ZCommonInclude.h"
+#include "../Common/MisraCType.h"
+#include "../Common/Event.h"
+#include "ZST_StateTransitionor_def.h"
+#include "master/layer/apps/Zmaster_apps_master_apps_def.h"
+#include "master/layer/remote/Zmaster_remote_master_remote_def.h"
+#include "ZST_StateTransitionor_func.h"
+#include "ZST_StateTransitionor_var.h"
+#include "AppsLayer/ZAPL_Apps_func.h"
+#include "OnScreenlayer/ZOSL_OnScreen_func.h"
+#include "HomeScreenLayer/ZHSL_HomeScreen_func.h"
+#include "RestrictionLayer/ZREL_Restriction_func.h"
+#include "RestrictionMode/ZREM_RestrictionMode_func.h"
+#include "NearHomeScreen/ZNHL_NearHomeScreen_func.h"
+#include "AccelPedal/ZACCEL_AccelPedalState_func.h"
+#include "CarState/ZCAR_CarState_func.h"
+#include "LightStatusBrake/ZLIGHT_LightstatusBrakeStatus_func.h"
+#include "master/layer/apps/Zmaster_apps_apps_main.h"
+#include "master/layer/remote/Zmaster_remote_remote.h"
+#include "AppsLayer/ZAPL_AppsLayer.h"
+#include "OnScreenlayer/ZOSL_OslMain.h"
+#include "HomeScreenLayer/ZHSL_HomeScreen.h"
+#include "RestrictionLayer/ZREL_RelMain.h"
+#include "RestrictionMode/ZREM_RestrictionMode.h"
+#include "NearHomeScreen/ZNHL_NearHomescreen.h"
+#include "AccelPedal/ZACCEL_AccelPedal.h"
+#include "CarState/ZCAR_CarState.h"
+#include "LightStatusBrake/ZLIGHT_LightstatusBrake.h"
+
+#endif
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/master/layer/apps/Zmaster_apps_apps_main.c b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/master/layer/apps/Zmaster_apps_apps_main.c
new file mode 100644
index 0000000..af46ea9
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/master/layer/apps/Zmaster_apps_apps_main.c
@@ -0,0 +1,1456 @@
+/************************************************************/
+/* Zmaster_apps_apps_main.c */
+/* apps_main State transition model source file */
+/* ZIPC Designer Version 1.2.0 */
+/************************************************************/
+#include "../../../ZST_include.h"
+
+/* State management variable */
+static uint8_t Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAINSTATENOMAX];
+
+static void Zmaster_apps_apps_mains0StateEntry( void );
+static void Zmaster_apps_apps_mains1StateEntry( void );
+static void Zmaster_apps_apps_mains0e1( void );
+static void Zmaster_apps_apps_mains1e0( void );
+static void Zmaster_apps_apps_car_stops0e0( void );
+static void Zmaster_apps_apps_car_stops0e2( void );
+static void Zmaster_apps_apps_car_stops0e3( void );
+static void Zmaster_apps_apps_car_stops0e4( void );
+static void Zmaster_apps_apps_car_stops0e11( void );
+static void Zmaster_apps_apps_car_stops0e15( void );
+static void Zmaster_apps_apps_car_runs0e0( void );
+static void Zmaster_apps_apps_car_runs0e3( void );
+static void Zmaster_apps_apps_mains0Event( void );
+static void Zmaster_apps_apps_car_stops0Event( void );
+static void Zmaster_apps_apps_car_stops1Event( void );
+static void Zmaster_apps_apps_car_stops2Event( void );
+static void Zmaster_apps_apps_car_stops3Event( void );
+static void Zmaster_apps_apps_car_stops4Event( void );
+static void Zmaster_apps_apps_car_stops5Event( void );
+static void Zmaster_apps_apps_mains1Event( void );
+static void Zmaster_apps_apps_car_runs0Event( void );
+static void Zmaster_apps_apps_car_runs1Event( void );
+
+/****************************************/
+/* State start activity function */
+/* STM : apps_main */
+/* State : lightstatus_brake_on( No 0 ) */
+/****************************************/
+static void Zmaster_apps_apps_mains0StateEntry( void )
+{
+ switch( Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAINS0F] )
+ {
+ case ZMASTER_APPS_APPS_CAR_STOPS0:
+ stm_mst_apl_start_activity_none();
+ break;
+ case ZMASTER_APPS_APPS_CAR_STOPS1:
+ stm_mst_apl_start_activity_meter_receiver();
+ break;
+ case ZMASTER_APPS_APPS_CAR_STOPS2:
+ stm_mst_apl_start_activity_meter_splitable();
+ break;
+ case ZMASTER_APPS_APPS_CAR_STOPS3:
+ stm_mst_apl_start_activity_splitable_receiver();
+ break;
+ case ZMASTER_APPS_APPS_CAR_STOPS4:
+ stm_mst_apl_start_activity_splitable_split();
+ break;
+ case ZMASTER_APPS_APPS_CAR_STOPS5:
+ stm_mst_apl_start_activity_general();
+ break;
+ default:
+ /*Not accessible to this else (default).*/
+ break;
+ }
+}
+
+/****************************************/
+/* State start activity function */
+/* STM : apps_main */
+/* State : lightstatus_brake_off( No 1 ) */
+/****************************************/
+static void Zmaster_apps_apps_mains1StateEntry( void )
+{
+ switch( Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAINS1F] )
+ {
+ case ZMASTER_APPS_APPS_CAR_RUNS0:
+ stm_mst_apl_start_activity_meter_receiver();
+ break;
+ case ZMASTER_APPS_APPS_CAR_RUNS1:
+ stm_mst_apl_start_activity_meter();
+ break;
+ default:
+ /*Not accessible to this else (default).*/
+ break;
+ }
+}
+
+/****************************************/
+/* Action function */
+/* STM : apps_main */
+/* State : lightstatus_brake_on( No 0 ) */
+/* Event : stt_lightstatus_brake_off( No 1 ) */
+/****************************************/
+static void Zmaster_apps_apps_mains0e1( void )
+{
+ Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAIN] = ( uint8_t )ZMASTER_APPS_APPS_MAINS1;
+ Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAINS1F] = ( uint8_t )ZMASTER_APPS_APPS_CAR_RUNS0;
+ Zmaster_apps_apps_mains1StateEntry();
+}
+
+/****************************************/
+/* Action function */
+/* STM : apps_main */
+/* State : lightstatus_brake_off( No 1 ) */
+/* Event : stt_lightstatus_brake_on( No 0 ) */
+/****************************************/
+static void Zmaster_apps_apps_mains1e0( void )
+{
+ Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAIN] = ( uint8_t )ZMASTER_APPS_APPS_MAINS0;
+ Zmaster_apps_apps_mains0StateEntry();
+}
+
+/****************************************/
+/* Action function */
+/* STM : apps_car_stop */
+/* State : none( No 0 ) */
+/* Event : ara_split_main( No 0 ) */
+/****************************************/
+static void Zmaster_apps_apps_car_stops0e0( void )
+{
+ Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAINS0F] = ( uint8_t )ZMASTER_APPS_APPS_CAR_STOPS1;
+ stm_mst_apl_start_activity_meter_receiver();
+}
+
+/****************************************/
+/* Action function */
+/* STM : apps_car_stop */
+/* State : none( No 0 ) */
+/* Event : ara_split_main( No 2 ) */
+/****************************************/
+static void Zmaster_apps_apps_car_stops0e2( void )
+{
+ Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAINS0F] = ( uint8_t )ZMASTER_APPS_APPS_CAR_STOPS3;
+ stm_mst_apl_start_activity_splitable_receiver();
+}
+
+/****************************************/
+/* Action function */
+/* STM : apps_car_stop */
+/* State : none( No 0 ) */
+/* Event : ara_split_sub( No 3 ) */
+/****************************************/
+static void Zmaster_apps_apps_car_stops0e3( void )
+{
+ Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAINS0F] = ( uint8_t )ZMASTER_APPS_APPS_CAR_STOPS2;
+ stm_mst_apl_start_activity_meter_splitable();
+}
+
+/****************************************/
+/* Action function */
+/* STM : apps_car_stop */
+/* State : none( No 0 ) */
+/* Event : ara_normal( No 4 ) */
+/****************************************/
+static void Zmaster_apps_apps_car_stops0e4( void )
+{
+ Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAINS0F] = ( uint8_t )ZMASTER_APPS_APPS_CAR_STOPS5;
+ stm_mst_apl_start_activity_general();
+}
+
+/****************************************/
+/* Action function */
+/* STM : apps_car_stop */
+/* State : none( No 0 ) */
+/* Event : stt_prv_layer_apps_none( No 11 ) */
+/****************************************/
+static void Zmaster_apps_apps_car_stops0e11( void )
+{
+ Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAINS0F] = ( uint8_t )ZMASTER_APPS_APPS_CAR_STOPS0;
+ stm_mst_apl_start_activity_none();
+}
+
+/****************************************/
+/* Action function */
+/* STM : apps_car_stop */
+/* State : none( No 0 ) */
+/* Event : stt_prv_layer_apps_splitable_split( No 15 ) */
+/****************************************/
+static void Zmaster_apps_apps_car_stops0e15( void )
+{
+ Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAINS0F] = ( uint8_t )ZMASTER_APPS_APPS_CAR_STOPS4;
+ stm_mst_apl_start_activity_splitable_split();
+}
+
+/****************************************/
+/* Action function */
+/* STM : apps_car_run */
+/* State : meter_receiver( No 0 ) */
+/* Event : ara_normal( No 0 ) */
+/****************************************/
+static void Zmaster_apps_apps_car_runs0e0( void )
+{
+ Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAINS1F] = ( uint8_t )ZMASTER_APPS_APPS_CAR_RUNS1;
+ stm_mst_apl_start_activity_meter();
+}
+
+/****************************************/
+/* Action function */
+/* STM : apps_car_run */
+/* State : meter_receiver( No 0 ) */
+/* Event : stt_prv_layer_apps_meter_receiver( No 3 ) */
+/****************************************/
+static void Zmaster_apps_apps_car_runs0e3( void )
+{
+ Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAINS1F] = ( uint8_t )ZMASTER_APPS_APPS_CAR_RUNS0;
+ stm_mst_apl_start_activity_meter_receiver();
+}
+
+/****************************************/
+/* Event appraisal function */
+/* STM : apps_main */
+/* State : lightstatus_brake_on( No 0 ) */
+/****************************************/
+static void Zmaster_apps_apps_mains0Event( void )
+{
+ /*stt_lightstatus_brake_off*/
+ if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOff )
+ {
+ stm_mst_apl_event_lightstatus_brake_off();
+ Zmaster_apps_apps_mains0e1();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+}
+
+/****************************************/
+/* Event appraisal function */
+/* STM : apps_car_stop */
+/* State : none( No 0 ) */
+/****************************************/
+static void Zmaster_apps_apps_car_stops0Event( void )
+{
+ /*stt_lightstatus_brake_on*/
+ if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOn )
+ {
+ /*evt_activate*/
+ if( g_stm_event == StmEvtNoActivate )
+ {
+ /*ctg_meter*/
+ if( g_stm_category == StmCtgNoMeter )
+ {
+ /*ara_split_main*/
+ if( g_stm_area == StmAreaNoSplitMain )
+ {
+ Zmaster_apps_apps_car_stops0e0();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_receiver*/
+ else if( g_stm_category == StmCtgNoReceiver )
+ {
+ /*ara_split_sub*/
+ if( g_stm_area == StmAreaNoSplitSub )
+ {
+ Zmaster_apps_apps_car_stops0e0();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_splitable_main*/
+ else if( g_stm_category == StmCtgNoSplitableMain )
+ {
+ /*ara_split_main*/
+ if( g_stm_area == StmAreaNoSplitMain )
+ {
+ Zmaster_apps_apps_car_stops0e2();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_splitable_sub*/
+ else if( g_stm_category == StmCtgNoSplitableSub )
+ {
+ /*ara_split_sub*/
+ if( g_stm_area == StmAreaNoSplitSub )
+ {
+ Zmaster_apps_apps_car_stops0e3();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_general*/
+ else if( g_stm_category == StmCtgNoGeneral )
+ {
+ /*ara_normal*/
+ if( g_stm_area == StmAreaNoNormal )
+ {
+ Zmaster_apps_apps_car_stops0e4();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*evt_undo*/
+ else if( g_stm_event == StmEvtNoUndo )
+ {
+ /*stt_prv_layer_apps_none*/
+ if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoNone )
+ {
+ Zmaster_apps_apps_car_stops0e11();
+ }
+ /*stt_prv_layer_apps_meter_receiver*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMtrRcv )
+ {
+ Zmaster_apps_apps_car_stops0e0();
+ }
+ /*stt_prv_layer_apps_meter_splitable*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMtrSpl )
+ {
+ Zmaster_apps_apps_car_stops0e3();
+ }
+ /*stt_prv_layer_apps_splitable_receiver*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplRcv )
+ {
+ Zmaster_apps_apps_car_stops0e2();
+ }
+ /*stt_prv_layer_apps_splitable_split*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl )
+ {
+ Zmaster_apps_apps_car_stops0e15();
+ }
+ /*stt_prv_layer_apps_gen_nml*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml )
+ {
+ Zmaster_apps_apps_car_stops0e4();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+}
+
+/****************************************/
+/* Event appraisal function */
+/* STM : apps_car_stop */
+/* State : meter_receiver( No 1 ) */
+/****************************************/
+static void Zmaster_apps_apps_car_stops1Event( void )
+{
+ /*stt_lightstatus_brake_on*/
+ if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOn )
+ {
+ /*evt_activate*/
+ if( g_stm_event == StmEvtNoActivate )
+ {
+ /*ctg_splitable_main*/
+ if( g_stm_category == StmCtgNoSplitableMain )
+ {
+ /*ara_split_main*/
+ if( g_stm_area == StmAreaNoSplitMain )
+ {
+ Zmaster_apps_apps_car_stops0e2();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_splitable_sub*/
+ else if( g_stm_category == StmCtgNoSplitableSub )
+ {
+ /*ara_split_sub*/
+ if( g_stm_area == StmAreaNoSplitSub )
+ {
+ Zmaster_apps_apps_car_stops0e3();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_general*/
+ else if( g_stm_category == StmCtgNoGeneral )
+ {
+ /*ara_normal*/
+ if( g_stm_area == StmAreaNoNormal )
+ {
+ Zmaster_apps_apps_car_stops0e4();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_homescreen*/
+ else if( g_stm_category == StmCtgNoHomescreen )
+ {
+ /*ara_fullscreen*/
+ if( g_stm_area == StmAreaNoFullscreen )
+ {
+ Zmaster_apps_apps_car_stops0e11();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*evt_deactivate*/
+ else if( g_stm_event == StmEvtNoDeactivate )
+ {
+ /*ctg_meter*/
+ if( g_stm_category == StmCtgNoMeter )
+ {
+ Zmaster_apps_apps_car_stops0e11();
+ }
+ /*ctg_receiver*/
+ else if( g_stm_category == StmCtgNoReceiver )
+ {
+ Zmaster_apps_apps_car_stops0e11();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*evt_undo*/
+ else if( g_stm_event == StmEvtNoUndo )
+ {
+ /*stt_prv_layer_apps_none*/
+ if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoNone )
+ {
+ Zmaster_apps_apps_car_stops0e11();
+ }
+ /*stt_prv_layer_apps_meter_receiver*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMtrRcv )
+ {
+ Zmaster_apps_apps_car_stops0e0();
+ }
+ /*stt_prv_layer_apps_meter_splitable*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMtrSpl )
+ {
+ Zmaster_apps_apps_car_stops0e3();
+ }
+ /*stt_prv_layer_apps_splitable_receiver*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplRcv )
+ {
+ Zmaster_apps_apps_car_stops0e2();
+ }
+ /*stt_prv_layer_apps_splitable_split*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl )
+ {
+ Zmaster_apps_apps_car_stops0e15();
+ }
+ /*stt_prv_layer_apps_gen_nml*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml )
+ {
+ Zmaster_apps_apps_car_stops0e4();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+}
+
+/****************************************/
+/* Event appraisal function */
+/* STM : apps_car_stop */
+/* State : meter_splitable( No 2 ) */
+/****************************************/
+static void Zmaster_apps_apps_car_stops2Event( void )
+{
+ /*stt_lightstatus_brake_on*/
+ if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOn )
+ {
+ /*evt_activate*/
+ if( g_stm_event == StmEvtNoActivate )
+ {
+ /*ctg_receiver*/
+ if( g_stm_category == StmCtgNoReceiver )
+ {
+ /*ara_split_sub*/
+ if( g_stm_area == StmAreaNoSplitSub )
+ {
+ Zmaster_apps_apps_car_stops0e0();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_splitable_main*/
+ else if( g_stm_category == StmCtgNoSplitableMain )
+ {
+ /*ara_split_main*/
+ if( g_stm_area == StmAreaNoSplitMain )
+ {
+ Zmaster_apps_apps_car_stops0e15();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_splitable_sub*/
+ else if( g_stm_category == StmCtgNoSplitableSub )
+ {
+ /*ara_split_sub*/
+ if( g_stm_area == StmAreaNoSplitSub )
+ {
+ Zmaster_apps_apps_car_stops0e3();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_general*/
+ else if( g_stm_category == StmCtgNoGeneral )
+ {
+ /*ara_normal*/
+ if( g_stm_area == StmAreaNoNormal )
+ {
+ Zmaster_apps_apps_car_stops0e4();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_homescreen*/
+ else if( g_stm_category == StmCtgNoHomescreen )
+ {
+ /*ara_fullscreen*/
+ if( g_stm_area == StmAreaNoFullscreen )
+ {
+ Zmaster_apps_apps_car_stops0e11();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*evt_deactivate*/
+ else if( g_stm_event == StmEvtNoDeactivate )
+ {
+ /*ctg_meter*/
+ if( g_stm_category == StmCtgNoMeter )
+ {
+ Zmaster_apps_apps_car_stops0e11();
+ }
+ /*ctg_splitable_sub*/
+ else if( g_stm_category == StmCtgNoSplitableSub )
+ {
+ /*ara_split_sub*/
+ if( g_stm_area == StmAreaNoSplitSub )
+ {
+ Zmaster_apps_apps_car_stops0e0();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*evt_undo*/
+ else if( g_stm_event == StmEvtNoUndo )
+ {
+ /*stt_prv_layer_apps_none*/
+ if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoNone )
+ {
+ Zmaster_apps_apps_car_stops0e11();
+ }
+ /*stt_prv_layer_apps_meter_receiver*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMtrRcv )
+ {
+ Zmaster_apps_apps_car_stops0e0();
+ }
+ /*stt_prv_layer_apps_meter_splitable*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMtrSpl )
+ {
+ Zmaster_apps_apps_car_stops0e3();
+ }
+ /*stt_prv_layer_apps_splitable_receiver*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplRcv )
+ {
+ Zmaster_apps_apps_car_stops0e2();
+ }
+ /*stt_prv_layer_apps_splitable_split*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl )
+ {
+ Zmaster_apps_apps_car_stops0e15();
+ }
+ /*stt_prv_layer_apps_gen_nml*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml )
+ {
+ Zmaster_apps_apps_car_stops0e4();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+}
+
+/****************************************/
+/* Event appraisal function */
+/* STM : apps_car_stop */
+/* State : splitable_receiver( No 3 ) */
+/****************************************/
+static void Zmaster_apps_apps_car_stops3Event( void )
+{
+ /*stt_lightstatus_brake_on*/
+ if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOn )
+ {
+ /*evt_activate*/
+ if( g_stm_event == StmEvtNoActivate )
+ {
+ /*ctg_meter*/
+ if( g_stm_category == StmCtgNoMeter )
+ {
+ /*ara_split_main*/
+ if( g_stm_area == StmAreaNoSplitMain )
+ {
+ Zmaster_apps_apps_car_stops0e0();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_splitable_main*/
+ else if( g_stm_category == StmCtgNoSplitableMain )
+ {
+ /*ara_split_main*/
+ if( g_stm_area == StmAreaNoSplitMain )
+ {
+ Zmaster_apps_apps_car_stops0e2();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_splitable_sub*/
+ else if( g_stm_category == StmCtgNoSplitableSub )
+ {
+ /*ara_split_sub*/
+ if( g_stm_area == StmAreaNoSplitSub )
+ {
+ Zmaster_apps_apps_car_stops0e15();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_general*/
+ else if( g_stm_category == StmCtgNoGeneral )
+ {
+ /*ara_normal*/
+ if( g_stm_area == StmAreaNoNormal )
+ {
+ Zmaster_apps_apps_car_stops0e4();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_homescreen*/
+ else if( g_stm_category == StmCtgNoHomescreen )
+ {
+ /*ara_fullscreen*/
+ if( g_stm_area == StmAreaNoFullscreen )
+ {
+ Zmaster_apps_apps_car_stops0e11();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*evt_deactivate*/
+ else if( g_stm_event == StmEvtNoDeactivate )
+ {
+ /*ctg_receiver*/
+ if( g_stm_category == StmCtgNoReceiver )
+ {
+ Zmaster_apps_apps_car_stops0e11();
+ }
+ /*ctg_splitable_main*/
+ else if( g_stm_category == StmCtgNoSplitableMain )
+ {
+ /*ara_split_main*/
+ if( g_stm_area == StmAreaNoSplitMain )
+ {
+ Zmaster_apps_apps_car_stops0e0();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*evt_undo*/
+ else if( g_stm_event == StmEvtNoUndo )
+ {
+ /*stt_prv_layer_apps_none*/
+ if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoNone )
+ {
+ Zmaster_apps_apps_car_stops0e11();
+ }
+ /*stt_prv_layer_apps_meter_receiver*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMtrRcv )
+ {
+ Zmaster_apps_apps_car_stops0e0();
+ }
+ /*stt_prv_layer_apps_meter_splitable*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMtrSpl )
+ {
+ Zmaster_apps_apps_car_stops0e3();
+ }
+ /*stt_prv_layer_apps_splitable_receiver*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplRcv )
+ {
+ Zmaster_apps_apps_car_stops0e2();
+ }
+ /*stt_prv_layer_apps_splitable_split*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl )
+ {
+ Zmaster_apps_apps_car_stops0e15();
+ }
+ /*stt_prv_layer_apps_gen_nml*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml )
+ {
+ Zmaster_apps_apps_car_stops0e4();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+}
+
+/****************************************/
+/* Event appraisal function */
+/* STM : apps_car_stop */
+/* State : splitable_split( No 4 ) */
+/****************************************/
+static void Zmaster_apps_apps_car_stops4Event( void )
+{
+ /*stt_lightstatus_brake_on*/
+ if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOn )
+ {
+ /*evt_activate*/
+ if( g_stm_event == StmEvtNoActivate )
+ {
+ /*ctg_meter*/
+ if( g_stm_category == StmCtgNoMeter )
+ {
+ /*ara_split_main*/
+ if( g_stm_area == StmAreaNoSplitMain )
+ {
+ Zmaster_apps_apps_car_stops0e3();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_receiver*/
+ else if( g_stm_category == StmCtgNoReceiver )
+ {
+ /*ara_split_sub*/
+ if( g_stm_area == StmAreaNoSplitSub )
+ {
+ Zmaster_apps_apps_car_stops0e2();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_splitable_main*/
+ else if( g_stm_category == StmCtgNoSplitableMain )
+ {
+ /*ara_split_main*/
+ if( g_stm_area == StmAreaNoSplitMain )
+ {
+ Zmaster_apps_apps_car_stops0e15();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_splitable_sub*/
+ else if( g_stm_category == StmCtgNoSplitableSub )
+ {
+ /*ara_split_sub*/
+ if( g_stm_area == StmAreaNoSplitSub )
+ {
+ Zmaster_apps_apps_car_stops0e15();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_general*/
+ else if( g_stm_category == StmCtgNoGeneral )
+ {
+ /*ara_normal*/
+ if( g_stm_area == StmAreaNoNormal )
+ {
+ Zmaster_apps_apps_car_stops0e4();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_homescreen*/
+ else if( g_stm_category == StmCtgNoHomescreen )
+ {
+ /*ara_fullscreen*/
+ if( g_stm_area == StmAreaNoFullscreen )
+ {
+ Zmaster_apps_apps_car_stops0e11();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*evt_deactivate*/
+ else if( g_stm_event == StmEvtNoDeactivate )
+ {
+ /*ctg_splitable_main*/
+ if( g_stm_category == StmCtgNoSplitableMain )
+ {
+ /*ara_split_main*/
+ if( g_stm_area == StmAreaNoSplitMain )
+ {
+ Zmaster_apps_apps_car_stops0e3();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_splitable_sub*/
+ else if( g_stm_category == StmCtgNoSplitableSub )
+ {
+ /*ara_split_sub*/
+ if( g_stm_area == StmAreaNoSplitSub )
+ {
+ Zmaster_apps_apps_car_stops0e2();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*evt_undo*/
+ else if( g_stm_event == StmEvtNoUndo )
+ {
+ /*stt_prv_layer_apps_none*/
+ if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoNone )
+ {
+ Zmaster_apps_apps_car_stops0e11();
+ }
+ /*stt_prv_layer_apps_meter_receiver*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMtrRcv )
+ {
+ Zmaster_apps_apps_car_stops0e0();
+ }
+ /*stt_prv_layer_apps_meter_splitable*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMtrSpl )
+ {
+ Zmaster_apps_apps_car_stops0e3();
+ }
+ /*stt_prv_layer_apps_splitable_receiver*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplRcv )
+ {
+ Zmaster_apps_apps_car_stops0e2();
+ }
+ /*stt_prv_layer_apps_splitable_split*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl )
+ {
+ Zmaster_apps_apps_car_stops0e15();
+ }
+ /*stt_prv_layer_apps_gen_nml*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml )
+ {
+ Zmaster_apps_apps_car_stops0e4();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+}
+
+/****************************************/
+/* Event appraisal function */
+/* STM : apps_car_stop */
+/* State : general( No 5 ) */
+/****************************************/
+static void Zmaster_apps_apps_car_stops5Event( void )
+{
+ /*stt_lightstatus_brake_on*/
+ if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOn )
+ {
+ /*evt_activate*/
+ if( g_stm_event == StmEvtNoActivate )
+ {
+ /*ctg_meter*/
+ if( g_stm_category == StmCtgNoMeter )
+ {
+ /*ara_split_main*/
+ if( g_stm_area == StmAreaNoSplitMain )
+ {
+ Zmaster_apps_apps_car_stops0e0();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_receiver*/
+ else if( g_stm_category == StmCtgNoReceiver )
+ {
+ /*ara_split_sub*/
+ if( g_stm_area == StmAreaNoSplitSub )
+ {
+ Zmaster_apps_apps_car_stops0e0();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_splitable_main*/
+ else if( g_stm_category == StmCtgNoSplitableMain )
+ {
+ /*ara_split_main*/
+ if( g_stm_area == StmAreaNoSplitMain )
+ {
+ Zmaster_apps_apps_car_stops0e2();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_splitable_sub*/
+ else if( g_stm_category == StmCtgNoSplitableSub )
+ {
+ /*ara_split_sub*/
+ if( g_stm_area == StmAreaNoSplitSub )
+ {
+ Zmaster_apps_apps_car_stops0e3();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_general*/
+ else if( g_stm_category == StmCtgNoGeneral )
+ {
+ /*ara_normal*/
+ if( g_stm_area == StmAreaNoNormal )
+ {
+ Zmaster_apps_apps_car_stops0e4();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_homescreen*/
+ else if( g_stm_category == StmCtgNoHomescreen )
+ {
+ /*ara_fullscreen*/
+ if( g_stm_area == StmAreaNoFullscreen )
+ {
+ Zmaster_apps_apps_car_stops0e11();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*evt_deactivate*/
+ else if( g_stm_event == StmEvtNoDeactivate )
+ {
+ /*ctg_general*/
+ if( g_stm_category == StmCtgNoGeneral )
+ {
+ Zmaster_apps_apps_car_stops0e11();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*evt_undo*/
+ else if( g_stm_event == StmEvtNoUndo )
+ {
+ /*stt_prv_layer_apps_none*/
+ if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoNone )
+ {
+ Zmaster_apps_apps_car_stops0e11();
+ }
+ /*stt_prv_layer_apps_meter_receiver*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMtrRcv )
+ {
+ Zmaster_apps_apps_car_stops0e0();
+ }
+ /*stt_prv_layer_apps_meter_splitable*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMtrSpl )
+ {
+ Zmaster_apps_apps_car_stops0e3();
+ }
+ /*stt_prv_layer_apps_splitable_receiver*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplRcv )
+ {
+ Zmaster_apps_apps_car_stops0e2();
+ }
+ /*stt_prv_layer_apps_splitable_split*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl )
+ {
+ Zmaster_apps_apps_car_stops0e15();
+ }
+ /*stt_prv_layer_apps_gen_nml*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml )
+ {
+ Zmaster_apps_apps_car_stops0e4();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+}
+
+/****************************************/
+/* Event appraisal function */
+/* STM : apps_main */
+/* State : lightstatus_brake_off( No 1 ) */
+/****************************************/
+static void Zmaster_apps_apps_mains1Event( void )
+{
+ /*stt_lightstatus_brake_on*/
+ if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOn )
+ {
+ stm_mst_apl_event_lightstatus_brake_on();
+ Zmaster_apps_apps_mains1e0();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+}
+
+/****************************************/
+/* Event appraisal function */
+/* STM : apps_car_run */
+/* State : meter_receiver( No 0 ) */
+/****************************************/
+static void Zmaster_apps_apps_car_runs0Event( void )
+{
+ /*stt_lightstatus_brake_off*/
+ if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOff )
+ {
+ /*evt_activate*/
+ if( g_stm_event == StmEvtNoActivate )
+ {
+ /*ctg_meter*/
+ if( g_stm_category == StmCtgNoMeter )
+ {
+ /*ara_normal*/
+ if( g_stm_area == StmAreaNoNormal )
+ {
+ Zmaster_apps_apps_car_runs0e0();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*evt_undo*/
+ else if( g_stm_event == StmEvtNoUndo )
+ {
+ /*stt_prv_layer_apps_meter_receiver*/
+ if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMtrRcv )
+ {
+ Zmaster_apps_apps_car_runs0e3();
+ }
+ /*stt_prv_layer_apps_meter*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMtrNml )
+ {
+ Zmaster_apps_apps_car_runs0e0();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+}
+
+/****************************************/
+/* Event appraisal function */
+/* STM : apps_car_run */
+/* State : meter( No 1 ) */
+/****************************************/
+static void Zmaster_apps_apps_car_runs1Event( void )
+{
+ /*stt_lightstatus_brake_off*/
+ if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOff )
+ {
+ /*evt_activate*/
+ if( g_stm_event == StmEvtNoActivate )
+ {
+ /*ctg_meter*/
+ if( g_stm_category == StmCtgNoMeter )
+ {
+ /*ara_split_main*/
+ if( g_stm_area == StmAreaNoSplitMain )
+ {
+ Zmaster_apps_apps_car_runs0e3();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*ctg_receiver*/
+ else if( g_stm_category == StmCtgNoReceiver )
+ {
+ /*ara_split_sub*/
+ if( g_stm_area == StmAreaNoSplitSub )
+ {
+ Zmaster_apps_apps_car_runs0e3();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*evt_undo*/
+ else if( g_stm_event == StmEvtNoUndo )
+ {
+ /*stt_prv_layer_apps_meter_receiver*/
+ if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMtrRcv )
+ {
+ Zmaster_apps_apps_car_runs0e3();
+ }
+ /*stt_prv_layer_apps_meter*/
+ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMtrNml )
+ {
+ Zmaster_apps_apps_car_runs0e0();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+}
+
+/****************************************/
+/* Event call function */
+/* STM : apps_main */
+/****************************************/
+void stm_master_apl_event_call( void )
+{
+ stm_mst_apl_start_stm();
+ switch( Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAIN] )
+ {
+ case ZMASTER_APPS_APPS_MAINS0:
+ switch( Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAINS0F] )
+ {
+ case ZMASTER_APPS_APPS_CAR_STOPS0:
+ Zmaster_apps_apps_car_stops0Event();
+ break;
+ case ZMASTER_APPS_APPS_CAR_STOPS1:
+ Zmaster_apps_apps_car_stops1Event();
+ break;
+ case ZMASTER_APPS_APPS_CAR_STOPS2:
+ Zmaster_apps_apps_car_stops2Event();
+ break;
+ case ZMASTER_APPS_APPS_CAR_STOPS3:
+ Zmaster_apps_apps_car_stops3Event();
+ break;
+ case ZMASTER_APPS_APPS_CAR_STOPS4:
+ Zmaster_apps_apps_car_stops4Event();
+ break;
+ case ZMASTER_APPS_APPS_CAR_STOPS5:
+ Zmaster_apps_apps_car_stops5Event();
+ break;
+ default:
+ /*Not accessible to this else (default).*/
+ break;
+ }
+ Zmaster_apps_apps_mains0Event();
+ break;
+ case ZMASTER_APPS_APPS_MAINS1:
+ switch( Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAINS1F] )
+ {
+ case ZMASTER_APPS_APPS_CAR_RUNS0:
+ Zmaster_apps_apps_car_runs0Event();
+ break;
+ case ZMASTER_APPS_APPS_CAR_RUNS1:
+ Zmaster_apps_apps_car_runs1Event();
+ break;
+ default:
+ /*Not accessible to this else (default).*/
+ break;
+ }
+ Zmaster_apps_apps_mains1Event();
+ break;
+ default:
+ /*Not accessible to this else (default).*/
+ break;
+ }
+}
+
+/****************************************/
+/* Initial function */
+/* STM : apps_main */
+/****************************************/
+void stm_master_apl_initialize( void )
+{
+ Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAIN] = ( uint8_t )ZMASTER_APPS_APPS_MAINS0;
+ Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAINS0F] = ( uint8_t )ZMASTER_APPS_APPS_CAR_STOPS0;
+ Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAINS1F] = ( uint8_t )ZMASTER_APPS_APPS_CAR_RUNS0;
+ Zmaster_apps_apps_mains0StateEntry();
+}
+
+/****************************************/
+/* Terminate function */
+/* STM : apps_main */
+/****************************************/
+void Zmaster_apps_apps_mainTerminate( void )
+{
+ Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAIN] = ( uint8_t )ZMASTER_APPS_APPS_MAINTERMINATE;
+}
+
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/master/layer/apps/Zmaster_apps_apps_main.h b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/master/layer/apps/Zmaster_apps_apps_main.h
new file mode 100644
index 0000000..afa2e67
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/master/layer/apps/Zmaster_apps_apps_main.h
@@ -0,0 +1,111 @@
+/************************************************************/
+/* Zmaster_apps_apps_main.h */
+/* apps_main State transition model header file */
+/* ZIPC Designer Version 1.2.0 */
+/************************************************************/
+#ifndef ZHEADER_ZMASTER_APPS_APPS_MAIN_H
+#define ZHEADER_ZMASTER_APPS_APPS_MAIN_H
+
+/*State management variable access define*/
+#define ZMASTER_APPS_APPS_MAIN ( 0U )
+#define ZMASTER_APPS_APPS_MAINS0F ( 1U )
+#define ZMASTER_APPS_APPS_MAINS1F ( 2U )
+#define ZMASTER_APPS_APPS_MAINS0 ( 0U )
+#define ZMASTER_APPS_APPS_CAR_STOPS0 ( 0U )
+#define ZMASTER_APPS_APPS_CAR_STOPS1 ( 1U )
+#define ZMASTER_APPS_APPS_CAR_STOPS2 ( 2U )
+#define ZMASTER_APPS_APPS_CAR_STOPS3 ( 3U )
+#define ZMASTER_APPS_APPS_CAR_STOPS4 ( 4U )
+#define ZMASTER_APPS_APPS_CAR_STOPS5 ( 5U )
+#define ZMASTER_APPS_APPS_MAINS1 ( 1U )
+#define ZMASTER_APPS_APPS_CAR_RUNS0 ( 0U )
+#define ZMASTER_APPS_APPS_CAR_RUNS1 ( 1U )
+#define ZMASTER_APPS_APPS_MAINSTATENOMAX ( 3U )
+
+/*End state define*/
+#define ZMASTER_APPS_APPS_MAINEND ( 6U )
+/*Terminate state define*/
+#define ZMASTER_APPS_APPS_MAINTERMINATE ( ZMASTER_APPS_APPS_MAINEND + 1U )
+
+/*State no define*/
+#define ZMASTER_APPS_APPS_MAINS0STATENO ( 0U )
+#define ZMASTER_APPS_APPS_CAR_STOPS0STATENO ( 0U )
+#define ZMASTER_APPS_APPS_CAR_STOPS1STATENO ( 1U )
+#define ZMASTER_APPS_APPS_CAR_STOPS2STATENO ( 2U )
+#define ZMASTER_APPS_APPS_CAR_STOPS3STATENO ( 3U )
+#define ZMASTER_APPS_APPS_CAR_STOPS4STATENO ( 4U )
+#define ZMASTER_APPS_APPS_CAR_STOPS5STATENO ( 5U )
+#define ZMASTER_APPS_APPS_MAINS1STATENO ( 1U )
+#define ZMASTER_APPS_APPS_CAR_RUNS0STATENO ( 0U )
+#define ZMASTER_APPS_APPS_CAR_RUNS1STATENO ( 1U )
+
+/*State serial no define*/
+#define ZMASTER_APPS_APPS_MAINS0STATESERIALNO ( 0U )
+#define ZMASTER_APPS_APPS_CAR_STOPS0STATESERIALNO ( 1U )
+#define ZMASTER_APPS_APPS_CAR_STOPS1STATESERIALNO ( 2U )
+#define ZMASTER_APPS_APPS_CAR_STOPS2STATESERIALNO ( 3U )
+#define ZMASTER_APPS_APPS_CAR_STOPS3STATESERIALNO ( 4U )
+#define ZMASTER_APPS_APPS_CAR_STOPS4STATESERIALNO ( 5U )
+#define ZMASTER_APPS_APPS_CAR_STOPS5STATESERIALNO ( 6U )
+#define ZMASTER_APPS_APPS_MAINS1STATESERIALNO ( 7U )
+#define ZMASTER_APPS_APPS_CAR_RUNS0STATESERIALNO ( 8U )
+#define ZMASTER_APPS_APPS_CAR_RUNS1STATESERIALNO ( 9U )
+
+/*Event no define*/
+#define ZMASTER_APPS_APPS_MAINE0EVENTNO ( 0U )
+#define ZMASTER_APPS_APPS_MAINE1EVENTNO ( 1U )
+#define ZMASTER_APPS_APPS_CAR_STOPE0EVENTNO ( 0U )
+#define ZMASTER_APPS_APPS_CAR_STOPE1EVENTNO ( 1U )
+#define ZMASTER_APPS_APPS_CAR_STOPE2EVENTNO ( 2U )
+#define ZMASTER_APPS_APPS_CAR_STOPE3EVENTNO ( 3U )
+#define ZMASTER_APPS_APPS_CAR_STOPE4EVENTNO ( 4U )
+#define ZMASTER_APPS_APPS_CAR_STOPE5EVENTNO ( 5U )
+#define ZMASTER_APPS_APPS_CAR_STOPE6EVENTNO ( 6U )
+#define ZMASTER_APPS_APPS_CAR_STOPE7EVENTNO ( 7U )
+#define ZMASTER_APPS_APPS_CAR_STOPE8EVENTNO ( 8U )
+#define ZMASTER_APPS_APPS_CAR_STOPE9EVENTNO ( 9U )
+#define ZMASTER_APPS_APPS_CAR_STOPE10EVENTNO ( 10U )
+#define ZMASTER_APPS_APPS_CAR_STOPE11EVENTNO ( 11U )
+#define ZMASTER_APPS_APPS_CAR_STOPE12EVENTNO ( 12U )
+#define ZMASTER_APPS_APPS_CAR_STOPE13EVENTNO ( 13U )
+#define ZMASTER_APPS_APPS_CAR_STOPE14EVENTNO ( 14U )
+#define ZMASTER_APPS_APPS_CAR_STOPE15EVENTNO ( 15U )
+#define ZMASTER_APPS_APPS_CAR_STOPE16EVENTNO ( 16U )
+#define ZMASTER_APPS_APPS_CAR_RUNE0EVENTNO ( 0U )
+#define ZMASTER_APPS_APPS_CAR_RUNE1EVENTNO ( 1U )
+#define ZMASTER_APPS_APPS_CAR_RUNE2EVENTNO ( 2U )
+#define ZMASTER_APPS_APPS_CAR_RUNE3EVENTNO ( 3U )
+#define ZMASTER_APPS_APPS_CAR_RUNE4EVENTNO ( 4U )
+
+/*Event serial no define*/
+#define ZMASTER_APPS_APPS_MAINE0EVENTSERIALNO ( 0U )
+#define ZMASTER_APPS_APPS_MAINE1EVENTSERIALNO ( 1U )
+#define ZMASTER_APPS_APPS_CAR_STOPE0EVENTNO ( 0U )
+#define ZMASTER_APPS_APPS_CAR_STOPE1EVENTNO ( 1U )
+#define ZMASTER_APPS_APPS_CAR_STOPE2EVENTNO ( 2U )
+#define ZMASTER_APPS_APPS_CAR_STOPE3EVENTNO ( 3U )
+#define ZMASTER_APPS_APPS_CAR_STOPE4EVENTNO ( 4U )
+#define ZMASTER_APPS_APPS_CAR_STOPE5EVENTNO ( 5U )
+#define ZMASTER_APPS_APPS_CAR_STOPE6EVENTNO ( 6U )
+#define ZMASTER_APPS_APPS_CAR_STOPE7EVENTNO ( 7U )
+#define ZMASTER_APPS_APPS_CAR_STOPE8EVENTNO ( 8U )
+#define ZMASTER_APPS_APPS_CAR_STOPE9EVENTNO ( 9U )
+#define ZMASTER_APPS_APPS_CAR_STOPE10EVENTNO ( 10U )
+#define ZMASTER_APPS_APPS_CAR_STOPE11EVENTNO ( 11U )
+#define ZMASTER_APPS_APPS_CAR_STOPE12EVENTNO ( 12U )
+#define ZMASTER_APPS_APPS_CAR_STOPE13EVENTNO ( 13U )
+#define ZMASTER_APPS_APPS_CAR_STOPE14EVENTNO ( 14U )
+#define ZMASTER_APPS_APPS_CAR_STOPE15EVENTNO ( 15U )
+#define ZMASTER_APPS_APPS_CAR_STOPE16EVENTNO ( 16U )
+#define ZMASTER_APPS_APPS_CAR_RUNE0EVENTNO ( 0U )
+#define ZMASTER_APPS_APPS_CAR_RUNE1EVENTNO ( 1U )
+#define ZMASTER_APPS_APPS_CAR_RUNE2EVENTNO ( 2U )
+#define ZMASTER_APPS_APPS_CAR_RUNE3EVENTNO ( 3U )
+#define ZMASTER_APPS_APPS_CAR_RUNE4EVENTNO ( 4U )
+
+/*Extern function*/
+extern void stm_master_apl_event_call( void );
+extern void stm_master_apl_initialize( void );
+extern void Zmaster_apps_apps_mainTerminate( void );
+
+#endif
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/master/layer/apps/Zmaster_apps_master_apps_def.h b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/master/layer/apps/Zmaster_apps_master_apps_def.h
new file mode 100644
index 0000000..5c22ae6
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/master/layer/apps/Zmaster_apps_master_apps_def.h
@@ -0,0 +1,15 @@
+/************************************************************/
+/* Zmaster_apps_master_apps_def.h */
+/* Define header file */
+/* ZIPC Designer Version 1.2.0 */
+/************************************************************/
+#ifndef ZHEADER_ZMASTER_APPS_MASTER_APPS_DEF_H
+#define ZHEADER_ZMASTER_APPS_MASTER_APPS_DEF_H
+
+/*************************************************************
+ Define definition
+*************************************************************/
+
+#include "../../../../stm_master_apps.h"
+
+#endif
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/master/layer/remote/Zmaster_remote_master_remote_def.h b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/master/layer/remote/Zmaster_remote_master_remote_def.h
new file mode 100644
index 0000000..7cd92cd
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/master/layer/remote/Zmaster_remote_master_remote_def.h
@@ -0,0 +1,15 @@
+/************************************************************/
+/* Zmaster_remote_master_remote_def.h */
+/* Define header file */
+/* ZIPC Designer Version 1.2.0 */
+/************************************************************/
+#ifndef ZHEADER_ZMASTER_REMOTE_MASTER_REMOTE_DEF_H
+#define ZHEADER_ZMASTER_REMOTE_MASTER_REMOTE_DEF_H
+
+/*************************************************************
+ Define definition
+*************************************************************/
+
+#include "../../../../stm_master_remote.h"
+
+#endif
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/master/layer/remote/Zmaster_remote_remote.c b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/master/layer/remote/Zmaster_remote_remote.c
new file mode 100644
index 0000000..53ceafa
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/master/layer/remote/Zmaster_remote_remote.c
@@ -0,0 +1,206 @@
+/************************************************************/
+/* Zmaster_remote_remote.c */
+/* remote State transition model source file */
+/* ZIPC Designer Version 1.2.0 */
+/************************************************************/
+#include "../../../ZST_include.h"
+
+/* State management variable */
+static uint8_t Zmaster_remote_remoteState[ZMASTER_REMOTE_REMOTESTATENOMAX];
+
+static void Zmaster_remote_remotes0e0( void );
+static void Zmaster_remote_remotes0e2( void );
+static void Zmaster_remote_remotes1e1( void );
+static void Zmaster_remote_remotes1e3( void );
+static void Zmaster_remote_remotes0Event( void );
+static void Zmaster_remote_remotes1Event( void );
+
+/****************************************/
+/* Action function */
+/* STM : remote */
+/* State : none( No 0 ) */
+/* Event : ara_master_split_sub( No 0 ) */
+/****************************************/
+static void Zmaster_remote_remotes0e0( void )
+{
+ Zmaster_remote_remoteState[ZMASTER_REMOTE_REMOTE] = ( uint8_t )ZMASTER_REMOTE_REMOTES1;
+ stm_mst_rmt_start_activity_tbt();
+}
+
+/****************************************/
+/* Action function */
+/* STM : remote */
+/* State : none( No 0 ) */
+/* Event : stt_prv_layer_remote_none( No 2 ) */
+/****************************************/
+static void Zmaster_remote_remotes0e2( void )
+{
+ stm_mst_rmt_start_activity_none();
+}
+
+/****************************************/
+/* Action function */
+/* STM : remote */
+/* State : tbt( No 1 ) */
+/* Event : ctg_tbt( No 1 ) */
+/****************************************/
+static void Zmaster_remote_remotes1e1( void )
+{
+ Zmaster_remote_remoteState[ZMASTER_REMOTE_REMOTE] = ( uint8_t )ZMASTER_REMOTE_REMOTES0;
+ stm_mst_rmt_start_activity_none();
+}
+
+/****************************************/
+/* Action function */
+/* STM : remote */
+/* State : tbt( No 1 ) */
+/* Event : stt_prv_layer_remote_tbt( No 3 ) */
+/****************************************/
+static void Zmaster_remote_remotes1e3( void )
+{
+ stm_mst_rmt_start_activity_tbt();
+}
+
+/****************************************/
+/* Event appraisal function */
+/* STM : remote */
+/* State : none( No 0 ) */
+/****************************************/
+static void Zmaster_remote_remotes0Event( void )
+{
+ /*evt_activate*/
+ if( g_stm_event == StmEvtNoActivate )
+ {
+ /*ctg_tbt*/
+ if( g_stm_category == StmCtgNoTbt )
+ {
+ /*ara_master_split_sub*/
+ if( g_stm_area == StmAreaNoMasterSplitSub )
+ {
+ Zmaster_remote_remotes0e0();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*evt_undo*/
+ else if( g_stm_event == StmEvtNoUndo )
+ {
+ /*stt_prv_layer_remote_none*/
+ if( g_stm_prv_state.layer[StmLayerNoRemote].state == StmLayoutNoNone )
+ {
+ Zmaster_remote_remotes0e2();
+ }
+ /*stt_prv_layer_remote_tbt*/
+ else if( g_stm_prv_state.layer[StmLayerNoRemote].state == StmLayoutNoRmtTbt )
+ {
+ Zmaster_remote_remotes0e0();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+}
+
+/****************************************/
+/* Event appraisal function */
+/* STM : remote */
+/* State : tbt( No 1 ) */
+/****************************************/
+static void Zmaster_remote_remotes1Event( void )
+{
+ /*evt_deactivate*/
+ if( g_stm_event == StmEvtNoDeactivate )
+ {
+ /*ctg_tbt*/
+ if( g_stm_category == StmCtgNoTbt )
+ {
+ Zmaster_remote_remotes1e1();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*evt_undo*/
+ else if( g_stm_event == StmEvtNoUndo )
+ {
+ /*stt_prv_layer_remote_none*/
+ if( g_stm_prv_state.layer[StmLayerNoRemote].state == StmLayoutNoNone )
+ {
+ Zmaster_remote_remotes1e1();
+ }
+ /*stt_prv_layer_remote_tbt*/
+ else if( g_stm_prv_state.layer[StmLayerNoRemote].state == StmLayoutNoRmtTbt )
+ {
+ Zmaster_remote_remotes1e3();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+}
+
+/****************************************/
+/* Event call function */
+/* STM : remote */
+/****************************************/
+void stm_mst_rmt_event_call( void )
+{
+ stm_mst_rmt_start_stm();
+ switch( Zmaster_remote_remoteState[ZMASTER_REMOTE_REMOTE] )
+ {
+ case ZMASTER_REMOTE_REMOTES0:
+ Zmaster_remote_remotes0Event();
+ break;
+ case ZMASTER_REMOTE_REMOTES1:
+ Zmaster_remote_remotes1Event();
+ break;
+ default:
+ /*Not accessible to this else (default).*/
+ break;
+ }
+}
+
+/****************************************/
+/* Initial function */
+/* STM : remote */
+/****************************************/
+void stm_mst_rmt_initialize( void )
+{
+ Zmaster_remote_remoteState[ZMASTER_REMOTE_REMOTE] = ( uint8_t )ZMASTER_REMOTE_REMOTES0;
+ stm_mst_rmt_start_activity_none();
+}
+
+/****************************************/
+/* Terminate function */
+/* STM : remote */
+/****************************************/
+void Zmaster_remote_remoteTerminate( void )
+{
+ Zmaster_remote_remoteState[ZMASTER_REMOTE_REMOTE] = ( uint8_t )ZMASTER_REMOTE_REMOTETERMINATE;
+}
+
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/master/layer/remote/Zmaster_remote_remote.h b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/master/layer/remote/Zmaster_remote_remote.h
new file mode 100644
index 0000000..5899b07
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/StateTransitionor/master/layer/remote/Zmaster_remote_remote.h
@@ -0,0 +1,45 @@
+/************************************************************/
+/* Zmaster_remote_remote.h */
+/* remote State transition model header file */
+/* ZIPC Designer Version 1.2.0 */
+/************************************************************/
+#ifndef ZHEADER_ZMASTER_REMOTE_REMOTE_H
+#define ZHEADER_ZMASTER_REMOTE_REMOTE_H
+
+/*State management variable access define*/
+#define ZMASTER_REMOTE_REMOTE ( 0U )
+#define ZMASTER_REMOTE_REMOTES0 ( 0U )
+#define ZMASTER_REMOTE_REMOTES1 ( 1U )
+#define ZMASTER_REMOTE_REMOTESTATENOMAX ( 1U )
+
+/*End state define*/
+#define ZMASTER_REMOTE_REMOTEEND ( 2U )
+/*Terminate state define*/
+#define ZMASTER_REMOTE_REMOTETERMINATE ( ZMASTER_REMOTE_REMOTEEND + 1U )
+
+/*State no define*/
+#define ZMASTER_REMOTE_REMOTES0STATENO ( 0U )
+#define ZMASTER_REMOTE_REMOTES1STATENO ( 1U )
+
+/*State serial no define*/
+#define ZMASTER_REMOTE_REMOTES0STATESERIALNO ( 0U )
+#define ZMASTER_REMOTE_REMOTES1STATESERIALNO ( 1U )
+
+/*Event no define*/
+#define ZMASTER_REMOTE_REMOTEE0EVENTNO ( 0U )
+#define ZMASTER_REMOTE_REMOTEE1EVENTNO ( 1U )
+#define ZMASTER_REMOTE_REMOTEE2EVENTNO ( 2U )
+#define ZMASTER_REMOTE_REMOTEE3EVENTNO ( 3U )
+
+/*Event serial no define*/
+#define ZMASTER_REMOTE_REMOTEE0EVENTSERIALNO ( 0U )
+#define ZMASTER_REMOTE_REMOTEE1EVENTSERIALNO ( 1U )
+#define ZMASTER_REMOTE_REMOTEE2EVENTSERIALNO ( 2U )
+#define ZMASTER_REMOTE_REMOTEE3EVENTSERIALNO ( 3U )
+
+/*Extern function*/
+extern void stm_mst_rmt_event_call( void );
+extern void stm_mst_rmt_initialize( void );
+extern void Zmaster_remote_remoteTerminate( void );
+
+#endif
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/stm_inner.h b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/stm_inner.h
new file mode 100644
index 0000000..5097fcf
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/stm_inner.h
@@ -0,0 +1,22 @@
+/*
+ * Copyright (c) 2018 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef TMCAGLWM_STM_INNER_HPP
+#define TMCAGLWM_STM_INNER_HPP
+
+#include "StateTransitionor/ZST_StateTransitionor_func.h"
+
+#endif // TMCAGLWM_STM_INNER_HPP
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/stm_master_apps.c b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/stm_master_apps.c
new file mode 100644
index 0000000..a8cc0e2
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/stm_master_apps.c
@@ -0,0 +1,63 @@
+#include "./StateTransitionor/ZST_include.h"
+
+void stm_mst_apl_start_activity_none() {
+ g_stm_crr_state.layer[StmLayerNoApps].state = StmLayoutNoNone;
+ g_stm_crr_state.layer[StmLayerNoApps].changed = STM_TRUE;
+}
+
+void stm_mst_apl_start_activity_meter_receiver() {
+ g_stm_crr_state.layer[StmLayerNoApps].state = StmLayoutNoMtrRcv;
+ g_stm_crr_state.layer[StmLayerNoApps].changed = STM_TRUE;
+}
+
+void stm_mst_apl_start_activity_meter_splitable() {
+ g_stm_crr_state.layer[StmLayerNoApps].state = StmLayoutNoMtrSpl;
+ g_stm_crr_state.layer[StmLayerNoApps].changed = STM_TRUE;
+}
+
+void stm_mst_apl_start_activity_splitable_receiver() {
+ g_stm_crr_state.layer[StmLayerNoApps].state = StmLayoutNoSplRcv;
+ g_stm_crr_state.layer[StmLayerNoApps].changed = STM_TRUE;
+}
+
+void stm_mst_apl_start_activity_splitable_split() {
+ g_stm_crr_state.layer[StmLayerNoApps].state = StmLayoutNoSplSpl;
+ g_stm_crr_state.layer[StmLayerNoApps].changed = STM_TRUE;
+}
+
+void stm_mst_apl_start_activity_general() {
+ g_stm_crr_state.layer[StmLayerNoApps].state = StmLayoutNoGenNml;
+ g_stm_crr_state.layer[StmLayerNoApps].changed = STM_TRUE;
+}
+
+void stm_mst_apl_start_activity_meter() {
+ g_stm_crr_state.layer[StmLayerNoApps].state = StmLayoutNoMtrNml;
+ g_stm_crr_state.layer[StmLayerNoApps].changed = STM_TRUE;
+}
+
+void stm_mst_apl_event_lightstatus_brake_on() {
+ g_stm_crr_state.layer[StmLayerNoApps].state = g_prv_apps_state_car_stop;
+ g_stm_crr_state.layer[StmLayerNoApps].changed = STM_TRUE;
+}
+
+void stm_mst_apl_event_lightstatus_brake_off() {
+ g_prv_apps_state_car_stop = g_stm_prv_state.layer[StmLayerNoApps].state;
+}
+
+void stm_master_apl_initialize_valiable() {
+ g_stm_prv_state.layer[StmLayerNoApps].state = StmLayoutNoNone;
+ g_stm_prv_state.layer[StmLayerNoApps].changed = STM_FALSE;
+
+ g_stm_crr_state.layer[StmLayerNoApps].state = StmLayoutNoNone;
+ g_stm_crr_state.layer[StmLayerNoApps].changed = STM_FALSE;
+}
+
+void stm_mst_apl_start_stm() {
+ if (g_stm_event == StmEvtNoUndo) {
+ // nop
+ }
+ else {
+ g_stm_prv_state.layer[StmLayerNoApps].state = g_stm_crr_state.layer[StmLayerNoApps].state;
+ }
+ g_stm_crr_state.layer[StmLayerNoApps].changed = STM_FALSE;
+}
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/stm_master_apps.h b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/stm_master_apps.h
new file mode 100644
index 0000000..d10e56b
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/stm_master_apps.h
@@ -0,0 +1,11 @@
+extern void stm_mst_apl_start_activity_none();
+extern void stm_mst_apl_start_activity_meter_receiver();
+extern void stm_mst_apl_start_activity_meter_splitable();
+extern void stm_mst_apl_start_activity_splitable_receiver();
+extern void stm_mst_apl_start_activity_splitable_split();
+extern void stm_mst_apl_start_activity_general();
+extern void stm_mst_apl_start_activity_meter();
+extern void stm_mst_apl_event_lightstatus_brake_on();
+extern void stm_mst_apl_event_lightstatus_brake_off();
+extern void stm_master_apl_initialize_valiable();
+extern void stm_mst_apl_start_stm();
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/stm_master_remote.c b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/stm_master_remote.c
new file mode 100644
index 0000000..d63cba1
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/stm_master_remote.c
@@ -0,0 +1,29 @@
+#include "./StateTransitionor/ZST_include.h"
+
+void stm_mst_rmt_start_activity_none() {
+ g_stm_crr_state.layer[StmLayerNoRemote].state = StmLayoutNoNone;
+ g_stm_crr_state.layer[StmLayerNoRemote].changed = STM_TRUE;
+}
+
+void stm_mst_rmt_start_activity_tbt() {
+ g_stm_crr_state.layer[StmLayerNoRemote].state = StmLayoutNoRmtTbt;
+ g_stm_crr_state.layer[StmLayerNoRemote].changed = STM_TRUE;
+}
+
+void stm_mst_rmt_initialize_valiable() {
+ g_stm_prv_state.layer[StmLayerNoRemote].state = StmLayoutNoNone;
+ g_stm_prv_state.layer[StmLayerNoRemote].changed = STM_FALSE;
+
+ g_stm_crr_state.layer[StmLayerNoRemote].state = StmLayoutNoNone;
+ g_stm_crr_state.layer[StmLayerNoRemote].changed = STM_FALSE;
+}
+
+void stm_mst_rmt_start_stm() {
+ if (g_stm_event == StmEvtNoUndo) {
+ // nop
+ }
+ else {
+ g_stm_prv_state.layer[StmLayerNoRemote].state = g_stm_crr_state.layer[StmLayerNoRemote].state;
+ }
+ g_stm_crr_state.layer[StmLayerNoRemote].changed = STM_FALSE;
+}
diff --git a/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/stm_master_remote.h b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/stm_master_remote.h
new file mode 100644
index 0000000..45d77c7
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/policy_manager/stm/zipc/stm_master_remote.h
@@ -0,0 +1,4 @@
+extern void stm_mst_rmt_start_activity_none();
+extern void stm_mst_rmt_start_activity_tbt();
+extern void stm_mst_rmt_initialize_valiable();
+extern void stm_mst_rmt_start_stm();
diff --git a/demo#3/common/agl-service-windowmanager/protocol/ivi-wm.xml b/demo#3/common/agl-service-windowmanager/protocol/ivi-wm.xml
new file mode 100644
index 0000000..da45c7e
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/protocol/ivi-wm.xml
@@ -0,0 +1,608 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<protocol name="ivi_wm">
+
+ <copyright>
+ Copyright (C) 2017 Advanced Driver Information Technology Joint Venture GmbH
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+ </copyright>
+
+ <interface name="ivi_wm_screen" version="1">
+ <description summary="controller interface to screen in ivi compositor"/>
+
+ <request name="destroy" type="destructor">
+ <description summary="destroy ivi_wm_screen">
+ Request to destroy the ivi_wm_screen.
+ </description>
+ </request>
+
+ <request name="clear">
+ <description summary="remove all layers from screen render order">
+ A screen has no content assigned to itself, it is a container for layers.
+ This request removes all layers from the screen render order.
+ Note: the layers are not destroyed, they are just no longer contained by
+ the screen.
+ </description>
+ </request>
+
+ <request name="add_layer">
+ <description summary="add a layer to screen render order at nearest z-position">
+ A screen has no content assigned to itself, it is a container for layers.
+ This request adds a layers to the topmost position of the screen render order.
+ The added layer will cover all other layers of the screen.
+ </description>
+ <arg name="layer_id" type="uint"/>
+ </request>
+
+ <request name="remove_layer">
+ <description summary="remove a layer to screen render order">
+ A screen has no content assigned to itself, it is a container for layers.
+ This request removes a layer.
+ </description>
+ <arg name="layer_id" type="uint"/>
+ </request>
+
+ <request name="screenshot">
+ <description summary="take screenshot of screen">
+ An ivi_screenshot object is created which will receive the screenshot
+ data of the specified output.
+ </description>
+ <arg name="screenshot" type="new_id" interface="ivi_screenshot"/>
+ </request>
+
+ <request name="get">
+ <description summary="get a parameter of a screen in ivi compositor">
+ After this request, compositor sends the requested parameter.
+ </description>
+ <arg name="param" type="int"/>
+ </request>
+
+ <event name="screen_id">
+ <description summary="advertise server side id of the ivi-screen">
+ Sent immediately after creating the ivi_wm_screen object.
+ </description>
+ <arg name="id" type="uint"/>
+ </event>
+
+ <event name="layer_added">
+ <description summary="update render order of the screen">
+ A layer is added to the render order lisf of the screen
+ </description>
+ <arg name="layer_id" type="uint"/>
+ </event>
+
+ <event name="connector_name">
+ <description summary="advertise connector name of the corresponding output">
+ Sent immediately after creating the ivi_wm_screen object.
+ </description>
+ <arg name="process_name" type="string"/>
+ </event>
+
+ <enum name="error">
+ <entry name="no_layer" value="0"
+ summary="the layer with given id does not exist"/>
+ <entry name="no_screen" value="1"
+ summary="the output is already destroyed"/>
+ <entry name="bad_param" value="2"
+ summary="the given parameter is not valid"/>
+ </enum>
+
+ <event name="error">
+ <description summary="error event">
+ The error event is sent out when an error has occurred.
+ </description>
+ <arg name="error" type="uint" summary="error code"/>
+ <arg name="message" type="string" summary="error description"/>
+ </event>
+ </interface>
+
+ <interface name="ivi_screenshot" version="1">
+ <description summary="screenshot of an output or a surface">
+ An ivi_screenshot object receives a single "done" or "error" event.
+ The server will destroy this resource after the event has been send,
+ so the client shall then destroy its proxy too.
+ </description>
+
+ <event name="done">
+ <description summary="screenshot finished">
+ This event contains a filedescriptor for a file with raw image data.
+ Furthermore size, stride, format and timestamp of screenshot are
+ provided.
+ </description>
+ <arg name="fd" type="fd" summary="fd for file containing image data"/>
+ <arg name="width" type="int" summary="image width in pixels"/>
+ <arg name="height" type="int" summary="image height in pixels"/>
+ <arg name="stride" type="int" summary="number of bytes per pixel row"/>
+ <arg name="format" type="uint" summary="image format of type wl_shm.format"/>
+ <arg name="timestamp" type="uint" summary="timestamp in milliseconds"/>
+ </event>
+
+ <enum name="error">
+ <entry name="io_error" value="0"
+ summary="screenshot file could not be created"/>
+ <entry name="not_supported" value="1"
+ summary="screenshot can not be read"/>
+ <entry name="no_output" value="2"
+ summary="output has been destroyed"/>
+ <entry name="no_surface" value="3"
+ summary="surface has been destroyed"/>
+ <entry name="no_content" value="4"
+ summary="surface has no content"/>
+ </enum>
+
+ <event name="error">
+ <description summary="error event">
+ The error event is sent when the screenshot could not be created.
+ </description>
+ <arg name="error" type="uint" enum="error" summary="error code"/>
+ <arg name="message" type="string" summary="error description"/>
+ </event>
+ </interface>
+
+ <interface name="ivi_wm" version="1">
+ <description summary="interface for ivi managers to use ivi compositor features"/>
+
+ <request name="commit_changes">
+ <description summary="commit all changes requested by client">
+ All requests are not applied directly to scene object, so a controller
+ can set different properties and apply the changes all at once.
+ Note: there's an exception to this. Creation and destruction of
+ scene objects is executed immediately.
+ </description>
+ </request>
+
+ <request name="create_screen">
+ <description summary="create a screen in ivi-compositor">
+ Ask the ivi-wm to create a ivi-screen for given wl_output.
+ </description>
+ <arg name="output" type="object" interface="wl_output"/>
+ <arg name="id" type="new_id" interface="ivi_wm_screen" summary="the new ivi-screen"/>
+ </request>
+
+ <request name="set_surface_visibility">
+ <description summary="set the visibility of a surface in ivi compositor">
+ If visibility argument is 0, the surface in the ivi compositor is set to invisible.
+ If visibility argument is not 0, the surface in the ivi compositor is set to visible.
+ </description>
+ <arg name="surface_id" type="uint"/>
+ <arg name="visibility" type="uint"/>
+ </request>
+
+ <request name="set_layer_visibility">
+ <description summary="set visibility of layer in ivi compositor">
+ If visibility argument is 0, the layer in the ivi compositor is set to invisible.
+ If visibility argument is not 0, the layer in the ivi compositor is set to visible.
+ </description>
+ <arg name="layer_id" type="uint"/>
+ <arg name="visibility" type="uint"/>
+ </request>
+
+ <request name="set_surface_opacity">
+ <description summary="set the opacity of a surface in ivi compositor">
+ The valid range for opacity is 0.0 (fully transparent) to 1.0 (fully opaque).
+ </description>
+ <arg name="surface_id" type="uint"/>
+ <arg name="opacity" type="fixed"/>
+ </request>
+
+ <request name="set_layer_opacity">
+ <description summary="set opacity of layer in ivi compositor">
+ The valid range for opacity is 0.0 (fully transparent) to 1.0 (fully opaque).
+ </description>
+ <arg name="layer_id" type="uint"/>
+ <arg name="opacity" type="fixed"/>
+ </request>
+
+ <request name="set_surface_source_rectangle">
+ <description summary="set the scanout area of a surface in ivi compositor">
+ The source rectangle defines the part of the surface content, that is used for
+ compositing the surface. It can be used, if valid content of the surface is smaller
+ than the surface. Effectively it can be used to zoom the content of the surface.
+ If a parameter is less than 0, that value is not changed.
+ x: horizontal start position of scanout area within the surface
+ y: vertical start position of scanout area within the surface
+ width: width of scanout area within the surface
+ height: height of scanout area within the surface
+ </description>
+ <arg name="surface_id" type="uint"/>
+ <arg name="x" type="int"/>
+ <arg name="y" type="int"/>
+ <arg name="width" type="int"/>
+ <arg name="height" type="int"/>
+ </request>
+
+ <request name="set_layer_source_rectangle">
+ <description summary="set the scanout area of a layer in ivi compositor">
+ The source rectangle defines the part of the layer content, that is used for
+ compositing the screen. It can be used, if valid content of the layer is smaller
+ than the layer. Effectively it can be used to zoom the content of the layer.
+ If a parameter is less than 0, that value is not changed.
+ x: horizontal start position of scanout area within the layer
+ y: vertical start position of scanout area within the layer
+ width: width of scanout area within the layer
+ height: height of scanout area within the layer
+ </description>
+ <arg name="layer_id" type="uint"/>
+ <arg name="x" type="int"/>
+ <arg name="y" type="int"/>
+ <arg name="width" type="int"/>
+ <arg name="height" type="int"/>
+ </request>
+
+ <request name="set_surface_destination_rectangle">
+ <description summary="Set the destination area of a surface within a layer">
+ The destination rectangle defines the position and size of a surface on a layer.
+ The surface will be scaled to this rectangle for rendering.
+ If a parameter is less than 0, that value is not changed.
+ x: horizontal start position of surface within the layer
+ y: vertical start position of surface within the layer
+ width : width of surface within the layer
+ height: height of surface within the layer
+ </description>
+ <arg name="surface_id" type="uint"/>
+ <arg name="x" type="int"/>
+ <arg name="y" type="int"/>
+ <arg name="width" type="int"/>
+ <arg name="height" type="int"/>
+ </request>
+
+ <request name="set_layer_destination_rectangle">
+ <description summary="Set the destination area of a layer within a screen">
+ The destination rectangle defines the position and size of a layer on a screen.
+ The layer will be scaled to this rectangle for rendering.
+ If a parameter is less than 0, that value is not changed.
+ x: horizontal start position of layer within the screen
+ y: vertical start position of layer within the screen
+ width : width of surface within the screen
+ height: height of surface within the screen
+ </description>
+ <arg name="layer_id" type="uint"/>
+ <arg name="x" type="int"/>
+ <arg name="y" type="int"/>
+ <arg name="width" type="int"/>
+ <arg name="height" type="int"/>
+ </request>
+
+ <enum name="sync">
+ <description summary="sync request states">
+ </description>
+ <entry name="add" value="0"/>
+ <entry name="remove" value="1"/>
+ </enum>
+
+ <request name="surface_sync">
+ <description summary="request to synchronize of a surface in ivi compositor">
+ After this request, compositor sends the properties of the surface.
+ If sync_state argument is 0, compositor sends the properties continously.
+ If sync_state argument is not 0, compositor stops sending the properties
+ continously.
+ </description>
+ <arg name="surface_id" type="uint"/>
+ <arg name="sync_state" type="int"/>
+ </request>
+
+ <request name="layer_sync">
+ <description summary="request to synchronize of a layer in ivi compositor">
+ After this request, compositor sends the properties of the layer.
+ If sync_state argument is 0, compositor sends the properties continously.
+ If sync_state argument is not 0, compositor stops sending the properties
+ continously.
+ </description>
+ <arg name="layer_id" type="uint"/>
+ <arg name="sync_state" type="int"/>
+ </request>
+
+ <enum name="param" bitfield="true">
+ <description summary="parameter types">
+ The HMI controller can request different types of parameters of an
+ ivi-object.
+ </description>
+ <entry name="opacity" value="1"/>
+ <entry name="visibility" value="2"/>
+ <entry name="size" value="4"/>
+ <entry name="render_order" value="8"/>
+ </enum>
+
+ <request name="surface_get">
+ <description summary="get a parameter of an ivi_layout_surface in ivi compositor">
+ After this request, compositor sends the requested parameter.
+ </description>
+ <arg name="surface_id" type="uint"/>
+ <arg name="param" type="int"/>
+ </request>
+
+ <request name="layer_get">
+ <description summary="get a parameter of an ivi_layout_layer in ivi compositor">
+ After this request, compositor sends the requested parameter.
+ </description>
+ <arg name="layer_id" type="uint"/>
+ <arg name="param" type="int"/>
+ </request>
+
+ <request name="surface_screenshot">
+ <description summary="take screenshot of surface">
+ An ivi_screenshot object is created which will receive an image of the
+ buffer currently attached to the surface with the given id. If there
+ is no surface with such name the server will respond with an
+ ivi_screenshot.error event.
+ </description>
+ <arg name="screenshot" type="new_id" interface="ivi_screenshot"/>
+ <arg name="surface_id" type="uint"/>
+ </request>
+
+ <enum name="surface_type">
+ <description summary="hint for the compositor">
+ If a surface is restricted type, visible contents of the surface is strictly
+ controlled by the compositor. Its content is not allowed to be go out of
+ its destination region. If the application resizes its buffers or uses
+ wp_viewporter protocol to scale its contents, the old destination region
+ would causes visible glitches.
+ To avoid these issues, the controller process mark a surface as desktop
+ compatible. Source and destination regions of a desktop compatible
+ surface will be modified accordingly,when application sends a request
+ for resizing or scaling its contents. Therefore, applications contents
+ will be drawn according to application's wishes.
+ On the other hand, source and destination regions will be strictly
+ enforced, when the surface's type is restricted. The default type for
+ a surface is ivi.
+ </description>
+ <entry name="restricted" value="0" summary="strictly controlled"/>
+ <entry name="desktop" value="1" summary="free to resize and scale"/>
+ </enum>
+
+ <request name="set_surface_type">
+ <description summary="request to set a type for the surface in ivi compositor">
+ After this request, compositor changes the type of the surface.
+ </description>
+ <arg name="surface_id" type="uint"/>
+ <arg name="type" type="int"/>
+ </request>
+
+ <request name="layer_clear">
+ <description summary="remove all surfaces from layer render order">
+ A layer has no content assigned to itself, it is a container for surfaces.
+ This request removes all surfaces from the layer render order.
+ </description>
+ <arg name="layer_id" type="uint"/>
+ </request>
+
+ <request name="layer_add_surface">
+ <description summary="add a surface to layer render order at nearest z-position">
+ A layer has no content assigned to itself, it is a container for surfaces.
+ This request adds a surface to the topmost position of the layer render order.
+ The added surface will cover all other surfaces of the layer.
+ </description>
+ <arg name="layer_id" type="uint"/>
+ <arg name="surface_id" type="uint"/>
+ </request>
+
+ <request name="layer_remove_surface">
+ <description summary="remove a surface from layer render order">
+ A layer has no content assigned to itself, it is a container for surfaces.
+ This request removes one surfaces from the layer render order.
+ Note: the surface is not destroyed, it is just no longer contained by
+ the layer.
+ </description>
+ <arg name="layer_id" type="uint"/>
+ <arg name="surface_id" type="uint"/>
+ </request>
+
+ <request name="create_layout_layer">
+ <description summary="create an ivi_layout_layer in ivi compositor">
+ After this request, compositor creates an ivi_layout_layer
+ </description>
+ <arg name="layer_id" type="uint"/>
+ <arg name="width" type="int"/>
+ <arg name="height" type="int"/>
+ </request>
+
+ <request name="destroy_layout_layer">
+ <description summary="destroy an ivi_layout_layer in ivi compositor">
+ After this request, compositor destroyes an existing ivi_layout_layer.
+ </description>
+ <arg name="layer_id" type="uint"/>
+ </request>
+
+ <event name="surface_visibility">
+ <description summary="the visibility of the surface in ivi compositor has changed">
+ The new visibility state is provided in argument visibility.
+ If visibility is 0, the surface has become invisible.
+ If visibility is not 0, the surface has become visible.
+ </description>
+ <arg name="surface_id" type="uint"/>
+ <arg name="visibility" type="int"/>
+ </event>
+
+ <event name="layer_visibility">
+ <description summary="the visibility of the layer in ivi compositor has changed">
+ The new visibility state is provided in argument visibility.
+ If visibility is 0, the layer has become invisible.
+ If visibility is not 0, the layer has become visible.
+ </description>
+ <arg name="layer_id" type="uint"/>
+ <arg name="visibility" type="int"/>
+ </event>
+
+ <event name="surface_opacity">
+ <description summary="the opacity of surface in ivi compositor has changed">
+ The new opacity state is provided in argument opacity.
+ The valid range for opactiy is 0.0 (fully transparent) to 1.0 (fully opaque).
+ </description>
+ <arg name="surface_id" type="uint"/>
+ <arg name="opacity" type="fixed"/>
+ </event>
+
+ <event name="layer_opacity">
+ <description summary="the opacity of layer in ivi compositor has changed">
+ The new opacity state is provided in argument opacity.
+ The valid range for opactiy is 0.0 (fully transparent) to 1.0 (fully opaque).
+ </description>
+ <arg name="layer_id" type="uint"/>
+ <arg name="opacity" type="fixed"/>
+ </event>
+
+ <event name="surface_source_rectangle">
+ <description summary="the source rectangle of surface in ivi compositor has changed">
+ The scanout region of the surface content has changed.
+ The new values for source rectangle are provided by
+ x: new horizontal start position of scanout area within the surface
+ y: new vertical start position of scanout area within the surface
+ width: new width of scanout area within the surface
+ height: new height of scanout area within the surface
+ </description>
+ <arg name="surface_id" type="uint"/>
+ <arg name="x" type="int"/>
+ <arg name="y" type="int"/>
+ <arg name="width" type="int"/>
+ <arg name="height" type="int"/>
+ </event>
+
+ <event name="layer_source_rectangle">
+ <description summary="the source rectangle of layer in ivi compositor has changed">
+ The scanout region of the layer content has changed.
+ The new values for source rectangle are provided by
+ x: new horizontal start position of scanout area within the layer
+ y: new vertical start position of scanout area within the layer
+ width: new width of scanout area within the layer
+ height: new height of scanout area within the layer
+ </description>
+ <arg name="layer_id" type="uint"/>
+ <arg name="x" type="int"/>
+ <arg name="y" type="int"/>
+ <arg name="width" type="int"/>
+ <arg name="height" type="int"/>
+ </event>
+
+ <event name="surface_destination_rectangle">
+ <description summary="the destination rectangle of surface in ivi compositor has changed">
+ The new values for source rectangle are provided by
+ x: new horizontal start position of surface within the layer
+ y: new vertical start position of surface within the layer
+ width : new width of surface within the layer
+ height: new height of surface within the layer
+ </description>
+ <arg name="surface_id" type="uint"/>
+ <arg name="x" type="int"/>
+ <arg name="y" type="int"/>
+ <arg name="width" type="int"/>
+ <arg name="height" type="int"/>
+ </event>
+
+ <event name="layer_destination_rectangle">
+ <description summary="the destination rectangle of layer in ivi compositor has changed">
+ The new values for source rectangle are provided by
+ x: new horizontal start position of layer within the screen
+ y: new vertical start position of layer within the screen
+ width : new width of layer within the screen
+ height: new height of layer within the screen
+ </description>
+ <arg name="layer_id" type="uint"/>
+ <arg name="x" type="int"/>
+ <arg name="y" type="int"/>
+ <arg name="width" type="int"/>
+ <arg name="height" type="int"/>
+ </event>
+
+ <event name="surface_created">
+ <description summary="ivi_layout_surface was created"/>
+ <arg name="surface_id" type="uint"/>
+ </event>
+
+ <event name="layer_created">
+ <description summary="ivi_layout_layer was created"/>
+ <arg name="layer_id" type="uint"/>
+ </event>
+
+ <event name="surface_destroyed">
+ <description summary="ivi_layout_surface was destroyed"/>
+ <arg name="surface_id" type="uint"/>
+ </event>
+
+ <event name="layer_destroyed">
+ <description summary="ivi_layout_layer was destroyed"/>
+ <arg name="layer_id" type="uint"/>
+ </event>
+
+ <enum name="surface_error">
+ <entry name="no_surface" value="0"
+ summary="the surface with given id does not exist"/>
+ <entry name="bad_param" value="1"
+ summary="the given parameter is not valid"/>
+ <entry name="not_supported" value="2"
+ summary="the request is not supported"/>
+ </enum>
+
+ <event name="surface_error">
+ <description summary="error event">
+ The error event is sent out when an error has occurred.
+ </description>
+ <arg name="object_id" type="uint" summary="id of a layer or surface"/>
+ <arg name="error" type="uint" summary="error code"/>
+ <arg name="message" type="string" summary="error description"/>
+ </event>
+
+ <enum name="layer_error">
+ <entry name="no_surface" value="0"
+ summary="the surface with given id does not exist"/>
+ <entry name="no_layer" value="1"
+ summary="the layer with given id does not exist"/>
+ <entry name="bad_param" value="2"
+ summary="the given parameter is not valid"/>
+ </enum>
+
+ <event name="layer_error">
+ <description summary="error event">
+ The error event is sent out when an error has occurred.
+ </description>
+ <arg name="object_id" type="uint" summary="id of a layer or surface"/>
+ <arg name="error" type="uint" summary="error code"/>
+ <arg name="message" type="string" summary="error description"/>
+ </event>
+
+ <event name="surface_size">
+ <description summary="the surface size in ivi compositor has changed">
+ The client providing content for this surface modified size of the surface.
+ The modified surface size is provided by arguments width and height.
+ </description>
+ <arg name="surface_id" type="uint"/>
+ <arg name="width" type="int"/>
+ <arg name="height" type="int"/>
+ </event>
+
+ <event name="surface_stats">
+ <description summary="receive updated statistics for surface in ivi compositor">
+ The information contained in this event is essential for monitoring, debugging,
+ logging and tracing support in IVI systems.
+ </description>
+ <arg name="surface_id" type="uint"/>
+ <arg name="frame_count" type="uint"/>
+ <arg name="pid" type="uint"/>
+ </event>
+
+ <event name="layer_surface_added">
+ <description summary="update render order of the layer">
+ A surface is added to the render order of the layer
+ </description>
+ <arg name="layer_id" type="uint"/>
+ <arg name="surface_id" type="uint"/>
+ </event>
+ </interface>
+
+</protocol>
+
diff --git a/demo#3/common/agl-service-windowmanager/src/CMakeLists.txt b/demo#3/common/agl-service-windowmanager/src/CMakeLists.txt
new file mode 100644
index 0000000..9fa4b73
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/src/CMakeLists.txt
@@ -0,0 +1,124 @@
+#
+# Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+include(FindPkgConfig)
+pkg_check_modules(AFB REQUIRED afb-daemon)
+pkg_check_modules(ILM REQUIRED ilmControl ilmCommon)
+pkg_check_modules(SD REQUIRED libsystemd>=222)
+
+# We do not want a prefix for our module
+set(CMAKE_SHARED_MODULE_PREFIX "")
+
+set(TARGETS_WM windowmanager-service)
+
+add_library(${TARGETS_WM} MODULE
+ main.cpp
+ util.cpp
+ json_helper.cpp
+ applist.cpp
+ request.cpp
+ pm_wrapper.cpp
+ window_manager.cpp
+ wm_client.cpp
+ wm_error.cpp
+ wm_layer.cpp
+ wm_layer_control.cpp
+ wm_connection.cpp
+ low_can_client.cpp)
+
+target_include_directories(${TARGETS_WM}
+ PRIVATE
+ ${AFB_INCLUDE_DIRS}
+ ${SD_INCLUDE_DIRS}
+ ${ILM_INCLUDE_DIRS}
+ ../include
+ ../src
+ ../${PLUGIN_PM})
+
+target_link_libraries(${TARGETS_WM}
+ PRIVATE
+ ${AFB_LIBRARIES}
+ ${WLC_LIBRARIES}
+ ${ILM_LIBRARIES}
+ ${SD_LIBRARIES}
+ ${PLUGIN_PM})
+
+target_compile_definitions(${TARGETS_WM}
+ PRIVATE
+ AFB_BINDING_VERSION=2
+ # We do not want source location of messages
+ AFB_BINDING_PRAGMA_NO_VERBOSE_DETAILS
+ WINMAN_VERSION_STRING="${PACKAGE_VERSION}"
+ _GNU_SOURCE)
+
+if(NOT ${CMAKE_BUILD_TYPE} STREQUAL "Release")
+ target_compile_definitions(${TARGETS_WM}
+ PRIVATE
+ _GLIBCXX_DEBUG)
+endif()
+
+target_compile_options(${TARGETS_WM}
+ PRIVATE
+ -Wall -Wextra -Wno-unused-parameter -Wno-comment)
+
+set_target_properties(${TARGETS_WM}
+ PROPERTIES
+ # INTERPROCEDURAL_OPTIMIZATION ON
+
+ CXX_EXTENSIONS OFF
+ CXX_STANDARD 14
+ CXX_STANDARD_REQUIRED ON
+
+ C_EXTENSIONS OFF
+ C_STANDARD 99
+ C_STANDARD_REQUIRED ON
+
+ LINK_FLAGS "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/../export.map -Wl,-rpath,'$ORIGIN'")
+
+if (LINK_LIBCXX)
+ set_target_properties(${TARGETS_WM}
+ PROPERTIES
+ LINK_FLAGS "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/../export.map -lc++ -Wl,-rpath,'$ORIGIN'")
+endif()
+
+if (NOT ${SANITIZER_MODE} STREQUAL "none" AND NOT ${SANITIZER_MODE} STREQUAL "")
+ target_compile_options(${TARGETS_WM}
+ PRIVATE
+ -fsanitize=${SANITIZER_MODE} -g -fno-omit-frame-pointer)
+ set_target_properties(${TARGETS_WM}
+ PROPERTIES
+ LINK_FLAGS "-fsanitize=${SANITIZER_MODE} -g")
+endif()
+
+if(NOT EXISTS ${PROJECT_BINARY_DIR}/package)
+ add_custom_command(TARGET ${TARGETS_WM} POST_BUILD
+ COMMAND cp -rf ${PROJECT_SOURCE_DIR}/package ${PROJECT_BINARY_DIR}
+ )
+endif()
+
+add_custom_command(TARGET ${TARGETS_WM} POST_BUILD
+ COMMAND mkdir -p ${PROJECT_BINARY_DIR}/package/root/lib
+ COMMAND cp -rf ${PROJECT_BINARY_DIR}/src/${TARGETS_WM}.so ${PROJECT_BINARY_DIR}/package/root/lib
+ COMMAND mkdir -p ${PROJECT_BINARY_DIR}/package/root/etc
+ COMMAND cp -f ${PROJECT_SOURCE_DIR}/layers_setting.json ${PROJECT_BINARY_DIR}/package/root/etc
+ COMMAND cp -f ${PROJECT_SOURCE_DIR}/src/config/old_roles.json ${PROJECT_BINARY_DIR}/package/root/etc
+ COMMAND cp -f ${PROJECT_SOURCE_DIR}/src/config/areas.json ${PROJECT_BINARY_DIR}/package/root/etc
+ COMMAND cp -f ${PROJECT_SOURCE_DIR}/src/config/connection.json ${PROJECT_BINARY_DIR}/package/root/etc
+)
+
+add_custom_target(package DEPENDS ${PROJECT_BINARY_DIR}/package/root
+ COMMAND wgtpkg-pack -f -o ${PROJECT_BINARY_DIR}/package/${TARGETS_WM}-2017.wgt ${PROJECT_BINARY_DIR}/package/root
+)
diff --git a/demo#3/common/agl-service-windowmanager/src/applist.cpp b/demo#3/common/agl-service-windowmanager/src/applist.cpp
new file mode 100644
index 0000000..44865f6
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/src/applist.cpp
@@ -0,0 +1,635 @@
+/*
+ * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include <iostream>
+#include <algorithm>
+#include "applist.hpp"
+#include "util.hpp"
+
+using std::shared_ptr;
+using std::string;
+using std::vector;
+
+namespace wm
+{
+
+const static int kReserveClientSize = 100;
+const static int kReserveReqSize = 10;
+
+/**
+ * AppList Constructor.
+ *
+ * Reserve the container size to avoid re-allocating memory.
+ *
+ * @note Size should be changed according to the system.
+ * If the number of applications becomes over the size, re-allocating memory will happen.
+ */
+AppList::AppList()
+ : req_list(),
+ app2client(),
+ current_req(1)
+{
+ this->app2client.reserve(kReserveClientSize);
+ this->req_list.reserve(kReserveReqSize);
+}
+
+AppList::~AppList() {}
+
+// =================== Client Date container API ===================
+
+/**
+ * Add Client to the list
+ *
+ * Add Client to the list.
+ * The Client means application which has role, layer, surface
+ * This function should be called once for the app.
+ * Caller should take care not to be called more than once.
+ *
+ * @param string[in] Application id. This will be the key to withdraw the information.
+ * @param unsigned[in] Layer ID in which the application is
+ * @param unsigned[in] surface ID which the application has
+ * @param string[in] Role which means what behavior the application will do.
+ * @return None
+ * @attention This function should be called once for the app
+ * Caller should take care not to be called more than once.
+ */
+void AppList::addClient(const string &appid, unsigned layer, unsigned surface, const string &role)
+{
+ std::lock_guard<std::mutex> lock(this->mtx);
+ shared_ptr<WMClient> client = std::make_shared<WMClient>(appid, layer, surface, role);
+ this->app2client[appid] = client;
+ this->clientDump();
+}
+
+void AppList::addClient(const string &appid, unsigned layer, const string &role)
+{
+ std::lock_guard<std::mutex> lock(this->mtx);
+ shared_ptr<WMClient> client = std::make_shared<WMClient>(appid, layer, role);
+ this->app2client[appid] = client;
+ this->clientDump();
+}
+
+/**
+ * Remove WMClient from the list
+ *
+ * @param string[in] Application id. This will be the key to withdraw the information.
+ */
+void AppList::removeClient(const string &appid)
+{
+ std::lock_guard<std::mutex> lock(this->mtx);
+ this->app2client.erase(appid);
+ HMI_INFO("Remove client %s", appid.c_str());
+}
+
+/**
+ * Check this class stores the appid.
+ *
+ * @param string[in] Application id. This will be the key to withdraw the information.
+ * @return true if the class has the requested key(appid)
+ */
+bool AppList::contains(const string &appid) const
+{
+ auto result = this->app2client.find(appid);
+ return (this->app2client.end() != result) ? true : false;
+}
+
+/**
+ * Remove surface from client
+ *
+ * @param unsigned[in] surface id.
+ * @return None
+ */
+void AppList::removeSurface(unsigned surface){
+ // This function may be very slow
+ std::lock_guard<std::mutex> lock(this->mtx);
+ bool ret = false;
+ for (auto &x : this->app2client)
+ {
+ ret = x.second->removeSurfaceIfExist(surface);
+ if(ret){
+ HMI_DEBUG("remove surface %d from Client %s finish",
+ surface, x.second->appID().c_str());
+ break;
+ }
+ }
+
+}
+
+/**
+ * Get WMClient object.
+ *
+ * After get the WMClient object, caller can call the client method.
+ * Before call this function, caller must call "contains"
+ * to check the key is contained, otherwise, you have to take care of std::out_of_range.
+ *
+ * @param string[in] application id(key)
+ * @return WMClient object
+ * @attention Must call cantains to check appid is stored before this function.
+ */
+shared_ptr<WMClient> AppList::lookUpClient(const string &appid)
+{
+ if(this->app2client.count(appid) != 0)
+ {
+ return this->app2client.at(appid);
+ }
+ else
+ {
+ return nullptr;
+ }
+}
+
+/**
+ * Count Client.
+ *
+ * Returns the number of client stored in the list.
+ *
+ * @param None
+ * @return The number of client
+ */
+int AppList::countClient() const
+{
+ return this->app2client.size();
+}
+
+/**
+ * Get AppID with surface and role.
+ *
+ * Returns AppID if found.
+ *
+ * @param unsigned[in] surfaceID
+ * @param string[in] role
+ * @param bool[in,out] AppID is found or not
+ * @return AppID
+ * @attention If AppID is not found, param found will be false.
+ */
+/* string AppList::getAppID(unsigned surface, const string& role, bool* found) const
+{
+ *found = false;
+ for (const auto &x : this->app2client)
+ {
+ if(x.second->surfaceID(role) == surface){
+ *found = true;
+ return x.second->appID();
+ }
+ }
+ return string("");
+} */
+
+string AppList::getAppID(unsigned surface, bool* found) const
+{
+ *found = false;
+ for (const auto &x : this->app2client)
+ {
+ if(x.second->surfaceID() == surface){
+ *found = true;
+ return x.second->appID();
+ }
+ }
+ return string("");
+}
+
+WMError AppList::popFloatingSurface(unsigned pid, unsigned *surface)
+{
+ WMError ret = WMError::NO_ENTRY;
+
+ auto fwd_itr = std::remove_if(this->floating_surfaces.begin(), this->floating_surfaces.end(),
+ [pid, surface, &ret](FloatingSurface x) {
+ if(pid == x.pid){
+ *surface = x.surface_id;
+ ret = WMError::SUCCESS;
+ return true;
+ }
+ else{
+ return false;
+ }
+ });
+ if (fwd_itr != this->floating_surfaces.cend())
+ {
+ HMI_INFO("pop floating surface: %d", *surface);
+ }
+ this->floating_surfaces.erase(fwd_itr, this->floating_surfaces.end());
+ return ret;
+}
+
+// =================== Floating(Temporary) surface/client API ===================
+
+// TODO: After testing setRole, remove these API
+
+WMError AppList::popFloatingSurface(const string &appid, unsigned *surface)
+{
+ HMI_ERROR("This function is not implemented");
+ return WMError::SUCCESS;
+}
+
+void AppList::addFloatingClient(const string &appid, unsigned layer, const string &role)
+{
+}
+
+void AppList::addFloatingSurface(const string &appid, unsigned surface, unsigned pid)
+{
+ struct FloatingSurface fsurface{appid, surface, pid};
+ this->floating_surfaces.push_back(fsurface);
+ this->dumpFloatingSurfaces();
+}
+
+void AppList::removeFloatingSurface(unsigned surface)
+{
+ this->dumpFloatingSurfaces();
+ auto fwd_itr = std::remove_if(
+ this->floating_surfaces.begin(), this->floating_surfaces.end(),
+ [surface](FloatingSurface x) {
+ return x.surface_id == surface;
+ });
+ if(fwd_itr != this->floating_surfaces.cend()){
+ HMI_INFO("remove floating surface: %d", surface);
+ }
+ this->floating_surfaces.erase(fwd_itr, this->floating_surfaces.end());
+}
+
+// =================== Request Date container API ===================
+
+/**
+ * Get current request number
+ *
+ * Request number is the numeric ID to designate the request.
+ * But returned request number from this function doesn't mean the request exists.
+ * This number is used as key to withdraw the WMRequest object.
+ *
+ * @param None
+ * @return current request number.
+ * @note request number is more than 0.
+ */
+unsigned AppList::currentRequestNumber() const
+{
+ return this->current_req;
+}
+
+/**
+ * Get request number
+ *
+ * Request number is the numeric ID to designate the request.
+ * But returned request number from this function doesn't mean the request exists.
+ * This number is used as key to withdraw the WMRequest object.
+ *
+ * @param None
+ * @return request number.
+ * @attention If returned value is 0, no request exists.
+ */
+unsigned AppList::getRequestNumber(const string &appid) const
+{
+ for (const auto &x : this->req_list)
+ {
+ // Since app will not request twice and more, comparing appid is enough?
+ if ((x.trigger.appid == appid))
+ {
+ return x.req_num;
+ }
+ }
+ return 0;
+}
+
+/**
+ * Add Request
+ *
+ * Request number is the numeric ID to designate the request.
+ * But returned request number from this function doesn't mean the request exists.
+ * This number is used as key to withdraw the WMRequest object.
+ *
+ * @param WMRequest[in] WMRequest object caller creates
+ * @return Request number
+ * @attention If the request number is different with curent request number,
+ * it means the previous request is not finished.
+ */
+unsigned AppList::addRequest(WMRequest req)
+{
+ std::lock_guard<std::mutex> lock(this->mtx);
+ if (this->req_list.size() == 0)
+ {
+ req.req_num = current_req;
+ }
+ else
+ {
+ HMI_SEQ_INFO(this->current_req, "add: %d", this->req_list.back().req_num + 1);
+ req.req_num = this->req_list.back().req_num + 1;
+ }
+ this->req_list.push_back(req);
+ return req.req_num;
+}
+
+/**
+ * Get trigger which the application requests
+ *
+ * WMTrigger contains which application requests what role and where to put(area) and task.
+ * This is used for input event to Window Policy Manager(state machine).
+ *
+ * @param unsigned[in] request number
+ * @param bool[in,out] Check request number of the parameter is valid.
+ * @return WMTrigger which associates with the request number
+ * @attention If the request number is not valid, parameter "found" is false
+ * and return value will be meaningless value.
+ * Caller can check the request parameter is valid.
+ */
+struct WMTrigger AppList::getRequest(unsigned req_num, bool *found)
+{
+ *found = false;
+ for (const auto &x : this->req_list)
+ {
+ if (req_num == x.req_num)
+ {
+ *found = true;
+ return x.trigger;
+ }
+ }
+ HMI_SEQ_ERROR(req_num, "Couldn't get request : %d", req_num);
+ return WMTrigger{"", "", "", Task::TASK_INVALID};
+}
+
+/**
+ * Get actions which the application requests
+ *
+ * WMAciton contains the information of state transition.
+ * In other words, it contains actions of Window Manager,
+ * which role should be put to the area.
+ *
+ * @param unsigned[in] request number
+ * @param bool[in,out] Check request number of the parameter is valid.
+ * @return WMTrigger which associates with the request number
+ * @attention If the request number is not valid, parameter "found" is false
+ * and return value will be no reference pointer.
+ * Caller must check the request parameter is valid.
+ */
+const vector<struct WMAction> &AppList::getActions(unsigned req_num, bool* found)
+{
+ *found = false;
+ for (auto &x : this->req_list)
+ {
+ if (req_num == x.req_num)
+ {
+ *found = true;
+ return x.sync_draw_req;
+ }
+ }
+ HMI_SEQ_ERROR(req_num, "Couldn't get action with the request : %d", req_num);
+}
+
+/**
+ * Set actions to the request.
+ *
+ * Add actions to the request.
+ * This function can be called many times, and actions increase.
+ * This function is used for decision of actions of Window Manager
+ * according to the result of Window Policy Manager.
+ *
+ * @param unsigned[in] request number
+ * @param WMAction[in] Action of Window Manager.
+ * @return WMError If request number is not valid, FAIL will be returned.
+ */
+WMError AppList::setAction(unsigned req_num, const struct WMAction &action)
+{
+ std::lock_guard<std::mutex> lock(this->mtx);
+ WMError result = WMError::FAIL;
+ for (auto &x : this->req_list)
+ {
+ if (req_num != x.req_num)
+ {
+ continue;
+ }
+ x.sync_draw_req.push_back(action);
+ result = WMError::SUCCESS;
+ break;
+ }
+ return result;
+}
+
+/**
+ * Note:
+ * @note This function set action with parameters.
+ * If visible is true, it means app should be visible, so enddraw_finished parameter should be false.
+ * otherwise (visible is false) app should be invisible. Then enddraw_finished param is set to true.
+ * This function doesn't support actions for focus yet.
+ */
+/**
+ * Set actions to the request.
+ *
+ * This function is overload function.
+ * The feature is same as other one.
+ *
+ * @param unsigned[in] request number
+ * @param string[in] application id
+ * @param string[in] role
+ * @param string[in] area
+ * @param Task[in] the role should be visible or not.
+ * @return WMError If request number is not valid, FAIL will be returned.
+ * @attention This function set action with parameters, then caller doesn't need to create WMAction object.
+ * If visible is true, it means app should be visible, so enddraw_finished parameter will be false.
+ * otherwise (visible is false) app should be invisible. Then enddraw_finished param is set to true.
+ * This function doesn't support actions for focus yet.
+ */
+WMError AppList::setAction(unsigned req_num, shared_ptr<WMClient> client, const string &role, const string &area, TaskVisible visible)
+{
+ std::lock_guard<std::mutex> lock(this->mtx);
+ WMError result = WMError::FAIL;
+ for (auto &x : req_list)
+ {
+ if (req_num != x.req_num)
+ {
+ continue;
+ }
+ // If visible task is not invisible, redraw is required -> true
+ bool edraw_f = (visible != TaskVisible::INVISIBLE) ? false : true;
+ WMAction action{req_num, client, role, area, visible, edraw_f, TaskCarState::NO_TASK};
+
+ x.sync_draw_req.push_back(action);
+ result = WMError::SUCCESS;
+ break;
+ }
+ return result;
+}
+
+/**
+ * Set end_draw_finished param is true
+ *
+ * This function checks
+ * - req_num is equal to current request number
+ * - appid and role are equeal to the appid and role stored in action list
+ * If it is valid, set the action is finished.
+ *
+ * @param unsigned[in] request number
+ * @param string[in] application id
+ * @param string[in] role
+ * @return If the parameters are not valid in action list, returns false
+ */
+bool AppList::setEndDrawFinished(unsigned req_num, const string &appid, const string &role)
+{
+ std::lock_guard<std::mutex> lock(this->mtx);
+ bool result = false;
+ for (auto &x : req_list)
+ {
+ if (req_num < x.req_num)
+ {
+ break;
+ }
+ if (req_num == x.req_num)
+ {
+ for (auto &y : x.sync_draw_req)
+ {
+ if (nullptr != y.client)
+ {
+ if (y.client->appID() == appid && y.role == role)
+ {
+ HMI_SEQ_INFO(req_num, "Role %s finish redraw", y.role.c_str());
+ y.end_draw_finished = true;
+ result = true;
+ }
+ }
+ else
+ {
+ if (y.role == role)
+ {
+ HMI_SEQ_INFO(req_num, "Role %s finish redraw", y.role.c_str());
+ y.end_draw_finished = true;
+ result = true;
+ }
+ }
+ }
+ }
+ }
+ this->reqDump();
+ return result;
+}
+
+/**
+ * Check all actions of the requested sequence is finished
+ *
+ * @param unsigned[in] request_number
+ * @return true if all action is set.
+ */
+bool AppList::endDrawFullfilled(unsigned req_num)
+{
+ bool result = false;
+ for (const auto &x : req_list)
+ {
+ if (req_num < x.req_num)
+ {
+ break;
+ }
+ if (req_num == x.req_num)
+ {
+ result = true;
+ for (const auto &y : x.sync_draw_req)
+ {
+ result &= y.end_draw_finished;
+ if (!result)
+ {
+ break;
+ }
+ }
+ }
+ }
+ return result;
+}
+
+/**
+ * Finish the request, then remove it.
+ *
+ * @param unsigned[in] request_number
+ * @return None
+ * @note Please call next after this function to receive or process next request.
+ */
+void AppList::removeRequest(unsigned req_num)
+{
+ std::lock_guard<std::mutex> lock(this->mtx);
+ this->req_list.erase(remove_if(this->req_list.begin(), this->req_list.end(),
+ [req_num](WMRequest x) {
+ return x.req_num == req_num;
+ }));
+}
+
+/**
+ * Move the current request to next
+ *
+ * @param None
+ * @return None
+ */
+void AppList::next()
+{
+ std::lock_guard<std::mutex> lock(this->mtx);
+ ++this->current_req;
+ if (0 == this->current_req)
+ {
+ this->current_req = 1;
+ }
+}
+
+/**
+ * Check the request exists is in request list
+ *
+ * @param None
+ * @return true if WMRequest exists in the request list
+ */
+bool AppList::haveRequest() const
+{
+ return !this->req_list.empty();
+}
+
+void AppList::clientDump()
+{
+ DUMP("======= client dump =====");
+ for (const auto &x : this->app2client)
+ {
+ const auto &y = x.second;
+ y->dumpInfo();
+ }
+ DUMP("======= client dump end=====");
+}
+
+void AppList::reqDump()
+{
+ DUMP("======= req dump =====");
+ DUMP("current request : %d", current_req);
+ for (const auto &x : req_list)
+ {
+ DUMP("requested : %d", x.req_num);
+ DUMP("Trigger : (APPID :%s, ROLE :%s, AREA :%s, TASK: %d)",
+ x.trigger.appid.c_str(),
+ x.trigger.role.c_str(),
+ x.trigger.area.c_str(),
+ x.trigger.task);
+
+ for (const auto &y : x.sync_draw_req)
+ {
+ DUMP(
+ "Action : (APPID :%s, ROLE :%s, AREA :%s, VISIBLE : %s, END_DRAW_FINISHED: %d)",
+ (y.client) ? y.client->appID().c_str() : "-",
+ y.role.c_str(),
+ y.area.c_str(),
+ (y.visible == TaskVisible::INVISIBLE) ? "invisible" : "visible",
+ y.end_draw_finished);
+ }
+ }
+ DUMP("======= req dump end =====");
+}
+
+void AppList::dumpFloatingSurfaces()
+{
+ DUMP("======= floating surface dump =====");
+ for (const auto &x : this->floating_surfaces)
+ {
+ DUMP("surface : %d, pid : %d", x.surface_id, x.pid);
+ }
+ DUMP("======= floating surface dump end =====\n");
+}
+
+} // namespace wm
diff --git a/demo#3/common/agl-service-windowmanager/src/applist.hpp b/demo#3/common/agl-service-windowmanager/src/applist.hpp
new file mode 100644
index 0000000..36e0524
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/src/applist.hpp
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ALLOCATE_LIST_HPP
+#define ALLOCATE_LIST_HPP
+#include <vector>
+#include <string>
+#include <map>
+#include <memory>
+#include <mutex>
+#include "wm_client.hpp"
+#include "request.hpp"
+#include "wm_error.hpp"
+
+namespace wm
+{
+
+/* using std::experimental::nullopt;
+using std::experimental::optional; */
+
+struct FloatingSurface
+{
+ std::string appid;
+ unsigned surface_id;
+ unsigned pid;
+};
+
+class AppList
+{
+ public:
+ AppList();
+ virtual ~AppList();
+ AppList(const AppList &obj) = delete;
+
+ // Client Database Interface
+ /* TODO: consider, which is better WMClient as parameter or not
+ If the WMClient should be more flexible, I think this param should be WMClient class
+ */
+ void addClient(const std::string &appid, unsigned layer,
+ unsigned surface, const std::string &role);
+ void addClient(const std::string &appid, unsigned layer, const std::string &role);
+ void removeClient(const std::string &appid);
+ bool contains(const std::string &appid) const;
+ int countClient() const;
+ std::shared_ptr<WMClient> lookUpClient(const std::string &appid);
+ void removeSurface(unsigned surface);
+ std::string getAppID(unsigned surface, bool* found) const; // TODO: remove
+
+
+ // Floating surface
+ void addFloatingClient(const std::string &appid, unsigned layer, const std::string &role);
+ void addFloatingSurface(const std::string &appid, unsigned surface, unsigned pid);
+ WMError popFloatingSurface(unsigned pid, unsigned *surface);
+ WMError popFloatingSurface(const std::string &appid, unsigned *surface);
+ void removeFloatingSurface(unsigned surface);
+
+ // Request Interface
+ unsigned currentRequestNumber() const;
+ unsigned getRequestNumber(const std::string &appid) const;
+ unsigned addRequest(WMRequest req);
+ WMError setAction(unsigned req_num, const struct WMAction &action);
+ WMError setAction(unsigned req_num, std::shared_ptr<WMClient> client,
+ const std::string &role, const std::string &area, TaskVisible visible);
+ bool setEndDrawFinished(unsigned req_num, const std::string &appid, const std::string &role);
+ bool endDrawFullfilled(unsigned req_num);
+ void removeRequest(unsigned req_num);
+ void next();
+ bool haveRequest() const;
+
+ struct WMTrigger getRequest(unsigned req_num, bool* found);
+ const std::vector<struct WMAction> &getActions(unsigned req_num, bool* found);
+
+ void clientDump();
+ void reqDump();
+ void dumpFloatingSurfaces();
+
+ private:
+ std::vector<WMRequest> req_list;
+ std::unordered_map<std::string, std::shared_ptr<WMClient>> app2client;
+ unsigned current_req;
+ std::mutex mtx;
+ std::vector<struct FloatingSurface> floating_surfaces;
+};
+
+} // namespace wm
+#endif // ALLOCATE_LIST_HPP \ No newline at end of file
diff --git a/demo#3/common/agl-service-windowmanager/src/config/areas.json b/demo#3/common/agl-service-windowmanager/src/config/areas.json
new file mode 100644
index 0000000..d4f3531
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/src/config/areas.json
@@ -0,0 +1,204 @@
+{
+ "ecus": [
+ {
+ "name": "master",
+ "screens": [
+ {
+ "id": 0,
+ "areas": [
+ {
+ "name": "fullscreen",
+ "rect": {
+ "x": 0,
+ "y": 0,
+ "w": 1920,
+ "h": 720
+ }
+ },
+ {
+ "name": "normal.full",
+ "rect": {
+ "x": 0,
+ "y": 0,
+ "w": 1920,
+ "h": 720
+ }
+ },
+ {
+ "name": "split.main",
+ "rect": {
+ "x": 0,
+ "y": 0,
+ "w": 1280,
+ "h": 720
+ }
+ },
+ {
+ "name": "split.sub",
+ "rect": {
+ "x": 1280,
+ "y": 0,
+ "w": 640,
+ "h": 720
+ }
+ },
+ {
+ "name": "software_keyboard",
+ "rect": {
+ "x": 0,
+ "y": 962,
+ "w": 1080,
+ "h": 744
+ }
+ },
+ {
+ "name": "restriction.normal",
+ "rect": {
+ "x": 0,
+ "y": 0,
+ "w": 1920,
+ "h": 1080
+ }
+ },
+ {
+ "name": "restriction.split.main",
+ "rect": {
+ "x": 0,
+ "y": 0,
+ "w": 1920,
+ "h": 540
+ }
+ },
+ {
+ "name": "restriction.split.sub",
+ "rect": {
+ "x": 0,
+ "y": 540,
+ "w": 1920,
+ "h": 540
+ }
+ },
+ {
+ "name": "on_screen",
+ "rect": {
+ "x": 1280,
+ "y": 0,
+ "w": 640,
+ "h": 720
+ }
+ },
+ {
+ "name": "master.split.sub",
+ "rect": {
+ "x": 1280,
+ "y": 0,
+ "w": 640,
+ "h": 720
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "slave",
+ "screens": [
+ {
+ "id": 0,
+ "areas": [
+ {
+ "name": "fullscreen",
+ "rect": {
+ "x": 0,
+ "y": 0,
+ "w": 1080,
+ "h": 1920
+ }
+ },
+ {
+ "name": "normal.full",
+ "rect": {
+ "x": 0,
+ "y": 218,
+ "w": 1080,
+ "h": 1488
+ }
+ },
+ {
+ "name": "split.main",
+ "rect": {
+ "x": 0,
+ "y": 218,
+ "w": 1080,
+ "h": 744
+ }
+ },
+ {
+ "name": "split.sub",
+ "rect": {
+ "x": 0,
+ "y": 962,
+ "w": 1080,
+ "h": 744
+ }
+ },
+ {
+ "name": "software_keyboard",
+ "rect": {
+ "x": 0,
+ "y": 962,
+ "w": 1080,
+ "h": 744
+ }
+ },
+ {
+ "name": "restriction.normal",
+ "rect": {
+ "x": 0,
+ "y": 218,
+ "w": 1080,
+ "h": 1488
+ }
+ },
+ {
+ "name": "restriction.split.main",
+ "rect": {
+ "x": 0,
+ "y": 218,
+ "w": 1080,
+ "h": 744
+ }
+ },
+ {
+ "name": "restriction.split.sub",
+ "rect": {
+ "x": 0,
+ "y": 962,
+ "w": 1080,
+ "h": 744
+ }
+ },
+ {
+ "name": "on_screen",
+ "rect": {
+ "x": 0,
+ "y": 218,
+ "w": 1080,
+ "h": 1488
+ }
+ },
+ {
+ "name": "master.split.sub",
+ "rect": {
+ "x": 0,
+ "y": 180,
+ "w": 640,
+ "h": 720
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
diff --git a/demo#3/common/agl-service-windowmanager/src/config/connection.json b/demo#3/common/agl-service-windowmanager/src/config/connection.json
new file mode 100644
index 0000000..3ee06c3
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/src/config/connection.json
@@ -0,0 +1,5 @@
+{
+ "mode": "master",
+ "master_ip": "10.4.1.78",
+ "master_port": 54400
+}
diff --git a/demo#3/common/agl-service-windowmanager/src/config/old_roles.json b/demo#3/common/agl-service-windowmanager/src/config/old_roles.json
new file mode 100644
index 0000000..02a4c2d
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/src/config/old_roles.json
@@ -0,0 +1,68 @@
+{
+ "old_roles": [
+ {
+ "name": "HomeScreen",
+ "new": "homescreen"
+ },
+ {
+ "name": "Music",
+ "new": "music"
+ },
+ {
+ "name": "MediaPlayer",
+ "new": "music"
+ },
+ {
+ "name": "Video",
+ "new": "video"
+ },
+ {
+ "name": "VideoPlayer",
+ "new": "video"
+ },
+ {
+ "name": "WebBrowser",
+ "new": "browser"
+ },
+ {
+ "name": "Radio",
+ "new": "radio"
+ },
+ {
+ "name": "Phone",
+ "new": "phone"
+ },
+ {
+ "name": "Navigation",
+ "new": "map"
+ },
+ {
+ "name": "HVAC",
+ "new": "hvac"
+ },
+ {
+ "name": "Settings",
+ "new": "settings"
+ },
+ {
+ "name": "Dashboard",
+ "new": "dashboard"
+ },
+ {
+ "name": "POI",
+ "new": "poi"
+ },
+ {
+ "name": "Mixer",
+ "new": "mixer"
+ },
+ {
+ "name": "Restriction",
+ "new": "restriction"
+ },
+ {
+ "name": "^OnScreen.*",
+ "new": "on_screen"
+ }
+ ]
+}
diff --git a/demo#3/common/agl-service-windowmanager/src/controller_hooks.hpp b/demo#3/common/agl-service-windowmanager/src/controller_hooks.hpp
new file mode 100644
index 0000000..ae88187
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/src/controller_hooks.hpp
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef TMCAGLWM_CONTROLLER_HOOKS_HPP
+#define TMCAGLWM_CONTROLLER_HOOKS_HPP
+
+#include <cstdint>
+
+#include <functional>
+
+namespace wm
+{
+
+class WindowManager;
+
+struct controller_hooks
+{
+ WindowManager *wmgr;
+
+ void surface_created(uint32_t surface_id);
+ void surface_removed(uint32_t surface_id);
+ void surface_visibility(uint32_t surface_id, uint32_t v);
+ void surface_destination_rectangle(uint32_t surface_id, uint32_t x, uint32_t y, uint32_t w, uint32_t h);
+ void surface_properties(uint32_t surface_id, uint32_t pid);
+};
+
+} // namespace wm
+
+#endif // TMCAGLWM_CONTROLLER_HOOKS_HPP
diff --git a/demo#3/common/agl-service-windowmanager/src/json_helper.cpp b/demo#3/common/agl-service-windowmanager/src/json_helper.cpp
new file mode 100644
index 0000000..d9cf5eb
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/src/json_helper.cpp
@@ -0,0 +1,149 @@
+/*
+ * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "json_helper.hpp"
+#include "util.hpp"
+
+template <typename T>
+json_object *to_json_(T const &s)
+{
+ auto a = json_object_new_array();
+
+ if (!s.empty())
+ {
+ for (auto const &i : s)
+ {
+ json_object_array_add(a, to_json(i.second));
+ }
+ }
+
+ return a;
+}
+
+json_object *to_json(std::vector<uint32_t> const &v)
+{
+ auto a = json_object_new_array();
+ for (const auto i : v)
+ {
+ json_object_array_add(a, json_object_new_int(i));
+ }
+ return a;
+}
+
+namespace jh {
+
+const char* getStringFromJson(json_object* obj, const char* key)
+{
+ json_object* tmp;
+ if (!json_object_object_get_ex(obj, key, &tmp))
+ {
+ HMI_DEBUG("Not found key \"%s\"", key);
+ return nullptr;
+ }
+
+ return json_object_get_string(tmp);
+}
+
+int getIntFromJson(json_object *obj, const char *key)
+{
+ json_object *tmp;
+ if (!json_object_object_get_ex(obj, key, &tmp))
+ {
+ HMI_DEBUG("Not found key \"%s\"", key);
+ return 0;
+ }
+
+ return json_object_get_int(tmp);
+}
+
+double getDoubleFromJson(json_object *obj, const char *key)
+{
+ json_object *tmp;
+ if (!json_object_object_get_ex(obj, key, &tmp))
+ {
+ HMI_DEBUG("Not found key \"%s\"", key);
+ return 0;
+ }
+
+ return json_object_get_double(tmp);
+}
+
+json_bool getBoolFromJson(json_object *obj, const char *key)
+{
+ json_object *tmp;
+ if (!json_object_object_get_ex(obj, key, &tmp))
+ {
+ HMI_DEBUG("Not found key \"%s\"", key);
+ return FALSE;
+ }
+
+ return json_object_get_boolean(tmp);
+}
+
+int inputJsonFilie(const char* file, json_object** obj)
+{
+ const int input_size = 128;
+ int ret = -1;
+
+ HMI_DEBUG("Input file: %s", file);
+
+ // Open json file
+ FILE *fp = fopen(file, "rb");
+ if (nullptr == fp)
+ {
+ HMI_ERROR("Could not open file");
+ return ret;
+ }
+
+ // Parse file data
+ struct json_tokener *tokener = json_tokener_new();
+ enum json_tokener_error json_error;
+ char buffer[input_size];
+ int block_cnt = 1;
+ while (1)
+ {
+ size_t len = fread(buffer, sizeof(char), input_size, fp);
+ *obj = json_tokener_parse_ex(tokener, buffer, len);
+ if (nullptr != *obj)
+ {
+ HMI_DEBUG("File input is success");
+ ret = 0;
+ break;
+ }
+
+ json_error = json_tokener_get_error(tokener);
+ if ((json_tokener_continue != json_error)
+ || (input_size > len))
+ {
+ HMI_ERROR("Failed to parse file (byte:%d err:%s)",
+ (input_size * block_cnt), json_tokener_error_desc(json_error));
+ HMI_ERROR("\n%s", buffer);
+ *obj = nullptr;
+ break;
+ }
+ block_cnt++;
+ }
+
+ // Close json file
+ fclose(fp);
+
+ // Free json_tokener
+ json_tokener_free(tokener);
+
+ return ret;
+}
+
+} // namespace jh
diff --git a/demo#3/common/agl-service-windowmanager/src/json_helper.hpp b/demo#3/common/agl-service-windowmanager/src/json_helper.hpp
new file mode 100644
index 0000000..d4ae85a
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/src/json_helper.hpp
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef JSON_HELPER_HPP
+#define JSON_HELPER_HPP
+
+#include <json-c/json.h>
+#include <vector>
+
+struct json_object;
+json_object *to_json(std::vector<uint32_t> const &v);
+
+namespace jh {
+const char* getStringFromJson(json_object* obj, const char* key);
+int getIntFromJson(json_object *obj, const char *key);
+double getDoubleFromJson(json_object *obj, const char *key);
+json_bool getBoolFromJson(json_object *obj, const char *key);
+int inputJsonFilie(const char* file, json_object** obj);
+} // namespace jh
+
+#endif // JSON_HELPER_HPP
diff --git a/demo#3/common/agl-service-windowmanager/src/layers.cpp b/demo#3/common/agl-service-windowmanager/src/layers.cpp
new file mode 100644
index 0000000..05d404d
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/src/layers.cpp
@@ -0,0 +1,382 @@
+/*
+ * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <regex>
+
+#include "layers.hpp"
+#include "json_helper.hpp"
+#include "util.hpp"
+
+namespace wm
+{
+
+using json = nlohmann::json;
+
+layer::layer(nlohmann::json const &j)
+{
+ this->role = j["role"];
+ this->name = j["name"];
+ this->layer_id = j["layer_id"];
+
+ // Init flag of normal layout only
+ this->is_normal_layout_only = true;
+
+ auto split_layouts = j.find("split_layouts");
+ if (split_layouts != j.end())
+ {
+
+ // Clear flag of normal layout only
+ this->is_normal_layout_only = false;
+
+ auto &sls = j["split_layouts"];
+ // this->layouts.reserve(sls.size());
+ std::transform(std::cbegin(sls), std::cend(sls),
+ std::back_inserter(this->layouts), [this](json const &sl) {
+ struct split_layout l
+ {
+ sl["name"], sl["main_match"], sl["sub_match"]
+ };
+ HMI_DEBUG("wm",
+ "layer %d add split_layout \"%s\" (main: \"%s\") (sub: "
+ "\"%s\")",
+ this->layer_id,
+ l.name.c_str(), l.main_match.c_str(),
+ l.sub_match.c_str());
+ return l;
+ });
+ }
+ HMI_DEBUG("layer_id:%d is_normal_layout_only:%d\n",
+ this->layer_id, this->is_normal_layout_only);
+}
+
+struct result<struct layer_map> to_layer_map(nlohmann::json const &j)
+{
+ try
+ {
+ layer_map stl{};
+ auto m = j["mappings"];
+
+ std::transform(std::cbegin(m), std::cend(m),
+ std::inserter(stl.mapping, stl.mapping.end()),
+ [](nlohmann::json const &j) {
+ return std::pair<int, struct layer>(
+ j.value("layer_id", -1), layer(j));
+ });
+
+ // TODO: add sanity checks here?
+ // * check for double IDs
+ // * check for double names/roles
+
+ stl.layers.reserve(m.size());
+ std::transform(std::cbegin(stl.mapping), std::cend(stl.mapping),
+ std::back_inserter(stl.layers),
+ [&stl](std::pair<int, struct layer> const &k) {
+ stl.roles.emplace_back(
+ std::make_pair(k.second.role, k.second.layer_id));
+ return unsigned(k.second.layer_id);
+ });
+
+ std::sort(stl.layers.begin(), stl.layers.end());
+
+ for (auto i : stl.mapping)
+ {
+ if (i.second.name.empty())
+ {
+ return Err<struct layer_map>("Found mapping w/o name");
+ }
+ if (i.second.layer_id == -1)
+ {
+ return Err<struct layer_map>("Found invalid/unset IDs in mapping");
+ }
+ }
+
+ auto msi = j.find("main_surface");
+ if (msi != j.end())
+ {
+ stl.main_surface_name = msi->value("surface_role", "");
+ stl.main_surface = -1;
+ }
+
+ return Ok(stl);
+ }
+ catch (std::exception &e)
+ {
+ return Err<struct layer_map>(e.what());
+ }
+}
+
+optional<int>
+layer_map::get_layer_id(int surface_id)
+{
+ auto i = this->surfaces.find(surface_id);
+ if (i != this->surfaces.end())
+ {
+ return optional<int>(i->second);
+ }
+ return nullopt;
+}
+
+optional<int> layer_map::get_layer_id(std::string const &role)
+{
+ for (auto const &r : this->roles)
+ {
+ auto re = std::regex(r.first);
+ if (std::regex_match(role, re))
+ {
+ HMI_DEBUG("role %s matches layer %d", role.c_str(), r.second);
+ return optional<int>(r.second);
+ }
+ }
+ HMI_DEBUG("role %s does NOT match any layer", role.c_str());
+ return nullopt;
+}
+
+json layer::to_json() const
+{
+ auto is_full = this->rect == compositor::full_rect;
+
+ json r{};
+ if (is_full)
+ {
+ r = {{"type", "full"}};
+ }
+ else
+ {
+ r = {{"type", "rect"},
+ {"rect",
+ {{"x", this->rect.x},
+ {"y", this->rect.y},
+ {"width", this->rect.w},
+ {"height", this->rect.h}}}};
+ }
+
+ return {
+ {"name", this->name},
+ {"role", this->role},
+ {"layer_id", this->layer_id},
+ {"area", r},
+ };
+}
+
+json layer_map::to_json() const
+{
+ json j{};
+ for (auto const &i : this->mapping)
+ {
+ j.push_back(i.second.to_json());
+ }
+ return j;
+}
+
+void layer_map::setupArea(double scaling)
+{
+ compositor::rect rct;
+
+ rct = this->area2size["normal.full"];
+ this->area2size["normalfull"] = rct;
+ this->area2size["normal"] = rct;
+
+ for (auto &i : this->area2size)
+ {
+ i.second.x = static_cast<int>(scaling * i.second.x + 0.5);
+ i.second.y = static_cast<int>(scaling * i.second.y + 0.5);
+ i.second.w = static_cast<int>(scaling * i.second.w + 0.5);
+ i.second.h = static_cast<int>(scaling * i.second.h + 0.5);
+
+ HMI_DEBUG("wm:lm", "area:%s size(after) : x:%d y:%d w:%d h:%d",
+ i.first.c_str(), i.second.x, i.second.y, i.second.w, i.second.h);
+ }
+}
+
+compositor::rect layer_map::getAreaSize(const std::string &area)
+{
+ return area2size[area];
+}
+
+int layer_map::loadAreaDb()
+{
+ HMI_DEBUG("wm:lm", "Call");
+
+ // Get afm application installed dir
+ char const *afm_app_install_dir = getenv("AFM_APP_INSTALL_DIR");
+ HMI_DEBUG("wm:lm", "afm_app_install_dir:%s", afm_app_install_dir);
+
+ std::string file_name;
+ if (!afm_app_install_dir)
+ {
+ HMI_ERROR("wm:lm", "AFM_APP_INSTALL_DIR is not defined");
+ }
+ else
+ {
+ file_name = std::string(afm_app_install_dir) + std::string("/etc/areas.db");
+ }
+
+ // Load area.db
+ json_object *json_obj;
+ int ret = jh::inputJsonFilie(file_name.c_str(), &json_obj);
+ if (0 > ret)
+ {
+ HMI_DEBUG("wm:lm", "Could not open area.db, so use default area information");
+ json_obj = json_tokener_parse(kDefaultAreaDb);
+ }
+ HMI_DEBUG("wm:lm", "json_obj dump:%s", json_object_get_string(json_obj));
+
+ // Perse areas
+ HMI_DEBUG("wm:lm", "Perse areas");
+ json_object *json_cfg;
+ if (!json_object_object_get_ex(json_obj, "areas", &json_cfg))
+ {
+ HMI_ERROR("wm:lm", "Parse Error!!");
+ return -1;
+ }
+
+ int len = json_object_array_length(json_cfg);
+ HMI_DEBUG("wm:lm", "json_cfg len:%d", len);
+ HMI_DEBUG("wm:lm", "json_cfg dump:%s", json_object_get_string(json_cfg));
+
+ const char *area;
+ for (int i = 0; i < len; i++)
+ {
+ json_object *json_tmp = json_object_array_get_idx(json_cfg, i);
+ HMI_DEBUG("wm:lm", "> json_tmp dump:%s", json_object_get_string(json_tmp));
+
+ area = jh::getStringFromJson(json_tmp, "name");
+ if (nullptr == area)
+ {
+ HMI_ERROR("wm:lm", "Parse Error!!");
+ return -1;
+ }
+ HMI_DEBUG("wm:lm", "> area:%s", area);
+
+ json_object *json_rect;
+ if (!json_object_object_get_ex(json_tmp, "rect", &json_rect))
+ {
+ HMI_ERROR("wm:lm", "Parse Error!!");
+ return -1;
+ }
+ HMI_DEBUG("wm:lm", "> json_rect dump:%s", json_object_get_string(json_rect));
+
+ compositor::rect area_size;
+ area_size.x = jh::getIntFromJson(json_rect, "x");
+ area_size.y = jh::getIntFromJson(json_rect, "y");
+ area_size.w = jh::getIntFromJson(json_rect, "w");
+ area_size.h = jh::getIntFromJson(json_rect, "h");
+
+ this->area2size[area] = area_size;
+ }
+
+ // Check
+ for (auto itr = this->area2size.begin();
+ itr != this->area2size.end(); ++itr)
+ {
+ HMI_DEBUG("wm:lm", "area:%s x:%d y:%d w:%d h:%d",
+ itr->first.c_str(), itr->second.x, itr->second.y,
+ itr->second.w, itr->second.h);
+ }
+
+ // Release json_object
+ json_object_put(json_obj);
+
+ return 0;
+}
+
+const char* layer_map::kDefaultAreaDb = "{ \
+ \"areas\": [ \
+ { \
+ \"name\": \"fullscreen\", \
+ \"rect\": { \
+ \"x\": 0, \
+ \"y\": 0, \
+ \"w\": 1080, \
+ \"h\": 1920 \
+ } \
+ }, \
+ { \
+ \"name\": \"normal.full\", \
+ \"rect\": { \
+ \"x\": 0, \
+ \"y\": 218, \
+ \"w\": 1080, \
+ \"h\": 1488 \
+ } \
+ }, \
+ { \
+ \"name\": \"split.main\", \
+ \"rect\": { \
+ \"x\": 0, \
+ \"y\": 218, \
+ \"w\": 1080, \
+ \"h\": 744 \
+ } \
+ }, \
+ { \
+ \"name\": \"split.sub\", \
+ \"rect\": { \
+ \"x\": 0, \
+ \"y\": 962, \
+ \"w\": 1080, \
+ \"h\": 744 \
+ } \
+ }, \
+ { \
+ \"name\": \"software_keyboard\", \
+ \"rect\": { \
+ \"x\": 0, \
+ \"y\": 962, \
+ \"w\": 1080, \
+ \"h\": 744 \
+ } \
+ }, \
+ { \
+ \"name\": \"restriction.normal\", \
+ \"rect\": { \
+ \"x\": 0, \
+ \"y\": 218, \
+ \"w\": 1080, \
+ \"h\": 1488 \
+ } \
+ }, \
+ { \
+ \"name\": \"restriction.split.main\", \
+ \"rect\": { \
+ \"x\": 0, \
+ \"y\": 218, \
+ \"w\": 1080, \
+ \"h\": 744 \
+ } \
+ }, \
+ { \
+ \"name\": \"restriction.split.sub\", \
+ \"rect\": { \
+ \"x\": 0, \
+ \"y\": 962, \
+ \"w\": 1080, \
+ \"h\": 744 \
+ } \
+ }, \
+ { \
+ \"name\": \"on_screen\", \
+ \"rect\": { \
+ \"x\": 0, \
+ \"y\": 218, \
+ \"w\": 1080, \
+ \"h\": 1488 \
+ } \
+ } \
+ ] \
+}";
+
+} // namespace wm
diff --git a/demo#3/common/agl-service-windowmanager/src/layers.hpp b/demo#3/common/agl-service-windowmanager/src/layers.hpp
new file mode 100644
index 0000000..f52886e
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/src/layers.hpp
@@ -0,0 +1,174 @@
+/*
+ * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef TMCAGLWM_LAYERS_H
+#define TMCAGLWM_LAYERS_H
+
+#include <string>
+
+#include "../include/json.hpp"
+#include "layout.hpp"
+#include "result.hpp"
+#include "wayland_ivi_wm.hpp"
+
+namespace wm
+{
+
+struct split_layout
+{
+ std::string name;
+ std::string main_match;
+ std::string sub_match;
+};
+
+struct layer
+{
+ using json = nlohmann::json;
+
+ // A more or less descriptive name?
+ std::string name = "";
+ // The actual layer ID
+ int layer_id = -1;
+ // The rectangular region surfaces are allowed to draw on
+ // this layer, note however, width and hieght of the rect
+ // can be negative, in which case they specify that
+ // the actual value is computed using MAX + 1 - w
+ // That is; allow us to specify dimensions dependent on
+ // e.g. screen dimension, w/o knowing the actual screen size.
+ compositor::rect rect;
+ // Specify a role prefix for surfaces that should be
+ // put on this layer.
+ std::string role;
+ // TODO: perhaps a zorder is needed here?
+ std::vector<struct split_layout> layouts;
+
+ mutable struct LayoutState state;
+
+ // Flag of normal layout only
+ bool is_normal_layout_only;
+
+ explicit layer(nlohmann::json const &j);
+
+ json to_json() const;
+};
+
+struct layer_map
+{
+ using json = nlohmann::json;
+
+ using storage_type = std::map<int, struct layer>;
+ using layers_type = std::vector<uint32_t>;
+ using role_to_layer_map = std::vector<std::pair<std::string, int>>;
+ using addsurf_layer_map = std::map<int, int>;
+
+ storage_type mapping; // map surface_id to layer
+ layers_type layers; // the actual layer IDs we have
+ int main_surface;
+ std::string main_surface_name;
+ role_to_layer_map roles;
+ addsurf_layer_map surfaces; // additional surfaces on layers
+
+ optional<int> get_layer_id(int surface_id);
+ optional<int> get_layer_id(std::string const &role);
+ optional<struct LayoutState *> get_layout_state(int surface_id)
+ {
+ int layer_id = *this->get_layer_id(surface_id);
+ auto i = this->mapping.find(layer_id);
+ return i == this->mapping.end()
+ ? nullopt
+ : optional<struct LayoutState *>(&i->second.state);
+ }
+ optional<struct layer> get_layer(int layer_id)
+ {
+ auto i = this->mapping.find(layer_id);
+ return i == this->mapping.end() ? nullopt
+ : optional<struct layer>(i->second);
+ }
+
+ layers_type::size_type get_layers_count() const
+ {
+ return this->layers.size();
+ }
+
+ void add_surface(int surface_id, int layer_id)
+ {
+ this->surfaces[surface_id] = layer_id;
+ }
+
+ void remove_surface(int surface_id)
+ {
+ this->surfaces.erase(surface_id);
+ }
+
+ json to_json() const;
+ void setupArea(double scaling);
+ compositor::rect getAreaSize(const std::string &area);
+ int loadAreaDb();
+
+ private:
+ std::unordered_map<std::string, compositor::rect> area2size;
+
+ static const char *kDefaultAreaDb;
+};
+
+struct result<struct layer_map> to_layer_map(nlohmann::json const &j);
+
+static const nlohmann::json default_layers_json = {
+ {"main_surface", {
+ {"surface_role", "HomeScreen"}
+ }},
+ {"mappings", {
+ {
+ {"role", "^HomeScreen$"},
+ {"name", "HomeScreen"},
+ {"layer_id", 1000},
+ {"area", {
+ {"type", "full"}
+ }}
+ },
+ {
+ {"role", "MediaPlayer|Radio|Phone|Navigation|HVAC|Settings|Dashboard|POI|Mixer"},
+ {"name", "apps"},
+ {"layer_id", 1001},
+ {"area", {
+ {"type", "rect"},
+ {"rect", {
+ {"x", 0},
+ {"y", 218},
+ {"width", -1},
+ {"height", -433}
+ }}
+ }}
+ },
+ {
+ {"role", "^OnScreen.*"},
+ {"name", "popups"},
+ {"layer_id", 9999},
+ {"area", {
+ {"type", "rect"},
+ {"rect", {
+ {"x", 0},
+ {"y", 760},
+ {"width", -1},
+ {"height", 400}
+ }}
+ }}
+ }
+ }}
+};
+} // namespace wm
+
+#endif // TMCAGLWM_LAYERS_H
diff --git a/demo#3/common/agl-service-windowmanager/src/low_can_client.cpp b/demo#3/common/agl-service-windowmanager/src/low_can_client.cpp
new file mode 100644
index 0000000..090aa14
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/src/low_can_client.cpp
@@ -0,0 +1,187 @@
+/*
+ * Copyright (c) 2018 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "low_can_client.hpp"
+#include "json_helper.hpp"
+#include "util.hpp"
+
+extern "C"
+{
+#include <afb/afb-binding.h>
+}
+
+namespace wm
+{
+
+LowCanClient::LowCanClient()
+ : vehicle_speed(0),
+ trans_gear_pos(0),
+ headlamp_status(FALSE),
+ parking_brake_status(TRUE),
+ accel_pedal_pos(0),
+ accel_pedal_stt(FALSE),
+ lightstatus_brake_status(TRUE),
+ is_changed_accel_pedal_stt(false)
+{
+}
+
+void LowCanClient::initialize()
+{
+ int ret;
+
+ // Require API "low-can"
+ ret = afb_daemon_require_api_v2("low-can", 1);
+ if (0 > ret)
+ {
+ HMI_INFO("Requirement API \"low-can\" failed");
+ return;
+ }
+
+ // Subscribe low-level-can
+ // low-can subscribe { "event": "vehicle.speed" }
+ // low-can subscribe { "event": "transmission_gear_position" }
+ // low-can subscribe { "event": "headlamp_status" }
+ // low-can subscribe { "event": "parking_brake_status" }
+ // low-can subscribe { "event": "accelerator.pedal.position" }
+ // low-can subscribe { "event": "lightstatus.brake" }
+ for (int i = SignalNoMin; i <= SignalNoMax; i++)
+ {
+ // Set Event
+ json_object *json_obj = json_object_new_object();
+ json_object_object_add(json_obj, "event",
+ json_object_new_string(this->kSignalName[i]));
+
+ // Set filter
+ if (0 != strcmp("", this->kFilterValue[i]))
+ {
+ json_object_object_add(json_obj, "filter",
+ json_tokener_parse(this->kFilterValue[i]));
+ }
+ HMI_DEBUG("subscribe message:%s", json_object_get_string(json_obj));
+
+ // Subscribe
+ afb_service_call("low-can", "subscribe", json_obj,
+ [](void *closure, int status, json_object *result) {
+ HMI_DEBUG("subscribe result:%s", json_object_get_string(result));
+ },
+ nullptr);
+ }
+
+ return;
+}
+
+const char *LowCanClient::analyzeCanSignal(struct json_object *object)
+{
+ HMI_DEBUG("object:%s", json_object_get_string(object));
+
+ const char *name = jh::getStringFromJson(object, "name");
+ HMI_DEBUG("CAN signal name:%s", name);
+
+ if (strstr(name, this->kSignalName[SignalNoVehicliSpeed]))
+ {
+ // Update vehicle speed
+ this->vehicle_speed = jh::getIntFromJson(object, "value");
+ HMI_DEBUG("Update vehicle speed:%d", this->vehicle_speed);
+ }
+ else if (strstr(name, this->kSignalName[SignalNoTransGearPos]))
+ {
+ // Update transmission gear position
+ this->trans_gear_pos = jh::getIntFromJson(object, "value");
+ HMI_DEBUG("Update transmission gear position:%d", this->trans_gear_pos);
+ }
+ else if (strstr(name, this->kSignalName[SignalNoHeadlame]))
+ {
+ // Update headlamp status
+ this->headlamp_status = jh::getBoolFromJson(object, "value");
+ HMI_DEBUG("Update headlamp status:%d", this->headlamp_status);
+ }
+ else if (strstr(name, this->kSignalName[SignalNoParkingBrake]))
+ {
+ // Update parking gear status
+ this->parking_brake_status = jh::getBoolFromJson(object, "value");
+ HMI_DEBUG("Update parking brake status:%d", this->parking_brake_status);
+ }
+ else if (strstr(name, this->kSignalName[SignalNoAccelPedalPos]))
+ {
+ // Clear flag for whether accel pedal state is changed
+ this->is_changed_accel_pedal_stt = false;
+
+ // Update accelerator pedal status
+ this->accel_pedal_pos = jh::getDoubleFromJson(object, "value");
+ HMI_DEBUG("Update accelerator pedal position:%lf", this->accel_pedal_pos);
+
+ bool accel_pedal_stt;
+ if (0 != this->accel_pedal_pos)
+ {
+ accel_pedal_stt = true;
+ }
+ else
+ {
+ accel_pedal_stt = false;
+ }
+
+ if (accel_pedal_stt != this->accel_pedal_stt)
+ {
+ this->is_changed_accel_pedal_stt = true;
+ this->accel_pedal_stt = accel_pedal_stt;
+ }
+ }
+ else if (strstr(name, this->kSignalName[SignalNoLightstatusBrake]))
+ {
+ // Update lightstatus brake status
+ this->lightstatus_brake_status = jh::getBoolFromJson(object, "value");
+ HMI_DEBUG("Update lightstatus brake status:%d", this->lightstatus_brake_status);
+ }
+
+ return name;
+}
+
+bool LowCanClient::isChangedAccelPedalState()
+{
+ return this->is_changed_accel_pedal_stt;
+}
+
+int LowCanClient::getCurrentTransGearState()
+{
+ return this->trans_gear_pos;
+}
+
+bool LowCanClient::getCurrentHeadlampState()
+{
+ return (bool)this->headlamp_status;
+}
+
+bool LowCanClient::getCurrentParkingBrakeState()
+{
+ return (bool)this->parking_brake_status;
+}
+
+double LowCanClient::getCurrentAccelPedalPosition()
+{
+ return this->accel_pedal_pos;
+}
+
+bool LowCanClient::getCurrentAccelPedalState()
+{
+ return this->accel_pedal_stt;
+}
+
+bool LowCanClient::getCurrentLightstatusBrakeState()
+{
+ return (bool)this->lightstatus_brake_status;
+}
+
+} // namespace wm
diff --git a/demo#3/common/agl-service-windowmanager/src/low_can_client.hpp b/demo#3/common/agl-service-windowmanager/src/low_can_client.hpp
new file mode 100644
index 0000000..9b7f509
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/src/low_can_client.hpp
@@ -0,0 +1,113 @@
+/*
+ * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef TMCAGLWM_LOW_CAN_CLIENT_HPP
+#define TMCAGLWM_LOW_CAN_CLIENT_HPP
+
+#include <string>
+#include <vector>
+#include <json-c/json.h>
+
+namespace wm
+{
+
+class LowCanClient
+{
+
+ public:
+ explicit LowCanClient();
+ ~LowCanClient() = default;
+
+ enum SignalNo
+ {
+ SignalNoVehicliSpeed = 0,
+ SignalNoTransGearPos,
+ SignalNoHeadlame,
+ SignalNoParkingBrake,
+ SignalNoAccelPedalPos,
+ SignalNoLightstatusBrake,
+
+ SignalNum,
+
+ SignalNoMin = SignalNoVehicliSpeed,
+ SignalNoMax = SignalNum - 1,
+ };
+
+ const std::vector<const char *> kSignalName{
+ "vehicle.speed",
+ "transmission_gear_position",
+ "headlamp_status",
+ "parking_brake_status",
+ "accelerator.pedal.position",
+ "lightstatus.brake",
+ };
+
+ void initialize();
+ const char *analyzeCanSignal(struct json_object *object);
+
+ int getCurrentTransGearState();
+ bool getCurrentHeadlampState();
+ bool getCurrentParkingBrakeState();
+ double getCurrentAccelPedalPosition();
+ bool getCurrentAccelPedalState();
+ bool getCurrentLightstatusBrakeState();
+
+ bool isChangedAccelPedalState();
+
+ private:
+ // Disable copy and move
+ LowCanClient(LowCanClient const &) = delete;
+ LowCanClient &operator=(LowCanClient const &) = delete;
+ LowCanClient(LowCanClient &&) = delete;
+ LowCanClient &operator=(LowCanClient &&) = delete;
+
+ enum TransGearPosVal
+ {
+ TransGearPosValD1 = 1,
+ TransGearPosValD2,
+ TransGearPosValD3,
+ TransGearPosValD4,
+ TransGearPosValD5,
+ TransGearPosValD6,
+ TransGearPosValD7,
+ TransGearPosValD8,
+ TransGearPosValR,
+ TransGearPosValN,
+ };
+
+ const std::vector<const char *> kFilterValue{
+ "", // vehicle.speed
+ "", // transmission_gear_position
+ "", // headlamp_status
+ "", // parking_brake_status
+ "", // accelerator.pedal.position
+ "", // lightstatus.brake
+ };
+
+ int vehicle_speed;
+ int trans_gear_pos;
+ json_bool headlamp_status;
+ json_bool parking_brake_status;
+ double accel_pedal_pos;
+ bool accel_pedal_stt;
+ json_bool lightstatus_brake_status;
+
+ bool is_changed_accel_pedal_stt;
+};
+
+} // namespace wm
+
+#endif // TMCAGLWM_LOW_CAN_CLIENT_HPP
diff --git a/demo#3/common/agl-service-windowmanager/src/main.cpp b/demo#3/common/agl-service-windowmanager/src/main.cpp
new file mode 100644
index 0000000..3766152
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/src/main.cpp
@@ -0,0 +1,844 @@
+/*
+ * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <unistd.h>
+#include <algorithm>
+#include <mutex>
+#include <json.h>
+#include <stdlib.h>
+#include <vector>
+#include "window_manager.hpp"
+#include "json_helper.hpp"
+
+extern "C"
+{
+#include <afb/afb-binding.h>
+#include <systemd/sd-event.h>
+}
+
+typedef struct WMClientCtxt
+{
+ std::string name;
+ std::string role;
+ WMClientCtxt(const char *appName, const char* appRole)
+ {
+ name = appName;
+ role = appRole;
+ }
+} WMClientCtxt;
+
+struct afb_instance
+{
+ wm::WindowManager wmgr;
+
+ afb_instance() : wmgr() {}
+ ~afb_instance() = default;
+
+ int init();
+};
+
+struct afb_instance *g_afb_instance;
+std::mutex binding_m;
+
+int afb_instance::init()
+{
+ return this->wmgr.init();
+}
+
+int _binding_init()
+{
+ HMI_NOTICE("WinMan ver. %s", WINMAN_VERSION_STRING);
+
+ g_afb_instance = new afb_instance;
+
+ if (g_afb_instance->init() == -1)
+ {
+ HMI_ERROR("Could not connect to compositor");
+ goto error;
+ }
+
+ atexit([] { delete g_afb_instance; });
+
+ return 0;
+
+error:
+ delete g_afb_instance;
+ g_afb_instance = nullptr;
+ return -1;
+}
+
+int binding_init() noexcept
+{
+ try
+ {
+ return _binding_init();
+ }
+ catch (std::exception &e)
+ {
+ HMI_ERROR("Uncaught exception in binding_init(): %s", e.what());
+ }
+ return -1;
+}
+
+static void cbRemoveClientCtxt(void *data)
+{
+ WMClientCtxt *ctxt = (WMClientCtxt *)data;
+ if (ctxt == nullptr)
+ {
+ return;
+ }
+ HMI_DEBUG("remove app %s", ctxt->name.c_str());
+
+ // Policy Manager does not know this app was killed,
+ // so notify it by deactivate request.
+ g_afb_instance->wmgr.api_deactivate_surface(
+ ctxt->name.c_str(), ctxt->role.c_str(),
+ [](const char *) {});
+
+ g_afb_instance->wmgr.removeClient(ctxt->name);
+ delete ctxt;
+}
+
+static void createSecurityContext(afb_req req, const char* appid, const char* role)
+{
+ WMClientCtxt *ctxt = (WMClientCtxt *)afb_req_context_get(req);
+ if (!ctxt)
+ {
+ // Create Security Context at first time
+ const char *new_role = g_afb_instance->wmgr.convertRoleOldToNew(role);
+ WMClientCtxt *ctxt = new WMClientCtxt(appid, new_role);
+ HMI_DEBUG("create session for %s", ctxt->name.c_str());
+ afb_req_session_set_LOA(req, 1);
+ afb_req_context_set(req, ctxt, cbRemoveClientCtxt);
+ }
+}
+
+void windowmanager_requestsurface(afb_req req) noexcept
+{
+ std::lock_guard<std::mutex> guard(binding_m);
+
+ if (g_afb_instance == nullptr)
+ {
+ afb_req_fail(req, "failed", "Binding not initialized, did the compositor die?");
+ return;
+ }
+
+ try
+ {
+ const char *a_drawing_name = afb_req_value(req, "drawing_name");
+ if (!a_drawing_name)
+ {
+ afb_req_fail(req, "failed", "Need char const* argument drawing_name");
+ return;
+ }
+
+ char *appid = afb_req_get_application_id(req);
+ if(appid)
+ {
+ auto ret = g_afb_instance->wmgr.api_request_surface(
+ appid, a_drawing_name);
+
+ if (ret.is_err())
+ {
+ afb_req_fail(req, "failed", ret.unwrap_err());
+ }
+ else
+ {
+ createSecurityContext(req, appid, a_drawing_name);
+ afb_req_success(req, json_object_new_int(ret.unwrap()), "success");
+ }
+ free(appid);
+ }
+ else
+ {
+ afb_req_fail(req, "failed", nullptr);
+ }
+ }
+ catch (std::exception &e)
+ {
+ afb_req_fail_f(req, "failed", "Uncaught exception while calling requestsurface: %s", e.what());
+ return;
+ }
+}
+
+void windowmanager_requestsurfacexdg(afb_req req) noexcept
+{
+ std::lock_guard<std::mutex> guard(binding_m);
+
+ if (g_afb_instance == nullptr)
+ {
+ afb_req_fail(req, "failed", "Binding not initialized, did the compositor die?");
+ return;
+ }
+
+ try
+ {
+ json_object *jreq = afb_req_json(req);
+
+ json_object *j_drawing_name = nullptr;
+ if (!json_object_object_get_ex(jreq, "drawing_name", &j_drawing_name))
+ {
+ afb_req_fail(req, "failed", "Need char const* argument drawing_name");
+ return;
+ }
+ char const *a_drawing_name = json_object_get_string(j_drawing_name);
+
+ json_object *j_ivi_id = nullptr;
+ if (!json_object_object_get_ex(jreq, "ivi_id", &j_ivi_id))
+ {
+ afb_req_fail(req, "failed", "Need char const* argument ivi_id");
+ return;
+ }
+ char const *a_ivi_id = json_object_get_string(j_ivi_id);
+ char *appid = afb_req_get_application_id(req);
+ if(appid)
+ {
+ auto ret = g_afb_instance->wmgr.api_request_surface(
+ appid, a_drawing_name, a_ivi_id);
+ if (ret != nullptr)
+ {
+ afb_req_fail(req, "failed", ret);
+ }
+ else
+ {
+ createSecurityContext(req, appid, a_drawing_name);
+ afb_req_success(req, NULL, "success");
+ }
+ free(appid);
+ }
+ }
+ catch (std::exception &e)
+ {
+ afb_req_fail_f(req, "failed", "Uncaught exception while calling requestsurfacexdg: %s", e.what());
+ return;
+ }
+}
+
+void windowmanager_setrole(afb_req req) noexcept
+{
+ std::lock_guard<std::mutex> guard(binding_m);
+ if (g_afb_instance == nullptr)
+ {
+ afb_req_fail(req, "failed", "Binding not initialized, did the compositor die?");
+ return;
+ }
+ try
+ {
+ json_object *jreq = afb_req_json(req);
+
+ json_object *j_role = nullptr;
+ if (!json_object_object_get_ex(jreq, "role", &j_role))
+ {
+ afb_req_fail(req, "failed", "Need char const* argument role");
+ return;
+ }
+ char const *a_role = json_object_get_string(j_role);
+ char *appid = afb_req_get_application_id(req);
+
+ if(appid)
+ {
+ auto ret = g_afb_instance->wmgr.api_set_role(appid, a_role);
+ if (!ret)
+ {
+ afb_req_fail(req, "failed", "Couldn't register");
+ }
+ else
+ {
+ createSecurityContext(req, appid, a_role);
+ afb_req_success(req, NULL, "success");
+ }
+ free(appid);
+ }
+ }
+ catch (std::exception &e)
+ {
+ afb_req_fail_f(req, "failed", "Uncaught exception while calling requestsurfacexdg: %s", e.what());
+ return;
+ }
+}
+
+void windowmanager_activatewindow(afb_req req) noexcept
+{
+ std::lock_guard<std::mutex> guard(binding_m);
+
+ if (g_afb_instance == nullptr)
+ {
+ afb_req_fail(req, "failed", "Binding not initialized, did the compositor die?");
+ return;
+ }
+
+ try
+ {
+ const char *a_drawing_name = afb_req_value(req, "drawing_name");
+ if (!a_drawing_name)
+ {
+ afb_req_fail(req, "failed", "Need char const* argument drawing_name");
+ return;
+ }
+
+ const char *a_drawing_area = afb_req_value(req, "drawing_area");
+ if (!a_drawing_area)
+ {
+ afb_req_fail(req, "failed", "Need char const* argument drawing_area");
+ return;
+ }
+
+ char* appid = afb_req_get_application_id(req);
+ if(appid)
+ {
+ auto reply = [&req](const char *errmsg) {
+ if (errmsg != nullptr)
+ {
+ HMI_ERROR(errmsg);
+ afb_req_fail(req, "failed", errmsg);
+ return;
+ }
+ afb_req_success(req, NULL, "success");
+ };
+
+ if (g_afb_instance->wmgr.wmcon.isMasterMode() ||
+ !g_afb_instance->wmgr.wmcon.isMasterArea(a_drawing_area))
+ {
+ g_afb_instance->wmgr.api_activate_surface(
+ appid, a_drawing_name, a_drawing_area, reply);
+ }
+ else
+ {
+ // TODO: temporarily
+ if (!g_afb_instance->wmgr.wmcon.isConnecting())
+ {
+ g_afb_instance->wmgr.wmcon.connectToMaster();
+ }
+
+ // If Window Manager is slave and this request is for master,
+ // request activateWindow to master
+ g_afb_instance->wmgr.api_activate_surface_to_master(
+ appid, a_drawing_name, a_drawing_area, reply);
+ }
+ free(appid);
+ }
+ }
+ catch (std::exception &e)
+ {
+ HMI_WARNING("failed: Uncaught exception while calling activatesurface: %s", e.what());
+ g_afb_instance->wmgr.exceptionProcessForTransition();
+ return;
+ }
+}
+
+void windowmanager_deactivatewindow(afb_req req) noexcept
+{
+ std::lock_guard<std::mutex> guard(binding_m);
+
+ if (g_afb_instance == nullptr)
+ {
+ afb_req_fail(req, "failed", "Binding not initialized, did the compositor die?");
+ return;
+ }
+
+ try
+ {
+ const char *a_drawing_name = afb_req_value(req, "drawing_name");
+ if (!a_drawing_name)
+ {
+ afb_req_fail(req, "failed", "Need char const* argument drawing_name");
+ return;
+ }
+
+ char* appid = afb_req_get_application_id(req);
+ if(appid)
+ {
+ auto reply = [&req](const char *errmsg) {
+ if (errmsg != nullptr)
+ {
+ HMI_ERROR(errmsg);
+ afb_req_fail(req, "failed", errmsg);
+ return;
+ }
+ afb_req_success(req, NULL, "success");
+ };
+
+ // TODO: Check whether role is tbtnavi to request remote invisible
+ if (g_afb_instance->wmgr.wmcon.isMasterMode() ||
+ ("tbtnavi" != std::string(a_drawing_name)))
+ {
+ g_afb_instance->wmgr.api_deactivate_surface(
+ appid, a_drawing_name, reply);
+ }
+ else
+ {
+ // If Window Manager is slave and this request is for master,
+ // request deactivateWindow to master
+ g_afb_instance->wmgr.api_deactivate_surface_to_master(
+ appid, a_drawing_name, reply);
+ }
+ free(appid);
+ }
+ }
+ catch (std::exception &e)
+ {
+ HMI_WARNING("failed: Uncaught exception while calling deactivatesurface: %s", e.what());
+ g_afb_instance->wmgr.exceptionProcessForTransition();
+ return;
+ }
+}
+
+void windowmanager_enddraw(afb_req req) noexcept
+{
+ std::lock_guard<std::mutex> guard(binding_m);
+
+ if (g_afb_instance == nullptr)
+ {
+ afb_req_fail(req, "failed", "Binding not initialized, did the compositor die?");
+ return;
+ }
+
+ try
+ {
+ const char *a_drawing_name = afb_req_value(req, "drawing_name");
+ if (!a_drawing_name)
+ {
+ afb_req_fail(req, "failed", "Need char const* argument drawing_name");
+ return;
+ }
+ afb_req_success(req, NULL, "success");
+
+ char* appid = afb_req_get_application_id(req);
+ if(appid)
+ {
+ if (g_afb_instance->wmgr.wmcon.isMasterMode() ||
+ !g_afb_instance->wmgr.wmcon.isSyncDrawingForRemote(appid))
+ {
+ g_afb_instance->wmgr.api_enddraw(appid, a_drawing_name);
+ }
+ else
+ {
+ // If Window Manager is slave and requesting app is syncDrawing,
+ // request endDraw to master
+ g_afb_instance->wmgr.api_enddraw_for_remote(appid, a_drawing_name);
+ }
+ free(appid);
+ }
+ }
+ catch (std::exception &e)
+ {
+ HMI_WARNING("failed: Uncaught exception while calling enddraw: %s", e.what());
+ g_afb_instance->wmgr.exceptionProcessForTransition();
+ return;
+ }
+}
+
+void windowmanager_getdisplayinfo_thunk(afb_req req) noexcept
+{
+ std::lock_guard<std::mutex> guard(binding_m);
+
+ if (g_afb_instance == nullptr)
+ {
+ afb_req_fail(req, "failed", "Binding not initialized, did the compositor die?");
+ return;
+ }
+
+ try
+ {
+ auto ret = g_afb_instance->wmgr.api_get_display_info();
+ if (ret.is_err())
+ {
+ afb_req_fail(req, "failed", ret.unwrap_err());
+ return;
+ }
+
+ afb_req_success(req, ret.unwrap(), "success");
+ }
+ catch (std::exception &e)
+ {
+ afb_req_fail_f(req, "failed", "Uncaught exception while calling getdisplayinfo: %s", e.what());
+ return;
+ }
+}
+
+void windowmanager_getareainfo_thunk(afb_req req) noexcept
+{
+ std::lock_guard<std::mutex> guard(binding_m);
+
+ if (g_afb_instance == nullptr)
+ {
+ afb_req_fail(req, "failed", "Binding not initialized, did the compositor die?");
+ return;
+ }
+
+ try
+ {
+ json_object *jreq = afb_req_json(req);
+
+ json_object *j_drawing_name = nullptr;
+ if (!json_object_object_get_ex(jreq, "drawing_name", &j_drawing_name))
+ {
+ afb_req_fail(req, "failed", "Need char const* argument drawing_name");
+ return;
+ }
+ char const *a_drawing_name = json_object_get_string(j_drawing_name);
+
+ auto ret = g_afb_instance->wmgr.api_get_area_info(a_drawing_name);
+ if (ret.is_err())
+ {
+ afb_req_fail(req, "failed", ret.unwrap_err());
+ return;
+ }
+
+ afb_req_success(req, ret.unwrap(), "success");
+ }
+ catch (std::exception &e)
+ {
+ afb_req_fail_f(req, "failed", "Uncaught exception while calling getareainfo: %s", e.what());
+ return;
+ }
+}
+
+void windowmanager_getcarinfo_thunk(afb_req req) noexcept
+{
+ std::lock_guard<std::mutex> guard(binding_m);
+ if (g_afb_instance == nullptr)
+ {
+ afb_req_fail(req, "failed", "Binding not initialized, did the compositor die?");
+ return;
+ }
+
+ try
+ {
+ json_object *jreq = afb_req_json(req);
+
+ json_object *j_label = nullptr;
+ if (! json_object_object_get_ex(jreq, "label", &j_label))
+ {
+ afb_req_fail(req, "failed", "Need char const* argument label");
+ return;
+ }
+ char const* a_label = json_object_get_string(j_label);
+
+ auto ret = g_afb_instance->wmgr.api_get_car_info(a_label);
+ if (ret.is_err())
+ {
+ afb_req_fail(req, "failed", ret.unwrap_err());
+ return;
+ }
+
+ afb_req_success(req, ret.unwrap(), "success");
+ }
+ catch (std::exception &e)
+ {
+ afb_req_fail_f(req, "failed", "Uncaught exception while calling getcarinfo: %s", e.what());
+ return;
+ }
+}
+
+void windowmanager_set_render_order(afb_req req) noexcept
+{
+ std::lock_guard<std::mutex> guard(binding_m);
+ if (g_afb_instance == nullptr)
+ {
+ afb_req_fail(req, "failed", "Binding not initialized, did the compositor die?");
+ return;
+ }
+
+ char* appid = afb_req_get_application_id(req);
+ if(appid)
+ {
+ json_object *jreq = afb_req_json(req);
+ json_object *j_ro; // Do not free this. binder frees jreq, then free j_ro
+ if (json_object_object_get_ex(jreq, "render_order", &j_ro))
+ {
+ int size = json_object_array_length(j_ro);
+ std::vector<std::string> ro(size);
+ for(int i = 0; i < size; i++)
+ {
+ ro[i] = json_object_get_string(json_object_array_get_idx(j_ro, i));
+ }
+
+ auto ret = g_afb_instance->wmgr.api_client_set_render_order(appid, ro);
+ if (!ret)
+ {
+ afb_req_fail(req, "failed", nullptr);
+ }
+ else
+ {
+ afb_req_success(req, nullptr, nullptr);
+ }
+ }
+ free(appid);
+ }
+ else
+ {
+ afb_req_fail(req, "failed", nullptr);
+ }
+}
+
+void windowmanager_attach_app(afb_req req) noexcept
+{
+ std::lock_guard<std::mutex> guard(binding_m);
+ if (g_afb_instance == nullptr)
+ {
+ afb_req_fail(req, "failed", "Binding not initialized, did the compositor die?");
+ return;
+ }
+
+ char* appid = afb_req_get_application_id(req);
+ if(appid)
+ {
+ json_object *jreq = afb_req_json(req);
+ json_object *j_dest, *j_id; // Do not free this. binder frees jreq, then free j_ro
+ if (json_object_object_get_ex(jreq, "destination", &j_dest) &&
+ json_object_object_get_ex(jreq, "service_surface", &j_id))
+ {
+ const char* dest_app = json_object_get_string(j_dest);
+ const char* service = json_object_get_string(j_id);
+
+ std::string uuid = g_afb_instance->wmgr.api_client_attach_service_surface(appid, dest_app, service);
+ if (uuid.empty())
+ {
+ afb_req_fail(req, "failed", nullptr);
+ }
+ else
+ {
+ json_object *resp = json_object_new_object();
+ json_object_object_add(resp, "uuid", json_object_new_string(uuid.c_str()));
+ afb_req_success(req, resp, nullptr);
+ }
+ }
+ free(appid);
+ }
+ else
+ {
+ afb_req_fail(req, "failed", nullptr);
+ }
+}
+
+void windowmanager_wm_subscribe(afb_req req) noexcept
+{
+ std::lock_guard<std::mutex> guard(binding_m);
+
+ if (g_afb_instance == nullptr)
+ {
+ afb_req_fail(req, "failed", "Binding not initialized, did the compositor die?");
+ return;
+ }
+
+ try
+ {
+ json_object *jreq = afb_req_json(req);
+ json_object *j = nullptr;
+ if (!json_object_object_get_ex(jreq, "event", &j))
+ {
+ afb_req_fail(req, "failed", "Need char const* argument event");
+ return;
+ }
+ int event_type = json_object_get_int(j);
+ const char *event_name = g_afb_instance->wmgr.kListEventName[event_type];
+ struct afb_event event = g_afb_instance->wmgr.map_afb_event[event_name];
+ int ret = afb_req_subscribe(req, event);
+ if (ret)
+ {
+ afb_req_fail(req, "failed", "Error: afb_req_subscribe()");
+ return;
+ }
+ afb_req_success(req, NULL, "success");
+ }
+ catch (std::exception &e)
+ {
+ afb_req_fail_f(req, "failed", "Uncaught exception while calling wm_subscribe: %s", e.what());
+ return;
+ }
+}
+
+void windowmanager_list_drawing_names(afb_req req) noexcept
+{
+ std::lock_guard<std::mutex> guard(binding_m);
+
+ /* if (g_afb_instance == nullptr)
+ {
+ afb_req_fail(req, "failed", "Binding not initialized, did the compositor die?");
+ return;
+ }
+
+ try
+ {
+
+ nlohmann::json j = g_afb_instance->wmgr.id_alloc.name2id;
+ auto ret = wm::Ok(json_tokener_parse(j.dump().c_str()));
+ if (ret.is_err())
+ {
+ afb_req_fail(req, "failed", ret.unwrap_err());
+ return;
+ }
+
+ afb_req_success(req, ret.unwrap(), "success");
+ }
+ catch (std::exception &e)
+ {
+ afb_req_fail_f(req, "failed", "Uncaught exception while calling list_drawing_names: %s", e.what());
+ return;
+ } */
+}
+
+void windowmanager_ping(afb_req req) noexcept
+{
+ std::lock_guard<std::mutex> guard(binding_m);
+
+ if (g_afb_instance == nullptr)
+ {
+ afb_req_fail(req, "failed", "Binding not initialized, did the compositor die?");
+ return;
+ }
+ else
+ {
+ afb_req_success(req, NULL, "success");
+ }
+}
+
+void windowmanager_debug_status(afb_req req) noexcept
+{
+ std::lock_guard<std::mutex> guard(binding_m);
+
+ /* if (g_afb_instance == nullptr)
+ {
+ afb_req_fail(req, "failed", "Binding not initialized, did the compositor die?");
+ return;
+ }
+
+ try
+ {
+
+ json_object *jr = json_object_new_object();
+ json_object_object_add(jr, "surfaces",
+ to_json(g_afb_instance->wmgr.controller->sprops));
+ json_object_object_add(jr, "layers", to_json(g_afb_instance->wmgr.controller->lprops));
+
+ afb_req_success(req, jr, "success");
+ }
+ catch (std::exception &e)
+ {
+ afb_req_fail_f(req, "failed", "Uncaught exception while calling debug_status: %s", e.what());
+ return;
+ } */
+}
+
+void windowmanager_debug_layers(afb_req req) noexcept
+{
+ std::lock_guard<std::mutex> guard(binding_m);
+
+ /* if (g_afb_instance == nullptr)
+ {
+ afb_req_fail(req, "failed", "Binding not initialized, did the compositor die?");
+ return;
+ }
+
+ try
+ {
+ auto ret = wm::Ok(json_tokener_parse(g_afb_instance->wmgr.layers.to_json().dump().c_str()));
+
+ afb_req_success(req, ret, "success");
+ }
+ catch (std::exception &e)
+ {
+ afb_req_fail_f(req, "failed", "Uncaught exception while calling debug_layers: %s", e.what());
+ return;
+ } */
+}
+
+void windowmanager_debug_surfaces(afb_req req) noexcept
+{
+ std::lock_guard<std::mutex> guard(binding_m);
+
+ /* if (g_afb_instance == nullptr)
+ {
+ afb_req_fail(req, "failed", "Binding not initialized, did the compositor die?");
+ return;
+ }
+
+ try
+ {
+
+ auto ret = wm::Ok(to_json(g_afb_instance->wmgr.controller->sprops));
+ if (ret.is_err())
+ {
+ afb_req_fail(req, "failed", ret.unwrap_err());
+ return;
+ }
+
+ afb_req_success(req, ret.unwrap(), "success");
+ }
+ catch (std::exception &e)
+ {
+ afb_req_fail_f(req, "failed", "Uncaught exception while calling debug_surfaces: %s", e.what());
+ return;
+ } */
+}
+
+void windowmanager_debug_terminate(afb_req req) noexcept
+{
+ std::lock_guard<std::mutex> guard(binding_m);
+
+ if (g_afb_instance == nullptr)
+ {
+ afb_req_fail(req, "failed", "Binding not initialized, did the compositor die?");
+ return;
+ }
+
+ try
+ {
+
+ if (getenv("WINMAN_DEBUG_TERMINATE") != nullptr)
+ {
+ raise(SIGKILL); // afb-daemon kills it's pgroup using TERM, which
+ // doesn't play well with perf
+ }
+
+ afb_req_success(req, NULL, "success");
+ }
+ catch (std::exception &e)
+ {
+ afb_req_fail_f(req, "failed", "Uncaught exception while calling debug_terminate: %s", e.what());
+ return;
+ }
+}
+
+void on_event(const char *event, struct json_object *object)
+{
+ g_afb_instance->wmgr.analyzeReceivedEvent(event, object);
+}
+
+const struct afb_verb_v2 windowmanager_verbs[] = {
+ {"requestSurface", windowmanager_requestsurface, nullptr, nullptr, AFB_SESSION_NONE},
+ {"requestSurfaceXdg", windowmanager_requestsurfacexdg, nullptr, nullptr, AFB_SESSION_NONE},
+ {"setRole", windowmanager_setrole, nullptr, nullptr, AFB_SESSION_NONE},
+ {"activateWindow", windowmanager_activatewindow, nullptr, nullptr, AFB_SESSION_NONE},
+ {"deactivateWindow", windowmanager_deactivatewindow, nullptr, nullptr, AFB_SESSION_NONE},
+ {"endDraw", windowmanager_enddraw, nullptr, nullptr, AFB_SESSION_NONE},
+ {"getDisplayInfo", windowmanager_getdisplayinfo_thunk, nullptr, nullptr, AFB_SESSION_NONE},
+ {"getAreaInfo", windowmanager_getareainfo_thunk, nullptr, nullptr, AFB_SESSION_NONE},
+ {"getCarInfo", windowmanager_getcarinfo_thunk, nullptr, nullptr, AFB_SESSION_NONE },
+ {"setRenderOrder", windowmanager_set_render_order, nullptr, nullptr, AFB_SESSION_NONE},
+ {"attachApp", windowmanager_attach_app, nullptr, nullptr, AFB_SESSION_NONE},
+ {"wm_subscribe", windowmanager_wm_subscribe, nullptr, nullptr, AFB_SESSION_NONE},
+ {"list_drawing_names", windowmanager_list_drawing_names, nullptr, nullptr, AFB_SESSION_NONE},
+ {"ping", windowmanager_ping, nullptr, nullptr, AFB_SESSION_NONE},
+ {"debug_status", windowmanager_debug_status, nullptr, nullptr, AFB_SESSION_NONE},
+ {"debug_layers", windowmanager_debug_layers, nullptr, nullptr, AFB_SESSION_NONE},
+ {"debug_surfaces", windowmanager_debug_surfaces, nullptr, nullptr, AFB_SESSION_NONE},
+ {"debug_terminate", windowmanager_debug_terminate, nullptr, nullptr, AFB_SESSION_NONE},
+ {}};
+
+extern "C" const struct afb_binding_v2 afbBindingV2 = {
+ "windowmanager", nullptr, nullptr, windowmanager_verbs, nullptr, binding_init, on_event, 0};
diff --git a/demo#3/common/agl-service-windowmanager/src/pm_wrapper.cpp b/demo#3/common/agl-service-windowmanager/src/pm_wrapper.cpp
new file mode 100644
index 0000000..7cf90f0
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/src/pm_wrapper.cpp
@@ -0,0 +1,439 @@
+/*
+ * Copyright (c) 2018 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "pm_wrapper.hpp"
+#include "json_helper.hpp"
+#include "util.hpp"
+
+namespace wm
+{
+
+static PMWrapper *g_context;
+
+namespace
+{
+
+static void onStateTransitioned(json_object *json_out)
+{
+ g_context->updateStates(json_out);
+}
+
+static void onError(json_object *json_out)
+{
+ HMI_DEBUG("error message from PolicyManager:%s",
+ json_object_get_string(json_out));
+
+ g_context->processError();
+}
+
+} // namespace
+
+PMWrapper::PMWrapper() {}
+
+int PMWrapper::initialize(std::string ecu_name)
+{
+ int ret = 0;
+
+ ret = this->pm.initialize(ecu_name);
+ if (0 > ret)
+ {
+ HMI_ERROR("wm:pmw", "Faild to initialize PolicyManager");
+ }
+
+ g_context = this;
+
+ return ret;
+}
+
+void PMWrapper::registerCallback(StateTransitionHandler on_state_transitioned,
+ ErrorHandler on_error)
+{
+ this->on_state_transitioned = on_state_transitioned;
+ this->on_error = on_error;
+
+ PolicyManager::CallbackTable my_callback;
+ my_callback.onStateTransitioned = onStateTransitioned;
+ my_callback.onError = onError;
+ this->pm.registerCallback(my_callback);
+}
+
+int PMWrapper::setInputEventData(Task task, std::string role, std::string area)
+{
+ const char* event;
+ if (Task::TASK_ALLOCATE == task)
+ {
+ event = "activate";
+ }
+ else if (Task::TASK_RELEASE == task)
+ {
+ event = "deactivate";
+ }
+ else if (Task::TASK_PARKING_BRAKE_OFF == task)
+ {
+ event = "parking_brake_off";
+ }
+ else if (Task::TASK_PARKING_BRAKE_ON == task)
+ {
+ event = "parking_brake_on";
+ }
+ else if (Task::TASK_ACCEL_PEDAL_OFF == task)
+ {
+ event = "accel_pedal_off";
+ }
+ else if (Task::TASK_ACCEL_PEDAL_ON == task)
+ {
+ event = "accel_pedal_on";
+ }
+ else if (Task::TASK_HEDLAMP_OFF == task)
+ {
+ event = "headlamp_off";
+ }
+ else if (Task::TASK_HEDLAMP_ON == task)
+ {
+ event = "headlamp_on";
+ }
+ else if (Task::TASK_LIGHTSTATUS_BRAKE_OFF == task)
+ {
+ event = "lightstatus_brake_off";
+ }
+ else if (Task::TASK_LIGHTSTATUS_BRAKE_ON == task)
+ {
+ event = "lightstatus_brake_on";
+ }
+ else
+ {
+ event = "";
+ }
+
+ json_object *json_in = json_object_new_object();
+ json_object_object_add(json_in, "event", json_object_new_string(event));
+ json_object_object_add(json_in, "role", json_object_new_string(role.c_str()));
+ json_object_object_add(json_in, "area", json_object_new_string(area.c_str()));
+
+ int ret;
+ ret = this->pm.setInputEventData(json_in);
+ if (0 > ret)
+ {
+ HMI_ERROR("wm:pmw", "Faild to set input event data to PolicyManager");
+ }
+ json_object_put(json_in);
+
+ return ret;
+}
+
+int PMWrapper::executeStateTransition()
+{
+ int ret;
+ ret = this->pm.executeStateTransition();
+ if (0 > ret)
+ {
+ HMI_ERROR("wm:pmw", "Failed to execute state transition for PolicyManager");
+ }
+
+ return ret;
+}
+
+void PMWrapper::undoState()
+{
+ this->pm.undoState();
+
+ this->crrlayer2rolestate = this->prvlayer2rolestate;
+}
+
+void PMWrapper::updateStates(json_object *json_out)
+{
+ std::vector<WMAction> actions;
+
+ HMI_DEBUG("json_out dump:%s", json_object_get_string(json_out));
+
+ this->createCarStateChangeAction(json_out, actions);
+ this->createLayoutChangeAction(json_out, actions);
+
+ this->on_state_transitioned(actions);
+}
+
+void PMWrapper::createCarStateChangeAction(json_object *json_out, std::vector<WMAction> &actions)
+{
+ json_object *json_car_ele;
+ if (!json_object_object_get_ex(json_out, "car_elements", &json_car_ele))
+ {
+ HMI_DEBUG("Not found key \"car_elements\"");
+ return;
+ }
+
+ int len = json_object_array_length(json_car_ele);
+ HMI_DEBUG("json_car_ele len:%d", len);
+
+ for (int i = 0; i < len; i++)
+ {
+ json_object *json_tmp = json_object_array_get_idx(json_car_ele, i);
+
+ std::string car_ele_name = jh::getStringFromJson(json_tmp, "name");
+ std::string state = jh::getStringFromJson(json_tmp, "state");
+ json_bool changed = jh::getBoolFromJson(json_tmp, "changed");
+ HMI_DEBUG("car_element:%s changed:%d", car_ele_name.c_str(), changed);
+
+ if (changed)
+ {
+ TaskCarState task = TaskCarState::NO_TASK;
+ if ("parking_brake" == car_ele_name)
+ {
+ if ("off" == state)
+ {
+ task = TaskCarState::PARKING_BRAKE_OFF;
+ }
+ else if ("on" == state)
+ {
+ task = TaskCarState::PARKING_BRAKE_ON;
+ }
+ else
+ {
+ HMI_DEBUG("Unknown parking brake state: %s", state.c_str());
+ }
+ }
+ else if ("accel_pedal" == car_ele_name)
+ {
+ if ("off" == state)
+ {
+ task = TaskCarState::ACCEL_PEDAL_OFF;
+ }
+ else if ("on" == state)
+ {
+ task = TaskCarState::ACCEL_PEDAL_ON;
+ }
+ else
+ {
+ HMI_DEBUG("Unknown accel pedal state: %s", state.c_str());
+ }
+ }
+ else if ("lamp" == car_ele_name)
+ {
+ if ("off" == state)
+ {
+ task = TaskCarState::HEDLAMP_OFF;
+ }
+ else if ("on" == state)
+ {
+ task = TaskCarState::HEDLAMP_ON;
+ }
+ else
+ {
+ HMI_DEBUG("Unknown lamp state: %s", state.c_str());
+ }
+ }
+ else if ("lightstatus_brake" == car_ele_name)
+ {
+ if ("off" == state)
+ {
+ task = TaskCarState::LIGHTSTATUS_BRAKE_OFF;
+ }
+ else if ("on" == state)
+ {
+ task = TaskCarState::LIGHTSTATUS_BRAKE_ON;
+ }
+ else
+ {
+ HMI_DEBUG("Unknown lightstatus brake state: %s", state.c_str());
+ }
+ }
+ else if ("running" == car_ele_name)
+ {
+ if ("stop" == state)
+ {
+ task = TaskCarState::CAR_STOP;
+ }
+ else if ("run" == state)
+ {
+ task = TaskCarState::CAR_RUN;
+ }
+ else
+ {
+ HMI_DEBUG("Unknown car state: %s", state.c_str());
+ }
+ }
+ else if ("restriction_mode" == car_ele_name)
+ {
+ if ("off" == state)
+ {
+ task = TaskCarState::RESTRICTION_MODE_OFF;
+ }
+ else if ("on" == state)
+ {
+ task = TaskCarState::RESTRICTION_MODE_ON;
+ }
+ else
+ {
+ HMI_DEBUG("Unknown car state: %s", state.c_str());
+ }
+ }
+ else
+ {
+ HMI_DEBUG("Unknown car element: %s", car_ele_name.c_str());
+ }
+
+ // Set action
+ if (TaskCarState::NO_TASK != task)
+ {
+ bool end_draw_finished = true;
+ WMAction act
+ {
+ 0,
+ nullptr,
+ "",
+ "",
+ TaskVisible::NO_CHANGE,
+ end_draw_finished,
+ task
+ };
+ actions.push_back(act);
+ }
+ }
+ }
+}
+
+void PMWrapper::createLayoutChangeAction(json_object *json_out, std::vector<WMAction> &actions)
+{
+ // Get displayed roles from previous layout
+ json_object *json_layers;
+ if (!json_object_object_get_ex(json_out, "layers", &json_layers))
+ {
+ HMI_DEBUG("Not found key \"layers\"");
+ return;
+ }
+
+ int len = json_object_array_length(json_layers);
+ HMI_DEBUG("json_layers len:%d", len);
+
+ for (int i = 0; i < len; i++)
+ {
+ json_object *json_tmp = json_object_array_get_idx(json_layers, i);
+
+ std::string layer_name = jh::getStringFromJson(json_tmp, "name");
+ json_bool changed = jh::getBoolFromJson(json_tmp, "changed");
+ HMI_DEBUG("layer:%s changed:%d", layer_name.c_str(), changed);
+
+ if (changed)
+ {
+ json_object *json_areas;
+ if (!json_object_object_get_ex(json_tmp, "areas", &json_areas))
+ {
+ HMI_DEBUG("Not found key \"areas\"");
+ return;
+ }
+
+ int len = json_object_array_length(json_areas);
+ HMI_DEBUG("json_layers len:%d", len);
+
+ // Store previous role state in this layer
+ this->prvlayer2rolestate[layer_name] = this->crrlayer2rolestate[layer_name];
+
+ RoleState crr_roles;
+ RoleState prv_roles = this->prvlayer2rolestate[layer_name];
+ for (int j = 0; j < len; j++)
+ {
+ json_object *json_tmp2 = json_object_array_get_idx(json_areas, j);
+
+ std::string area_name = jh::getStringFromJson(json_tmp2, "name");
+ std::string role_name = jh::getStringFromJson(json_tmp2, "role");
+
+ crr_roles[role_name] = area_name;
+
+ auto i_prv = prv_roles.find(role_name);
+ HMI_DEBUG("current role:%s area:%s",
+ role_name.c_str(), area_name.c_str());
+
+ // If current role does not exist in previous
+ if (prv_roles.end() == i_prv)
+ {
+ HMI_DEBUG("current role does not exist in previous");
+
+ // Set activate action
+ bool end_draw_finished = false;
+ WMAction act
+ {
+ 0,
+ nullptr,
+ role_name,
+ area_name,
+ TaskVisible::VISIBLE,
+ end_draw_finished,
+ TaskCarState::NO_TASK
+ };
+ actions.push_back(act);
+ }
+ else
+ {
+ HMI_DEBUG("previous role:%s area:%s",
+ i_prv->first.c_str(), i_prv->second.c_str());
+
+ // If current role exists in previous and area is different with previous
+ if (area_name != i_prv->second)
+ {
+ HMI_DEBUG("current role exists in previous and area is different with previous");
+
+ // Set activate action
+ bool end_draw_finished = false;
+ WMAction act
+ {
+ 0,
+ nullptr,
+ role_name,
+ area_name,
+ TaskVisible::VISIBLE,
+ end_draw_finished,
+ TaskCarState::NO_TASK
+ };
+ actions.push_back(act);
+ }
+
+ // Remove role which exist in current list from previous list
+ prv_roles.erase(i_prv);
+ }
+ }
+
+ // Deactivate roles which remains in previous list
+ // because these are not displayed in current layout
+ for (auto i_prv : prv_roles)
+ {
+ HMI_DEBUG("Deactivate role:%s", i_prv.first.c_str());
+
+ // Set deactivate action
+ bool end_draw_finished = true;
+ WMAction act
+ {
+ 0,
+ nullptr,
+ i_prv.first,
+ "",
+ TaskVisible::INVISIBLE,
+ end_draw_finished,
+ TaskCarState::NO_TASK
+ };
+ actions.push_back(act);
+ }
+
+ // Update previous role list
+ this->crrlayer2rolestate[layer_name] = crr_roles;
+ }
+ }
+}
+
+void PMWrapper::processError()
+{
+ this->on_error();
+}
+
+} // namespace wm
diff --git a/demo#3/common/agl-service-windowmanager/src/pm_wrapper.hpp b/demo#3/common/agl-service-windowmanager/src/pm_wrapper.hpp
new file mode 100644
index 0000000..84d68df
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/src/pm_wrapper.hpp
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2018 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef TMCAGLWM_PM_WRAPPER_HPP
+#define TMCAGLWM_PM_WRAPPER_HPP
+
+#include <functional>
+#include <vector>
+#include <string>
+#include <map>
+#include "policy_manager.hpp"
+#include "request.hpp"
+
+struct json_object;
+struct sd_event;
+struct sd_event_source;
+struct StmState;
+
+namespace wm
+{
+
+class PMWrapper
+{
+ public:
+ explicit PMWrapper();
+ ~PMWrapper() = default;
+
+ using StateTransitionHandler = std::function<void(std::vector<WMAction>)>;
+ using ErrorHandler = std::function<void(void)>;
+
+ int initialize(std::string ecu_name);
+ void registerCallback(StateTransitionHandler on_state_transitioned,
+ ErrorHandler on_error);
+ int setInputEventData(Task task, std::string role, std::string area);
+ int executeStateTransition();
+ void undoState();
+
+ // Do not use these functions
+ void updateStates(json_object *json_out);
+ void processError();
+
+ private:
+ // Disable copy and move
+ PMWrapper(PMWrapper const &) = delete;
+ PMWrapper &operator=(PMWrapper const &) = delete;
+ PMWrapper(PMWrapper &&) = delete;
+ PMWrapper &operator=(PMWrapper &&) = delete;
+
+ typedef std::map<std::string, std::string> RoleState;
+
+ PolicyManager pm;
+ StateTransitionHandler on_state_transitioned;
+ ErrorHandler on_error;
+ std::map<std::string, RoleState> prvlayer2rolestate;
+ std::map<std::string, RoleState> crrlayer2rolestate;
+
+ void createCarStateChangeAction(json_object *json_out, std::vector<WMAction> &actions);
+ void createLayoutChangeAction(json_object *json_out, std::vector<WMAction> &actions);
+};
+
+} // namespace wm
+
+#endif // TMCAGLWM_PM_WRAPPER_HPP
diff --git a/demo#3/common/agl-service-windowmanager/src/request.cpp b/demo#3/common/agl-service-windowmanager/src/request.cpp
new file mode 100644
index 0000000..0d8e5d4
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/src/request.cpp
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "request.hpp"
+
+namespace wm
+{
+
+using std::string;
+
+WMRequest::WMRequest() {}
+
+WMRequest::WMRequest(string appid, string role, string area, Task task)
+ : req_num(0),
+ trigger{appid, role, area, task},
+ sync_draw_req(0)
+{
+}
+
+WMRequest::WMRequest(Task task)
+ : req_num(0),
+ trigger{"", "", "", task},
+ sync_draw_req(0)
+{
+}
+
+WMRequest::~WMRequest()
+{
+}
+
+WMRequest::WMRequest(const WMRequest &obj)
+{
+ this->req_num = obj.req_num;
+ this->trigger = obj.trigger;
+ this->sync_draw_req = obj.sync_draw_req;
+}
+
+} // namespace wm
diff --git a/demo#3/common/agl-service-windowmanager/src/request.hpp b/demo#3/common/agl-service-windowmanager/src/request.hpp
new file mode 100644
index 0000000..bb203e3
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/src/request.hpp
@@ -0,0 +1,109 @@
+/*
+ * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef WMREQUEST_HPP
+#define WMREQUEST_HPP
+
+#include <string>
+#include <vector>
+#include <memory>
+
+namespace wm
+{
+
+class WMClient;
+
+enum Task
+{
+ TASK_ALLOCATE,
+ TASK_RELEASE,
+ TASK_PARKING_BRAKE_OFF,
+ TASK_PARKING_BRAKE_ON,
+ TASK_ACCEL_PEDAL_OFF,
+ TASK_ACCEL_PEDAL_ON,
+ TASK_HEDLAMP_OFF,
+ TASK_HEDLAMP_ON,
+ TASK_LIGHTSTATUS_BRAKE_OFF,
+ TASK_LIGHTSTATUS_BRAKE_ON,
+ TASK_RESTRICTION_MODE_OFF,
+ TASK_RESTRICTION_MODE_ON,
+ TASK_INVALID
+};
+
+enum TaskVisible
+{
+ VISIBLE,
+ INVISIBLE,
+ REQ_REMOTE_VISIBLE,
+ REQ_REMOTE_INVISIBLE,
+ REMOTE_VISIBLE,
+ REMOTE_INVISIBLE,
+ NO_CHANGE
+};
+
+enum TaskCarState
+{
+ PARKING_BRAKE_OFF,
+ PARKING_BRAKE_ON,
+ ACCEL_PEDAL_OFF,
+ ACCEL_PEDAL_ON,
+ HEDLAMP_OFF,
+ HEDLAMP_ON,
+ LIGHTSTATUS_BRAKE_OFF,
+ LIGHTSTATUS_BRAKE_ON,
+ CAR_STOP,
+ CAR_RUN,
+ RESTRICTION_MODE_OFF,
+ RESTRICTION_MODE_ON,
+ NO_TASK,
+};
+
+struct WMTrigger
+{
+ std::string appid;
+ std::string role;
+ std::string area;
+ Task task;
+};
+
+struct WMAction
+{
+ unsigned req_num;
+ std::shared_ptr<WMClient> client;
+ std::string role;
+ std::string area;
+ TaskVisible visible;
+ bool end_draw_finished;
+ TaskCarState car_state;
+};
+
+struct WMRequest
+{
+ WMRequest();
+ explicit WMRequest(std::string appid, std::string role,
+ std::string area, Task task);
+ explicit WMRequest(Task task);
+ virtual ~WMRequest();
+ WMRequest(const WMRequest &obj);
+
+ unsigned req_num;
+ struct WMTrigger trigger;
+ std::vector<struct WMAction> sync_draw_req;
+};
+
+} // namespace wm
+
+#endif //WMREQUEST_HPP
diff --git a/demo#3/common/agl-service-windowmanager/src/result.hpp b/demo#3/common/agl-service-windowmanager/src/result.hpp
new file mode 100644
index 0000000..8a59a90
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/src/result.hpp
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef TMCAGLWM_RESULT_HPP
+#define TMCAGLWM_RESULT_HPP
+
+#include <experimental/optional>
+#include <functional>
+
+namespace wm
+{
+
+using std::experimental::nullopt;
+using std::experimental::optional;
+
+// We only ever return a string as an error - so just parametrize
+// this over result type T
+template <typename T>
+struct result
+{
+ char const *e;
+ optional<T> t;
+
+ bool is_ok() const { return this->t != nullopt; }
+ bool is_err() const { return this->e != nullptr; }
+
+ T unwrap()
+ {
+ if (this->e != nullptr)
+ {
+ throw std::logic_error(this->e);
+ }
+ return this->t.value();
+ }
+
+ operator T() { return this->unwrap(); }
+
+ char const *unwrap_err() { return this->e; }
+
+ optional<T> const &ok() const { return this->t; }
+ optional<char const *> err() const
+ {
+ return this->e ? optional<char const *>(this->e) : nullopt;
+ }
+
+ result<T> map_err(std::function<char const *(char const *)> f);
+};
+
+template <typename T>
+struct result<T> Err(char const *e)
+{
+ return result<T>{e, nullopt};
+}
+
+template <typename T>
+struct result<T> Ok(T t)
+{
+ return result<T>{nullptr, t};
+}
+
+template <typename T>
+result<T> result<T>::map_err(std::function<char const *(char const *)> f)
+{
+ if (this->is_err())
+ {
+ return Err<T>(f(this->e));
+ }
+ return *this;
+}
+
+} // namespace wm
+
+#endif // TMCAGLWM_RESULT_HPP
diff --git a/demo#3/common/agl-service-windowmanager/src/util.cpp b/demo#3/common/agl-service-windowmanager/src/util.cpp
new file mode 100644
index 0000000..b22a704
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/src/util.cpp
@@ -0,0 +1,172 @@
+/*
+ * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "util.hpp"
+
+#include <sstream>
+#include <time.h>
+#include <stdio.h>
+#include <stdarg.h>
+#include <stdlib.h>
+
+#include <unistd.h>
+
+static char ERROR_FLAG[6][20] = {"NONE", "ERROR", "WARNING", "NOTICE", "INFO", "DEBUG"};
+
+void rectangle::fit(unsigned long to_width, unsigned long to_height)
+{
+ // fit rect within (to_width x to_height)
+
+ if (to_width <= width()) {
+ // scale to fit with
+ set_bottom(top() + (static_cast<long>(to_width) * height() / width()) - 1);
+ set_right(left() + to_width - 1);
+ } else {
+ // scale to fit height
+ set_right(left() + (static_cast<long>(to_height) * width () / height()) - 1);
+ set_bottom(top() + to_height - 1);
+ }
+}
+
+void rectangle::center(unsigned long outer_w, unsigned long outer_h)
+{
+ long inner_w = width();
+ long inner_h = height();
+
+ set_left((outer_w - inner_w) / 2);
+ set_right(left() + inner_w - 1);
+ set_top((outer_h - inner_h) / 2);
+ set_bottom(top() + inner_h - 1);
+}
+
+void rectangle::set_aspect(double ratio)
+{
+ // aspect ratio is width:height (= width/height)
+ // e.g. Landscape of HD's ratio is 16:9 (= 1.777...)
+ // Portrait of HD's ratio is 9:16 (= 0.5625)
+ //
+ // width / height = ratio
+ // width * height = area
+ //
+ // width = sqrt(ratio * area)
+ // height = width / ratio
+
+ long orig_w = width();
+ long orig_h = height();
+
+ if (ratio >= 1) {
+ // width >= height
+ // try to keep width
+ set_right(left() + orig_w - 1);
+ set_bottom(top() + static_cast<long>(orig_w / ratio + 0.5) - 1);
+ } else {
+ set_bottom(top() + orig_h - 1);
+ set_right(left() + static_cast<long>(orig_h * ratio + 0.5) - 1);
+ }
+}
+
+void _HMI_LOG(enum LOG_LEVEL level, const char* file, const char* func, const int line, const char* prefix, const char* log, ...)
+{
+ const int log_level = (getenv("USE_HMI_DEBUG") == NULL)?LOG_LEVEL_ERROR:atoi(getenv("USE_HMI_DEBUG"));
+ if(log_level < level)
+ {
+ return;
+ }
+
+ char *message;
+ struct timespec tp;
+ unsigned int time;
+
+ clock_gettime(CLOCK_REALTIME, &tp);
+ time = (tp.tv_sec * 1000000L) + (tp.tv_nsec / 1000);
+
+ va_list args;
+ va_start(args, log);
+ if (log == NULL || vasprintf(&message, log, args) < 0)
+ message = NULL;
+ fprintf(stderr, "[%10.3f] [%s %s] [%s, %s(), Line:%d] >>> %s \n", time / 1000.0, prefix, ERROR_FLAG[level], file, func, line, message);
+ va_end(args);
+ free(message);
+}
+
+void _HMI_SEQ_LOG(enum LOG_LEVEL level, const char* file, const char* func, const int line, unsigned seq_num, const char* log, ...){
+ const int log_level = (getenv("USE_HMI_DEBUG") == NULL) ? LOG_LEVEL_ERROR:atoi(getenv("USE_HMI_DEBUG"));
+ if(log_level < level)
+ {
+ return;
+ }
+
+ char *message;
+ struct timespec tp;
+ unsigned int time;
+
+ clock_gettime(CLOCK_REALTIME, &tp);
+ time = (tp.tv_sec * 1000000L) + (tp.tv_nsec / 1000);
+
+ va_list args;
+ va_start(args, log);
+ if (log == NULL || vasprintf(&message, log, args) < 0)
+ message = NULL;
+ fprintf(stderr, "[%10.3f] [wm %s] [%s, %s(), Line:%d] >>> req %d: %s \n", time / 1000.0, ERROR_FLAG[level], file, func, line, seq_num, message);
+ va_end(args);
+ free(message);
+}
+
+void _DUMP(enum LOG_LEVEL level, const char *log, ...)
+{
+ const int log_level = (getenv("USE_HMI_DEBUG") == NULL) ? LOG_LEVEL_ERROR : atoi(getenv("USE_HMI_DEBUG"));
+ if (log_level < level)
+ {
+ return;
+ }
+ char *message;
+ va_list args;
+ va_start(args, log);
+ if (log == NULL || vasprintf(&message, log, args) < 0)
+ message = NULL;
+ fprintf(stderr, "%s \n", message);
+ va_end(args);
+ free(message);
+}
+
+std::vector<std::string> parseString(std::string str, char delimiter)
+{
+ // Parse string by delimiter
+ std::vector<std::string> vct;
+ std::stringstream ss{str};
+ std::string buf;
+ while (std::getline(ss, buf, delimiter))
+ {
+ if (!buf.empty())
+ {
+ // Delete space and push back to vector
+ vct.push_back(deleteSpace(buf));
+ }
+ }
+ return vct;
+}
+
+std::string deleteSpace(std::string str)
+{
+ std::string ret = str;
+ size_t pos;
+ while ((pos = ret.find_first_of(" ")) != std::string::npos)
+ {
+ ret.erase(pos, 1);
+ }
+ return ret;
+}
+
diff --git a/demo#3/common/agl-service-windowmanager/src/util.hpp b/demo#3/common/agl-service-windowmanager/src/util.hpp
new file mode 100644
index 0000000..d049fff
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/src/util.hpp
@@ -0,0 +1,125 @@
+/*
+ * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef WM_UTIL_HPP
+#define WM_UTIL_HPP
+
+#include <functional>
+#include <thread>
+#include <string>
+#include <vector>
+#include <sys/poll.h>
+#include <string.h>
+
+#define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__)
+
+#define HMI_ERROR(args,...) _HMI_LOG(LOG_LEVEL_ERROR, __FILENAME__, __FUNCTION__, __LINE__,"wm",args, ##__VA_ARGS__)
+#define HMI_WARNING(args,...) _HMI_LOG(LOG_LEVEL_WARNING, __FILENAME__, __FUNCTION__,__LINE__, "wm", args,##__VA_ARGS__)
+#define HMI_NOTICE(args,...) _HMI_LOG(LOG_LEVEL_NOTICE, __FILENAME__, __FUNCTION__,__LINE__, "wm", args,##__VA_ARGS__)
+#define HMI_INFO(args,...) _HMI_LOG(LOG_LEVEL_INFO, __FILENAME__, __FUNCTION__,__LINE__, "wm", args,##__VA_ARGS__)
+#define HMI_DEBUG(args,...) _HMI_LOG(LOG_LEVEL_DEBUG, __FILENAME__, __FUNCTION__,__LINE__, "wm", args,##__VA_ARGS__)
+
+#define HMI_SEQ_ERROR(seq_num, args,...) _HMI_SEQ_LOG(LOG_LEVEL_ERROR, __FILENAME__, __FUNCTION__, __LINE__, seq_num, args, ##__VA_ARGS__)
+#define HMI_SEQ_WARNING(seq_num, args,...) _HMI_SEQ_LOG(LOG_LEVEL_WARNING, __FILENAME__, __FUNCTION__, __LINE__, seq_num, args, ##__VA_ARGS__)
+#define HMI_SEQ_NOTICE(seq_num, args,...) _HMI_SEQ_LOG(LOG_LEVEL_NOTICE, __FILENAME__, __FUNCTION__, __LINE__, seq_num, args, ##__VA_ARGS__)
+#define HMI_SEQ_INFO(seq_num, args,...) _HMI_SEQ_LOG(LOG_LEVEL_INFO, __FILENAME__, __FUNCTION__, __LINE__, seq_num, args, ##__VA_ARGS__)
+#define HMI_SEQ_DEBUG(seq_num, args,...) _HMI_SEQ_LOG(LOG_LEVEL_DEBUG, __FILENAME__, __FUNCTION__, __LINE__, seq_num, args, ##__VA_ARGS__)
+
+#define DUMP(args, ...) _DUMP(LOG_LEVEL_DEBUG, args, ##__VA_ARGS__)
+
+enum LOG_LEVEL{
+ LOG_LEVEL_NONE = 0,
+ LOG_LEVEL_ERROR,
+ LOG_LEVEL_WARNING,
+ LOG_LEVEL_NOTICE,
+ LOG_LEVEL_INFO,
+ LOG_LEVEL_DEBUG,
+ LOG_LEVEL_MAX = LOG_LEVEL_DEBUG
+};
+
+void _HMI_LOG(enum LOG_LEVEL level, const char* file, const char* func, const int line, const char* prefix, const char* log, ...);
+void _HMI_SEQ_LOG(enum LOG_LEVEL level, const char* file, const char* func, const int line, unsigned seq_num, const char* log, ...);
+void _DUMP(enum LOG_LEVEL level, const char *log, ...);
+
+std::vector<std::string> parseString(std::string str, char delimiter);
+std::string deleteSpace(std::string str);
+
+struct rect
+{
+ int32_t w, h;
+ int32_t x, y;
+};
+
+struct size
+{
+ uint32_t w, h;
+};
+
+class rectangle
+{
+ public:
+ explicit rectangle(long wd, long ht) : _right(wd - 1), _bottom(ht - 1) {};
+
+ void set_left(long l) {
+ _left = l;
+ }
+ long left() const { return _left; };
+
+ void set_right(long r) {
+ _right = r;
+ }
+ long right() const { return _right; };
+
+ void set_top(long t) {
+ _top = t;
+ }
+ long top() const { return _top; };
+
+ void set_bottom(long b) {
+ _bottom = b;
+ }
+ long bottom() const { return _bottom; }
+
+ long width() const {
+ if (is_valid())
+ return 0;
+ else
+ return _right - _left + 1;
+ }
+
+ long height() const {
+ if (is_valid())
+ return 0;
+ else
+ return _bottom - _top + 1;
+ }
+
+ void set_aspect(double ratio);
+ void fit(unsigned long to_width, unsigned long to_height);
+ void center(unsigned long outer_w, unsigned long outer_h);
+
+ private:
+ bool is_valid() const {
+ return (_top > _bottom || _left > _right);
+ }
+
+ long _left = 0;
+ long _top = 0;
+ long _right;
+ long _bottom;
+};
+
+#endif // !WM_UTIL_HPP
diff --git a/demo#3/common/agl-service-windowmanager/src/wayland_ivi_wm.cpp b/demo#3/common/agl-service-windowmanager/src/wayland_ivi_wm.cpp
new file mode 100644
index 0000000..28bd024
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/src/wayland_ivi_wm.cpp
@@ -0,0 +1,724 @@
+/*
+ * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "wayland_ivi_wm.hpp"
+
+/**
+ * namespace wl
+ */
+namespace wl
+{
+
+/**
+ * display
+ */
+display::display()
+ : d(std::unique_ptr<struct wl_display, void (*)(struct wl_display *)>(
+ wl_display_connect(nullptr), &wl_display_disconnect)),
+ r(d.get()) {}
+
+bool display::ok() const { return d && wl_display_get_error(d.get()) == 0; }
+
+void display::roundtrip() { wl_display_roundtrip(this->d.get()); }
+
+int display::dispatch() { return wl_display_dispatch(this->d.get()); }
+
+int display::dispatch_pending() { return wl_display_dispatch_pending(this->d.get()); }
+
+int display::read_events()
+{
+ ;
+ while (wl_display_prepare_read(this->d.get()) == -1)
+ {
+ if (wl_display_dispatch_pending(this->d.get()) == -1)
+ {
+ return -1;
+ }
+ }
+
+ if (wl_display_flush(this->d.get()) == -1)
+ {
+ return -1;
+ }
+
+ if (wl_display_read_events(this->d.get()) == -1)
+ {
+ wl_display_cancel_read(this->d.get());
+ }
+
+ return 0;
+}
+
+void display::flush() { wl_display_flush(this->d.get()); }
+
+int display::get_fd() const { return wl_display_get_fd(this->d.get()); }
+
+int display::get_error() { return wl_display_get_error(this->d.get()); }
+
+/**
+ * registry
+ */
+namespace
+{
+void registry_global_created(void *data, struct wl_registry * /*r*/, uint32_t name,
+ char const *iface, uint32_t v)
+{
+ static_cast<struct registry *>(data)->global_created(name, iface, v);
+}
+
+void registry_global_removed(void *data, struct wl_registry * /*r*/,
+ uint32_t name)
+{
+ static_cast<struct registry *>(data)->global_removed(name);
+}
+
+constexpr struct wl_registry_listener registry_listener = {
+ registry_global_created, registry_global_removed};
+} // namespace
+
+registry::registry(struct wl_display *d)
+ : wayland_proxy(d == nullptr ? nullptr : wl_display_get_registry(d))
+{
+ if (this->proxy != nullptr)
+ {
+ wl_registry_add_listener(this->proxy.get(), &registry_listener, this);
+ }
+}
+
+void registry::add_global_handler(char const *iface, binder bind)
+{
+ this->bindings[iface] = std::move(bind);
+}
+
+void registry::global_created(uint32_t name, char const *iface, uint32_t v)
+{
+ auto b = this->bindings.find(iface);
+ if (b != this->bindings.end())
+ {
+ b->second(this->proxy.get(), name, v);
+ }
+ HMI_DEBUG("wl::registry @ %p global n %u i %s v %u", this->proxy.get(), name,
+ iface, v);
+}
+
+void registry::global_removed(uint32_t /*name*/) {}
+
+/**
+ * output
+ */
+namespace
+{
+void output_geometry(void *data, struct wl_output * /*wl_output*/, int32_t x,
+ int32_t y, int32_t physical_width, int32_t physical_height,
+ int32_t subpixel, const char *make, const char *model,
+ int32_t transform)
+{
+ static_cast<struct output *>(data)->geometry(
+ x, y, physical_width, physical_height, subpixel, make, model, transform);
+}
+
+void output_mode(void *data, struct wl_output * /*wl_output*/, uint32_t flags,
+ int32_t width, int32_t height, int32_t refresh)
+{
+ static_cast<struct output *>(data)->mode(flags, width, height, refresh);
+}
+
+void output_done(void *data, struct wl_output * /*wl_output*/)
+{
+ static_cast<struct output *>(data)->done();
+}
+
+void output_scale(void *data, struct wl_output * /*wl_output*/,
+ int32_t factor)
+{
+ static_cast<struct output *>(data)->scale(factor);
+}
+
+constexpr struct wl_output_listener output_listener = {
+ output_geometry, output_mode, output_done, output_scale};
+} // namespace
+
+output::output(struct wl_registry *r, uint32_t name, uint32_t v)
+ : wayland_proxy(wl_registry_bind(r, name, &wl_output_interface, v))
+{
+ wl_output_add_listener(this->proxy.get(), &output_listener, this);
+}
+
+void output::geometry(int32_t x, int32_t y, int32_t pw, int32_t ph,
+ int32_t subpel, char const *make, char const *model,
+ int32_t tx)
+{
+ HMI_DEBUG("wm",
+ "wl::output %s @ %p x %i y %i w %i h %i spel %x make %s model %s tx %i",
+ __func__, this->proxy.get(), x, y, pw, ph, subpel, make, model, tx);
+ this->physical_width = pw;
+ this->physical_height = ph;
+ this->transform = tx;
+}
+
+void output::mode(uint32_t flags, int32_t w, int32_t h, int32_t r)
+{
+ HMI_DEBUG("wl::output %s @ %p f %x w %i h %i r %i", __func__,
+ this->proxy.get(), flags, w, h, r);
+ if ((flags & WL_OUTPUT_MODE_CURRENT) != 0u)
+ {
+ this->width = w;
+ this->height = h;
+ this->refresh = r;
+ }
+}
+
+void output::done()
+{
+ HMI_DEBUG("wl::output %s @ %p done", __func__, this->proxy.get());
+ // Pivot and flipped
+ if (this->transform == WL_OUTPUT_TRANSFORM_90 ||
+ this->transform == WL_OUTPUT_TRANSFORM_270 ||
+ this->transform == WL_OUTPUT_TRANSFORM_FLIPPED_90 ||
+ this->transform == WL_OUTPUT_TRANSFORM_FLIPPED_270)
+ {
+ std::swap(this->width, this->height);
+ std::swap(this->physical_width, this->physical_height);
+ }
+}
+
+void output::scale(int32_t factor)
+{
+ HMI_DEBUG("wl::output %s @ %p f %i", __func__, this->proxy.get(), factor);
+}
+} // namespace wl
+
+/**
+ * namespace compositor
+ */
+namespace compositor
+{
+
+namespace
+{
+
+void surface_visibility_changed(
+ void *data, struct ivi_wm * /*ivi_wm*/,
+ uint32_t surface_id, int32_t visibility)
+{
+ auto c = static_cast<struct controller *>(data);
+ c->surface_visibility_changed(surface_id, visibility);
+}
+
+void surface_opacity_changed(void *data, struct ivi_wm * /*ivi_wm*/,
+ uint32_t surface_id, wl_fixed_t opacity)
+{
+ auto c = static_cast<struct controller *>(data);
+ c->surface_opacity_changed(surface_id, float(wl_fixed_to_double(opacity)));
+}
+
+void surface_source_rectangle_changed(
+ void *data, struct ivi_wm * /*ivi_wm*/, uint32_t surface_id,
+ int32_t x, int32_t y, int32_t width, int32_t height)
+{
+ auto c = static_cast<struct controller *>(data);
+ c->surface_source_rectangle_changed(surface_id, x, y, width, height);
+}
+
+void surface_destination_rectangle_changed(
+ void *data, struct ivi_wm * /*ivi_wm*/, uint32_t surface_id,
+ int32_t x, int32_t y, int32_t width, int32_t height)
+{
+ auto c = static_cast<struct controller *>(data);
+ c->surface_destination_rectangle_changed(surface_id, x, y, width, height);
+}
+
+void surface_created(void *data, struct ivi_wm * /*ivi_wm*/,
+ uint32_t id_surface)
+{
+ static_cast<struct controller *>(data)->surface_created(id_surface);
+}
+
+void surface_destroyed(
+ void *data, struct ivi_wm * /*ivi_wm*/, uint32_t surface_id)
+{
+ auto c = static_cast<struct controller *>(data);
+ c->surface_destroyed(surface_id);
+}
+
+void surface_error_detected(void *data, struct ivi_wm * /*ivi_wm*/, uint32_t object_id,
+ uint32_t error_code, const char *error_text)
+{
+ static_cast<struct controller *>(data)->surface_error_detected(
+ object_id, error_code, error_text);
+}
+
+void surface_size_changed(
+ void *data, struct ivi_wm * /*ivi_wm*/, uint32_t surface_id,
+ int32_t width, int32_t height)
+{
+ auto c = static_cast<struct controller *>(data);
+ c->surface_size_changed(surface_id, width, height);
+}
+
+void surface_stats_received(void *data, struct ivi_wm * /*ivi_wm*/,
+ uint32_t surface_id, uint32_t frame_count, uint32_t pid)
+{
+ auto c = static_cast<struct controller *>(data);
+ c->surface_stats_received(surface_id, frame_count, pid);
+}
+
+void surface_added_to_layer(void *data, struct ivi_wm * /*ivi_wm*/,
+ uint32_t layer_id, uint32_t surface_id)
+{
+ auto c = static_cast<struct controller *>(data);
+ c->surface_added_to_layer(layer_id, surface_id);
+}
+
+void layer_visibility_changed(void *data, struct ivi_wm * /*ivi_wm*/,
+ uint32_t layer_id, int32_t visibility)
+{
+ auto c = static_cast<struct controller *>(data);
+ c->layer_visibility_changed(layer_id, visibility);
+}
+
+void layer_opacity_changed(void *data, struct ivi_wm * /*ivi_wm*/,
+ uint32_t layer_id, wl_fixed_t opacity)
+{
+ auto c = static_cast<struct controller *>(data);
+ c->layer_opacity_changed(layer_id, float(wl_fixed_to_double(opacity)));
+}
+
+void layer_source_rectangle_changed(
+ void *data, struct ivi_wm * /*ivi_wm*/, uint32_t layer_id,
+ int32_t x, int32_t y, int32_t width, int32_t height)
+{
+ auto c = static_cast<struct controller *>(data);
+ c->layer_source_rectangle_changed(layer_id, x, y, width, height);
+}
+
+void layer_destination_rectangle_changed(
+ void *data, struct ivi_wm * /*ivi_wm*/, uint32_t layer_id,
+ int32_t x, int32_t y, int32_t width, int32_t height)
+{
+ auto c = static_cast<struct controller *>(data);
+ c->layer_destination_rectangle_changed(layer_id, x, y, width, height);
+}
+
+void layer_created(void *data, struct ivi_wm * /*ivi_wm*/,
+ uint32_t id_layer)
+{
+ static_cast<struct controller *>(data)->layer_created(id_layer);
+}
+
+void layer_destroyed(void *data, struct ivi_wm * /*ivi_wm*/, uint32_t layer_id)
+{
+ auto c = static_cast<struct controller *>(data);
+ c->layer_destroyed(layer_id);
+}
+
+void layer_error_detected(void *data, struct ivi_wm * /*ivi_wm*/, uint32_t object_id,
+ uint32_t error_code, const char *error_text)
+{
+ static_cast<struct controller *>(data)->layer_error_detected(
+ object_id, error_code, error_text);
+}
+
+constexpr struct ivi_wm_listener listener = {
+ surface_visibility_changed,
+ layer_visibility_changed,
+ surface_opacity_changed,
+ layer_opacity_changed,
+ surface_source_rectangle_changed,
+ layer_source_rectangle_changed,
+ surface_destination_rectangle_changed,
+ layer_destination_rectangle_changed,
+ surface_created,
+ layer_created,
+ surface_destroyed,
+ layer_destroyed,
+ surface_error_detected,
+ layer_error_detected,
+ surface_size_changed,
+ surface_stats_received,
+ surface_added_to_layer,
+};
+
+void screen_created(void *data, struct ivi_wm_screen *ivi_wm_screen, uint32_t id)
+{
+ static_cast<struct screen *>(data)->screen_created((struct screen *)data, id);
+}
+
+void layer_added(void *data,
+ struct ivi_wm_screen *ivi_wm_screen,
+ uint32_t layer_id)
+{
+ HMI_DEBUG("added layer_id:%d", layer_id);
+}
+
+void connector_name(void *data,
+ struct ivi_wm_screen *ivi_wm_screen,
+ const char *process_name)
+{
+ HMI_DEBUG("process_name:%s", process_name);
+}
+
+void screen_error(void *data,
+ struct ivi_wm_screen *ivi_wm_screen,
+ uint32_t error,
+ const char *message)
+{
+ HMI_DEBUG("screen error:%d message:%s", error, message);
+}
+
+constexpr struct ivi_wm_screen_listener screen_listener = {
+ screen_created,
+ layer_added,
+ connector_name,
+ screen_error,
+};
+} // namespace
+
+/**
+ * surface
+ */
+surface::surface(uint32_t i, struct controller *c)
+ : controller_child(c, i)
+{
+ this->parent->add_proxy_to_sid_mapping(this->parent->proxy.get(), i);
+}
+
+void surface::set_visibility(uint32_t visibility)
+{
+ HMI_DEBUG("compositor::surface id:%d v:%d", this->id, visibility);
+ ivi_wm_set_surface_visibility(this->parent->proxy.get(), this->id, visibility);
+}
+
+void surface::set_source_rectangle(int32_t x, int32_t y,
+ int32_t width, int32_t height)
+{
+ ivi_wm_set_surface_source_rectangle(this->parent->proxy.get(), this->id,
+ x, y, width, height);
+}
+
+void surface::set_destination_rectangle(int32_t x, int32_t y,
+ int32_t width, int32_t height)
+{
+ ivi_wm_set_surface_destination_rectangle(this->parent->proxy.get(), this->id,
+ x, y, width, height);
+}
+
+/**
+ * layer
+ */
+layer::layer(uint32_t i, struct controller *c) : layer(i, 0, 0, c) {}
+
+layer::layer(uint32_t i, int32_t w, int32_t h, struct controller *c)
+ : controller_child(c, i)
+{
+ this->parent->add_proxy_to_lid_mapping(this->parent->proxy.get(), i);
+ ivi_wm_create_layout_layer(c->proxy.get(), i, w, h);
+}
+
+void layer::set_visibility(uint32_t visibility)
+{
+ ivi_wm_set_layer_visibility(this->parent->proxy.get(), this->id, visibility);
+}
+
+void layer::set_destination_rectangle(int32_t x, int32_t y,
+ int32_t width, int32_t height)
+{
+ ivi_wm_set_layer_destination_rectangle(this->parent->proxy.get(), this->id,
+ x, y, width, height);
+}
+
+void layer::add_surface(uint32_t surface_id)
+{
+ ivi_wm_layer_add_surface(this->parent->proxy.get(), this->id, surface_id);
+}
+
+void layer::remove_surface(uint32_t surface_id)
+{
+ ivi_wm_layer_remove_surface(this->parent->proxy.get(), this->id, surface_id);
+}
+
+/**
+ * screen
+ */
+screen::screen(uint32_t i, struct controller *c, struct wl_output *o)
+ : wayland_proxy(ivi_wm_create_screen(c->proxy.get(), o)),
+ controller_child(c, i)
+{
+ HMI_DEBUG("compositor::screen @ %p id %u o %p", this->proxy.get(), i, o);
+
+ // Add listener for screen
+ ivi_wm_screen_add_listener(this->proxy.get(), &screen_listener, this);
+}
+
+void screen::clear() { ivi_wm_screen_clear(this->proxy.get()); }
+
+void screen::screen_created(struct screen *screen, uint32_t id)
+{
+ HMI_DEBUG("compositor::screen @ %p screen %u (%x) @ %p", this->proxy.get(),
+ id, id, screen);
+ this->id = id;
+ this->parent->screens[id] = screen;
+}
+
+void screen::set_render_order(std::vector<uint32_t> const &ro)
+{
+ std::size_t i;
+
+ // Remove all layers from the screen render order
+ ivi_wm_screen_clear(this->proxy.get());
+
+ for (i = 0; i < ro.size(); i++)
+ {
+ HMI_DEBUG("compositor::screen @ %p add layer %u", this->proxy.get(), ro[i]);
+ // Add the layer to screen render order at nearest z-position
+ ivi_wm_screen_add_layer(this->proxy.get(), ro[i]);
+ }
+}
+
+/**
+ * controller
+ */
+controller::controller(struct wl_registry *r, uint32_t name, uint32_t version)
+ : wayland_proxy(
+ wl_registry_bind(r, name, &ivi_wm_interface, version)),
+ output_size{}
+{
+ ivi_wm_add_listener(this->proxy.get(), &listener, this);
+}
+
+void controller::layer_create(uint32_t id, int32_t w, int32_t h)
+{
+ this->layers[id] = std::make_unique<struct layer>(id, w, h, this);
+}
+
+void controller::surface_create(uint32_t id)
+{
+ this->surfaces[id] = std::make_unique<struct surface>(id, this);
+
+ // TODO: If Clipping is necessary, this process should be modified.
+ {
+ // Set surface type:IVI_WM_SURFACE_TYPE_DESKTOP)
+ // for resizing wayland surface when switching from split to full surface.
+ ivi_wm_set_surface_type(this->proxy.get(), id, IVI_WM_SURFACE_TYPE_DESKTOP);
+
+ // Set source reactangle even if we should not need to set it
+ // for enable setting for destination region.
+ this->surfaces[id]->set_source_rectangle(0, 0, this->output_size.w, this->output_size.h);
+
+ // Flush display
+ this->display->flush();
+ }
+}
+
+void controller::create_screen(struct wl_output *output)
+{
+ // TODO: screen id is 0 (WM manages one screen for now)
+ this->screen = std::make_unique<struct screen>(0, this, output);
+}
+
+void controller::get_surface_properties(uint32_t surface_id, int param)
+{
+ ivi_wm_surface_get(this->proxy.get(), surface_id, param);
+}
+
+void controller::layer_created(uint32_t id)
+{
+ HMI_DEBUG("compositor::controller @ %p layer %u (%x)", this->proxy.get(), id, id);
+ if (this->layers.find(id) != this->layers.end())
+ {
+ HMI_DEBUG("WindowManager has created layer %u (%x) already", id, id);
+ }
+ else
+ {
+ this->layers[id] = std::make_unique<struct layer>(id, this);
+ }
+}
+
+void controller::layer_error_detected(uint32_t object_id,
+ uint32_t error_code, const char *error_text)
+{
+ HMI_DEBUG("compositor::controller @ %p error o %d c %d text %s",
+ this->proxy.get(), object_id, error_code, error_text);
+}
+
+void controller::surface_visibility_changed(uint32_t id, int32_t visibility)
+{
+ HMI_DEBUG("compositor::surface %s @ %d v %i", __func__, id,
+ visibility);
+ this->sprops[id].visibility = visibility;
+ this->chooks->surface_visibility(id, visibility);
+}
+
+void controller::surface_opacity_changed(uint32_t id, float opacity)
+{
+ HMI_DEBUG("compositor::surface %s @ %d o %f",
+ __func__, id, opacity);
+ this->sprops[id].opacity = opacity;
+}
+
+void controller::surface_source_rectangle_changed(uint32_t id, int32_t x,
+ int32_t y, int32_t width,
+ int32_t height)
+{
+ HMI_DEBUG("compositor::surface %s @ %d x %i y %i w %i h %i", __func__,
+ id, x, y, width, height);
+ this->sprops[id].src_rect = rect{width, height, x, y};
+}
+
+void controller::surface_destination_rectangle_changed(uint32_t id, int32_t x,
+ int32_t y, int32_t width,
+ int32_t height)
+{
+ HMI_DEBUG("compositor::surface %s @ %d x %i y %i w %i h %i", __func__,
+ id, x, y, width, height);
+ this->sprops[id].dst_rect = rect{width, height, x, y};
+ this->chooks->surface_destination_rectangle(id, x, y, width, height);
+}
+
+void controller::surface_size_changed(uint32_t id, int32_t width,
+ int32_t height)
+{
+ HMI_DEBUG("compositor::surface %s @ %d w %i h %i", __func__, id,
+ width, height);
+ this->sprops[id].size = size{uint32_t(width), uint32_t(height)};
+ this->surfaces[id]->set_source_rectangle(0, 0, width, height);
+}
+
+void controller::surface_added_to_layer(uint32_t layer_id, uint32_t surface_id)
+{
+ HMI_DEBUG("compositor::surface %s @ %d l %u",
+ __func__, layer_id, surface_id);
+}
+
+void controller::surface_stats_received(uint32_t surface_id,
+ uint32_t frame_count, uint32_t pid)
+{
+ HMI_DEBUG("compositor::surface %s @ %d f %u pid %u",
+ __func__, surface_id, frame_count, pid);
+ this->sprops[surface_id].pid = pid;
+}
+
+void controller::surface_created(uint32_t id)
+{
+ HMI_DEBUG("compositor::controller @ %p surface %u (%x)", this->proxy.get(), id,
+ id);
+ if (this->surfaces.find(id) == this->surfaces.end())
+ {
+ this->surfaces[id] = std::make_unique<struct surface>(id, this);
+ this->chooks->surface_created(id);
+
+ // Set surface type:IVI_WM_SURFACE_TYPE_DESKTOP)
+ // for resizing wayland surface when switching from split to full surface.
+ ivi_wm_set_surface_type(this->proxy.get(), id, IVI_WM_SURFACE_TYPE_DESKTOP);
+
+ // Flush display
+ this->display->flush();
+ }
+}
+
+void controller::surface_destroyed(uint32_t surface_id)
+{
+ HMI_DEBUG("compositor::surface %s @ %d", __func__, surface_id);
+ this->chooks->surface_removed(surface_id);
+ this->sprops.erase(surface_id);
+ this->surfaces.erase(surface_id);
+}
+
+void controller::surface_error_detected(uint32_t object_id,
+ uint32_t error_code, const char *error_text)
+{
+ HMI_DEBUG("compositor::controller @ %p error o %d c %d text %s",
+ this->proxy.get(), object_id, error_code, error_text);
+}
+
+void controller::layer_visibility_changed(uint32_t layer_id, int32_t visibility)
+{
+ HMI_DEBUG("compositor::layer %s @ %d v %i", __func__, layer_id, visibility);
+ this->lprops[layer_id].visibility = visibility;
+}
+
+void controller::layer_opacity_changed(uint32_t layer_id, float opacity)
+{
+ HMI_DEBUG("compositor::layer %s @ %d o %f", __func__, layer_id, opacity);
+ this->lprops[layer_id].opacity = opacity;
+}
+
+void controller::layer_source_rectangle_changed(uint32_t layer_id,
+ int32_t x, int32_t y,
+ int32_t width, int32_t height)
+{
+ HMI_DEBUG("compositor::layer %s @ %d x %i y %i w %i h %i",
+ __func__, layer_id, x, y, width, height);
+ this->lprops[layer_id].src_rect = rect{width, height, x, y};
+}
+
+void controller::layer_destination_rectangle_changed(uint32_t layer_id,
+ int32_t x, int32_t y,
+ int32_t width, int32_t height)
+{
+ HMI_DEBUG("compositor::layer %s @ %d x %i y %i w %i h %i",
+ __func__, layer_id, x, y, width, height);
+ this->lprops[layer_id].dst_rect = rect{width, height, x, y};
+}
+
+void controller::layer_destroyed(uint32_t layer_id)
+{
+ HMI_DEBUG("compositor::layer %s @ %d", __func__, layer_id);
+ this->lprops.erase(layer_id);
+ this->layers.erase(layer_id);
+}
+
+void controller::add_proxy_to_sid_mapping(struct ivi_wm *p,
+ uint32_t id)
+{
+ HMI_DEBUG("Add surface proxy mapping for %p (%u)", p, id);
+ this->surface_proxy_to_id[uintptr_t(p)] = id;
+ this->sprops[id].id = id;
+}
+
+void controller::remove_proxy_to_sid_mapping(struct ivi_wm *p)
+{
+ HMI_DEBUG("Remove surface proxy mapping for %p", p);
+ this->surface_proxy_to_id.erase(uintptr_t(p));
+}
+
+void controller::add_proxy_to_lid_mapping(struct ivi_wm *p,
+ uint32_t id)
+{
+ HMI_DEBUG("Add layer proxy mapping for %p (%u)", p, id);
+ this->layer_proxy_to_id[uintptr_t(p)] = id;
+ this->lprops[id].id = id;
+}
+
+void controller::remove_proxy_to_lid_mapping(struct ivi_wm *p)
+{
+ HMI_DEBUG("Remove layer proxy mapping for %p", p);
+ this->layer_proxy_to_id.erase(uintptr_t(p));
+}
+
+void controller::add_proxy_to_id_mapping(struct wl_output *p, uint32_t id)
+{
+ HMI_DEBUG("Add screen proxy mapping for %p (%u)", p, id);
+ this->screen_proxy_to_id[uintptr_t(p)] = id;
+}
+
+void controller::remove_proxy_to_id_mapping(struct wl_output *p)
+{
+ HMI_DEBUG("Remove screen proxy mapping for %p", p);
+ this->screen_proxy_to_id.erase(uintptr_t(p));
+}
+
+} // namespace compositor
diff --git a/demo#3/common/agl-service-windowmanager/src/wayland_ivi_wm.hpp b/demo#3/common/agl-service-windowmanager/src/wayland_ivi_wm.hpp
new file mode 100644
index 0000000..d8915a1
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/src/wayland_ivi_wm.hpp
@@ -0,0 +1,327 @@
+/*
+ * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef WM_WAYLAND_HPP
+#define WM_WAYLAND_HPP
+
+#include "controller_hooks.hpp"
+#include "ivi-wm-client-protocol.h"
+#include "util.hpp"
+
+#include <functional>
+#include <memory>
+#include <unordered_map>
+#include <vector>
+
+/**
+ * @struct wayland_proxy
+ */
+template <typename ProxyT>
+struct wayland_proxy
+{
+ std::unique_ptr<ProxyT, std::function<void(ProxyT *)>> proxy;
+ wayland_proxy(wayland_proxy const &) = delete;
+ wayland_proxy &operator=(wayland_proxy const &) = delete;
+ wayland_proxy(void *p)
+ : wayland_proxy(p,
+ reinterpret_cast<void (*)(ProxyT *)>(wl_proxy_destroy)) {}
+ wayland_proxy(void *p, std::function<void(ProxyT *)> &&p_del)
+ : proxy(std::unique_ptr<ProxyT, std::function<void(ProxyT *)>>(
+ static_cast<ProxyT *>(p), p_del)) {}
+};
+
+/**
+ * namespace wl
+ */
+namespace wl
+{
+
+/**
+ * @struct registry
+ */
+struct registry : public wayland_proxy<struct wl_registry>
+{
+ typedef std::function<void(struct wl_registry *, uint32_t, uint32_t)> binder;
+ std::unordered_map<std::string, binder> bindings;
+
+ registry(registry const &) = delete;
+ registry &operator=(registry const &) = delete;
+ registry(struct wl_display *d);
+
+ void add_global_handler(char const *iface, binder bind);
+
+ // Events
+ void global_created(uint32_t name, char const *iface, uint32_t v);
+ void global_removed(uint32_t name);
+};
+
+/**
+ * @struct display
+ */
+struct display
+{
+ std::unique_ptr<struct wl_display, void (*)(struct wl_display *)> d;
+ struct registry r;
+
+ display(display const &) = delete;
+ display &operator=(display const &) = delete;
+ display();
+ bool ok() const;
+ void roundtrip();
+ int dispatch();
+ int dispatch_pending();
+ int read_events();
+ void flush();
+ int get_fd() const;
+ int get_error();
+
+ // Lets just proxy this for the registry
+ inline void add_global_handler(char const *iface, registry::binder bind)
+ {
+ this->r.add_global_handler(iface, bind);
+ }
+};
+
+/**
+ * @struct output
+ */
+struct output : public wayland_proxy<struct wl_output>
+{
+ int width{};
+ int height{};
+ int physical_width{};
+ int physical_height{};
+ int refresh{};
+ int transform{};
+
+ output(output const &) = delete;
+ output &operator=(output const &) = delete;
+ output(struct wl_registry *r, uint32_t name, uint32_t v);
+
+ // Events
+ void geometry(int32_t x, int32_t y, int32_t pw, int32_t ph, int32_t subpel,
+ char const *make, char const *model, int32_t tx);
+ void mode(uint32_t flags, int32_t w, int32_t h, int32_t r);
+ void done();
+ void scale(int32_t factor);
+};
+} // namespace wl
+
+/**
+ * namespace compositor
+ */
+namespace compositor
+{
+
+struct size
+{
+ uint32_t w, h;
+};
+
+struct rect
+{
+ int32_t w, h;
+ int32_t x, y;
+};
+
+static const constexpr rect full_rect = rect{-1, -1, 0, 0};
+
+inline bool operator==(struct rect a, struct rect b)
+{
+ return a.w == b.w && a.h == b.h && a.x == b.x && a.y == b.y;
+}
+
+struct controller;
+
+struct controller_child
+{
+ struct controller *parent;
+ uint32_t id;
+
+ controller_child(controller_child const &) = delete;
+ controller_child &operator=(controller_child const &) = delete;
+ controller_child(struct controller *c, uint32_t i) : parent(c), id(i) {}
+ virtual ~controller_child() {}
+};
+
+struct surface_properties
+{
+ uint32_t id; // let's just save an ID here too
+ struct rect dst_rect;
+ struct rect src_rect;
+ struct size size;
+ int32_t orientation;
+ int32_t visibility;
+ float opacity;
+ uint32_t pid;
+};
+
+/**
+ * @struct surface
+ */
+struct surface : public controller_child
+{
+ surface(surface const &) = delete;
+ surface &operator=(surface const &) = delete;
+ surface(uint32_t i, struct controller *c);
+
+ // Requests
+ void set_visibility(uint32_t visibility);
+ void set_source_rectangle(int32_t x, int32_t y,
+ int32_t width, int32_t height);
+ void set_destination_rectangle(int32_t x, int32_t y,
+ int32_t width, int32_t height);
+};
+
+/**
+ * @struct layer
+ */
+struct layer : public controller_child
+{
+ layer(layer const &) = delete;
+ layer &operator=(layer const &) = delete;
+ layer(uint32_t i, struct controller *c);
+ layer(uint32_t i, int32_t w, int32_t h, struct controller *c);
+
+ // Requests
+ void set_visibility(uint32_t visibility);
+ void set_destination_rectangle(int32_t x, int32_t y,
+ int32_t width, int32_t height);
+ void add_surface(uint32_t surface_id);
+ void remove_surface(uint32_t surface_id);
+};
+
+/**
+ * @struct screen
+ */
+struct screen : public wayland_proxy<struct ivi_wm_screen>,
+ public controller_child
+{
+ screen(screen const &) = delete;
+ screen &operator=(screen const &) = delete;
+ screen(uint32_t i, struct controller *c, struct wl_output *o);
+
+ void clear();
+ void screen_created(struct screen *screen, uint32_t id);
+ void set_render_order(std::vector<uint32_t> const &ro);
+};
+
+/**
+ * @struct controller
+ */
+struct controller : public wayland_proxy<struct ivi_wm>
+{
+ // This controller is still missing ivi-input
+
+ typedef std::unordered_map<uintptr_t, uint32_t> proxy_to_id_map_type;
+ typedef std::unordered_map<uint32_t, std::unique_ptr<struct surface>>
+ surface_map_type;
+ typedef std::unordered_map<uint32_t, std::unique_ptr<struct layer>>
+ layer_map_type;
+ typedef std::unordered_map<uint32_t, struct screen *> screen_map_type;
+ typedef std::unordered_map<uint32_t, struct surface_properties> props_map;
+
+ // HACK:
+ // The order of these member is mandatory, as when objects are destroyed
+ // they will call their parent (that's us right here!) and remove their
+ // proxy-to-id mapping. I.e. the *_proxy_to_id members need to be valid
+ // when the surfaces/layers/screens maps are destroyed. This sucks, but
+ // I cannot see a better solution w/o globals or some other horrible
+ // call-our-parent construct.
+ proxy_to_id_map_type surface_proxy_to_id;
+ proxy_to_id_map_type layer_proxy_to_id;
+ proxy_to_id_map_type screen_proxy_to_id;
+
+ props_map sprops;
+ props_map lprops;
+
+ surface_map_type surfaces;
+ layer_map_type layers;
+ screen_map_type screens;
+
+ std::unique_ptr<struct screen> screen;
+
+ size output_size; // Display size[pixel]
+ size physical_size; // Display size[mm]
+
+ // Scale for conversion CSS PX -> DP(Device Pixel)
+ double scale;
+
+ wm::controller_hooks *chooks;
+
+ struct wl::display *display;
+
+ void add_proxy_to_sid_mapping(struct ivi_wm *p, uint32_t id);
+ void remove_proxy_to_sid_mapping(struct ivi_wm *p);
+
+ void add_proxy_to_lid_mapping(struct ivi_wm *p, uint32_t id);
+ void remove_proxy_to_lid_mapping(struct ivi_wm *p);
+
+ void add_proxy_to_id_mapping(struct wl_output *p, uint32_t id);
+ void remove_proxy_to_id_mapping(struct wl_output *p);
+
+ bool surface_exists(uint32_t id) const
+ {
+ return this->surfaces.find(id) != this->surfaces.end();
+ }
+
+ bool layer_exists(uint32_t id) const
+ {
+ return this->layers.find(id) != this->layers.end();
+ }
+
+ controller(struct wl_registry *r, uint32_t name, uint32_t version);
+
+ // Requests
+ void commit_changes() const
+ {
+ ivi_wm_commit_changes(this->proxy.get());
+ }
+ void layer_create(uint32_t id, int32_t w, int32_t h);
+ void surface_create(uint32_t id);
+ void create_screen(struct wl_output *output);
+ void get_surface_properties(uint32_t surface_id, int param = 0);
+
+ // Events
+ void surface_visibility_changed(uint32_t id, int32_t visibility);
+ void surface_opacity_changed(uint32_t id, float opacity);
+ void surface_source_rectangle_changed(uint32_t id, int32_t x, int32_t y,
+ int32_t width, int32_t height);
+ void surface_destination_rectangle_changed(uint32_t id, int32_t x, int32_t y,
+ int32_t width, int32_t height);
+ void surface_created(uint32_t id);
+ void surface_destroyed(uint32_t surface_id);
+ void surface_error_detected(uint32_t object_id,
+ uint32_t error_code, char const *error_text);
+ void surface_size_changed(uint32_t id, int32_t width, int32_t height);
+ void surface_stats_received(uint32_t surface_id,
+ uint32_t frame_count, uint32_t pid);
+ void surface_added_to_layer(uint32_t layer_id, uint32_t surface_id);
+
+ void layer_visibility_changed(uint32_t layer_id, int32_t visibility);
+ void layer_opacity_changed(uint32_t layer_id, float opacity);
+ void layer_source_rectangle_changed(uint32_t layer_id, int32_t x, int32_t y,
+ int32_t width, int32_t height);
+ void layer_destination_rectangle_changed(uint32_t layer_id, int32_t x, int32_t y,
+ int32_t width, int32_t height);
+ void layer_created(uint32_t id);
+ void layer_destroyed(uint32_t layer_id);
+ void layer_error_detected(uint32_t object_id,
+ uint32_t error_code, char const *error_text);
+};
+} // namespace compositor
+
+#endif // !WM_WAYLAND_HPP
diff --git a/demo#3/common/agl-service-windowmanager/src/window_manager.cpp b/demo#3/common/agl-service-windowmanager/src/window_manager.cpp
new file mode 100644
index 0000000..f209f12
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/src/window_manager.cpp
@@ -0,0 +1,2326 @@
+/*
+ * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <fstream>
+#include <regex>
+#include <sstream>
+
+#include "window_manager.hpp"
+#include "json_helper.hpp"
+#include "applist.hpp"
+
+extern "C"
+{
+#include <systemd/sd-event.h>
+}
+
+using std::string;
+using std::vector;
+
+namespace wm
+{
+
+static const uint64_t kTimeOut = 3ULL; /* 3s */
+
+/* DrawingArea name used by "{layout}.{area}" */
+const char kNameLayoutNormal[] = "normal";
+const char kNameLayoutSplit[] = "split";
+const char kNameAreaFull[] = "full";
+const char kNameAreaMain[] = "main";
+const char kNameAreaSub[] = "sub";
+
+/* Key for json obejct */
+const char kKeyDrawingName[] = "drawing_name";
+const char kKeyDrawingArea[] = "drawing_area";
+const char kKeyDrawingRect[] = "drawing_rect";
+const char kKeyX[] = "x";
+const char kKeyY[] = "y";
+const char kKeyWidth[] = "width";
+const char kKeyHeight[] = "height";
+const char kKeyWidthPixel[] = "width_pixel";
+const char kKeyHeightPixel[] = "height_pixel";
+const char kKeyWidthMm[] = "width_mm";
+const char kKeyHeightMm[] = "height_mm";
+const char kKeyScale[] = "scale";
+const char kKeyIds[] = "ids";
+
+static const char kPathOldRolesConfigFile[] = "/etc/old_roles.json";
+
+static sd_event_source *g_timer_ev_src = nullptr;
+static AppList g_app_list;
+static WindowManager *g_context;
+
+struct AfbClosure {
+public:
+ AfbClosure(unsigned pid, unsigned ppid, unsigned surface)
+ : pid(pid), ppid(ppid), surface(surface) {}
+ ~AfbClosure() = default;
+ unsigned pid;
+ unsigned ppid;
+ unsigned surface;
+};
+
+namespace
+{
+
+static int processTimerHandler(sd_event_source *s, uint64_t usec, void *userdata)
+{
+ HMI_NOTICE("Time out occurs because the client replys endDraw slow, so revert the request");
+ reinterpret_cast<wm::WindowManager *>(userdata)->timerHandler();
+ return 0;
+}
+
+static void onStateTransitioned(vector<WMAction> actions)
+{
+ g_context->startTransitionWrapper(actions);
+}
+
+static void onError()
+{
+ g_context->processError(WMError::LAYOUT_CHANGE_FAIL);
+}
+
+static void onReceiveRemoteRequest(json_object *data)
+{
+ g_context->processForRemoteRequest(data);
+}
+} // namespace
+
+/**
+ * WindowManager Impl
+ */
+WindowManager::WindowManager()
+ : wmcon{},
+ id_alloc{}
+{
+ const char *path = getenv("AFM_APP_INSTALL_DIR");
+ if (!path)
+ {
+ HMI_ERROR("AFM_APP_INSTALL_DIR is not defined");
+ }
+ string root = path;
+
+ // TODO: ECU name should be decide by config file
+ // Get mode and decide ECU name
+ string ecu_name = this->wmcon.getEcuName();
+
+ this->lc = std::make_shared<LayerControl>(root, ecu_name);
+
+ HMI_DEBUG("Layer Controller initialized");
+}
+
+int WindowManager::init()
+{
+ LayerControlCallbacks lmcb;
+ lmcb.surfaceCreated = [&](unsigned pid, unsigned surface){
+ this->surface_created(pid, surface);
+ };
+ lmcb.surfaceDestroyed = [&](unsigned surface){
+ this->surface_removed(surface);
+ };
+ this->lc->init(lmcb);
+
+ // TODO: application requests by old role,
+ // so create role map (old, new)
+ // Load old_roles config file
+ this->loadOldRolesConfigFile();
+
+ // Initialize LowCanClient
+ this->lcc.initialize();
+
+ // Store my context for calling callback from PolicyManager
+ g_context = this;
+
+ // Initialize PMWrapper
+ this->pmw.initialize(this->wmcon.getEcuName());
+
+ // Register callback to PolicyManager
+ this->pmw.registerCallback(onStateTransitioned, onError);
+
+ // Initialize WMConnection
+ this->wmcon.initialize();
+
+ // Register callback to WMConnection
+ this->wmcon.registerCallback(onReceiveRemoteRequest);
+
+ // Make afb event
+ for (int i = Event_Val_Min; i <= Event_Val_Max; i++)
+ {
+ map_afb_event[kListEventName[i]] = afb_daemon_make_event(kListEventName[i]);
+ }
+
+ const struct rect css_bg = this->lc->getAreaSize("fullscreen");
+ Screen screen = this->lc->getScreenInfo();
+ rectangle dp_bg(screen.width(), screen.height());
+
+ dp_bg.set_aspect(static_cast<double>(css_bg.w) / css_bg.h);
+ dp_bg.fit(screen.width(), screen.height());
+ dp_bg.center(screen.width(), screen.height());
+ HMI_DEBUG("SCALING: CSS BG(%dx%d) -> DDP %dx%d,(%dx%d)",
+ css_bg.w, css_bg.h, dp_bg.left(), dp_bg.top(), dp_bg.width(), dp_bg.height());
+
+ double scale = static_cast<double>(dp_bg.height()) / css_bg.h;
+ this->lc->setupArea(dp_bg, scale);
+
+ return 0; //init_layers();
+}
+
+result<int> WindowManager::api_request_surface(char const *appid, char const *drawing_name)
+{
+ // TODO: application requests by old role,
+ // so convert role old to new
+ const char *role = this->convertRoleOldToNew(drawing_name);
+ string l_name;
+ string s_appid = appid;
+ string s_role = role;
+
+ if(!g_app_list.contains(s_appid))
+ {
+ // auto lid = this->layers.get_layer_id(string(role));
+ unsigned l_id = this->lc->getNewLayerID(s_role, &l_name);
+ if (l_id == 0)
+ {
+ /**
+ * register drawing_name as fallback and make it displayed.
+ */
+ l_id = this->lc->getNewLayerID("fallback", &l_name);
+ HMI_DEBUG("%s is not registered in layers.json, then fallback as normal app", role);
+ if (l_id == 0)
+ {
+ return Err<int>("Designated role does not match any role, fallback is disabled");
+ }
+ }
+
+ // TODO: remote layer size is fixed value
+ if ("Remote" == l_name)
+ {
+ this->lc->createNewRemoteLayer(l_id);
+ }
+ else
+ {
+ this->lc->createNewLayer(l_id);
+ }
+
+ // add client into the db
+ g_app_list.addClient(s_appid, l_id, s_role);
+ }
+
+ // generate surface ID for ivi-shell application
+
+ auto rname = this->id_alloc.lookup(string(role));
+ if (!rname)
+ {
+ // name does not exist yet, allocate surface id...
+ auto id = int(this->id_alloc.generate_id(role));
+ this->tmp_surface2app[id] = {s_appid, 0};
+
+ // Work Around
+ HMI_NOTICE("WORK AROUND: add surface on request surface");
+ auto client = g_app_list.lookUpClient(s_appid);
+ client->addSurface(id);
+ ///////////////
+
+ // Set role map of (new, old)
+ this->rolenew2old[role] = string(drawing_name);
+
+ return Ok<int>(id);
+ }
+
+ // Check currently registered drawing names if it is already there.
+ return Err<int>("Surface already present");
+}
+
+char const *WindowManager::api_request_surface(char const *appid, char const *drawing_name,
+ char const *ivi_id)
+{
+ unsigned sid = std::stol(ivi_id);
+
+ HMI_DEBUG("This API(requestSurfaceXDG) is for XDG Application using runXDG");
+ /*
+ * IVI-shell doesn't send surface_size event via ivi-wm protocol
+ * if the application is using XDG surface.
+ * So WM has to set surface size with original size here
+ */
+ WMError ret = this->lc->setXDGSurfaceOriginSize(sid);
+ if(ret != SUCCESS)
+ {
+ HMI_ERROR("%s", errorDescription(ret));
+ HMI_WARNING("The main user of this API is runXDG");
+ return "fail";
+ }
+
+ // TODO: application requests by old role,
+ // so convert role old to new
+ const char *role = this->convertRoleOldToNew(drawing_name);
+ string s_role = role;
+ string s_appid = appid;
+ string l_name;
+
+ if(!g_app_list.contains(s_appid))
+ {
+ // auto lid = this->layers.get_layer_id(string(role));
+ unsigned l_id = this->lc->getNewLayerID(s_role, &l_name);
+ if (l_id == 0)
+ {
+ /**
+ * register drawing_name as fallback and make it displayed.
+ */
+ l_id = this->lc->getNewLayerID("fallback", &l_name);
+ HMI_DEBUG("%s is not registered in layers.json, then fallback as normal app", role);
+ if (l_id == 0)
+ {
+ return "Designated role does not match any role, fallback is disabled";
+ }
+ }
+
+ // TODO: remote layer size is fixed value
+ if ("Remote" == l_name)
+ {
+ this->lc->createNewRemoteLayer(l_id);
+ }
+ else
+ {
+ this->lc->createNewLayer(l_id);
+ }
+
+ // add client into the db
+ g_app_list.addClient(s_appid, l_id, s_role);
+ }
+
+ auto rname = this->id_alloc.lookup(s_role);
+ if (rname)
+ {
+ return "Surface already present";
+ }
+
+ // register pair drawing_name and ivi_id
+ this->id_alloc.register_name_id(role, sid);
+
+ auto client = g_app_list.lookUpClient(s_appid);
+ client->addSurface(sid);
+
+ // Set role map of (new, old)
+ this->rolenew2old[role] = string(drawing_name);
+
+ return nullptr;
+}
+
+bool WindowManager::api_set_role(char const *appid, char const *drawing_name)
+{
+ bool ret = false;
+
+ // TODO: application requests by old role,
+ // so convert role old to new
+ const char *role = this->convertRoleOldToNew(drawing_name);
+ string s_role = role;
+ string s_appid = appid;
+ string l_name;
+
+ // Create WMClient
+ if(!g_app_list.contains(s_appid))
+ {
+ // auto lid = this->layers.get_layer_id(string(role));
+ unsigned l_id = this->lc->getNewLayerID(s_role, &l_name);
+ if (l_id == 0)
+ {
+ /**
+ * register drawing_name as fallback and make it displayed.
+ */
+ l_id = this->lc->getNewLayerID("fallback", &l_name);
+ HMI_DEBUG("%s is not registered in layers.json, then fallback as normal app", role);
+ if (l_id == 0)
+ {
+ HMI_ERROR("Designated role does not match any role, fallback is disabled");
+ return ret;
+ }
+ }
+
+ // TODO: remote layer size is fixed value
+ if ("Remote" == l_name)
+ {
+ this->lc->createNewRemoteLayer(l_id);
+ }
+ else
+ {
+ this->lc->createNewLayer(l_id);
+ }
+
+ // add client into the db
+ g_app_list.addClient(s_appid, l_id, s_role);
+ // Set role map of (new, old)
+ this->rolenew2old[role] = string(drawing_name);
+ }
+
+ // for(auto itr = this->tmp_surface2app.begin();
+ // itr != this->tmp_surface2app.end() ; ++itr)
+ // {
+ for(auto& x : this->tmp_surface2app)
+ {
+ if(x.second.appid == s_appid)
+ {
+ unsigned surface = x.first;
+ auto client = g_app_list.lookUpClient(s_appid);
+ client->addSurface(surface);
+ this->tmp_surface2app.erase(surface);
+ this->id_alloc.register_name_id(s_role, surface);
+ break;
+ }
+ }
+
+/* if(0 != pid){
+ // search floating surfaceID from pid if pid is designated.
+ wm_err = g_app_list.popFloatingSurface(pid, &surface);
+ }
+ else{
+ // get floating surface with appid. If WM queries appid from pid,
+ // WM can bind surface and role with appid(not implemented yet)
+ //wm_err = g_app_list.popFloatingSurface(id);
+ }
+ if(wm_err != WMError::SUCCESS){
+ HMI_ERROR("No floating surface for app: %s", id.c_str());
+ g_app_list.addFloatingClient(id, lid, role);
+ HMI_NOTICE("%s : Waiting for surface creation", id.c_str());
+ return ret;
+ }
+
+ ret = true;
+ if (g_app_list.contains(id))
+ {
+ HMI_INFO("Add role: %s with surface: %d. Client %s has multi surfaces.",
+ role.c_str(), surface, id.c_str());
+ auto client = g_app_list.lookUpClient(id);
+ client->appendRole(role);
+ }
+ else{
+ HMI_INFO("Create new client: %s, surface: %d into layer: %d with role: %s",
+ id.c_str(), surface, lid, role.c_str());
+ g_app_list.addClient(id, lid, role);
+ } */
+
+ // register pair drawing_name and ivi_id
+
+ return true;
+}
+
+void WindowManager::api_activate_surface(char const *appid, char const *drawing_name,
+ char const *drawing_area, const reply_func &reply)
+{
+ // TODO: application requests by old role,
+ // so convert role old to new
+ const char *c_role = this->convertRoleOldToNew(drawing_name);
+
+ string id = appid;
+ string role = c_role;
+ string area = drawing_area;
+
+ if(!g_app_list.contains(id))
+ {
+ reply("app doesn't request 'requestSurface' or 'setRole' yet");
+ return;
+ }
+ auto client = g_app_list.lookUpClient(id);
+
+ // unsigned srfc = client->surfaceID(role);
+ // unsigned layer = client->layerID();
+
+ // g_app_list.removeFloatingSurface(client->surfaceID());
+ // g_app_list.removeFloatingSurface(client);
+
+ Task task = Task::TASK_ALLOCATE;
+ unsigned req_num = 0;
+ WMError ret = WMError::UNKNOWN;
+
+ ret = this->setRequest(id, role, area, task, &req_num);
+
+ //vector<WMLayerState> current_states = this->lc->getCurrentStates();
+ // ret = this->setRequest(id, role, area, task, current_states, &req_num);
+
+ if(ret != WMError::SUCCESS)
+ {
+ HMI_ERROR(errorDescription(ret));
+ reply("Failed to set request");
+ return;
+ }
+
+ reply(nullptr);
+ if (req_num != g_app_list.currentRequestNumber())
+ {
+ // Add request, then invoked after the previous task is finished
+ HMI_SEQ_DEBUG(req_num, "request is accepted");
+ return;
+ }
+
+ /*
+ * Do allocate tasks
+ */
+ ret = this->checkPolicy(req_num);
+
+ if (ret != WMError::SUCCESS)
+ {
+ //this->emit_error()
+ HMI_SEQ_ERROR(req_num, errorDescription(ret));
+ g_app_list.removeRequest(req_num);
+ this->processNextRequest();
+ }
+}
+
+void WindowManager::api_activate_surface_for_slave(
+ char const *appid, char const *drawing_name,
+ char const *drawing_area, const reply_func &reply)
+{
+ // TODO: application requests by old role,
+ // so convert role old to new
+ const char *c_role = this->convertRoleOldToNew(drawing_name);
+
+ string id = appid;
+ string role = c_role;
+ string area = drawing_area;
+
+ if(!g_app_list.contains(id))
+ {
+ // Request surface of app in slave to register app information
+ this->api_request_surface(appid, drawing_name);
+
+ // Set role of app in slave to register app information
+ this->api_set_role(appid, drawing_name);
+ }
+ auto client = g_app_list.lookUpClient(id);
+
+ // unsigned srfc = client->surfaceID(role);
+ // unsigned layer = client->layerID();
+
+ // g_app_list.removeFloatingSurface(client->surfaceID());
+ // g_app_list.removeFloatingSurface(client);
+
+ Task task = Task::TASK_ALLOCATE;
+ unsigned req_num = 0;
+ WMError ret = WMError::UNKNOWN;
+
+ ret = this->setRequestForSlave(id, role, area, task, &req_num);
+
+ //vector<WMLayerState> current_states = this->lc->getCurrentStates();
+ // ret = this->setRequest(id, role, area, task, current_states, &req_num);
+
+ if(ret != WMError::SUCCESS)
+ {
+ HMI_ERROR(errorDescription(ret));
+ reply("Failed to set request");
+ return;
+ }
+
+ reply(nullptr);
+ if (req_num != g_app_list.currentRequestNumber())
+ {
+ // Add request, then invoked after the previous task is finished
+ HMI_SEQ_DEBUG(req_num, "request is accepted");
+ return;
+ }
+
+ /*
+ * Do allocate tasks
+ */
+ ret = this->checkPolicyForSlave(req_num);
+
+ if (ret != WMError::SUCCESS)
+ {
+ //this->emit_error()
+ HMI_SEQ_ERROR(req_num, errorDescription(ret));
+ g_app_list.removeRequest(req_num);
+ this->processNextRequest();
+ }
+}
+
+void WindowManager::api_activate_surface_to_master(
+ char const *appid, char const *drawing_name,
+ char const *drawing_area, const reply_func &reply)
+{
+ // TODO: application requests by old role,
+ // so convert role old to new
+ const char *c_role = this->convertRoleOldToNew(drawing_name);
+
+ string id = appid;
+ string role = c_role;
+ string area = drawing_area;
+
+ if(!g_app_list.contains(id))
+ {
+ reply("app doesn't request 'requestSurface' or 'setRole' yet");
+ return;
+ }
+ auto client = g_app_list.lookUpClient(id);
+
+ // unsigned srfc = client->surfaceID(role);
+ // unsigned layer = client->layerID();
+
+ // g_app_list.removeFloatingSurface(client->surfaceID());
+ // g_app_list.removeFloatingSurface(client);
+
+ Task task = Task::TASK_ALLOCATE;
+ unsigned req_num = 0;
+ WMError ret = WMError::UNKNOWN;
+
+ ret = this->setRequest(id, role, area, task, &req_num);
+
+ //vector<WMLayerState> current_states = this->lc->getCurrentStates();
+ // ret = this->setRequest(id, role, area, task, current_states, &req_num);
+
+ if(ret != WMError::SUCCESS)
+ {
+ HMI_ERROR(errorDescription(ret));
+ reply("Failed to set request");
+ return;
+ }
+
+ reply(nullptr);
+ if (req_num != g_app_list.currentRequestNumber())
+ {
+ // Add request, then invoked after the previous task is finished
+ HMI_SEQ_DEBUG(req_num, "request is accepted");
+ return;
+ }
+
+ /*
+ * Do allocate tasks
+ */
+ int i_ret = this->wmcon.sendRequest("activateWindow", appid,
+ drawing_name, drawing_area);
+ if (0 > i_ret)
+ {
+ //this->emit_error()
+ HMI_SEQ_ERROR(req_num, errorDescription(ret));
+ g_app_list.removeRequest(req_num);
+ this->processNextRequest();
+ }
+
+ this->setTimer();
+}
+
+void WindowManager::api_deactivate_surface(char const *appid, char const *drawing_name,
+ const reply_func &reply)
+{
+ // TODO: application requests by old role,
+ // so convert role old to new
+ const char *c_role = this->convertRoleOldToNew(drawing_name);
+
+ /*
+ * Check Phase
+ */
+ string id = appid;
+ string role = c_role;
+ string area = ""; //drawing_area;
+ Task task = Task::TASK_RELEASE;
+ unsigned req_num = 0;
+ WMError ret = WMError::UNKNOWN;
+
+ ret = this->setRequest(id, role, area, task, &req_num);
+
+ if (ret != WMError::SUCCESS)
+ {
+ HMI_ERROR(errorDescription(ret));
+ reply("Failed to set request");
+ return;
+ }
+
+ reply(nullptr);
+ if (req_num != g_app_list.currentRequestNumber())
+ {
+ // Add request, then invoked after the previous task is finished
+ HMI_SEQ_DEBUG(req_num, "request is accepted");
+ return;
+ }
+
+ /*
+ * Do allocate tasks
+ */
+ ret = this->checkPolicy(req_num);
+
+ if (ret != WMError::SUCCESS)
+ {
+ //this->emit_error()
+ HMI_SEQ_ERROR(req_num, errorDescription(ret));
+ g_app_list.removeRequest(req_num);
+ this->processNextRequest();
+ }
+}
+
+void WindowManager::api_deactivate_surface_for_slave(char const *appid, char const *drawing_name,
+ const reply_func &reply)
+{
+ // TODO: application requests by old role,
+ // so convert role old to new
+ const char *c_role = this->convertRoleOldToNew(drawing_name);
+
+ /*
+ * Check Phase
+ */
+ string id = appid;
+ string role = c_role;
+ string area = "";//drawing_area;
+ Task task = Task::TASK_RELEASE;
+ unsigned req_num = 0;
+ WMError ret = WMError::UNKNOWN;
+
+ ret = this->setRequest(id, role, area, task, &req_num);
+
+ if (ret != WMError::SUCCESS)
+ {
+ HMI_ERROR(errorDescription(ret));
+ reply("Failed to set request");
+ return;
+ }
+
+ reply(nullptr);
+ if (req_num != g_app_list.currentRequestNumber())
+ {
+ // Add request, then invoked after the previous task is finished
+ HMI_SEQ_DEBUG(req_num, "request is accepted");
+ return;
+ }
+
+ /*
+ * Do allocate tasks
+ */
+ ret = this->checkPolicyForSlave(req_num);
+
+ if (ret != WMError::SUCCESS)
+ {
+ //this->emit_error()
+ HMI_SEQ_ERROR(req_num, errorDescription(ret));
+ g_app_list.removeRequest(req_num);
+ this->processNextRequest();
+ }
+}
+
+void WindowManager::api_deactivate_surface_to_master(char const *appid, char const *drawing_name,
+ const reply_func &reply)
+{
+ // TODO: application requests by old role,
+ // so convert role old to new
+ const char *c_role = this->convertRoleOldToNew(drawing_name);
+
+ /*
+ * Check Phase
+ */
+ string id = appid;
+ string role = c_role;
+ string area = "";//drawing_area;
+ Task task = Task::TASK_RELEASE;
+ unsigned req_num = 0;
+ WMError ret = WMError::UNKNOWN;
+
+ ret = this->setRequest(id, role, area, task, &req_num);
+
+ if (ret != WMError::SUCCESS)
+ {
+ HMI_ERROR(errorDescription(ret));
+ reply("Failed to set request");
+ return;
+ }
+
+ reply(nullptr);
+ if (req_num != g_app_list.currentRequestNumber())
+ {
+ // Add request, then invoked after the previous task is finished
+ HMI_SEQ_DEBUG(req_num, "request is accepted");
+ return;
+ }
+
+ /*
+ * Do allocate tasks
+ */
+ int i_ret = this->wmcon.sendRequest("deactivateWindow", appid,
+ drawing_name, "");
+ if (0 > i_ret)
+ {
+ //this->emit_error()
+ HMI_SEQ_ERROR(req_num, errorDescription(ret));
+ g_app_list.removeRequest(req_num);
+ this->processNextRequest();
+ }
+
+ this->setTimer();
+}
+
+void WindowManager::api_enddraw(char const *appid, char const *drawing_name)
+{
+ // TODO: application requests by old role,
+ // so convert role old to new
+ const char *c_role = this->convertRoleOldToNew(drawing_name);
+
+ string id = appid;
+ string role = c_role;
+ unsigned current_req = g_app_list.currentRequestNumber();
+ bool result = g_app_list.setEndDrawFinished(current_req, id, role);
+
+ if (!result)
+ {
+ HMI_ERROR("%s is not in transition state", id.c_str());
+ return;
+ }
+
+ if (g_app_list.endDrawFullfilled(current_req))
+ {
+ // do task for endDraw
+ this->stopTimer();
+ WMError ret = this->doEndDraw(current_req);
+
+ if(ret != WMError::SUCCESS)
+ {
+ //this->emit_error();
+
+ // Undo state of PolicyManager
+ this->pmw.undoState();
+ this->lc->undoUpdate();
+ }
+ this->emitScreenUpdated(current_req);
+ HMI_SEQ_INFO(current_req, "Finish request status: %s", errorDescription(ret));
+
+ g_app_list.removeRequest(current_req);
+
+ this->processNextRequest();
+ }
+ else
+ {
+ HMI_SEQ_INFO(current_req, "Wait other App call endDraw");
+ return;
+ }
+}
+
+void WindowManager::api_enddraw_for_remote(char const *appid, char const *drawing_name)
+{
+ int ret = this->wmcon.sendRequest("endDraw", appid, drawing_name, "");
+ if (0 > ret)
+ {
+ //this->emit_error()
+
+ this->pmw.undoState();
+ this->lc->undoUpdate();
+
+ unsigned current_req = g_app_list.currentRequestNumber();
+ g_app_list.removeRequest(current_req);
+ this->processNextRequest();
+
+ return;
+ }
+
+ this->api_enddraw(appid, drawing_name);
+}
+
+bool WindowManager::api_client_set_render_order(char const* appid, const vector<string>& render_order)
+{
+ bool ret = false;
+ string id = appid;
+ auto client = g_app_list.lookUpClient(id);
+ if(client)
+ {
+ client->setRenderOrder(render_order);
+ }
+ return ret;
+}
+
+string WindowManager::api_client_attach_service_surface
+ (const char* appid, const char* dest, const char* service_surface)
+{
+ string uuid, s_dest = dest;
+ auto client = g_app_list.lookUpClient(s_dest);
+ if(!client)
+ {
+ HMI_ERROR("Failed to look up destination [%s]", dest);
+ return uuid;
+ }
+ uuid = client->attachTmpServiceSurface(appid, service_surface);
+ this->tmp_services.emplace_back(TmpService{appid, dest, service_surface, uuid});
+ return uuid;
+}
+
+result<json_object *> WindowManager::api_get_display_info()
+{
+ Screen screen = this->lc->getScreenInfo();
+
+ json_object *object = json_object_new_object();
+ json_object_object_add(object, kKeyWidthPixel, json_object_new_int(screen.width()));
+ json_object_object_add(object, kKeyHeightPixel, json_object_new_int(screen.height()));
+ // TODO: set size
+ json_object_object_add(object, kKeyWidthMm, json_object_new_int(0));
+ json_object_object_add(object, kKeyHeightMm, json_object_new_int(0));
+ json_object_object_add(object, kKeyScale, json_object_new_double(this->lc->scale()));
+
+ return Ok<json_object *>(object);
+}
+
+result<json_object *> WindowManager::api_get_area_info(char const *drawing_name)
+{
+ HMI_DEBUG("called");
+
+ // TODO: application requests by old role,
+ // so convert role old to new
+ const char *role = this->convertRoleOldToNew(drawing_name);
+
+ // Check drawing name, surface/layer id
+ auto const &surface_id = this->id_alloc.lookup(string(role));
+ if (!surface_id)
+ {
+ return Err<json_object *>("Surface does not exist");
+ }
+
+ // Set area rectangle
+ rect area_info = this->area_info[*surface_id];
+ json_object *object = json_object_new_object();
+ json_object_object_add(object, kKeyX, json_object_new_int(area_info.x));
+ json_object_object_add(object, kKeyY, json_object_new_int(area_info.y));
+ json_object_object_add(object, kKeyWidth, json_object_new_int(area_info.w));
+ json_object_object_add(object, kKeyHeight, json_object_new_int(area_info.h));
+
+ return Ok<json_object *>(object);
+}
+
+result<json_object *> WindowManager::api_get_car_info(char const *label)
+{
+ json_object *j_in = nullptr;
+ json_object *j_out = nullptr;
+
+ if (0 == strcmp("parking_brake_status", label))
+ {
+ // Get parking brake status
+ json_bool val = (this->crr_car_info.parking_brake_stt) ? TRUE : FALSE;
+ j_in = json_object_new_boolean(val);
+ }
+ else if (0 == strcmp("accelerator.pedal.position", label))
+ {
+ // Get accelerator pedal position
+ double val = this->crr_car_info.accel_pedal_pos;
+ j_in = json_object_new_double(val);
+ }
+ else if (0 == strcmp("car_state", label))
+ {
+ // Get running state
+ const char* val = (this->crr_car_info.running_stt) ? "run" : "stop";
+ j_in = json_object_new_string(val);
+ }
+ else if (0 == strcmp("lightstatus.brake", label)) {
+ // Get lightstatus brake status
+ json_bool val = (this->crr_car_info.lightstatus_brake_stt) ? TRUE : FALSE;
+ j_in = json_object_new_boolean(val);
+ }
+ else
+ {
+ return Err<json_object *>("Car info does not exist");
+ }
+
+ // Create output object
+ j_out = json_object_new_object();
+ json_object_object_add(j_out, "value", j_in);
+
+ return Ok<json_object *>(j_out);
+}
+
+void WindowManager::send_event(char const *evname)
+{
+ HMI_DEBUG("%s: %s", __func__, evname);
+
+ int ret = afb_event_push(this->map_afb_event[evname], nullptr);
+ if (ret != 0)
+ {
+ HMI_DEBUG("afb_event_push: %m");
+ }
+}
+
+void WindowManager::send_event(char const *evname, char const *label)
+{
+ HMI_DEBUG("%s: %s(%s)", __func__, evname, label);
+
+ json_object *j = json_object_new_object();
+ json_object_object_add(j, kKeyDrawingName, json_object_new_string(label));
+
+ int ret = afb_event_push(this->map_afb_event[evname], j);
+ if (ret != 0)
+ {
+ HMI_DEBUG("afb_event_push failed: %m");
+ }
+}
+
+void WindowManager::send_event(char const *evname, char const *label, char const *area,
+ int x, int y, int w, int h)
+{
+ HMI_DEBUG("%s: %s(%s, %s) x:%d y:%d w:%d h:%d",
+ __func__, evname, label, area, x, y, w, h);
+
+ json_object *j_rect = json_object_new_object();
+ json_object_object_add(j_rect, kKeyX, json_object_new_int(x));
+ json_object_object_add(j_rect, kKeyY, json_object_new_int(y));
+ json_object_object_add(j_rect, kKeyWidth, json_object_new_int(w));
+ json_object_object_add(j_rect, kKeyHeight, json_object_new_int(h));
+
+ json_object *j = json_object_new_object();
+ json_object_object_add(j, kKeyDrawingName, json_object_new_string(label));
+ json_object_object_add(j, kKeyDrawingArea, json_object_new_string(area));
+ json_object_object_add(j, kKeyDrawingRect, j_rect);
+
+ int ret = afb_event_push(this->map_afb_event[evname], j);
+ if (ret != 0)
+ {
+ HMI_DEBUG("afb_event_push failed: %m");
+ }
+}
+
+string WindowManager::searchApp(unsigned pid, unsigned ppid, unsigned surface, json_object* resp)
+{
+ // retrieve appid from pid from application manager
+ string appid;
+ // check appid then add it to the client
+ HMI_INFO("Runners:%s", json_object_get_string(resp));
+ int size = json_object_array_length(resp);
+ HMI_INFO("pid %d, ppid %d, surface %d",pid, ppid, surface);
+ for(int i = 0; i < size; i++)
+ {
+ json_object *j = json_object_array_get_idx(resp, i);
+ int runid = jh::getIntFromJson(j, "runid");
+ const char* id = jh::getStringFromJson(j, "id");
+ HMI_DEBUG("Appid %s, runid %d", id, runid);
+ if(id && (runid == ppid))
+ {
+ string s_id = id;
+ s_id.erase(s_id.find('@'));
+ appid = s_id;
+ HMI_INFO("App found %s", appid.c_str());
+ break;
+ }
+ }
+ if(appid.empty())
+ {
+ HMI_WARNING("Failed to retrieve id");
+ }
+ return appid;
+}
+
+void WindowManager::storeSurface(const string& appid, unsigned ppid, unsigned surface)
+{
+ auto elem = std::find_if(this->tmp_services.begin(), this->tmp_services.end(),
+ [&appid](TmpService& ts){
+ return (ts.dest == appid );
+ });
+
+ this->lc->setXDGSurfaceOriginSize(surface);
+ if(elem != this->tmp_services.end())
+ {
+ // attachApp
+ auto client = g_app_list.lookUpClient(elem->dest);
+ if(client == nullptr)
+ {
+ return;
+ }
+ HMI_INFO("Attach surface %d (service %s) to app %s", surface, elem->service.c_str(), elem->dest.c_str());
+ client->attachServiceSurface(elem->service, surface);
+ }
+ else
+ {
+ // setRole
+ auto client = g_app_list.lookUpClient(appid);
+ if(client != nullptr)
+ {
+ client->addSurface(surface);
+ this->id_alloc.register_name_id(client->role(), surface);
+ }
+ else
+ {
+ // Store tmp surface and appid for application
+ // who requests setRole after creating shell surface
+ this->tmp_surface2app.emplace(surface, TmpClient{appid, ppid});
+ }
+ }
+}
+
+/**
+ * proxied events
+ */
+void WindowManager::surface_created(unsigned pid, unsigned surface_id)
+{
+ // requestSurface
+ if(this->tmp_surface2app.count(surface_id) != 0)
+ {
+ string appid = this->tmp_surface2app[surface_id].appid;
+ auto client = g_app_list.lookUpClient(appid);
+ if(client != nullptr)
+ {
+ WMError ret = client->addSurface(surface_id);
+ HMI_INFO("Add surface %d to \"%s\"", surface_id, appid.c_str());
+ if(ret != WMError::SUCCESS)
+ {
+ HMI_ERROR("Failed to add surface to client %s", client->appID().c_str());
+ }
+ }
+ this->tmp_surface2app.erase(surface_id);
+ }
+ else
+ {
+ HMI_NOTICE("Unknown surface %d", surface_id);
+ // retrieve ppid
+ std::ostringstream os;
+ os << pid ;
+ string path = "/proc/" + os.str() + "/stat";
+ std::ifstream ifs(path.c_str());
+ string str;
+ unsigned ppid = 0;
+ if(!ifs.fail() && std::getline(ifs, str))
+ {
+ std::sscanf(str.data(), "%*d %*s %*c %d", &ppid);
+ HMI_INFO("Retrieve ppid %d", ppid);
+ }
+ else
+ {
+ HMI_ERROR("Failed to open /proc/%d/stat", pid);
+ HMI_ERROR("File system may be different");
+ return;
+ }
+ struct AfbClosure* c = new struct AfbClosure(pid, ppid, surface_id);
+ // search pid from surfaceID
+ afb_service_call("afm-main", "runners", json_object_new_object(),
+ [](void* closure, int stat, json_object* resp){
+ HMI_DEBUG("check %s", json_object_get_string(resp));
+ struct AfbClosure* c = static_cast<struct AfbClosure*>(closure);
+ HMI_DEBUG("check");
+ if(stat != 0)
+ {
+ HMI_ERROR("Failed to call runners");
+ }
+ else
+ {
+ json_object* j;
+ json_object_object_get_ex(resp, "response", &j);
+ string appid = g_context->searchApp(c->pid, c->ppid, c->surface, j);
+ if(!appid.empty())
+ {
+ g_context->storeSurface(appid, c->ppid, c->surface);
+ }
+ }
+ json_object_put(resp);
+ delete c;
+ }, c);
+ }
+}
+
+void WindowManager::surface_removed(unsigned surface_id)
+{
+ HMI_DEBUG("Delete surface_id %u", surface_id);
+ this->id_alloc.remove_id(surface_id);
+ // this->layers.remove_surface(surface_id);
+ g_app_list.removeSurface(surface_id);
+}
+
+void WindowManager::removeClient(const string &appid)
+{
+ HMI_DEBUG("Remove clinet %s from list", appid.c_str());
+ auto client = g_app_list.lookUpClient(appid);
+ this->lc->terminateApp(client);
+ g_app_list.removeClient(appid);
+}
+
+void WindowManager::exceptionProcessForTransition()
+{
+ unsigned req_num = g_app_list.currentRequestNumber();
+ HMI_SEQ_NOTICE(req_num, "Process exception handling for request. Remove current request %d", req_num);
+ g_app_list.removeRequest(req_num);
+ HMI_SEQ_NOTICE(g_app_list.currentRequestNumber(), "Process next request if exists");
+ this->processNextRequest();
+}
+
+void WindowManager::analyzeReceivedEvent(const char *event, struct json_object *object)
+{
+ HMI_DEBUG("event:%s", event);
+
+ // If receive low can signal
+ if (strstr(event, "low-can"))
+ {
+ // Analyze low can signal
+ const char *signal_name = this->lcc.analyzeCanSignal(object);
+
+ // Create task for car state and input it to PolicyManager
+ Task task = this->convertCanSignalToCarStateTask(signal_name);
+ if (Task::TASK_INVALID != task)
+ {
+ this->inputCarStateTask(task);
+ }
+ }
+}
+
+void WindowManager::timerHandler()
+{
+ unsigned req_num = g_app_list.currentRequestNumber();
+ HMI_SEQ_DEBUG(req_num, "Timer expired remove Request");
+ g_app_list.reqDump();
+ g_app_list.removeRequest(req_num);
+ this->processNextRequest();
+}
+
+void WindowManager::startTransitionWrapper(vector<WMAction> &actions)
+{
+ WMError ret = WMError::UNKNOWN;
+ // req_num is guaranteed by Window Manager
+ unsigned req_num = g_app_list.currentRequestNumber();
+ Task task = Task::TASK_INVALID;
+
+ if (actions.empty())
+ {
+ if (g_app_list.haveRequest())
+ {
+ HMI_SEQ_DEBUG(req_num, "There is no WMAction for this request");
+ goto proc_remove_request;
+ }
+ else
+ {
+ HMI_SEQ_DEBUG(req_num, "There is no request");
+ return;
+ }
+ }
+
+ // Check weather there is the no request task
+ // [The no request task]
+ // - TaskCarState::RESTRICTION_MODE_OFF
+ // - TaskCarState::RESTRICTION_MODE_ON
+ for (const auto &act : actions)
+ {
+ if (TaskCarState::RESTRICTION_MODE_OFF == act.car_state)
+ {
+ task = Task::TASK_RESTRICTION_MODE_OFF;
+ break;
+ }
+ else if (TaskCarState::RESTRICTION_MODE_ON == act.car_state)
+ {
+ task = Task::TASK_RESTRICTION_MODE_ON;
+ break;
+ }
+ }
+
+ // If there is the request-less task, set request here
+ if (Task::TASK_INVALID != task) {
+ unsigned req_num;
+ ret = this->setRequest(task, &req_num);
+
+ if(ret != WMError::SUCCESS)
+ {
+ goto error;
+ }
+ }
+
+ for (auto &act : actions)
+ {
+ if ("" != act.role)
+ {
+ bool found;
+ auto const &surface_id = this->id_alloc.lookup(act.role.c_str());
+ if(surface_id == nullopt)
+ {
+ HMI_SEQ_DEBUG(req_num, "There is not surface id for role:%s", act.role.c_str());
+ continue;
+ }
+
+ std::string appid = g_app_list.getAppID(*surface_id, &found);
+ if (!found)
+ {
+ if (TaskVisible::INVISIBLE == act.visible)
+ {
+ HMI_SEQ_DEBUG(req_num, "role:%s is killed, so do not set this action", act.role.c_str());
+ continue;
+ }
+ else
+ {
+ HMI_SEQ_ERROR(req_num, "appid of role:%s which is visible is not found", act.role.c_str());
+ ret = WMError::FAIL;
+ goto error;
+ }
+ }
+ auto client = g_app_list.lookUpClient(appid);
+ act.req_num = req_num;
+ act.client = client;
+
+ // If Window Manager is master and this action is for slave,
+ // change TaskVisible
+ if (this->wmcon.isMasterMode())
+ {
+ if (this->wmcon.isMasterArea(act.area.c_str()))
+ {
+ HMI_DEBUG("Set TaskVisible::REQ_REMOTE_VISIBLE");
+ act.visible = TaskVisible::REQ_REMOTE_VISIBLE;
+ }
+ // TODO: Check whether role is tbtnavi to request remote invisible
+ else if (("tbtnavi" == act.role) &&
+ (TaskVisible::INVISIBLE == act.visible))
+ {
+ HMI_DEBUG("Set TaskVisible::REQ_REMOTE_INVISIBLE");
+ act.visible = TaskVisible::REQ_REMOTE_INVISIBLE;
+ }
+ }
+ }
+
+ ret = g_app_list.setAction(req_num, act);
+ if (ret != WMError::SUCCESS)
+ {
+ HMI_SEQ_ERROR(req_num, "Setting action is failed");
+ goto error;
+ }
+ }
+
+ HMI_SEQ_DEBUG(req_num, "Start transition.");
+ ret = this->startTransition(req_num);
+ if (ret != WMError::SUCCESS)
+ {
+ if (ret == WMError::NO_LAYOUT_CHANGE)
+ {
+ goto proc_remove_request;
+ }
+ else
+ {
+ HMI_SEQ_ERROR(req_num, "Transition state is failed");
+ goto error;
+ }
+ }
+
+ return;
+
+error:
+ //this->emit_error()
+ HMI_SEQ_ERROR(req_num, errorDescription(ret));
+ this->pmw.undoState();
+
+proc_remove_request:
+ g_app_list.removeRequest(req_num);
+ this->processNextRequest();
+}
+
+void WindowManager::processError(WMError error)
+{
+ unsigned req_num = g_app_list.currentRequestNumber();
+
+ //this->emit_error()
+ HMI_SEQ_ERROR(req_num, errorDescription(error));
+ g_app_list.removeRequest(req_num);
+ this->processNextRequest();
+}
+
+void WindowManager::processForRemoteRequest(json_object *data)
+{
+ const char *req = jh::getStringFromJson(data, "req");
+ const char *appid = jh::getStringFromJson(data, "appid");
+ const char *drawing_name = jh::getStringFromJson(data, "drawing_name");
+ const char *drawing_area = jh::getStringFromJson(data, "drawing_area");
+
+ if (!req || !drawing_name)
+ {
+ HMI_ERROR("Parse Error!!");
+ return;
+ }
+
+ if (this->wmcon.isMasterMode())
+ {
+ if (!appid)
+ {
+ HMI_ERROR("Parse Error!!");
+ return;
+ }
+
+ auto reply = [](const char *errmsg) {
+ if (errmsg != nullptr)
+ {
+ HMI_ERROR(errmsg);
+ return;
+ }
+ };
+
+ if ("activateWindow" == std::string(req))
+ {
+ if (!drawing_area)
+ {
+ HMI_ERROR("Parse Error!!");
+ return;
+ }
+
+ this->api_activate_surface_for_slave(
+ appid, drawing_name, drawing_area, reply);
+ }
+ else if ("deactivateWindow" == std::string(req))
+ {
+ this->api_deactivate_surface_for_slave(
+ appid, drawing_name, reply);
+ }
+ else if ("endDraw" == std::string(req))
+ {
+ this->api_enddraw(appid, drawing_name);
+ }
+ }
+ else
+ {
+ if ("syncDraw" == std::string(req))
+ {
+ this->stopTimer();
+
+ if (!appid || !drawing_area)
+ {
+ HMI_ERROR("Parse Error!!");
+ return;
+ }
+
+ unsigned req_num = g_app_list.currentRequestNumber();
+ auto client = g_app_list.lookUpClient(appid);
+
+ // TODO: application requests by old role,
+ // so convert role old to new
+ const char *c_role = this->convertRoleOldToNew(drawing_name);
+
+ // Create action
+ bool end_draw_finished = false;
+ WMAction act
+ {
+ req_num,
+ client,
+ string(c_role),
+ string(drawing_area),
+ TaskVisible::REMOTE_VISIBLE,
+ end_draw_finished,
+ TaskCarState::NO_TASK
+ };
+
+ // Set action
+ WMError ret = g_app_list.setAction(req_num, act);
+ if (ret != WMError::SUCCESS)
+ {
+ HMI_SEQ_ERROR(req_num, "Setting action is failed");
+ return;
+ }
+
+ this->emit_syncdraw(string(drawing_name), string(drawing_area));
+ this->wmcon.startSyncDrawForRemote(appid);
+ this->setTimer();
+ }
+ else if ("activated" == std::string(req))
+ {
+ this->emit_visible(drawing_name);
+ this->emit_activated(drawing_name);
+ }
+ else if ("deactivated" == std::string(req))
+ {
+ this->stopTimer();
+
+ if (!appid || !drawing_area)
+ {
+ HMI_ERROR("Parse Error!!");
+ return;
+ }
+
+ unsigned req_num = g_app_list.currentRequestNumber();
+ auto client = g_app_list.lookUpClient(appid);
+
+ // TODO: application requests by old role,
+ // so convert role old to new
+ const char *c_role = this->convertRoleOldToNew(drawing_name);
+
+ // Create action
+ bool end_draw_finished = true;
+ WMAction act
+ {
+ req_num,
+ client,
+ string(c_role),
+ "",
+ TaskVisible::REMOTE_INVISIBLE,
+ end_draw_finished,
+ TaskCarState::NO_TASK
+ };
+
+ this->lc->visibilityChange(act);
+ this->lc->renderLayers();
+ this->lc->renderLayersRemote();
+
+ this->emit_invisible(drawing_name);
+ this->emit_deactivated(drawing_name);
+ this->emitScreenUpdated(req_num);
+
+ g_app_list.removeRequest(req_num);
+ this->processNextRequest();
+ }
+ else if ("flushDraw" == std::string(req))
+ {
+ this->emit_flushdraw(drawing_name);
+ }
+ }
+}
+
+/*
+ ******* Private Functions *******
+ */
+
+void WindowManager::emit_activated(char const *label)
+{
+ this->send_event(kListEventName[Event_Active], label);
+}
+
+void WindowManager::emit_deactivated(char const *label)
+{
+ this->send_event(kListEventName[Event_Inactive], label);
+}
+
+void WindowManager::emit_syncdraw(char const *label, char const *area, int x, int y, int w, int h)
+{
+ this->send_event(kListEventName[Event_SyncDraw], label, area, x, y, w, h);
+}
+
+void WindowManager::emit_syncdraw(const string &role, const string &area)
+{
+ rect rect = this->lc->getAreaSize(area);
+ this->send_event(kListEventName[Event_SyncDraw],
+ role.c_str(), area.c_str(), rect.x, rect.y, rect.w, rect.h);
+}
+
+void WindowManager::emit_flushdraw(char const *label)
+{
+ this->send_event(kListEventName[Event_FlushDraw], label);
+}
+
+void WindowManager::emit_visible(char const *label, bool is_visible)
+{
+ this->send_event(is_visible ? kListEventName[Event_Visible] : kListEventName[Event_Invisible], label);
+}
+
+void WindowManager::emit_invisible(char const *label)
+{
+ return emit_visible(label, false);
+}
+
+void WindowManager::emit_visible(char const *label) { return emit_visible(label, true); }
+
+void WindowManager::emitHeadlampOff()
+{
+ // Send HeadlampOff event for all application
+ this->send_event(kListEventName[Event_HeadlampOff]);
+}
+
+void WindowManager::emitHeadlampOn()
+{
+ // Send HeadlampOn event for all application
+ this->send_event(kListEventName[Event_HeadlampOn]);
+}
+
+void WindowManager::emitParkingBrakeOff()
+{
+ // Send ParkingBrakeOff event for all application
+ this->send_event(kListEventName[Event_ParkingBrakeOff]);
+}
+
+void WindowManager::emitParkingBrakeOn()
+{
+ // Send ParkingBrakeOn event for all application
+ this->send_event(kListEventName[Event_ParkingBrakeOn]);
+}
+
+void WindowManager::emitLightstatusBrakeOff()
+{
+ // Send LightstatusBrakeOff event for all application
+ this->send_event(kListEventName[Event_LightstatusBrakeOff]);
+}
+
+void WindowManager::emitLightstatusBrakeOn()
+{
+ // Send LightstatusBrakeOn event for all application
+ this->send_event(kListEventName[Event_LightstatusBrakeOn]);
+}
+
+void WindowManager::emitCarStop()
+{
+ // Send CarStop event for all application
+ this->send_event(kListEventName[Event_CarStop]);
+}
+
+void WindowManager::emitCarRun()
+{
+ // Send CarRun event for all application
+ this->send_event(kListEventName[Event_CarRun]);
+}
+
+WMError WindowManager::setRequest(const string& appid, const string &role, const string &area,
+ Task task, unsigned* req_num)
+{
+ if (!g_app_list.contains(appid))
+ {
+ return WMError::NOT_REGISTERED;
+ }
+
+ auto client = g_app_list.lookUpClient(appid);
+
+ /*
+ * Queueing Phase
+ */
+ unsigned current = g_app_list.currentRequestNumber();
+ unsigned requested_num = g_app_list.getRequestNumber(appid);
+ if (requested_num != 0)
+ {
+ HMI_SEQ_INFO(requested_num,
+ "%s %s %s request is already queued", appid.c_str(), role.c_str(), area.c_str());
+ return REQ_REJECTED;
+ }
+
+ WMRequest req = WMRequest(appid, role, area, task);
+ unsigned new_req = g_app_list.addRequest(req);
+ *req_num = new_req;
+ g_app_list.reqDump();
+
+ HMI_SEQ_DEBUG(current, "%s start sequence with %s, %s", appid.c_str(), role.c_str(), area.c_str());
+
+ return WMError::SUCCESS;
+}
+
+WMError WindowManager::setRequest(Task task, unsigned* req_num)
+{
+ /*
+ * Queueing Phase
+ */
+ unsigned current = g_app_list.currentRequestNumber();
+
+ WMRequest req = WMRequest(task);
+ unsigned new_req = g_app_list.addRequest(req);
+ *req_num = new_req;
+ g_app_list.reqDump();
+
+ HMI_SEQ_DEBUG(current, "start sequence for task:%d", task);
+
+ return WMError::SUCCESS;
+}
+
+WMError WindowManager::setRequestForSlave(const string& appid, const string &role, const string &area,
+ Task task, unsigned* req_num)
+{
+ /*
+ * Queueing Phase
+ */
+ unsigned current = g_app_list.currentRequestNumber();
+ unsigned requested_num = g_app_list.getRequestNumber(appid);
+ if (requested_num != 0)
+ {
+ HMI_SEQ_INFO(requested_num,
+ "%s %s %s request is already queued", appid.c_str(), role.c_str(), area.c_str());
+ return REQ_REJECTED;
+ }
+
+ WMRequest req = WMRequest(appid, role, area, task);
+ unsigned new_req = g_app_list.addRequest(req);
+ *req_num = new_req;
+ g_app_list.reqDump();
+
+ HMI_SEQ_DEBUG(current, "%s start sequence with %s, %s", appid.c_str(), role.c_str(), area.c_str());
+
+ return WMError::SUCCESS;
+}
+
+WMError WindowManager::checkPolicy(unsigned req_num)
+{
+ /*
+ * Check Policy
+ */
+ // get current trigger
+ bool found = false;
+ WMError ret = WMError::LAYOUT_CHANGE_FAIL;
+ auto trigger = g_app_list.getRequest(req_num, &found);
+ if (!found)
+ {
+ ret = WMError::NO_ENTRY;
+ return ret;
+ }
+ string req_area = trigger.area;
+
+ if (trigger.task == Task::TASK_ALLOCATE)
+ {
+ const char *msg = this->check_surface_exist(trigger.role.c_str());
+
+ if (msg)
+ {
+ HMI_SEQ_ERROR(req_num, msg);
+ return ret;
+ }
+ }
+
+ // Input event data to PolicyManager
+ if (0 > this->pmw.setInputEventData(trigger.task, trigger.role, trigger.area))
+ {
+ HMI_SEQ_ERROR(req_num, "Failed to set input event data to PolicyManager");
+ return ret;
+ }
+
+ // Execute state transition of PolicyManager
+ if (0 > this->pmw.executeStateTransition())
+ {
+ HMI_SEQ_ERROR(req_num, "Failed to execute state transition of PolicyManager");
+ return ret;
+ }
+
+ ret = WMError::SUCCESS;
+
+ g_app_list.reqDump();
+
+ return ret;
+}
+
+WMError WindowManager::checkPolicyForSlave(unsigned req_num)
+{
+ /*
+ * Check Policy
+ */
+ // get current trigger
+ bool found = false;
+ WMError ret = WMError::LAYOUT_CHANGE_FAIL;
+ auto trigger = g_app_list.getRequest(req_num, &found);
+ if (!found)
+ {
+ ret = WMError::NO_ENTRY;
+ return ret;
+ }
+ string req_area = trigger.area;
+
+ // Input event data to PolicyManager
+ if (0 > this->pmw.setInputEventData(trigger.task, trigger.role, trigger.area))
+ {
+ HMI_SEQ_ERROR(req_num, "Failed to set input event data to PolicyManager");
+ return ret;
+ }
+
+ // Execute state transition of PolicyManager
+ if (0 > this->pmw.executeStateTransition())
+ {
+ HMI_SEQ_ERROR(req_num, "Failed to execute state transition of PolicyManager");
+ return ret;
+ }
+
+ ret = WMError::SUCCESS;
+
+ g_app_list.reqDump();
+
+ return ret;
+}
+
+WMError WindowManager::startTransition(unsigned req_num)
+{
+ bool sync_draw_happen = false;
+ bool found = false;
+ WMError ret = WMError::SUCCESS;
+ auto actions = g_app_list.getActions(req_num, &found);
+ if (!found)
+ {
+ ret = WMError::NO_ENTRY;
+ HMI_SEQ_ERROR(req_num,
+ "Window Manager bug :%s : Action is not set", errorDescription(ret));
+ return ret;
+ }
+
+ g_app_list.reqDump();
+ for (const auto &action : actions)
+ {
+ // TODO: application requests by old role,
+ // so convert role new to old for emitting event
+ string old_role = this->rolenew2old[action.role];
+
+ if (action.visible == TaskVisible::VISIBLE)
+ {
+ sync_draw_happen = true;
+
+ this->emit_syncdraw(old_role, action.area);
+ /* TODO: emit event for app not subscriber
+ if(g_app_list.contains(y.appid))
+ g_app_list.lookUpClient(y.appid)->emit_syncdraw(y.role, y.area); */
+ }
+ else if(action.visible == TaskVisible::REQ_REMOTE_VISIBLE)
+ {
+ // If this action is for slave, send to slave
+ this->wmcon.sendRequest("syncDraw", action.client->appID().c_str(),
+ old_role.c_str(), action.area.c_str());
+ }
+ else if (action.car_state != TaskCarState::NO_TASK)
+ {
+ this->transitionCarState(action.car_state);
+ }
+ }
+
+ if (sync_draw_happen)
+ {
+ this->setTimer();
+ }
+ else
+ {
+ // deactivate only, no syncDraw
+ // Make it deactivate here
+ for (const auto &x : actions)
+ {
+ this->lc->visibilityChange(x);
+ string old_role = this->rolenew2old[x.role];
+
+ if (x.visible == TaskVisible::INVISIBLE)
+ {
+ emit_deactivated(old_role.c_str());
+ }
+ else if (x.visible == TaskVisible::REQ_REMOTE_INVISIBLE)
+ {
+ // If this action is for slave, send to slave
+ int i_ret = this->wmcon.sendRequest("deactivated", x.client->appID().c_str(),
+ old_role.c_str(), "");
+ if (0 > i_ret)
+ {
+ ret = WMError::FAIL;
+ }
+ }
+
+ /* if (g_app_list.contains(x.appid))
+ {
+ auto client = g_app_list.lookUpClient(x.appid);
+ //this->deactivate(client->surfaceID(x.role));
+ } */
+ }
+ this->lc->renderLayers();
+ this->lc->renderLayersRemote();
+ ret = WMError::NO_LAYOUT_CHANGE;
+ }
+ return ret;
+}
+
+void WindowManager::transitionCarState(TaskCarState task)
+{
+ if (TaskCarState::PARKING_BRAKE_OFF == task)
+ {
+ this->crr_car_info.parking_brake_stt = false;
+ this->emitParkingBrakeOff();
+ }
+ else if (TaskCarState::PARKING_BRAKE_ON == task)
+ {
+ this->crr_car_info.parking_brake_stt = true;
+ this->emitParkingBrakeOn();
+ }
+ else if (TaskCarState::ACCEL_PEDAL_OFF == task)
+ {
+ this->crr_car_info.accel_pedal_stt = false;
+ }
+ else if (TaskCarState::ACCEL_PEDAL_ON == task)
+ {
+ this->crr_car_info.accel_pedal_stt = true;
+ }
+ else if (TaskCarState::HEDLAMP_OFF == task)
+ {
+ this->crr_car_info.headlamp_stt = false;
+ this->emitHeadlampOff();
+ }
+ else if (TaskCarState::HEDLAMP_ON == task)
+ {
+ this->crr_car_info.headlamp_stt = true;
+ this->emitHeadlampOn();
+ }
+ else if (TaskCarState::LIGHTSTATUS_BRAKE_OFF == task)
+ {
+ this->crr_car_info.lightstatus_brake_stt = false;
+ this->emitLightstatusBrakeOff();
+ }
+ else if (TaskCarState::LIGHTSTATUS_BRAKE_ON == task)
+ {
+ this->crr_car_info.lightstatus_brake_stt = true;
+ this->emitLightstatusBrakeOn();
+ }
+ else if (TaskCarState::CAR_STOP == task)
+ {
+ this->crr_car_info.running_stt = false;
+ this->emitCarStop();
+ }
+ else if (TaskCarState::CAR_RUN == task)
+ {
+ this->crr_car_info.running_stt = true;
+ this->emitCarRun();
+ }
+}
+
+WMError WindowManager::doEndDraw(unsigned req_num)
+{
+ // get actions
+ bool found;
+ auto actions = g_app_list.getActions(req_num, &found);
+ WMError ret = WMError::SUCCESS;
+ if (!found)
+ {
+ ret = WMError::NO_ENTRY;
+ return ret;
+ }
+
+ HMI_SEQ_INFO(req_num, "do endDraw");
+
+ // layout change and make it visible
+ for (const auto &act : actions)
+ {
+ if(act.visible != TaskVisible::NO_CHANGE)
+ {
+ // layout change
+ ret = this->lc->layoutChange(act);
+ if(ret != WMError::SUCCESS)
+ {
+ HMI_SEQ_WARNING(req_num,
+ "Failed to manipulate surfaces while state change : %s", errorDescription(ret));
+ return ret;
+ }
+ ret = this->lc->visibilityChange(act);
+
+ // Emit active/deactive event
+ string old_role = this->rolenew2old[act.role];
+ if(act.visible == TaskVisible::VISIBLE)
+ {
+ emit_visible(old_role.c_str());
+ emit_activated(old_role.c_str());
+ }
+ else if(act.visible == TaskVisible::REQ_REMOTE_VISIBLE)
+ {
+ // If this action is for slave, send to slave
+ int i_ret = this->wmcon.sendRequest("activated", "", old_role.c_str(), "");
+ if (0 > i_ret)
+ {
+ ret = WMError::FAIL;
+ }
+ }
+ else if(act.visible == TaskVisible::REQ_REMOTE_INVISIBLE)
+ {
+ // If this action is for slave, send to slave
+ int i_ret = this->wmcon.sendRequest("deactivated", "", old_role.c_str(), "");
+ if (0 > i_ret)
+ {
+ ret = WMError::FAIL;
+ }
+ }
+ else if((act.visible == TaskVisible::REMOTE_VISIBLE) ||
+ (act.visible == TaskVisible::REMOTE_INVISIBLE))
+ {
+ // nop because emit active/deactive by event from remote
+ }
+ else
+ {
+ emit_invisible(old_role.c_str());
+ emit_deactivated(old_role.c_str());
+ }
+
+ if (ret != WMError::SUCCESS)
+ {
+ HMI_SEQ_WARNING(req_num,
+ "Failed to manipulate surfaces while state change : %s", errorDescription(ret));
+ return ret;
+ }
+ HMI_SEQ_DEBUG(req_num, "visible %s", act.role.c_str());
+ }
+ }
+ this->lc->renderLayers();
+ this->lc->renderLayersRemote();
+
+ HMI_SEQ_INFO(req_num, "emit flushDraw");
+
+ for(const auto &act_flush : actions)
+ {
+ // TODO: application requests by old role,
+ // so convert role new to old for emitting event
+ string old_role = this->rolenew2old[act_flush.role];
+
+ if(act_flush.visible == TaskVisible::VISIBLE)
+ {
+ this->emit_flushdraw(old_role.c_str());
+ }
+ else if(act_flush.visible == TaskVisible::REQ_REMOTE_VISIBLE)
+ {
+ // If this action is for slave, send to slave
+ this->wmcon.sendRequest("flushDraw", "", old_role.c_str(), "");
+ }
+ }
+
+ return ret;
+}
+
+void WindowManager::emitScreenUpdated(unsigned req_num)
+{
+ // Get visible apps
+ HMI_SEQ_DEBUG(req_num, "emit screen updated");
+ bool found = false;
+ auto actions = g_app_list.getActions(req_num, &found);
+
+ HMI_DEBUG("@@@@@");
+ // create json object
+ json_object *j = json_object_new_object();
+ json_object *jarray = json_object_new_array();
+
+ for(const auto& action: actions)
+ {
+ if((action.visible == TaskVisible::VISIBLE) ||
+ (action.visible == TaskVisible::REMOTE_VISIBLE))
+ {
+ json_object_array_add(jarray, json_object_new_string(action.client->appID().c_str()));
+ }
+ }
+ json_object_object_add(j, kKeyIds, jarray);
+ HMI_SEQ_INFO(req_num, "Visible app: %s", json_object_get_string(j));
+
+ int ret = afb_event_push(
+ this->map_afb_event[kListEventName[Event_ScreenUpdated]], j);
+ if (ret != 0)
+ {
+ HMI_DEBUG("afb_event_push failed: %m");
+ }
+}
+
+void WindowManager::setTimer()
+{
+ struct timespec ts;
+ if (clock_gettime(CLOCK_BOOTTIME, &ts) != 0) {
+ HMI_ERROR("Could't set time (clock_gettime() returns with error");
+ return;
+ }
+
+ HMI_SEQ_DEBUG(g_app_list.currentRequestNumber(), "Timer set activate");
+ if (g_timer_ev_src == nullptr)
+ {
+ // firsttime set into sd_event
+ int ret = sd_event_add_time(afb_daemon_get_event_loop(), &g_timer_ev_src,
+ CLOCK_BOOTTIME, (uint64_t)(ts.tv_sec + kTimeOut) * 1000000ULL, 1, processTimerHandler, this);
+ if (ret < 0)
+ {
+ HMI_ERROR("Could't set timer");
+ }
+ }
+ else
+ {
+ // update timer limitation after second time
+ sd_event_source_set_time(g_timer_ev_src, (uint64_t)(ts.tv_sec + kTimeOut) * 1000000ULL);
+ sd_event_source_set_enabled(g_timer_ev_src, SD_EVENT_ONESHOT);
+ }
+}
+
+void WindowManager::stopTimer()
+{
+ unsigned req_num = g_app_list.currentRequestNumber();
+ HMI_SEQ_DEBUG(req_num, "Timer stop");
+ int rc = sd_event_source_set_enabled(g_timer_ev_src, SD_EVENT_OFF);
+ if (rc < 0)
+ {
+ HMI_SEQ_ERROR(req_num, "Timer stop failed");
+ }
+}
+
+void WindowManager::processNextRequest()
+{
+ g_app_list.next();
+ g_app_list.reqDump();
+ unsigned req_num = g_app_list.currentRequestNumber();
+ if (g_app_list.haveRequest())
+ {
+ HMI_SEQ_DEBUG(req_num, "Process next request");
+ WMError rc = checkPolicy(req_num);
+ if (rc != WMError::SUCCESS)
+ {
+ HMI_SEQ_ERROR(req_num, errorDescription(rc));
+ }
+ }
+ else
+ {
+ HMI_SEQ_DEBUG(req_num, "Nothing Request. Waiting Request");
+ }
+}
+
+const char* WindowManager::convertRoleOldToNew(char const *old_role)
+{
+ const char *new_role = nullptr;
+
+ for (auto const &on : this->roleold2new)
+ {
+ std::regex regex = std::regex(on.first);
+ if (std::regex_match(old_role, regex))
+ {
+ // role is old. So convert to new.
+ new_role = on.second.c_str();
+ break;
+ }
+ }
+
+ if (nullptr == new_role)
+ {
+ // role is new or fallback.
+ new_role = old_role;
+ }
+
+ HMI_DEBUG("old:%s -> new:%s", old_role, new_role);
+
+ return new_role;
+}
+
+int WindowManager::loadOldRolesConfigFile()
+{
+ // Get afm application installed dir
+ char const *afm_app_install_dir = getenv("AFM_APP_INSTALL_DIR");
+ HMI_DEBUG("afm_app_install_dir:%s", afm_app_install_dir);
+
+ string file_name;
+ if (!afm_app_install_dir)
+ {
+ HMI_ERROR("AFM_APP_INSTALL_DIR is not defined");
+ }
+ else
+ {
+ file_name = string(afm_app_install_dir) + string(kPathOldRolesConfigFile);
+ }
+
+ // Load old_rolea config file
+ json_object* json_obj;
+ int ret = jh::inputJsonFilie(file_name.c_str(), &json_obj);
+ if (0 > ret)
+ {
+ HMI_ERROR("Could not open %s, so use default old_roles information", kPathOldRolesConfigFile);
+ json_obj = json_tokener_parse(kDefaultOldRolesConfig);
+ }
+ HMI_DEBUG("json_obj dump:%s", json_object_get_string(json_obj));
+
+ // Perse apps
+ json_object* json_cfg;
+ if (!json_object_object_get_ex(json_obj, "old_roles", &json_cfg))
+ {
+ HMI_ERROR("Parse Error!!");
+ return -1;
+ }
+
+ int len = json_object_array_length(json_cfg);
+ HMI_DEBUG("json_cfg len:%d", len);
+ HMI_DEBUG("json_cfg dump:%s", json_object_get_string(json_cfg));
+
+ for (int i=0; i<len; i++)
+ {
+ json_object* json_tmp = json_object_array_get_idx(json_cfg, i);
+
+ const char* old_role = jh::getStringFromJson(json_tmp, "name");
+ if (nullptr == old_role)
+ {
+ HMI_ERROR("Parse Error!!");
+ return -1;
+ }
+
+ const char* new_role = jh::getStringFromJson(json_tmp, "new");
+ if (nullptr == new_role)
+ {
+ HMI_ERROR("Parse Error!!");
+ return -1;
+ }
+
+ this->roleold2new[old_role] = string(new_role);
+ }
+
+ // Check
+ for(auto itr = this->roleold2new.begin();
+ itr != this->roleold2new.end(); ++itr)
+ {
+ HMI_DEBUG(">>> role old:%s new:%s",
+ itr->first.c_str(), itr->second.c_str());
+ }
+
+ // Release json_object
+ json_object_put(json_obj);
+
+ return 0;
+}
+
+Task WindowManager::convertCanSignalToCarStateTask(const char *signal_name)
+{
+ wm::LowCanClient *lcc = &(this->lcc);
+ Task task = Task::TASK_INVALID;
+
+ // If car info is updated, set car state change event
+ if (strstr(signal_name, lcc->kSignalName[lcc->SignalNoParkingBrake]))
+ {
+ HMI_DEBUG("Parking Brake state is changed");
+
+ if (lcc->getCurrentParkingBrakeState())
+ {
+ task = wm::Task::TASK_PARKING_BRAKE_ON;
+ }
+ else
+ {
+ task = wm::Task::TASK_PARKING_BRAKE_OFF;
+ }
+ }
+ else if (strstr(signal_name, lcc->kSignalName[lcc->SignalNoAccelPedalPos]))
+ {
+ // Update accel pedal position
+ this->crr_car_info.accel_pedal_pos = lcc->getCurrentAccelPedalPosition();
+
+ if (lcc->isChangedAccelPedalState())
+ {
+ HMI_DEBUG("Accelerator Pedal state is changed");
+
+ if (lcc->getCurrentAccelPedalState())
+ {
+ task = wm::Task::TASK_ACCEL_PEDAL_ON;
+ }
+ else
+ {
+ task = wm::Task::TASK_ACCEL_PEDAL_OFF;
+ }
+ }
+ }
+ else if (strstr(signal_name, lcc->kSignalName[lcc->SignalNoHeadlame]))
+ {
+ HMI_DEBUG("Headlamp state is changed");
+
+ if (lcc->getCurrentHeadlampState())
+ {
+ task = wm::Task::TASK_HEDLAMP_ON;
+ }
+ else
+ {
+ task = wm::Task::TASK_HEDLAMP_OFF;
+ }
+ }
+ else if (strstr(signal_name, lcc->kSignalName[lcc->SignalNoLightstatusBrake]))
+ {
+ HMI_DEBUG("Lightstatus Brake state is changed");
+
+ if (lcc->getCurrentLightstatusBrakeState())
+ {
+ task = wm::Task::TASK_LIGHTSTATUS_BRAKE_ON;
+ }
+ else
+ {
+ task = wm::Task::TASK_LIGHTSTATUS_BRAKE_OFF;
+ }
+ }
+ return task;
+}
+
+void WindowManager::inputCarStateTask(Task task)
+{
+ unsigned req_num = 0;
+ WMError ret = WMError::UNKNOWN;
+
+ ret = this->setRequest(task, &req_num);
+
+ if(ret != WMError::SUCCESS)
+ {
+ HMI_ERROR(errorDescription(ret));
+ return;
+ }
+
+ if (req_num != g_app_list.currentRequestNumber())
+ {
+ // Add request, then invoked after the previous task is finished
+ HMI_SEQ_DEBUG(req_num, "request is accepted");
+ return;
+ }
+
+ /*
+ * Do allocate tasks
+ */
+ ret = this->checkPolicy(req_num);
+
+ if (ret != WMError::SUCCESS)
+ {
+ //this->emit_error()
+ HMI_SEQ_ERROR(req_num, errorDescription(ret));
+ g_app_list.removeRequest(req_num);
+ this->processNextRequest();
+ }
+}
+
+const char *WindowManager::check_surface_exist(const char *drawing_name)
+{
+ auto const &surface_id = this->id_alloc.lookup(string(drawing_name));
+ if (!surface_id)
+ {
+ return "Surface does not exist";
+ }
+
+ /* if (!this->controller->surface_exists(*surface_id))
+ {
+ return "Surface does not exist in controller!";
+ } */
+
+ /* auto layer_id = this->layers.get_layer_id(*surface_id);
+
+ if (!layer_id)
+ {
+ return "Surface is not on any layer!";
+ } */
+
+ HMI_DEBUG("surface %d is detected", *surface_id);
+ return nullptr;
+}
+
+const char* WindowManager::kDefaultOldRolesConfig = "{ \
+ \"old_roles\": [ \
+ { \
+ \"name\": \"HomeScreen\", \
+ \"new\": \"homescreen\" \
+ }, \
+ { \
+ \"name\": \"Music\", \
+ \"new\": \"music\" \
+ }, \
+ { \
+ \"name\": \"MediaPlayer\", \
+ \"new\": \"music\" \
+ }, \
+ { \
+ \"name\": \"Video\", \
+ \"new\": \"video\" \
+ }, \
+ { \
+ \"name\": \"VideoPlayer\", \
+ \"new\": \"video\" \
+ }, \
+ { \
+ \"name\": \"WebBrowser\", \
+ \"new\": \"browser\" \
+ }, \
+ { \
+ \"name\": \"Radio\", \
+ \"new\": \"radio\" \
+ }, \
+ { \
+ \"name\": \"Phone\", \
+ \"new\": \"phone\" \
+ }, \
+ { \
+ \"name\": \"Navigation\", \
+ \"new\": \"map\" \
+ }, \
+ { \
+ \"name\": \"HVAC\", \
+ \"new\": \"hvac\" \
+ }, \
+ { \
+ \"name\": \"Settings\", \
+ \"new\": \"settings\" \
+ }, \
+ { \
+ \"name\": \"Dashboard\", \
+ \"new\": \"dashboard\" \
+ }, \
+ { \
+ \"name\": \"POI\", \
+ \"new\": \"poi\" \
+ }, \
+ { \
+ \"name\": \"Mixer\", \
+ \"new\": \"mixer\" \
+ }, \
+ { \
+ \"name\": \"Restriction\", \
+ \"new\": \"restriction\" \
+ }, \
+ { \
+ \"name\": \"^OnScreen.*\", \
+ \"new\": \"on_screen\" \
+ } \
+ ] \
+}";
+
+} // namespace wm
diff --git a/demo#3/common/agl-service-windowmanager/src/window_manager.hpp b/demo#3/common/agl-service-windowmanager/src/window_manager.hpp
new file mode 100644
index 0000000..c4ad0f5
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/src/window_manager.hpp
@@ -0,0 +1,346 @@
+/*
+ * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef WINDOW_MANAGER_HPP
+#define WINDOW_MANAGER_HPP
+
+#include <atomic>
+#include <memory>
+#include <unordered_map>
+#include <experimental/optional>
+#include "result.hpp"
+#include "pm_wrapper.hpp"
+#include "util.hpp"
+#include "request.hpp"
+#include "wm_error.hpp"
+#include "wm_layer_control.hpp"
+#include "wm_connection.hpp"
+#include "low_can_client.hpp"
+extern "C"
+{
+#include <afb/afb-binding.h>
+}
+
+struct json_object;
+
+namespace wm
+{
+
+using std::experimental::optional;
+
+/* DrawingArea name used by "{layout}.{area}" */
+extern const char kNameLayoutNormal[];
+extern const char kNameLayoutSplit[];
+extern const char kNameAreaFull[];
+extern const char kNameAreaMain[];
+extern const char kNameAreaSub[];
+
+/* Key for json obejct */
+extern const char kKeyDrawingName[];
+extern const char kKeyDrawingArea[];
+extern const char kKeyDrawingRect[];
+extern const char kKeyX[];
+extern const char kKeyY[];
+extern const char kKeyWidth[];
+extern const char kKeyHeigh[];
+extern const char kKeyWidthPixel[];
+extern const char kKeyHeightPixel[];
+extern const char kKeyWidthMm[];
+extern const char kKeyHeightMm[];
+extern const char kKeyScale[];
+extern const char kKeyIds[];
+
+struct id_allocator
+{
+ unsigned next = 1;
+
+ // Surfaces that where requested but not yet created
+ std::unordered_map<unsigned, std::string> id2name;
+ std::unordered_map<std::string, unsigned> name2id;
+
+ id_allocator(id_allocator const &) = delete;
+ id_allocator(id_allocator &&) = delete;
+ id_allocator &operator=(id_allocator const &);
+ id_allocator &operator=(id_allocator &&) = delete;
+
+ // Insert and return a new ID
+ unsigned generate_id(std::string const &name)
+ {
+ unsigned sid = this->next++;
+ this->id2name[sid] = name;
+ this->name2id[name] = sid;
+ HMI_DEBUG("allocated new id %u with name %s", sid, name.c_str());
+ return sid;
+ }
+
+ // Insert a new ID which defined outside
+ void register_name_id(std::string const &name, unsigned sid)
+ {
+ this->id2name[sid] = name;
+ this->name2id[name] = sid;
+ HMI_DEBUG("register id %u with name %s", sid, name.c_str());
+ return;
+ }
+
+ // Lookup by ID or by name
+ optional<unsigned> lookup(std::string const &name) const
+ {
+ auto i = this->name2id.find(name);
+ return i == this->name2id.end() ? nullopt : optional<unsigned>(i->second);
+ }
+
+ optional<std::string> lookup(unsigned id) const
+ {
+ auto i = this->id2name.find(id);
+ return i == this->id2name.end() ? nullopt
+ : optional<std::string>(i->second);
+ }
+
+ // Remove a surface id and name
+ void remove_id(std::string const &name)
+ {
+ auto i = this->name2id.find(name);
+ if (i != this->name2id.end())
+ {
+ this->id2name.erase(i->second);
+ this->name2id.erase(i);
+ }
+ }
+
+ void remove_id(unsigned id)
+ {
+ auto i = this->id2name.find(id);
+ if (i != this->id2name.end())
+ {
+ this->name2id.erase(i->second);
+ this->id2name.erase(i);
+ }
+ }
+};
+
+struct TmpClient
+{
+ std::string appid;
+ unsigned pid;
+};
+
+struct TmpService
+{
+ std::string appid; // Used to search who create service surface
+ std::string dest; // Used to attach service to destination application
+ std::string service;// The name of service surface
+ std::string uuid; // uuid
+ TmpService(const std::string& app, const std::string& dst,
+ const std::string& svc, const std::string& uuid)
+ : appid(app), dest(dst), service(svc), uuid(uuid) {}
+};
+
+struct CarInfo
+{
+ CarInfo()
+ : parking_brake_stt(true),
+ accel_pedal_stt(false),
+ accel_pedal_pos(0.0),
+ running_stt(false),
+ headlamp_stt(false),
+ lightstatus_brake_stt(true)
+ {};
+
+ bool parking_brake_stt;
+ bool accel_pedal_stt;
+ double accel_pedal_pos;
+ bool running_stt;
+ bool headlamp_stt;
+ bool lightstatus_brake_stt;
+};
+
+class WindowManager
+{
+ public:
+ typedef std::unordered_map<uint32_t, struct rect> rect_map;
+ typedef std::function<void(const char *err_msg)> reply_func;
+
+ enum EventType
+ {
+ Event_Val_Min = 0,
+
+ Event_Active = Event_Val_Min,
+ Event_Inactive,
+
+ Event_Visible,
+ Event_Invisible,
+
+ Event_SyncDraw,
+ Event_FlushDraw,
+
+ Event_ScreenUpdated,
+
+ Event_HeadlampOff,
+ Event_HeadlampOn,
+
+ Event_ParkingBrakeOff,
+ Event_ParkingBrakeOn,
+
+ Event_LightstatusBrakeOff,
+ Event_LightstatusBrakeOn,
+
+ Event_CarStop,
+ Event_CarRun,
+
+ Event_Error,
+
+ Event_Val_Max = Event_Error,
+ };
+
+ explicit WindowManager();
+ ~WindowManager() = default;
+
+ WindowManager(WindowManager const &) = delete;
+ WindowManager &operator=(WindowManager const &) = delete;
+ WindowManager(WindowManager &&) = delete;
+ WindowManager &operator=(WindowManager &&) = delete;
+
+ int init();
+
+ result<int> api_request_surface(char const *appid, char const *role);
+ char const *api_request_surface(char const *appid, char const *role, char const *ivi_id);
+ bool api_set_role(char const *appid, char const *role);
+ void api_activate_surface(char const *appid, char const *role, char const *drawing_area, const reply_func &reply);
+ void api_activate_surface_for_slave(char const *appid, char const *drawing_name,
+ char const *drawing_area, const reply_func &reply);
+ void api_activate_surface_to_master(char const *appid, char const *drawing_name,
+ char const *drawing_area, const reply_func &reply);
+ void api_deactivate_surface(char const *appid, char const *role, const reply_func &reply);
+ void api_deactivate_surface_for_slave(char const *appid, char const *drawing_name,
+ const reply_func &reply);
+ void api_deactivate_surface_to_master(char const *appid, char const *drawing_name,
+ const reply_func &reply);
+ void api_enddraw(char const *appid, char const *role);
+ void api_enddraw_for_remote(char const *appid, char const *drawing_name);
+ bool api_client_set_render_order(const char *appid, const std::vector<std::string> &render_order);
+ std::string api_client_attach_service_surface(const char* appid, const char* dest, const char* service_surface);
+ result<json_object *> api_get_display_info();
+ result<json_object *> api_get_area_info(char const *role);
+ result<json_object *> api_get_car_info(char const *label);
+ void send_event(char const *evname);
+ void send_event(char const *evname, char const *label);
+ void send_event(char const *evname, char const *label, char const *area, int x, int y, int w, int h);
+
+ // Events from the compositor we are interested in
+ void surface_created(unsigned pid, unsigned surface_id);
+ void surface_removed(unsigned surface_id);
+
+ void removeClient(const std::string &appid);
+ void exceptionProcessForTransition();
+ const char* convertRoleOldToNew(char const *role);
+
+ void analyzeReceivedEvent(const char *event, struct json_object *object);
+
+ // Do not use this function
+ void timerHandler();
+ void startTransitionWrapper(std::vector<WMAction> &actions);
+ void processError(WMError error);
+ void processForRemoteRequest(json_object *data);
+ std::string searchApp(unsigned pid, unsigned ppid, unsigned surface, json_object* resp);
+ void storeSurface(const std::string& appid, unsigned ppid, unsigned surface);
+
+ const std::vector<const char *> kListEventName{
+ "active",
+ "inactive",
+ "visible",
+ "invisible",
+ "syncDraw",
+ "flushDraw",
+ "screenUpdated",
+ "headlampOff",
+ "headlampOn",
+ "parkingBrakeOff",
+ "parkingBrakeOn",
+ "lightstatusBrakeOff",
+ "lightstatusBrakeOn",
+ "carStop",
+ "carRun",
+ "error"};
+ std::map<const char *, struct afb_event> map_afb_event;
+
+ WMConnection wmcon;
+
+ private:
+ // WM Events to clients
+ void emit_activated(char const *label);
+ void emit_deactivated(char const *label);
+ void emit_syncdraw(char const *label, char const *area, int x, int y, int w, int h);
+ void emit_syncdraw(const std::string &role, const std::string &area);
+ void emit_flushdraw(char const *label);
+ void emit_visible(char const *label, bool is_visible);
+ void emit_invisible(char const *label);
+ void emit_visible(char const *label);
+ void emitHeadlampOff();
+ void emitHeadlampOn();
+ void emitParkingBrakeOff();
+ void emitParkingBrakeOn();
+ void emitLightstatusBrakeOff();
+ void emitLightstatusBrakeOn();
+ void emitCarStop();
+ void emitCarRun();
+
+ WMError setRequest(const std::string &appid, const std::string &role, const std::string &area,
+ Task task, unsigned *req_num);
+ WMError setRequest(Task task, unsigned* req_num);
+ WMError setRequestForSlave(const std::string& appid, const std::string &role,
+ const std::string &area, Task task, unsigned* req_num);
+ WMError checkPolicy(unsigned req_num);
+ WMError checkPolicyForSlave(unsigned req_num);
+ WMError startTransition(unsigned req_num);
+ void transitionCarState(TaskCarState task);
+
+ WMError doEndDraw(unsigned req_num);
+ void emitScreenUpdated(unsigned req_num);
+
+ void setTimer();
+ void stopTimer();
+ void processNextRequest();
+
+ int loadOldRolesConfigFile();
+
+ Task convertCanSignalToCarStateTask(const char *signal_name);
+ void inputCarStateTask(Task task);
+
+ const char *check_surface_exist(const char *role);
+
+ private:
+ std::unordered_map<std::string, std::string> roleold2new;
+ std::unordered_map<std::string, std::string> rolenew2old;
+ std::shared_ptr<LayerControl> lc;
+
+ LowCanClient lcc;
+ CarInfo crr_car_info;
+
+ PMWrapper pmw;
+
+ // ID allocation and proxy methods for lookup
+ struct id_allocator id_alloc;
+ // Surface are info (x, y, w, h)
+ rect_map area_info;
+ // FOR CES DEMO
+ std::unordered_map<unsigned, struct TmpClient> tmp_surface2app;
+ std::vector<struct TmpService> tmp_services;
+ static const char* kDefaultOldRolesConfig;
+};
+
+} // namespace wm
+
+#endif // WINDOW_MANAGER_HPP
diff --git a/demo#3/common/agl-service-windowmanager/src/wm_client.cpp b/demo#3/common/agl-service-windowmanager/src/wm_client.cpp
new file mode 100644
index 0000000..f2ad7be
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/src/wm_client.cpp
@@ -0,0 +1,271 @@
+/*
+ * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <json-c/json.h>
+#include "wm_client.hpp"
+#include "util.hpp"
+#include <ilm/ilm_control.h>
+#include <uuid/uuid.h>
+
+
+#define INVALID_SURFACE_ID 0
+
+using std::string;
+using std::vector;
+
+namespace wm
+{
+
+static const vector<string> kWMEvents = {
+ // Private event for applications
+ "syncDraw", "flushDraw", "visible", "invisible", "active", "inactive", "error"};
+static const vector<string> kErrorDescription = {
+ "unknown-error"};
+
+static const char kKeyDrawingName[] = "drawing_name";
+static const char kKeyrole[] = "role";
+static const char kKeyError[] = "error";
+static const char kKeyErrorDesc[] = "kErrorDescription";
+
+WMClient::WMClient(const string &appid, unsigned layer, unsigned surface, const string &role)
+ : id(appid), layer(layer),
+ role2surface(0)
+{
+ role2surface[role] = surface;
+ for (auto x : kWMEvents)
+ {
+#if GTEST_ENABLED
+ string ev = x;
+#else
+ afb_event ev = afb_daemon_make_event(x.c_str());
+#endif
+ evname2afb_event[x] = ev;
+ }
+}
+
+WMClient::WMClient(const string &appid, const string &role)
+ : id(appid),
+ layer(0),
+ role2surface(0),
+ evname2afb_event(0)
+{
+ role2surface[role] = INVALID_SURFACE_ID;
+ for (auto x : kWMEvents)
+ {
+#if GTEST_ENABLED
+ string ev = x;
+#else
+ afb_event ev = afb_daemon_make_event(x.c_str());
+#endif
+ evname2afb_event[x] = ev;
+ }
+}
+
+WMClient::WMClient(const string &appid, unsigned layer, const string &role)
+ : id(appid),
+ layer(layer),
+ main_role(role),
+ role2surface(0),
+ evname2afb_event(0)
+{
+ role2surface[role] = INVALID_SURFACE_ID;
+ for (auto x : kWMEvents)
+ {
+#if GTEST_ENABLED
+ string ev = x;
+#else
+ afb_event ev = afb_daemon_make_event(x.c_str());
+#endif
+ evname2afb_event[x] = ev;
+ }
+}
+
+string WMClient::appID() const
+{
+ return this->id;
+}
+
+string WMClient::role() const
+{
+ return this->main_role;
+}
+
+unsigned WMClient::layerID() const
+{
+ return this->layer;
+}
+
+unsigned WMClient::surfaceID() const
+{
+ return this->surface;
+}
+
+/**
+ * Add surface to the client
+ *
+ * This function add main surface to the client(ivi_layer).
+ *
+ * @param string[in] role
+ * @return WMError
+ */
+WMError WMClient::addSurface(unsigned surface)
+{
+ this->surface = surface;
+ ilmErrorTypes err = ilm_layerAddSurface(this->layer, surface);
+
+ if(err == ILM_SUCCESS)
+ {
+ err = ilm_commitChanges();
+ }
+ return (err == ILM_SUCCESS) ? WMError::SUCCESS : WMError::FAIL;
+}
+
+bool WMClient::removeSurfaceIfExist(unsigned surface)
+{
+ bool ret = false;
+ if(surface == this->surface)
+ {
+ this->surface = INVALID_SURFACE_ID;
+ ret = true;
+ }
+ else
+ {
+ for(auto &x : this->service2surfaces)
+ {
+ if(x.second = surface)
+ {
+ ret = true;
+ string key = x.first;
+ this->service2surfaces.erase(key);
+ this->service2supplier.erase(key);
+ }
+ }
+ }
+ return ret;
+}
+
+WMError WMClient::setRenderOrder(const vector<string> &order)
+{
+ WMError ret = WMError::SUCCESS;
+ this->surface_render_order.clear();
+ for(const auto& x : order)
+ {
+ unsigned s; // surface
+ if(x == this->role())
+ {
+ s = this->surfaceID();
+ }
+ else if(this->service2surfaces.count(x) != 0)
+ {
+ s = this->service2surfaces[x];
+ }
+ else
+ {
+ ret = WMError::NOT_REGISTERED;
+ break;
+ }
+ this->surface_render_order.push_back(s);
+ }
+ if(ret == WMError::SUCCESS)
+ {
+ int count = 0;
+ t_ilm_layer* id_array = new t_ilm_surface[this->surface_render_order.size()];
+ if(id_array == nullptr)
+ {
+ HMI_WARNING("short memory");
+ ret = WMError::FAIL;
+ }
+ else
+ {
+ for(const auto& i : this->surface_render_order)
+ {
+ id_array[count] = i;
+ ++count;
+ }
+ ilm_layerSetRenderOrder(this->layerID(),
+ id_array, this->surface_render_order.size());
+ delete id_array;
+ }
+ }
+ return ret;
+}
+
+string WMClient::attachTmpServiceSurface(const string& supplier, const string& service_surface)
+{
+ string uuid;
+ uuid_t u;
+ char out[37]; // uuid is 36 characters
+ uuid_generate_random(u);
+ uuid_unparse(u, out);
+ uuid = out;
+ this->service2supplier.emplace(service_surface, supplier);
+ return uuid;
+}
+
+WMError WMClient::attachServiceSurface(const string& service_surface, unsigned surface)
+{
+ WMError ret = WMError::NOT_REGISTERED;
+ if(this->service2supplier.count(service_surface) != 0)
+ {
+ this->service2surfaces.emplace(service_surface, surface);
+ ret = WMError::SUCCESS;
+ }
+ return ret;
+}
+
+#if GTEST_ENABLED
+bool WMClient::subscribe(afb_req req, const string &evname)
+{
+ if(evname != kKeyError){
+ HMI_DEBUG("error is only enabeled for now");
+ return false;
+ }
+ int ret = afb_req_subscribe(req, this->evname2afb_event[evname]);
+ if (ret)
+ {
+ HMI_DEBUG("Failed to subscribe %s", evname.c_str());
+ return false;
+ }
+ return true;
+}
+
+void WMClient::emitError(WM_CLIENT_ERROR_EVENT ev)
+{
+ if (!afb_event_is_valid(this->evname2afb_event[kKeyError])){
+ HMI_ERROR("event err is not valid");
+ return;
+ }
+ json_object *j = json_object_new_object();
+ json_object_object_add(j, kKeyError, json_object_new_int(ev));
+ json_object_object_add(j, kKeyErrorDesc, json_object_new_string(kErrorDescription[ev].c_str()));
+ HMI_DEBUG("error: %d, description:%s", ev, kErrorDescription[ev].c_str());
+
+ int ret = afb_event_push(this->evname2afb_event[kKeyError], j);
+ if (ret != 0)
+ {
+ HMI_DEBUG("afb_event_push failed: %m");
+ }
+}
+#endif
+
+void WMClient::dumpInfo()
+{
+ DUMP("APPID : %s", id.c_str());
+ DUMP(" LAYER : %d", layer);
+ DUMP(" ROLE : %s , SURFACE : %d", main_role.c_str(), surface);
+}
+
+} // namespace wm \ No newline at end of file
diff --git a/demo#3/common/agl-service-windowmanager/src/wm_client.hpp b/demo#3/common/agl-service-windowmanager/src/wm_client.hpp
new file mode 100644
index 0000000..fc171f4
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/src/wm_client.hpp
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef WINDOWMANAGER_CLIENT_HPP
+#define WINDOWMANAGER_CLIENT_HPP
+
+#include <vector>
+#include <string>
+#include <unordered_map>
+#include "wm_error.hpp"
+
+extern "C"
+{
+#define AFB_BINDING_VERSION 2
+#include <afb/afb-binding.h>
+}
+
+namespace wm
+{
+
+enum WM_CLIENT_ERROR_EVENT
+{
+ UNKNOWN_ERROR
+};
+
+class WMClient
+{
+ public:
+ WMClient();
+ WMClient(const std::string &appid, unsigned layer,
+ unsigned surface, const std::string &role);
+ WMClient(const std::string &appid, const std::string &role);
+ WMClient(const std::string &appid, unsigned layer, const std::string &role);
+ WMClient(const std::string &appid, unsigned layer,
+ const std::string& layer_name, unsigned surface, const std::string &role);
+ ~WMClient() = default;
+
+ std::string appID() const;
+ std::string role() const;
+ unsigned layerID() const;
+ unsigned surfaceID() const;
+ // void setRole(const std::string& role);
+ // void appendRole(const std::string& role);
+ WMError addSurface(unsigned surface);
+ bool removeSurfaceIfExist(unsigned surface);
+ // bool removeRole(const std::string& role);
+ std::vector<unsigned> renderOrder() const;
+ WMError setRenderOrder(const std::vector<std::string>& order);
+ std::string attachTmpServiceSurface(const std::string& from, const std::string& service_surface);
+ WMError attachServiceSurface(const std::string& service_surface, unsigned surface);
+
+#if GTEST_ENABLED
+ bool subscribe(afb_req req, const std::string &event_name);
+ void emitError(WM_CLIENT_ERROR_EVENT ev);
+#endif
+
+ void dumpInfo();
+
+ private:
+ std::string id;
+ unsigned layer;
+ std::string main_role;
+ std::string area;
+ unsigned surface; // currently, main application has only one surface.
+ //std::vector<std::string> role_list;
+ std::vector<unsigned> surface_render_order;
+ std::unordered_map<std::string, unsigned> service2surfaces;
+ std::unordered_map<std::string, unsigned> role2surface;
+ std::unordered_map<std::string, std::string> service2supplier;
+#if GTEST_ENABLED
+ // This is for unit test. afb_make_event occurs sig11 if call not in afb-binding
+ std::unordered_map<std::string, std::string> evname2afb_event;
+#else
+ std::unordered_map<std::string, struct afb_event> evname2afb_event;
+#endif
+};
+} // namespace wm
+
+#endif \ No newline at end of file
diff --git a/demo#3/common/agl-service-windowmanager/src/wm_connection.cpp b/demo#3/common/agl-service-windowmanager/src/wm_connection.cpp
new file mode 100644
index 0000000..10ecc3b
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/src/wm_connection.cpp
@@ -0,0 +1,457 @@
+/*
+ * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "wm_connection.hpp"
+#include <string.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include "json_helper.hpp"
+#include "util.hpp"
+
+extern "C"
+{
+#include <afb/afb-binding.h>
+#include <systemd/sd-event.h>
+}
+
+
+/**
+ * namespace wm
+ */
+namespace wm
+{
+
+
+namespace
+{
+
+static const char kPathConnectionConfigFile[] = "/etc/connection.json";
+static const char kDefaultIpAddr[] = "192.168.10.10";
+static const int kDefaultPort = 4000;
+
+static int onIoEventReceive(sd_event_source *src, int fd, uint32_t revents, void * data)
+{
+ WMConnection *p_wmcon = (WMConnection*)data;
+
+ json_object *j_out;
+ int ret = p_wmcon->receive(&j_out);
+ if (0 > ret)
+ {
+ return 0;
+ }
+
+ const char* rq = jh::getStringFromJson(j_out, "req");
+ const char* id = jh::getStringFromJson(j_out, "appid");
+ const char* dn = jh::getStringFromJson(j_out, "drawing_name");
+ const char* da = jh::getStringFromJson(j_out, "drawing_area");
+
+ HMI_DEBUG("req:%s appid:%s, drawing_name:%s, drawing_area:%s", rq, id, dn, da);
+
+ // Callback
+ p_wmcon->callOnReceivedHandler(j_out);
+
+ return 0;
+}
+
+static int onIoEventAccept(sd_event_source *src, int fd, uint32_t revents, void * data)
+{
+ struct sockaddr_in addr;
+
+ WMConnection *p_wmcon = (WMConnection*)data;
+
+ // Accept connection
+ socklen_t len = sizeof(addr);
+ int my_socket = p_wmcon->getMySocket();
+ int connected_socket = accept(my_socket, (struct sockaddr *)&addr, &len);
+ if (0 > connected_socket)
+ {
+ HMI_ERROR("Failed to accept connection (%s)", strerror(errno));
+ return -1;
+ }
+
+ // Store connected socket
+ p_wmcon->setConnectedSocket(connected_socket);
+
+ // Register callback to receive
+ int ret = sd_event_add_io(afb_daemon_get_event_loop(), nullptr,
+ connected_socket, EPOLLIN,
+ onIoEventReceive, p_wmcon);
+ if (0 > ret)
+ {
+ HMI_ERROR("Failed to add I/O event receive(%s)", strerror(-ret));
+ return -1;
+ }
+
+ return 0;
+}
+
+} // namespace
+
+WMConnection::WMConnection()
+{
+ // Load connection config file
+ this->loadConnectionConfigFile();
+
+ // TODO: ECU name should be decide by config file
+ this->ecu_name = this->mode;
+}
+
+int WMConnection::initialize()
+{
+ int ret;
+
+ // Initialize for Master/Slave
+ if (this->isMasterMode())
+ {
+ ret = this->initializeMaster();
+ }
+ else
+ {
+ ret = this->initializeSlave();
+ }
+
+ return ret;
+}
+
+void WMConnection::registerCallback(ReceivedHandler on_received)
+{
+ this->onReceived = on_received;
+}
+
+int WMConnection::sendRequest(char const *req, char const *appid,
+ char const *drawing_name, char const *drawing_area)
+{
+ int ret;
+ json_object *j_obj = json_object_new_object();
+ json_object_object_add(j_obj, "req", json_object_new_string(req));
+ json_object_object_add(j_obj, "appid", json_object_new_string(appid));
+ json_object_object_add(j_obj, "drawing_name", json_object_new_string(drawing_name));
+ json_object_object_add(j_obj, "drawing_area", json_object_new_string(drawing_area));
+
+ ret = this->send(j_obj);
+
+ json_object_put(j_obj);
+
+ return ret;
+}
+
+int WMConnection::send(struct json_object* j_in)
+{
+ // Convert json_object to string to send
+ const char *buf = json_object_to_json_string(j_in);
+ if (nullptr == buf)
+ {
+ HMI_ERROR("Failed to convert json_object to string");
+ return -1;
+ }
+
+ int len = strlen(buf);
+
+ HMI_DEBUG("Send data(len:%d): %s", len, buf);
+
+ int n = write(this->connected_socket, buf, len);
+ if(0 > n)
+ {
+ HMI_ERROR("Failed to send data (%s)", strerror(errno));
+ return -1;
+ }
+
+ return 0;
+}
+
+bool WMConnection::isMasterMode()
+{
+ if ("master" == this->mode)
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+}
+
+bool WMConnection::isMasterArea(const char* area)
+{
+ if (nullptr == area)
+ {
+ return false;
+ }
+
+ std::string str_area = std::string(area);
+ if ("" == str_area)
+ {
+ return false;
+ }
+
+ std::vector<std::string> elements;
+ elements = parseString(str_area, '.');
+
+ if ("master" == elements[0])
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+}
+
+bool WMConnection::isConnecting()
+{
+ return (0 > this->connected_socket) ? false : true;
+}
+
+std::string WMConnection::parseMasterArea(const char* area)
+{
+ std::string ret_area = "";
+ std::vector<std::string> elements;
+ elements = parseString(std::string(area), '.');
+
+ if ("master" != elements[0])
+ {
+ return std::string(area);
+ }
+
+ for (auto itr = (elements.begin() + 1); itr != elements.end(); ++itr)
+ {
+ ret_area += *itr;
+
+ if ((elements.end() - 1) != itr)
+ {
+ ret_area += ".";
+ }
+ }
+ return ret_area;
+}
+
+bool WMConnection::isSyncDrawingForRemote(const char* appid)
+{
+ if (std::string(appid) == this->syndDrawingAppId)
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+}
+
+void WMConnection::startSyncDrawForRemote(const char* appid)
+{
+ this->syndDrawingAppId = std::string(appid);
+}
+
+void WMConnection::finishSyncDrawForRemote(const char* appid)
+{
+ if (std::string(appid) == this->syndDrawingAppId)
+ {
+ this->syndDrawingAppId = "";
+ }
+}
+
+int WMConnection::getMySocket()
+{
+ return this->my_socket;
+}
+
+int WMConnection::getConnectedSocket()
+{
+ return this->connected_socket;
+}
+
+void WMConnection::setConnectedSocket(int connected_socket)
+{
+ this->connected_socket = connected_socket;
+}
+
+std::string WMConnection::getEcuName()
+{
+ return this->ecu_name;
+}
+
+void WMConnection::callOnReceivedHandler(json_object *j_out)
+{
+ this->onReceived(j_out);
+}
+
+int WMConnection::initializeMaster()
+{
+ int ret = 0;
+ struct sockaddr_in addr;
+
+ // Create socket
+ this->my_socket = socket(AF_INET, SOCK_STREAM, 0);
+ if (0 > this->my_socket)
+ {
+ HMI_ERROR("Failed to create socket (%s)", strerror(errno));
+ return -1;
+ }
+
+ // Bind socket
+ addr.sin_family = AF_INET;
+ addr.sin_port = htons(this->port);
+ addr.sin_addr.s_addr = htonl(INADDR_ANY);
+
+ ret = bind(this->my_socket, (struct sockaddr *)&addr, sizeof(addr));
+ if (0 > ret)
+ {
+ HMI_ERROR("Failed to bind socket (%s)", strerror(errno));
+ return -1;
+ }
+
+ // Listen connection
+ ret = listen(this->my_socket, 1);
+ if (0 > ret)
+ {
+ HMI_ERROR("Failed to listen connection (%s)", strerror(errno));
+ return -1;
+ }
+
+ // Register callback to accept connection
+ ret = sd_event_add_io(afb_daemon_get_event_loop(), nullptr,
+ this->my_socket, EPOLLIN,
+ onIoEventAccept, this);
+ if (0 > ret)
+ {
+ HMI_ERROR("Failed to add I/O event accept(%s)", strerror(-ret));
+ return -1;
+ }
+
+ return ret;
+}
+
+int WMConnection::initializeSlave()
+{
+ // Create socket
+ this->my_socket = socket(AF_INET, SOCK_STREAM, 0);
+ if (0 > this->my_socket)
+ {
+ HMI_ERROR("Failed to create socket (%s)", strerror(errno));
+ return -1;
+ }
+
+ return 0;
+}
+
+int WMConnection::connectToMaster()
+{
+ int ret = 0;
+ struct sockaddr_in addr;
+
+ // Connect to master
+ addr.sin_family = AF_INET;
+ addr.sin_port = htons(this->port);
+ addr.sin_addr.s_addr = inet_addr(this->ip.c_str());
+
+ ret = connect(this->my_socket, (struct sockaddr *)&addr, sizeof(addr));
+ if (0 > ret)
+ {
+ HMI_ERROR("Failed to connect to master (%s)", strerror(errno));
+ return ret;
+ }
+
+ HMI_DEBUG("Connected to master");
+
+ // Store connected socket
+ this->connected_socket = this->my_socket;
+
+ // Register callback to receive
+ ret = sd_event_add_io(afb_daemon_get_event_loop(), nullptr,
+ this->connected_socket, EPOLLIN,
+ onIoEventReceive, this);
+ if (0 > ret)
+ {
+ HMI_ERROR("Failed to add I/O event receive(%s)", strerror(-ret));
+ return -1;
+ }
+
+ return ret;
+}
+
+int WMConnection::receive(struct json_object** j_out)
+{
+ char buf[1024];
+ int n;
+
+ n = read(this->connected_socket, buf, sizeof(buf));
+ if(0 > n)
+ {
+ HMI_ERROR("Failed to receive data (%s)", strerror(errno));
+ return -1;
+ }
+
+ HMI_DEBUG("Received data length: %d", n);
+ HMI_DEBUG("Received data: %s", buf);
+
+ // Parse received data
+ struct json_tokener *tokener = json_tokener_new();
+ *j_out = json_tokener_parse_ex(tokener, buf, n);
+ if (nullptr == *j_out)
+ {
+ HMI_DEBUG("Failed to parse received data");
+ return -1;
+ }
+
+ return 0;
+}
+
+int WMConnection::loadConnectionConfigFile()
+{
+ // Get afm application installed dir
+ char const *afm_app_install_dir = getenv("AFM_APP_INSTALL_DIR");
+ if (!afm_app_install_dir)
+ {
+ HMI_ERROR("AFM_APP_INSTALL_DIR is not defined");
+ }
+ std::string path = std::string(afm_app_install_dir) + std::string(kPathConnectionConfigFile);
+
+ // Load connection config file
+ json_object* json_obj;
+ int ret = jh::inputJsonFilie(path.c_str(), &json_obj);
+ if (0 > ret)
+ {
+ HMI_ERROR("Could not open %s, so use default mode \"slave\"", kPathConnectionConfigFile);
+ this->mode = "slave";
+ this->ip = kDefaultIpAddr;
+ this->port = kDefaultPort;
+ return 0;
+ }
+ HMI_DEBUG("json_obj dump:%s", json_object_get_string(json_obj));
+
+ const char* mode = jh::getStringFromJson(json_obj, "mode");
+ this->mode = (nullptr != mode) ? mode : "slave";
+
+ const char* ip = jh::getStringFromJson(json_obj, "master_ip");
+ this->ip = (nullptr != ip) ? ip : kDefaultIpAddr;
+
+ int port = jh::getIntFromJson(json_obj, "master_port");
+ this->port = (0 != port) ? port : kDefaultPort;
+
+ // Check
+ HMI_DEBUG("mode:%s master_ip:%s master_port:%d", mode, ip, port);
+
+ // Release json_object
+ json_object_put(json_obj);
+
+ return 0;
+}
+
+
+} // namespace wm
diff --git a/demo#3/common/agl-service-windowmanager/src/wm_connection.hpp b/demo#3/common/agl-service-windowmanager/src/wm_connection.hpp
new file mode 100644
index 0000000..9d3180f
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/src/wm_connection.hpp
@@ -0,0 +1,64 @@
+/*
+ * Insert Copyright if needed.
+ */
+
+#ifndef WM_CONNECTION_HPP
+#define WM_CONNECTION_HPP
+
+#include <functional>
+
+struct json_object;
+
+namespace wm
+{
+
+class WMConnection
+{
+ public:
+ WMConnection();
+ ~WMConnection() = default;
+
+ using ReceivedHandler = std::function<void(json_object* j_out)>;
+
+ int initialize();
+ void registerCallback(ReceivedHandler on_received);
+ int sendRequest(char const *req, char const *appid,
+ char const *drawing_name, char const *drawing_area);
+ bool isMasterMode();
+ bool isMasterArea(const char* area);
+ bool isConnecting();
+ std::string parseMasterArea(const char* area);
+ bool isSyncDrawingForRemote(const char* role);
+ void startSyncDrawForRemote(const char* role);
+ void finishSyncDrawForRemote(const char* role);
+ int getMySocket();
+ int getConnectedSocket();
+ void setConnectedSocket(int connected_socket);
+ std::string getEcuName();
+ void callOnReceivedHandler(json_object *j_out);
+ int connectToMaster();
+
+ int receive(json_object** j_out);
+
+ private:
+ std::string mode;
+ std::string ip;
+ int port;
+ int my_socket = -1;
+ int connected_socket = -1;
+ ReceivedHandler onReceived;
+ std::string syndDrawingAppId;
+
+ std::string ecu_name;
+
+ int initializeMaster();
+ int initializeSlave();
+ int loadConnectionConfigFile();
+
+ int send(json_object* j_in);
+};
+
+} // namespace wm
+
+#endif // WM_CONNECTION_HPP
+
diff --git a/demo#3/common/agl-service-windowmanager/src/wm_error.cpp b/demo#3/common/agl-service-windowmanager/src/wm_error.cpp
new file mode 100644
index 0000000..694a7d0
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/src/wm_error.cpp
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include "wm_error.hpp"
+
+namespace wm {
+
+const char *errorDescription(WMError enum_error_number)
+{
+ switch (enum_error_number){
+ case SUCCESS:
+ return "Success";
+ case FAIL:
+ return "Request failed";
+ case REQ_REJECTED:
+ return "Request is rejected, due to the policy rejection of the request.";
+ case REQ_DROPPED:
+ return "Request is dropped, because the high priority request is done";
+ case NOT_REGISTERED:
+ return "Not registered";
+ case TIMEOUT_EXPIRED:
+ return "Request is dropped, due to time out expiring";
+ case LAYOUT_CHANGE_FAIL:
+ return "Layout change fails, due to some reasons";
+ case NO_ENTRY:
+ return "No element";
+ case NO_LAYOUT_CHANGE:
+ return "No layout change(deactivate only)";
+ default:
+ return "Unknown error number. Window manager bug.";
+ }
+}
+
+} \ No newline at end of file
diff --git a/demo#3/common/agl-service-windowmanager/src/wm_error.hpp b/demo#3/common/agl-service-windowmanager/src/wm_error.hpp
new file mode 100644
index 0000000..c4c61b4
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/src/wm_error.hpp
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef WINDOW_MANAGER_ERROR
+#define WINDOW_MANAGER_ERROR
+
+namespace wm {
+
+typedef enum WINDOWMANAGER_ERROR
+{
+ SUCCESS = 0,
+ FAIL,
+ REQ_REJECTED,
+ REQ_DROPPED,
+ TIMEOUT_EXPIRED,
+ NOT_REGISTERED,
+ LAYOUT_CHANGE_FAIL,
+ NO_ENTRY,
+ NO_LAYOUT_CHANGE,
+ UNKNOWN,
+ ERR_MAX = UNKNOWN
+}
+WMError;
+
+const char *errorDescription(WMError enum_error_number);
+
+}
+#endif // WINDOW_MANAGER_ERROR \ No newline at end of file
diff --git a/demo#3/common/agl-service-windowmanager/src/wm_layer.cpp b/demo#3/common/agl-service-windowmanager/src/wm_layer.cpp
new file mode 100644
index 0000000..d3e7073
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/src/wm_layer.cpp
@@ -0,0 +1,271 @@
+/*
+ * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <regex>
+#include <ilm/ilm_control.h>
+#include <stdlib.h>
+#include "wm_client.hpp"
+#include "wm_layer.hpp"
+#include "json_helper.hpp"
+#include "util.hpp"
+
+using std::string;
+using std::vector;
+using std::unordered_map;
+
+#define BG_LAYER_NAME "BackGroundLayer"
+
+namespace wm
+{
+
+LayerState::LayerState()
+ : render_order(),
+ area2appid()
+{}
+
+
+void LayerState::attachIdToArea(const string& area, const WMClient& client)
+{
+ this->area2appid[area] = client.appID();
+ this->render_order.push_back(client.layerID());
+}
+
+const unordered_map<string, string> LayerState::popCurrentState()
+{
+ unordered_map<string, string> tmp = this->area2appid;
+ this->area2appid.clear();
+ this->render_order.clear();
+ return tmp;
+}
+
+const unordered_map<string, string> LayerState::getCurrentState()
+{
+ return this->area2appid;
+}
+
+const vector<unsigned> LayerState::getIviIdList()
+{
+ return this->render_order;
+}
+
+void LayerState::addLayer(unsigned layer)
+{
+ auto result = std::find(this->render_order.begin(), this->render_order.end(), layer);
+ if(result == this->render_order.end())
+ this->render_order.push_back(layer);
+}
+
+void LayerState::removeLayer(unsigned layer)
+{
+ auto fwd_itr = std::remove_if(
+ this->render_order.begin(), this->render_order.end(),
+ [layer](unsigned elm) {
+ if(elm == layer)
+ HMI_DEBUG("remove layer %d", elm);
+ return elm == layer;
+ }
+ );
+ this->render_order.erase(fwd_itr, this->render_order.end());
+}
+
+void LayerState::setArea(const string& app, const string& area)
+{
+ this->area2appid[area] = app;
+}
+
+void LayerState::dump()
+{
+ std::string ids, apps;
+ for(const auto& ro : this->render_order)
+ {
+ ids += std::to_string(ro);
+ ids += ",";
+ }
+ for(const auto& area : this->area2appid)
+ {
+ apps += area.first;
+ apps += ":";
+ apps += area.second;
+ apps += ",";
+ }
+ DUMP(" render order : %s", ids.c_str());
+ DUMP(" area, app : %s", apps.c_str());
+}
+
+WMLayer::WMLayer(json_object* j, unsigned uuid) : tmp_state(), state(), uuid(uuid)
+{
+ this->name = jh::getStringFromJson(j, "name");
+ this->role_list = jh::getStringFromJson(j, "role");
+ const char* type = jh::getStringFromJson(j, "type");
+ this->id_begin = static_cast<unsigned>(jh::getIntFromJson(j, "id_range_begin"));
+ this->id_end = static_cast<unsigned>(jh::getIntFromJson(j, "id_range_end"));
+
+ if (name.size() == 0 || !type)
+ {
+ HMI_ERROR("Parse Error!!");
+ exit(1);
+ }
+ if(this->id_begin > this->id_end)
+ {
+ HMI_ERROR("INVALID");
+ exit(1);
+ }
+ string str_type = type;
+ this->type = (str_type == "tile") ? MANAGEMENT_TYPE::TILE : MANAGEMENT_TYPE::STACK;
+}
+
+unsigned WMLayer::getNewLayerID(const string& role)
+{
+ unsigned ret = 0;
+ if(this->name == BG_LAYER_NAME)
+ return ret;
+
+ // generate new layer id;
+ if(this->hasRole(role))
+ {
+ if(this->id_list.size() == 0)
+ {
+ ret = this->idBegin();
+ this->id_list.push_back(ret);
+ }
+ else
+ {
+ ret = this->id_list.back() + 1;
+ }
+ HMI_INFO("Generate new id: %d", ret);
+ }
+ else
+ {
+ return ret;
+ }
+
+ size_t count = std::count(id_list.begin(), id_list.end(), ret);
+ if( (ret > this->idEnd()) || (count > 1))
+ {
+ HMI_NOTICE("id %d is not available then generate new id", ret);
+ ret = 0; // reset
+ for(unsigned i = this->idBegin(); i < this->idEnd(); i++)
+ {
+ auto ret_found = std::find(id_list.begin(), id_list.end(), i);
+ if(ret_found == id_list.cend())
+ {
+ HMI_INFO("set new id: %d", i);
+ ret = i;
+ break;
+ }
+ }
+ }
+
+ if(ret != 0)
+ {
+ id_list.push_back(ret);
+ }
+ else
+ {
+ HMI_ERROR("failed to get New ID");
+ }
+ return ret;
+}
+
+const string& WMLayer::layerName()
+{
+ return this->name;
+}
+
+WMError WMLayer::setLayerState(const LayerState& l)
+{
+ this->tmp_state = l;
+ return WMError::SUCCESS;
+}
+
+void WMLayer::addLayerToState(unsigned layer)
+{
+ this->tmp_state.addLayer(layer);
+}
+
+void WMLayer::removeLayerFromState(unsigned layer)
+{
+ this->tmp_state.removeLayer(layer);
+}
+
+void WMLayer::setAreaToState(const string& app, const string& area)
+{
+ this->tmp_state.setArea(app, area);
+}
+
+void WMLayer::appendArea(const string& area)
+{
+ this->area_list.push_back(area);
+}
+
+void WMLayer::terminateApp(unsigned id)
+{
+ auto fwd_itr = std::remove_if(this->id_list.begin(), this->id_list.end(),
+ [id](unsigned elm) {
+ return elm == id;
+ });
+ this->id_list.erase(fwd_itr, this->id_list.end());
+ this->tmp_state.removeLayer(id);
+ this->state.removeLayer(id);
+ ilm_layerRemove(id);
+}
+
+bool WMLayer::hasLayerID(unsigned id)
+{
+ bool ret = (id >= this->idBegin() && id <= this->idEnd());
+ if(!ret)
+ return ret;
+ auto itr = std::find(this->id_list.begin(), this->id_list.end(), id);
+ return (itr != this->id_list.end()) ? true : false;
+}
+
+bool WMLayer::hasRole(const string& role)
+{
+ auto re = std::regex(this->role_list);
+ if (std::regex_match(role, re))
+ {
+ HMI_DEBUG("role %s matches layer %s", role.c_str(), this->name.c_str());
+ return true;
+ }
+ return false;
+}
+
+void WMLayer::update()
+{
+ this->state = this->tmp_state;
+}
+
+void WMLayer::undo()
+{
+ this->tmp_state = this->state;
+}
+
+void WMLayer::dump()
+{
+ DUMP("===== wm layer status =====");
+ DUMP("Layer :%s", this->name.c_str());
+ this->tmp_state.dump();
+ this->state.dump();
+ DUMP("===== wm layer status end =====");
+
+}
+
+/* void WMLayer::undo()
+{
+ this->tmp_state = this->state;
+}
+ */
+} // namespace wm
diff --git a/demo#3/common/agl-service-windowmanager/src/wm_layer.hpp b/demo#3/common/agl-service-windowmanager/src/wm_layer.hpp
new file mode 100644
index 0000000..a6a359e
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/src/wm_layer.hpp
@@ -0,0 +1,104 @@
+/*
+ * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef WM_LAYER_HPP
+#define WM_LAYER_HPP
+
+#include <string>
+#include <vector>
+#include <unordered_map>
+#include <memory>
+#include "wm_error.hpp"
+
+struct json_object;
+
+namespace wm
+{
+
+class WMClient;
+class LayerState
+{
+ public:
+ LayerState();
+ ~LayerState() = default;
+ void attachIdToArea(const std::string& area, const WMClient&);
+ const std::unordered_map<std::string, std::string> popCurrentState();
+ const std::unordered_map<std::string, std::string> getCurrentState();
+ const std::vector<unsigned> getIviIdList();
+ void addLayer(unsigned layer);
+ void removeLayer(unsigned layer);
+ void setArea(const std::string& app, const std::string& area);
+
+ // Debug
+ void dump();
+
+ private:
+ std::vector<unsigned> render_order;
+ std::unordered_map<std::string, std::string> area2appid;
+};
+
+class WMLayer
+{
+ public:
+ enum MANAGEMENT_TYPE
+ {
+ TILE,
+ STACK
+ };
+
+ explicit WMLayer(json_object* j, unsigned uuid);
+ ~WMLayer() = default;
+
+ // Status & Setting API
+ unsigned getNewLayerID(const std::string& role);
+ unsigned idBegin() { return this->id_begin; }
+ unsigned idEnd() { return this->id_end; }
+ unsigned getUuid() { return this->uuid; }
+ const std::string& layerName();
+ MANAGEMENT_TYPE layerType() { return this->type; }
+ void appendArea(const std::string& area);
+ LayerState& getLayerState() { return tmp_state; }
+ WMError setLayerState(const LayerState& l);
+ bool hasLayerID(unsigned id);
+ bool hasRole(const std::string& role);
+
+ // Manipulation
+ void addLayerToState(unsigned layer);
+ void removeLayerFromState(unsigned layer);
+ void setAreaToState(const std::string& app, const std::string& area);
+ void terminateApp(unsigned layer);
+ void update();
+ void undo();
+
+ // Debug
+ void dump();
+
+ private:
+ LayerState tmp_state;
+ LayerState state;
+ unsigned uuid;
+ std::string name = ""; // Layer name
+ MANAGEMENT_TYPE type;
+ std::string role_list;
+ std::vector<std::string> area_list;
+ std::vector<unsigned> id_list;
+ unsigned id_begin;
+ unsigned id_end;
+};
+
+} // namespace wm
+
+#endif // WM_LAYER_HPP
diff --git a/demo#3/common/agl-service-windowmanager/src/wm_layer_control.cpp b/demo#3/common/agl-service-windowmanager/src/wm_layer_control.cpp
new file mode 100644
index 0000000..80dc0c9
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/src/wm_layer_control.cpp
@@ -0,0 +1,911 @@
+/*
+ * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include <assert.h>
+#include <unistd.h>
+#include "wm_layer_control.hpp"
+#include "wm_layer.hpp"
+#include "wm_client.hpp"
+#include "request.hpp"
+#include "json_helper.hpp"
+
+#define LC_AREA_PATH "/etc/areas.json"
+#define LC_LAYER_SETTING_PATH "/etc/layers_setting.json"
+#define LC_DEFAULT_AREA "fullscreen"
+#define BACK_GROUND_LAYER "BackGroundLayer"
+
+using std::string;
+using std::vector;
+using std::shared_ptr;
+
+namespace wm {
+
+LayerControl* g_lc_ctxt;
+
+static void createCallback_static(ilmObjectType object,
+ t_ilm_uint id,
+ t_ilm_bool created,
+ void* data)
+{
+ static_cast<LayerControl*>(data)->dispatchCreateEvent(object, id, created);
+}
+
+static void surfaceCallback_static(t_ilm_surface surface,
+ struct ilmSurfaceProperties* surface_prop,
+ t_ilm_notification_mask mask)
+{
+ g_lc_ctxt->dispatchSurfacePropChangeEvent(surface, surface_prop, mask);
+}
+
+static void layerCallback_static(t_ilm_layer layer,
+ struct ilmLayerProperties* layer_prop,
+ t_ilm_notification_mask mask)
+{
+ g_lc_ctxt->dispatchLayerPropChangeEvent(layer, layer_prop, mask);
+}
+
+LayerControl::LayerControl(const std::string& root, const std::string& ecu_name)
+{
+ string area_path = root + LC_AREA_PATH;
+ string layer_path= root + LC_LAYER_SETTING_PATH;
+ // load layers.setting.json
+ WMError ret = this->loadLayerSetting(layer_path);
+ assert(ret == WMError::SUCCESS);
+ // load areas.json
+ ret = this->loadAreasConfigFile(area_path, ecu_name);
+ assert(ret == WMError::SUCCESS);
+}
+
+WMError LayerControl::init(const LayerControlCallbacks& cb)
+{
+ HMI_DEBUG("Initialize of ilm library and display");
+ t_ilm_uint num = 0;
+ t_ilm_uint *ids;
+ int cnt = 0;
+ ilmErrorTypes rc = ilm_init();
+
+ while (rc != ILM_SUCCESS)
+ {
+ cnt++;
+ if (20 <= cnt)
+ {
+ HMI_ERROR("Could not connect to compositor");
+ goto lc_init_error;
+ }
+ HMI_ERROR("Wait to start weston ...");
+ sleep(1);
+ rc = ilm_init();
+ }
+ if(rc != ILM_SUCCESS) goto lc_init_error;
+
+ // Get current screen setting
+ rc = ilm_getScreenIDs(&num, &ids);
+
+ if(rc != ILM_SUCCESS) goto lc_init_error;
+
+ for(unsigned i = 0; i < num; i++)
+ {
+ HMI_INFO("get screen: %d", ids[i]);
+ }
+ // Currently, 0 is only available
+ this->screenID = ids[0];
+
+ if (1 < num)
+ {
+ // TODO: set remote screen id
+ HMI_INFO("There is remote screen (id:%d)", ids[1]);
+ this->remoteScreenID = ids[1];
+ }
+ else
+ {
+ HMI_INFO("There is no remote screen");
+ this->remoteScreenID = -1;
+ }
+
+ rc = ilm_getPropertiesOfScreen(this->screenID, &this->screen_prop);
+
+ if(rc != ILM_SUCCESS) goto lc_init_error;
+
+ // Register Callback to Window Manager and from ILM
+ this->cb = cb;
+ ilm_registerNotification(createCallback_static, this);
+
+ return WMError::SUCCESS;
+
+lc_init_error:
+ HMI_ERROR("Failed to initialize. Terminate WM");
+
+ return WMError::FAIL;
+}
+
+void LayerControl::createNewLayer(unsigned id)
+{
+ HMI_INFO("create new ID :%d", id);
+ struct rect rct = this->area2size[LC_DEFAULT_AREA];
+ ilm_layerCreateWithDimension(&id, rct.w, rct.h);
+ //ilm_layerSetSourceRectangle(id, rct.x, rct.y, rct.w, rct.h);
+ ilm_layerSetDestinationRectangle(id, this->offset_x, this->offset_y, rct.w, rct.h);
+ ilm_layerSetOpacity(id, 1.0);
+ ilm_layerSetVisibility(id, ILM_FALSE);
+ ilm_commitChanges();
+ auto wm_layer = getWMLayer(id);
+ wm_layer->addLayerToState(id);
+ this->renderLayers();
+ this->renderLayersRemote();
+}
+
+void LayerControl::createNewRemoteLayer(unsigned id)
+{
+ HMI_INFO("create new ID :%d (For remote layer)", id);
+ struct rect rct = {640, 720, 0, 0};
+ ilm_layerCreateWithDimension(&id, rct.w, rct.h);
+ //ilm_layerSetSourceRectangle(id, rct.x, rct.y, rct.w, rct.h);
+ ilm_layerSetDestinationRectangle(id, this->offset_x, this->offset_y, rct.w, rct.h);
+ ilm_layerSetOpacity(id, 1.0);
+ ilm_layerSetVisibility(id, ILM_FALSE);
+ ilm_commitChanges();
+ auto wm_layer = getWMLayer(id);
+ wm_layer->addLayerToState(id);
+ this->renderLayers();
+ this->renderLayersRemote();
+}
+
+unsigned LayerControl::getNewLayerID(const string& role, string* layer_name)
+{
+ unsigned ret = 0;
+ for(const auto& l: this->wm_layers)
+ {
+ ret = l->getNewLayerID(role);
+ if(ret != 0)
+ {
+ *layer_name = l->layerName();
+ unsigned uid = l->getUuid();
+ this->lid2wmlid[ret] = uid;
+ break;
+ }
+ }
+ return ret;
+}
+
+shared_ptr<WMLayer> LayerControl::getWMLayer(unsigned layer)
+{
+ unsigned uuid = this->lid2wmlid[layer];
+ return this->wm_layers[uuid];
+}
+
+std::shared_ptr<WMLayer> LayerControl::getWMLayer(std::string layer_name)
+{
+ for(auto &l : this->wm_layers)
+ {
+ if(l->layerName() == layer_name)
+ {
+ return l;
+ }
+ }
+ return nullptr;
+}
+
+struct rect LayerControl::getAreaSize(const std::string& area)
+{
+ return area2size[area];
+}
+
+void LayerControl::setupArea(const rectangle& base_rct, double scaling)
+{
+ this->scaling = scaling;
+ this->offset_x = base_rct.left();
+ this->offset_y = base_rct.top();
+
+ for (auto &i : this->area2size)
+ {
+ i.second.x = static_cast<int>(scaling * i.second.x + 0.5);
+ i.second.y = static_cast<int>(scaling * i.second.y + 0.5);
+ i.second.w = static_cast<int>(scaling * i.second.w + 0.5);
+ i.second.h = static_cast<int>(scaling * i.second.h + 0.5);
+
+ HMI_DEBUG("area:%s size(after) : x:%d y:%d w:%d h:%d",
+ i.first.c_str(), i.second.x, i.second.y, i.second.w, i.second.h);
+ }
+}
+
+Screen LayerControl::getScreenInfo()
+{
+ return Screen(this->screen_prop.screenWidth, this->screen_prop.screenHeight);
+}
+
+double LayerControl::scale()
+{
+ return this->scaling;
+}
+
+WMError LayerControl::updateLayer(LayerState& layer_state)
+{
+ return WMError::SUCCESS;
+}
+
+WMError LayerControl::renderLayers()
+{
+ HMI_INFO("Commit change");
+ WMError rc = WMError::SUCCESS;
+
+ // Check the number of layers
+ vector<unsigned> ivi_l_ids;
+ for(auto& l : this->wm_layers)
+ {
+ auto state = l->getLayerState();
+ HMI_DEBUG("layer %s", l->layerName().c_str());
+ for(const auto& id : state.getIviIdList())
+ {
+ HMI_DEBUG("Add %d", id);
+ ivi_l_ids.push_back(id);
+ }
+ }
+
+ // Create render order
+ t_ilm_layer* id_array = new t_ilm_layer[ivi_l_ids.size()];
+ if(id_array == nullptr)
+ {
+ HMI_WARNING("short memory");
+ this->undoUpdate();
+ return WMError::FAIL;
+ }
+ int count = 0;
+ for(const auto& i : ivi_l_ids)
+ {
+ id_array[count] = i;
+ ++count;
+ }
+
+ // Display
+ ilmErrorTypes ret = ilm_displaySetRenderOrder(this->screenID, id_array, ivi_l_ids.size());
+ if(ret != ILM_SUCCESS)
+ {
+ this->undoUpdate();
+ rc = WMError::FAIL;
+ }
+ else
+ {
+ for(auto& l : this->wm_layers)
+ {
+ l->update();
+ }
+ }
+ ilm_commitChanges();
+ delete id_array;
+ return rc;
+}
+
+WMError LayerControl::renderLayersRemote()
+{
+ HMI_INFO("Commit change");
+ WMError rc = WMError::SUCCESS;
+
+ if (0 > this->remoteScreenID)
+ {
+ return rc;
+ }
+
+ // Check the number of layers
+ vector<unsigned> ivi_l_ids;
+ for(auto& l : this->wm_remote_layers)
+ {
+ auto state = l->getLayerState();
+ HMI_DEBUG("layer %s", l->layerName().c_str());
+ for(const auto& id : state.getIviIdList())
+ {
+ HMI_DEBUG("Add %d", id);
+ ivi_l_ids.push_back(id);
+ }
+ }
+
+ if (0 == ivi_l_ids.size())
+ {
+ ilm_displaySetRenderOrder(this->remoteScreenID, nullptr, 0);
+ return rc;
+ }
+
+ // Create render order
+ t_ilm_layer* id_array = new t_ilm_layer[ivi_l_ids.size()];
+ if(id_array == nullptr)
+ {
+ HMI_WARNING("short memory");
+ this->undoUpdate();
+ return WMError::FAIL;
+ }
+ int count = 0;
+ for(const auto& i : ivi_l_ids)
+ {
+ id_array[count] = i;
+ ++count;
+ }
+
+ // Display
+ ilmErrorTypes ret = ilm_displaySetRenderOrder(this->remoteScreenID, id_array, ivi_l_ids.size());
+ if(ret != ILM_SUCCESS)
+ {
+ this->undoUpdate();
+ rc = WMError::FAIL;
+ }
+ else
+ {
+ for(auto& l : this->wm_remote_layers)
+ {
+ l->update();
+ }
+ }
+ ilm_commitChanges();
+ delete id_array;
+ return rc;
+}
+
+WMError LayerControl::setXDGSurfaceOriginSize(unsigned surface)
+{
+ WMError ret = WMError::NOT_REGISTERED;
+ ilmSurfaceProperties prop;
+ ilmErrorTypes rc = ilm_getPropertiesOfSurface(surface, &prop);
+ if(rc == ILM_SUCCESS)
+ {
+ HMI_INFO("xdg surface info %d, %d", prop.origSourceWidth, prop.origSourceHeight);
+ ilm_surfaceSetSourceRectangle(surface, 0, 0, prop.origSourceWidth, prop.origSourceHeight);
+ ret = WMError::SUCCESS;
+ }
+ return ret;
+}
+
+
+void LayerControl::undoUpdate()
+{
+ for(auto& l : this->wm_layers)
+ {
+ l->undo();
+ }
+}
+
+WMError LayerControl::loadLayerSetting(const string &path)
+{
+ HMI_DEBUG("loading WMLayer(Application Containers) Setting from %s", path);
+
+ json_object *json_obj, *json_cfg;
+ int ret = jh::inputJsonFilie(path.c_str(), &json_obj);
+ if (0 > ret)
+ {
+ HMI_ERROR("Could not open %s", path.c_str());
+ return WMError::FAIL;
+ }
+ HMI_INFO("json_obj dump:%s", json_object_get_string(json_obj));
+
+ if (!json_object_object_get_ex(json_obj, "mappings", &json_cfg))
+ {
+ HMI_ERROR("Parse Error!!");
+ return WMError::FAIL;
+ }
+
+ int len = json_object_array_length(json_cfg);
+ HMI_DEBUG("json_cfg len:%d", len);
+
+ for (int i = 0; i < len; i++)
+ {
+ json_object *json_tmp = json_object_array_get_idx(json_cfg, i);
+ HMI_DEBUG("> json_tmp dump:%s", json_object_get_string(json_tmp));
+
+ this->wm_layers.emplace_back(std::make_shared<WMLayer>(json_tmp, i));
+ }
+ json_object_put(json_obj);
+
+ return WMError::SUCCESS;
+}
+
+WMError LayerControl::loadAreasConfigFile(const std::string& path, const std::string& ecu_name)
+{
+ // Load areas config file
+ json_object *json_obj;
+ int ret = jh::inputJsonFilie(path.c_str(), &json_obj);
+ if (0 > ret)
+ {
+ HMI_ERROR("Could not open %s", path.c_str());
+ return WMError::FAIL;
+ }
+ HMI_INFO("json_obj dump:%s", json_object_get_string(json_obj));
+
+ // Parse ecus
+ json_object *json_cfg;
+ if (!json_object_object_get_ex(json_obj, "ecus", &json_cfg))
+ {
+ HMI_ERROR("Parse Error!!");
+ return WMError::FAIL;
+ }
+
+ int num_ecu = json_object_array_length(json_cfg);
+ HMI_DEBUG("json_cfg(ecus) len:%d", num_ecu);
+
+ const char* c_ecu_name;
+ json_object *json_ecu;
+ for (int i = 0; i < num_ecu; i++)
+ {
+ json_ecu= json_object_array_get_idx(json_cfg, i);
+
+ c_ecu_name = jh::getStringFromJson(json_ecu, "name");
+ if (nullptr == c_ecu_name)
+ {
+ HMI_ERROR("Parse Error!!");
+ return WMError::FAIL;
+ }
+
+ if (ecu_name == string(c_ecu_name))
+ {
+ break;
+ }
+ else
+ {
+ json_ecu = nullptr;
+ }
+ }
+
+ if (!json_ecu)
+ {
+ HMI_ERROR("Areas for ecu:%s is NOT exist!!", ecu_name.c_str());
+ return WMError::FAIL;
+ }
+
+ // Parse screens
+ if (!json_object_object_get_ex(json_ecu, "screens", &json_cfg))
+ {
+ HMI_ERROR("Parse Error!!");
+ return WMError::FAIL;
+ }
+
+ int num_screen = json_object_array_length(json_cfg);
+ HMI_DEBUG("json_cfg(screens) len:%d", num_screen);
+
+ int screen_id;
+ json_object *json_screen;
+ for (int i = 0; i < num_screen; i++)
+ {
+ json_screen = json_object_array_get_idx(json_cfg, i);
+ HMI_INFO("json_cfg dump:%s", json_object_get_string(json_cfg));
+
+ // TODO: Currently only one display is connected to a ECU.
+
+ screen_id = jh::getIntFromJson(json_screen, "id");
+
+ // Parse areas
+ json_object *json_tmp;
+ if (!json_object_object_get_ex(json_screen, "areas", &json_tmp))
+ {
+ HMI_ERROR("Parse Error!!");
+ return WMError::FAIL;
+ }
+
+ int num_area = json_object_array_length(json_tmp);
+ HMI_DEBUG("json_tmp(areas) len:%d", num_area);
+
+ const char *area;
+ for (int j = 0; j < num_area; j++)
+ {
+ json_object *json_area = json_object_array_get_idx(json_tmp, j);
+
+ area = jh::getStringFromJson(json_area, "name");
+ if (nullptr == area)
+ {
+ HMI_ERROR("Parse Error!!");
+ return WMError::FAIL;
+ }
+ HMI_DEBUG("> area:%s", area);
+
+ json_object *json_rect;
+ if (!json_object_object_get_ex(json_area, "rect", &json_rect))
+ {
+ HMI_ERROR("Parse Error!!");
+ return WMError::FAIL;
+ }
+
+ struct rect area_size;
+ area_size.x = jh::getIntFromJson(json_rect, "x");
+ area_size.y = jh::getIntFromJson(json_rect, "y");
+ area_size.w = jh::getIntFromJson(json_rect, "w");
+ area_size.h = jh::getIntFromJson(json_rect, "h");
+
+ this->area2size[area] = area_size;
+ }
+
+ // Check
+ for (const auto& itr : this->area2size)
+ {
+ HMI_DEBUG("area:%s x:%d y:%d w:%d h:%d",
+ itr.first.c_str(), itr.second.x, itr.second.y,
+ itr.second.w, itr.second.h);
+ }
+ }
+
+ // Release json_object
+ json_object_put(json_obj);
+
+ return WMError::SUCCESS;
+}
+
+WMError LayerControl::layoutChange(const WMAction& action)
+{
+ if ((action.visible == TaskVisible::INVISIBLE) ||
+ (action.visible == TaskVisible::REQ_REMOTE_VISIBLE) ||
+ (action.visible == TaskVisible::REQ_REMOTE_INVISIBLE))
+ {
+ // Visibility is not change -> no redraw is required
+ return WMError::SUCCESS;
+ }
+ if(action.client == nullptr)
+ {
+ HMI_SEQ_ERROR(action.req_num, "client may vanish");
+ return WMError::NOT_REGISTERED;
+ }
+ unsigned layer = action.client->layerID();
+ unsigned surface = action.client->surfaceID();
+
+ auto rect = this->getAreaSize(action.area);
+ HMI_DEBUG("Set layout %d, %d, %d, %d",rect.x, rect.y, rect.w, rect.h);
+
+ // TO BE FIXED:
+ // Sometimes, ivi_wm_surface_size signal doesn't reach window manager,
+ // then, Window Manager can't set source size.
+ // This fixes it but it takes about 200ns(on R-Car M3) wastefully
+ ilmSurfaceProperties sp;
+ ilm_getPropertiesOfSurface(surface, &sp);
+ if(sp.origSourceHeight != sp.sourceHeight) {
+ HMI_SEQ_NOTICE(action.req_num, "WORK AROUND: set source size w:%d h%d", sp.origSourceWidth, sp.origSourceHeight);
+ ilm_surfaceSetSourceRectangle(surface, 0, 0, sp.origSourceWidth, sp.origSourceHeight);
+ ilm_commitChanges();
+ }
+
+ ilm_surfaceSetDestinationRectangle(surface, rect.x, rect.y, rect.w, rect.h);
+ ilm_commitChanges();
+ for(auto &wm_layer: this->wm_layers)
+ {
+ // Store the state who is assigned to the area
+ if(wm_layer->hasLayerID(layer))
+ {
+ wm_layer->setAreaToState(action.client->appID(), action.area);
+ /* TODO: manipulate state directly
+ LayerState ls = wm_layer->getLayerState();
+ ls.setArea(action.client->appID(), action.area);
+ wm_layer->dump(); */
+ }
+ }
+
+ return WMError::SUCCESS;
+}
+
+WMError LayerControl::visibilityChange(const WMAction& action)
+{
+ WMError ret = WMError::FAIL;
+ if(action.client == nullptr)
+ {
+ HMI_SEQ_ERROR(action.req_num, "client may vanish");
+ return WMError::NOT_REGISTERED;
+ }
+
+ if (action.visible == TaskVisible::VISIBLE)
+ {
+ ret = this->makeVisible(action.client);
+ }
+ else if (action.visible == TaskVisible::INVISIBLE)
+ {
+ ret = this->makeInvisible(action.client);
+ }
+ else if (action.visible == TaskVisible::REMOTE_VISIBLE)
+ {
+ ret = this->makeRemoteVisible(action.client);
+ }
+ else if (action.visible == TaskVisible::REMOTE_INVISIBLE)
+ {
+ ret = this->makeRemoteInvisible(action.client);
+ }
+ else // TaskVisible::REQ_REMOTE_VISIBLE || TaskVisible::REQ_REMOTE_INVISIBLE
+ {
+ // Visibility is not change
+ ret = WMError::SUCCESS;
+ }
+
+ return ret;
+}
+
+void LayerControl::terminateApp(const shared_ptr<WMClient> client)
+{
+ for(auto& l : this->wm_layers)
+ {
+ l->terminateApp(client->layerID());
+ }
+}
+
+void LayerControl::dispatchCreateEvent(ilmObjectType object, unsigned id, bool created)
+{
+ if (ILM_SURFACE == object)
+ {
+ if (created)
+ {
+ ilmSurfaceProperties sp;
+ ilmErrorTypes rc;
+ rc = ilm_getPropertiesOfSurface(id, &sp);
+ if(rc != ILM_SUCCESS)
+ {
+ HMI_ERROR("Failed to get surface %d property due to %d", id, ilm_getError());
+ return;
+ }
+ this->cb.surfaceCreated(sp.creatorPid, id);
+ ilm_surfaceSetSourceRectangle(id, 0, 0, sp.origSourceWidth, sp.origSourceHeight);
+ ilm_surfaceAddNotification(id, surfaceCallback_static);
+ ilm_surfaceSetVisibility(id, ILM_TRUE);
+ ilm_surfaceSetType(id, ILM_SURFACETYPE_DESKTOP);
+ }
+ else
+ {
+ this->cb.surfaceDestroyed(id);
+ }
+ }
+ if (ILM_LAYER == object)
+ {
+ if(created)
+ {
+ ilm_layerAddNotification(id, layerCallback_static);
+ }
+ else
+ {
+ // Ignore here. Nothing to do currently.
+ // Process of application dead is handled by Window Manager
+ // from binder notification
+ }
+ }
+}
+
+void LayerControl::dispatchSurfacePropChangeEvent(unsigned id,
+ struct ilmSurfaceProperties* sprop,
+ t_ilm_notification_mask mask)
+{
+ /*
+ ILM_NOTIFICATION_CONTENT_AVAILABLE & ILM_NOTIFICATION_CONTENT_REMOVED
+ are not handled here, handled in create/destroy event
+ */
+ if (ILM_NOTIFICATION_VISIBILITY & mask)
+ {
+ HMI_DEBUG("surface %d turns visibility %d", id, sprop->visibility);
+ }
+ if (ILM_NOTIFICATION_OPACITY & mask)
+ {
+ HMI_DEBUG("surface %d turns opacity %f", id, sprop->opacity);
+ }
+ if (ILM_NOTIFICATION_SOURCE_RECT & mask)
+ {
+ HMI_DEBUG("surface %d source rect changes", id);
+ }
+ if (ILM_NOTIFICATION_DEST_RECT & mask)
+ {
+ HMI_DEBUG("surface %d dest rect changes", id);
+ }
+ if (ILM_NOTIFICATION_CONFIGURED & mask)
+ {
+ HMI_DEBUG("surface %d size %d, %d, %d, %d", id,
+ sprop->sourceX, sprop->sourceY, sprop->origSourceWidth, sprop->origSourceHeight);
+ ilm_surfaceSetSourceRectangle(id, 0, 0, sprop->origSourceWidth, sprop->origSourceHeight);
+ }
+}
+
+void LayerControl::dispatchLayerPropChangeEvent(unsigned id,
+ struct ilmLayerProperties* lprop,
+ t_ilm_notification_mask mask)
+{
+ if (ILM_NOTIFICATION_VISIBILITY & mask)
+ {
+ HMI_DEBUG("layer %d turns visibility %d", id, lprop->visibility);
+ }
+ if (ILM_NOTIFICATION_OPACITY & mask)
+ {
+ HMI_DEBUG("layer %d turns opacity %f", id, lprop->opacity);
+ }
+ if (ILM_NOTIFICATION_SOURCE_RECT & mask)
+ {
+ HMI_DEBUG("layer %d source rect changes", id);
+ }
+ if (ILM_NOTIFICATION_DEST_RECT & mask)
+ {
+ HMI_DEBUG("layer %d dest rect changes", id);
+ }
+}
+
+WMError LayerControl::makeVisible(const shared_ptr<WMClient> client)
+{
+ WMError ret = WMError::SUCCESS;
+ // Don't check here the client is not nullptr
+ unsigned layer = client->layerID();
+
+ this->moveForeGround(client);
+
+ ilm_layerSetVisibility(layer, ILM_TRUE);
+
+ /* for(auto& wm_layer : this->wm_layers)
+ {
+ if(wm_layer->hasLayerID(layer))
+ {
+ LayerState ls = wm_layer->getLayerState();
+ ls.addLayer(layer);;
+ }
+ } */
+
+ // Move foreground from back ground layer
+ /* for(auto& wm_layer : this->wm_layers)
+ {
+ if(wm_layer->layerName() == "BackGroundLayer")
+ {
+ if(wm_layer->hasRole(client->role()))
+ {
+ LayerState ls = wm_layer->getLayerState();
+ ls.removeLayer(layer);
+ }
+ break;
+ }
+ } */
+
+ return ret;
+}
+
+WMError LayerControl::makeInvisible(const shared_ptr<WMClient> client)
+{
+ WMError ret = WMError::SUCCESS;
+ unsigned layer = client->layerID(); // Don't check here the client is not nullptr
+
+ bool mv_ok = this->moveBackGround(client);
+
+ if(!mv_ok)
+ {
+ HMI_INFO("make invisible client %s", client->appID().c_str());
+ ilm_layerSetVisibility(layer, ILM_FALSE);
+ }
+
+ //ilm_layerSetDestinationRectangle(layer, 0, 0, 0, 0);
+
+ /* for(auto& wm_layer : this->wm_layers)
+ {
+ if(wm_layer->hasLayerID(layer))
+ {
+ LayerState ls = wm_layer->getLayerState();
+ ls.removeLayer(layer);;
+ }
+ } */
+
+
+
+ return ret;
+}
+
+WMError LayerControl::makeRemoteVisible(const shared_ptr<WMClient> client)
+{
+ WMError ret = WMError::SUCCESS;
+ unsigned layer = client->layerID(); // Don't check here the client is not nullptr
+
+ if (0 > this->remoteScreenID)
+ {
+ return ret;
+ }
+
+ // TODO: Currently there is only one remote screen.
+ for (auto itr = this->wm_layers.begin(); itr != this->wm_layers.end(); ++itr)
+ {
+ if((*itr)->hasLayerID(layer))
+ {
+ HMI_DEBUG("Add layer:%d to remote screen:%d", layer, this->remoteScreenID);
+ this->wm_remote_layers.push_back(*itr);
+ this->wm_layers.erase(itr);
+ }
+
+ if (this->wm_layers.end() == itr)
+ {
+ HMI_DEBUG("iteretor indicates end of vector of wm_layers");
+ break;
+ }
+ }
+
+ ilm_layerSetVisibility(layer, ILM_TRUE);
+
+ return ret;
+}
+
+WMError LayerControl::makeRemoteInvisible(const shared_ptr<WMClient> client)
+{
+ WMError ret = WMError::SUCCESS;
+ unsigned layer = client->layerID(); // Don't check here the client is not nullptr
+
+ if (0 > this->remoteScreenID)
+ {
+ return ret;
+ }
+
+ // TODO: Currently there is only one remote screen.
+ for (auto itr = this->wm_remote_layers.begin();
+ itr != this->wm_remote_layers.end(); ++itr)
+ {
+ if((*itr)->hasLayerID(layer))
+ {
+ HMI_DEBUG("Remove layer:%d from remote screen:%d", layer, this->remoteScreenID);
+ this->wm_layers.push_back(*itr);
+ this->wm_remote_layers.erase(itr);
+ }
+
+ if (this->wm_remote_layers.end() == itr)
+ {
+ HMI_DEBUG("iteretor indicates end of vector of wm_remote_layers");
+ break;
+ }
+ }
+
+ ilm_layerSetVisibility(layer, ILM_FALSE);
+
+ return ret;
+}
+
+bool LayerControl::moveBackGround(const shared_ptr<WMClient> client)
+{
+ bool ret = false;
+
+ // Move background from foreground layer
+ auto bg = this->getWMLayer(BACK_GROUND_LAYER);
+ if(bg != nullptr)
+ {
+ HMI_DEBUG("client %s role %s", client->appID().c_str(), client->role().c_str());
+ unsigned layer = client->layerID();
+ if(bg->hasRole(client->role()))
+ {
+ HMI_INFO("%s go to background", client->appID().c_str());
+ bg->addLayerToState(layer);
+ auto wm_layer = this->getWMLayer(layer);
+ wm_layer->removeLayerFromState(layer);
+ /* TODO: manipulate state directly
+ LayerState bg_ls = bg->getLayerState();
+ bg_ls.addLayer(layer);
+ LayerState ls = wm_layer->getLayerState();
+ ls.removeLayer(layer); */
+ bg->dump();
+ wm_layer->dump();
+ ret = true;
+ }
+ }
+ return ret;
+}
+
+bool LayerControl::moveForeGround(const shared_ptr<WMClient> client)
+{
+ bool ret = false;
+
+ // Move foreground from foreground layer
+ auto bg = this->getWMLayer(BACK_GROUND_LAYER);
+ if(bg != nullptr)
+ {
+ if(bg->hasRole(client->role()))
+ {
+ unsigned layer = client->layerID();
+ HMI_INFO("%s go to foreground", client->appID().c_str());
+ bg->removeLayerFromState(layer);
+ auto wm_layer = this->getWMLayer(layer);
+ wm_layer->addLayerToState(layer);
+ /* TODO: manipulate state directly
+ LayerState bg_ls = bg->getLayerState();
+ bg_ls.removeLayer(layer);
+ LayerState ls = wm_layer->getLayerState();
+ ls.addLayer(layer); */
+ bg->dump();
+ wm_layer->dump();
+ ret = true;
+ }
+ }
+ return ret;
+}
+
+} // namespace wm
diff --git a/demo#3/common/agl-service-windowmanager/src/wm_layer_control.hpp b/demo#3/common/agl-service-windowmanager/src/wm_layer_control.hpp
new file mode 100644
index 0000000..fa7c7cb
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/src/wm_layer_control.hpp
@@ -0,0 +1,118 @@
+/*
+ * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <string>
+#include <memory>
+#include <vector>
+#include <unordered_map>
+#include <functional>
+#include <ilm/ilm_control.h>
+#include "wm_error.hpp"
+#include "util.hpp"
+
+namespace wm {
+
+class Screen {
+ public:
+ Screen(unsigned w, unsigned h) : _width(w), _height(h){}
+ unsigned width() { return _width; }
+ unsigned height() { return _height; }
+ private:
+ unsigned _width;
+ unsigned _height;
+ unsigned _pysical_width = 0;
+ unsigned _pysical_height = 0;
+};
+
+class LayerControlCallbacks {
+ public:
+ LayerControlCallbacks() {};
+ ~LayerControlCallbacks() = default;
+ LayerControlCallbacks(const LayerControlCallbacks &obj) = default;
+
+ // callback functions
+ std::function<void(unsigned, unsigned)> surfaceCreated;
+ std::function<void(unsigned)> surfaceDestroyed;
+ /* std::function<void(unsigned)> surfaceDestroyed;
+ std::function<void(unsigned)> layerCreated;
+ std::function<void(unsigned)> layerDestroyed; */
+};
+
+class WMLayer;
+class LayerState;
+class WMAction;
+class WMClient;
+
+class LayerControl
+{
+ public:
+ explicit LayerControl(const std::string& root, const std::string& ecu_name);
+ ~LayerControl() = default;
+ WMError init(const LayerControlCallbacks& cb);
+ void createNewLayer(unsigned id);
+ void createNewRemoteLayer(unsigned id);
+ unsigned getNewLayerID(const std::string& role, std::string* layer_name);
+ std::shared_ptr<WMLayer> getWMLayer(unsigned layer);
+ std::shared_ptr<WMLayer> getWMLayer(std::string layer_name);
+ struct rect getAreaSize(const std::string& area);
+ void setupArea(const rectangle& base_rct, double scaling);
+ Screen getScreenInfo();
+ double scale();
+ // void setRenderOrder(const std::vector<unsigned> layer_render_order);
+ // std::vector<unsigned> getAllRenderOrder();
+ // std::vector<std::shared_ptr<WMLayer>>& getAllLayers();
+ // std::vector<unsigned> getRenderOrder(const std::string& layer_name);
+ WMError updateLayer(LayerState& layer_state);
+ WMError renderLayers();
+ WMError renderLayersRemote();
+ WMError setXDGSurfaceOriginSize(unsigned surface);
+ // WMError renderWMLayers();
+ void undoUpdate();
+ WMError layoutChange(const WMAction& action);
+ WMError visibilityChange(const WMAction &action);
+ void terminateApp(const std::shared_ptr<WMClient> client);
+
+ // Don't use this function.
+ void dispatchCreateEvent(ilmObjectType object, unsigned id, bool created);
+ void dispatchSurfacePropChangeEvent(unsigned id, struct ilmSurfaceProperties*, t_ilm_notification_mask);
+ void dispatchLayerPropChangeEvent(unsigned id, struct ilmLayerProperties*, t_ilm_notification_mask);
+
+ private:
+ WMError makeVisible(const std::shared_ptr<WMClient> client);
+ WMError makeInvisible(const std::shared_ptr<WMClient> client);
+ bool moveForeGround(const std::shared_ptr<WMClient> client);
+ bool moveBackGround(const std::shared_ptr<WMClient> client);
+ WMError loadLayerSetting(const std::string& path);
+ WMError loadAreasConfigFile(const std::string& path, const std::string& ecu_name);
+
+ // For Remote
+ WMError makeRemoteVisible(const std::shared_ptr<WMClient> client);
+ WMError makeRemoteInvisible(const std::shared_ptr<WMClient> client);
+
+ std::vector<std::shared_ptr<WMLayer>> wm_layers;
+ std::vector<std::shared_ptr<WMLayer>> wm_remote_layers;
+ std::unordered_map<unsigned, unsigned> lid2wmlid;
+ std::unordered_map<std::string, struct rect> area2size;
+ unsigned screenID;
+ signed remoteScreenID;
+ struct ilmScreenProperties screen_prop;
+ double scaling;
+ int offset_x;
+ int offset_y;
+ LayerControlCallbacks cb;
+};
+
+} // namespace wm
diff --git a/demo#3/common/agl-service-windowmanager/tests/wm-request b/demo#3/common/agl-service-windowmanager/tests/wm-request
new file mode 100644
index 0000000..fade547
--- /dev/null
+++ b/demo#3/common/agl-service-windowmanager/tests/wm-request
@@ -0,0 +1,74 @@
+#!/bin/sh
+
+#
+# Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+nopygments=0
+if [ "$1" = "-p" ]
+then
+ nopygments=1
+ shift
+fi
+
+if ! [ "$1" ]
+then
+ echo "Usage: $0 VERB [ARGS]" >&2
+ exit 1
+fi
+
+UUIDFILE=/tmp/wm-request-uuid
+if ! which uuidgen 2>/dev/null 1>&2
+then
+ echo "c7c638c5-d097-4eb4-9012-a1e4c25b9808" > $UUIDFILE
+else
+ if ! [ -f $UUIDFILE ]
+ then
+ uuidgen > $UUIDFILE
+ fi
+fi
+UUID="`cat $UUIDFILE`"
+
+for i in afb-client-demo
+do
+ which $i 2>/dev/null 1>&2 || { echo "Program $i is missing" >&2; exit 1; }
+done
+
+set -eu
+
+ if [ $nopygments = 0 ] && which pygmentize 2>/dev/null 1>&2
+ then
+ json_pretty() {
+ pygmentize -l json
+ }
+ else
+ json_pretty() {
+ cat
+ }
+fi
+
+verb=$1
+shift
+
+set +u
+if [ "$1" ]
+then
+ set -u
+ args='{"drawing_name":"'"$1"'"}'
+fi
+
+afb-client-demo -H ws://localhost:1700/api\?token=wm\&uuid=$UUID windowmanager $verb $args | json_pretty
+
+# vim:set ft=sh:
diff --git a/demo#3/common/libhomescreen/CMakeLists.txt b/demo#3/common/libhomescreen/CMakeLists.txt
new file mode 100644
index 0000000..29adeee
--- /dev/null
+++ b/demo#3/common/libhomescreen/CMakeLists.txt
@@ -0,0 +1,43 @@
+#
+# Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+project(libhomescreen C CXX)
+
+cmake_minimum_required(VERSION 2.8)
+
+set(PROJECT_NAME "LIBHOMESCREEN")
+set(PROJECT_VERSION "1.0")
+set(PROJECT_PRETTY_NAME "LIBHOMESCREEN")
+set(PROJECT_DESCRIPTION "Library for accessing agl service homescreen 2017 with C/C++")
+set(PROJECT_INCLUDEDIR ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR})
+set(PROJECT_LIBDIR ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR})
+set(LIBHOMESCREEN_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/include)
+
+# get pkgconfig
+INCLUDE(FindPkgConfig)
+link_libraries(-Wl,--as-needed -Wl,--gc-sections -Wl,--no-undefined)
+
+set(CMAKE_BUILD_TYPE Debug)
+set(USE_HMI_DEBUG FALSE)
+
+add_subdirectory(src)
+add_subdirectory(include)
+
+#generate configure file
+configure_file(libhomescreen.pc.in libhomescreen.pc @ONLY)
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libhomescreen.pc
+ DESTINATION
+ ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
diff --git a/demo#3/common/libhomescreen/LICENSE b/demo#3/common/libhomescreen/LICENSE
new file mode 100644
index 0000000..31c692a
--- /dev/null
+++ b/demo#3/common/libhomescreen/LICENSE
@@ -0,0 +1,54 @@
+Apache License
+
+Version 2.0, January 2004
+
+http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
+
+"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
+
+"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
+
+"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
+
+"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
+
+"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
+
+2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
+
+ You must give any other recipients of the Work or Derivative Works a copy of this License; and
+ You must cause any modified files to carry prominent notices stating that You changed the files; and
+ You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
+ If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
diff --git a/demo#3/common/libhomescreen/README.md b/demo#3/common/libhomescreen/README.md
new file mode 100644
index 0000000..24e5e56
--- /dev/null
+++ b/demo#3/common/libhomescreen/README.md
@@ -0,0 +1,29 @@
+This project contains:
+
+libhomescreen: HomeScreen API C++ shared library
+
+AGL repo for source code:
+https://gerrit.automotivelinux.org/gerrit/p/src/libhomescreen.git
+
+AGL repo for bitbake recipe:
+https://gerrit.automotivelinux.org/gerrit/gitweb?p=AGL/meta-agl-devel.git;a=blob;f=recipes-demo-hmi/libhomescreen/libhomescreen_git.bb
+
+Quickstart:
+
+Instructions for building libhomescreen
+---------------------------------------
+
+The libhomescreen is part of the
+packagegroup-hmi-framework
+packagegroup.
+
+This also includes the following apps:
+- agl-service-windowmanager-2017
+- agl-service-soundmanager-2017
+- agl-service-homescreen-2017
+- homescreen-2017
+- onscreenapp-2017
+
+To build all the above, follow the instrucions on the AGL
+source meta-agl/scripts/aglsetup.sh -m m3ulcb agl-demo agl-devel agl-appfw-smack agl-hmi-framework
+bitbake agl-demo-platform
diff --git a/demo#3/common/libhomescreen/include/CMakeLists.txt b/demo#3/common/libhomescreen/include/CMakeLists.txt
new file mode 100644
index 0000000..bb37242
--- /dev/null
+++ b/demo#3/common/libhomescreen/include/CMakeLists.txt
@@ -0,0 +1,19 @@
+#
+# Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+if(DEFINED CMAKE_INSTALL_INCLUDEDIR)
+ INSTALL(FILES libhomescreen.hpp DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
+endif(DEFINED CMAKE_INSTALL_INCLUDEDIR)
diff --git a/demo#3/common/libhomescreen/include/hmi-debug.h b/demo#3/common/libhomescreen/include/hmi-debug.h
new file mode 100644
index 0000000..28705f5
--- /dev/null
+++ b/demo#3/common/libhomescreen/include/hmi-debug.h
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __HMI_DEBUG_H__
+#define __HMI_DEBUG_H__
+
+#include <time.h>
+#include <stdio.h>
+#include <stdarg.h>
+#include <string.h>
+#include <stdlib.h>
+
+enum LOG_LEVEL{
+ LOG_LEVEL_NONE = 0,
+ LOG_LEVEL_ERROR,
+ LOG_LEVEL_WARNING,
+ LOG_LEVEL_NOTICE,
+ LOG_LEVEL_INFO,
+ LOG_LEVEL_DEBUG,
+ LOG_LEVEL_MAX = LOG_LEVEL_DEBUG
+};
+
+#define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__)
+
+#define HMI_ERROR(prefix, args,...) _HMI_LOG(LOG_LEVEL_ERROR, __FILENAME__, __FUNCTION__, __LINE__, prefix, args, ##__VA_ARGS__)
+#define HMI_WARNING(prefix, args,...) _HMI_LOG(LOG_LEVEL_WARNING, __FILENAME__, __FUNCTION__,__LINE__, prefix, args,##__VA_ARGS__)
+#define HMI_NOTICE(prefix, args,...) _HMI_LOG(LOG_LEVEL_NOTICE, __FILENAME__, __FUNCTION__,__LINE__, prefix, args,##__VA_ARGS__)
+#define HMI_INFO(prefix, args,...) _HMI_LOG(LOG_LEVEL_INFO, __FILENAME__, __FUNCTION__,__LINE__, prefix, args,##__VA_ARGS__)
+#define HMI_DEBUG(prefix, args,...) _HMI_LOG(LOG_LEVEL_DEBUG, __FILENAME__, __FUNCTION__,__LINE__, prefix, args,##__VA_ARGS__)
+
+static char ERROR_FLAG[6][20] = {"NONE", "ERROR", "WARNING", "NOTICE", "INFO", "DEBUG"};
+
+static void _HMI_LOG(enum LOG_LEVEL level, const char* file, const char* func, const int line, const char* prefix, const char* log, ...)
+{
+ const int log_level = (getenv("USE_HMI_DEBUG") == NULL)?LOG_LEVEL_ERROR:atoi(getenv("USE_HMI_DEBUG"));
+ if(log_level < level)
+ {
+ return;
+ }
+
+ char *message;
+ struct timespec tp;
+ unsigned int time;
+
+ clock_gettime(CLOCK_REALTIME, &tp);
+ time = (tp.tv_sec * 1000000L) + (tp.tv_nsec / 1000);
+
+ va_list args;
+ va_start(args, log);
+ if (log == NULL || vasprintf(&message, log, args) < 0)
+ message = NULL;
+ fprintf(stderr, "[%10.3f] [%s %s] [%s, %s(), Line:%d] >>> %s \n", time / 1000.0, prefix, ERROR_FLAG[level], file, func, line, message);
+ va_end(args);
+ free(message);
+}
+
+#endif //__HMI_DEBUG_H__
diff --git a/demo#3/common/libhomescreen/include/libhomescreen.hpp b/demo#3/common/libhomescreen/include/libhomescreen.hpp
new file mode 100644
index 0000000..f07e62f
--- /dev/null
+++ b/demo#3/common/libhomescreen/include/libhomescreen.hpp
@@ -0,0 +1,101 @@
+/*
+ * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef LIBHOMESCREEN_H
+#define LIBHOMESCREEN_H
+#include <vector>
+#include <map>
+#include <string>
+#include <functional>
+#include <json-c/json.h>
+#include <systemd/sd-event.h>
+extern "C"
+{
+#include <afb/afb-wsj1.h>
+#include <afb/afb-ws-client.h>
+}
+
+class LibHomeScreen
+{
+public:
+ LibHomeScreen();
+ ~LibHomeScreen();
+
+ LibHomeScreen(const LibHomeScreen &) = delete;
+ LibHomeScreen &operator=(const LibHomeScreen &) = delete;
+
+ using handler_func = std::function<void(json_object*)>;
+
+ enum EventType {
+ Event_ShowWindow = 1,
+ Event_TapShortcut = 1,
+ Event_OnScreenMessage,
+ Event_OnScreenReply,
+ Event_AllocateRestriction,
+ Event_ReleaseRestriction
+ };
+
+ static const std::vector<std::string> api_list;
+ static const std::vector<std::string> event_list;
+
+ /* Method */
+ int init(const int port, const std::string& token);
+
+ int tapShortcut(const char* application_name);
+ int onScreenMessage(const char* display_message);
+ int onScreenReply(const char* reply_message);
+
+ void set_event_handler(enum EventType et, handler_func f);
+
+ void registerCallback(
+ void (*event_cb)(const std::string& event, struct json_object* event_contents),
+ void (*reply_cb)(struct json_object* reply_contents),
+ void (*hangup_cb)(void) = nullptr);
+
+ int call(const std::string& verb, struct json_object* arg);
+ int call(const char* verb, struct json_object* arg);
+ int subscribe(const std::string& event_name);
+ int unsubscribe(const std::string& event_name);
+ int allocateRestriction(const char* area);
+ int releaseRestriction(const char* area);
+ int showWindow(const char* id, json_object* json);
+
+private:
+ int initialize_websocket();
+
+ void (*onEvent)(const std::string& event, struct json_object* event_contents);
+ void (*onReply)(struct json_object* reply);
+ void (*onHangup)(void);
+
+ struct afb_wsj1* sp_websock;
+ struct afb_wsj1_itf minterface;
+ sd_event* mploop;
+ std::string muri;
+
+ int mport = 2000;
+ std::string mtoken = "hs";
+
+ std::map<EventType, handler_func> handlers;
+
+public:
+ /* Don't use/ Internal only */
+ void on_hangup(void *closure, struct afb_wsj1 *wsj);
+ void on_call(void *closure, const char *api, const char *verb, struct afb_wsj1_msg *msg);
+ void on_event(void *closure, const char *event, struct afb_wsj1_msg *msg);
+ void on_reply(void *closure, struct afb_wsj1_msg *msg);
+};
+
+#endif /* LIBHOMESCREEN_H */
diff --git a/demo#3/common/libhomescreen/libhomescreen.pc.in b/demo#3/common/libhomescreen/libhomescreen.pc.in
new file mode 100644
index 0000000..809abbd
--- /dev/null
+++ b/demo#3/common/libhomescreen/libhomescreen.pc.in
@@ -0,0 +1,12 @@
+includedir=@PROJECT_INCLUDEDIR@
+libdir=@PROJECT_LIBDIR@
+binding_install_dir=@binding_install_dir@
+
+Name: @PROJECT_PRETTY_NAME@
+Description: @PROJECT_DESCRIPTION@
+Version: @PROJECT_VERSION@
+URL: @PROJECT_URL@
+
+Requires: json-c afb-daemon
+Cflags: -I${includedir}
+Libs: -L${libdir} -lhomescreen
diff --git a/demo#3/common/libhomescreen/sample/simple-egl/CMakeLists.txt b/demo#3/common/libhomescreen/sample/simple-egl/CMakeLists.txt
new file mode 100644
index 0000000..57bdfbd
--- /dev/null
+++ b/demo#3/common/libhomescreen/sample/simple-egl/CMakeLists.txt
@@ -0,0 +1,70 @@
+#
+# Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+project(simple-egl C CXX)
+
+cmake_minimum_required(VERSION 3.0)
+
+set(PROJECT_NAME "simple-egl")
+set(PROJECT_VERSION "1.0")
+set(PROJECT_PRETTY_NAME "SE")
+set(PROJECT_DESCRIPTION "Sample application for homescreen and windowmanager")
+set(PROJECT_URL "")
+set(CMAKE_CXX_FLAGS "-Wall -fpermissive")
+
+#source directory
+aux_source_directory(src DIR_SRCS)
+
+#head file path
+include_directories(include)
+
+#set extern libraries
+SET(LIBRARIES
+ libwindowmanager.so
+ libEGL.so
+ libGLESv2.so
+ libm.so
+ libwayland-egl.so
+ libwayland-client.so
+ libjson-c.so
+ libhomescreen.so
+ librt.so
+ libpthread.so
+)
+
+#add executable file
+add_executable(simple-egl ${DIR_SRCS})
+
+#add link library
+TARGET_LINK_LIBRARIES(simple-egl ${LIBRARIES})
+
+add_custom_command(TARGET simple-egl POST_BUILD
+ COMMAND cp -rf ${CMAKE_CURRENT_SOURCE_DIR}/package ${PROJECT_BINARY_DIR}
+ COMMAND mkdir -p ${PROJECT_BINARY_DIR}/package/root/bin
+ COMMAND cp -rf ${PROJECT_BINARY_DIR}/simple-egl ${PROJECT_BINARY_DIR}/package/root/bin)
+
+add_custom_target(widget DEPENDS ${PROJECT_BINARY_DIR}/package/root
+ COMMAND wgtpkg-pack -f -o ${PROJECT_BINARY_DIR}/package/${PROJECT_NAME}.wgt ${PROJECT_BINARY_DIR}/package/root)
+
+add_custom_target(hvac DEPENDS ${PROJECT_BINARY_DIR}/package/root
+ COMMAND mkdir -p ${PROJECT_BINARY_DIR}/package/hvac/bin
+ COMMAND cp -rf ${PROJECT_BINARY_DIR}/simple-egl ${PROJECT_BINARY_DIR}/package/hvac/bin/hvac
+ COMMAND wgtpkg-pack -f -o ${PROJECT_BINARY_DIR}/package/hvac.wgt ${PROJECT_BINARY_DIR}/package/hvac)
+
+add_custom_target(navi DEPENDS ${PROJECT_BINARY_DIR}/package/root
+ COMMAND mkdir -p ${PROJECT_BINARY_DIR}/package/navi/bin
+ COMMAND cp -rf ${PROJECT_BINARY_DIR}/simple-egl ${PROJECT_BINARY_DIR}/package/navi/bin/navi
+ COMMAND wgtpkg-pack -f -o ${PROJECT_BINARY_DIR}/package/navi.wgt ${PROJECT_BINARY_DIR}/package/navi)
diff --git a/demo#3/common/libhomescreen/sample/simple-egl/LICENSE.APL-2.0 b/demo#3/common/libhomescreen/sample/simple-egl/LICENSE.APL-2.0
new file mode 100644
index 0000000..b3201ab
--- /dev/null
+++ b/demo#3/common/libhomescreen/sample/simple-egl/LICENSE.APL-2.0
@@ -0,0 +1,204 @@
+
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don`t include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
diff --git a/demo#3/common/libhomescreen/sample/simple-egl/LICENSE.MIT b/demo#3/common/libhomescreen/sample/simple-egl/LICENSE.MIT
new file mode 100644
index 0000000..33f8bef
--- /dev/null
+++ b/demo#3/common/libhomescreen/sample/simple-egl/LICENSE.MIT
@@ -0,0 +1,23 @@
+
+MIT License
+
+Copyright (c) <year> <copyright holders>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
diff --git a/demo#3/common/libhomescreen/sample/simple-egl/README.md b/demo#3/common/libhomescreen/sample/simple-egl/README.md
new file mode 100644
index 0000000..42820e1
--- /dev/null
+++ b/demo#3/common/libhomescreen/sample/simple-egl/README.md
@@ -0,0 +1,27 @@
+Information
+====
+<br>This is a sample application for homescreen-2017 and windowmanager-2017.
+
+How to compile and install
+====
+<br>$ mkdir build
+<br>$ cd build
+<br>$ cmake ..
+<br>$ make
+<br>$ make widget
+
+<br>Copy package/simple-egl.wgt to rootfs.
+
+How to use
+====
+<br>afm-util install simple-egl.wgt
+<br>afm-util start simple-egl@0.1
+
+Depends
+====
+<br>homescreen-2017
+<br>agl-service-homescreen-2017
+<br>agl-service-windowmanger-2017
+<br>libhomescreen
+<br>libwindowmanager
+<br>wayland-ivi-extension
diff --git a/demo#3/common/libhomescreen/sample/simple-egl/include/hmi-debug.h b/demo#3/common/libhomescreen/sample/simple-egl/include/hmi-debug.h
new file mode 100644
index 0000000..28705f5
--- /dev/null
+++ b/demo#3/common/libhomescreen/sample/simple-egl/include/hmi-debug.h
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __HMI_DEBUG_H__
+#define __HMI_DEBUG_H__
+
+#include <time.h>
+#include <stdio.h>
+#include <stdarg.h>
+#include <string.h>
+#include <stdlib.h>
+
+enum LOG_LEVEL{
+ LOG_LEVEL_NONE = 0,
+ LOG_LEVEL_ERROR,
+ LOG_LEVEL_WARNING,
+ LOG_LEVEL_NOTICE,
+ LOG_LEVEL_INFO,
+ LOG_LEVEL_DEBUG,
+ LOG_LEVEL_MAX = LOG_LEVEL_DEBUG
+};
+
+#define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__)
+
+#define HMI_ERROR(prefix, args,...) _HMI_LOG(LOG_LEVEL_ERROR, __FILENAME__, __FUNCTION__, __LINE__, prefix, args, ##__VA_ARGS__)
+#define HMI_WARNING(prefix, args,...) _HMI_LOG(LOG_LEVEL_WARNING, __FILENAME__, __FUNCTION__,__LINE__, prefix, args,##__VA_ARGS__)
+#define HMI_NOTICE(prefix, args,...) _HMI_LOG(LOG_LEVEL_NOTICE, __FILENAME__, __FUNCTION__,__LINE__, prefix, args,##__VA_ARGS__)
+#define HMI_INFO(prefix, args,...) _HMI_LOG(LOG_LEVEL_INFO, __FILENAME__, __FUNCTION__,__LINE__, prefix, args,##__VA_ARGS__)
+#define HMI_DEBUG(prefix, args,...) _HMI_LOG(LOG_LEVEL_DEBUG, __FILENAME__, __FUNCTION__,__LINE__, prefix, args,##__VA_ARGS__)
+
+static char ERROR_FLAG[6][20] = {"NONE", "ERROR", "WARNING", "NOTICE", "INFO", "DEBUG"};
+
+static void _HMI_LOG(enum LOG_LEVEL level, const char* file, const char* func, const int line, const char* prefix, const char* log, ...)
+{
+ const int log_level = (getenv("USE_HMI_DEBUG") == NULL)?LOG_LEVEL_ERROR:atoi(getenv("USE_HMI_DEBUG"));
+ if(log_level < level)
+ {
+ return;
+ }
+
+ char *message;
+ struct timespec tp;
+ unsigned int time;
+
+ clock_gettime(CLOCK_REALTIME, &tp);
+ time = (tp.tv_sec * 1000000L) + (tp.tv_nsec / 1000);
+
+ va_list args;
+ va_start(args, log);
+ if (log == NULL || vasprintf(&message, log, args) < 0)
+ message = NULL;
+ fprintf(stderr, "[%10.3f] [%s %s] [%s, %s(), Line:%d] >>> %s \n", time / 1000.0, prefix, ERROR_FLAG[level], file, func, line, message);
+ va_end(args);
+ free(message);
+}
+
+#endif //__HMI_DEBUG_H__
diff --git a/demo#3/common/libhomescreen/sample/simple-egl/include/platform.h b/demo#3/common/libhomescreen/sample/simple-egl/include/platform.h
new file mode 100644
index 0000000..8fd57b0
--- /dev/null
+++ b/demo#3/common/libhomescreen/sample/simple-egl/include/platform.h
@@ -0,0 +1,115 @@
+/*
+ * Copyright © 2015 Collabora, Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+#ifndef WESTON_PLATFORM_H
+#define WESTON_PLATFORM_H
+
+#include <string.h>
+
+#include <wayland-egl.h>
+#include <EGL/egl.h>
+#include <EGL/eglext.h>
+
+#ifndef EGL_PLATFORM_WAYLAND_KHR
+#define EGL_PLATFORM_WAYLAND_KHR 0x31D8
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#ifndef EGL_EXT_platform_base
+typedef EGLDisplay (*PFNEGLGETPLATFORMDISPLAYEXTPROC) (EGLenum platform,
+ void *native_display,
+ const EGLint *attrib_list);
+typedef EGLSurface (*PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC) (EGLDisplay dpy,
+ EGLConfig config,
+ void *native_window,
+ const EGLint *attrib_list);
+#endif
+
+static inline void *
+weston_platform_get_egl_proc_address(const char *address)
+{
+ const char *extensions = eglQueryString(EGL_NO_DISPLAY, EGL_EXTENSIONS);
+
+ if (extensions
+ && (strstr(extensions, "EGL_EXT_platform_wayland")
+ || strstr(extensions, "EGL_KHR_platform_wayland"))) {
+ return (void *) eglGetProcAddress(address);
+ }
+
+ return NULL;
+}
+
+static inline EGLDisplay
+weston_platform_get_egl_display(EGLenum platform, void *native_display,
+ const EGLint *attrib_list)
+{
+ static PFNEGLGETPLATFORMDISPLAYEXTPROC get_platform_display = NULL;
+
+ if (!get_platform_display) {
+ get_platform_display = (PFNEGLGETPLATFORMDISPLAYEXTPROC)
+ weston_platform_get_egl_proc_address(
+ "eglGetPlatformDisplayEXT");
+ }
+
+ if (get_platform_display)
+ return get_platform_display(platform,
+ native_display, attrib_list);
+
+ return eglGetDisplay((EGLNativeDisplayType) native_display);
+}
+
+static inline EGLSurface
+weston_platform_create_egl_surface(EGLDisplay dpy, EGLConfig config,
+ void *native_window,
+ const EGLint *attrib_list)
+{
+ static PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC
+ create_platform_window = NULL;
+
+ if (!create_platform_window) {
+ create_platform_window = (PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC)
+ weston_platform_get_egl_proc_address(
+ "eglCreatePlatformWindowSurfaceEXT");
+ }
+
+ if (create_platform_window)
+ return create_platform_window(dpy, config,
+ native_window,
+ attrib_list);
+
+ return eglCreateWindowSurface(dpy, config,
+ (EGLNativeWindowType) native_window,
+ attrib_list);
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* WESTON_PLATFORM_H */
diff --git a/demo#3/common/libhomescreen/sample/simple-egl/package/hvac/config.xml b/demo#3/common/libhomescreen/sample/simple-egl/package/hvac/config.xml
new file mode 100644
index 0000000..d903f0e
--- /dev/null
+++ b/demo#3/common/libhomescreen/sample/simple-egl/package/hvac/config.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<widget xmlns="http://www.w3.org/ns/widgets" id="hvac" version="0.1">
+ <name>HVAC</name>
+ <icon src="icon.svg"/>
+ <content src="bin/hvac" type="application/vnd.agl.native"/>
+ <description>This is a demo application for simple-egl</description>
+ <author>TOYOA</author>
+ <license>APL 2.0 + MIT</license>
+ <feature name="urn:AGL:widget:required-api">
+ <param name="homescreen" value="ws" />
+ <param name="windowmanager" value="ws" />
+ </feature>
+ <feature name="urn:AGL:widget:required-permission">
+ <param name="urn:AGL:permission::public:no-htdocs" value="required" />
+ </feature>
+</widget>
diff --git a/demo#3/common/libhomescreen/sample/simple-egl/package/hvac/icon.svg b/demo#3/common/libhomescreen/sample/simple-egl/package/hvac/icon.svg
new file mode 100644
index 0000000..91661a7
--- /dev/null
+++ b/demo#3/common/libhomescreen/sample/simple-egl/package/hvac/icon.svg
@@ -0,0 +1,279 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Generator: Adobe Illustrator 21.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+
+<svg
+ xmlns:i="&amp;ns_ai;"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ version="1.1"
+ x="0px"
+ y="0px"
+ viewBox="0 0 320 320"
+ style="enable-background:new 0 0 320 320;"
+ xml:space="preserve"
+ id="svg2"
+ inkscape:version="0.91 r13725"
+ sodipodi:docname="icon.svg"><metadata
+ id="metadata1292"><rdf:RDF><cc:Work
+ rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
+ id="defs1290" /><sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="2560"
+ inkscape:window-height="1464"
+ id="namedview1288"
+ showgrid="false"
+ inkscape:zoom="0.7375"
+ inkscape:cx="-572.20339"
+ inkscape:cy="160"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg2" /><style
+ type="text/css"
+ id="style4">
+ .st0{display:none;}
+ .st1{display:inline;}
+ .st2{opacity:0.4;fill:url(#SVGID_1_);}
+ .st3{fill:url(#SVGID_2_);}
+ .st4{fill:#FFFFFF;}
+ .st5{font-family:'Roboto-Regular';}
+ .st6{font-size:25px;}
+ .st7{letter-spacing:6;}
+ .st8{fill:url(#SVGID_3_);}
+ .st9{fill:url(#SVGID_4_);}
+ .st10{fill:url(#SVGID_5_);}
+ .st11{fill:url(#SVGID_6_);}
+ .st12{fill:url(#SVGID_7_);}
+ .st13{fill:url(#SVGID_8_);}
+ .st14{fill:url(#SVGID_9_);}
+ .st15{fill:url(#SVGID_10_);}
+ .st16{fill:url(#SVGID_11_);}
+ .st17{fill:url(#SVGID_12_);}
+ .st18{fill:url(#SVGID_13_);}
+ .st19{fill:url(#SVGID_14_);}
+ .st20{fill:url(#SVGID_15_);}
+ .st21{fill:url(#SVGID_16_);}
+ .st22{fill:url(#SVGID_17_);}
+ .st23{fill:url(#SVGID_18_);}
+ .st24{opacity:0.29;}
+ .st25{fill:url(#SVGID_19_);}
+ .st26{fill:url(#SVGID_20_);}
+ .st27{fill:url(#SVGID_21_);}
+ .st28{fill:url(#SVGID_22_);}
+ .st29{fill:url(#SVGID_23_);}
+ .st30{fill:url(#SVGID_24_);}
+ .st31{fill:url(#SVGID_25_);}
+ .st32{fill:url(#SVGID_26_);}
+ .st33{fill:url(#SVGID_27_);}
+ .st34{fill:url(#SVGID_28_);}
+ .st35{fill:url(#SVGID_29_);}
+ .st36{fill:url(#SVGID_30_);}
+ .st37{fill:url(#SVGID_31_);}
+ .st38{fill:url(#SVGID_32_);}
+ .st39{fill:url(#SVGID_33_);}
+ .st40{fill:url(#SVGID_34_);}
+ .st41{fill:url(#SVGID_35_);}
+ .st42{fill:url(#SVGID_36_);}
+ .st43{opacity:0.4;fill:url(#SVGID_37_);}
+ .st44{fill:url(#SVGID_38_);}
+ .st45{fill:url(#SVGID_39_);}
+ .st46{fill:url(#SVGID_40_);}
+ .st47{fill:url(#SVGID_41_);}
+ .st48{fill:url(#SVGID_42_);}
+ .st49{fill:url(#SVGID_43_);}
+ .st50{fill:url(#SVGID_44_);}
+ .st51{display:inline;opacity:0.29;}
+ .st52{display:inline;fill:url(#SVGID_45_);}
+ .st53{display:inline;fill:url(#SVGID_46_);}
+ .st54{display:inline;fill:#FFFFFF;}
+ .st55{display:inline;fill:url(#SVGID_47_);}
+ .st56{display:inline;fill:url(#SVGID_48_);}
+ .st57{display:inline;fill:url(#SVGID_49_);}
+ .st58{display:inline;fill:url(#SVGID_50_);}
+ .st59{display:inline;fill:url(#SVGID_51_);}
+ .st60{display:inline;fill:url(#SVGID_52_);}
+ .st61{opacity:0.4;fill:url(#SVGID_53_);}
+ .st62{fill:url(#SVGID_54_);}
+ .st63{fill:url(#SVGID_55_);}
+ .st64{fill:url(#SVGID_56_);}
+ .st65{fill:url(#SVGID_57_);}
+ .st66{fill:url(#SVGID_58_);}
+ .st67{opacity:0.4;fill:url(#SVGID_59_);}
+ .st68{fill:url(#SVGID_60_);}
+ .st69{fill:url(#SVGID_61_);}
+ .st70{fill:url(#SVGID_62_);}
+ .st71{fill:url(#SVGID_63_);}
+ .st72{fill:url(#SVGID_64_);}
+ .st73{fill:url(#SVGID_65_);}
+ .st74{fill:url(#SVGID_66_);}
+ .st75{fill:url(#SVGID_67_);}
+ .st76{fill:url(#SVGID_68_);}
+ .st77{fill:url(#SVGID_69_);}
+ .st78{fill:url(#SVGID_70_);}
+ .st79{fill:url(#SVGID_71_);}
+ .st80{fill:url(#SVGID_72_);}
+ .st81{fill:url(#SVGID_73_);}
+ .st82{fill:url(#SVGID_74_);}
+ .st83{fill:url(#SVGID_75_);}
+ .st84{fill:url(#SVGID_76_);}
+ .st85{fill:url(#SVGID_77_);}
+ .st86{fill:url(#SVGID_78_);}
+ .st87{fill:url(#SVGID_79_);}
+ .st88{fill:url(#SVGID_80_);}
+ .st89{fill:url(#SVGID_81_);}
+ .st90{fill:url(#SVGID_82_);}
+ .st91{fill:url(#SVGID_83_);}
+ .st92{fill:url(#SVGID_84_);}
+ .st93{fill:url(#SVGID_85_);}
+ .st94{fill:url(#SVGID_86_);}
+ .st95{opacity:0.4;fill:url(#SVGID_87_);}
+ .st96{fill:url(#SVGID_88_);}
+ .st97{fill:url(#SVGID_89_);}
+ .st98{fill:url(#SVGID_90_);}
+ .st99{fill:url(#SVGID_91_);}
+ .st100{fill:url(#SVGID_92_);}
+ .st101{fill:url(#SVGID_93_);}
+ .st102{fill:url(#SVGID_94_);}
+ .st103{opacity:0.4;fill:url(#SVGID_95_);}
+ .st104{fill:url(#SVGID_96_);}
+ .st105{fill:url(#SVGID_97_);}
+ .st106{fill:url(#SVGID_98_);}
+ .st107{fill:url(#SVGID_99_);}
+ .st108{fill:url(#SVGID_100_);}
+ .st109{fill:url(#SVGID_101_);}
+ .st110{display:inline;fill:url(#SVGID_102_);}
+ .st111{display:inline;fill:url(#SVGID_103_);}
+ .st112{fill:url(#SVGID_104_);}
+ .st113{fill:url(#SVGID_105_);}
+ .st114{fill:url(#SVGID_106_);}
+ .st115{fill:url(#SVGID_107_);}
+ .st116{fill:url(#SVGID_108_);}
+ .st117{opacity:0.4;fill:url(#SVGID_109_);}
+ .st118{fill:url(#SVGID_110_);}
+ .st119{fill:url(#SVGID_111_);}
+ .st120{fill:url(#SVGID_112_);}
+ .st121{fill:url(#SVGID_113_);}
+ .st122{fill:url(#SVGID_114_);}
+ .st123{opacity:0.4;fill:url(#SVGID_115_);}
+ .st124{fill:url(#SVGID_116_);}
+ .st125{fill:url(#SVGID_117_);}
+ .st126{fill:url(#SVGID_118_);}
+ .st127{display:inline;fill:url(#SVGID_119_);}
+ .st128{display:inline;fill:url(#SVGID_120_);}
+ .st129{fill:url(#SVGID_121_);}
+ .st130{fill:url(#SVGID_122_);}
+</style><switch
+ id="switch6"><g
+ i:extraneous="self"
+ id="g8"><g
+ id="Multimedia_Inactive_copy"><circle
+ class="st24"
+ cx="159.7"
+ cy="133.4"
+ r="101.9"
+ id="circle884" /><linearGradient
+ id="SVGID_91_"
+ gradientUnits="userSpaceOnUse"
+ x1="115.9317"
+ y1="254.1836"
+ x2="256.3852"
+ y2="-133.5267"><stop
+ offset="0"
+ style="stop-color:#8BC53F"
+ id="stop887" /><stop
+ offset="2.015080e-02"
+ style="stop-color:#7CCB56;stop-opacity:0.9678"
+ id="stop889" /><stop
+ offset="6.089833e-02"
+ style="stop-color:#62D67D;stop-opacity:0.9028"
+ id="stop891" /><stop
+ offset="0.1057"
+ style="stop-color:#4BDFA0;stop-opacity:0.8312"
+ id="stop893" /><stop
+ offset="0.1543"
+ style="stop-color:#38E7BE;stop-opacity:0.7537"
+ id="stop895" /><stop
+ offset="0.2077"
+ style="stop-color:#28EED6;stop-opacity:0.6684"
+ id="stop897" /><stop
+ offset="0.2681"
+ style="stop-color:#1CF3E8;stop-opacity:0.572"
+ id="stop899" /><stop
+ offset="0.3394"
+ style="stop-color:#13F6F5;stop-opacity:0.4581"
+ id="stop901" /><stop
+ offset="0.4323"
+ style="stop-color:#0EF8FD;stop-opacity:0.3098"
+ id="stop903" /><stop
+ offset="0.6264"
+ style="stop-color:#0DF9FF;stop-opacity:0"
+ id="stop905" /></linearGradient><circle
+ class="st99"
+ cx="159.7"
+ cy="133.4"
+ r="101.9"
+ id="circle907" /><linearGradient
+ id="SVGID_92_"
+ gradientUnits="userSpaceOnUse"
+ x1="4.0481"
+ y1="287.9492"
+ x2="320.4859"
+ y2="-15.4029"
+ gradientTransform="matrix(1 5.464556e-03 -5.464556e-03 1 -2.0192 -3.0212)"><stop
+ offset="0"
+ style="stop-color:#59FF7F"
+ id="stop910" /><stop
+ offset="1"
+ style="stop-color:#6BFBFF"
+ id="stop912" /></linearGradient><path
+ class="st100"
+ d="M160,238.8c-0.2,0-0.4,0-0.6,0c-58-0.3-104.9-47.7-104.6-105.7C55.2,75.3,102.3,28.5,160,28.5 c0.2,0,0.4,0,0.6,0c58,0.3,104.9,47.7,104.6,105.7l0,0C264.8,192,217.7,238.8,160,238.8z M160,32.2 c-55.7,0-101.2,45.2-101.5,100.9c-0.3,55.9,45,101.7,100.9,102c0.2,0,0.4,0,0.6,0c55.7,0,101.2-45.2,101.5-100.9 c0.3-55.9-45-101.7-100.9-102C160.4,32.2,160.2,32.2,160,32.2z"
+ id="path914" /><g
+ id="g916"><text
+ transform="matrix(1 0 0 1 53.5841 284.7119)"
+ class="st4 st5 st6 st7"
+ id="text918">MULTIMEDIA</text>
+<linearGradient
+ id="SVGID_93_"
+ gradientUnits="userSpaceOnUse"
+ x1="140.5445"
+ y1="202.2363"
+ x2="186.8444"
+ y2="68.7049"><stop
+ offset="0"
+ style="stop-color:#59FF7F"
+ id="stop921" /><stop
+ offset="1"
+ style="stop-color:#6BFBFF"
+ id="stop923" /></linearGradient><path
+ class="st101"
+ d="M114.5,190.9c-6.4,0-12-2.6-14.8-7.5c-2.9-4.9-5.4-14.5,9.6-23.2c4.8-2.8,17.1-3.9,20.8-4l0.1,3.6 c-4.6,0.1-15.5,1.4-19.1,3.5c-9.4,5.4-12.1,11.5-8.3,18.3c3.8,6.6,14.6,7.6,24,2.2c6.6-3.8,10.6-10.5,10.7-17.9l-0.1-0.7V95.4 l71.9-14.2l0.1,71.3c0,6.7-3.3,16.4-12.5,21.8c-11.1,6.4-24.1,4.8-28.9-3.5c-2.9-4.9-5.4-14.5,9.6-23.2 c4.4-2.5,14.4-3.8,18.8-3.9l0.1,3.6c-4.2,0.1-13.5,1.4-17.1,3.5c-6.4,3.7-13.1,9.9-8.3,18.3c3.8,6.6,14.6,7.6,24,2.2 c7.9-4.5,10.7-12.8,10.7-18.5l-0.1-0.8V85.6l-64.7,12.7v66.8l0.1,0.7c0,8.7-4.7,16.6-12.5,21.1 C123.9,189.6,119,190.9,114.5,190.9z"
+ id="path925" /><linearGradient
+ id="SVGID_94_"
+ gradientUnits="userSpaceOnUse"
+ x1="145.3286"
+ y1="203.8951"
+ x2="191.6285"
+ y2="70.3637"><stop
+ offset="0"
+ style="stop-color:#59FF7F"
+ id="stop928" /><stop
+ offset="1"
+ style="stop-color:#6BFBFF"
+ id="stop930" /></linearGradient><polygon
+ class="st102"
+ points="155.6,123.3 154.8,119.8 195.5,110.2 196.3,113.7 "
+ id="polygon932" /></g></g></g></switch></svg> \ No newline at end of file
diff --git a/demo#3/common/libhomescreen/sample/simple-egl/package/navi/config.xml b/demo#3/common/libhomescreen/sample/simple-egl/package/navi/config.xml
new file mode 100644
index 0000000..33b5b67
--- /dev/null
+++ b/demo#3/common/libhomescreen/sample/simple-egl/package/navi/config.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<widget xmlns="http://www.w3.org/ns/widgets" id="navigation" version="0.1">
+ <name>Navigation</name>
+ <icon src="icon.svg"/>
+ <content src="bin/navi" type="application/vnd.agl.native"/>
+ <description>This is a demo application for simple-egl</description>
+ <author>TOYOA</author>
+ <license>APL 2.0 + MIT</license>
+ <feature name="urn:AGL:widget:required-api">
+ <param name="homescreen" value="ws" />
+ <param name="windowmanager" value="ws" />
+ </feature>
+ <feature name="urn:AGL:widget:required-permission">
+ <param name="urn:AGL:permission::public:no-htdocs" value="required" />
+ </feature>
+</widget>
diff --git a/demo#3/common/libhomescreen/sample/simple-egl/package/navi/icon.svg b/demo#3/common/libhomescreen/sample/simple-egl/package/navi/icon.svg
new file mode 100644
index 0000000..91661a7
--- /dev/null
+++ b/demo#3/common/libhomescreen/sample/simple-egl/package/navi/icon.svg
@@ -0,0 +1,279 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Generator: Adobe Illustrator 21.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+
+<svg
+ xmlns:i="&amp;ns_ai;"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ version="1.1"
+ x="0px"
+ y="0px"
+ viewBox="0 0 320 320"
+ style="enable-background:new 0 0 320 320;"
+ xml:space="preserve"
+ id="svg2"
+ inkscape:version="0.91 r13725"
+ sodipodi:docname="icon.svg"><metadata
+ id="metadata1292"><rdf:RDF><cc:Work
+ rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
+ id="defs1290" /><sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="2560"
+ inkscape:window-height="1464"
+ id="namedview1288"
+ showgrid="false"
+ inkscape:zoom="0.7375"
+ inkscape:cx="-572.20339"
+ inkscape:cy="160"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg2" /><style
+ type="text/css"
+ id="style4">
+ .st0{display:none;}
+ .st1{display:inline;}
+ .st2{opacity:0.4;fill:url(#SVGID_1_);}
+ .st3{fill:url(#SVGID_2_);}
+ .st4{fill:#FFFFFF;}
+ .st5{font-family:'Roboto-Regular';}
+ .st6{font-size:25px;}
+ .st7{letter-spacing:6;}
+ .st8{fill:url(#SVGID_3_);}
+ .st9{fill:url(#SVGID_4_);}
+ .st10{fill:url(#SVGID_5_);}
+ .st11{fill:url(#SVGID_6_);}
+ .st12{fill:url(#SVGID_7_);}
+ .st13{fill:url(#SVGID_8_);}
+ .st14{fill:url(#SVGID_9_);}
+ .st15{fill:url(#SVGID_10_);}
+ .st16{fill:url(#SVGID_11_);}
+ .st17{fill:url(#SVGID_12_);}
+ .st18{fill:url(#SVGID_13_);}
+ .st19{fill:url(#SVGID_14_);}
+ .st20{fill:url(#SVGID_15_);}
+ .st21{fill:url(#SVGID_16_);}
+ .st22{fill:url(#SVGID_17_);}
+ .st23{fill:url(#SVGID_18_);}
+ .st24{opacity:0.29;}
+ .st25{fill:url(#SVGID_19_);}
+ .st26{fill:url(#SVGID_20_);}
+ .st27{fill:url(#SVGID_21_);}
+ .st28{fill:url(#SVGID_22_);}
+ .st29{fill:url(#SVGID_23_);}
+ .st30{fill:url(#SVGID_24_);}
+ .st31{fill:url(#SVGID_25_);}
+ .st32{fill:url(#SVGID_26_);}
+ .st33{fill:url(#SVGID_27_);}
+ .st34{fill:url(#SVGID_28_);}
+ .st35{fill:url(#SVGID_29_);}
+ .st36{fill:url(#SVGID_30_);}
+ .st37{fill:url(#SVGID_31_);}
+ .st38{fill:url(#SVGID_32_);}
+ .st39{fill:url(#SVGID_33_);}
+ .st40{fill:url(#SVGID_34_);}
+ .st41{fill:url(#SVGID_35_);}
+ .st42{fill:url(#SVGID_36_);}
+ .st43{opacity:0.4;fill:url(#SVGID_37_);}
+ .st44{fill:url(#SVGID_38_);}
+ .st45{fill:url(#SVGID_39_);}
+ .st46{fill:url(#SVGID_40_);}
+ .st47{fill:url(#SVGID_41_);}
+ .st48{fill:url(#SVGID_42_);}
+ .st49{fill:url(#SVGID_43_);}
+ .st50{fill:url(#SVGID_44_);}
+ .st51{display:inline;opacity:0.29;}
+ .st52{display:inline;fill:url(#SVGID_45_);}
+ .st53{display:inline;fill:url(#SVGID_46_);}
+ .st54{display:inline;fill:#FFFFFF;}
+ .st55{display:inline;fill:url(#SVGID_47_);}
+ .st56{display:inline;fill:url(#SVGID_48_);}
+ .st57{display:inline;fill:url(#SVGID_49_);}
+ .st58{display:inline;fill:url(#SVGID_50_);}
+ .st59{display:inline;fill:url(#SVGID_51_);}
+ .st60{display:inline;fill:url(#SVGID_52_);}
+ .st61{opacity:0.4;fill:url(#SVGID_53_);}
+ .st62{fill:url(#SVGID_54_);}
+ .st63{fill:url(#SVGID_55_);}
+ .st64{fill:url(#SVGID_56_);}
+ .st65{fill:url(#SVGID_57_);}
+ .st66{fill:url(#SVGID_58_);}
+ .st67{opacity:0.4;fill:url(#SVGID_59_);}
+ .st68{fill:url(#SVGID_60_);}
+ .st69{fill:url(#SVGID_61_);}
+ .st70{fill:url(#SVGID_62_);}
+ .st71{fill:url(#SVGID_63_);}
+ .st72{fill:url(#SVGID_64_);}
+ .st73{fill:url(#SVGID_65_);}
+ .st74{fill:url(#SVGID_66_);}
+ .st75{fill:url(#SVGID_67_);}
+ .st76{fill:url(#SVGID_68_);}
+ .st77{fill:url(#SVGID_69_);}
+ .st78{fill:url(#SVGID_70_);}
+ .st79{fill:url(#SVGID_71_);}
+ .st80{fill:url(#SVGID_72_);}
+ .st81{fill:url(#SVGID_73_);}
+ .st82{fill:url(#SVGID_74_);}
+ .st83{fill:url(#SVGID_75_);}
+ .st84{fill:url(#SVGID_76_);}
+ .st85{fill:url(#SVGID_77_);}
+ .st86{fill:url(#SVGID_78_);}
+ .st87{fill:url(#SVGID_79_);}
+ .st88{fill:url(#SVGID_80_);}
+ .st89{fill:url(#SVGID_81_);}
+ .st90{fill:url(#SVGID_82_);}
+ .st91{fill:url(#SVGID_83_);}
+ .st92{fill:url(#SVGID_84_);}
+ .st93{fill:url(#SVGID_85_);}
+ .st94{fill:url(#SVGID_86_);}
+ .st95{opacity:0.4;fill:url(#SVGID_87_);}
+ .st96{fill:url(#SVGID_88_);}
+ .st97{fill:url(#SVGID_89_);}
+ .st98{fill:url(#SVGID_90_);}
+ .st99{fill:url(#SVGID_91_);}
+ .st100{fill:url(#SVGID_92_);}
+ .st101{fill:url(#SVGID_93_);}
+ .st102{fill:url(#SVGID_94_);}
+ .st103{opacity:0.4;fill:url(#SVGID_95_);}
+ .st104{fill:url(#SVGID_96_);}
+ .st105{fill:url(#SVGID_97_);}
+ .st106{fill:url(#SVGID_98_);}
+ .st107{fill:url(#SVGID_99_);}
+ .st108{fill:url(#SVGID_100_);}
+ .st109{fill:url(#SVGID_101_);}
+ .st110{display:inline;fill:url(#SVGID_102_);}
+ .st111{display:inline;fill:url(#SVGID_103_);}
+ .st112{fill:url(#SVGID_104_);}
+ .st113{fill:url(#SVGID_105_);}
+ .st114{fill:url(#SVGID_106_);}
+ .st115{fill:url(#SVGID_107_);}
+ .st116{fill:url(#SVGID_108_);}
+ .st117{opacity:0.4;fill:url(#SVGID_109_);}
+ .st118{fill:url(#SVGID_110_);}
+ .st119{fill:url(#SVGID_111_);}
+ .st120{fill:url(#SVGID_112_);}
+ .st121{fill:url(#SVGID_113_);}
+ .st122{fill:url(#SVGID_114_);}
+ .st123{opacity:0.4;fill:url(#SVGID_115_);}
+ .st124{fill:url(#SVGID_116_);}
+ .st125{fill:url(#SVGID_117_);}
+ .st126{fill:url(#SVGID_118_);}
+ .st127{display:inline;fill:url(#SVGID_119_);}
+ .st128{display:inline;fill:url(#SVGID_120_);}
+ .st129{fill:url(#SVGID_121_);}
+ .st130{fill:url(#SVGID_122_);}
+</style><switch
+ id="switch6"><g
+ i:extraneous="self"
+ id="g8"><g
+ id="Multimedia_Inactive_copy"><circle
+ class="st24"
+ cx="159.7"
+ cy="133.4"
+ r="101.9"
+ id="circle884" /><linearGradient
+ id="SVGID_91_"
+ gradientUnits="userSpaceOnUse"
+ x1="115.9317"
+ y1="254.1836"
+ x2="256.3852"
+ y2="-133.5267"><stop
+ offset="0"
+ style="stop-color:#8BC53F"
+ id="stop887" /><stop
+ offset="2.015080e-02"
+ style="stop-color:#7CCB56;stop-opacity:0.9678"
+ id="stop889" /><stop
+ offset="6.089833e-02"
+ style="stop-color:#62D67D;stop-opacity:0.9028"
+ id="stop891" /><stop
+ offset="0.1057"
+ style="stop-color:#4BDFA0;stop-opacity:0.8312"
+ id="stop893" /><stop
+ offset="0.1543"
+ style="stop-color:#38E7BE;stop-opacity:0.7537"
+ id="stop895" /><stop
+ offset="0.2077"
+ style="stop-color:#28EED6;stop-opacity:0.6684"
+ id="stop897" /><stop
+ offset="0.2681"
+ style="stop-color:#1CF3E8;stop-opacity:0.572"
+ id="stop899" /><stop
+ offset="0.3394"
+ style="stop-color:#13F6F5;stop-opacity:0.4581"
+ id="stop901" /><stop
+ offset="0.4323"
+ style="stop-color:#0EF8FD;stop-opacity:0.3098"
+ id="stop903" /><stop
+ offset="0.6264"
+ style="stop-color:#0DF9FF;stop-opacity:0"
+ id="stop905" /></linearGradient><circle
+ class="st99"
+ cx="159.7"
+ cy="133.4"
+ r="101.9"
+ id="circle907" /><linearGradient
+ id="SVGID_92_"
+ gradientUnits="userSpaceOnUse"
+ x1="4.0481"
+ y1="287.9492"
+ x2="320.4859"
+ y2="-15.4029"
+ gradientTransform="matrix(1 5.464556e-03 -5.464556e-03 1 -2.0192 -3.0212)"><stop
+ offset="0"
+ style="stop-color:#59FF7F"
+ id="stop910" /><stop
+ offset="1"
+ style="stop-color:#6BFBFF"
+ id="stop912" /></linearGradient><path
+ class="st100"
+ d="M160,238.8c-0.2,0-0.4,0-0.6,0c-58-0.3-104.9-47.7-104.6-105.7C55.2,75.3,102.3,28.5,160,28.5 c0.2,0,0.4,0,0.6,0c58,0.3,104.9,47.7,104.6,105.7l0,0C264.8,192,217.7,238.8,160,238.8z M160,32.2 c-55.7,0-101.2,45.2-101.5,100.9c-0.3,55.9,45,101.7,100.9,102c0.2,0,0.4,0,0.6,0c55.7,0,101.2-45.2,101.5-100.9 c0.3-55.9-45-101.7-100.9-102C160.4,32.2,160.2,32.2,160,32.2z"
+ id="path914" /><g
+ id="g916"><text
+ transform="matrix(1 0 0 1 53.5841 284.7119)"
+ class="st4 st5 st6 st7"
+ id="text918">MULTIMEDIA</text>
+<linearGradient
+ id="SVGID_93_"
+ gradientUnits="userSpaceOnUse"
+ x1="140.5445"
+ y1="202.2363"
+ x2="186.8444"
+ y2="68.7049"><stop
+ offset="0"
+ style="stop-color:#59FF7F"
+ id="stop921" /><stop
+ offset="1"
+ style="stop-color:#6BFBFF"
+ id="stop923" /></linearGradient><path
+ class="st101"
+ d="M114.5,190.9c-6.4,0-12-2.6-14.8-7.5c-2.9-4.9-5.4-14.5,9.6-23.2c4.8-2.8,17.1-3.9,20.8-4l0.1,3.6 c-4.6,0.1-15.5,1.4-19.1,3.5c-9.4,5.4-12.1,11.5-8.3,18.3c3.8,6.6,14.6,7.6,24,2.2c6.6-3.8,10.6-10.5,10.7-17.9l-0.1-0.7V95.4 l71.9-14.2l0.1,71.3c0,6.7-3.3,16.4-12.5,21.8c-11.1,6.4-24.1,4.8-28.9-3.5c-2.9-4.9-5.4-14.5,9.6-23.2 c4.4-2.5,14.4-3.8,18.8-3.9l0.1,3.6c-4.2,0.1-13.5,1.4-17.1,3.5c-6.4,3.7-13.1,9.9-8.3,18.3c3.8,6.6,14.6,7.6,24,2.2 c7.9-4.5,10.7-12.8,10.7-18.5l-0.1-0.8V85.6l-64.7,12.7v66.8l0.1,0.7c0,8.7-4.7,16.6-12.5,21.1 C123.9,189.6,119,190.9,114.5,190.9z"
+ id="path925" /><linearGradient
+ id="SVGID_94_"
+ gradientUnits="userSpaceOnUse"
+ x1="145.3286"
+ y1="203.8951"
+ x2="191.6285"
+ y2="70.3637"><stop
+ offset="0"
+ style="stop-color:#59FF7F"
+ id="stop928" /><stop
+ offset="1"
+ style="stop-color:#6BFBFF"
+ id="stop930" /></linearGradient><polygon
+ class="st102"
+ points="155.6,123.3 154.8,119.8 195.5,110.2 196.3,113.7 "
+ id="polygon932" /></g></g></g></switch></svg> \ No newline at end of file
diff --git a/demo#3/common/libhomescreen/sample/simple-egl/package/root/config.xml b/demo#3/common/libhomescreen/sample/simple-egl/package/root/config.xml
new file mode 100644
index 0000000..d6402ad
--- /dev/null
+++ b/demo#3/common/libhomescreen/sample/simple-egl/package/root/config.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<widget xmlns="http://www.w3.org/ns/widgets" id="simple-egl" version="0.1">
+ <name>SIMPLE-EGL</name>
+ <icon src="icon.svg"/>
+ <content src="bin/simple-egl" type="application/vnd.agl.native"/>
+ <description>This is a demo application for simple-egl</description>
+ <author>TOYOA</author>
+ <license>APL 2.0 + MIT</license>
+ <feature name="urn:AGL:widget:required-api">
+ <param name="homescreen" value="ws" />
+ <param name="windowmanager" value="ws" />
+ </feature>
+ <feature name="urn:AGL:widget:required-permission">
+ <param name="urn:AGL:permission::public:no-htdocs" value="required" />
+ </feature>
+</widget>
diff --git a/demo#3/common/libhomescreen/sample/simple-egl/package/root/icon.svg b/demo#3/common/libhomescreen/sample/simple-egl/package/root/icon.svg
new file mode 100644
index 0000000..91661a7
--- /dev/null
+++ b/demo#3/common/libhomescreen/sample/simple-egl/package/root/icon.svg
@@ -0,0 +1,279 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Generator: Adobe Illustrator 21.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+
+<svg
+ xmlns:i="&amp;ns_ai;"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ version="1.1"
+ x="0px"
+ y="0px"
+ viewBox="0 0 320 320"
+ style="enable-background:new 0 0 320 320;"
+ xml:space="preserve"
+ id="svg2"
+ inkscape:version="0.91 r13725"
+ sodipodi:docname="icon.svg"><metadata
+ id="metadata1292"><rdf:RDF><cc:Work
+ rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
+ id="defs1290" /><sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="2560"
+ inkscape:window-height="1464"
+ id="namedview1288"
+ showgrid="false"
+ inkscape:zoom="0.7375"
+ inkscape:cx="-572.20339"
+ inkscape:cy="160"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg2" /><style
+ type="text/css"
+ id="style4">
+ .st0{display:none;}
+ .st1{display:inline;}
+ .st2{opacity:0.4;fill:url(#SVGID_1_);}
+ .st3{fill:url(#SVGID_2_);}
+ .st4{fill:#FFFFFF;}
+ .st5{font-family:'Roboto-Regular';}
+ .st6{font-size:25px;}
+ .st7{letter-spacing:6;}
+ .st8{fill:url(#SVGID_3_);}
+ .st9{fill:url(#SVGID_4_);}
+ .st10{fill:url(#SVGID_5_);}
+ .st11{fill:url(#SVGID_6_);}
+ .st12{fill:url(#SVGID_7_);}
+ .st13{fill:url(#SVGID_8_);}
+ .st14{fill:url(#SVGID_9_);}
+ .st15{fill:url(#SVGID_10_);}
+ .st16{fill:url(#SVGID_11_);}
+ .st17{fill:url(#SVGID_12_);}
+ .st18{fill:url(#SVGID_13_);}
+ .st19{fill:url(#SVGID_14_);}
+ .st20{fill:url(#SVGID_15_);}
+ .st21{fill:url(#SVGID_16_);}
+ .st22{fill:url(#SVGID_17_);}
+ .st23{fill:url(#SVGID_18_);}
+ .st24{opacity:0.29;}
+ .st25{fill:url(#SVGID_19_);}
+ .st26{fill:url(#SVGID_20_);}
+ .st27{fill:url(#SVGID_21_);}
+ .st28{fill:url(#SVGID_22_);}
+ .st29{fill:url(#SVGID_23_);}
+ .st30{fill:url(#SVGID_24_);}
+ .st31{fill:url(#SVGID_25_);}
+ .st32{fill:url(#SVGID_26_);}
+ .st33{fill:url(#SVGID_27_);}
+ .st34{fill:url(#SVGID_28_);}
+ .st35{fill:url(#SVGID_29_);}
+ .st36{fill:url(#SVGID_30_);}
+ .st37{fill:url(#SVGID_31_);}
+ .st38{fill:url(#SVGID_32_);}
+ .st39{fill:url(#SVGID_33_);}
+ .st40{fill:url(#SVGID_34_);}
+ .st41{fill:url(#SVGID_35_);}
+ .st42{fill:url(#SVGID_36_);}
+ .st43{opacity:0.4;fill:url(#SVGID_37_);}
+ .st44{fill:url(#SVGID_38_);}
+ .st45{fill:url(#SVGID_39_);}
+ .st46{fill:url(#SVGID_40_);}
+ .st47{fill:url(#SVGID_41_);}
+ .st48{fill:url(#SVGID_42_);}
+ .st49{fill:url(#SVGID_43_);}
+ .st50{fill:url(#SVGID_44_);}
+ .st51{display:inline;opacity:0.29;}
+ .st52{display:inline;fill:url(#SVGID_45_);}
+ .st53{display:inline;fill:url(#SVGID_46_);}
+ .st54{display:inline;fill:#FFFFFF;}
+ .st55{display:inline;fill:url(#SVGID_47_);}
+ .st56{display:inline;fill:url(#SVGID_48_);}
+ .st57{display:inline;fill:url(#SVGID_49_);}
+ .st58{display:inline;fill:url(#SVGID_50_);}
+ .st59{display:inline;fill:url(#SVGID_51_);}
+ .st60{display:inline;fill:url(#SVGID_52_);}
+ .st61{opacity:0.4;fill:url(#SVGID_53_);}
+ .st62{fill:url(#SVGID_54_);}
+ .st63{fill:url(#SVGID_55_);}
+ .st64{fill:url(#SVGID_56_);}
+ .st65{fill:url(#SVGID_57_);}
+ .st66{fill:url(#SVGID_58_);}
+ .st67{opacity:0.4;fill:url(#SVGID_59_);}
+ .st68{fill:url(#SVGID_60_);}
+ .st69{fill:url(#SVGID_61_);}
+ .st70{fill:url(#SVGID_62_);}
+ .st71{fill:url(#SVGID_63_);}
+ .st72{fill:url(#SVGID_64_);}
+ .st73{fill:url(#SVGID_65_);}
+ .st74{fill:url(#SVGID_66_);}
+ .st75{fill:url(#SVGID_67_);}
+ .st76{fill:url(#SVGID_68_);}
+ .st77{fill:url(#SVGID_69_);}
+ .st78{fill:url(#SVGID_70_);}
+ .st79{fill:url(#SVGID_71_);}
+ .st80{fill:url(#SVGID_72_);}
+ .st81{fill:url(#SVGID_73_);}
+ .st82{fill:url(#SVGID_74_);}
+ .st83{fill:url(#SVGID_75_);}
+ .st84{fill:url(#SVGID_76_);}
+ .st85{fill:url(#SVGID_77_);}
+ .st86{fill:url(#SVGID_78_);}
+ .st87{fill:url(#SVGID_79_);}
+ .st88{fill:url(#SVGID_80_);}
+ .st89{fill:url(#SVGID_81_);}
+ .st90{fill:url(#SVGID_82_);}
+ .st91{fill:url(#SVGID_83_);}
+ .st92{fill:url(#SVGID_84_);}
+ .st93{fill:url(#SVGID_85_);}
+ .st94{fill:url(#SVGID_86_);}
+ .st95{opacity:0.4;fill:url(#SVGID_87_);}
+ .st96{fill:url(#SVGID_88_);}
+ .st97{fill:url(#SVGID_89_);}
+ .st98{fill:url(#SVGID_90_);}
+ .st99{fill:url(#SVGID_91_);}
+ .st100{fill:url(#SVGID_92_);}
+ .st101{fill:url(#SVGID_93_);}
+ .st102{fill:url(#SVGID_94_);}
+ .st103{opacity:0.4;fill:url(#SVGID_95_);}
+ .st104{fill:url(#SVGID_96_);}
+ .st105{fill:url(#SVGID_97_);}
+ .st106{fill:url(#SVGID_98_);}
+ .st107{fill:url(#SVGID_99_);}
+ .st108{fill:url(#SVGID_100_);}
+ .st109{fill:url(#SVGID_101_);}
+ .st110{display:inline;fill:url(#SVGID_102_);}
+ .st111{display:inline;fill:url(#SVGID_103_);}
+ .st112{fill:url(#SVGID_104_);}
+ .st113{fill:url(#SVGID_105_);}
+ .st114{fill:url(#SVGID_106_);}
+ .st115{fill:url(#SVGID_107_);}
+ .st116{fill:url(#SVGID_108_);}
+ .st117{opacity:0.4;fill:url(#SVGID_109_);}
+ .st118{fill:url(#SVGID_110_);}
+ .st119{fill:url(#SVGID_111_);}
+ .st120{fill:url(#SVGID_112_);}
+ .st121{fill:url(#SVGID_113_);}
+ .st122{fill:url(#SVGID_114_);}
+ .st123{opacity:0.4;fill:url(#SVGID_115_);}
+ .st124{fill:url(#SVGID_116_);}
+ .st125{fill:url(#SVGID_117_);}
+ .st126{fill:url(#SVGID_118_);}
+ .st127{display:inline;fill:url(#SVGID_119_);}
+ .st128{display:inline;fill:url(#SVGID_120_);}
+ .st129{fill:url(#SVGID_121_);}
+ .st130{fill:url(#SVGID_122_);}
+</style><switch
+ id="switch6"><g
+ i:extraneous="self"
+ id="g8"><g
+ id="Multimedia_Inactive_copy"><circle
+ class="st24"
+ cx="159.7"
+ cy="133.4"
+ r="101.9"
+ id="circle884" /><linearGradient
+ id="SVGID_91_"
+ gradientUnits="userSpaceOnUse"
+ x1="115.9317"
+ y1="254.1836"
+ x2="256.3852"
+ y2="-133.5267"><stop
+ offset="0"
+ style="stop-color:#8BC53F"
+ id="stop887" /><stop
+ offset="2.015080e-02"
+ style="stop-color:#7CCB56;stop-opacity:0.9678"
+ id="stop889" /><stop
+ offset="6.089833e-02"
+ style="stop-color:#62D67D;stop-opacity:0.9028"
+ id="stop891" /><stop
+ offset="0.1057"
+ style="stop-color:#4BDFA0;stop-opacity:0.8312"
+ id="stop893" /><stop
+ offset="0.1543"
+ style="stop-color:#38E7BE;stop-opacity:0.7537"
+ id="stop895" /><stop
+ offset="0.2077"
+ style="stop-color:#28EED6;stop-opacity:0.6684"
+ id="stop897" /><stop
+ offset="0.2681"
+ style="stop-color:#1CF3E8;stop-opacity:0.572"
+ id="stop899" /><stop
+ offset="0.3394"
+ style="stop-color:#13F6F5;stop-opacity:0.4581"
+ id="stop901" /><stop
+ offset="0.4323"
+ style="stop-color:#0EF8FD;stop-opacity:0.3098"
+ id="stop903" /><stop
+ offset="0.6264"
+ style="stop-color:#0DF9FF;stop-opacity:0"
+ id="stop905" /></linearGradient><circle
+ class="st99"
+ cx="159.7"
+ cy="133.4"
+ r="101.9"
+ id="circle907" /><linearGradient
+ id="SVGID_92_"
+ gradientUnits="userSpaceOnUse"
+ x1="4.0481"
+ y1="287.9492"
+ x2="320.4859"
+ y2="-15.4029"
+ gradientTransform="matrix(1 5.464556e-03 -5.464556e-03 1 -2.0192 -3.0212)"><stop
+ offset="0"
+ style="stop-color:#59FF7F"
+ id="stop910" /><stop
+ offset="1"
+ style="stop-color:#6BFBFF"
+ id="stop912" /></linearGradient><path
+ class="st100"
+ d="M160,238.8c-0.2,0-0.4,0-0.6,0c-58-0.3-104.9-47.7-104.6-105.7C55.2,75.3,102.3,28.5,160,28.5 c0.2,0,0.4,0,0.6,0c58,0.3,104.9,47.7,104.6,105.7l0,0C264.8,192,217.7,238.8,160,238.8z M160,32.2 c-55.7,0-101.2,45.2-101.5,100.9c-0.3,55.9,45,101.7,100.9,102c0.2,0,0.4,0,0.6,0c55.7,0,101.2-45.2,101.5-100.9 c0.3-55.9-45-101.7-100.9-102C160.4,32.2,160.2,32.2,160,32.2z"
+ id="path914" /><g
+ id="g916"><text
+ transform="matrix(1 0 0 1 53.5841 284.7119)"
+ class="st4 st5 st6 st7"
+ id="text918">MULTIMEDIA</text>
+<linearGradient
+ id="SVGID_93_"
+ gradientUnits="userSpaceOnUse"
+ x1="140.5445"
+ y1="202.2363"
+ x2="186.8444"
+ y2="68.7049"><stop
+ offset="0"
+ style="stop-color:#59FF7F"
+ id="stop921" /><stop
+ offset="1"
+ style="stop-color:#6BFBFF"
+ id="stop923" /></linearGradient><path
+ class="st101"
+ d="M114.5,190.9c-6.4,0-12-2.6-14.8-7.5c-2.9-4.9-5.4-14.5,9.6-23.2c4.8-2.8,17.1-3.9,20.8-4l0.1,3.6 c-4.6,0.1-15.5,1.4-19.1,3.5c-9.4,5.4-12.1,11.5-8.3,18.3c3.8,6.6,14.6,7.6,24,2.2c6.6-3.8,10.6-10.5,10.7-17.9l-0.1-0.7V95.4 l71.9-14.2l0.1,71.3c0,6.7-3.3,16.4-12.5,21.8c-11.1,6.4-24.1,4.8-28.9-3.5c-2.9-4.9-5.4-14.5,9.6-23.2 c4.4-2.5,14.4-3.8,18.8-3.9l0.1,3.6c-4.2,0.1-13.5,1.4-17.1,3.5c-6.4,3.7-13.1,9.9-8.3,18.3c3.8,6.6,14.6,7.6,24,2.2 c7.9-4.5,10.7-12.8,10.7-18.5l-0.1-0.8V85.6l-64.7,12.7v66.8l0.1,0.7c0,8.7-4.7,16.6-12.5,21.1 C123.9,189.6,119,190.9,114.5,190.9z"
+ id="path925" /><linearGradient
+ id="SVGID_94_"
+ gradientUnits="userSpaceOnUse"
+ x1="145.3286"
+ y1="203.8951"
+ x2="191.6285"
+ y2="70.3637"><stop
+ offset="0"
+ style="stop-color:#59FF7F"
+ id="stop928" /><stop
+ offset="1"
+ style="stop-color:#6BFBFF"
+ id="stop930" /></linearGradient><polygon
+ class="st102"
+ points="155.6,123.3 154.8,119.8 195.5,110.2 196.3,113.7 "
+ id="polygon932" /></g></g></g></switch></svg> \ No newline at end of file
diff --git a/demo#3/common/libhomescreen/sample/simple-egl/src/simple-egl.cpp b/demo#3/common/libhomescreen/sample/simple-egl/src/simple-egl.cpp
new file mode 100644
index 0000000..799729b
--- /dev/null
+++ b/demo#3/common/libhomescreen/sample/simple-egl/src/simple-egl.cpp
@@ -0,0 +1,681 @@
+/*
+ * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+ * Copyright © 2011 Benjamin Franzke
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#include <mutex>
+#include <chrono>
+
+#include <iostream>
+#include <string>
+#include <stdarg.h>
+#include <sys/types.h>
+#include <thread>
+#include <exception>
+#include <vector>
+#include <sstream>
+
+#include <assert.h>
+#include <signal.h>
+
+#include <wayland-client.h>
+#include <wayland-egl.h>
+
+#include <GLES2/gl2.h>
+#include <EGL/egl.h>
+#include <EGL/eglext.h>
+
+#include <unistd.h>
+#include <time.h>
+
+#include <libwindowmanager.h>
+#include <libhomescreen.hpp>
+
+#include <ilm/ivi-application-client-protocol.h>
+#include "hmi-debug.h"
+
+using namespace std;
+
+const char* log_prefix = "simple-egl";
+uint32_t g_id_ivisurf = 9009;
+long port = 1700;
+string token = string("wm");
+
+string app_name = string("Navigation");
+const char* main_role = "navigation";
+
+LibHomeScreen* hs;
+LibWindowmanager *wm;
+
+static const struct wl_interface *types[] = {
+ NULL,
+ NULL,
+ NULL,
+ &wl_surface_interface,
+ &ivi_surface_interface,
+};
+
+static const struct wl_message ivi_surface_requests[] = {
+ { "destroy", "", types + 0 },
+};
+
+static const struct wl_message ivi_surface_events[] = {
+ { "configure", "ii", types + 0 },
+};
+
+const struct wl_interface ivi_surface_interface = {
+ "ivi_surface", 1,
+ 1, ivi_surface_requests,
+ 1, ivi_surface_events,
+};
+
+static const struct wl_message ivi_application_requests[] = {
+ { "surface_create", "uon", types + 2 },
+};
+
+const struct wl_interface ivi_application_interface = {
+ "ivi_application", 1,
+ 1, ivi_application_requests,
+ 0, NULL,
+};
+
+#include "platform.h"
+
+#ifndef EGL_EXT_swap_buffers_with_damage
+#define EGL_EXT_swap_buffers_with_damage 1
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSWITHDAMAGEEXTPROC)(EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects);
+#endif
+
+#ifndef EGL_EXT_buffer_age
+#define EGL_EXT_buffer_age 1
+#define EGL_BUFFER_AGE_EXT 0x313D
+#endif
+
+struct window;
+struct seat;
+
+struct display {
+ struct wl_display *display;
+ struct wl_registry *registry;
+ struct wl_compositor *compositor;
+ struct wl_seat *seat;
+ struct {
+ EGLDisplay dpy;
+ EGLContext ctx;
+ EGLConfig conf;
+ } egl;
+ struct window *window;
+ struct ivi_application *ivi_application;
+
+ PFNEGLSWAPBUFFERSWITHDAMAGEEXTPROC swap_buffers_with_damage;
+};
+
+struct geometry {
+ int width, height;
+};
+
+struct window {
+ struct display *display;
+ struct geometry geometry, window_size;
+ struct {
+ GLuint rotation_uniform;
+ GLuint pos;
+ GLuint col;
+ } gl;
+
+ uint32_t benchmark_time, frames;
+ struct wl_egl_window *native;
+ struct wl_surface *surface;
+ struct ivi_surface *ivi_surface;
+ EGLSurface egl_surface;
+ struct wl_callback *callback;
+ int fullscreen, opaque, buffer_size, frame_sync;
+};
+
+static const char *vert_shader_text =
+ "uniform mat4 rotation;\n"
+ "attribute vec4 pos;\n"
+ "attribute vec4 color;\n"
+ "varying vec4 v_color;\n"
+ "void main() {\n"
+ " gl_Position = rotation * pos;\n"
+ " v_color = color;\n"
+ "}\n";
+
+static const char *frag_shader_text =
+ "precision mediump float;\n"
+ "varying vec4 v_color;\n"
+ "void main() {\n"
+ " gl_FragColor = v_color;\n"
+ "}\n";
+
+static int running = 1;
+
+static void
+init_egl(struct display *display, struct window *window)
+{
+ static const EGLint context_attribs[] = {
+ EGL_CONTEXT_CLIENT_VERSION, 2,
+ EGL_NONE
+ };
+ const char *extensions;
+
+ EGLint config_attribs[] = {
+ EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
+ EGL_RED_SIZE, 1,
+ EGL_GREEN_SIZE, 1,
+ EGL_BLUE_SIZE, 1,
+ EGL_ALPHA_SIZE, 1,
+ EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
+ EGL_NONE
+ };
+
+ EGLint major, minor, n, count, i, size;
+ EGLConfig *configs;
+ EGLBoolean ret;
+
+ if (window->opaque || window->buffer_size == 16)
+ config_attribs[9] = 0;
+
+ display->egl.dpy = weston_platform_get_egl_display(EGL_PLATFORM_WAYLAND_KHR, display->display, NULL);
+ assert(display->egl.dpy);
+
+ ret = eglInitialize(display->egl.dpy, &major, &minor);
+ assert(ret == EGL_TRUE);
+ ret = eglBindAPI(EGL_OPENGL_ES_API);
+ assert(ret == EGL_TRUE);
+
+ if (!eglGetConfigs(display->egl.dpy, NULL, 0, &count) || count < 1)
+ assert(0);
+
+ configs = calloc(count, sizeof *configs);
+ assert(configs);
+
+ ret = eglChooseConfig(display->egl.dpy, config_attribs,
+ configs, count, &n);
+ assert(ret && n >= 1);
+
+ for (i = 0; i < n; i++) {
+ eglGetConfigAttrib(display->egl.dpy,
+ configs[i], EGL_BUFFER_SIZE, &size);
+ if (window->buffer_size == size) {
+ display->egl.conf = configs[i];
+ break;
+ }
+ }
+ free(configs);
+ if (display->egl.conf == NULL) {
+ HMI_ERROR(log_prefix,"did not find config with buffer size %d",
+ window->buffer_size);
+ exit(EXIT_FAILURE);
+ }
+
+ display->egl.ctx = eglCreateContext(display->egl.dpy,
+ display->egl.conf,
+ EGL_NO_CONTEXT, context_attribs);
+ assert(display->egl.ctx);
+
+ display->swap_buffers_with_damage = NULL;
+ extensions = eglQueryString(display->egl.dpy, EGL_EXTENSIONS);
+ if (extensions &&
+ strstr(extensions, "EGL_EXT_swap_buffers_with_damage") &&
+ strstr(extensions, "EGL_EXT_buffer_age"))
+ display->swap_buffers_with_damage =
+ (PFNEGLSWAPBUFFERSWITHDAMAGEEXTPROC)
+ eglGetProcAddress("eglSwapBuffersWithDamageEXT");
+
+ if (display->swap_buffers_with_damage)
+ HMI_DEBUG(log_prefix,"has EGL_EXT_buffer_age and EGL_EXT_swap_buffers_with_damage");
+
+}
+
+static void
+fini_egl(struct display *display)
+{
+ eglTerminate(display->egl.dpy);
+ eglReleaseThread();
+}
+
+static GLuint
+create_shader(struct window *window, const char *source, GLenum shader_type)
+{
+ GLuint shader;
+ GLint status;
+
+ shader = glCreateShader(shader_type);
+ assert(shader != 0);
+
+ glShaderSource(shader, 1, (const char **) &source, NULL);
+ glCompileShader(shader);
+
+ glGetShaderiv(shader, GL_COMPILE_STATUS, &status);
+ if (!status) {
+ char log[1000];
+ GLsizei len;
+ glGetShaderInfoLog(shader, 1000, &len, log);
+ HMI_ERROR(log_prefix,"Error: compiling %s: %*s",
+ shader_type == GL_VERTEX_SHADER ? "vertex" : "fragment",
+ len, log);
+ exit(1);
+ }
+
+ return shader;
+}
+
+static void
+init_gl(struct window *window)
+{
+ GLuint frag, vert;
+ GLuint program;
+ GLint status;
+
+ frag = create_shader(window, frag_shader_text, GL_FRAGMENT_SHADER);
+ vert = create_shader(window, vert_shader_text, GL_VERTEX_SHADER);
+
+ program = glCreateProgram();
+ glAttachShader(program, frag);
+ glAttachShader(program, vert);
+ glLinkProgram(program);
+
+ glGetProgramiv(program, GL_LINK_STATUS, &status);
+ if (!status) {
+ char log[1000];
+ GLsizei len;
+ glGetProgramInfoLog(program, 1000, &len, log);
+ HMI_ERROR(log_prefix,"Error: linking:%*s", len, log);
+ exit(1);
+ }
+
+ glUseProgram(program);
+
+ window->gl.pos = 0;
+ window->gl.col = 1;
+
+ glBindAttribLocation(program, window->gl.pos, "pos");
+ glBindAttribLocation(program, window->gl.col, "color");
+ glLinkProgram(program);
+
+ window->gl.rotation_uniform =
+ glGetUniformLocation(program, "rotation");
+}
+
+static void
+create_ivi_surface(struct window *window, struct display *display)
+{
+ uint32_t id_ivisurf = g_id_ivisurf;
+ window->ivi_surface =
+ ivi_application_surface_create(display->ivi_application,
+ id_ivisurf, window->surface);
+
+ if (window->ivi_surface == NULL) {
+ HMI_ERROR(log_prefix,"Failed to create ivi_client_surface");
+ abort();
+ }
+
+}
+
+static void
+create_surface(struct window *window)
+{
+ struct display *display = window->display;
+ EGLBoolean ret;
+
+ window->surface = wl_compositor_create_surface(display->compositor);
+
+ window->native =
+ wl_egl_window_create(window->surface,
+ window->geometry.width,
+ window->geometry.height);
+ window->egl_surface =
+ weston_platform_create_egl_surface(display->egl.dpy,
+ display->egl.conf,
+ window->native, NULL);
+
+
+ if (display->ivi_application ) {
+ create_ivi_surface(window, display);
+ } else {
+ assert(0);
+ }
+
+ ret = eglMakeCurrent(window->display->egl.dpy, window->egl_surface,
+ window->egl_surface, window->display->egl.ctx);
+ assert(ret == EGL_TRUE);
+
+ if (!window->frame_sync)
+ eglSwapInterval(display->egl.dpy, 0);
+
+}
+
+static void
+destroy_surface(struct window *window)
+{
+ /* Required, otherwise segfault in egl_dri2.c: dri2_make_current()
+ * on eglReleaseThread(). */
+ eglMakeCurrent(window->display->egl.dpy, EGL_NO_SURFACE, EGL_NO_SURFACE,
+ EGL_NO_CONTEXT);
+
+ eglDestroySurface(window->display->egl.dpy, window->egl_surface);
+ wl_egl_window_destroy(window->native);
+
+ if (window->display->ivi_application)
+ ivi_surface_destroy(window->ivi_surface);
+ wl_surface_destroy(window->surface);
+
+ if (window->callback)
+ wl_callback_destroy(window->callback);
+}
+
+static void
+redraw(void *data, struct wl_callback *callback, uint32_t time)
+{
+ struct window *window = data;
+ struct display *display = window->display;
+ static const GLfloat verts[3][2] = {
+ { -0.5, -0.5 },
+ { 0.5, -0.5 },
+ { 0, 0.5 }
+ };
+
+ static const GLfloat colors[3][3] = {
+ { 1, 0, 0 },
+ { 0, 1, 0 },
+ { 0, 0, 1 }
+ };
+
+ GLfloat angle;
+ GLfloat rotation[4][4] = {
+ { 1, 0, 0, 0 },
+ { 0, 1, 0, 0 },
+ { 0, 0, 1, 0 },
+ { 0, 0, 0, 1 }
+ };
+ static const uint32_t speed_div = 5, benchmark_interval = 5;
+ struct wl_region *region;
+ EGLint rect[4];
+ EGLint buffer_age = 0;
+ struct timeval tv;
+
+ assert(window->callback == callback);
+ window->callback = NULL;
+
+ if (callback)
+ wl_callback_destroy(callback);
+
+ gettimeofday(&tv, NULL);
+ time = tv.tv_sec * 1000 + tv.tv_usec / 1000;
+ if (window->frames == 0)
+ window->benchmark_time = time;
+
+ if (time - window->benchmark_time > (benchmark_interval * 1000)) {
+ HMI_DEBUG(log_prefix,"%d frames in %d seconds: %f fps",
+ window->frames,
+ benchmark_interval,
+ (float) window->frames / benchmark_interval);
+ window->benchmark_time = time;
+ window->frames = 0;
+ }
+
+ angle = (time / speed_div) % 360 * M_PI / 180.0;
+ rotation[0][0] = cos(angle);
+ rotation[0][2] = sin(angle);
+ rotation[2][0] = -sin(angle);
+ rotation[2][2] = cos(angle);
+
+ if (display->swap_buffers_with_damage)
+ eglQuerySurface(display->egl.dpy, window->egl_surface,
+ EGL_BUFFER_AGE_EXT, &buffer_age);
+
+ glViewport(0, 0, window->geometry.width, window->geometry.height);
+
+ glUniformMatrix4fv(window->gl.rotation_uniform, 1, GL_FALSE,
+ (GLfloat *) rotation);
+
+ glClearColor(0.0, 0.0, 0.0, 0.5);
+ glClear(GL_COLOR_BUFFER_BIT);
+
+ glVertexAttribPointer(window->gl.pos, 2, GL_FLOAT, GL_FALSE, 0, verts);
+ glVertexAttribPointer(window->gl.col, 3, GL_FLOAT, GL_FALSE, 0, colors);
+ glEnableVertexAttribArray(window->gl.pos);
+ glEnableVertexAttribArray(window->gl.col);
+
+ glDrawArrays(GL_TRIANGLES, 0, 3);
+
+ glDisableVertexAttribArray(window->gl.pos);
+ glDisableVertexAttribArray(window->gl.col);
+
+ if (window->opaque || window->fullscreen) {
+ region = wl_compositor_create_region(window->display->compositor);
+ wl_region_add(region, 0, 0,
+ window->geometry.width,
+ window->geometry.height);
+ wl_surface_set_opaque_region(window->surface, region);
+ wl_region_destroy(region);
+ } else {
+ wl_surface_set_opaque_region(window->surface, NULL);
+ }
+
+ if (display->swap_buffers_with_damage && buffer_age > 0) {
+ rect[0] = window->geometry.width / 4 - 1;
+ rect[1] = window->geometry.height / 4 - 1;
+ rect[2] = window->geometry.width / 2 + 2;
+ rect[3] = window->geometry.height / 2 + 2;
+ display->swap_buffers_with_damage(display->egl.dpy,
+ window->egl_surface,
+ rect, 1);
+ } else {
+ eglSwapBuffers(display->egl.dpy, window->egl_surface);
+ }
+
+ window->frames++;
+}
+
+static void
+registry_handle_global(void *data, struct wl_registry *registry,
+ uint32_t name, const char *interface, uint32_t version)
+{
+ struct display *d = data;
+
+ if (strcmp(interface, "wl_compositor") == 0) {
+ d->compositor =
+ wl_registry_bind(registry, name,
+ &wl_compositor_interface, 1);
+ } else if (strcmp(interface, "ivi_application") == 0) {
+ d->ivi_application =
+ wl_registry_bind(registry, name,
+ &ivi_application_interface, 1);
+ }
+}
+
+static void
+registry_handle_global_remove(void *data, struct wl_registry *registry,
+ uint32_t name)
+{
+}
+
+static const struct wl_registry_listener registry_listener = {
+ registry_handle_global,
+ registry_handle_global_remove
+};
+
+static void
+signal_int(int signum)
+{
+ running = 0;
+}
+
+int
+init_wm(LibWindowmanager *wm, struct window *window)
+{
+ HMI_DEBUG(log_prefix,"called");
+
+ if (wm->init(port, token) != 0) {
+ HMI_ERROR(log_prefix,"wm init failed. ");
+ return -1;
+ }
+
+ g_id_ivisurf = wm->requestSurface(main_role);
+ if (g_id_ivisurf < 0) {
+ HMI_ERROR(log_prefix,"wm request surface failed ");
+ return -1;
+ }
+ HMI_DEBUG(log_prefix,"IVI_SURFACE_ID: %d ", g_id_ivisurf);
+
+ WMHandler wmh;
+ wmh.on_visible = [](const char* role, bool visible){
+ // Sample code if user uses visible event
+ HMI_DEBUG(log_prefix, "role: %s, visible: %s", role, visible ? "true" : "false");
+ };
+ wmh.on_sync_draw = [wm, window](const char* role, const char* area, Rect rect) {
+
+ HMI_DEBUG(log_prefix,"Surface %s got syncDraw! Area: %s. w:%d, h:%d", role, area, rect.width(), rect.height());
+
+ wl_egl_window_resize(window->native, rect.width(), rect.height(), 0, 0);
+ window->geometry.width = rect.width();
+ window->geometry.height = rect.height();
+
+ wm->endDraw(role);
+ };
+
+ wm->setEventHandler(wmh);
+
+ return 0;
+}
+
+int
+init_hs(LibHomeScreen* hs){
+ if(hs->init(port, token)!=0)
+ {
+ HMI_ERROR(log_prefix,"homescreen init failed. ");
+ return -1;
+ }
+
+ hs->set_event_handler(LibHomeScreen::Event_TapShortcut, [](json_object *object){
+ const char *application_name = json_object_get_string(
+ json_object_object_get(object, "application_name"));
+ HMI_DEBUG("simple-egl","Event_TapShortcut application_name = %s ", application_name);
+ if(strcmp(application_name, app_name.c_str()) == 0)
+ {
+ HMI_DEBUG("simple-egl","try to activesurface %s ", app_name.c_str());
+ wm->activateWindow(main_role);
+ }
+ });
+
+ return 0;
+}
+
+int
+main(int argc, char **argv)
+{
+ struct sigaction sigint;
+ struct window window = { 0 };
+ struct display display = { 0 };
+
+ window.display = &display;
+ display.window = &window;
+ window.geometry.width = 1080;
+ window.geometry.height = 1488;
+ window.window_size = window.geometry;
+ window.buffer_size = 32;
+ window.frame_sync = 1;
+
+ if(argc > 2){
+ port = strtol(argv[1], NULL, 10);
+ token = argv[2];
+ }
+
+ HMI_DEBUG(log_prefix,"main_role: %s, port: %d, token: %s. ", main_role, port, token.c_str());
+
+ display.display = wl_display_connect(NULL);
+ assert(display.display);
+
+ display.registry = wl_display_get_registry(display.display);
+ wl_registry_add_listener(display.registry,
+ &registry_listener, &display);
+
+ wl_display_roundtrip(display.display);
+
+ init_egl(&display, &window);
+
+ wm = new LibWindowmanager();
+ if(init_wm(wm, &window)!=0){
+ fini_egl(&display);
+ if (display.ivi_application)
+ ivi_application_destroy(display.ivi_application);
+ if (display.compositor)
+ wl_compositor_destroy(display.compositor);
+ wl_registry_destroy(display.registry);
+ wl_display_flush(display.display);
+ return -1;
+ }
+
+ hs = new LibHomeScreen();
+ if(init_hs(hs)!=0){
+ fini_egl(&display);
+ if (display.ivi_application)
+ ivi_application_destroy(display.ivi_application);
+ if (display.compositor)
+ wl_compositor_destroy(display.compositor);
+ wl_registry_destroy(display.registry);
+ wl_display_flush(display.display);
+ return -1;
+ }
+
+ create_surface(&window);
+ init_gl(&window);
+
+ //Ctrl+C
+ sigint.sa_handler = signal_int;
+ sigemptyset(&sigint.sa_mask);
+ sigint.sa_flags = SA_RESETHAND;
+ sigaction(SIGINT, &sigint, NULL);
+
+ eglSwapBuffers(window.display->egl.dpy, window.egl_surface);
+
+ wm->activateWindow(main_role);
+
+ /* The mainloop here is a little subtle. Redrawing will cause
+ * EGL to read events so we can just call
+ * wl_display_dispatch_pending() to handle any events that got
+ * queued up as a side effect. */
+ while (running) {
+ wl_display_dispatch_pending(display.display);
+ redraw(&window, NULL, 0);
+ }
+
+ HMI_DEBUG(log_prefix,"simple-egl exiting! ");
+
+ destroy_surface(&window);
+ fini_egl(&display);
+
+ if (display.ivi_application)
+ ivi_application_destroy(display.ivi_application);
+
+ if (display.compositor)
+ wl_compositor_destroy(display.compositor);
+
+ wl_registry_destroy(display.registry);
+ wl_display_flush(display.display);
+ wl_display_disconnect(display.display);
+
+ return 0;
+}
diff --git a/demo#3/common/libhomescreen/sample/template/LICENSE.APL-2.0 b/demo#3/common/libhomescreen/sample/template/LICENSE.APL-2.0
new file mode 100644
index 0000000..b3201ab
--- /dev/null
+++ b/demo#3/common/libhomescreen/sample/template/LICENSE.APL-2.0
@@ -0,0 +1,204 @@
+
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don`t include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
diff --git a/demo#3/common/libhomescreen/sample/template/README.md b/demo#3/common/libhomescreen/sample/template/README.md
new file mode 100644
index 0000000..4eeae4e
--- /dev/null
+++ b/demo#3/common/libhomescreen/sample/template/README.md
@@ -0,0 +1,25 @@
+==========
+ Overview
+==========
+<br>This is the templete that is useful for implementation of Qt application
+<br>by using HomeScreen, WindowManager and SoundManager.
+
+
+===========
+ Structure
+===========
+<br> - main.cpp
+<br> The templete for implementation main function for Qt application.
+
+<br> - wmhandler.cpp
+<br> - wmhandler.h
+<br> These file is implemented "slot"
+<br> that is needed by Qt application that uses WindowManager.
+<br> These file should be modified according to Qt application.
+
+<br> - smhandler.cpp
+<br> - smhandler.h
+<br> These file is implemented "signal" and "slot"
+<br> that is needed by Qt application that uses SoundManager.
+<br> These file should be modified according to Qt application.
+
diff --git a/demo#3/common/libhomescreen/sample/template/main.cpp b/demo#3/common/libhomescreen/sample/template/main.cpp
new file mode 100644
index 0000000..831df41
--- /dev/null
+++ b/demo#3/common/libhomescreen/sample/template/main.cpp
@@ -0,0 +1,225 @@
+/*
+ * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#include <QtCore/QDebug>
+#include <QtCore/QCommandLineParser>
+#include <QtCore/QUrlQuery>
+#include <QtCore/QSettings>
+#include <QtGui/QGuiApplication>
+#include <QtQml/QQmlApplicationEngine>
+#include <QtQml/QQmlContext>
+#include <QtQuickControls2/QQuickStyle>
+#include <QQuickWindow>
+
+#include <libhomescreen/libhomescreen.hpp>
+#include "wmhandler.h"
+#include "smhandler.h"
+
+
+static LibHomeScreen* hs;
+static LibWindowmanager* wm;
+static LibSMWrapper* smw;
+static WmHandler* wmh;
+
+static std::string myname = std::string("Templete");
+
+
+static void onRep(struct json_object* reply_contents);
+static void onEv(const std::string& event, struct json_object* event_contents);
+
+
+int main(int argc, char *argv[])
+{
+ QGuiApplication app(argc, argv);
+ QQmlApplicationEngine engine;
+ QQmlContext* context = engine.rootContext();
+ QObject* root;
+ QQuickWindow* window;
+
+ QQuickStyle::setStyle("AGL");
+
+ /*
+ * Set argument and option
+ */
+ QCommandLineParser parser;
+ parser.addPositionalArgument("port", app.translate("main", "port for binding"));
+ parser.addPositionalArgument("secret", app.translate("main", "secret for binding"));
+ parser.addHelpOption();
+ parser.addVersionOption();
+ parser.process(app);
+ QStringList positionalArguments = parser.positionalArguments();
+
+ if (positionalArguments.length() == 2) {
+ /*
+ * Get argument
+ */
+ int port = positionalArguments.takeFirst().toInt();
+ QString secret = positionalArguments.takeFirst();
+ std::string token = secret.toStdString();
+
+
+ /*
+ * Get instance
+ */
+ hs = new LibHomeScreen();
+ wm = new LibWindowmanager();
+ smw = new LibSMWrapper(port, secret);
+ wmh = new WmHandler();
+
+
+ /*
+ * Set WindowManager
+ */
+ // Initialize
+ if(wm->init(port, token.c_str()) != 0){
+ exit(EXIT_FAILURE);
+ }
+
+ // Application should call requestSurface at first
+ json_object *obj = json_object_new_object();
+ json_object_object_add(obj, wm->kKeyDrawingName, json_object_new_string(app_name.c_str()));
+ if (wm->requestSurface(obj) != 0) {
+ exit(EXIT_FAILURE);
+ }
+
+ // Set event handlers for each event
+ wm->set_event_handler(LibWindowmanager::Event_Active, [wm](json_object *object) {
+ const char *label = json_object_get_string(
+ json_object_object_get(object, wm->kKeyDrawingName));
+ fprintf(stderr, "Surface %s got activated!\n", label);
+ });
+ wm->set_event_handler(LibWindowmanager::Event_Inactive, [wm](json_object *object) {
+ const char *label = json_object_get_string(
+ json_object_object_get(object, wm->kKeyDrawingName));
+ fprintf(stderr, "Surface %s got deactivated!\n", label);
+ });
+ wm->set_event_handler(LibWindowmanager::Event_Visible, [wm](json_object *object) {
+ const char *label = json_object_get_string(
+ json_object_object_get(object, wm->kKeyDrawingName));
+ fprintf(stderr, "Surface %s got visible!\n", label);
+ });
+ wm->set_event_handler(LibWindowmanager::Event_Invisible, [wm](json_object *object) {
+ const char *label = json_object_get_string(
+ json_object_object_get(object, wm->kKeyDrawingName));
+ fprintf(stderr, "Surface %s got invisible!\n", label);
+ });
+ wm->set_event_handler(LibWindowmanager::Event_SyncDraw, [wm](json_object *object) {
+ const char *label = json_object_get_string(
+ json_object_object_get(object, wm->kKeyDrawingName));
+ const char *area = json_object_get_string(
+ json_object_object_get(object, wm->kKeyDrawingArea));
+ fprintf(stderr, "Surface %s got syncDraw!\n", label);
+ // Application should call LibWindowmanager::endDraw() in SyncDraw handler
+ json_object *obj = json_object_new_object();
+ json_object_object_add(obj, wm->kKeyDrawingName, json_object_new_string(app_name.c_str()));
+ wm->endDraw(obj);
+ });
+ wm->set_event_handler(LibWindowmanager::Event_FlushDraw, [wm](json_object *object) {
+ const char *label = json_object_get_string(
+ json_object_object_get(object, wm->kKeyDrawingName));
+ fprintf(stderr, "Surface %s got flushDraw!\n", label);
+ });
+
+ // Initialize WmHandler
+ wmh->init(wm, myname.c_str());
+
+
+ /*
+ * Set HomeScreen
+ */
+ // Initialize
+ hs->init(port, token.c_str());
+
+ // Set event handler
+ hs->set_event_handler(LibHomeScreen::Event_TapShortcut, [wm](json_object *object) {
+ const char *appname = json_object_get_string(
+ json_object_object_get(object, "application_name"));
+ if(myname == appname) {
+ qDebug("Surface %s got tapShortcut\n", appname);
+ // Application should call LibWindowmanager::endDraw() in TapShortcut handler
+ json_object *obj = json_object_new_object();
+ json_object_object_add(obj, wm->kKeyDrawingName, json_object_new_string(app_name.c_str()));
+ json_object_object_add(obj, wm->kKeyDrawingArea, json_object_new_string("normal.full"));
+ wm->activateSurface(obj);
+ }
+ });
+
+ /*
+ * Set SoundManager
+ */
+ smw->wrapper_registerCallback(onEv, onRep);
+ smw->subscribe(QString("newMainConnection"));
+ smw->subscribe(QString("mainConnectionStateChanged"));
+ smw->subscribe(QString("removedMainConnection"));
+ smw->subscribe(QString("asyncSetSourceState"));
+ smw->subscribe(QString("asyncConnect"));
+
+ // Set context property for SoundManager
+ context->setContextProperty("smw", smw);
+
+
+ /*
+ * Load qml
+ */
+ engine.load(QUrl(QStringLiteral("qrc:/QmlForThisApp.qml")));
+
+
+ /*
+ * Set slot for WindowManager and SoundManager
+ */
+ root = engine.rootObjects().first();
+ window = qobject_cast<QQuickWindow *>(root);
+
+ // Set slot for calling LibWindowmanager::activateSurface() when loading qml have completed
+ QObject::connect(window, SIGNAL(frameSwapped()),
+ wmh, SLOT(slotActivateSurface()));
+
+ // Set slot for SoundManager
+ QObject::connect(smw, SIGNAL(smEvent(QVariant, QVariant)),
+ root, SLOT(slotEvent(QVariant, QVariant)));
+ QObject::connect(smw, SIGNAL(smReply(QVariant)),
+ root, SLOT(slotReply(QVariant)));
+ }
+
+ return app.exec();
+}
+
+static void onRep(struct json_object* reply_contents)
+{
+ qDebug("%s is called", __FUNCTION__);
+ QString str = QString(json_object_get_string(reply_contents));
+ QJsonParseError error;
+ QJsonDocument jdoc = QJsonDocument::fromJson(str.toUtf8(), &error);
+ QJsonObject jobj = jdoc.object();
+
+ smw->emit_reply(jobj);
+ json_object_put(reply_contents);
+}
+
+static void onEv(const std::string& event, struct json_object* event_contents)
+{
+ qDebug("%s is called", __FUNCTION__);
+ const QString event_name = QString(event.c_str());
+ QString str = QString(json_object_get_string(event_contents));
+ QJsonParseError error;
+ QJsonDocument jdoc = QJsonDocument::fromJson(str.toUtf8(), &error);
+ const QJsonObject jobj = jdoc.object();
+ smw->emit_event(event_name, jobj);
+
+ json_object_put(event_contents);
+}
+
diff --git a/demo#3/common/libhomescreen/sample/template/smhandler.cpp b/demo#3/common/libhomescreen/sample/template/smhandler.cpp
new file mode 100644
index 0000000..54b94d8
--- /dev/null
+++ b/demo#3/common/libhomescreen/sample/template/smhandler.cpp
@@ -0,0 +1,157 @@
+/*
+ * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "libsmwrapper.h"
+using namespace std;
+
+static int create_json_object(const QJsonObject& obj, struct json_object* jobj);
+static bool put_val_to_jobj(const char* key, const QJsonValue& val, struct json_object* jobj);
+static bool put_array_to_jobj(const char* key, const QJsonArray& qarray, struct json_object* jobj);
+
+LibSMWrapper::LibSMWrapper(QObject *parent) :
+ QObject(parent)
+{
+ /* This is not enabled */
+ //libsm = new LibSoundmanager();
+}
+
+LibSMWrapper::LibSMWrapper(const int port, const QString& token, QObject *parent) :
+ QObject(parent)
+{
+ libsm = new LibSoundmanager(port, token.toStdString());
+}
+
+LibSMWrapper::~LibSMWrapper()
+{
+ delete libsm;
+}
+
+int LibSMWrapper::call(const QString &verb, const QString &arg)
+{
+ // translate QJsonObject to struct json_object
+ struct json_object* jobj = json_object_new_object();
+ QJsonDocument jsonDoc = QJsonDocument::fromJson(arg.toUtf8());
+ const QJsonObject jsonObj = jsonDoc.object();
+ int ret = create_json_object(jsonObj, jobj);
+ if(ret < 0)
+ {
+ return -1;
+ }
+ return libsm->call(verb.toStdString().c_str(), jobj);
+}
+
+static int create_json_object(const QJsonObject& obj, struct json_object* jobj)
+{
+ try{
+ for(auto itr = obj.begin(); itr != obj.end();++itr)
+ {
+ string key = itr.key().toStdString();
+ //const char* key = itr.key().toStdString().c_str(); // Do not code like this. string is removed if size is over 16!!
+
+ bool ret = put_val_to_jobj(key.c_str(), itr.value(),jobj);
+ if(!ret){
+ /*This is not implemented*/
+ qDebug("JsonArray can't parse for now");
+ return -1;
+ // ToDo
+ // For now, array may not be inputted for soundmanager
+ // But use case absolutely exists
+ /*QJsonArray qarray = itr.value().toArray();
+ ret = put_array_to_jobj(key, qarray, jobj);*/
+ }
+ }
+ }
+ catch(...){
+ qDebug("Json parse error occured");
+ return -1;
+ }
+ return 0;
+}
+
+static bool put_val_to_jobj(const char* key, const QJsonValue& val, struct json_object* jobj)
+{
+ if(val.isArray()){
+ return false; // Array can't input
+ }
+ if(val.isString()){
+ string value = val.toString().toStdString();
+ json_object_object_add(jobj, key, json_object_new_string(value.c_str()));
+ }
+ else{
+ const int value = val.toInt();
+ json_object_object_add(jobj, key, json_object_new_int(value));
+ }
+ return true;
+}
+
+static bool put_array_to_jobj(const char* key, const QJsonArray& qarray, struct json_object* jobj)
+{
+ // ToDo Fix this !!
+/* struct json_object* jarray = json_object_new_array();
+
+ bool ret;
+ for(auto jitr = qarray.begin(); jitr != qarray.end(); ++jitr){
+ struct json_object* tmp = json_object_new_object();
+ ret = put_val_to_jobj(key,jitr,tmp);
+ if(!ret)
+ {
+ put_array_to_jobj(key,jitr,tmp);
+ }
+ json_object_array_add(jarray, tmp);
+ }
+ json_object_object_add(jobj, key, jarray);
+ return true;*/
+}
+
+void LibSMWrapper::wrapper_registerCallback(
+ void (*event_func)(const string& event, struct json_object* event_contents),
+ void (*reply_func)(struct json_object* reply_contents))
+{
+ libsm->register_callback(event_func, reply_func);
+}
+
+void LibSMWrapper::subscribe(const QString event_name)
+{
+ std::string str = event_name.toStdString();
+ libsm->subscribe(str);
+}
+
+void LibSMWrapper::unsubscribe(const QString event_name)
+{
+ std::string str = event_name.toStdString();
+ libsm->unsubscribe(str);
+}
+
+void LibSMWrapper::run_eventloop()
+{
+ libsm->run_eventloop();
+}
+
+void LibSMWrapper::print(const QString &str)
+{
+ qDebug("%s is called", str.toStdString().c_str());
+}
+
+void LibSMWrapper::emit_event(const QString &event, const QJsonObject &msg)
+{
+ qDebug("emit smEvent signal @%s", __FUNCTION__);
+ emit smEvent(event, msg);
+}
+void LibSMWrapper::emit_reply(const QJsonObject &msg)
+{
+ qDebug("emit smReply signal @%s", __FUNCTION__);
+ emit smReply(msg);
+} \ No newline at end of file
diff --git a/demo#3/common/libhomescreen/sample/template/smhandler.h b/demo#3/common/libhomescreen/sample/template/smhandler.h
new file mode 100644
index 0000000..3954a29
--- /dev/null
+++ b/demo#3/common/libhomescreen/sample/template/smhandler.h
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef SIGNALER_H
+#define SIGNALER_H
+
+ #include <QObject>
+ #include <QVariant>
+ #include <QJsonDocument>
+ #include <QtCore/QJsonObject>
+ #include <libsoundmanager/libsoundmanager.hpp>
+ #include <QString>
+ #include <string>
+
+
+class LibSMWrapper : public QObject
+{
+ Q_OBJECT
+public: // method
+ explicit LibSMWrapper(QObject *parent = nullptr);
+ LibSMWrapper(const int port, const QString& token, QObject *parent = nullptr);
+ ~LibSMWrapper();
+
+ void wrapper_registerCallback(
+ void (*event_func)(const std::string& event, struct json_object* event_contents),
+ void (*reply_func)(struct json_object* reply_contents)
+ );
+ void subscribe(const QString event_name);
+ void unsubscribe(const QString event_name);
+ void run_eventloop();
+
+ void emit_event(const QString &event, const QJsonObject &msg);
+ void emit_reply(const QJsonObject &msg);
+public slots:
+ int call(const QString &verb, const QString &arg);
+ void print(const QString &str);
+signals:
+ void smEvent(const QVariant &event, const QVariant &msg);
+ void smReply(const QVariant &msg);
+
+private:
+ LibSoundmanager* libsm;
+};
+
+
+#endif /*SIGNALER_H*/ \ No newline at end of file
diff --git a/demo#3/common/libhomescreen/sample/template/wmhandler.cpp b/demo#3/common/libhomescreen/sample/template/wmhandler.cpp
new file mode 100644
index 0000000..9972104
--- /dev/null
+++ b/demo#3/common/libhomescreen/sample/template/wmhandler.cpp
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "wmhandler.h"
+#include <unistd.h>
+
+
+void WmHandler::init(LibWindowmanager *p_wm, std::string applabel)
+{
+ mp_wm = p_wm;
+ m_applabel = applabel;
+}
+
+void WmHandler::slotActivateSurface() {
+ json_object *obj = json_object_new_object();
+ json_object_object_add(obj, wm->kKeyDrawingName, json_object_new_string(m_applabel.c_str()));
+ json_object_object_add(obj, wm->kKeyDrawingArea, json_object_new_string("normal.full"));
+ mp_wm->activateSurface(obj);
+}
+
+WmHandler::WmHandler(QObject *parent)
+ :QObject(parent)
+{
+}
+
+WmHandler::~WmHandler() { }
diff --git a/demo#3/common/libhomescreen/sample/template/wmhandler.h b/demo#3/common/libhomescreen/sample/template/wmhandler.h
new file mode 100644
index 0000000..5442d8e
--- /dev/null
+++ b/demo#3/common/libhomescreen/sample/template/wmhandler.h
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef WMHANDLER_H
+#define WMHANDLER_H
+#include <QObject>
+#include <QUrl>
+#include <QVariant>
+#include <string>
+#include <vector>
+#include <functional>
+#include <libwindowmanager.h>
+
+class WmHandler : public QObject {
+Q_OBJECT
+public:
+ explicit WmHandler(QObject *parent = nullptr);
+ ~WmHandler();
+
+ WmHandler(const WmHandler &) = delete;
+ WmHandler &operator=(const WmHandler &) = delete;
+
+public:
+ static WmHandler &instance();
+ void init(LibWindowmanager *p_wm, std::string applabel);
+
+public slots:
+ void slotActivateSurface();
+
+private:
+ LibWindowmanager* mp_wm;
+ std::string m_applabel;
+};
+#endif // WMHANDLER_H
diff --git a/demo#3/common/libhomescreen/src/CMakeLists.txt b/demo#3/common/libhomescreen/src/CMakeLists.txt
new file mode 100644
index 0000000..babf49d
--- /dev/null
+++ b/demo#3/common/libhomescreen/src/CMakeLists.txt
@@ -0,0 +1,48 @@
+#
+# Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+
+cmake_minimum_required(VERSION 3.0)
+
+set(TARGET_LIBHOMESCREEN homescreen)
+add_definitions("-std=c++11")
+
+pkg_check_modules(libhomescreen_depends json-c libafbwsc libsystemd)
+set(libhomescreen_sources libhomescreen.cpp)
+
+include_directories(${LIBHOMESCREEN_INCLUDE_DIR})
+link_libraries(-Wl,--as-needed -Wl,--gc-sections -Wl,--no-undefined)
+
+add_library(${TARGET_LIBHOMESCREEN} SHARED ${libhomescreen_sources})
+target_compile_options(${TARGET_LIBHOMESCREEN} PUBLIC ${libhomescreen_depends_CFLAGS})
+
+if(DEFINED DEBUGMODE)
+ target_compile_options(${TARGET_LIBHOMESCREEN} PRIVATE -g -O0)
+else(DEFINED DEBUGMODE)
+ target_compile_options(${TARGET_LIBHOMESCREEN} PRIVATE -g -O2)
+endif(DEFINED DEBUGMODE)
+
+include_directories(${TARGET_LIBHOMESCREEN} ${libhomescreen_depends_INCLUDE_DIRS})
+target_link_libraries(${TARGET_LIBHOMESCREEN} afbwsc -lpthread ${link_libraries} ${libhomescreen_depends_LIBRARIES})
+set_target_properties(${TARGET_LIBHOMESCREEN}
+ PROPERTIES
+ VERSION 0.1
+)
+
+if(DEFINED CMAKE_INSTALL_LIBDIR)
+ INSTALL(TARGETS ${TARGET_LIBHOMESCREEN}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
+endif(DEFINED CMAKE_INSTALL_LIBDIR)
diff --git a/demo#3/common/libhomescreen/src/libhomescreen.cpp b/demo#3/common/libhomescreen/src/libhomescreen.cpp
new file mode 100644
index 0000000..9689863
--- /dev/null
+++ b/demo#3/common/libhomescreen/src/libhomescreen.cpp
@@ -0,0 +1,643 @@
+/*
+ * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdarg.h>
+#include <sys/socket.h>
+#include <iostream>
+#include <algorithm>
+#include <errno.h>
+#include <cassert>
+#include <cctype>
+#include <cerrno>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+
+#include <libhomescreen.hpp>
+#include "hmi-debug.h"
+
+using namespace std;
+
+static bool has_verb(const string& verb);
+static const char API[] = "homescreen";
+
+const std::vector<std::string> LibHomeScreen::api_list {
+ std::string("ping"), // debug do not use
+// std::string("tap_shortcut"), // HomeScreen Application only
+ std::string("on_screen_message"),
+ std::string("on_screen_reply"),
+ std::string("subscribe"),
+ std::string("unsubscribe"),
+ std::string("showWindow"),
+ std::string("allocateRestriction"),
+ std::string("releaseRestriction")
+};
+
+const std::vector<std::string> LibHomeScreen::event_list {
+// std::string("tap_shortcut"),
+ std::string("showWindow"),
+ std::string("on_screen_message"),
+ std::string("on_screen_reply"),
+ std::string("allocateRestriction"),
+ std::string("releaseRestriction"),
+ std::string("none")
+};
+
+
+/**
+ * websocket
+ */
+
+static void _on_hangup_static(void *closure, struct afb_wsj1 *wsj)
+{
+ static_cast<LibHomeScreen*>(closure)->on_hangup(NULL,wsj);
+}
+
+static void _on_call_static(void *closure, const char *api, const char *verb, struct afb_wsj1_msg *msg)
+{
+ /* LibHomeScreen is not called from other process */
+}
+
+static void _on_event_static(void* closure, const char* event, struct afb_wsj1_msg *msg)
+{
+ static_cast<LibHomeScreen*>(closure)->on_event(NULL,event,msg);
+}
+
+static void _on_reply_static(void *closure, struct afb_wsj1_msg *msg)
+{
+ static_cast<LibHomeScreen*>(closure)->on_reply(NULL,msg);
+}
+
+
+/**
+ * constructor
+ */
+LibHomeScreen::LibHomeScreen()
+{
+}
+
+/**
+ * destructor
+ */
+LibHomeScreen::~LibHomeScreen()
+{
+ if(mploop)
+ {
+ sd_event_unref(mploop);
+ }
+ if(sp_websock != NULL)
+ {
+ afb_wsj1_unref(sp_websock);
+ }
+}
+
+/**
+ * This function is initializer
+ *
+ * #### Parameters
+ * - port [in] : This argument should be specified to the port number to be used for websocket
+ * - token [in] : This argument should be specified to the token to be used for websocket
+ *
+ * #### Return
+ * Nothing
+ *
+ * #### Note
+ * Use this constructor
+ *
+ */
+int LibHomeScreen::init(const int port, const string& token)
+{
+ int ret = 0;
+ if(port > 0 && token.size() > 0)
+ {
+ mport = port;
+ mtoken = token;
+ }
+ else
+ {
+ HMI_ERROR("libhomescreen","port and token should be > 0, Initial port and token uses.");
+ }
+
+ ret = initialize_websocket();
+ if(ret != 0 )
+ {
+ HMI_ERROR("libhomescreen","Failed to initialize websocket");
+ }
+ else{
+ HMI_DEBUG("libhomescreen","Initialized");
+ }
+
+ return ret;
+}
+
+/**
+ * This function register callback function for reply/event message from home screen
+ *
+ * #### Parameters
+ * - event_cb [in] : This argument should be specified to the callback for subscribed event
+ * - reply_cb [in] : This argument should be specified to the reply callback for call function
+ *
+ * #### Return
+ * Nothing
+ *
+ * #### Note
+ * Event callback is invoked by home screen for event you subscribed.
+ * If you would like to get event, please call subscribe function before/after this function
+ */
+void LibHomeScreen::registerCallback(
+ void (*event_cb)(const std::string& event, struct json_object* event_contents),
+ void (*reply_cb)(struct json_object* reply_contents),
+ void (*hangup_cb)(void))
+{
+ onEvent = event_cb;
+ onReply = reply_cb;
+ onHangup = hangup_cb;
+}
+
+int LibHomeScreen::initialize_websocket()
+{
+ mploop = NULL;
+ onEvent = nullptr;
+ onReply = nullptr;
+ int ret = sd_event_default(&mploop);
+ if(ret < 0)
+ {
+ HMI_ERROR("libhomescreen","Failed to create event loop");
+ goto END;
+ }
+
+ /* Initialize interface from websocket */
+ minterface.on_hangup = _on_hangup_static;
+ minterface.on_call = _on_call_static;
+ minterface.on_event = _on_event_static;
+ muri += "ws://localhost:" + to_string(mport) + "/api?token=" + mtoken; /*To be modified*/
+ sp_websock = afb_ws_client_connect_wsj1(mploop, muri.c_str(), &minterface, this);
+ if(sp_websock == NULL)
+ {
+ HMI_ERROR("libhomescreen","Failed to create websocket connection");
+ goto END;
+ }
+
+ /* creates the evsrc */
+ //ret = sd_event_add_io(mploop,&mevent_src, sp_websock->fd, EPOLLIN, event_callback, NULL);
+
+ return 0;
+END:
+ if(mploop)
+ {
+ sd_event_unref(mploop);
+ }
+ return -1;
+}
+
+/**
+ * Sending ShortCut Icon tapped event
+ *
+ * When HomeScreen shortcut area is tapped, sending a event
+ *
+ * #### Parameters
+ * - application_name [in] : Tapped application name (label)
+ *
+ * #### Return
+ * - Returns 0 on success or -1 in case of error.
+ */
+int LibHomeScreen::tapShortcut(const char* application_name)
+{
+ if(!sp_websock)
+ {
+ return -1;
+ }
+
+ struct json_object* obj = json_object_new_object();
+ struct json_object* val = json_object_new_string("normal");
+ json_object_object_add(obj, "area", val);
+
+ return showWindow(application_name, obj);
+}
+
+/**
+ * Sending onScreen message event
+ *
+ * Sending OnScreen message event to HomeScreen from applications
+ *
+ * #### Parameters
+ * - display_message [in] : message for display
+ *
+ * #### Return
+ * - Returns 0 on success or -1 in case of error.
+ */
+int LibHomeScreen::onScreenMessage(const char* display_message)
+{
+ if(!sp_websock)
+ {
+ return -1;
+ }
+
+ struct json_object* j_obj = json_object_new_object();
+ struct json_object* val = json_object_new_string(display_message);
+ json_object_object_add(j_obj, "display_message", val);
+ return this->call("on_screen_message", j_obj);
+}
+
+/**
+ * Sending onScreen reply event
+ *
+ * Sending OnScreen reply event to applications from HomeScreen
+ *
+ * #### Parameters
+ * - reply_message [in] : message for reply
+ *
+ * #### Return
+ * - Returns 0 on success or -1 in case of error.
+ */
+int LibHomeScreen::onScreenReply(const char* reply_message)
+{
+ if(!sp_websock)
+ {
+ return -1;
+ }
+
+ struct json_object* j_obj = json_object_new_object();
+ struct json_object* val = json_object_new_string(reply_message);
+ json_object_object_add(j_obj, "reply_message", val);
+ return this->call("on_screen_reply", j_obj);
+}
+
+/**
+ * Setting Event Handler
+ *
+ * Setting event handler for Homescreen
+ *
+ * #### Parameters
+ * - et [in] : event name
+ * - f [in] : event handler
+ *
+ * #### Return
+ * Nothing
+ *
+ * #### Note
+ * Don't release json_object by json_object_put in handler_func.
+ * The resource is released by libafbwsc library.
+ */
+void LibHomeScreen::set_event_handler(enum EventType et, handler_func f)
+{
+ if (et >= 1 && et <= 5) {
+ switch (et) {
+/* case Event_TapShortcut:
+ this->subscribe(LibHomeScreen::event_list[0]);
+ break;
+*/
+ case Event_ShowWindow:
+ this->subscribe(LibHomeScreen::event_list[0]);
+ break;
+ case Event_OnScreenMessage:
+ this->subscribe(LibHomeScreen::event_list[1]);
+ break;
+ case Event_OnScreenReply:
+ this->subscribe(LibHomeScreen::event_list[2]);
+ break;
+ case Event_AllocateRestriction:
+ this->subscribe(LibHomeScreen::event_list[3]);
+ break;
+ case Event_ReleaseRestriction:
+ this->subscribe(LibHomeScreen::event_list[4]);
+ break;
+ }
+
+ this->handlers[et] = std::move(f);
+ }
+}
+
+/**
+ * This function calls the API of HomeScreen via WebSocket
+ *
+ * #### Parameters
+ * - verb [in] : This argument should be specified to the API name (e.g. "tap_shortcut")
+ * - arg [in] : This argument should be specified to the argument of API. And this argument expects JSON object
+ *
+ * #### Return
+ * - Returns 0 on success or -1 in case of error.
+ *
+ * #### Note
+ * To call HomeScreen's APIs, the application should set its function name, arguments to JSON format.
+ *
+ */
+int LibHomeScreen::call(const string& verb, struct json_object* arg)
+{
+ int ret;
+ if(!sp_websock)
+ {
+ return -1;
+ }
+ if (!has_verb(verb))
+ {
+ HMI_ERROR("libhomescreen","verb doesn't exit");
+ return -1;
+ }
+ ret = afb_wsj1_call_j(sp_websock, API, verb.c_str(), arg, _on_reply_static, this);
+ if (ret < 0) {
+ HMI_ERROR("libhomescreen","Failed to call verb:%s",verb.c_str());
+ }
+ return ret;
+}
+
+/**
+ * This function calls the API of HomeScreen via WebSocket
+ * This function is overload function of "call"
+ *
+ * #### Parameters
+ * - verb [in] : This argument should be specified to the API name (e.g. "tap_shortcut")
+ * - arg [in] : This argument should be specified to the argument of API. And this argument expects JSON object
+ *
+ * #### Return
+ * - Returns 0 on success or -1 in case of error.
+ *
+ * #### Note
+ * To call HomeScreen's APIs, the application should set its function name, arguments to JSON format.
+ *
+ */
+int LibHomeScreen::call(const char* verb, struct json_object* arg)
+{
+ int ret;
+ if(!sp_websock)
+ {
+ return -1;
+ }
+ if (!has_verb(string(verb)))
+ {
+ HMI_ERROR("libhomescreen","verb doesn't exit");
+ return -1;
+ }
+ ret = afb_wsj1_call_j(sp_websock, API, verb, arg, _on_reply_static, this);
+ if (ret < 0) {
+ HMI_ERROR("libhomescreen","Failed to call verb:%s",verb);
+ }
+ return ret;
+}
+
+/**
+ * Register callback function for each event
+ *
+ * #### Parameters
+ * - event_name [in] : This argument should be specified to the event name
+ *
+ * #### Return
+ * - Returns 0 on success or -1 in case of error.
+ *
+ * #### Note
+ * This function enables to get an event to your callback function.
+ *
+ */
+int LibHomeScreen::subscribe(const string& event_name)
+{
+ if(!sp_websock)
+ {
+ return -1;
+ }
+ struct json_object* j_obj = json_object_new_object();
+ json_object_object_add(j_obj, "event", json_object_new_string(event_name.c_str()));
+
+ int ret = afb_wsj1_call_j(sp_websock, API, "subscribe", j_obj, _on_reply_static, this);
+ if (ret < 0) {
+ HMI_ERROR("libhomescreen","Failed to call verb");
+ }
+ return ret;
+}
+
+/**
+ * Unregister callback function for each event
+ *
+ * #### Parameters
+ * - event_name [in] : This argument should be specified to the event name
+ *
+ * #### Return
+ * - Returns 0 on success or -1 in case of error.
+ *
+ * #### Note
+ * This function disables to get an event to your callback function.
+ *
+ */
+int LibHomeScreen::unsubscribe(const string& event_name)
+{
+ if(!sp_websock)
+ {
+ return -1;
+ }
+ struct json_object* j_obj = json_object_new_object();
+ json_object_object_add(j_obj, "event", json_object_new_string(event_name.c_str()));
+
+ int ret = afb_wsj1_call_j(sp_websock, API, "unsubscribe", j_obj, _on_reply_static, this);
+ if (ret < 0) {
+ HMI_ERROR("libhomescreen","Failed to call verb");
+ }
+ return ret;
+}
+
+/**
+ * Sending show window event
+ *
+ * Call HomeScreen Service's showWindow verb to request display id's screen.
+ *
+ * #### Parameters
+ * - id [in] : This argument should be specified to the application's id.
+ * - json [in] : This argument should be specified to the json parameters.
+ *
+ * #### Return
+ * - Returns 0 on success or -1 in case of error.
+ *
+ */
+int LibHomeScreen::showWindow(const char* application_name, json_object* json)
+{
+ if(!sp_websock)
+ {
+ return -1;
+ }
+
+ struct json_object* j_obj = json_object_new_object();
+ struct json_object* val = json_object_new_string(application_name);
+ json_object_object_add(j_obj, "application_name", val);
+ // j_json = json;
+ if (json == nullptr) {
+ struct json_object* j_json = json_object_new_object();
+ struct json_object* value = json_object_new_string("normal");
+ json_object_object_add(j_json, "area", value);
+ json_object_object_add(j_obj, "parameter", j_json);
+ }
+ else {
+ json_object_object_add(j_obj, "parameter", json);
+ }
+
+
+ return this->call("showWindow", j_obj);
+}
+
+/**
+ * Sending allocate restriction event
+ *
+ * Call HomeScreen Service's requestRestriction verb to request restriction screen.
+ *
+ * #### Parameters
+ * - area [in] : restriction display area id.
+ *
+ * #### Return
+ * - Returns 0 on success or -1 in case of error.
+ *
+ */
+int LibHomeScreen::allocateRestriction(const char* area)
+{
+ if(!sp_websock)
+ {
+ return -1;
+ }
+
+ struct json_object* j_obj = json_object_new_object();
+ struct json_object* a_obj = json_object_new_object();
+
+ struct json_object* val = json_object_new_string(area);
+
+ json_object_object_add(j_obj, "area", val);
+
+ json_object_object_add(a_obj, "args", j_obj);
+
+ return this->call("allocateRestriction", a_obj);
+}
+
+/**
+ * Sending release restriction event
+ *
+ * Call HomeScreen Service's releaseRestriction verb to release restriction screen.
+ *
+ * #### Parameters
+ * - area [in] : restriction display area id.
+ *
+ * #### Return
+ * - Returns 0 on success or -1 in case of error.
+ *
+ */
+int LibHomeScreen::releaseRestriction(const char* area)
+{
+ if(!sp_websock)
+ {
+ return -1;
+ }
+
+ struct json_object* j_obj = json_object_new_object();
+ struct json_object* a_obj = json_object_new_object();
+
+ struct json_object* val = json_object_new_string(area);
+
+ json_object_object_add(j_obj, "area", val);
+
+ json_object_object_add(a_obj, "args", j_obj);
+
+ return this->call("releaseRestriction", a_obj);
+}
+
+
+/************* Callback Function *************/
+
+void LibHomeScreen::on_hangup(void *closure, struct afb_wsj1 *wsj)
+{
+ HMI_DEBUG("libhomescreen","called");
+ if(onHangup != nullptr)
+ {
+ onHangup();
+ }
+}
+
+void LibHomeScreen::on_call(void *closure, const char *api, const char *verb, struct afb_wsj1_msg *msg)
+{
+}
+
+/*
+* event is like "homescreen/tap_shortcut"
+* msg is like {"event":"homescreen\/tap_shortcut","data":{"application_name":"hoge"},"jtype":"afb-event"}
+* so you can get
+ event name : struct json_object obj = json_object_object_get(msg,"event")
+*/
+void LibHomeScreen::on_event(void *closure, const char *event, struct afb_wsj1_msg *msg)
+{
+ HMI_DEBUG("libhomescreen","event: (%s) msg: (%s).", event, afb_wsj1_msg_object_s(msg));
+
+ if (strstr(event, API) == NULL) {
+ return;
+ }
+
+ struct json_object* ev_contents = afb_wsj1_msg_object_j(msg);
+ struct json_object *json_data;
+ if(!json_object_object_get_ex(ev_contents, "data", &json_data)) {
+ HMI_ERROR("libhomescreen", "got ev_contents error.");
+ return;
+ }
+
+ if(onEvent != nullptr)
+ {
+ const string ev(event);
+ onEvent(ev, ev_contents);
+ }
+
+ const char* event_type = nullptr;
+ struct json_object *json_event_type;
+ if(json_object_object_get_ex(json_data, "type", &json_event_type)) {
+ event_type = json_object_get_string(json_event_type);
+ }
+ else {
+ HMI_WARNING("libhomescreen","event_type is null.");
+ return;
+ }
+
+ if (strcasecmp(event_type, LibHomeScreen::event_list[0].c_str()) == 0) {
+ auto i = this->handlers.find(Event_TapShortcut);
+ if ( i != this->handlers.end() ) {
+ i->second(json_data);
+ }
+ }
+ else if (strcasecmp(event_type, LibHomeScreen::event_list[1].c_str()) == 0) {
+ auto i = this->handlers.find(Event_OnScreenMessage);
+ if ( i != this->handlers.end() ) {
+ i->second(json_data);
+ }
+ }
+ else if (strcasecmp(event_type, LibHomeScreen::event_list[2].c_str()) == 0) {
+ auto i = this->handlers.find(Event_OnScreenReply);
+ if ( i != this->handlers.end() ) {
+ i->second(json_data);
+ }
+ }
+}
+
+/**
+ * msg is like ({"response":{"verb":"subscribe","error":0},"jtype":"afb-reply","request":{"status":"success","info":"homescreen binder subscribe event name [on_screen_message]"}})
+ * msg is like ({"response":{"verb":"tap_shortcut","error":0},"jtype":"afb-reply","request":{"status":"success","info":"afb_event_push event [tap_shortcut]"}})
+ */
+void LibHomeScreen::on_reply(void *closure, struct afb_wsj1_msg *msg)
+{
+ HMI_DEBUG("libhomescreen","msg: (%s)", afb_wsj1_msg_object_s(msg));
+ if(onReply != nullptr)
+ {
+ struct json_object* reply = afb_wsj1_msg_object_j(msg);
+ onReply(reply);
+ }
+}
+
+static bool has_verb(const string& verb)
+{
+ HMI_DEBUG("libhomescreen","verb is %s", verb.c_str());
+ if(find(LibHomeScreen::api_list.begin(), LibHomeScreen::api_list.end(), verb) != LibHomeScreen::api_list.end())
+ return true;
+ else
+ return false;
+}
diff --git a/demo#3/common/libqthomescreen/LICENSE b/demo#3/common/libqthomescreen/LICENSE
new file mode 100644
index 0000000..f433b1a
--- /dev/null
+++ b/demo#3/common/libqthomescreen/LICENSE
@@ -0,0 +1,177 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
diff --git a/demo#3/common/libqthomescreen/qlibhomescreen.pro b/demo#3/common/libqthomescreen/qlibhomescreen.pro
new file mode 100644
index 0000000..e5e3fe9
--- /dev/null
+++ b/demo#3/common/libqthomescreen/qlibhomescreen.pro
@@ -0,0 +1,17 @@
+#
+# Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+TEMPLATE = subdirs
+SUBDIRS = src \ No newline at end of file
diff --git a/demo#3/common/libqthomescreen/src/hmi-debug.h b/demo#3/common/libqthomescreen/src/hmi-debug.h
new file mode 100644
index 0000000..28705f5
--- /dev/null
+++ b/demo#3/common/libqthomescreen/src/hmi-debug.h
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __HMI_DEBUG_H__
+#define __HMI_DEBUG_H__
+
+#include <time.h>
+#include <stdio.h>
+#include <stdarg.h>
+#include <string.h>
+#include <stdlib.h>
+
+enum LOG_LEVEL{
+ LOG_LEVEL_NONE = 0,
+ LOG_LEVEL_ERROR,
+ LOG_LEVEL_WARNING,
+ LOG_LEVEL_NOTICE,
+ LOG_LEVEL_INFO,
+ LOG_LEVEL_DEBUG,
+ LOG_LEVEL_MAX = LOG_LEVEL_DEBUG
+};
+
+#define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__)
+
+#define HMI_ERROR(prefix, args,...) _HMI_LOG(LOG_LEVEL_ERROR, __FILENAME__, __FUNCTION__, __LINE__, prefix, args, ##__VA_ARGS__)
+#define HMI_WARNING(prefix, args,...) _HMI_LOG(LOG_LEVEL_WARNING, __FILENAME__, __FUNCTION__,__LINE__, prefix, args,##__VA_ARGS__)
+#define HMI_NOTICE(prefix, args,...) _HMI_LOG(LOG_LEVEL_NOTICE, __FILENAME__, __FUNCTION__,__LINE__, prefix, args,##__VA_ARGS__)
+#define HMI_INFO(prefix, args,...) _HMI_LOG(LOG_LEVEL_INFO, __FILENAME__, __FUNCTION__,__LINE__, prefix, args,##__VA_ARGS__)
+#define HMI_DEBUG(prefix, args,...) _HMI_LOG(LOG_LEVEL_DEBUG, __FILENAME__, __FUNCTION__,__LINE__, prefix, args,##__VA_ARGS__)
+
+static char ERROR_FLAG[6][20] = {"NONE", "ERROR", "WARNING", "NOTICE", "INFO", "DEBUG"};
+
+static void _HMI_LOG(enum LOG_LEVEL level, const char* file, const char* func, const int line, const char* prefix, const char* log, ...)
+{
+ const int log_level = (getenv("USE_HMI_DEBUG") == NULL)?LOG_LEVEL_ERROR:atoi(getenv("USE_HMI_DEBUG"));
+ if(log_level < level)
+ {
+ return;
+ }
+
+ char *message;
+ struct timespec tp;
+ unsigned int time;
+
+ clock_gettime(CLOCK_REALTIME, &tp);
+ time = (tp.tv_sec * 1000000L) + (tp.tv_nsec / 1000);
+
+ va_list args;
+ va_start(args, log);
+ if (log == NULL || vasprintf(&message, log, args) < 0)
+ message = NULL;
+ fprintf(stderr, "[%10.3f] [%s %s] [%s, %s(), Line:%d] >>> %s \n", time / 1000.0, prefix, ERROR_FLAG[level], file, func, line, message);
+ va_end(args);
+ free(message);
+}
+
+#endif //__HMI_DEBUG_H__
diff --git a/demo#3/common/libqthomescreen/src/qlibhomescreen.cpp b/demo#3/common/libqthomescreen/src/qlibhomescreen.cpp
new file mode 100644
index 0000000..1082869
--- /dev/null
+++ b/demo#3/common/libqthomescreen/src/qlibhomescreen.cpp
@@ -0,0 +1,252 @@
+/*
+ * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "qlibhomescreen.h"
+#include <QJsonDocument>
+#include <QJsonObject>
+#include "hmi-debug.h"
+using namespace std;
+
+#define _POPUPREPLY "on_screen_reply"
+#define _REQ_POPUP_MESSAGE "on_screen_message"
+#define _TAPSHORTCUT "tap_shortcut"
+#define _KEY_DATA "data"
+#define _KEY_APPLICATION_DATA "application_name"
+#define _KEY_REPLY_MESSAGE "reply_message"
+#define _KEY_REQUEST_MESSAGE "display_message"
+
+static QLibHomeScreen* myThis;
+
+// Note: qlibhomescreen will be integrated to libqtappfw
+/**
+ * QLibHomeScreen construction function
+ *
+ * #### Parameters
+ * - parent [in] : object parent.
+ *
+ * #### Return
+ * - None
+ *
+ */
+QLibHomeScreen::QLibHomeScreen(QObject *parent) :
+ QObject(parent),
+ mp_hs(NULL)
+{
+ HMI_DEBUG("qlibhomescreen", "called.");
+}
+
+/**
+ * QLibHomeScreen destruction function
+ *
+ * #### Parameters
+ * - None
+ *
+ * #### Return
+ * - None
+ *
+ */
+QLibHomeScreen::~QLibHomeScreen()
+{
+ HMI_DEBUG("qlibhomescreen", "called.");
+ if (mp_hs != NULL) {
+ delete mp_hs;
+ }
+}
+
+/**
+ * init function
+ *
+ * call libhomescreen init function to connect to binder by websocket
+ *
+ * #### Parameters
+ * - prot : port from application
+ * - token : token from application
+ *
+ * #### Return
+ * - None
+ *
+ */
+void QLibHomeScreen::init(int port, const QString &token)
+{
+ HMI_DEBUG("qlibhomescreen", "called.");
+ string ctoken = token.toStdString();
+ mp_hs = new LibHomeScreen();
+ mp_hs->init(port, ctoken.c_str());
+
+ myThis = this;
+}
+
+
+/**
+ * call on screen message
+ *
+ * use libhomescreen api to call onscreen message
+ *
+ * #### Parameters
+ * - message : message contents
+ *
+ * #### Return
+ * - Returns 0 on success or -1 in case of error.
+ *
+ */
+int QLibHomeScreen::onScreenMessage(const QString &message)
+{
+ HMI_DEBUG("qlibhomescreen", "called.");
+ string str = message.toStdString();
+ return mp_hs->onScreenMessage(str.c_str());
+}
+
+/**
+ * subscribe event
+ *
+ * use libhomescreen api to subscribe homescreen event
+ *
+ * #### Parameters
+ * - evetNave : homescreen event name
+ *
+ * #### Return
+ * - Returns 0 on success or -1 in case of error.
+ *
+ */
+int QLibHomeScreen::subscribe(const QString &evetName)
+{
+ HMI_DEBUG("qlibhomescreen", "called.");
+ string str = evetName.toStdString();
+ return mp_hs->subscribe(str);
+}
+
+/**
+ * unsubscribe event
+ *
+ * use libhomescreen api to unsubscribe homescreen event
+ *
+ * #### Parameters
+ * - evetNave : homescreen event name
+ *
+ * #### Return
+ * - Returns 0 on success or -1 in case of error.
+ *
+ */
+int QLibHomeScreen::unsubscribe(const QString &evetName)
+{
+ HMI_DEBUG("qlibhomescreen", "called.");
+ string str = evetName.toStdString();
+ return mp_hs->unsubscribe(str);
+}
+
+/**
+ * set homescreen event handler function
+ *
+ * #### Parameters
+ * - et : homescreen event name
+ * - f : event handler function
+ *
+ * #### Return
+ * - None.
+ *
+ */
+void QLibHomeScreen::set_event_handler(enum QEventType et, handler_fun f)
+{
+ HMI_DEBUG("qlibhomescreen", "called.");
+ LibHomeScreen::EventType hs_et = (LibHomeScreen::EventType)et;
+ return this->mp_hs->set_event_handler(hs_et, std::move(f));
+}
+
+/**
+ * tapShortcut function
+ *
+ * #### Parameters
+ * - application_name : tapped application name
+ *
+ * #### Return
+ * - None.
+ *
+ */
+void QLibHomeScreen::tapShortcut(QString application_name)
+{
+ HMI_DEBUG("qlibhomescreen","tapShortcut %s", application_name.toStdString().c_str());
+ this->mp_hs->tapShortcut(application_name.toStdString().c_str());
+}
+
+/**
+ * show application by application id
+ *
+ * #### Parameters
+ * - id : application id
+ * - json : json parameters
+ *
+ * #### Return
+ * - None.
+ *
+ */
+void QLibHomeScreen::showWindow(QString application_name, json_object* json)
+{
+ mp_hs->showWindow(application_name.toStdString().c_str(), json);
+}
+
+/**
+ * show application by application id, json string
+ *
+ * #### Parameters
+ * - id : application id
+ * - json : json parameters
+ *
+ * #### Return
+ * - None.
+ *
+ */
+void QLibHomeScreen::showWindow(QString application_name, QString json)
+{
+ if(json.isNull())
+ this->tapShortcut(application_name);
+ else
+ mp_hs->showWindow(application_name.toStdString().c_str(), json_tokener_parse(json.toStdString().c_str()));
+}
+
+
+/**
+ * allocate restiction App
+ *
+ * use libhomescreen api to call restriction app to display
+ *
+ * #### Parameters
+ * - area : restriction display area
+ *
+ * #### Resturn
+ * - None.
+ *
+ */
+void QLibHomeScreen::allocateRestriction(QString area)
+{
+ mp_hs->allocateRestriction(area.toStdString().c_str());
+}
+
+/**
+ * allocate restiction App
+ *
+ * use libhomescreen api to call restriction app to hide
+ *
+ * #### Parameters
+ * - area : restriction display area
+ *
+ * #### Resturn
+ * - None.
+ *
+ */
+void QLibHomeScreen::releaseRestriction(QString area)
+{
+ mp_hs->releaseRestriction(area.toStdString().c_str());
+}
diff --git a/demo#3/common/libqthomescreen/src/qlibhomescreen.h b/demo#3/common/libqthomescreen/src/qlibhomescreen.h
new file mode 100644
index 0000000..6d96bb2
--- /dev/null
+++ b/demo#3/common/libqthomescreen/src/qlibhomescreen.h
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef QLIBHOMESCREEN_H
+#define QLIBHOMESCREEN_H
+
+#include <QObject>
+#include <libhomescreen.hpp>
+#include <functional>
+#include <QVariant>
+
+class QLibHomeScreen : public QObject
+{
+ Q_OBJECT
+public:
+ explicit QLibHomeScreen(QObject *parent = 0);
+ ~QLibHomeScreen();
+
+ QLibHomeScreen(const QLibHomeScreen &) = delete;
+ QLibHomeScreen &operator=(const QLibHomeScreen &) = delete;
+
+ enum QEventType {
+ Event_TapShortcut = LibHomeScreen::Event_TapShortcut,
+ Event_ShowWindow = LibHomeScreen::Event_ShowWindow,
+ Event_OnScreenReply = LibHomeScreen::Event_OnScreenReply,
+ Event_AllocateRestriction,
+ Event_ReleaseRestriction
+ };
+ using handler_fun = std::function<void(json_object *object)>;
+
+ void init(int port, const QString &token);
+ void set_event_handler(enum QEventType et, handler_fun f);
+ Q_INVOKABLE int onScreenMessage(const QString &message);
+ Q_INVOKABLE int subscribe(const QString &eventName);
+ Q_INVOKABLE int unsubscribe(const QString &eventName);
+ Q_INVOKABLE void tapShortcut(QString application_name);
+ Q_INVOKABLE void showWindow(QString application_name, json_object* json);
+ Q_INVOKABLE void showWindow(QString application_name, QString json);
+ Q_INVOKABLE void allocateRestriction(QString area);
+ Q_INVOKABLE void releaseRestriction(QString area);
+
+signals:
+
+private:
+ LibHomeScreen *mp_hs;
+};
+
+#endif // QLIBHOMESCREEN_H
diff --git a/demo#3/common/libqthomescreen/src/src.pro b/demo#3/common/libqthomescreen/src/src.pro
new file mode 100644
index 0000000..b3c8675
--- /dev/null
+++ b/demo#3/common/libqthomescreen/src/src.pro
@@ -0,0 +1,41 @@
+#
+# Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+TEMPLATE = lib
+VERSION = 0.1.0
+TARGET = qthomescreen
+
+HEADERS = qlibhomescreen.h
+SOURCES = qlibhomescreen.cpp
+
+headers.path = /usr/include
+headers.files = qlibhomescreen.h
+
+target.path = /usr/lib
+
+CONFIG += link_pkgconfig create_pc create_prl no_install_prl
+
+PKGCONFIG += libhomescreen
+
+QMAKE_PKGCONFIG_NAME = qlibhomescreen
+QMAKE_PKGCONFIG_FILE = $${QMAKE_PKGCONFIG_NAME}
+QMAKE_PKGCONFIG_VERSION = $${VERSION}
+QMAKE_PKGCONFIG_DESCRIPTION = A wrapper interface for libhomescreen for Qt
+QMAKE_PKGCONFIG_LIBDIR = ${prefix}/lib
+QMAKE_PKGCONFIG_INCDIR = ${prefix}/include
+QMAKE_PKGCONFIG_REQUIRES = libhomescreen
+QMAKE_PKGCONFIG_DESTDIR = pkgconfig
+
+INSTALLS += target headers
diff --git a/demo#3/common/libqtwindowmanager/LICENSE b/demo#3/common/libqtwindowmanager/LICENSE
new file mode 100644
index 0000000..f433b1a
--- /dev/null
+++ b/demo#3/common/libqtwindowmanager/LICENSE
@@ -0,0 +1,177 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
diff --git a/demo#3/common/libqtwindowmanager/qlibwindowmanager.pro b/demo#3/common/libqtwindowmanager/qlibwindowmanager.pro
new file mode 100644
index 0000000..e5e3fe9
--- /dev/null
+++ b/demo#3/common/libqtwindowmanager/qlibwindowmanager.pro
@@ -0,0 +1,17 @@
+#
+# Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+TEMPLATE = subdirs
+SUBDIRS = src \ No newline at end of file
diff --git a/demo#3/common/libqtwindowmanager/src/qlibwindowmanager.cpp b/demo#3/common/libqtwindowmanager/src/qlibwindowmanager.cpp
new file mode 100644
index 0000000..fff99c4
--- /dev/null
+++ b/demo#3/common/libqtwindowmanager/src/qlibwindowmanager.cpp
@@ -0,0 +1,126 @@
+/*
+ * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "qlibwindowmanager.h"
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string>
+
+using namespace std;
+
+int QLibWindowmanager::init(int port, const QString &token) {
+ string ctoken = token.toStdString();
+ int ret_init = this->wm->init(port, ctoken);
+
+ this->screen_info = new AGLScreenInfoPrivate;
+
+ if(ret_init == 0) {
+ struct Screen scrn = this->wm->getScreenInfo();
+ this->screen_info->set_width_dp(scrn.width_dp);
+ this->screen_info->set_height_dp(scrn.height_dp);
+ this->screen_info->set_width_mm(scrn.width_mm);
+ this->screen_info->set_height_mm(scrn.height_mm);
+ this->screen_info->set_scale_factor(scrn.scale);
+ }
+
+ return ret_init;
+}
+
+int QLibWindowmanager::requestSurface(const QString &role) {
+ this->graphic_role = role.toStdString();
+ int surface_id = this->wm->requestSurface(this->graphic_role.c_str());
+ if(surface_id < 0){
+ qDebug("failed to get surfaceID");
+ return -1;
+ }
+ else{
+ qDebug("surfaceID is set to %d", surface_id);
+ char buf[65]; // surface id is under 64bit(1.84E19,) so 65 is sufficient for buffer
+ snprintf(buf, 65, "%d", surface_id);
+ setenv("QT_IVI_SURFACE_ID", buf, 1);
+ return 0;
+ }
+}
+
+int QLibWindowmanager::activateWindow(const QString &role) {
+ string srole = role.toStdString();
+ // Request default drawing area "normal.full" in libwindowmanager
+ return this->wm->activateWindow(srole.c_str());
+}
+
+int QLibWindowmanager::activateWindow(const QString &role, const QString &area) {
+ string srole = role.toStdString();
+ string sarea = area.toStdString();
+ return this->wm->activateWindow(srole.c_str(), sarea.c_str());
+}
+
+int QLibWindowmanager::deactivateWindow(const QString &role) {
+ string srole = role.toStdString();
+ return this->wm->deactivateWindow(srole.c_str());
+}
+
+// This API is deprecated, please use new API
+int QLibWindowmanager::activateSurface(const QString &role) {
+ return this->activateWindow(role);
+}
+
+// This API is deprecated, please use new API
+int QLibWindowmanager::activateSurface(const QString &role, const QString &area) {
+ return this->activateWindow(role, area);
+}
+
+// This API is deprecated, please use new API
+int QLibWindowmanager::deactivateSurface(const QString &role) {
+ return this->deactivateWindow(role);
+}
+
+int QLibWindowmanager::endDraw(const QString &role) {
+ string srole = role.toStdString();
+ return this->wm->endDraw(srole.c_str());
+ }
+
+void QLibWindowmanager::set_event_handler(enum QEventType et,
+ handler_fun f) {
+ LibWindowmanager::EventType wet = (LibWindowmanager::EventType)et;
+ return this->wm->set_event_handler(wet, std::move(f));
+}
+
+void QLibWindowmanager::slotActivateWindow(){
+ // This is needed for first rendering when the app is launched
+ if(!isActive){
+ qDebug("Let's show %s", qPrintable(this->graphic_role.c_str()));
+ isActive = true;
+ this->activateWindow(this->graphic_role.c_str());
+ }
+}
+
+// This API is deprecated, please use new API
+void QLibWindowmanager::slotActivateSurface(){
+ this->slotActivateWindow();
+}
+
+QLibWindowmanager::QLibWindowmanager(QObject *parent)
+ :QObject(parent), isActive(false), screen_info(nullptr)
+{
+ wm = new LibWindowmanager();
+}
+
+QLibWindowmanager::~QLibWindowmanager()
+{
+ delete wm;
+ delete screen_info;
+} \ No newline at end of file
diff --git a/demo#3/common/libqtwindowmanager/src/qlibwindowmanager.h b/demo#3/common/libqtwindowmanager/src/qlibwindowmanager.h
new file mode 100644
index 0000000..b736e07
--- /dev/null
+++ b/demo#3/common/libqtwindowmanager/src/qlibwindowmanager.h
@@ -0,0 +1,131 @@
+/*
+ * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef QLIBWINDOWMANAGER_H
+#define QLIBWINDOWMANAGER_H
+#include <libwindowmanager.h>
+#include <functional>
+#include <QObject>
+#include <string>
+
+class AGLScreenInfo : public QObject
+{
+ Q_OBJECT
+
+ public:
+ AGLScreenInfo(double scale = 1.0) { _scale_factor = scale; };
+
+ Q_INVOKABLE double scale_factor() const { return _scale_factor; };
+
+ private:
+ double _scale_factor;
+};
+
+class AGLScreenInfoPrivate
+{
+ public:
+ unsigned long width_dp(void) const { return _width_dp; };
+ unsigned long height_dp(void) const { return _height_dp; };
+ unsigned long width_mm(void) const { return _width_mm; };
+ unsigned long height_mm(void) const { return _height_mm; };
+ double scale_factor(void) const { return _scale; };
+
+ void set_width_dp(unsigned long w) { _width_dp = w; };
+ void set_height_dp(unsigned long h) { _height_dp = h; };
+ void set_width_mm(unsigned long w) { _width_mm = w; };
+ void set_height_mm(unsigned long h) { _height_mm = h; };
+ void set_scale_factor(double scale) { _scale = scale; };
+
+ private:
+ unsigned long _width_dp;
+ unsigned long _height_dp;
+ unsigned long _width_mm;
+ unsigned long _height_mm;
+ double _scale = 1.0;
+};
+
+class QLibWindowmanager : public QObject{
+Q_OBJECT
+public:
+ explicit QLibWindowmanager(QObject *parent = nullptr);
+ ~QLibWindowmanager();
+
+ QLibWindowmanager(const QLibWindowmanager &) = delete;
+ QLibWindowmanager &operator=(const QLibWindowmanager &) = delete;
+
+public:
+ using handler_fun = std::function<void(json_object *object)>;
+
+ enum QEventType {
+ Event_Active = LibWindowmanager::Event_Active,
+ Event_Inactive,
+
+ Event_Visible,
+ Event_Invisible,
+
+ Event_SyncDraw,
+ Event_FlushDraw,
+
+ Event_ScreenUpdated,
+
+ Event_HeadlampOff,
+ Event_HeadlampOn,
+
+ Event_ParkingBrakeOff,
+ Event_ParkingBrakeOn,
+
+ Event_LightstatusBrakeOff,
+ Event_LightstatusBrakeOn,
+
+ Event_CarStop,
+ Event_CarRun,
+
+ Event_Error,
+
+ Event_Val_Max = Event_Error
+ };
+
+ int init(int port, const QString &token);
+
+ // WM API
+ Q_INVOKABLE int requestSurface(const QString &role);
+ Q_INVOKABLE int activateWindow(const QString &role);
+ Q_INVOKABLE int activateWindow(const QString &role, const QString &drawing_area);
+ Q_INVOKABLE int deactivateWindow(const QString &role);
+ Q_INVOKABLE int endDraw(const QString &role);
+
+ void set_event_handler(enum QEventType et, handler_fun f);
+
+ double get_scale_factor() const { return screen_info->scale_factor(); };
+
+ // These APIs are deprecated, please use new API
+ THIS_FUNCTION_IS_DEPRECATED(Q_INVOKABLE int activateSurface(const QString &role));
+ THIS_FUNCTION_IS_DEPRECATED(Q_INVOKABLE int activateSurface(const QString &role, const QString &drawing_area));
+ THIS_FUNCTION_IS_DEPRECATED(Q_INVOKABLE int deactivateSurface(const QString &role));
+
+public slots:
+ void slotActivateWindow();
+
+ // This API is deprecated, please use new API
+ THIS_FUNCTION_IS_DEPRECATED(void slotActivateSurface());
+
+private:
+ LibWindowmanager* wm;
+ std::string graphic_role;
+ bool isActive;
+ AGLScreenInfoPrivate* screen_info;
+};
+#endif // LIBWINDOWMANAGER_H
diff --git a/demo#3/common/libqtwindowmanager/src/src.pro b/demo#3/common/libqtwindowmanager/src/src.pro
new file mode 100644
index 0000000..a1c0203
--- /dev/null
+++ b/demo#3/common/libqtwindowmanager/src/src.pro
@@ -0,0 +1,41 @@
+#
+# Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+TEMPLATE = lib
+VERSION = 0.1.0
+TARGET = qtwindowmanager
+
+HEADERS = qlibwindowmanager.h
+SOURCES = qlibwindowmanager.cpp
+
+headers.path = /usr/include
+headers.files = qlibwindowmanager.h
+
+target.path = /usr/lib
+
+CONFIG += link_pkgconfig create_pc create_prl no_install_prl
+
+PKGCONFIG += libwindowmanager
+
+QMAKE_PKGCONFIG_NAME = qlibwindowmanager
+QMAKE_PKGCONFIG_FILE = $${QMAKE_PKGCONFIG_NAME}
+QMAKE_PKGCONFIG_VERSION = $${VERSION}
+QMAKE_PKGCONFIG_DESCRIPTION = A wrapper interface for libwindowmanager for Qt
+QMAKE_PKGCONFIG_LIBDIR = ${prefix}/lib
+QMAKE_PKGCONFIG_INCDIR = ${prefix}/include
+QMAKE_PKGCONFIG_REQUIRES = libwindowmanager
+QMAKE_PKGCONFIG_DESTDIR = pkgconfig
+
+INSTALLS += target headers
diff --git a/demo#3/common/libwindowmanager/CMakeLists.txt b/demo#3/common/libwindowmanager/CMakeLists.txt
new file mode 100644
index 0000000..ad24ccb
--- /dev/null
+++ b/demo#3/common/libwindowmanager/CMakeLists.txt
@@ -0,0 +1,46 @@
+#
+# Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+cmake_minimum_required(VERSION 2.8)
+
+project(WindowManagerTMC)
+
+set(PACKAGE_VERSION_MAJOR 0)
+set(PACKAGE_VERSION_MINOR 1)
+set(PACKAGE_VERSION_REVISION 0)
+set(PACKAGE_VERSION "${PACKAGE_VERSION_MAJOR}.${PACKAGE_VERSION_MINOR}.${PACKAGE_VERSION_REVISION}")
+
+find_package(PkgConfig REQUIRED)
+include(GNUInstallDirs)
+
+# Should modernize the following somehow...
+set(ENABLE_SCOPE_TRACING OFF CACHE BOOL "Enable scope enter/leave messages for certain parts of the code.")
+if(ENABLE_SCOPE_TRACING)
+ add_definitions(-DSCOPE_TRACING)
+else()
+ remove_definitions(-DSCOPE_TRACING)
+endif()
+
+set(SANITIZER_MODE "none" CACHE STRING "Build using a specific sanitizer (e.g. 'address', 'thread', 'leak', 'undefined'), depends on compiler; default none")
+
+set(LINK_LIBCXX OFF CACHE BOOL "Link against LLVMs libc++")
+
+add_subdirectory(src)
+
+configure_file(libwindowmanager.pc.in libwindowmanager.pc @ONLY)
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libwindowmanager.pc
+ DESTINATION
+ ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
diff --git a/demo#3/common/libwindowmanager/LICENSE b/demo#3/common/libwindowmanager/LICENSE
new file mode 100644
index 0000000..f433b1a
--- /dev/null
+++ b/demo#3/common/libwindowmanager/LICENSE
@@ -0,0 +1,177 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
diff --git a/demo#3/common/libwindowmanager/libwindowmanager.pc.in b/demo#3/common/libwindowmanager/libwindowmanager.pc.in
new file mode 100644
index 0000000..2a70037
--- /dev/null
+++ b/demo#3/common/libwindowmanager/libwindowmanager.pc.in
@@ -0,0 +1,11 @@
+includedir=@PROJECT_INCLUDEDIR@
+libdir=@PROJECT_LIBDIR@
+
+Name: @PROJECT_PRETTY_NAME@
+Description: @PROJECT_DESCRIPTION@
+Version: @PROJECT_VERSION@
+URL: @PROJECT_URL@
+
+Requires: json-c afb-daemon
+Cflags: -I${includedir}
+Libs: -L${libdir} -lwindowmanager
diff --git a/demo#3/common/libwindowmanager/src/CMakeLists.txt b/demo#3/common/libwindowmanager/src/CMakeLists.txt
new file mode 100644
index 0000000..9052d70
--- /dev/null
+++ b/demo#3/common/libwindowmanager/src/CMakeLists.txt
@@ -0,0 +1,80 @@
+#
+# Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+include(FindPkgConfig)
+
+pkg_check_modules(AFB REQUIRED libafbwsc)
+pkg_check_modules(SD REQUIRED libsystemd>=222)
+
+set(TARGET_LIBWM windowmanager)
+
+add_library(${TARGET_LIBWM} SHARED
+ libwindowmanager.cpp
+ libwindowmanager.h)
+
+target_include_directories(${TARGET_LIBWM}
+ PRIVATE
+ ${AFB_INCLUDE_DIRS}
+ ${SD_INCLUDE_DIRS})
+
+target_link_libraries(${TARGET_LIBWM}
+ PUBLIC
+ -lpthread
+ ${AFB_LIBRARIES}
+ ${SD_LIBRARIES})
+
+if(NOT ${CMAKE_BUILD_TYPE} STREQUAL "Release")
+ target_compile_definitions(${TARGET_LIBWM}
+ PRIVATE
+ _GLIBCXX_DEBUG)
+endif()
+
+target_compile_options(${TARGET_LIBWM}
+ PRIVATE
+ -Wall -Wextra -Wno-unused-parameter -Wno-comment)
+
+set_target_properties(${TARGET_LIBWM}
+ PROPERTIES
+ # INTERPROCEDURAL_OPTIMIZATION ON
+ CXX_EXTENSIONS OFF
+ CXX_STANDARD 14
+ VERSION ${PACKAGE_VERSION}
+ CXX_STANDARD_REQUIRED ON)
+
+if (LINK_LIBCXX)
+ set_target_properties(${TARGET_LIBWM}
+ PROPERTIES
+ LINK_FLAGS "-lc++")
+endif()
+
+if (NOT ${SANITIZER_MODE} STREQUAL "none" AND NOT ${SANITIZER_MODE} STREQUAL "")
+ target_compile_options(${TARGET_LIBWM}
+ PRIVATE
+ -fsanitize=${SANITIZER_MODE} -g -fno-omit-frame-pointer)
+ set_target_properties(${TARGET_LIBWM}
+ PROPERTIES
+ LINK_FLAGS "-fsanitize=${SANITIZER_MODE} -g")
+endif()
+
+install(
+ TARGETS ${TARGET_LIBWM}
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ COMPONENT "runtime")
+
+install(
+ FILES libwindowmanager.h
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+ COMPONENT "development")
diff --git a/demo#3/common/libwindowmanager/src/hmi-debug.h b/demo#3/common/libwindowmanager/src/hmi-debug.h
new file mode 100644
index 0000000..2a744ba
--- /dev/null
+++ b/demo#3/common/libwindowmanager/src/hmi-debug.h
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __HMI_DEBUG_H__
+#define __HMI_DEBUG_H__
+
+#include <time.h>
+#include <stdio.h>
+#include <stdarg.h>
+#include <string.h>
+#include <stdlib.h>
+
+enum LOG_LEVEL{
+ LOG_LEVEL_NONE = 0,
+ LOG_LEVEL_ERROR,
+ LOG_LEVEL_WARNING,
+ LOG_LEVEL_NOTICE,
+ LOG_LEVEL_INFO,
+ LOG_LEVEL_DEBUG,
+ LOG_LEVEL_MAX = LOG_LEVEL_DEBUG
+};
+
+#define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__)
+
+#define HMI_ERROR(prefix, args,...) _HMI_LOG(LOG_LEVEL_ERROR, __FILENAME__, __FUNCTION__, __LINE__, prefix, args, ##__VA_ARGS__)
+#define HMI_WARNING(prefix, args,...) _HMI_LOG(LOG_LEVEL_WARNING, __FILENAME__, __FUNCTION__,__LINE__, prefix, args,##__VA_ARGS__)
+#define HMI_NOTICE(prefix, args,...) _HMI_LOG(LOG_LEVEL_NOTICE, __FILENAME__, __FUNCTION__,__LINE__, prefix, args,##__VA_ARGS__)
+#define HMI_INFO(prefix, args,...) _HMI_LOG(LOG_LEVEL_INFO, __FILENAME__, __FUNCTION__,__LINE__, prefix, args,##__VA_ARGS__)
+#define HMI_DEBUG(prefix, args,...) _HMI_LOG(LOG_LEVEL_DEBUG, __FILENAME__, __FUNCTION__,__LINE__, prefix, args,##__VA_ARGS__)
+
+static char ERROR_FLAG[6][20] = {"NONE", "ERROR", "WARNING", "NOTICE", "INFO", "DEBUG"};
+
+static void _HMI_LOG(enum LOG_LEVEL level, const char* file, const char* func, const int line, const char* prefix, const char* log, ...)
+{
+ const int log_level = (getenv("USE_HMI_DEBUG") == NULL)?LOG_LEVEL_ERROR:atoi(getenv("USE_HMI_DEBUG"));
+ if(log_level < level)
+ {
+ return;
+ }
+
+ char *message;
+ struct timespec tp;
+ unsigned int time;
+
+ clock_gettime(CLOCK_REALTIME, &tp);
+ time = (tp.tv_sec * 1000000L) + (tp.tv_nsec / 1000);
+
+ va_list args;
+ va_start(args, log);
+ if (log == NULL || vasprintf(&message, log, args) < 0)
+ message = NULL;
+ fprintf(stderr, "[%10.3f] [%s %s] [%s, %s(), Line:%d] >>> %s \n", time / 1000.0, prefix, ERROR_FLAG[level], file, func, line, message);
+ va_end(args);
+ free(message);
+}
+
+#endif //__HMI_DEBUG_H__ \ No newline at end of file
diff --git a/demo#3/common/libwindowmanager/src/libwindowmanager.cpp b/demo#3/common/libwindowmanager/src/libwindowmanager.cpp
new file mode 100644
index 0000000..dfc0886
--- /dev/null
+++ b/demo#3/common/libwindowmanager/src/libwindowmanager.cpp
@@ -0,0 +1,1218 @@
+/*
+ * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "libwindowmanager.h"
+#include "hmi-debug.h"
+
+#include <atomic>
+#include <map>
+#include <mutex>
+#include <set>
+#include <queue>
+#include <unistd.h>
+#include <pthread.h>
+
+extern "C" {
+#include <afb/afb-ws-client.h>
+#include <afb/afb-wsj1.h>
+#include <systemd/sd-event.h>
+}
+
+#define UNUSED(x) (void)(x)
+
+namespace {
+ /* Key for json obejct */
+ static const char g_kKeyDrawingName[] = "drawing_name";
+ static const char g_kKeyDrawingArea[] = "drawing_area";
+ static const char g_kKeyDrawingRect[] = "drawing_rect";
+ static const char g_kKeyResponse[] = "response";
+}
+
+/**
+ * @class LibWindowmanager::Impl
+ */
+class LibWindowmanager::Impl {
+ public:
+
+ Impl();
+ ~Impl();
+
+ // This is the LibWindowmanager interface impl
+ int init(int port, char const *token);
+
+ // WM API
+ int requestSurface(json_object *object);
+ int requestSurfaceXDG(json_object *object);
+ int activateWindow(json_object *object);
+ int deactivateWindow(json_object *object);
+ int endDraw(json_object *object);
+
+ int getDisplayInfo(json_object *object);
+ int getAreaInfo(json_object *in_obj, json_object *out_obj);
+ struct Screen getScreenInfo() {return this->_screen;};
+
+ void set_event_handler(enum EventType et, handler_fun func);
+ void setEventHandler(const WMHandler &wmh);
+
+ int api_call(const char *verb, json_object *object,
+ const std::function<void(bool, json_object *)> &onReply);
+ void event(char const *et, json_object *object);
+ void event(char const *et);
+private:
+ int runEventLoop();
+
+ struct afb_wsj1 *wsj1;
+ struct sd_event *loop;
+
+ std::set<std::string> labels;
+ std::map<EventType, handler_fun> handlers;
+ std::queue<std::pair<handler_fun, std::string>> handler_queue;
+
+ const std::vector<std::string> kListEventName{
+ std::string("active"),
+ std::string("inactive"),
+ std::string("visible"),
+ std::string("invisible"),
+ std::string("syncDraw"),
+ std::string("flushDraw"),
+ std::string("screenUpdated"),
+ std::string("headlampOff"),
+ std::string("headlampOn"),
+ std::string("parkingBrakeOff"),
+ std::string("parkingBrakeOn"),
+ std::string("lightstatusBrakeOff"),
+ std::string("lightstatusBrakeOn"),
+ std::string("carStop"),
+ std::string("carRun"),
+ std::string("error")
+ };
+
+ struct Screen _screen;
+ WMHandler _wmh;
+};
+
+namespace {
+
+constexpr const char *const wmAPI = "windowmanager";
+
+#define CONCAT_(X, Y) X##Y
+#define CONCAT(X, Y) CONCAT_(X, Y)
+
+#ifndef SCOPE_TRACING
+#define TRACE()
+#define TRACEN(N)
+#else
+#define TRACE() \
+ ScopeTrace __attribute__((unused)) CONCAT(trace_scope_, __LINE__)(__func__)
+#define TRACEN(N) \
+ ScopeTrace __attribute__((unused)) CONCAT(named_trace_scope_, __LINE__)(#N)
+
+struct ScopeTrace {
+ thread_local static int indent;
+ char const *f{};
+ explicit ScopeTrace(char const *func) : f(func) {
+ fprintf(stderr, "%*s%s -->\n", 2 * indent++, "", this->f);
+ }
+ ~ScopeTrace() { fprintf(stderr, "%*s%s <--\n", 2 * --indent, "", this->f); }
+};
+thread_local int ScopeTrace::indent = 0;
+#endif
+
+/* called when wsj1 receives a method invocation */
+void onCall(void *closure, const char *api, const char *verb,
+ struct afb_wsj1_msg *msg) {
+ TRACE();
+ UNUSED(closure);
+ UNUSED(verb);
+ UNUSED(api);
+ UNUSED(msg);
+}
+
+/* called when wsj1 receives an event */
+void onEvent(void *closure, const char *event, afb_wsj1_msg *msg) {
+ TRACE();
+ // check API name in event
+ if (0 != strncmp(wmAPI, event, strlen(wmAPI))) {
+ HMI_ERROR("libwm", "Unknown event: %s", event);
+ return;
+ }
+
+ json_object *j, *val;
+ j = afb_wsj1_msg_object_j(msg);
+ if (json_object_object_get_ex(j, "data", &val)) {
+ static_cast<LibWindowmanager::Impl *>(closure)->event(event, val);
+ }
+ else {
+ static_cast<LibWindowmanager::Impl *>(closure)->event(event);
+ }
+}
+
+/* called when wsj1 hangsup */
+void onHangup(void *closure, afb_wsj1 *wsj1) {
+ TRACE();
+ UNUSED(closure);
+ UNUSED(wsj1);
+ HMI_ERROR("libwm", "Hangup, the WindowManager vanished");
+}
+
+constexpr struct afb_wsj1_itf itf = {
+ onHangup, onCall, onEvent,
+};
+
+} // namespace
+
+/**
+ * @class LibWindowmanager::Impl::Impl
+ */
+LibWindowmanager::Impl::Impl()
+ : wsj1{}, loop{}, labels(), handlers(),
+ _screen{0,0,0,0,0.0},
+ _wmh()
+{}
+
+LibWindowmanager::Impl::~Impl() {
+ TRACE();
+ afb_wsj1_unref(wsj1);
+ sd_event_unref(loop);
+}
+
+int LibWindowmanager::Impl::init(int port, char const *token) {
+ TRACE();
+ HMI_DEBUG("libwm", "called");
+
+ char *uribuf = nullptr;
+ int rc = -1;
+
+ if (this->loop != nullptr && this->wsj1 != nullptr) {
+ HMI_ERROR("libwm", "LibWindowmanager instance is already initialized!");
+ rc = -EALREADY;
+ goto fail;
+ }
+
+ if (token == nullptr) {
+ HMI_ERROR("libwm", "Token is invalid");
+ rc = -EINVAL;
+ goto fail;
+ }
+
+ if (port < 1 || port > 0xffff) {
+ HMI_ERROR("libwm", "Port is invalid");
+ rc = -EINVAL;
+ goto fail;
+ }
+
+ /* get the default event loop */
+ rc = sd_event_default(&this->loop);
+ if (rc < 0) {
+ HMI_ERROR("libwm", "Connection to default event loop failed: %s",
+ strerror(-rc));
+ goto fail;
+ }
+
+ asprintf(&uribuf, "ws://localhost:%d/api?token=%s", port, token);
+
+ /* connect the websocket wsj1 to the uri given by the first argument */
+ this->wsj1 = afb_ws_client_connect_wsj1(
+ this->loop, uribuf, const_cast<struct afb_wsj1_itf *>(&itf), this);
+ if (this->wsj1 == nullptr) {
+ sd_event_unref(this->loop);
+ this->loop = nullptr;
+ HMI_ERROR("libwm", "Connection to %s failed: %m", uribuf);
+ rc = -errno;
+ goto fail;
+ }
+
+ this->runEventLoop();
+
+ return 0;
+
+fail:
+ return rc;
+}
+
+int LibWindowmanager::Impl::requestSurface(json_object *object) {
+ TRACE();
+ HMI_DEBUG("libwm", "called");
+
+ json_object *val;
+ const char *tmp_label;
+ if (json_object_object_get_ex(object, g_kKeyDrawingName, &val)) {
+ tmp_label = json_object_get_string(val);
+ }
+ else {
+ HMI_DEBUG("libwm", "Not found key \"%s\"", g_kKeyDrawingName);
+ return -EINVAL;
+ }
+
+ // DrawingName in "object" is overwrited in api_call("RequestSurface")
+ // So it is neccesary to copy it.
+ const char *label = std::string(tmp_label).c_str();
+
+ if (this->labels.find(label) != this->labels.end()) {
+ HMI_ERROR("libwm", "Surface label already known!");
+ return -EINVAL;
+ }
+
+ // Store application name first
+ // because it may not return from setenv
+ HMI_DEBUG("libwm", "Insert application name: %s\n", label);
+ this->labels.insert(this->labels.end(), label);
+
+ int rc = -1;
+ /* send the request */
+ int rc2 =
+ this->api_call("RequestSurface", object, [&rc](bool ok, json_object *j) {
+ if (ok) {
+ json_object *val;
+ if (json_object_object_get_ex(j, g_kKeyResponse, &val)) {
+ rc = json_object_get_int(val);
+ }
+ else {
+ HMI_ERROR("libwm", "Not found key \"response\"");
+ rc = -EINVAL;
+ return;
+ }
+ }
+ });
+
+ if (rc2 < 0) {
+ rc = rc2;
+ }
+
+ if (rc < 0) {
+ HMI_ERROR("libwm", "Erase application name: %s", label);
+ this->labels.erase(label);
+ }
+
+ return rc;
+}
+
+int LibWindowmanager::Impl::requestSurfaceXDG(json_object *object) {
+ TRACE();
+ HMI_DEBUG("libwm", "called");
+
+ json_object *val;
+ const char *tmp_label;
+ if (json_object_object_get_ex(object, g_kKeyDrawingName, &val)) {
+ tmp_label = json_object_get_string(val);
+ }
+ else {
+ HMI_DEBUG("libwm", "Not found key \"%s\"", g_kKeyDrawingName);
+ return -EINVAL;
+ }
+
+ // DrawingName in "object" is overwrited in api_call("RequestSurface")
+ // So it is neccesary to copy it.
+ const char *label = std::string(tmp_label).c_str();
+
+ if (this->labels.find(label) != this->labels.end()) {
+ HMI_ERROR("libwm", "Surface label already known!");
+ return -EINVAL;
+ }
+
+ // Store application name first
+ // because it may not return from setenv
+ HMI_DEBUG("libwm", "Insert application name: %s\n", label);
+ this->labels.insert(this->labels.end(), label);
+
+ /* send the request */
+ int rc = this->api_call("RequestSurfaceXDG", object, [](bool ok, json_object *j) {
+ if (!ok) {
+ HMI_ERROR("libwm", "Could not get surface ID from WM: %s",
+ j != nullptr ? json_object_to_json_string_ext(
+ j, JSON_C_TO_STRING_PRETTY)
+ : "no-info");
+ }
+ });
+
+ if (rc != 0) {
+ HMI_ERROR("libwm", "Erase application name: %s", label);
+ this->labels.erase(label);
+ }
+
+ return rc;
+}
+
+int LibWindowmanager::Impl::activateWindow(json_object *object) {
+ TRACE();
+ HMI_DEBUG("libwm", "called");
+ return this->api_call("ActivateWindow", object, [](bool ok, json_object *j) {
+ if (!ok) {
+ HMI_ERROR("libwm", "API Call activateWindow() failed: %s",
+ j != nullptr ? json_object_to_json_string_ext(
+ j, JSON_C_TO_STRING_PRETTY)
+ : "no-info");
+ }
+ });
+}
+
+int LibWindowmanager::Impl::deactivateWindow(json_object *object) {
+ TRACE();
+ HMI_DEBUG("libwm", "called");
+ return this->api_call("DeactivateWindow", object, [](bool ok, json_object *j) {
+ if (!ok) {
+ HMI_ERROR("libwm", "API Call deactivateWindow() failed: %s",
+ j != nullptr ? json_object_to_json_string_ext(
+ j, JSON_C_TO_STRING_PRETTY)
+ : "no-info");
+ }
+ });
+}
+
+int LibWindowmanager::Impl::endDraw(json_object *object) {
+ TRACE();
+ HMI_DEBUG("libwm", "called");
+ return this->api_call("EndDraw", object, [](bool ok, json_object *j) {
+ if (!ok) {
+ HMI_ERROR("libwm", "API Call endDraw() failed: %s",
+ j != nullptr ? json_object_to_json_string_ext(
+ j, JSON_C_TO_STRING_PRETTY)
+ : "no-info");
+ }
+ });
+}
+
+int LibWindowmanager::Impl::getDisplayInfo(json_object *object) {
+ TRACE();
+ HMI_DEBUG("libwm", "called");
+
+ if (nullptr == object) {
+ HMI_ERROR("libwm", "Argment is NULL!");
+ return -EINVAL;
+ }
+
+ if ((nullptr == this->loop) || (nullptr == this->wsj1)) {
+ HMI_ERROR("libwm", "LibWindowmanager is not initialized!");
+ return -EPERM;
+ }
+
+ int w_px, h_px, w_mm, h_mm;
+ int rc = -1;
+ double scale;
+ /* send the request */
+ int rc2 =
+ this->api_call("GetDisplayInfo", nullptr,
+ [&rc, &w_px, &h_px, &w_mm, &h_mm, &scale](bool ok, json_object *j) {
+ if (ok) {
+ json_object *val;
+ if (json_object_object_get_ex(j, g_kKeyResponse, &val)) {
+ HMI_DEBUG("libwm", "responce:%s", json_object_get_string(val));
+
+ json_object *j_w_px = nullptr;
+ if (!json_object_object_get_ex(val, "width_pixel", &j_w_px)) {
+ HMI_DEBUG("libwm", "Not found key \"width_pixel\"");
+ rc = -EINVAL;
+ return;
+ }
+ w_px = json_object_get_int(j_w_px);
+
+ json_object *j_h_px = nullptr;
+ if (!json_object_object_get_ex(val, "height_pixel", &j_h_px)) {
+ HMI_DEBUG("libwm", "Not found key \"height_pixel\"");
+ rc = -EINVAL;
+ return;
+ }
+ h_px = json_object_get_int(j_h_px);
+
+ json_object *j_w_mm = nullptr;
+ if (!json_object_object_get_ex(val, "width_mm", &j_w_mm)) {
+ HMI_DEBUG("libwm", "Not found key \"width_mm\"");
+ rc = -EINVAL;
+ return;
+ }
+ w_mm = json_object_get_int(j_w_mm);
+
+ json_object *j_h_mm = nullptr;
+ if (!json_object_object_get_ex(val, "height_mm", &j_h_mm)) {
+ HMI_DEBUG("libwm", "Not found key \"height_mm\"");
+ rc = -EINVAL;
+ return;
+ }
+ h_mm = json_object_get_int(j_h_mm);
+
+ json_object *j_scale = nullptr;
+ if (!json_object_object_get_ex(val, "scale", &j_scale)) {
+ HMI_DEBUG("libwm:", "Not found key \"scale\"");
+ scale = 1.0; // for backward compatibility
+ } else {
+ scale = json_object_get_double(j_scale);
+ }
+ rc = 0;
+ }
+ else {
+ HMI_ERROR("libwm", "Not found key \"response\"");
+ rc = -EINVAL;
+ return;
+ }
+ } else {
+ HMI_ERROR("libwm", "Windowmanager-service is not initialized: %s",
+ j != nullptr ? json_object_to_json_string_ext(
+ j, JSON_C_TO_STRING_PRETTY)
+ : "no-info");
+ rc = -EPERM;
+ }
+ });
+
+ if (0 > rc2) {
+ HMI_ERROR("libwm", "api_call() failed");
+ rc = rc2;
+ }
+
+ if (0 == rc) {
+ json_object_object_add(object, "width_pixel", json_object_new_int(w_px));
+ json_object_object_add(object, "height_pixel", json_object_new_int(h_px));
+ json_object_object_add(object, "width_mm", json_object_new_int(w_mm));
+ json_object_object_add(object, "height_mm", json_object_new_int(h_mm));
+ json_object_object_add(object, "scale", json_object_new_double(scale));
+ this->_screen = Screen{
+ static_cast<unsigned long>(w_px),
+ static_cast<unsigned long>(h_px),
+ static_cast<unsigned long>(w_mm),
+ static_cast<unsigned long>(h_mm),
+ scale};
+ }
+
+ return rc;
+}
+
+int LibWindowmanager::Impl::getAreaInfo(json_object *in_obj, json_object *out_obj) {
+ TRACE();
+ HMI_DEBUG("libwm", "called");
+
+ if (nullptr == in_obj) {
+ HMI_ERROR("libwm", "Argment is NULL!");
+ return -EINVAL;
+ }
+
+ if ((nullptr == this->loop) || (nullptr == this->wsj1)) {
+ HMI_ERROR("libwm", "LibWindowmanager is not initialized!");
+ return -EPERM;
+ }
+
+ int x, y, w, h;
+ int rc = -1;
+ /* send the request */
+ int rc2 =
+ this->api_call("GetAreaInfo", in_obj,
+ [&rc, &x, &y, &w, &h](bool ok, json_object *j) {
+ if (ok) {
+ json_object *val;
+ HMI_DEBUG("libwm", "j:%s", json_object_get_string(j));
+ if (json_object_object_get_ex(j, g_kKeyResponse, &val)) {
+ json_object *j_x = nullptr;
+ if (!json_object_object_get_ex(val, "x", &j_x)) {
+ HMI_DEBUG("libwm", "Not found key \"x\"");
+ rc = -EINVAL;
+ return;
+ }
+ x = json_object_get_int(j_x);
+
+ json_object *j_y = nullptr;
+ if (!json_object_object_get_ex(val, "y", &j_y)) {
+ HMI_DEBUG("libwm", "Not found key \"y\"");
+ rc = -EINVAL;
+ return;
+ }
+ y = json_object_get_int(j_y);
+
+ json_object *j_w = nullptr;
+ if (!json_object_object_get_ex(val, "width", &j_w)) {
+ HMI_DEBUG("libwm", "Not found key \"width\"");
+ rc = -EINVAL;
+ return;
+ }
+ w = json_object_get_int(j_w);
+
+ json_object *j_h = nullptr;
+ if (!json_object_object_get_ex(val, "height", &j_h)) {
+ HMI_DEBUG("libwm", "Not found key \"height\"");
+ rc = -EINVAL;
+ return;
+ }
+ h = json_object_get_int(j_h);
+ rc = 0;
+
+ HMI_DEBUG("libwm", "responce:%s", json_object_get_string(val));
+ }
+ else {
+ HMI_ERROR("libwm", "Not found key \"response\"");
+ rc = -EINVAL;
+ return;
+ }
+ } else {
+ HMI_ERROR("libwm", "Could not get area rect: %s",
+ j != nullptr ? json_object_to_json_string_ext(
+ j, JSON_C_TO_STRING_PRETTY)
+ : "no-info");
+ rc = -EINVAL;
+ }
+ });
+
+ if (0 > rc2) {
+ HMI_ERROR("libwm", "api_call() failed");
+ rc = rc2;
+ }
+
+ if (0 == rc) {
+ json_object_object_add(out_obj, "x", json_object_new_int(x));
+ json_object_object_add(out_obj, "y", json_object_new_int(y));
+ json_object_object_add(out_obj, "width", json_object_new_int(w));
+ json_object_object_add(out_obj, "height", json_object_new_int(h));
+ }
+
+ return rc;
+}
+
+static void _on_reply_static(void *closure, struct afb_wsj1_msg *msg)
+{
+}
+
+void LibWindowmanager::Impl::set_event_handler(enum EventType et, handler_fun func) {
+ TRACE();
+ HMI_DEBUG("libwm", "called");
+
+ // Subscribe event
+ struct json_object* j = json_object_new_object();
+ json_object_object_add(j, "event", json_object_new_int(et));
+
+ int ret = afb_wsj1_call_j(this->wsj1, wmAPI, "wm_subscribe", j, _on_reply_static, this);
+ if (0 > ret) {
+ HMI_ERROR("libwm", "Failed to subscribe event: %s", kListEventName[et].c_str());
+ }
+
+ // Set event handler
+ if (et >= Event_Active && et <= Event_Val_Max) {
+ this->handlers[et] = std::move(func);
+ }
+}
+
+namespace {
+std::pair<bool, LibWindowmanager::EventType> make_event_type(char const *et) {
+ // Event have the form "$API/$EVENT", just try to find the first / and
+ // get on with it.
+ char const *et2 = strchr(et, '/');
+ if (et2 != nullptr) {
+ et = et2 + 1;
+ }
+
+#define ET(N, A) \
+ do { \
+ if (strcasecmp(et, N) == 0) \
+ return std::pair<bool, LibWindowmanager::EventType>( \
+ true, CONCAT(LibWindowmanager::Event_, A)); \
+ } while (false)
+
+ ET("active", Active);
+ ET("inactive", Inactive);
+ ET("visible", Visible);
+ ET("invisible", Invisible);
+ ET("syncdraw", SyncDraw);
+ ET("flushdraw", FlushDraw);
+ ET("screenUpdated", ScreenUpdated);
+ ET("headlampOff", HeadlampOff);
+ ET("headlampOn", HeadlampOn);
+ ET("parkingBrakeOff", ParkingBrakeOff);
+ ET("parkingBrakeOn", ParkingBrakeOn);
+ ET("lightstatusBrakeOff", LightstatusBrakeOff);
+ ET("lightstatusBrakeOn", LightstatusBrakeOn);
+ ET("carStop", CarStop);
+ ET("carRun", CarRun);
+ ET("error", Error);
+#undef ET
+
+ return std::pair<bool, LibWindowmanager::EventType>(false,
+ LibWindowmanager::Event_Active);
+}
+} // namespace
+
+/// object will be json_object_put
+int LibWindowmanager::Impl::api_call(
+ const char *verb, json_object *object,
+ const std::function<void(bool, json_object *)> &onReply) {
+ TRACE();
+
+ int rc = 0;
+ if ((0 == strcmp("RequestSurface", verb)) ||
+ (0 == strcmp("GetDisplayInfo", verb)) ||
+ (0 == strcmp("GetAreaInfo", verb))) {
+ // We need to wrap the actual onReply call once in order to
+ // *look* like a normal functions pointer (std::functions<>
+ // with captures cannot convert to function pointers).
+ // Alternatively we could setup a local struct and use it as
+ // closure, but I think it is cleaner this way.
+ int call_rc = 0;
+ std::atomic<bool> returned{};
+ returned.store(false, std::memory_order_relaxed);
+ std::function<void(bool, json_object *)> wrappedOnReply =
+ [&returned, &call_rc, &onReply](bool ok, json_object *j) {
+ TRACEN(wrappedOnReply);
+ call_rc = ok ? 0 : -EINVAL;
+ // We know it failed, but there may be an explanation in the
+ // json object.
+ {
+ TRACEN(onReply);
+ onReply(ok, j);
+ }
+ returned.store(true, std::memory_order_release);
+ };
+
+ // make the actual call, use wrappedOnReply as closure
+ rc = afb_wsj1_call_j(
+ this->wsj1, wmAPI, verb, object,
+ [](void *closure, afb_wsj1_msg *msg) {
+ TRACEN(callClosure);
+ auto *onReply =
+ reinterpret_cast<std::function<void(bool, json_object *)> *>(
+ closure);
+ (*onReply)(!(afb_wsj1_msg_is_reply_ok(msg) == 0),
+ afb_wsj1_msg_object_j(msg));
+ },
+ &wrappedOnReply);
+
+ if (0 == rc) {
+ // We need to wait until "returned" got set, this is necessary
+ // if events get triggered by the call (and would be dispatched before
+ // the actual call-reply).
+ while (!returned.load(std::memory_order_consume)) {
+ sd_event_run(loop, 16);
+ }
+
+ // return the actual API call result
+ rc = call_rc;
+ }
+ }
+ else {
+ rc = afb_wsj1_call_j(this->wsj1, wmAPI, verb, object, _on_reply_static, this);
+ }
+
+ if (rc < 0) {
+ HMI_ERROR("libwm", "calling %s/%s failed: %m", wmAPI, verb);
+ }
+
+ return rc;
+}
+
+void LibWindowmanager::Impl::setEventHandler(const WMHandler &wmh)
+{
+ // Subscribe
+ const char* ev = "event";
+ if(wmh.on_visible != nullptr) {
+ struct json_object* j = json_object_new_object();
+ json_object_object_add(j, ev, json_object_new_int(Event_Visible));
+ struct json_object* j_i = json_object_new_object();
+ json_object_object_add(j_i, ev, json_object_new_int(Event_Invisible));
+
+ int ret = afb_wsj1_call_j(this->wsj1, wmAPI, "wm_subscribe", j, _on_reply_static, this);
+ if (0 > ret) {
+ HMI_ERROR("libwm", "Failed to subscribe event visible");
+ }
+ ret = afb_wsj1_call_j(this->wsj1, wmAPI, "wm_subscribe", j_i, _on_reply_static, this);
+ if (0 > ret) {
+ HMI_ERROR("libwm", "Failed to subscribe event");
+ }
+ }
+
+ if(wmh.on_active != nullptr) {
+ struct json_object* j = json_object_new_object();
+ json_object_object_add(j, ev, json_object_new_int(Event_Active));
+ struct json_object* j_i = json_object_new_object();
+ json_object_object_add(j_i, ev, json_object_new_int(Event_Inactive));
+
+ int ret = afb_wsj1_call_j(this->wsj1, wmAPI, "wm_subscribe", j, _on_reply_static, this);
+ if (0 > ret) {
+ HMI_ERROR("libwm", "Failed to subscribe event active");
+ }
+ ret = afb_wsj1_call_j(this->wsj1, wmAPI, "wm_subscribe", j_i, _on_reply_static, this);
+ if (0 > ret) {
+ HMI_ERROR("libwm", "Failed to subscribe event");
+ }
+ }
+
+ if(wmh.on_sync_draw != nullptr) {
+ struct json_object* j = json_object_new_object();
+ json_object_object_add(j, ev, json_object_new_int(Event_SyncDraw));
+
+ int ret = afb_wsj1_call_j(this->wsj1, wmAPI, "wm_subscribe", j, _on_reply_static, this);
+ if (0 > ret) {
+ HMI_ERROR("libwm", "Failed to subscribe event active");
+ }
+ }
+
+ if(wmh.on_flush_draw != nullptr) {
+ struct json_object* j = json_object_new_object();
+ json_object_object_add(j, ev, json_object_new_int(Event_FlushDraw));
+
+ int ret = afb_wsj1_call_j(this->wsj1, wmAPI, "wm_subscribe", j, _on_reply_static, this);
+ if (0 > ret) {
+ HMI_ERROR("libwm", "Failed to subscribe event active");
+ }
+ }
+
+ if(wmh.on_screen_updated != nullptr) {
+ struct json_object* j = json_object_new_object();
+ json_object_object_add(j, ev, json_object_new_int(Event_ScreenUpdated));
+
+ int ret = afb_wsj1_call_j(this->wsj1, wmAPI, "wm_subscribe", j, _on_reply_static, this);
+ if (0 > ret) {
+ HMI_ERROR("libwm", "Failed to subscribe event active");
+ }
+ }
+
+ if(wmh.on_headlamp_off != nullptr) {
+ struct json_object* j = json_object_new_object();
+ json_object_object_add(j, ev, json_object_new_int(Event_HeadlampOff));
+
+ int ret = afb_wsj1_call_j(this->wsj1, wmAPI, "wm_subscribe", j, _on_reply_static, this);
+ if (0 > ret) {
+ HMI_ERROR("libwm", "Failed to subscribe event active");
+ }
+ }
+
+ if(wmh.on_headlamp_on != nullptr) {
+ struct json_object* j = json_object_new_object();
+ json_object_object_add(j, ev, json_object_new_int(Event_HeadlampOn));
+
+ int ret = afb_wsj1_call_j(this->wsj1, wmAPI, "wm_subscribe", j, _on_reply_static, this);
+ if (0 > ret) {
+ HMI_ERROR("libwm", "Failed to subscribe event active");
+ }
+ }
+
+ if(wmh.on_parking_brake_off != nullptr) {
+ struct json_object* j = json_object_new_object();
+ json_object_object_add(j, ev, json_object_new_int(Event_ParkingBrakeOff));
+
+ int ret = afb_wsj1_call_j(this->wsj1, wmAPI, "wm_subscribe", j, _on_reply_static, this);
+ if (0 > ret) {
+ HMI_ERROR("libwm", "Failed to subscribe event active");
+ }
+ }
+
+ if(wmh.on_parking_brake_on != nullptr) {
+ struct json_object* j = json_object_new_object();
+ json_object_object_add(j, ev, json_object_new_int(Event_ParkingBrakeOn));
+
+ int ret = afb_wsj1_call_j(this->wsj1, wmAPI, "wm_subscribe", j, _on_reply_static, this);
+ if (0 > ret) {
+ HMI_ERROR("libwm", "Failed to subscribe event active");
+ }
+ }
+
+ if(wmh.on_lightstatus_brake_off != nullptr) {
+ struct json_object* j = json_object_new_object();
+ json_object_object_add(j, ev, json_object_new_int(Event_LightstatusBrakeOff));
+
+ int ret = afb_wsj1_call_j(this->wsj1, wmAPI, "wm_subscribe", j, _on_reply_static, this);
+ if (0 > ret) {
+ HMI_ERROR("libwm", "Failed to subscribe event active");
+ }
+ }
+
+ if(wmh.on_lightstatus_brake_on != nullptr) {
+ struct json_object* j = json_object_new_object();
+ json_object_object_add(j, ev, json_object_new_int(Event_LightstatusBrakeOn));
+
+ int ret = afb_wsj1_call_j(this->wsj1, wmAPI, "wm_subscribe", j, _on_reply_static, this);
+ if (0 > ret) {
+ HMI_ERROR("libwm", "Failed to subscribe event active");
+ }
+ }
+
+ if(wmh.on_car_stop != nullptr) {
+ struct json_object* j = json_object_new_object();
+ json_object_object_add(j, ev, json_object_new_int(Event_CarStop));
+
+ int ret = afb_wsj1_call_j(this->wsj1, wmAPI, "wm_subscribe", j, _on_reply_static, this);
+ if (0 > ret) {
+ HMI_ERROR("libwm", "Failed to subscribe event active");
+ }
+ }
+
+ if(wmh.on_car_run != nullptr) {
+ struct json_object* j = json_object_new_object();
+ json_object_object_add(j, ev, json_object_new_int(Event_CarRun));
+
+ int ret = afb_wsj1_call_j(this->wsj1, wmAPI, "wm_subscribe", j, _on_reply_static, this);
+ if (0 > ret) {
+ HMI_ERROR("libwm", "Failed to subscribe event active");
+ }
+ }
+
+ // Register
+ this->_wmh.on_visible = wmh.on_visible;
+ this->_wmh.on_active = wmh.on_active;
+ this->_wmh.on_sync_draw = wmh.on_sync_draw;
+ this->_wmh.on_flush_draw = wmh.on_flush_draw;
+ this->_wmh.on_screen_updated = wmh.on_screen_updated;
+ this->_wmh.on_headlamp_off = wmh.on_headlamp_off;
+ this->_wmh.on_headlamp_on = wmh.on_headlamp_on;
+ this->_wmh.on_parking_brake_off = wmh.on_parking_brake_off;
+ this->_wmh.on_parking_brake_on = wmh.on_parking_brake_on;
+ this->_wmh.on_lightstatus_brake_off = wmh.on_lightstatus_brake_off;
+ this->_wmh.on_lightstatus_brake_on = wmh.on_lightstatus_brake_on;
+ this->_wmh.on_car_stop = wmh.on_car_stop;
+ this->_wmh.on_car_run = wmh.on_car_run;
+}
+
+void LibWindowmanager::Impl::event(char const *et, json_object *object) {
+ TRACE();
+ auto oet = make_event_type(et);
+ if (!oet.first) {
+ HMI_ERROR("libwm", "Unknown event type string '%s'", et);
+ return;
+ }
+ json_object *j_val;
+ std::string role = "";
+ bool emit = false;
+ if(json_object_object_get_ex(object, g_kKeyDrawingName, &j_val)) {
+ role = json_object_get_string(j_val);
+ }
+ if (this->labels.find(role) != this->labels.end()){
+ emit = true;
+ }
+
+ switch(oet.second) {
+ case Event_Active :
+ case Event_Inactive : {
+ bool active = ((oet.second == Event_Active) ? true : false);
+ if(!emit) break;
+ if(this->_wmh.on_active) {
+ return this->_wmh.on_active(role.c_str(), active);
+ }
+ break;
+ }
+ case Event_Visible :
+ case Event_Invisible : {
+ bool visible = ((oet.second == Event_Visible) ? true : false);
+ if(!emit) break;
+ if(this->_wmh.on_visible) {
+ return this->_wmh.on_visible(role.c_str(), visible);
+ }
+ break;
+ }
+ case Event_SyncDraw :
+ if(this->_wmh.on_sync_draw && emit) {
+ json_object_object_get_ex(object, g_kKeyDrawingArea, &j_val);
+ const char* area = json_object_get_string(j_val);
+ json_object *j_rect;
+ json_object_object_get_ex(object, g_kKeyDrawingRect, &j_rect);
+ json_object_object_get_ex(j_rect, "x", &j_val);
+ int x = json_object_get_int(j_val);
+ json_object_object_get_ex(j_rect, "y", &j_val);
+ int y = json_object_get_int(j_val);
+ json_object_object_get_ex(j_rect, "width", &j_val);
+ int w = json_object_get_int(j_val);
+ json_object_object_get_ex(j_rect, "height", &j_val);
+ int h = json_object_get_int(j_val);
+ Rect rect(x, y, w, h);
+ return this->_wmh.on_sync_draw(role.c_str(), area, rect);
+ }
+ break;
+ case Event_FlushDraw :
+ if(this->_wmh.on_flush_draw && emit) {
+ return this->_wmh.on_flush_draw(role.c_str());
+ }
+ break;
+ case Event_ScreenUpdated :
+ if(this->_wmh.on_screen_updated) {
+ // emit this case
+ json_object_object_get_ex(object, "ids", &j_val);
+ int len = json_object_array_length(j_val);
+ std::vector<std::string> id_list;
+ for(int i = 0; i < len; i++)
+ {
+ std::string elem = json_object_get_string(json_object_array_get_idx(j_val, i));
+ id_list.push_back(elem);
+ }
+ return this->_wmh.on_screen_updated(id_list);
+ }
+ break;
+ default :
+ break;
+ }
+
+ auto i = this->handlers.find(oet.second);
+ if (i != this->handlers.end()) {
+ json_object *val;
+ const char *label;
+ if (json_object_object_get_ex(object, g_kKeyDrawingName, &val)) {
+ label = json_object_get_string(val);
+ }
+ else {
+ i->second(object);
+ return;
+ }
+
+ if (this->labels.find(label) != this->labels.end()) {
+ i->second(object);
+ }
+ }
+}
+
+void LibWindowmanager::Impl::event(char const *et) {
+ TRACE();
+ auto oet = make_event_type(et);
+ if (!oet.first) {
+ HMI_ERROR("libwm", "Unknown event type string '%s'", et);
+ return;
+ }
+
+ switch(oet.second) {
+ case Event_HeadlampOff:
+ if(this->_wmh.on_headlamp_off) {
+ return this->_wmh.on_headlamp_off(nullptr);
+ }
+ break;
+ case Event_HeadlampOn:
+ if(this->_wmh.on_headlamp_on) {
+ return this->_wmh.on_headlamp_on(nullptr);
+ }
+ break;
+ case Event_ParkingBrakeOff:
+ if(this->_wmh.on_parking_brake_off) {
+ return this->_wmh.on_parking_brake_off(nullptr);
+ }
+ break;
+ case Event_ParkingBrakeOn:
+ if(this->_wmh.on_parking_brake_on) {
+ return this->_wmh.on_parking_brake_on(nullptr);
+ }
+ break;
+ case Event_LightstatusBrakeOff:
+ if(this->_wmh.on_lightstatus_brake_off) {
+ return this->_wmh.on_lightstatus_brake_off(nullptr);
+ }
+ break;
+ case Event_LightstatusBrakeOn:
+ if(this->_wmh.on_lightstatus_brake_on) {
+ return this->_wmh.on_lightstatus_brake_on(nullptr);
+ }
+ break;
+ case Event_CarStop:
+ if(this->_wmh.on_car_stop) {
+ return this->_wmh.on_car_stop(nullptr);
+ }
+ break;
+ case Event_CarRun:
+ if(this->_wmh.on_car_run) {
+ return this->_wmh.on_car_run(nullptr);
+ }
+ break;
+ default :
+ break;
+ }
+
+ auto i = this->handlers.find(oet.second);
+ if (i != this->handlers.end()) {
+ i->second(nullptr);
+ }
+}
+
+static void *event_loop_run(void *args){
+ struct sd_event* loop = (struct sd_event*)(args);
+ for(;;)
+ sd_event_run(loop, 30000000);
+}
+
+int LibWindowmanager::Impl::runEventLoop() {
+ if(this->wsj1 && this->loop)
+ {
+ pthread_t thread_id;
+ int ret = pthread_create(&thread_id, NULL, event_loop_run, this->loop);
+ if(ret != 0)
+ {
+ HMI_ERROR("libwm", "Cannot run eventloop due to error:%d", errno);
+ return -1;
+ }
+ else
+ return thread_id;
+ }
+ else
+ {
+ HMI_ERROR("libwm", "Connecting is not established yet");
+ return -1;
+ }
+}
+
+/**
+ * @class LibWindowmanager
+ */
+int LibWindowmanager::init(int port, char const *token) {
+ int ret = this->d->init(port, token);
+ if(ret == 0) {
+ json_object* j = json_object_new_object();
+ ret = this->getDisplayInfo(j); // return 0 if success
+ json_object_put(j);
+ }
+ return ret;
+}
+
+int LibWindowmanager::init(int port, const std::string &token) {
+ int ret = this->d->init(port, token.c_str());
+ if(ret == 0) {
+ json_object* j = json_object_new_object();
+ ret = this->getDisplayInfo(j); // return 0 if success
+ json_object_put(j);
+ }
+ return ret;
+}
+
+int LibWindowmanager::requestSurface(json_object *object) {
+ return this->d->requestSurface(object);
+}
+
+int LibWindowmanager::requestSurface(const char *role) {
+ json_object* object = json_object_new_object();
+ json_object_object_add(object, kKeyDrawingName, json_object_new_string(role));
+ return this->d->requestSurface(object);
+}
+
+int LibWindowmanager::requestSurfaceXDG(json_object *object) {
+ return this->d->requestSurfaceXDG(object);
+}
+
+int LibWindowmanager::requestSurfaceXDG(const char* role, unsigned ivi_id) {
+ json_object* object = json_object_new_object();
+ json_object_object_add(object, kKeyDrawingName, json_object_new_string(role));
+ json_object_object_add(object, kKeyIviId, json_object_new_int(ivi_id));
+ return this->d->requestSurfaceXDG(object);
+}
+
+int LibWindowmanager::activateWindow(json_object *object) {
+ return this->d->activateWindow(object);
+}
+
+int LibWindowmanager::activateWindow(const char* role, const char* area) {
+ json_object* object = json_object_new_object();
+ json_object_object_add(object, kKeyDrawingName, json_object_new_string(role));
+ json_object_object_add(object, kKeyDrawingArea, json_object_new_string(area));
+ return this->d->activateWindow(object);
+}
+
+int LibWindowmanager::activateWindow(const char* role) {
+ json_object* object = json_object_new_object();
+ json_object_object_add(object, kKeyDrawingName, json_object_new_string(role));
+ json_object_object_add(object, kKeyDrawingArea, json_object_new_string(kDefaultArea.c_str()));
+ return this->d->activateWindow(object);
+}
+
+int LibWindowmanager::deactivateWindow(json_object *object) {
+ return this->d->deactivateWindow(object);
+}
+
+int LibWindowmanager::deactivateWindow(const char* role) {
+ json_object* object = json_object_new_object();
+ json_object_object_add(object, kKeyDrawingName, json_object_new_string(role));
+ return this->d->deactivateWindow(nullptr);
+}
+
+// This API is deprecated, please use new API
+int LibWindowmanager::activateSurface(json_object *object) {
+ return this->activateWindow(object);
+}
+
+// This API is deprecated, please use new API
+int LibWindowmanager::deactivateSurface(json_object *object) {
+ return this->deactivateWindow(object);
+}
+
+int LibWindowmanager::endDraw(json_object *object) {
+ return this->d->endDraw(object);
+}
+
+int LibWindowmanager::endDraw(const char* role) {
+ json_object* object = json_object_new_object();
+ json_object_object_add(object, kKeyDrawingName, json_object_new_string(role));
+ return this->d->endDraw(object);
+}
+
+int LibWindowmanager::getDisplayInfo(json_object *object) {
+ return this->d->getDisplayInfo(object);
+}
+
+int LibWindowmanager::getAreaInfo(json_object *in_obj, json_object *out_obj) {
+ return this->d->getAreaInfo(in_obj, out_obj);
+}
+
+int LibWindowmanager::getAreaInfo(const char *role, Rect *out_rect) {
+ json_object *object = json_object_new_object();
+ json_object *out = json_object_new_object();
+ json_object_object_add(object, this->kKeyDrawingName, json_object_new_string(role));
+ int ret = this->d->getAreaInfo(object, out);
+
+ out_rect->set_left(0);
+ out_rect->set_top(0);
+ out_rect->set_width(0);
+ out_rect->set_height(0);
+
+ if(!ret) {
+ json_object *j_val;
+ json_object *j_rect;
+ json_object_object_get_ex(out, kKeyDrawingRect, &j_rect);
+ if (json_object_object_get_ex(j_rect, "x", &j_val)) {
+ out_rect->set_left(json_object_get_int(j_val));
+ }
+ if (json_object_object_get_ex(j_rect, "y", &j_val)) {
+ out_rect->set_top(json_object_get_int(j_val));
+ }
+ if (json_object_object_get_ex(j_rect, "width", &j_val)) {
+ out_rect->set_width(json_object_get_int(j_val));
+ }
+ if (json_object_object_get_ex(j_rect, "height", &j_val)) {
+ out_rect->set_height(json_object_get_int(j_val));
+ }
+ }
+ return ret;
+}
+
+int LibWindowmanager::getAreaInfo(const char *label, json_object *out_obj) {
+ json_object *object = json_object_new_object();
+ json_object_object_add(object, this->kKeyDrawingName, json_object_new_string(label));
+ return this->d->getAreaInfo(object, out_obj);
+}
+
+void LibWindowmanager::set_event_handler(enum EventType et, handler_fun f) {
+ return this->d->set_event_handler(et, std::move(f));
+}
+
+struct Screen LibWindowmanager::getScreenInfo() {
+ return this->d->getScreenInfo();
+}
+
+void LibWindowmanager::setEventHandler(const WMHandler &wml)
+{
+ return this->d->setEventHandler(wml);
+}
+
+LibWindowmanager::LibWindowmanager() : d(new Impl) {}
+
+LibWindowmanager::~LibWindowmanager() { delete d; }
+
+WMHandler::WMHandler()
+ : on_visible(nullptr),
+ on_active(nullptr),
+ on_sync_draw(nullptr),
+ on_flush_draw(nullptr),
+ on_screen_updated(nullptr),
+ on_headlamp_off(nullptr),
+ on_headlamp_on(nullptr),
+ on_parking_brake_off(nullptr),
+ on_parking_brake_on(nullptr),
+ on_lightstatus_brake_off(nullptr),
+ on_lightstatus_brake_on(nullptr),
+ on_car_stop(nullptr),
+ on_car_run(nullptr)
+{}
diff --git a/demo#3/common/libwindowmanager/src/libwindowmanager.h b/demo#3/common/libwindowmanager/src/libwindowmanager.h
new file mode 100644
index 0000000..e963798
--- /dev/null
+++ b/demo#3/common/libwindowmanager/src/libwindowmanager.h
@@ -0,0 +1,168 @@
+/*
+ * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef LIBWINDOWMANAGER_H
+#define LIBWINDOWMANAGER_H
+
+#include <functional>
+#include <vector>
+#include <string>
+#include <json-c/json.h>
+
+class Rect {
+ public:
+ Rect() : _x(0), _y(0),_w(0), _h(0) {}
+ Rect(unsigned x, unsigned y, unsigned w, unsigned h)
+ : _x(x), _y(y),_w(w), _h(h) {}
+ ~Rect() = default;
+ unsigned left() const { return _x;}
+ unsigned top() const { return _y;}
+ unsigned width() const { return _w;}
+ unsigned height() const { return _h;}
+ void set_left (unsigned int x) { _x = x; }
+ void set_top (unsigned int y) { _y = y; }
+ void set_width (unsigned int w) { _w = w; }
+ void set_height(unsigned int h) { _h = h; }
+ private:
+ unsigned _x;
+ unsigned _y;
+ unsigned _w;
+ unsigned _h;
+};
+
+struct Screen
+{
+ unsigned long width_dp;
+ unsigned long height_dp;
+ unsigned long width_mm;
+ unsigned long height_mm;
+ double scale = 1.0;
+};
+
+class WMHandler {
+ public:
+ WMHandler();
+ ~WMHandler() = default;
+
+ using visible_handler = std::function<void(const char*, bool visible)>;
+ using active_handler = std::function<void(const char*, bool active)>;
+ using sync_draw_handler = std::function<void(const char*, const char*, Rect)>;
+ using flush_draw_handler= std::function<void(const char*)>;
+ using screen_updated_handler = std::function<void(const std::vector<std::string>&)>;
+ using car_event_handler= std::function<void(const char*)>;
+
+ visible_handler on_visible;
+ active_handler on_active;
+ sync_draw_handler on_sync_draw;
+ flush_draw_handler on_flush_draw;
+ screen_updated_handler on_screen_updated;
+ car_event_handler on_headlamp_off;
+ car_event_handler on_headlamp_on;
+ car_event_handler on_parking_brake_off;
+ car_event_handler on_parking_brake_on;
+ car_event_handler on_lightstatus_brake_off;
+ car_event_handler on_lightstatus_brake_on;
+ car_event_handler on_car_stop;
+ car_event_handler on_car_run;
+};
+
+class LibWindowmanager {
+public:
+ LibWindowmanager();
+ ~LibWindowmanager();
+
+ LibWindowmanager(const LibWindowmanager &) = delete;
+ LibWindowmanager &operator=(const LibWindowmanager &) = delete;
+
+ using handler_fun = std::function<void(json_object *)>;
+
+ /* DrawingArea name (usage: {layout}.{area}) */
+ const std::string kDefaultArea = "normal.full";
+ const std::string kStrLayoutNormal = "normal";
+ const std::string kStrLayoutSplit = "split";
+ const std::string kStrAreaFull = "full";
+ const std::string kStrAreaMain = "main";
+ const std::string kStrAreaSub = "sub";
+
+ /* Key for json obejct */
+ const char *kKeyDrawingName = "drawing_name";
+ const char *kKeyDrawingArea = "drawing_area";
+ const char *kKeyDrawingRect = "drawing_rect";
+ const char *kKeyIviId = "ivi_id";
+
+ enum EventType {
+ Event_Active = 0,
+ Event_Inactive,
+
+ Event_Visible,
+ Event_Invisible,
+
+ Event_SyncDraw,
+ Event_FlushDraw,
+
+ Event_ScreenUpdated,
+
+ Event_HeadlampOff,
+ Event_HeadlampOn,
+
+ Event_ParkingBrakeOff,
+ Event_ParkingBrakeOn,
+
+ Event_LightstatusBrakeOff,
+ Event_LightstatusBrakeOn,
+
+ Event_CarStop,
+ Event_CarRun,
+
+ Event_Error,
+
+ Event_Val_Max = Event_Error
+ };
+
+ int init(int port, char const *token);
+ int init(int port, const std::string &token);
+
+ // WM API
+ int requestSurface(const char* role);
+ int requestSurfaceXDG(const char* role, unsigned ivi_id);
+ int activateWindow(const char* role, const char* area);
+ int activateWindow(const char* role);
+ int deactivateWindow(const char* role);
+ int endDraw(const char* role);
+ struct Screen getScreenInfo();
+ int getAreaInfo(const char* role, Rect *out_rect);
+ void setEventHandler(const WMHandler& wmh);
+
+ // Backward Compatible API
+ int requestSurface(json_object *object);
+ int requestSurfaceXDG(json_object *object);
+ int activateWindow(json_object *object);
+ int deactivateWindow(json_object *object);
+ int endDraw(json_object *object);
+ int getDisplayInfo(json_object *object);
+ int getAreaInfo(json_object *in_obj, json_object *out_obj);
+ int getAreaInfo(const char *label, json_object *out_obj);
+ void set_event_handler(enum EventType et, handler_fun f);
+
+ // These APIs are deprecated, please use new API
+ THIS_FUNCTION_IS_DEPRECATED(int activateSurface(json_object *object));
+ THIS_FUNCTION_IS_DEPRECATED(int deactivateSurface(json_object *object));
+ class Impl;
+
+private:
+ Impl *const d;
+};
+#endif // LIBWINDOWMANAGER_H