From ce253994af37137d4c29221e7914f437c3dcb510 Mon Sep 17 00:00:00 2001 From: Kazumasa Mitsunari Date: Mon, 2 Oct 2017 16:22:02 +0900 Subject: Add agl-service-soundmanager-2017 Add a new binding agl-service-soundmanager-2017. A image about this see JIRA SPEC-916 Packaging via cmake [PatchSet3] Pass to afb-binding version 2 Fix typo Fix libsoundmanager bug [PatchSet4] Modified commit message [PatchSet5] Re-add root CMakeLists.txt Prevent memory leak of json object Bug-AGL: SPEC-926 Change-Id: I24c0280210777778c379ac7027f3d71fa28d6d85 Signed-off-by: Kazumasa Mitsunari --- CMakeLists.txt | 46 + LICENSE | 54 + README.md | 4 + cmake/modules/Findgtest.cmake | 38 + conf/audiomanager-config-sample/configuration.xml | 545 ++ .../configuration_v3.xml | 545 ++ conf/soundmanager-dbus.conf | 18 + doc/ApplicationGuide.md | 330 + doc/Display_Audio_Transition1.md | 123 + doc/Display_Audio_Transition2.md | 333 + doc/api-ref/html/annotated.html | 103 + doc/api-ref/html/annotated_dup.js | 5 + doc/api-ref/html/bc_s.png | Bin 0 -> 676 bytes doc/api-ref/html/bdwn.png | Bin 0 -> 147 bytes doc/api-ref/html/class_lib_soundmanager.html | 532 ++ doc/api-ref/html/class_lib_soundmanager.js | 15 + doc/api-ref/html/classes.html | 107 + doc/api-ref/html/closed.png | Bin 0 -> 132 bytes .../html/dir_4ed4f07a8451d34bdd1d92ed62b81ed4.html | 104 + .../html/dir_4ed4f07a8451d34bdd1d92ed62b81ed4.js | 4 + .../html/dir_574c53d22ed4def281d320d129dd43c9.html | 106 + .../html/dir_574c53d22ed4def281d320d129dd43c9.js | 5 + .../html/dir_85932083476b47061c69d172796990a3.html | 104 + .../html/dir_85932083476b47061c69d172796990a3.js | 4 + .../html/dir_b967abc00200c877344b4504e6cbcf3f.html | 108 + .../html/dir_b967abc00200c877344b4504e6cbcf3f.js | 6 + .../html/dir_c2dc0533631c44dc5d574e7be055c656.html | 104 + .../html/dir_c2dc0533631c44dc5d574e7be055c656.js | 4 + doc/api-ref/html/doc.png | Bin 0 -> 746 bytes doc/api-ref/html/doxygen.css | 1596 ++++ doc/api-ref/html/doxygen.png | Bin 0 -> 3779 bytes doc/api-ref/html/dynsections.js | 104 + doc/api-ref/html/files.html | 110 + doc/api-ref/html/files.js | 4 + doc/api-ref/html/folderclosed.png | Bin 0 -> 616 bytes doc/api-ref/html/folderopen.png | Bin 0 -> 597 bytes doc/api-ref/html/functions.html | 137 + doc/api-ref/html/functions_func.html | 131 + doc/api-ref/html/functions_vars.html | 101 + doc/api-ref/html/globals.html | 146 + doc/api-ref/html/globals_defs.html | 128 + doc/api-ref/html/globals_func.html | 104 + doc/api-ref/html/globals_vars.html | 104 + doc/api-ref/html/index.html | 97 + doc/api-ref/html/jquery.js | 87 + doc/api-ref/html/libsoundmanager_8cpp.html | 178 + doc/api-ref/html/libsoundmanager_8cpp.js | 5 + doc/api-ref/html/libsoundmanager_8cpp_source.html | 116 + doc/api-ref/html/libsoundmanager_8hpp.html | 158 + doc/api-ref/html/libsoundmanager_8hpp.js | 6 + doc/api-ref/html/libsoundmanager_8hpp_source.html | 103 + doc/api-ref/html/menu.js | 26 + doc/api-ref/html/menudata.js | 16 + doc/api-ref/html/nav_f.png | Bin 0 -> 153 bytes doc/api-ref/html/nav_g.png | Bin 0 -> 95 bytes doc/api-ref/html/nav_h.png | Bin 0 -> 98 bytes doc/api-ref/html/navtree.css | 146 + doc/api-ref/html/navtree.js | 517 ++ doc/api-ref/html/navtreedata.js | 31 + doc/api-ref/html/navtreeindex0.js | 61 + doc/api-ref/html/open.png | Bin 0 -> 123 bytes doc/api-ref/html/resize.js | 114 + doc/api-ref/html/search/all_0.html | 26 + doc/api-ref/html/search/all_0.js | 4 + doc/api-ref/html/search/all_1.html | 26 + doc/api-ref/html/search/all_1.js | 9 + doc/api-ref/html/search/all_2.html | 26 + doc/api-ref/html/search/all_2.js | 6 + doc/api-ref/html/search/all_3.html | 26 + doc/api-ref/html/search/all_3.js | 4 + doc/api-ref/html/search/all_4.html | 26 + doc/api-ref/html/search/all_4.js | 6 + doc/api-ref/html/search/all_5.html | 26 + doc/api-ref/html/search/all_5.js | 6 + doc/api-ref/html/search/all_6.html | 26 + doc/api-ref/html/search/all_6.js | 5 + doc/api-ref/html/search/all_7.html | 26 + doc/api-ref/html/search/all_7.js | 4 + doc/api-ref/html/search/all_8.html | 26 + doc/api-ref/html/search/all_8.js | 7 + doc/api-ref/html/search/all_9.html | 26 + doc/api-ref/html/search/all_9.js | 6 + doc/api-ref/html/search/all_a.html | 26 + doc/api-ref/html/search/all_a.js | 8 + doc/api-ref/html/search/all_b.html | 26 + doc/api-ref/html/search/all_b.js | 4 + doc/api-ref/html/search/all_c.html | 26 + doc/api-ref/html/search/all_c.js | 4 + doc/api-ref/html/search/all_d.html | 26 + doc/api-ref/html/search/all_d.js | 4 + doc/api-ref/html/search/classes_0.html | 26 + doc/api-ref/html/search/classes_0.js | 4 + doc/api-ref/html/search/classes_1.html | 26 + doc/api-ref/html/search/classes_1.js | 4 + doc/api-ref/html/search/close.png | Bin 0 -> 273 bytes doc/api-ref/html/search/defines_0.html | 26 + doc/api-ref/html/search/defines_0.js | 4 + doc/api-ref/html/search/defines_1.html | 26 + doc/api-ref/html/search/defines_1.js | 6 + doc/api-ref/html/search/defines_2.html | 26 + doc/api-ref/html/search/defines_2.js | 4 + doc/api-ref/html/search/defines_3.html | 26 + doc/api-ref/html/search/defines_3.js | 4 + doc/api-ref/html/search/defines_4.html | 26 + doc/api-ref/html/search/defines_4.js | 4 + doc/api-ref/html/search/defines_5.html | 26 + doc/api-ref/html/search/defines_5.js | 4 + doc/api-ref/html/search/defines_6.html | 26 + doc/api-ref/html/search/defines_6.js | 4 + doc/api-ref/html/search/defines_7.html | 26 + doc/api-ref/html/search/defines_7.js | 5 + doc/api-ref/html/search/files_0.html | 26 + doc/api-ref/html/search/files_0.js | 5 + doc/api-ref/html/search/files_1.html | 26 + doc/api-ref/html/search/files_1.js | 4 + doc/api-ref/html/search/files_2.html | 26 + doc/api-ref/html/search/files_2.js | 4 + doc/api-ref/html/search/functions_0.html | 26 + doc/api-ref/html/search/functions_0.js | 5 + doc/api-ref/html/search/functions_1.html | 26 + doc/api-ref/html/search/functions_1.js | 5 + doc/api-ref/html/search/functions_2.html | 26 + doc/api-ref/html/search/functions_2.js | 4 + doc/api-ref/html/search/functions_3.html | 26 + doc/api-ref/html/search/functions_3.js | 4 + doc/api-ref/html/search/functions_4.html | 26 + doc/api-ref/html/search/functions_4.js | 7 + doc/api-ref/html/search/functions_5.html | 26 + doc/api-ref/html/search/functions_5.js | 5 + doc/api-ref/html/search/functions_6.html | 26 + doc/api-ref/html/search/functions_6.js | 4 + doc/api-ref/html/search/functions_7.html | 26 + doc/api-ref/html/search/functions_7.js | 4 + doc/api-ref/html/search/functions_8.html | 26 + doc/api-ref/html/search/functions_8.js | 4 + doc/api-ref/html/search/mag_sel.png | Bin 0 -> 563 bytes doc/api-ref/html/search/nomatches.html | 12 + doc/api-ref/html/search/search.css | 271 + doc/api-ref/html/search/search.js | 791 ++ doc/api-ref/html/search/search_l.png | Bin 0 -> 604 bytes doc/api-ref/html/search/search_m.png | Bin 0 -> 158 bytes doc/api-ref/html/search/search_r.png | Bin 0 -> 612 bytes doc/api-ref/html/search/searchdata.js | 30 + doc/api-ref/html/search/variables_0.html | 26 + doc/api-ref/html/search/variables_0.js | 4 + doc/api-ref/html/search/variables_1.html | 26 + doc/api-ref/html/search/variables_1.js | 5 + doc/api-ref/html/search/variables_2.html | 26 + doc/api-ref/html/search/variables_2.js | 4 + doc/api-ref/html/search/variables_3.html | 26 + doc/api-ref/html/search/variables_3.js | 4 + doc/api-ref/html/soundmanager_8c.html | 334 + doc/api-ref/html/soundmanager_8c.js | 15 + doc/api-ref/html/soundmanager_8c_source.html | 110 + doc/api-ref/html/splitbar.png | Bin 0 -> 314 bytes doc/api-ref/html/structevent.html | 147 + doc/api-ref/html/structevent.js | 5 + doc/api-ref/html/sync_off.png | Bin 0 -> 853 bytes doc/api-ref/html/sync_on.png | Bin 0 -> 845 bytes doc/api-ref/html/tab_a.png | Bin 0 -> 142 bytes doc/api-ref/html/tab_b.png | Bin 0 -> 169 bytes doc/api-ref/html/tab_h.png | Bin 0 -> 177 bytes doc/api-ref/html/tab_s.png | Bin 0 -> 184 bytes doc/api-ref/html/tabs.css | 1 + doc/api-ref/html/test_8cpp.html | 173 + doc/api-ref/html/test_8cpp.js | 5 + doc/api-ref/html/test_8cpp_source.html | 106 + doc/parts/am-component.png | Bin 0 -> 90431 bytes doc/parts/seq_changevolume.svg | 117 + doc/parts/seq_connectsoundroute.svg | 145 + doc/parts/seq_disconnectsoundroute.svg | 110 + doc/parts/seq_initialization.svg | 129 + doc/parts/seq_registration.svg | 235 + doc/parts/seq_releasesoundmode.svg | 119 + doc/parts/seq_requestsoundmode.svg | 165 + doc/parts/seq_setmutestate.svg | 115 + doc/parts/seq_startsoundstreaming.svg | 129 + doc/parts/seq_startup.svg | 68 + doc/parts/seq_stopsoundstreaming.svg | 129 + doc/parts/software-stack.png | Bin 0 -> 41677 bytes doc/parts/software-stack2.png | Bin 0 -> 26849 bytes doc/parts/typical-usecase.png | Bin 0 -> 256665 bytes doc/parts/typical-usecase2.png | Bin 0 -> 230655 bytes include/CMakeLists.txt | 18 + include/libsoundmanager.hpp | 95 + libsoundmanager/CMakeLists.txt | 48 + libsoundmanager/libsoundmanager.cpp | 676 ++ package/root/config.xml | 20 + package/root/icon.svg | 283 + scripts/call-sm-binding-method_test.sh | 17 + scripts/dbus-call-connect-test.sh | 12 + scripts/dbus-call-test.sh | 17 + scripts/sm-binding-test-gdb.sh | 21 + scripts/sm-binding-test.sh | 21 + soundmanager.pc.in | 12 + src/CMakeLists.txt | 65 + src/dbus/audio_manager_interface.c | 9554 ++++++++++++++++++++ src/dbus/audio_manager_interface.h | 1517 ++++ src/dbus/command_interface.xml | 60 + src/dbus/generate_dbus.sh | 24 + src/dbus/routing_interface.xml | 85 + src/dbus/sound_manager_interface.xml | 36 + src/export.map | 1 + src/sm-error.h | 52 + src/sm-helper.c | 231 + src/sm-helper.h | 94 + src/soundmanager.c | 1570 ++++ 207 files changed, 26895 insertions(+) create mode 100644 CMakeLists.txt create mode 100644 LICENSE create mode 100644 README.md create mode 100644 cmake/modules/Findgtest.cmake create mode 100644 conf/audiomanager-config-sample/configuration.xml create mode 100644 conf/audiomanager-config-sample/configuration_v3.xml create mode 100644 conf/soundmanager-dbus.conf create mode 100644 doc/ApplicationGuide.md create mode 100644 doc/Display_Audio_Transition1.md create mode 100644 doc/Display_Audio_Transition2.md create mode 100644 doc/api-ref/html/annotated.html create mode 100644 doc/api-ref/html/annotated_dup.js create mode 100644 doc/api-ref/html/bc_s.png create mode 100644 doc/api-ref/html/bdwn.png create mode 100644 doc/api-ref/html/class_lib_soundmanager.html create mode 100644 doc/api-ref/html/class_lib_soundmanager.js create mode 100644 doc/api-ref/html/classes.html create mode 100644 doc/api-ref/html/closed.png create mode 100644 doc/api-ref/html/dir_4ed4f07a8451d34bdd1d92ed62b81ed4.html create mode 100644 doc/api-ref/html/dir_4ed4f07a8451d34bdd1d92ed62b81ed4.js create mode 100644 doc/api-ref/html/dir_574c53d22ed4def281d320d129dd43c9.html create mode 100644 doc/api-ref/html/dir_574c53d22ed4def281d320d129dd43c9.js create mode 100644 doc/api-ref/html/dir_85932083476b47061c69d172796990a3.html create mode 100644 doc/api-ref/html/dir_85932083476b47061c69d172796990a3.js create mode 100644 doc/api-ref/html/dir_b967abc00200c877344b4504e6cbcf3f.html create mode 100644 doc/api-ref/html/dir_b967abc00200c877344b4504e6cbcf3f.js create mode 100644 doc/api-ref/html/dir_c2dc0533631c44dc5d574e7be055c656.html create mode 100644 doc/api-ref/html/dir_c2dc0533631c44dc5d574e7be055c656.js create mode 100644 doc/api-ref/html/doc.png create mode 100644 doc/api-ref/html/doxygen.css create mode 100644 doc/api-ref/html/doxygen.png create mode 100644 doc/api-ref/html/dynsections.js create mode 100644 doc/api-ref/html/files.html create mode 100644 doc/api-ref/html/files.js create mode 100644 doc/api-ref/html/folderclosed.png create mode 100644 doc/api-ref/html/folderopen.png create mode 100644 doc/api-ref/html/functions.html create mode 100644 doc/api-ref/html/functions_func.html create mode 100644 doc/api-ref/html/functions_vars.html create mode 100644 doc/api-ref/html/globals.html create mode 100644 doc/api-ref/html/globals_defs.html create mode 100644 doc/api-ref/html/globals_func.html create mode 100644 doc/api-ref/html/globals_vars.html create mode 100644 doc/api-ref/html/index.html create mode 100644 doc/api-ref/html/jquery.js create mode 100644 doc/api-ref/html/libsoundmanager_8cpp.html create mode 100644 doc/api-ref/html/libsoundmanager_8cpp.js create mode 100644 doc/api-ref/html/libsoundmanager_8cpp_source.html create mode 100644 doc/api-ref/html/libsoundmanager_8hpp.html create mode 100644 doc/api-ref/html/libsoundmanager_8hpp.js create mode 100644 doc/api-ref/html/libsoundmanager_8hpp_source.html create mode 100644 doc/api-ref/html/menu.js create mode 100644 doc/api-ref/html/menudata.js create mode 100644 doc/api-ref/html/nav_f.png create mode 100644 doc/api-ref/html/nav_g.png create mode 100644 doc/api-ref/html/nav_h.png create mode 100644 doc/api-ref/html/navtree.css create mode 100644 doc/api-ref/html/navtree.js create mode 100644 doc/api-ref/html/navtreedata.js create mode 100644 doc/api-ref/html/navtreeindex0.js create mode 100644 doc/api-ref/html/open.png create mode 100644 doc/api-ref/html/resize.js create mode 100644 doc/api-ref/html/search/all_0.html create mode 100644 doc/api-ref/html/search/all_0.js create mode 100644 doc/api-ref/html/search/all_1.html create mode 100644 doc/api-ref/html/search/all_1.js create mode 100644 doc/api-ref/html/search/all_2.html create mode 100644 doc/api-ref/html/search/all_2.js create mode 100644 doc/api-ref/html/search/all_3.html create mode 100644 doc/api-ref/html/search/all_3.js create mode 100644 doc/api-ref/html/search/all_4.html create mode 100644 doc/api-ref/html/search/all_4.js create mode 100644 doc/api-ref/html/search/all_5.html create mode 100644 doc/api-ref/html/search/all_5.js create mode 100644 doc/api-ref/html/search/all_6.html create mode 100644 doc/api-ref/html/search/all_6.js create mode 100644 doc/api-ref/html/search/all_7.html create mode 100644 doc/api-ref/html/search/all_7.js create mode 100644 doc/api-ref/html/search/all_8.html create mode 100644 doc/api-ref/html/search/all_8.js create mode 100644 doc/api-ref/html/search/all_9.html create mode 100644 doc/api-ref/html/search/all_9.js create mode 100644 doc/api-ref/html/search/all_a.html create mode 100644 doc/api-ref/html/search/all_a.js create mode 100644 doc/api-ref/html/search/all_b.html create mode 100644 doc/api-ref/html/search/all_b.js create mode 100644 doc/api-ref/html/search/all_c.html create mode 100644 doc/api-ref/html/search/all_c.js create mode 100644 doc/api-ref/html/search/all_d.html create mode 100644 doc/api-ref/html/search/all_d.js create mode 100644 doc/api-ref/html/search/classes_0.html create mode 100644 doc/api-ref/html/search/classes_0.js create mode 100644 doc/api-ref/html/search/classes_1.html create mode 100644 doc/api-ref/html/search/classes_1.js create mode 100644 doc/api-ref/html/search/close.png create mode 100644 doc/api-ref/html/search/defines_0.html create mode 100644 doc/api-ref/html/search/defines_0.js create mode 100644 doc/api-ref/html/search/defines_1.html create mode 100644 doc/api-ref/html/search/defines_1.js create mode 100644 doc/api-ref/html/search/defines_2.html create mode 100644 doc/api-ref/html/search/defines_2.js create mode 100644 doc/api-ref/html/search/defines_3.html create mode 100644 doc/api-ref/html/search/defines_3.js create mode 100644 doc/api-ref/html/search/defines_4.html create mode 100644 doc/api-ref/html/search/defines_4.js create mode 100644 doc/api-ref/html/search/defines_5.html create mode 100644 doc/api-ref/html/search/defines_5.js create mode 100644 doc/api-ref/html/search/defines_6.html create mode 100644 doc/api-ref/html/search/defines_6.js create mode 100644 doc/api-ref/html/search/defines_7.html create mode 100644 doc/api-ref/html/search/defines_7.js create mode 100644 doc/api-ref/html/search/files_0.html create mode 100644 doc/api-ref/html/search/files_0.js create mode 100644 doc/api-ref/html/search/files_1.html create mode 100644 doc/api-ref/html/search/files_1.js create mode 100644 doc/api-ref/html/search/files_2.html create mode 100644 doc/api-ref/html/search/files_2.js create mode 100644 doc/api-ref/html/search/functions_0.html create mode 100644 doc/api-ref/html/search/functions_0.js create mode 100644 doc/api-ref/html/search/functions_1.html create mode 100644 doc/api-ref/html/search/functions_1.js create mode 100644 doc/api-ref/html/search/functions_2.html create mode 100644 doc/api-ref/html/search/functions_2.js create mode 100644 doc/api-ref/html/search/functions_3.html create mode 100644 doc/api-ref/html/search/functions_3.js create mode 100644 doc/api-ref/html/search/functions_4.html create mode 100644 doc/api-ref/html/search/functions_4.js create mode 100644 doc/api-ref/html/search/functions_5.html create mode 100644 doc/api-ref/html/search/functions_5.js create mode 100644 doc/api-ref/html/search/functions_6.html create mode 100644 doc/api-ref/html/search/functions_6.js create mode 100644 doc/api-ref/html/search/functions_7.html create mode 100644 doc/api-ref/html/search/functions_7.js create mode 100644 doc/api-ref/html/search/functions_8.html create mode 100644 doc/api-ref/html/search/functions_8.js create mode 100644 doc/api-ref/html/search/mag_sel.png create mode 100644 doc/api-ref/html/search/nomatches.html create mode 100644 doc/api-ref/html/search/search.css create mode 100644 doc/api-ref/html/search/search.js create mode 100644 doc/api-ref/html/search/search_l.png create mode 100644 doc/api-ref/html/search/search_m.png create mode 100644 doc/api-ref/html/search/search_r.png create mode 100644 doc/api-ref/html/search/searchdata.js create mode 100644 doc/api-ref/html/search/variables_0.html create mode 100644 doc/api-ref/html/search/variables_0.js create mode 100644 doc/api-ref/html/search/variables_1.html create mode 100644 doc/api-ref/html/search/variables_1.js create mode 100644 doc/api-ref/html/search/variables_2.html create mode 100644 doc/api-ref/html/search/variables_2.js create mode 100644 doc/api-ref/html/search/variables_3.html create mode 100644 doc/api-ref/html/search/variables_3.js create mode 100644 doc/api-ref/html/soundmanager_8c.html create mode 100644 doc/api-ref/html/soundmanager_8c.js create mode 100644 doc/api-ref/html/soundmanager_8c_source.html create mode 100644 doc/api-ref/html/splitbar.png create mode 100644 doc/api-ref/html/structevent.html create mode 100644 doc/api-ref/html/structevent.js create mode 100644 doc/api-ref/html/sync_off.png create mode 100644 doc/api-ref/html/sync_on.png create mode 100644 doc/api-ref/html/tab_a.png create mode 100644 doc/api-ref/html/tab_b.png create mode 100644 doc/api-ref/html/tab_h.png create mode 100644 doc/api-ref/html/tab_s.png create mode 100644 doc/api-ref/html/tabs.css create mode 100644 doc/api-ref/html/test_8cpp.html create mode 100644 doc/api-ref/html/test_8cpp.js create mode 100644 doc/api-ref/html/test_8cpp_source.html create mode 100644 doc/parts/am-component.png create mode 100644 doc/parts/seq_changevolume.svg create mode 100644 doc/parts/seq_connectsoundroute.svg create mode 100644 doc/parts/seq_disconnectsoundroute.svg create mode 100644 doc/parts/seq_initialization.svg create mode 100644 doc/parts/seq_registration.svg create mode 100644 doc/parts/seq_releasesoundmode.svg create mode 100644 doc/parts/seq_requestsoundmode.svg create mode 100644 doc/parts/seq_setmutestate.svg create mode 100644 doc/parts/seq_startsoundstreaming.svg create mode 100644 doc/parts/seq_startup.svg create mode 100644 doc/parts/seq_stopsoundstreaming.svg create mode 100644 doc/parts/software-stack.png create mode 100644 doc/parts/software-stack2.png create mode 100644 doc/parts/typical-usecase.png create mode 100644 doc/parts/typical-usecase2.png create mode 100644 include/CMakeLists.txt create mode 100644 include/libsoundmanager.hpp create mode 100644 libsoundmanager/CMakeLists.txt create mode 100644 libsoundmanager/libsoundmanager.cpp create mode 100644 package/root/config.xml create mode 100644 package/root/icon.svg create mode 100755 scripts/call-sm-binding-method_test.sh create mode 100755 scripts/dbus-call-connect-test.sh create mode 100755 scripts/dbus-call-test.sh create mode 100755 scripts/sm-binding-test-gdb.sh create mode 100755 scripts/sm-binding-test.sh create mode 100644 soundmanager.pc.in create mode 100644 src/CMakeLists.txt create mode 100644 src/dbus/audio_manager_interface.c create mode 100644 src/dbus/audio_manager_interface.h create mode 100644 src/dbus/command_interface.xml create mode 100755 src/dbus/generate_dbus.sh create mode 100644 src/dbus/routing_interface.xml create mode 100644 src/dbus/sound_manager_interface.xml create mode 100644 src/export.map create mode 100644 src/sm-error.h create mode 100644 src/sm-helper.c create mode 100644 src/sm-helper.h create mode 100644 src/soundmanager.c diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..54974b4 --- /dev/null +++ b/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. +# + +project(SoundManager C CXX) + +cmake_minimum_required(VERSION 2.8) + +set(PROJECT_NAME "Sound Manager binding and client library") +set(PROJECT_VERSION "1.0") +set(PROJECT_PRETTY_NAME "SM") +set(PROJECT_DESCRIPTION " Sound Manager binding and client library Binder communicates with Audio Manager and client library to hide IPC for Application") +set(PROJECT_INCLUDEDIR ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}) +set(PROJECT_LIBDIR ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}) +set(SOUNDMANAGER_INCLUDEDIR ${PROJECT_INCLUDEDIR}/libsoundmanager) +set(PROJECT_BINDINGDIR ${binding_install_dir}) +set(LIBSM_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) +add_definitions(-DDEBUGMODE) + +add_subdirectory(src) +add_subdirectory(libsoundmanager) +add_subdirectory(include) + +#generate configure file +configure_file(soundmanager.pc.in soundmanager.pc @ONLY) +INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/soundmanager.pc + DESTINATION + ${CMAKE_INSTALL_LIBDIR}/pkgconfig) diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..31c692a --- /dev/null +++ b/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/README.md b/README.md new file mode 100644 index 0000000..b8dbdb1 --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +This is a SoundManager implementation for the AGL Project. +=========================================================== + +See doc/ diff --git a/cmake/modules/Findgtest.cmake b/cmake/modules/Findgtest.cmake new file mode 100644 index 0000000..8ea850f --- /dev/null +++ b/cmake/modules/Findgtest.cmake @@ -0,0 +1,38 @@ +SET(MODULE_NAME gtest) + +SET(${MODULE_NAME}_FOUND FALSE) + +FIND_PATH(${MODULE_NAME}_INCLUDE_DIRS + NAMES gtest/gtest.h + PATHS /usr/include /usr/local/include +) + +FIND_LIBRARY(LIB_GTEST + NAMES gtest + PATHS /usr/lib + /usr/lib64 + /usr/local/lib + /usr/local/lib64 +) + +FIND_LIBRARY(LIB_GTEST_MAIN + NAMES gtest_main + PATHS /usr/lib + /usr/lib64 + /usr/local/lib + /usr/local/lib64 +) + +IF(LIB_GTEST AND LIB_GTEST_MAIN) + SET(${MODULE_NAME}_FOUND TRUE) + SET(${MODULE_NAME}_LIBRARIES ${LIB_GTEST} ${LIB_GTEST_MAIN}) +ENDIF() + +MARK_AS_ADVANCED( + ${MODULE_NAME}_FOUND + ${MODULE_NAME}_INCLUDE_DIRS + ${MODULE_NAME}_LIBRARIES +) + +MESSAGE(STATUS "${MODULE_NAME}_INCLUDE_DIRS: ${${MODULE_NAME}_INCLUDE_DIRS}") +MESSAGE(STATUS "${MODULE_NAME}_LIBRARIES: ${${MODULE_NAME}_LIBRARIES}") diff --git a/conf/audiomanager-config-sample/configuration.xml b/conf/audiomanager-config-sample/configuration.xml new file mode 100644 index 0000000..3020650 --- /dev/null +++ b/conf/audiomanager-config-sample/configuration.xml @@ -0,0 +1,545 @@ + + + + + 0 + UNKNOWN + SourceTemplate + 0 + TRUE + UNKNOWN + SS_OFF + CF_GENIVI_STEREO + CF_GENIVI_MONO + IS_OFF + + A_AVAILABLE + AR_UNKNOWN + + + SP_GENIVI_TREBLE + 5 + + + SP_GENIVI_MID + 5 + + + SP_GENIVI_BASS + 5 + + + MSP_GENIVI_TREBLE + 5 + + + MSP_GENIVI_MID + 5 + + + MSP_GENIVI_BASS + 5 + + REG_TEMPLATE + TRUE + 1 + + MSP_UNKNOWN,SP_UNKNOWN + MSP_GENIVI_TREBLE,SP_GENIVI_TREBLE + + + + 0 + SoundManager + mediaplayer + BASE + REG_ROUTER + + + 2 + SoundManager + ALSA#Playback + BASE + REG_ROUTER + + + 3 + SoundManager + music + BASE + REG_ROUTER + + + 4 + SoundManager + Navi + INT + REG_ROUTER + + + 5 + SoundManager + phone + PHONE + REG_ROUTER + + + + 0 + SoundManager + radio + BASE + REG_ROUTER + + + + + + 0 + UNKNOWN + SinkTemplate + 0 + TRUE + 100 + BASE + MS_UNMUTED + CF_GENIVI_STEREO + CF_GENIVI_MONO + + A_AVAILABLE + AR_GENIVI_NEWMEDIA + + + SP_GENIVI_TREBLE + 5 + + + SP_GENIVI_MID + 5 + + + SP_GENIVI_BASS + 5 + + + MSP_GENIVI_TREBLE + 5 + + + MSP_GENIVI_MID + 5 + + + MSP_GENIVI_BASS + 5 + + REG_TEMPLATE + TRUE + 1 + + 0,0.0 + 1,0.01 + 2,0.02 + 3,0.03 + 4,0.04 + 5,0.05 + 6,0.06 + 7,0.07 + 8,0.08 + 9,0.09 + 10,0.1 + 11,0.11 + 12,0.12 + 14,0.14 + 15,0.15 + 17,0.17 + 20,0.2 + 22,0.22 + 25,0.25 + 28,0.28 + 31,0.31 + 35,0.35 + 40,0.4 + 45,0.45 + 50,0.5 + 56,0.56 + 62,0.62 + 70,0.7 + 80,0.8 + 90,0.9 + 100,1.0 + + + 0.0,-192.0 + 0.01,-40.0 + 0.02,-34.0 + 0.03,-30.0 + 0.04,-27.0 + 0.05,-26.0 + 0.06,-24.0 + 0.07,-23.0 + 0.08,-22.0 + 0.09,-21.0 + 0.1,-20.0 + 0.11,-19.0 + 0.12,-18.0 + 0.14,-17.0 + 0.15,-16.0 + 0.17,-15.0 + 0.2,-14.0 + 0.22,-13.0 + 0.25,-12.0 + 0.28,-11.0 + 0.31,-10.0 + 0.35,-9.0 + 0.4,-8.0 + 0.45,-7.0 + 0.5,-6.0 + 0.56,-5.0 + 0.62,-4.0 + 0.7,-3.0 + 0.8,-2.0 + 0.9,-1.0 + 1.0,0.0 + + + MSP_UNKNOWN,SP_UNKNOWN + MSP_GENIVI_TREBLE,SP_GENIVI_TREBLE + + + + 1 + + SoundManager + rsnd-dai.0-ak4642-hifi#Analog#Stereo + BASE + REG_CONTROLLER + + + 2 + + SoundManager + Microchip#MOST:0#Multichannel + BASE + REG_CONTROLLER + + + + + + + + + + 0 + SoundManager + org.genivi.audiomanager + SoundManager + FALSE + TRUE + DS_CONTROLLED + REG_ROUTER + + + + + + BASE + C_PLAYBACK + 1 + Microchip#MOST:0#Multichannel^rsnd-dai.0-ak4642-hifi#Analog#Stereo=mediaplayer^music^ALSA#Playback^radio + + + INT + C_PLAYBACK + 2 + Microchip#MOST:0#Multichannel^rsnd-dai.0-ak4642-hifi#Analog#Stereo=Navi + + + PHONE + C_PLAYBACK + 3 + Microchip#MOST:0#Multichannel^rsnd-dai.0-ak4642-hifi#Analog#Stereo=phone + + + + + + + USER_CONNECTION_REQUEST + + name(CLASS, REQUESTING) EQ "BASE" + connectionState(CONNECTIONOFCLASS, REQUESTING, OTHERS) INC CS_CONNECTED + + ACTION_DISCONNECT + + "BASE" + CS_CONNECTED + + + + + + + USER_CONNECTION_REQUEST + + name(CLASS, REQUESTING) EQ "INT" + + ACTION_LIMIT + + "BASE" + -1000 + 01 + + + + + name(CLASS, REQUESTING) EQ "INT" + connectionState(CONNECTIONOFCLASS, REQUESTING, OTHERS) INC CS_CONNECTED + priority(CONNECTIONOFCLASS, REQUESTING, OTHERS) LT priority(CONNECTION, REQUESTING) + + ACTION_PUSH + + "INT" + O_NEWEST + + + TRUE + + + name(CLASS, REQUESTING) EQ "INT" + connectionState(CONNECTIONOFCLASS, REQUESTING, OTHERS) INC CS_CONNECTED + + ACTION_PUSH + + "INT" + O_OLDEST + + + + + name(CLASS, REQUESTING) EQ "INT" + connectionState(CONNECTIONOFCLASS, "PHONE") INC CS_CONNECTED + + ACTION_MUTE + + REQUESTING + + + + ACTION_CONNECT + + REQUESTING + + + TRUE + + + + + USER_CONNECTION_REQUEST + + name(CLASS, REQUESTING) EQ "PHONE" + + ACTION_LIMIT + + "BASE" + -1000 + 02 + + + + + name(CLASS, REQUESTING) EQ "PHONE" + connectionState(CONNECTIONOFCLASS, "INT") INC CS_CONNECTED + + ACTION_MUTE + + "INT" + + + + + name(SINK, REQUESTING) EQ "AMP" + + ACTION_CONNECT + + REQUESTING + 5000 + + + TRUE + + + + + + USER_DISCONNECTION_REQUEST + + + ACTION_DISCONNECT + + REQUESTING + REQUESTING + + + + + name(CLASS, REQUESTING) EQ "INT" + + ACTION_UNLIMIT + + "BASE" + 01 + + + + + name(CLASS, REQUESTING) EQ "INT" + connectionState(CONNECTIONOFCLASS, REQUESTING, OTHERS) INC CS_CONNECTED + + ACTION_POP + + "INT" + O_OLDEST + + + + + name(CLASS, REQUESTING) EQ "PHONE" + connectionState(CONNECTIONOFCLASS, "INT") INC CS_CONNECTED + + ACTION_UNMUTE + + "INT" + + + + + name(CLASS, REQUESTING) EQ "PHONE" + + ACTION_UNLIMIT + + "BASE" + 02 + + + + + name(CLASS, REQUESTING) EQ "BASE" + connectionState(CONNECTIONOFCLASS, "BASE") INC CS_SUSPENDED + + ACTION_RESUME + + "BASE" + CS_SUSPENDED + + + + + + + USER_SET_VOLUME + + + ACTION_SET_VOLUME + + REQUESTING + + + + + + + + USER_SET_SINK_MUTE_STATE + + muteState(USER,REQUESTING) EQ MS_MUTED + + ACTION_MUTE + + REQUESTING + + + + + muteState(USER,REQUESTING) EQ MS_UNMUTED + + ACTION_UNMUTE + + REQUESTING + + + + + + + + USER_SET_SINK_MAIN_SOUND_PROPERTY + + + ACTION_SET_PROPERTY + + REQUESTING + + + + + + + + USER_SET_SOURCE_MAIN_SOUND_PROPERTY + + + ACTION_SET_PROPERTY + + REQUESTING + + + + + + + + USER_CONNECTION_REQUEST + + + + ACTION_CONNECT + + REQUESTING + 5000 + + + + + + + + + + SYP_DEBUG_LOG + 5 + + + diff --git a/conf/audiomanager-config-sample/configuration_v3.xml b/conf/audiomanager-config-sample/configuration_v3.xml new file mode 100644 index 0000000..9706244 --- /dev/null +++ b/conf/audiomanager-config-sample/configuration_v3.xml @@ -0,0 +1,545 @@ + + + + + 0 + UNKNOWN + SourceTemplate + 0 + TRUE + UNKNOWN + SS_OFF + CF_GENIVI_STEREO + CF_GENIVI_MONO + IS_OFF + + A_AVAILABLE + AR_UNKNOWN + + + SP_GENIVI_TREBLE + 5 + + + SP_GENIVI_MID + 5 + + + SP_GENIVI_BASS + 5 + + + MSP_GENIVI_TREBLE + 5 + + + MSP_GENIVI_MID + 5 + + + MSP_GENIVI_BASS + 5 + + REG_TEMPLATE + TRUE + 1 + + MSP_UNKNOWN,SP_UNKNOWN + MSP_GENIVI_TREBLE,SP_GENIVI_TREBLE + + + + 0 + SoundManager + mediaplayer + BASE + REG_ROUTER + + + 2 + SoundManager + ALSA#Playback + BASE + REG_ROUTER + + + 3 + SoundManager + music + BASE + REG_ROUTER + + + 4 + SoundManager + Navi + INT + REG_ROUTER + + + 5 + SoundManager + phone + PHONE + REG_ROUTER + + + + 0 + SoundManager + radio + BASE + REG_ROUTER + + + + + + 0 + UNKNOWN + SinkTemplate + 0 + TRUE + 100 + BASE + MS_UNMUTED + CF_GENIVI_STEREO + CF_GENIVI_MONO + + A_AVAILABLE + AR_GENIVI_NEWMEDIA + + + SP_GENIVI_TREBLE + 5 + + + SP_GENIVI_MID + 5 + + + SP_GENIVI_BASS + 5 + + + MSP_GENIVI_TREBLE + 5 + + + MSP_GENIVI_MID + 5 + + + MSP_GENIVI_BASS + 5 + + REG_TEMPLATE + TRUE + 1 + + 0,0.0 + 1,0.01 + 2,0.02 + 3,0.03 + 4,0.04 + 5,0.05 + 6,0.06 + 7,0.07 + 8,0.08 + 9,0.09 + 10,0.1 + 11,0.11 + 12,0.12 + 14,0.14 + 15,0.15 + 17,0.17 + 20,0.2 + 22,0.22 + 25,0.25 + 28,0.28 + 31,0.31 + 35,0.35 + 40,0.4 + 45,0.45 + 50,0.5 + 56,0.56 + 62,0.62 + 70,0.7 + 80,0.8 + 90,0.9 + 100,1.0 + + + 0.0,-192.0 + 0.01,-40.0 + 0.02,-34.0 + 0.03,-30.0 + 0.04,-27.0 + 0.05,-26.0 + 0.06,-24.0 + 0.07,-23.0 + 0.08,-22.0 + 0.09,-21.0 + 0.1,-20.0 + 0.11,-19.0 + 0.12,-18.0 + 0.14,-17.0 + 0.15,-16.0 + 0.17,-15.0 + 0.2,-14.0 + 0.22,-13.0 + 0.25,-12.0 + 0.28,-11.0 + 0.31,-10.0 + 0.35,-9.0 + 0.4,-8.0 + 0.45,-7.0 + 0.5,-6.0 + 0.56,-5.0 + 0.62,-4.0 + 0.7,-3.0 + 0.8,-2.0 + 0.9,-1.0 + 1.0,0.0 + + + MSP_UNKNOWN,SP_UNKNOWN + MSP_GENIVI_TREBLE,SP_GENIVI_TREBLE + + + + 1 + + SoundManager + rsnd-dai.0-ak4642-hifi#Analog#Stereo + BASE + REG_CONTROLLER + + + 2 + + SoundManager + Microchip#MOST:0#Multichannel + BASE + REG_CONTROLLER + + + + + + + + + + 0 + SoundManager + org.genivi.audiomanager + SoundManager + FALSE + TRUE + DS_CONTROLLED + REG_ROUTER + + + + + + BASE + C_PLAYBACK + 1 + Microchip#MOST:0#Multichannel^rsnd-dai.0-ak4642-hifi#Analog#Stereo=mediaplayer^music^ALSA#Playback^radio + + + INT + C_PLAYBACK + 2 + Microchip#MOST:0#Multichannel^rsnd-dai.0-ak4642-hifi#Analog#Stereo=Navi + + + PHONE + C_PLAYBACK + 3 + Microchip#MOST:0#Multichannel^rsnd-dai.0-ak4642-hifi#Analog#Stereo=phone + + + + + + + USER_CONNECTION_REQUEST + + name(CLASS, REQUESTING) EQ "BASE" + connectionState(CONNECTIONOFCLASS, REQUESTING, OTHERS) INC CS_CONNECTED + + ACTION_SUSPEND + + "BASE" + CS_CONNECTED + + + + + + + USER_CONNECTION_REQUEST + + name(CLASS, REQUESTING) EQ "INT" + + ACTION_LIMIT + + "BASE" + -1000 + 01 + + + + + name(CLASS, REQUESTING) EQ "INT" + connectionState(CONNECTIONOFCLASS, REQUESTING, OTHERS) INC CS_CONNECTED + priority(CONNECTIONOFCLASS, REQUESTING, OTHERS) LT priority(CONNECTION, REQUESTING) + + ACTION_PUSH + + "INT" + O_NEWEST + + + TRUE + + + name(CLASS, REQUESTING) EQ "INT" + connectionState(CONNECTIONOFCLASS, REQUESTING, OTHERS) INC CS_CONNECTED + + ACTION_PUSH + + "INT" + O_OLDEST + + + + + name(CLASS, REQUESTING) EQ "INT" + connectionState(CONNECTIONOFCLASS, "PHONE") INC CS_CONNECTED + + ACTION_MUTE + + REQUESTING + + + + ACTION_CONNECT + + REQUESTING + + + TRUE + + + + + USER_CONNECTION_REQUEST + + name(CLASS, REQUESTING) EQ "PHONE" + + ACTION_LIMIT + + "BASE" + -1000 + 02 + + + + + name(CLASS, REQUESTING) EQ "PHONE" + connectionState(CONNECTIONOFCLASS, "INT") INC CS_CONNECTED + + ACTION_MUTE + + "INT" + + + + + name(SINK, REQUESTING) EQ "AMP" + + ACTION_CONNECT + + REQUESTING + 5000 + + + TRUE + + + + + + USER_DISCONNECTION_REQUEST + + + ACTION_DISCONNECT + + REQUESTING + REQUESTING + + + + + name(CLASS, REQUESTING) EQ "INT" + + ACTION_UNLIMIT + + "BASE" + 01 + + + + + name(CLASS, REQUESTING) EQ "INT" + connectionState(CONNECTIONOFCLASS, REQUESTING, OTHERS) INC CS_CONNECTED + + ACTION_POP + + "INT" + O_OLDEST + + + + + name(CLASS, REQUESTING) EQ "PHONE" + connectionState(CONNECTIONOFCLASS, "INT") INC CS_CONNECTED + + ACTION_UNMUTE + + "INT" + + + + + name(CLASS, REQUESTING) EQ "PHONE" + + ACTION_UNLIMIT + + "BASE" + 02 + + + + + name(CLASS, REQUESTING) EQ "BASE" + connectionState(CONNECTIONOFCLASS, "BASE") INC CS_SUSPENDED + + ACTION_RESUME + + "BASE" + CS_SUSPENDED + + + + + + + USER_SET_VOLUME + + + ACTION_SET_VOLUME + + REQUESTING + + + + + + + + USER_SET_SINK_MUTE_STATE + + muteState(USER,REQUESTING) EQ MS_MUTED + + ACTION_MUTE + + REQUESTING + + + + + muteState(USER,REQUESTING) EQ MS_UNMUTED + + ACTION_UNMUTE + + REQUESTING + + + + + + + + USER_SET_SINK_MAIN_SOUND_PROPERTY + + + ACTION_SET_PROPERTY + + REQUESTING + + + + + + + + USER_SET_SOURCE_MAIN_SOUND_PROPERTY + + + ACTION_SET_PROPERTY + + REQUESTING + + + + + + + + USER_CONNECTION_REQUEST + + + + ACTION_CONNECT + + REQUESTING + 5000 + + + + + + + + + + SYP_DEBUG_LOG + 5 + + + diff --git a/conf/soundmanager-dbus.conf b/conf/soundmanager-dbus.conf new file mode 100644 index 0000000..cacb60e --- /dev/null +++ b/conf/soundmanager-dbus.conf @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + diff --git a/doc/ApplicationGuide.md b/doc/ApplicationGuide.md new file mode 100644 index 0000000..a56a7b1 --- /dev/null +++ b/doc/ApplicationGuide.md @@ -0,0 +1,330 @@ +**Sound Manager Application Guide** +==== +
Revision: 0.2Beta
+
TOYOTA MOTOR CORPORATION
+
Advanced Driver Information Technology
+
2nd/Oct/2017
+ +* * * + +## **
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) + - [Additional work](#Additional\ work) + - [How to call Sound Manager's APIs from your Application?](#How\ to\ call\ Sound\ Manager\ APIs\ from\ your\ Application?) +- [Supported usecase](#Supported\ usecase) +- [Software Architecture](#Software\ Architecture) +- [API reference](#API\ reference) + - [APIs](#APIs) + - [Events](#Events) +- [Sequence](#Sequence) + - [StartUp](#StartUp) + - [Registration](#Registration) + - [Request Sound Right](#Request\ Sound\ Right) + - [Connect Sound Route](#Connect\ Sound\ Route) + - [Start Sound Streaming](#Start\ Sound\ Streaming) + - [Stop Sound Streaming](#Stop\ Sound\ Streaming) + - [Disconnect Sound Route](#Disconnect\ Sound\ Route) + - [Change Volume](#Change\ Volume) + - [Set Mute State](#Set\ Mute\ State) + - [Release Sound Right](#Release\ Sound\ Right) + - [Audio Domain](#Audio\ Domain) +- [Sample code](#Sample\ code) +- [Limitation](#Limitation) + +* * * + +## **
Target reader of this document
** +Application developer whose software uses sound output. + +* * * + +## **
Overview
** +The sound manager is the service which provides **sound-right management** for multiple sound sources. +This service based on GENIVI Audio Manager, and this package contains service binder and library for API calling. +The reason why this service based on GENIVI Audio Manager is because the sound manager supports highly strong and flexible sound-right management function. + +In order to understand, the below figure shows the one of typical usecases. +In this example, there are four sound mode. +1. Audio Off +2. Media Player +3. Tel (Ring and talking) +4. TTS (Text To Speech; typically it's used by Navigation sound) +![Figure: Typical usecase](parts/typical-usecase.png) + +The important points are: +- **There is a priority for each sound source.** + In this example, "Tel" and "TTS" is stronger than "MediaPlayer". Therefore when the system got incoming call, all four outputs of MediaPlayer are muted automatically by Sound Manager. And in this timing, Sound Manager will issue the event to Media Player, then Media Player can stop the music. (Because depends on OEM's requirement, "Stop" is required, not "Mute".) + "Tel" and "TTS" have the same priority. So if TTS event happened on talking, each sound will output from independent speaker. + If on-hook button is touched, Sound Manager will resume previous sound mode. In this example, basically it's MediaPlayer sound. But if TTS still playing, three speaker will output MediaPlayer sound but one speaker will continue to output TTS sound. +- **Sound mode transition should be done by Sound Manager not Applications.** + Actually application cannot recognize all sound source and its priority, so some centerized manager is required. Sound Manager provides this function. Sound Manager has a database for usecase and priority and in line with this policy Sound Manager controls proper sound mode. + + +The below links show the example of Sound/Window mode transition. +* [Single window application](Display_Audio_Transition1.md) + This transition assumes target IVI system support only one window on screen. It's a similar transition to CES2017 demo. +* [Dual window application](Display_Audio_Transition2.md) + This transition assumes target IVI system support two window (split screen) on screen. + + Of course user can customize shortcut menu, but since it's too many states so this example limits shortcut menu as "Home", "MediaPlayer", "HVAC" and "Navigation". + +* * * + +## **
Getting Start
** + +### **
Supported environment
** +| Item | Description | +|:------------|:----------------------------------| +| AGL version | Daring Dab | +| Hardware | Renesas R-Car Starter Kit Pro(M3) | + + +### **
Build
** + +You can make Sound Manager object files by the following two stage operations. + +**Download recipe** +If repo is already done, please start with git clone +``` +$ mkdir WORK +$ cd WORK +$ repo init -b dab -m dab_4.0.0_xml -u https://gerrit.automotivelinux.org/gerrit/AGL/AGL-repo +$ repo sync +$ git clone https://gerrit.automotivelinux.org/gerrit/staging/meta-hmi-framework + +``` + +Then you can get the following recipe. +* `meta-hmi-framework/agl-service-soundmanager-2017` + + +**Bitbake** +``` +$ source meta-agl/scripts/aglsetup.sh -m m3ulcb agl-demo agl-devel agl-appfw-smack hmi-framework +$ bitbake agl-service-soundmanager-2017 +``` + + +* * * + +### **
Configuring
** +To use Sound Manager API, an application shall paste the following configuration definition into "config.xml" of application. +``` + + + +``` + +* * * + +### **
Additional work
** + +**Add Policy file** + +To add Sound Manager Domain into policy, put the following file to /etc/audiomanager/control. + +` soundmanager/conf/audiomanager-config-sample/configuration.xml` + + +**Remove Module router of Pulse Audio** + +Because the module rounter access to Audio manager for getting sound right instead of application in CES2017, after you changed your application code for Sound manager, you should remove the module router. +To do this, you have to comment out line.143 of /etc/pulse/default.pa as below. + +``` +.ifexists module-router.so +#load-module module-router +.endif + +``` + + +* * * + +### **
How to call Sound Manager APIs from your Application?
** +Sound Manager provides a library which is called "libsoundmanager". +This library provides function style API calling interface. So you should include libsoundmanager.hpp headerfile, and should link this library. +Please also refer sample application and template. + + +See also our [Sample code](#Sample\ code). + + +
+ +* * * + +## **
Supported usecase
** +1. Active source change + - When user choose different audio source with current one, IVI system stop or pause current source and activate new one. + - When user connect external device e.g. iPhone, USB memory IVI system change active source automatically to connected one. +2. Active source locking + - When user is in phone call, IVI restrict to change active source. +3. Interrupt source mixing + - When car close to cross road IVI system reduce the volume of current source and mix with interrupt source e.g. Navigation Guidance. +4. Volume change + - User can change the volume of active source or sink. + - When user change volume during interruption e.g. Navigation Guidance, IVI system change its volume temporary or permanently. +5. Mute/unmute + - User can mute/unmute current active source. +6. Volume management + - When user change active source, IVI system mute/unmute to avoid distortion of sound. +7. Volume acceleration + - When road noise is increased by speed, IVI system automatically change the volume of active source. +8. Routing sound + - System needs to route sound stream to proper zones. (driver zone, passenger zone, rear seat zone) + +[See also this page](https://wiki.automotivelinux.org/eg-ui-graphics-req-audiorouting) + +* * * + +## **
Software Architecture
** +The architecture of Sound Manager is shown below. +Sound Manager is the service designed to be used by multiple applications. +Therefore Sound Manager 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 Sound Manager. +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 libsoundmanager and upper binder, upper binder and lower binder, lower binder (soundmanager-binding) and AudioManager are WebSocket. + +![software-stack.png](parts/software-stack.png) + +* * * + +## **
API reference
** +"libsoundmanager" and "soundmanager_binding" provides several kinds of APIs, and these APIs basically correspond to GENIVI Audio Manager API. (Some APIs are Sound Manager original functions.) + +For understanding, GENIVI Audio Manager stands for one core module and three plug-ins. +1. AudioManagerDaemon + This is a core module of Audio Manager. +2. AudioManagerCommandPlugin + This is a command interface for Audio Manager. +3. AudioManagerController + This plug-in can be used for sound-right management. +4. AudioManagerRountingPlugin + This plug-in abstracts the hardware and software. And sometimes there may be multiple plug-ins. + +*) [See also GENIVI AudioManager Components](http://docs.projects.genivi.org/AudioManager/audiomanagercomponentspage.html) + +![See also GENIVI AudioManager Components](parts/am-component.png) +(This figure was copied from GENIVI Web page.) + + +### **
APIs
** + +- [init(int port, const std::string& token)]() +- [registerSource(const std::string& sourceName)](http://docs.projects.genivi.org/AudioManager/a00053.html#acadce23459d94cec496d17700cbde230) +- [connect(int sourceID, int sinkID)](http://docs.projects.genivi.org/AudioManager/a00033.html#a62d8f5aee1e601d59f993c5a5561e234) +- [connect(int sourceID, const std::string& sinkName = "default")](http://docs.projects.genivi.org/AudioManager/a00033.html#a62d8f5aee1e601d59f993c5a5561e234) +- [disconnect(int connectionID)](http://docs.projects.genivi.org/AudioManager/a00033.html#aa24d0146f4e3c75e02d6c0152e246da1) +- [ackSetSourceState(int sourceID, int handle, int errno)](http://docs.projects.genivi.org/AudioManager/a00053.html#a11f6b0378a50296a72107d6a1fa7ec21) +- [LibSoundmanager ()](api-ref/html/class_lib_soundmanager.html#a8b51e9891813cb62dd12109c017ad106) +- [set_event_handler(enum EventType_AsyncSetSourceState et, handler_asyncSetSourceState f)]() +- [register_callback( 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)]() +- [register_callback( void (*reply_cb)(struct json_object* reply_contents), void (*hangup_cb)(void) = nullptr)]() + + +The below APIs will be available at RC2. + +- [setVolume (const am_sinkID_t sinkID, const am_mainVolume_t volume)](http://docs.projects.genivi.org/AudioManager/a00033.html#a6d47bc67473d75495260abe8c666fc7e) +- [volumeStep (const am_sinkID_t sinkID, const int16_t volumeStep)](http://docs.projects.genivi.org/AudioManager/a00033.html#ad7a4c1fe5a2ecfaae5484a14d8820e58) +- [setSinkMuteState (const am_sinkID_t sinkID, const am_MuteState_e muteState)](http://docs.projects.genivi.org/AudioManager/a00033.html#afae22041843c5349be16a6593d3ebb9c) +- [getListMainConnections (std::vector< am_MainConnectionType_s > &listConnections)](http://docs.projects.genivi.org/AudioManager/a00033.html#a59d10a7178e3227d0b8f415308c71179) +- [confirmRoutingReady (const uint16_t handle, const am_Error_e error)](http://docs.projects.genivi.org/AudioManager/a00053.html#a1dd1b89cccffeaafb1a3c11cebd7e48c) + + +### **
Events
** + +- [EventType_AsyncSetSourceState]() + +The below Events will be available at RC2. + +- [EventType_NewMainConnection](http://docs.projects.genivi.org/AudioManager/a00034.html#a69ada9e19c65c1d078d8a5f473d08586) +- [EventType_RemovedMainConnection](http://docs.projects.genivi.org/AudioManager/a00034.html#aa3b5906bcf682cff155fb24d402efd89) +- [EventType_MainConnectionStateChanged](http://docs.projects.genivi.org/AudioManager/a00034.html#a32aa8ab84632805a876e023a7aead810) +- [EventType_VolumeChanged](http://docs.projects.genivi.org/AudioManager/a00034.html#a4494fdd835137e572f2cf4a3aceb6ae5) +- [EventType_SinkMuteStateChanged](http://docs.projects.genivi.org/AudioManager/a00034.html#a6068ce59089fbdc63aec81e778aba238) +- [EventType_setRoutingReady](http://docs.projects.genivi.org/AudioManager/a00054.html#a7a4d410e30df0e8240d25a57e3c72c6b) +- [EventType_asyncConnect](http://docs.projects.genivi.org/AudioManager/a00054.html#a8a81297be9c64511e27d85444c59b0d6) +- [EventType_asyncSetSourceState](http://docs.projects.genivi.org/AudioManager/a00054.html#ab02d93d54ee9cd98776a3f2d274ee24d) +- [EventType_asyncDisconnect](http://docs.projects.genivi.org/AudioManager/a00054.html#a93ae95515730eb615ab5dfc1316d7862) + +* * * + +## **
Sequence
** +### **
StartUp
** +![seq_startup.png](parts/seq_startup.svg) + +### **
Registration
** +![seq_registration.png](parts/seq_registration.svg) + +### **
Request Sound Right
** +![seq_requestsoundmode.png](parts/seq_requestsoundmode.svg) + +### **
Connect Sound Route
** +![seq_connectsoundroute.png](parts/seq_connectsoundroute.svg) + +### **
Start Sound Streaming
** +![seq_startsoundstreaming.png](parts/seq_startsoundstreaming.svg) + +### **
Stop Sound Streaming
** +![seq_stopsoundstreaming.png](parts/seq_stopsoundstreaming.svg) + +### **
Disconnect Sound Route
** +![seq_disconnectsoundroute.png](parts/seq_disconnectsoundroute.svg) + +### **
Change Volume
** +![seq_changevolume.png](parts/seq_changevolume.svg) + +### **
Set Mute State
** +![seq_setmutestate.png](parts/seq_setmutestate.svg) + +### **
Release Sound Right
** +![seq_releasesoundmode.png](parts/seq_releasesoundmode.svg) + +* * * + +### **
Audio Domain
** + +One of the most important concept of Audio Manager is Audio Domain. +To use GENIVI Audio Manager based system, it may be better to understand this concept. +The below document should bring good understanding. + +[GENIVI Audio Manager: Generic Controller Plug-in](http://events.linuxfoundation.org/sites/events/files/slides/AGL_AMM_presentation_A01.pdf) + +Although strongly recommended to read whole pages, but you can get quick understanding by page.10 to 14. + + +# **
Sample code
** +You can find sample implementation of Sound Manager as below. +* `apps/agl-service-homescreen-2017/sample/template` +* `apps/agl-service-homescreen-2017/sample/radio` +* `apps/agl-service-homescreen-2017/sample/mediaplayer` + + + +# **
Limitation
** +* Minimum APIs and Events are prepared for RC1, the following APIs will be available for RC2. + + * setVolume + * volumeStep + * setSinkMuteState + * getListMainConnections + * confirmRoutingReady + * EventType_NewMainConnection + * EventType_RemovedMainConnection + * EventType_MainConnectionStateChanged + * EventType_VolumeChanged + * EventType_SinkMuteStateChanged + * EventType_setRoutingReady + * EventType_asyncConnect + * EventType_asyncSetSourceState + * EventType_asyncDisconnect + + diff --git a/doc/Display_Audio_Transition1.md b/doc/Display_Audio_Transition1.md new file mode 100644 index 0000000..a9c1604 --- /dev/null +++ b/doc/Display_Audio_Transition1.md @@ -0,0 +1,123 @@ +# Sound mode transition for single window application + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
StateEvent
State IDDisplayAudioPowerPush HomeScreen buttonStart BTAIncoming callPush Shortcut buttonTTSPush Phone control buttonSafety hazard
Win#1PopUpFLFRRLRROnOffMedia PlayerRadioNaviHVACPhoneOther buttonHomeMedia PlayerHVACNaviNavi INT TTSEndedRejectOff hookOn hookDetectedRecovered
S1--offoffoffoffS2--------------------
S2Home-offoffoffoff-S1S22S27S37S57S77S97S17S4-S22S57S37S3----S117-
S3Home-offTTSoffoff-S1S23S28S38S58S78S98S18S4-S23S58S38-S2---S117-
S4HomeRingingTeloffoffoff-S1------S19-------S2S5-S117-
S5Phone-Teloffoffoff-S1------S20--S25S60S40S6---S2S117-
S6Phone-TelTTSoffoff-S1------S21--S26S61S41-S5--S3S117-
S7Home-MPMPMPMP-S1S22S27S42S62S82S102S17S9-S22S62S42S8----S117-
S8Home-MPTTSMPMP-S1S23S28S43S63S83S103S18S9-S23S63S43-S7---S117-
S9HomeRingingTeloffoffoff-S1------S19-------S7S10-S117-
S10Phone-Teloffoffoff-S1------S20--S25S65S45S11---S7S117-
S11Phone-TelTTSoffoff-S1------S21--S26S66S46-S10--S8S117-
S12Home-RadioRadioRadioRadio-S1S22S27S47S67S87S107S17S14-S22S67S47S13----S117-
S13Home-RadioTTSRadioRadio-S1S23S28S48S68S88S108S18S14-S23S68S48-S12---S117-
S14HomeRingingTeloffoffoff-S1------S19-------S12S15-S117-
S15Phone-Teloffoffoff-S1------S20--S25S70S50S16---S12S117-
S16Phone-TelTTSoffoff-S1------S21--S26S71S51-S15--S13S117-
S17Home-BTABTABTABTA-S1S32S27S52S72S92S112S17S19-S32S72S52S18----S117-
S18Home-BTATTSBTABTA-S1S33S28S53S73S93S113S18S19-S33S73S53-S17---S117-
S19HomeRingingTeloffoffoff-S1------S19-------S17S20-S117-
S20Phone-Teloffoffoff-S1------S20--S35S75S55S21---S17S117-
S21Phone-TelTTSoffoff-S1------S21--S36S76S56-S20--S18S117-
S22MP-MPMPMPMP-S1------S32S24S7-S62S42S23---S117-
S23MP-MPTTSMPMP-S1------S33S24S8-S63S43-S22--S117-
S24MPRingingTeloffoffoff-S1------S34-------S22S25-S117-
S25Phone-Teloffoffoff-S1------S35-S10-S65S45S26---S22S117-
S26Phone-TelTTSoffoff-S1------S36-S11-S66S46-S25--S23S117-
S27Radio-RadioRadioRadioRadio-S1------S32S29S12S22S67S47S28---S117-
S28Radio-RadioTTSRadioRadio-S1------S33S29S13S23S68S48-S27--S117-
S29RadioRingingTeloffoffoff-S1------S34-------S27S30-S117-
S30Phone-Teloffoffoff-S1------S35-S15S25S70S50S31---S27S117-
S31Phone-TelTTSoffoff-S1------S36-S16S26S71S51-S30--S28S117-
S32MP(BTA)-BTABTABTABTA-S1-------S34S17-S72S52S33---S117-
S33MP(BTA)-BTATTSBTABTA-S1-------S34S18-S73S53-S32--S117-
S34MP(BTA)RingingTeloffoffoff-S1--------------S32S35-S117-
S35Phone-Teloffoffoff-S1--------S20-S75S55S36---S32S117-
S36Phone-TelTTSoffoff-S1--------S21-S76S56-S35--S33S117-
S37Navioffoffoffoff-S1------S52S39S2S22S57S37S38----S117-
S38NavioffTTSoffoff-S1------S53S39S3S23S58S38-S37---S117-
S39NaviRingingTeloffoffoff-S1------S54-------S37S40-S117-
S40Phone-Teloffoffoff-S1------S55-S5S25S60S40S41---S37S117-
S41Phone-TelTTSoffoff-S1------S56-S6S26S61S41-S40--S38S117-
S42Navi-MPMPMPMP-S1------S52S44S7S22S62-S43----S117-
S43Navi-MPTTSMPMP-S1------S53S44S8S23S63--S42---S117-
S44NaviRingingTeloffoffoff-S1------S54-------S42S45-S117-
S45Phone-Teloffoffoff-S1------S55-S10S25S65-S46---S42S117-
S46Phone-TelTTSoffoff-S1------S56-S11S26S66--S45--S43S117-
S47Navi-RadioRadioRadioRadio-S1------S52S49S12S22S67-S48----S117-
S48Navi-RadioTTSRadioRadio-S1------S53S49S13S23S68--S47---S117-
S49NaviRingingTeloffoffoff-S1------S54-------S47S50-S117-
S50Phone-Teloffoffoff-S1------S55-S15S25S70-S51---S47S117-
S51Phone-TelTTSoffoff-S1------S56-S16S26S71--S50--S48S117-
S52Navi-BTABTABTABTA-S1-------S54S17S32S72S52S53----S117-
S53Navi-BTATTSBTABTA-S1-------S54S18S33S73S53-S52---S117-
S54NaviRingingTeloffoffoff-S1--------------S52S55-S117-
S55Phone-Teloffoffoff-S1--------S20S35S75S55S56---S52S117-
S56Phone-TelTTSoffoff-S1--------S21S36S76S56-S55--S53S117-
S57HVACoffoffoffoff-S1------S72S59S2S22-S37S58----S117-
S58HVACoffTTSoffoff-S1------S73S59S3S23-S38-S57---S117-
S59HVACRingingTeloffoffoff-S1------S74-------S57S60-S117-
S60Phone-Teloffoffoff-S1------S75-S5S25-S40S61---S57S117-
S61Phone-TelTTSoffoff-S1------S76-S6S26-S41-S60--S58S117-
S62HVAC-MPMPMPMP-S1------S72S64S7S22-S42S63----S117-
S63HVAC-MPTTSMPMP-S1------S73S64S8S23-S43-S62---S117-
S64HVACRingingTeloffoffoff-S1------S74-------S62S65-S117-
S65Phone-Teloffoffoff-S1------S75-S10S25-S45S66---S62S117-
S66Phone-TelTTSoffoff-S1------S76-S11S26-S46-S65--S63S117-
S67HVAC-RadioRadioRadioRadio-S1------S72S69S12S22-S47S68----S117-
S68HVAC-RadioTTSRadioRadio-S1------S73S69S13S23-S48-S67---S117-
S69HVACRingingTeloffoffoff-S1------S74-------S67S70-S117-
S70Phone-Teloffoffoff-S1------S75-S15S25-S50S71---S67S117-
S71Phone-TelTTSoffoff-S1------S76-S16S26-S51-S70--S68S117-
S72HVAC-BTABTABTABTA-S1-------S74S17S32-S52S73----S117-
S73HVAC-BTATTSBTABTA-S1-------S74S18S33-S53-S72---S117-
S74HVACRingingTeloffoffoff-S1--------------S72S75-S117-
S75Phone-Teloffoffoff-S1--------S20S35-S55S76---S72S117-
S76Phone-TelTTSoffoff-S1--------S21S36-S56-S75--S73S117-
S77Phoneoffoffoffoff-S1------S92S79S2S22S57S37S78----S117-
S78PhoneoffTTSoffoff-S1------S93S79S3S23S58S38-S77---S117-
S79PhoneRingingTeloffoffoff-S1------S94-------S77S80-S117-
S80Phone-Teloffoffoff-S1------S95-S5S25S60S40S81---S77S117-
S81Phone-TelTTSoffoff-S1------S96-S6S26S61S41-S80--S78S117-
S82Phone-MPMPMPMP-S1------S92S84S7S22S62S42S83----S117-
S83Phone-MPTTSMPMP-S1------S93S84S8S23S63S43-S82---S117-
S84PhoneRingingTeloffoffoff-S1------S94-------S82S85-S117-
S85Phone-Teloffoffoff-S1------S95-S10S25S65S45S86---S82S117-
S86Phone-TelTTSoffoff-S1------S96-S11S26S66S46-S85--S83S117-
S87Phone-RadioRadioRadioRadio-S1------S92S89S12S22S67S47S88----S117-
S88Phone-RadioTTSRadioRadio-S1------S93S89S13S23S68S48-S87---S117-
S89PhoneRingingTeloffoffoff-S1------S94-------S87S90-S117-
S90Phone-Teloffoffoff-S1------S95-S15S25S70S50S91---S87S117-
S91Phone-TelTTSoffoff-S1------S96-S16S26S71S51-S90--S88S117-
S92Phone-BTABTABTABTA-S1-------S94S17S32S72S52S93----S117-
S93Phone-BTATTSBTABTA-S1-------S94S18S33S73S53-S92---S117-
S94PhoneRingingTeloffoffoff-S1--------------S92S95-S117-
S95Phone-Teloffoffoff-S1--------S20S35S75S55S96---S92S117-
S96Phone-TelTTSoffoff-S1--------S21S36S76S56-S95--S93S117-
S97Other-offoffoffoff-S1------S112S99S2S22S57S37S98----S117-
S98Other-offTTSoffoff-S1------S113S99S3S23S58S38-S97---S117-
S99OtherRingingTeloffoffoff-S1------S114-------S97S100-S117-
S100Other-Teloffoffoff-S1------S115-S5S25S60S40S101---S97S117-
S101Other-TelTTSoffoff-S1------S116-S6S26S61S41-S100--S98S117-
S102OtherMPMPMPMP-S1------S112S104S7S22S62S42S103----S117-
S103OtherMPTTSMPMP-S1------S113S104S8S23S63S43-S102---S117-
S104OtherRingingTeloffoffoff-S1------S114-------S102S105-S117-
S105Other-Teloffoffoff-S1------S115-S10S25S65S45S106---S102S117-
S106Other-TelTTSoffoff-S1------S116-S11S26S66S46-S105--S103S117-
S107Other-RadioRadioRadioRadio-S1------S112S109S12S22S67S47S108----S117-
S108Other-RadioTTSRadioRadio-S1------S113S109S13S23S68S48-S107---S117-
S109OtherRingingTeloffoffoff-S1------S114-------S107S110-S117-
S110Other-Teloffoffoff-S1------S115-S15S25S70S50S111---S107S117-
S111Other-TelTTSoffoff-S1------S116-S16S26S71S51-S110--S108S117-
S112Other-BTABTABTABTA-S1-------S114S17S32S72S52S113----S117-
S113Other-BTATTSBTABTA-S1-------S114S18S33S73S53-S112---S117-
S114OtherRingingTeloffoffoff-S1--------------S112S115-S117-
S115Other-Teloffoffoff-S1--------S20S35S75S55S116---S112S117-
S116Other-TelTTSoffoff-S1--------S21S36S76S56-S115--S113S117-
S117anyanyanyWarnanyany-S1------------------S(previous)
diff --git a/doc/Display_Audio_Transition2.md b/doc/Display_Audio_Transition2.md new file mode 100644 index 0000000..46d52b8 --- /dev/null +++ b/doc/Display_Audio_Transition2.md @@ -0,0 +1,333 @@ +# Sound mode transition for dual window application + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
StateEvent
State IDDisplayAudioPowerPush HomeScreen buttonStart BTAIncoming callPush Shortcut buttonTouchTTSPush Phone control buttonSafety hazard
Win#1Win#2PopUpFLFRRLRROnOffMedia PlayerRadioNaviHVACPhoneOther buttonHomeMedia PlayerHVACNaviWin#1Win#2Navi INT TTSEndedRejectOff hookOn hookDetectedRecovered
S1---offoffoffoffS2----------------------
S2Home--offoffoffoff-S1S22S27S37S57S77S97S17S4-S22S57S37--S3----S327-
S3Home--offTTSoffoff-S1S23S28S38S58S78S98S18S4-S23S58S38---S2---S327-
S4Home-RingingTeloffoffoff-S1------S19---------S2S5-S327-
S5Phone--Teloffoffoff-S1------S20--S25S60S40--S6---S2S327-
S6Phone--TelTTSoffoff-S1------S21--S26S61S41---S5--S3S327-
S7Home--MPMPMPMP-S1S22S27S42S62S82S102S17S9-S22S62S42--S8----S327-
S8Home--MPTTSMPMP-S1S23S28S43S63S83S103S18S9-S23S63S43---S7---S327-
S9Home-RingingTeloffoffoff-S1------S19---------S7S10-S327-
S10Phone--Teloffoffoff-S1------S20--S25S65S45--S11---S7S327-
S11Phone--TelTTSoffoff-S1------S21--S26S66S46---S10--S8S327-
S12Home--RadioRadioRadioRadio-S1S22S27S47S67S87S107S17S14-S22S67S47--S13----S327-
S13Home--RadioTTSRadioRadio-S1S23S28S48S68S88S108S18S14-S23S68S48---S12---S327-
S14Home-RingingTeloffoffoff-S1------S19---------S12S15-S327-
S15Phone--Teloffoffoff-S1------S20--S25S70S50--S16---S12S327-
S16Phone--TelTTSoffoff-S1------S21--S26S71S51---S15--S13S327-
S17Home--BTABTABTABTA-S1S32S27S52S72S92S112S17S19-S32S72S52--S18----S327-
S18Home--BTATTSBTABTA-S1S33S28S53S73S93S113S18S19-S33S73S53---S17---S327-
S19Home-RingingTeloffoffoff-S1------S19---------S17S20-S327-
S20Phone--Teloffoffoff-S1------S20--S35S75S55--S21---S17S327-
S21Phone--TelTTSoffoff-S1------S21--S36S76S56---S20--S18S327-
S22MP--MPMPMPMP-S1------S32S24S7-S117S122--S23---S327-
S23MP--MPTTSMPMP-S1------S33S24S8-S118S123---S22--S327-
S24MP-RingingTeloffoffoff-S1------S34---------S22S25-S327-
S25Phone--Teloffoffoff-S1------S35-S10-S120S125--S26---S22S327-
S26Phone--TelTTSoffoff-S1------S36-S11-S121S126---S25--S23S327-
S27Radio--RadioRadioRadioRadio-S1------S32S29S12S132S147S152--S28---S327-
S28Radio--RadioTTSRadioRadio-S1------S33S29S13S133S148S153---S27--S327-
S29Radio-RingingTeloffoffoff-S1------S34---------S27S30-S327-
S30Phone--Teloffoffoff-S1------S35-S15S135S150S155--S31---S27S327-
S31Phone--TelTTSoffoff-S1------S36-S16S136S151S156---S30--S28S327-
S32MP(BTA)--BTABTABTABTA-S1-------S34S17S32S157S162--S33---S327-
S33MP(BTA)--BTATTSBTABTA-S1-------S34S18S33S158S163---S32--S327-
S34MP(BTA)-RingingTeloffoffoff-S1----------------S32S35-S327-
S35Phone--Teloffoffoff-S1--------S20S35S160S165--S36---S32S327-
S36Phone--TelTTSoffoff-S1--------S21S36S161S166---S35--S33S327-
S37Navi-offoffoffoff-S1------S52S39S2S247S257S37--S38----S327-
S38Navi-offTTSoffoff-S1------S53S39S3S248S258S38---S37---S327-
S39Navi-RingingTeloffoffoff-S1------S54---------S37S40-S327-
S40Phone--Teloffoffoff-S1------S55-S5S250S260S40--S41---S37S327-
S41Phone--TelTTSoffoff-S1------S56-S6S251S261S41---S40--S38S327-
S42Navi--MPMPMPMP-S1------S52S44S7S247S262S42--S43----S327-
S43Navi--MPTTSMPMP-S1------S53S44S8S248S263S43---S42---S327-
S44Navi-RingingTeloffoffoff-S1------S54---------S42S45-S327-
S45Phone--Teloffoffoff-S1------S55-S10S250S265S45--S46---S42S327-
S46Phone--TelTTSoffoff-S1------S56-S11S251S266S46---S45--S43S327-
S47Navi--RadioRadioRadioRadio-S1------S52S49S12S247S267S47--S48----S327-
S48Navi--RadioTTSRadioRadio-S1------S53S49S13S248S268S48---S47---S327-
S49Navi-RingingTeloffoffoff-S1------S54---------S47S50-S327-
S50Phone--Teloffoffoff-S1------S55-S15S250S270S50--S51---S47S327-
S51Phone--TelTTSoffoff-S1------S56-S16S251S271S51---S50--S48S327-
S52Navi--BTABTABTABTA-S1-------S54S17S252S272S52--S53----S327-
S53Navi--BTATTSBTABTA-S1-------S54S18S253S273S53---S52---S327-
S54Navi-RingingTeloffoffoff-S1----------------S52S55-S327-
S55Phone--Teloffoffoff-S1--------S20S255S275S55--S56---S52S327-
S56Phone--TelTTSoffoff-S1--------S21S256S276S56---S55--S53S327-
S57HVAC-offoffoffoff-S1------S72S59S2S167S57S177--S58----S327-
S58HVAC-offTTSoffoff-S1------S73S59S3S168S58S178---S57---S327-
S59HVAC-RingingTeloffoffoff-S1------S74---------S57S60-S327-
S60Phone--Teloffoffoff-S1------S75-S5S170S60S177--S61---S57S327-
S61Phone--TelTTSoffoff-S1------S76-S6S171S61S178---S60--S58S327-
S62HVAC--MPMPMPMP-S1------S72S64S7S167S62S182--S63----S327-
S63HVAC--MPTTSMPMP-S1------S73S64S8S168S63S183---S62---S327-
S64HVAC-RingingTeloffoffoff-S1------S74---------S62S65-S327-
S65Phone--Teloffoffoff-S1------S75-S10S170S65S185--S66---S62S327-
S66Phone--TelTTSoffoff-S1------S76-S11S171S66S186---S65--S63S327-
S67HVAC--RadioRadioRadioRadio-S1------S72S69S12S167S67S187--S68----S327-
S68HVAC--RadioTTSRadioRadio-S1------S73S69S13S168S68S188---S67---S327-
S69HVAC-RingingTeloffoffoff-S1------S74---------S67S70-S327-
S70Phone--Teloffoffoff-S1------S75-S15S170S70S190--S71---S67S327-
S71Phone--TelTTSoffoff-S1------S76-S16S171S71S191---S70--S68S327-
S72HVAC--BTABTABTABTA-S1-------S74S17S172S72S192--S73----S327-
S73HVAC--BTATTSBTABTA-S1-------S74S18S173S73S193---S72---S327-
S74HVAC-RingingTeloffoffoff-S1----------------S72S75-S327-
S75Phone--Teloffoffoff-S1--------S20S175S75S195--S76---S72S327-
S76Phone--TelTTSoffoff-S1--------S21S176S76S196---S75--S73S327-
S77Phone-offoffoffoff-S1------S92S79S2S197S207S227--S78----S327-
S78Phone-offTTSoffoff-S1------S93S79S3S198S208S228---S77---S327-
S79Phone-RingingTeloffoffoff-S1------S94---------S77S80-S327-
S80Phone--Teloffoffoff-S1------S95-S5S200S210S230--S81---S77S327-
S81Phone--TelTTSoffoff-S1------S96-S6S201S211S231---S80--S78S327-
S82Phone--MPMPMPMP-S1------S92S84S7S197S212S232--S83----S327-
S83Phone--MPTTSMPMP-S1------S93S84S8S198S213S233---S82---S327-
S84Phone-RingingTeloffoffoff-S1------S94---------S82S85-S327-
S85Phone--Teloffoffoff-S1------S95-S10S200S215S235--S86---S82S327-
S86Phone--TelTTSoffoff-S1------S96-S11S201S216S236---S85--S83S327-
S87Phone--RadioRadioRadioRadio-S1------S92S89S12S197S217S237--S88----S327-
S88Phone--RadioTTSRadioRadio-S1------S93S89S13S198S218S238---S87---S327-
S89Phone-RingingTeloffoffoff-S1------S94---------S87S90-S327-
S90Phone--Teloffoffoff-S1------S95-S15S200S220S240--S91---S87S327-
S91Phone--TelTTSoffoff-S1------S96-S16S201S221S241---S90--S88S327-
S92Phone--BTABTABTABTA-S1-------S94S17S202S222S242--S93----S327-
S93Phone--BTATTSBTABTA-S1-------S94S18S203S223S243---S92---S327-
S94Phone-RingingTeloffoffoff-S1----------------S92S95-S327-
S95Phone--Teloffoffoff-S1--------S20S205S225S245--S96---S92S327-
S96Phone--TelTTSoffoff-S1--------S21S206S226S246---S95--S93S327-
S97Other--offoffoffoff-S1------S112S99S2S277S287S307--S98----S327-
S98Other--offTTSoffoff-S1------S113S99S3S278S288S308---S97---S327-
S99Other-RingingTeloffoffoff-S1------S114---------S97S100-S327-
S100Other--Teloffoffoff-S1------S115-S5S278S290S310--S101---S97S327-
S101Other--TelTTSoffoff-S1------S116-S6S278S291S311---S100--S98S327-
S102Other-MPMPMPMP-S1------S112S104S7S277S292S312--S103----S327-
S103Other-MPTTSMPMP-S1------S113S104S8S278S293S313---S102---S327-
S104Other-RingingTeloffoffoff-S1------S114---------S102S105-S327-
S105Other--Teloffoffoff-S1------S115-S10S278S295S315--S106---S102S327-
S106Other--TelTTSoffoff-S1------S116-S11S278S296S316---S105--S103S327-
S107Other--RadioRadioRadioRadio-S1------S112S109S12S277S297S317--S108----S327-
S108Other--RadioTTSRadioRadio-S1------S113S109S13S278S298S318---S107---S327-
S109Other-RingingTeloffoffoff-S1------S114---------S107S110-S327-
S110Other--Teloffoffoff-S1------S115-S15S278S300S320--S111---S107S327-
S111Other--TelTTSoffoff-S1------S116-S16S278S301S321---S110--S108S327-
S112Other--BTABTABTABTA-S1-------S114S17S282S302S322--S113----S327-
S113Other--BTATTSBTABTA-S1-------S114S18S283S303S323---S112---S327-
S114Other-RingingTeloffoffoff-S1----------------S112S115-S327-
S115Other--Teloffoffoff-S1--------S20S285S305S325--S116---S112S327-
S116Other--TelTTSoffoff-S1--------S21S286S306S326---S115--S113S327-
S117MPHVAC-MPMPMPMP-S1------S157S119S7--S122--S118----S327-
S118MPHVAC-MPTTSMPMP-S1------S158S119S8--S123---S117---S327-
S119MPHVACRingingTeloffoffoff-S1------S159---------S117S120-S327-
S120PhoneHVAC-Teloffoffoff-S1------S160-S10--S125--S121---S117S327-
S121PhoneHVAC-TelTTSoffoff-S1------S161-S11--S126---S120--S118S327-
S122MPNavi-MPMPMPMP-S1------S162S124S7-S117---S123----S327-
S123MPNavi-MPTTSMPMP-S1------S163S124S8-S118----S122---S327-
S124MPNaviRingingTeloffoffoff-S1------S164---------S122S125-S327-
S125PhoneNavi-Teloffoffoff-S1------S165-S10-S120---S126---S122S327-
S126PhoneNavi-Teloffoffoff-S1------S166-S11-S121----S125--S123S327-
S127RadioMP-RadioRadioRadioRadio-S1------S137S129S12S127S147S152-S132S128----S327-
S128RadioMP-RadioTTSRadioRadio-S1------S138S129S13S128S148S153-S133-S127---S327-
S129RadioMPRingingTeloffoffoff-S1------S139---------S127S130-S327-
S130PhoneMP-Teloffoffoff-S1------S140-S15S130S150S155-S135S131---S127S327-
S131PhoneMP-TelTTSoffoff-S1------S141-S16S131S151S156-S136-S130--S128S327-
S132RadioMP-MPMPMPMP-S1------S137S134S7S132S147S152S127-S133----S327-
S133RadioMP-MPTTSMPMP-S1------S138S134S8S133S148S153S128--S132---S327-
S134RadioMPRingingTeloffoffoff-S1------S139---------S132S135-S327-
S135PhoneMP-Teloffoffoff-S1------S140-S10S135S150S155S130-S136---S132S327-
S136PhoneMP-Teloffoffoff-S1------S141-S11S136S151S156S131--S135--S133S327-
S137RadioMP(BTA)-BTABTABTABTA-S1-------S139S17S137S147S152S142-S138----S327-
S138RadioMP(BTA)-BTATTSBTABTA-S1-------S139S18S138S148S153S143--S137---S327-
S139RadioMP(BTA)RingingTeloffoffoff-S1----------------S137S140-S327-
S140PhoneMP(BTA)-Teloffoffoff-S1--------S20S140S150S155S145-S141---S137S327-
S141PhoneMP(BTA)-TelTTSoffoff-S1--------S21S141S151S156S146--S140--S138S327-
S142RadioMP(BTA)-RadioRadioRadioRadio-S1-------S144S17S142S152S157-S137S143----S327-
S143RadioMP(BTA)-RadioTTSRadioRadio-S1-------S144S18S143S153S158-S138-S142---S327-
S144RadioMP(BTA)RingingTeloffoffoff-S1----------------S142S145-S327-
S145PhoneMP(BTA)-Teloffoffoff-S1--------S20S145S155S160-S140S146---S142S327-
S146PhoneMP(BTA)-TelTTSoffoff-S1--------S21S146S156S161-S141-S145--S143S327-
S147RadioHVAC-RadioRadioRadioRadio-S1------S157S149S12S132-S152--S148----S327-
S148RadioHVAC-RadioTTSRadioRadio-S1------S158S149S13S133-S153---S147---S327-
S149RadioHVACRingingTeloffoffoff-S1------S159---------S147S150-S327-
S150PhoneHVAC-Teloffoffoff-S1------S160-S15S135-S155--S151---S147S327-
S151PhoneHVAC-Teloffoffoff-S1------S161-S16S136-S156---S150--S148S327-
S152RadioNavi-RadioRadioRadioRadio-S1------S162S154S12S132S147---S153----S327-
S153RadioNavi-RadioTTSRadioRadio-S1------S163S154S13S133S148----S152---S327-
S154RadioNaviRingingTeloffoffoff-S1------S164---------S152S155-S327-
S155PhoneNavi-Teloffoffoff-S1------S165-S15S135S150---S156---S152S327-
S156PhoneNavi-Teloffoffoff-S1------S166-S16S136S151----S155--S153S327-
S157MP(BTA)HVAC-BTABTABTABTA-S1-------S159S17--S162--S158----S327-
S158MP(BTA)HVAC-BTATTSBTABTA-S1-------S159S18--S163---S157---S327-
S159MP(BTA)HVACRingingTeloffoffoff-S1----------------S157S160-S327-
S160PhoneHVAC-Teloffoffoff-S1--------S20--S165--S161---S157S327-
S161PhoneHVAC-Teloffoffoff-S1--------S21--S166---S160--S158S327-
S162MP(BTA)Navi-BTABTABTABTA-S1-------S164S17-S157---S163----S327-
S163MP(BTA)Navi-BTATTSBTABTA-S1-------S164S18-S158----S162---S327-
S164MP(BTA)NaviRingingTeloffoffoff-S1----------------S162S165-S327-
S165PhoneNavi-Teloffoffoff-S1--------S20-S160---S166---S162S327-
S166PhoneNavi-Teloffoffoff-S1--------S21-S161----S165--S163S327-
S167HVACMP-MPMPMPMP-S1------S172S169S7--S182--S168----S327-
S168HVACMP-MPTTSMPMP-S1------S173S169S8--S183---S167---S327-
S169HVACMPRingingTeloffoffoff-S1------S174---------S167S170-S327-
S170PhoneMP-Teloffoffoff-S1------S175-S10--S183--S171---S167S327-
S171PhoneMP-TelTTSoffoff-S1------S176-S11--S183---S170--S168S327-
S172HVACMP(BTA)-BTABTABTABTA-S1-------S174S17--S192--S173----S327-
S173HVACMP(BTA)-BTATTSBTABTA-S1-------S174S18--S193---S172---S327-
S174HVACMP(BTA)RingingTeloffoffoff-S1----------------S172S175-S327-
S175PhoneMP(BTA)-Teloffoffoff-S1--------S20--S195--S176---S172S327-
S176PhoneMP(BTA)-TelTTSoffoff-S1--------S21--S196---S175--S173S327-
S177HVACNavi-offoffoffoff-S1------S192S179S2S167----S178----S327-
S178HVACNavi-offTTSoffoff-S1------S193S179S3S167-----S177---S327-
S179HVACNaviRingingTeloffoffoff-S1------S194---------S177S180-S327-
S180PhoneNavi-Teloffoffoff-S1------S195-S20S170----S181---S177S327-
S181PhoneNavi-TelTTSoffoff-S1------S196-S21S171-----S180--S178S327-
S182HVACNavi-MPMPMPMP-S1------S192S184S7S167----S183----S327-
S183HVACNavi-MPTTSMPMP-S1------S193S184S8S167-----S182---S327-
S184HVACNaviRingingTeloffoffoff-S1------S194---------S182S185-S327-
S185PhoneNavi-Teloffoffoff-S1------S195-S10S170----S186---S182S327-
S186PhoneNavi-TelTTSoffoff-S1------S196-S11S171-----S185--S183S327-
S187HVACNavi-RadioRadioRadioRadio-S1------S192S189S12S167----S188----S327-
S188HVACNavi-RadioTTSRadioRadio-S1------S193S189S13S167-----S187---S327-
S189HVACNaviRingingTeloffoffoff-S1------S194---------S187S190-S327-
S190PhoneNavi-Teloffoffoff-S1------S195-S15S170----S191---S187S327-
S191PhoneNavi-TelTTSoffoff-S1------S196-S16S171-----S190--S188S327-
S192HVACNavi-BTABTABTABTA-S1-------S194S17S172----S193----S327-
S193HVACNavi-BTATTSBTABTA-S1-------S194S18S173-----S192---S327-
S194HVACNaviRingingTeloffoffoff-S1----------------S192S195-S327-
S195PhoneNavi-Teloffoffoff-S1--------S20S175----S196---S192S327-
S196PhoneNavi-TelTTSoffoff-S1--------S21S176-----S195--S193S327-
S197PhoneMPMPMPMPMP-S1------S202S199S7-S212S232--S198----S327-
S198PhoneMPMPTTSMPMP-S1------S203S199S8-S213S233---S197---S327-
S199PhoneMPRingingTeloffoffoff-S1------S204---------S197S200-S327-
S200PhoneMP-Teloffoffoff-S1------S205-S10-S215S235--S201---S197S327-
S201PhoneMP-TelTTSoffoff-S1------S206-S11-S216S236---S200--S198S327-
S202PhoneMP(BTA)-BTABTABTABTA-S1-------S204S17-S222S242--S203----S327-
S203PhoneMP(BTA)-BTATTSBTABTA-S1-------S204S18-S223S243---S202---S327-
S204PhoneMP(BTA)RingingTeloffoffoff-S1----------------S202S205-S327-
S205PhoneMP(BTA)-Teloffoffoff-S1--------S20-S225S245--S206---S202S327-
S206PhoneMP(BTA)-TelTTSoffoff-S1--------S21-S226S246---S205--S203S327-
S207PhoneHVAC-offoffoffoff-S1------S222S209S2S197-S227--S208----S327-
S208PhoneHVAC-offTTSoffoff-S1------S223S209S3S198-S228---S207---S327-
S209PhoneHVACRingingTeloffoffoff-S1------S224---------S207S210-S327-
S210PhoneHVAC-Teloffoffoff-S1------S225-S20S200-S230--S211---S207S327-
S211PhoneHVAC-TelTTSoffoff-S1------S226-S21S201-S231---S210--S208S327-
S212PhoneHVACMPMPMPMP-S1------S222S214S7S197-S232--S213----S327-
S213PhoneHVACMPTTSMPMP-S1------S223S214S8S198-S233---S212---S327-
S214PhoneHVACRingingTeloffoffoff-S1------S224---------S212S215-S327-
S215PhoneHVAC-Teloffoffoff-S1------S225-S10S200-S235--S216---S212S327-
S216PhoneHVAC-TelTTSoffoff-S1------S226-S11S201-S236---S215--S213S327-
S217PhoneHVAC-RadioRadioRadioRadio-S1------S222S219S12S197-S237--S218----S327-
S218PhoneHVAC-RadioTTSRadioRadio-S1------S223S219S13S198-S238---S217---S327-
S219PhoneHVACRingingTeloffoffoff-S1------S224---------S217S220-S327-
S220PhoneHVAC-Teloffoffoff-S1------S225-S15S200-S240--S221---S217S327-
S221PhoneHVAC-TelTTSoffoff-S1------S226-S16S201-S241---S220--S218S327-
S222PhoneHVAC-BTABTABTABTA-S1-------S224S17S202-S242--S223----S327-
S223PhoneHVAC-BTATTSBTABTA-S1-------S224S18S203-S243---S222---S327-
S224PhoneHVACRingingTeloffoffoff-S1----------------S222S225-S327-
S225PhoneHVAC-Teloffoffoff-S1--------S20S205-S245--S226---S222S327-
S226PhoneHVAC-TelTTSoffoff-S1--------S21S206-S246---S225--S223S327-
S227PhoneNavi-offoffoffoff-S1------S242S229S2S197S207---S228----S327-
S228PhoneNavi-offTTSoffoff-S1------S243S229S3S198S208----S227---S327-
S229PhoneNaviRingingTeloffoffoff-S1------S244---------S227S230-S327-
S230PhoneNavi-Teloffoffoff-S1------S245-S20S200S210---S231---S227S327-
S231PhoneNavi-TelTTSoffoff-S1------S246-S21S201S211----S230--S228S327-
S232PhoneNaviMPMPMPMP-S1------S242S234S7S197S212---S233----S327-
S233PhoneNaviMPTTSMPMP-S1------S243S234S8S198S213----S232---S327-
S234PhoneNaviRingingTeloffoffoff-S1------S244---------S232S235-S327-
S235PhoneNavi-Teloffoffoff-S1------S245-S10S200S215---S236---S232S327-
S236PhoneNavi-TelTTSoffoff-S1------S246-S11S201S216----S235--S233S327-
S237PhoneNavi-RadioRadioRadioRadio-S1------S242S239S12S197S217---S238----S327-
S238PhoneNavi-RadioTTSRadioRadio-S1------S243S239S13S198S218----S237---S327-
S239PhoneNaviRingingTeloffoffoff-S1------S244---------S237S240-S327-
S240PhoneNavi-Teloffoffoff-S1------S245-S15S200S220---S241---S237S327-
S241PhoneNavi-TelTTSoffoff-S1------S246-S16S201S221----S240--S238S327-
S242PhoneNavi-BTABTABTABTA-S1-------S244S17S202S222---S243----S327-
S243PhoneNavi-BTATTSBTABTA-S1-------S244S18S203S223----S242---S327-
S244PhoneNaviRingingTeloffoffoff-S1----------------S242S245-S327-
S245PhoneNavi-Teloffoffoff-S1--------S20S205S225---S246---S242S327-
S246PhoneNavi-TelTTSoffoff-S1--------S21S206S226----S245--S243S327-
S247NaviMP-MPMPMPMP-S1------S252S249S7-S262---S248----S327-
S248NaviMP-MPTTSMPMP-S1------S253S249S8-S263----S247---S327-
S249NaviMPRingingTeloffoffoff-S1------S254---------S247S248-S327-
S250PhoneMP-Teloffoffoff-S1------S255-S10-S265---S251---S247S327-
S251PhoneMP-TelTTSoffoff-S1------S256-S11-S266----S250--S248S327-
S252NaviMP(BTA)-BTABTABTABTA-S1-------S254S17-S272---S253----S327-
S253NaviMP(BTA)-BTATTSBTABTA-S1-------S254S18-S273----S252---S327-
S254NaviMP(BTA)RingingTeloffoffoff-S1----------------S252S253-S327-
S255PhoneMP(BTA)-Teloffoffoff-S1--------S20-S275---S256---S252S327-
S256PhoneMP(BTA)-TelTTSoffoff-S1--------S21-S276----S255--S253S327-
S257NaviHVAC-offoffoffoff-S1------S272S259S2S247----S258----S327-
S258NaviHVAC-offTTSoffoff-S1------S273S259S3S248-----S257---S327-
S259NaviHVACRingingTeloffoffoff-S1------S274---------S257S260-S327-
S260PhoneHVAC-Teloffoffoff-S1------S275-S20S250----S261---S257S327-
S261PhoneHVAC-TelTTSoffoff-S1------S276-S21S251-----S260--S258S327-
S262NaviHVAC-MPMPMPMP-S1------S272S264S7S247----S263----S327-
S263NaviHVAC-MPTTSMPMP-S1------S273S264S8S248-----S262---S327-
S264NaviHVACRingingTeloffoffoff-S1------S274---------S262S265-S327-
S265PhoneHVAC-Teloffoffoff-S1------S275-S10S250----S266---S262S327-
S266PhoneHVAC-TelTTSoffoff-S1------S276-S11S251-----S265--S263S327-
S267NaviHVAC-RadioRadioRadioRadio-S1------S272S269S12S247----S268----S327-
S268NaviHVAC-RadioTTSRadioRadio-S1------S273S269S13S248-----S267---S327-
S269NaviHVACRingingTeloffoffoff-S1------S274---------S267S270-S327-
S270PhoneHVAC-Teloffoffoff-S1------S275-S15S250----S271---S267S327-
S271PhoneHVAC-TelTTSoffoff-S1------S276-S16S251-----S270--S268S327-
S272NaviHVAC-BTABTABTABTA-S1-------S274S17S252----S273----S327-
S273NaviHVAC-BTATTSBTABTA-S1-------S274S18S253-----S272---S327-
S274NaviHVACRingingTeloffoffoff-S1----------------S272S275-S327-
S275PhoneHVAC-Teloffoffoff-S1--------S20S255----S276---S272S327-
S276PhoneHVAC-TelTTSoffoff-S1--------S21S256-----S275--S273S327-
S277OtherMP-MPMPMPMP-S1------S282S279S7-S292S312--S278----S327-
S278OtherMP-MPTTSMPMP-S1------S283S279S8-S293S313---S277---S327-
S279OtherMPRingingTeloffoffoff-S1------S284---------S277S280-S327-
S280PhoneMP-Teloffoffoff-S1------S285-S10-S295S317--S281---S277S327-
S281PhoneMP-TelTTSoffoff-S1------S286-S11-S296S318---S280--S278S327-
S282OtherMP(BTA)-BTABTABTABTA-S1-------S284S12-S302S322--S283----S327-
S283OtherMP(BTA)-BTATTSBTABTA-S1-------S284S13-S303S323---S282---S327-
S284OtherMP(BTA)RingingTeloffoffoff-S1----------------S282S285-S327-
S285PhoneMP(BTA)-Teloffoffoff-S1--------S20-S305S325--S286---S282S327-
S286PhoneMP(BTA)-TelTTSoffoff-S1--------S21-S306S326---S285--S283S327-
S287OtherHVAC-offoffoffoff-S1------S302S289S2S277-S307--S288----S327-
S288OtherHVAC-offTTSoffoff-S1------S303S289S3S278-S308---S287---S327-
S289OtherHVACRingingTeloffoffoff-S1------S304---------S287S290-S327-
S290PhoneHVAC-Teloffoffoff-S1------S305-S20S280-S310--S291---S287S327-
S291PhoneHVAC-TelTTSoffoff-S1------S306-S21S281-S311---S290--S288S327-
S292OtherHVAC-MPMPMPMP-S1------S302S294S7S277-S312--S293----S327-
S293OtherHVAC-MPTTSMPMP-S1------S303S294S8S278-S313---S292---S327-
S294OtherHVACRingingTeloffoffoff-S1------S304---------S292S295-S327-
S295PhoneHVAC-Teloffoffoff-S1------S305-S10S278-S315--S296---S292S327-
S296PhoneHVAC-TelTTSoffoff-S1------S306-S11S278-S316---S295--S293S327-
S297OtherHVAC-RadioRadioRadioRadio-S1------S302S299S12S277-S317--S298----S327-
S298OtherHVAC-RadioTTSRadioRadio-S1------S303S299S13S278-S318---S297---S327-
S299OtherHVACRingingTeloffoffoff-S1------S304---------S297S300-S327-
S300PhoneHVAC-Teloffoffoff-S1------S305-S15S280-S320--S301---S297S327-
S301PhoneHVAC-TelTTSoffoff-S1------S306-S16S281-S321---S300--S298S327-
S302OtherHVAC-BTABTABTABTA-S1-------S304S17S282-S322--S303----S327-
S303OtherHVAC-BTATTSBTABTA-S1-------S304S18S283-S323---S302---S327-
S304OtherHVACRingingTeloffoffoff-S1----------------S302S305-S327-
S305PhoneHVAC-Teloffoffoff-S1--------S20S285-S325--S306---S302S327-
S306PhoneHVAC-TelTTSoffoff-S1--------S21S286-S326---S305--S303S327-
S307OtherNavi-offoffoffoff-S1------S322S309S2S287S287---S308----S327-
S308OtherNavi-offTTSoffoff-S1------S323S309S3S288S288----S307---S327-
S309OtherNaviRingingTeloffoffoff-S1------S324---------S307S310-S327-
S310PhoneNavi-Teloffoffoff-S1------S325-S20S290S290---S311---S307S327-
S311PhoneNavi-TelTTSoffoff-S1------S326-S21S291S291----S310--S308S327-
S312OtherNavi-MPMPMPMP-S1------S322S314S7S292S292---S313----S327-
S313OtherNavi-MPTTSMPMP-S1------S323S314S8S293S293----S312---S327-
S314OtherNaviRingingTeloffoffoff-S1------S324---------S312S315-S327-
S315PhoneNavi-Teloffoffoff-S1------S325-S10S295S295---S316---S312S327-
S316PhoneNavi-TelTTSoffoff-S1------S326-S11S296S296----S315--S313S327-
S317OtherNavi-RadioRadioRadioRadio-S1------S322S319S12S297S297---S318----S327-
S318OtherNavi-RadioTTSRadioRadio-S1------S323S319S13S298S298----S317---S327-
S319OtherNaviRingingTeloffoffoff-S1------S324---------S317S320-S327-
S320PhoneNavi-Teloffoffoff-S1------S325-S15S300S300---S321---S317S327-
S321PhoneNavi-TelTTSoffoff-S1------S326-S16S301S301----S320--S318S327-
S322OtherNavi-BTABTABTABTA-S1-------S324S17S282S302---S323----S327-
S323OtherNavi-BTATTSBTABTA-S1-------S324S18S283S303----S322---S327-
S324OtherNaviRingingTeloffoffoff-S1----------------S322S325-S327-
S325PhoneNavi-Teloffoffoff-S1--------S20S285S305---S326---S322S327-
S326PhoneNavi-TelTTSoffoff-S1--------S21S286S306----S325--S323S327-
S327anyanyanyanyWarnanyany-S1--------------------S(previous)
diff --git a/doc/api-ref/html/annotated.html b/doc/api-ref/html/annotated.html new file mode 100644 index 0000000..c8aeca2 --- /dev/null +++ b/doc/api-ref/html/annotated.html @@ -0,0 +1,103 @@ + + + + + + + +Sound Manager: Data Structures + + + + + + + + + + + + + + +
+
+ + + + + + +
+
Sound Manager +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Data Structures
+
+
+
Here are the data structures with brief descriptions:
+ + + +
 Cevent
 CLibSoundmanager
+
+
+
+ + + + diff --git a/doc/api-ref/html/annotated_dup.js b/doc/api-ref/html/annotated_dup.js new file mode 100644 index 0000000..9ab7e04 --- /dev/null +++ b/doc/api-ref/html/annotated_dup.js @@ -0,0 +1,5 @@ +var annotated_dup = +[ + [ "event", "structevent.html", "structevent" ], + [ "LibSoundmanager", "class_lib_soundmanager.html", "class_lib_soundmanager" ] +]; \ No newline at end of file diff --git a/doc/api-ref/html/bc_s.png b/doc/api-ref/html/bc_s.png new file mode 100644 index 0000000..224b29a Binary files /dev/null and b/doc/api-ref/html/bc_s.png differ diff --git a/doc/api-ref/html/bdwn.png b/doc/api-ref/html/bdwn.png new file mode 100644 index 0000000..940a0b9 Binary files /dev/null and b/doc/api-ref/html/bdwn.png differ diff --git a/doc/api-ref/html/class_lib_soundmanager.html b/doc/api-ref/html/class_lib_soundmanager.html new file mode 100644 index 0000000..013af0d --- /dev/null +++ b/doc/api-ref/html/class_lib_soundmanager.html @@ -0,0 +1,532 @@ + + + + + + + +Sound Manager: LibSoundmanager Class Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
Sound Manager +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
LibSoundmanager Class Reference
+
+
+ +

#include <libsoundmanager.hpp>

+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 LibSoundmanager (const int port, const std::string &token)
 
 ~LibSoundmanager ()
 
void register_callback (void(*event_cb)(const std::string &event, struct json_object *event_contents), void(*reply_cb)(struct json_object *reply_contents))
 
int run_eventloop ()
 
int call (const std::string &verb, struct json_object *arg)
 
int call_sync (const std::string &verb, struct json_object *arg, struct json_object *ret)
 
int subscribe (const std::string &event_name)
 
int unsubscribe (const std::string &event_name)
 
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)
 
+

Detailed Description

+
+

Definition at line 62 of file libsoundmanager.hpp.

+

Constructor & Destructor Documentation

+ +

◆ LibSoundmanager()

+ +
+
+ + + + + + + + + + + + + + + + + + +
LibSoundmanager::LibSoundmanager (const int port,
const std::string & token 
)
+
+ +
+
+ +

◆ ~LibSoundmanager()

+ +
+
+ + + + + + + +
LibSoundmanager::~LibSoundmanager ()
+
+ +

Definition at line 93 of file libsoundmanager.cpp.

+ +
+
+

Member Function Documentation

+ +

◆ call()

+ +
+
+ + + + + + + + + + + + + + + + + + +
int LibSoundmanager::call (const std::string & verb,
struct json_object * arg 
)
+
+

This function calls the API of Audio Manager via WebSocket

+

Parameters

+
    +
  • verb [in] : This argument should be specified to the API name (e.g. "connect")
  • +
  • arg [in] : This argument should be specified to the argument of API. And this argument expects JSON object
  • +
+

Rreturn

+
    +
  • Returns 0 on success or -1 in case of error.
  • +
+

Note

+

To call Audio Manager's APIs, the application should set its function name, arguments to JSON format.

+ +

Definition at line 217 of file libsoundmanager.cpp.

+ +
+
+ +

◆ call_sync()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int LibSoundmanager::call_sync (const std::string & verb,
struct json_object * arg,
struct json_object * ret 
)
+
+ +

Definition at line 236 of file libsoundmanager.cpp.

+ +
+
+ +

◆ on_call()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void LibSoundmanager::on_call (void * closure,
const char * api,
const char * verb,
struct afb_wsj1_msg * msg 
)
+
+ +

Definition at line 347 of file libsoundmanager.cpp.

+ +
+
+ +

◆ on_event()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void LibSoundmanager::on_event (void * closure,
const char * event,
struct afb_wsj1_msg * msg 
)
+
+ +

Definition at line 358 of file libsoundmanager.cpp.

+ +
+
+ +

◆ on_hangup()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void LibSoundmanager::on_hangup (void * closure,
struct afb_wsj1 * wsj 
)
+
+ +

Definition at line 342 of file libsoundmanager.cpp.

+ +
+
+ +

◆ on_reply()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void LibSoundmanager::on_reply (void * closure,
struct afb_wsj1_msg * msg 
)
+
+ +

Definition at line 369 of file libsoundmanager.cpp.

+ +
+
+ +

◆ register_callback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void LibSoundmanager::register_callback (void(*)(const std::string &event, struct json_object *event_contents) event_cb,
void(*)(struct json_object *reply_contents) reply_cb 
)
+
+

This function register callback function for reply/event message from sound manager

+

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
  • +
+

Rreturn

+
    +
  • Returns 0 on success or -1 in case of error.
  • +
+

Note

+

Event callback is invoked by sound manager for event you subscribed. If you would like to get event, please call subscribe function before/after this function

+ +

Definition at line 119 of file libsoundmanager.cpp.

+ +
+
+ +

◆ run_eventloop()

+ +
+
+ + + + + + + +
int LibSoundmanager::run_eventloop ()
+
+

This function start receiving the reply/event message from sound manager

+

Parameters

+

Nothing

Rreturn

+
    +
  • Returns thread_id on success or -1 in case of error.
  • +
+

Note

+ +

Definition at line 182 of file libsoundmanager.cpp.

+ +
+
+ +

◆ subscribe()

+ +
+
+ + + + + + + + +
int LibSoundmanager::subscribe (const std::string & event_name)
+
+

Register callback function for each event

+

Parameters

+
    +
  • event_name [in] : This argument should be specified to the event name
  • +
+

Rreturn

+
    +
  • Returns 0 on success or -1 in case of error.
  • +
+

Note

+

This function enables to get an event to your callback function. Regarding the list of event name, please refer to CommandSender API and RountingSender API.

+ +

Definition at line 255 of file libsoundmanager.cpp.

+ +
+
+ +

◆ unsubscribe()

+ +
+
+ + + + + + + + +
int LibSoundmanager::unsubscribe (const std::string & event_name)
+
+

Unregister callback function for each event

+

Parameters

+
    +
  • event_name [in] : This argument should be specified to the event name
  • +
+

Rreturn

+
    +
  • Returns 0 on success or -1 in case of error.
  • +
+

Note

+

This function disables to get an event to your callback function.

+ +

Definition at line 284 of file libsoundmanager.cpp.

+ +
+
+
The documentation for this class was generated from the following files: +
+
+ + + + diff --git a/doc/api-ref/html/class_lib_soundmanager.js b/doc/api-ref/html/class_lib_soundmanager.js new file mode 100644 index 0000000..ed52e34 --- /dev/null +++ b/doc/api-ref/html/class_lib_soundmanager.js @@ -0,0 +1,15 @@ +var class_lib_soundmanager = +[ + [ "LibSoundmanager", "class_lib_soundmanager.html#a289a9d6ff8be95ae78660f239d962d79", null ], + [ "~LibSoundmanager", "class_lib_soundmanager.html#abf861908e3d6d85d2b3c08683b08f934", null ], + [ "call", "class_lib_soundmanager.html#a1fe952a4dabbab6126cc23e36c79c773", null ], + [ "call_sync", "class_lib_soundmanager.html#ae5b83ce661b1d785de2518ca10113956", null ], + [ "on_call", "class_lib_soundmanager.html#a3ba2255cb1d29c77c4c6a2267949eda0", null ], + [ "on_event", "class_lib_soundmanager.html#a86ef62e7847cd20e9cafbc1f6c017b3e", null ], + [ "on_hangup", "class_lib_soundmanager.html#a71a8165cb15c7815aa95a8955f5cd7f6", null ], + [ "on_reply", "class_lib_soundmanager.html#a69b4f10e509605a570cc52c795bc9d51", null ], + [ "register_callback", "class_lib_soundmanager.html#a560edf9ae3b1e367ad4cbb31c7021d74", null ], + [ "run_eventloop", "class_lib_soundmanager.html#abe71d3531e7888f47185a601b284e729", null ], + [ "subscribe", "class_lib_soundmanager.html#a9cd7c5470cb135f9b1aa56d790c7e91e", null ], + [ "unsubscribe", "class_lib_soundmanager.html#a21060844aa7efad6473b6104546afb06", null ] +]; \ No newline at end of file diff --git a/doc/api-ref/html/classes.html b/doc/api-ref/html/classes.html new file mode 100644 index 0000000..ccaae38 --- /dev/null +++ b/doc/api-ref/html/classes.html @@ -0,0 +1,107 @@ + + + + + + + +Sound Manager: Data Structure Index + + + + + + + + + + + + + + +
+
+ + + + + + +
+
Sound Manager +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Data Structure Index
+
+
+
e | l
+ + + + + +
  e  
+
  l  
+
event   LibSoundmanager   
+
e | l
+
+
+ + + + diff --git a/doc/api-ref/html/closed.png b/doc/api-ref/html/closed.png new file mode 100644 index 0000000..98cc2c9 Binary files /dev/null and b/doc/api-ref/html/closed.png differ diff --git a/doc/api-ref/html/dir_4ed4f07a8451d34bdd1d92ed62b81ed4.html b/doc/api-ref/html/dir_4ed4f07a8451d34bdd1d92ed62b81ed4.html new file mode 100644 index 0000000..b3d3d7f --- /dev/null +++ b/doc/api-ref/html/dir_4ed4f07a8451d34bdd1d92ed62b81ed4.html @@ -0,0 +1,104 @@ + + + + + + + +Sound Manager: SoundManagerBinding/include/libsoundmanager Directory Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
Sound Manager +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
libsoundmanager Directory Reference
+
+
+ + + + +

+Files

file  libsoundmanager.hpp [code]
 
+
+
+ + + + diff --git a/doc/api-ref/html/dir_4ed4f07a8451d34bdd1d92ed62b81ed4.js b/doc/api-ref/html/dir_4ed4f07a8451d34bdd1d92ed62b81ed4.js new file mode 100644 index 0000000..47bb19a --- /dev/null +++ b/doc/api-ref/html/dir_4ed4f07a8451d34bdd1d92ed62b81ed4.js @@ -0,0 +1,4 @@ +var dir_4ed4f07a8451d34bdd1d92ed62b81ed4 = +[ + [ "libsoundmanager.hpp", "libsoundmanager_8hpp.html", "libsoundmanager_8hpp" ] +]; \ No newline at end of file diff --git a/doc/api-ref/html/dir_574c53d22ed4def281d320d129dd43c9.html b/doc/api-ref/html/dir_574c53d22ed4def281d320d129dd43c9.html new file mode 100644 index 0000000..9af5eb6 --- /dev/null +++ b/doc/api-ref/html/dir_574c53d22ed4def281d320d129dd43c9.html @@ -0,0 +1,106 @@ + + + + + + + +Sound Manager: SoundManagerBinding/libsoundmanager Directory Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
Sound Manager +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
libsoundmanager Directory Reference
+
+
+ + + + + + +

+Files

file  libsoundmanager.cpp [code]
 
file  test.cpp [code]
 
+
+
+ + + + diff --git a/doc/api-ref/html/dir_574c53d22ed4def281d320d129dd43c9.js b/doc/api-ref/html/dir_574c53d22ed4def281d320d129dd43c9.js new file mode 100644 index 0000000..2b5132f --- /dev/null +++ b/doc/api-ref/html/dir_574c53d22ed4def281d320d129dd43c9.js @@ -0,0 +1,5 @@ +var dir_574c53d22ed4def281d320d129dd43c9 = +[ + [ "libsoundmanager.cpp", "libsoundmanager_8cpp.html", "libsoundmanager_8cpp" ], + [ "test.cpp", "test_8cpp.html", "test_8cpp" ] +]; \ No newline at end of file diff --git a/doc/api-ref/html/dir_85932083476b47061c69d172796990a3.html b/doc/api-ref/html/dir_85932083476b47061c69d172796990a3.html new file mode 100644 index 0000000..72d6a35 --- /dev/null +++ b/doc/api-ref/html/dir_85932083476b47061c69d172796990a3.html @@ -0,0 +1,104 @@ + + + + + + + +Sound Manager: SoundManagerBinding/soundmanager_binging Directory Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
Sound Manager +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
soundmanager_binging Directory Reference
+
+
+ + + + +

+Files

file  soundmanager.c [code]
 
+
+
+ + + + diff --git a/doc/api-ref/html/dir_85932083476b47061c69d172796990a3.js b/doc/api-ref/html/dir_85932083476b47061c69d172796990a3.js new file mode 100644 index 0000000..1e22727 --- /dev/null +++ b/doc/api-ref/html/dir_85932083476b47061c69d172796990a3.js @@ -0,0 +1,4 @@ +var dir_85932083476b47061c69d172796990a3 = +[ + [ "soundmanager.c", "soundmanager_8c.html", "soundmanager_8c" ] +]; \ No newline at end of file diff --git a/doc/api-ref/html/dir_b967abc00200c877344b4504e6cbcf3f.html b/doc/api-ref/html/dir_b967abc00200c877344b4504e6cbcf3f.html new file mode 100644 index 0000000..cd5167f --- /dev/null +++ b/doc/api-ref/html/dir_b967abc00200c877344b4504e6cbcf3f.html @@ -0,0 +1,108 @@ + + + + + + + +Sound Manager: SoundManagerBinding Directory Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
Sound Manager +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
SoundManagerBinding Directory Reference
+
+
+ + + + + + + + +

+Directories

directory  include
 
directory  libsoundmanager
 
directory  soundmanager_binging
 
+
+
+ + + + diff --git a/doc/api-ref/html/dir_b967abc00200c877344b4504e6cbcf3f.js b/doc/api-ref/html/dir_b967abc00200c877344b4504e6cbcf3f.js new file mode 100644 index 0000000..f0a5be1 --- /dev/null +++ b/doc/api-ref/html/dir_b967abc00200c877344b4504e6cbcf3f.js @@ -0,0 +1,6 @@ +var dir_b967abc00200c877344b4504e6cbcf3f = +[ + [ "include", "dir_c2dc0533631c44dc5d574e7be055c656.html", "dir_c2dc0533631c44dc5d574e7be055c656" ], + [ "libsoundmanager", "dir_574c53d22ed4def281d320d129dd43c9.html", "dir_574c53d22ed4def281d320d129dd43c9" ], + [ "soundmanager_binging", "dir_85932083476b47061c69d172796990a3.html", "dir_85932083476b47061c69d172796990a3" ] +]; \ No newline at end of file diff --git a/doc/api-ref/html/dir_c2dc0533631c44dc5d574e7be055c656.html b/doc/api-ref/html/dir_c2dc0533631c44dc5d574e7be055c656.html new file mode 100644 index 0000000..6131795 --- /dev/null +++ b/doc/api-ref/html/dir_c2dc0533631c44dc5d574e7be055c656.html @@ -0,0 +1,104 @@ + + + + + + + +Sound Manager: SoundManagerBinding/include Directory Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
Sound Manager +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
include Directory Reference
+
+
+ + + + +

+Directories

directory  libsoundmanager
 
+
+
+ + + + diff --git a/doc/api-ref/html/dir_c2dc0533631c44dc5d574e7be055c656.js b/doc/api-ref/html/dir_c2dc0533631c44dc5d574e7be055c656.js new file mode 100644 index 0000000..07c80e4 --- /dev/null +++ b/doc/api-ref/html/dir_c2dc0533631c44dc5d574e7be055c656.js @@ -0,0 +1,4 @@ +var dir_c2dc0533631c44dc5d574e7be055c656 = +[ + [ "libsoundmanager", "dir_4ed4f07a8451d34bdd1d92ed62b81ed4.html", "dir_4ed4f07a8451d34bdd1d92ed62b81ed4" ] +]; \ No newline at end of file diff --git a/doc/api-ref/html/doc.png b/doc/api-ref/html/doc.png new file mode 100644 index 0000000..17edabf Binary files /dev/null and b/doc/api-ref/html/doc.png differ diff --git a/doc/api-ref/html/doxygen.css b/doc/api-ref/html/doxygen.css new file mode 100644 index 0000000..4f1ab91 --- /dev/null +++ b/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/doc/api-ref/html/doxygen.png b/doc/api-ref/html/doxygen.png new file mode 100644 index 0000000..3ff17d8 Binary files /dev/null and b/doc/api-ref/html/doxygen.png differ diff --git a/doc/api-ref/html/dynsections.js b/doc/api-ref/html/dynsections.js new file mode 100644 index 0000000..1e6bf07 --- /dev/null +++ b/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 + + + + + + +Sound Manager: File List + + + + + + + + + + + + + + +
+
+ + + + + + +
+
Sound Manager +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
File List
+
+
+
Here is a list of all files with brief descriptions:
+
+
+ + + + diff --git a/doc/api-ref/html/files.js b/doc/api-ref/html/files.js new file mode 100644 index 0000000..4d99c33 --- /dev/null +++ b/doc/api-ref/html/files.js @@ -0,0 +1,4 @@ +var files = +[ + [ "SoundManagerBinding", "dir_b967abc00200c877344b4504e6cbcf3f.html", "dir_b967abc00200c877344b4504e6cbcf3f" ] +]; \ No newline at end of file diff --git a/doc/api-ref/html/folderclosed.png b/doc/api-ref/html/folderclosed.png new file mode 100644 index 0000000..bb8ab35 Binary files /dev/null and b/doc/api-ref/html/folderclosed.png differ diff --git a/doc/api-ref/html/folderopen.png b/doc/api-ref/html/folderopen.png new file mode 100644 index 0000000..d6c7f67 Binary files /dev/null and b/doc/api-ref/html/folderopen.png differ diff --git a/doc/api-ref/html/functions.html b/doc/api-ref/html/functions.html new file mode 100644 index 0000000..5d6c445 --- /dev/null +++ b/doc/api-ref/html/functions.html @@ -0,0 +1,137 @@ + + + + + + + +Sound Manager: Data Fields + + + + + + + + + + + + + + +
+
+ + + + + + +
+
Sound Manager +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all struct and union fields with links to the structures/unions they belong to:
+
+
+ + + + diff --git a/doc/api-ref/html/functions_func.html b/doc/api-ref/html/functions_func.html new file mode 100644 index 0000000..385add2 --- /dev/null +++ b/doc/api-ref/html/functions_func.html @@ -0,0 +1,131 @@ + + + + + + + +Sound Manager: Data Fields - Functions + + + + + + + + + + + + + + +
+
+ + + + + + +
+
Sound Manager +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
+ + + + diff --git a/doc/api-ref/html/functions_vars.html b/doc/api-ref/html/functions_vars.html new file mode 100644 index 0000000..030f1ea --- /dev/null +++ b/doc/api-ref/html/functions_vars.html @@ -0,0 +1,101 @@ + + + + + + + +Sound Manager: Data Fields - Variables + + + + + + + + + + + + + + +
+
+ + + + + + +
+
Sound Manager +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
+ + + + diff --git a/doc/api-ref/html/globals.html b/doc/api-ref/html/globals.html new file mode 100644 index 0000000..ebb2eae --- /dev/null +++ b/doc/api-ref/html/globals.html @@ -0,0 +1,146 @@ + + + + + + + +Sound Manager: Globals + + + + + + + + + + + + + + +
+
+ + + + + + +
+
Sound Manager +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:
+
+
+ + + + diff --git a/doc/api-ref/html/globals_defs.html b/doc/api-ref/html/globals_defs.html new file mode 100644 index 0000000..e1d3a04 --- /dev/null +++ b/doc/api-ref/html/globals_defs.html @@ -0,0 +1,128 @@ + + + + + + + +Sound Manager: Globals + + + + + + + + + + + + + + +
+
+ + + + + + +
+
Sound Manager +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
+ + + + diff --git a/doc/api-ref/html/globals_func.html b/doc/api-ref/html/globals_func.html new file mode 100644 index 0000000..0c13d5f --- /dev/null +++ b/doc/api-ref/html/globals_func.html @@ -0,0 +1,104 @@ + + + + + + + +Sound Manager: Globals + + + + + + + + + + + + + + +
+
+ + + + + + +
+
Sound Manager +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
+ + + + diff --git a/doc/api-ref/html/globals_vars.html b/doc/api-ref/html/globals_vars.html new file mode 100644 index 0000000..a74e481 --- /dev/null +++ b/doc/api-ref/html/globals_vars.html @@ -0,0 +1,104 @@ + + + + + + + +Sound Manager: Globals + + + + + + + + + + + + + + +
+
+ + + + + + +
+
Sound Manager +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
+ + + + diff --git a/doc/api-ref/html/index.html b/doc/api-ref/html/index.html new file mode 100644 index 0000000..9319f4a --- /dev/null +++ b/doc/api-ref/html/index.html @@ -0,0 +1,97 @@ + + + + + + + +Sound Manager: Main Page + + + + + + + + + + + + + + +
+
+ + + + + + +
+
Sound Manager +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Sound Manager Documentation
+
+
+
+
+ + + + diff --git a/doc/api-ref/html/jquery.js b/doc/api-ref/html/jquery.js new file mode 100644 index 0000000..f5343ed --- /dev/null +++ b/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(;b40){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(;b40&&b0[0]&&b0[b1-1])||b1===0||bF.isArray(b0));if(b3){for(;b21?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
a";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>",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="
";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="
t
";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="
";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-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=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=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=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;bCbA){bH.push({elem:this,matches:bz.slice(bA)})}for(bC=0;bC0?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;e0};by.find=function(bX,e,bY){var bW,bS,bU,bT,bV,bR;if(!bX){return[]}for(bS=0,bU=bE.order.length;bS":function(bW,bR){var bV,bU=typeof bR==="string",bS=0,e=bW.length;if(bU&&!bQ.test(bR)){bR=bR.toLowerCase();for(;bS=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 bRe[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=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.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="";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="

";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="
";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;bT0){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;bT0){for(bB=bA;bB=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-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=/",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_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
","
"]}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>");try{for(var bw=0,bv=this.length;bw1&&bw0?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>");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]===""&&!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=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)<[^<]*)*<\/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=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("
").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.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").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"?"":"")+"");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;h0){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('
').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
');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(hl.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');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=$(' + + +
+ +
+
libsoundmanager.cpp File Reference
+
+
+
#include <stdarg.h>
+#include <sys/socket.h>
+#include <iostream>
+#include <algorithm>
+#include <thread>
+#include <errno.h>
+#include <libsoundmanager/libsoundmanager.hpp>
+
+

Go to the source code of this file.

+
+ + + + + +

+Macros

#define ELOG(args, ...)   _ELOG(__FUNCTION__,__LINE__,args,##__VA_ARGS__)
 
#define DLOG(args, ...)   _DLOG(__FUNCTION__,__LINE__,args,##__VA_ARGS__)
 
+

Macro Definition Documentation

+ +

◆ DLOG

+ +
+
+ + + + + + + + + + + + + + + + + + +
#define DLOG( args,
 ... 
)   _DLOG(__FUNCTION__,__LINE__,args,##__VA_ARGS__)
+
+ +

Definition at line 26 of file libsoundmanager.cpp.

+ +
+
+ +

◆ ELOG

+ +
+
+ + + + + + + + + + + + + + + + + + +
#define ELOG( args,
 ... 
)   _ELOG(__FUNCTION__,__LINE__,args,##__VA_ARGS__)
+
+ +

Definition at line 25 of file libsoundmanager.cpp.

+ +
+
+ + + + + + diff --git a/doc/api-ref/html/libsoundmanager_8cpp.js b/doc/api-ref/html/libsoundmanager_8cpp.js new file mode 100644 index 0000000..b599e84 --- /dev/null +++ b/doc/api-ref/html/libsoundmanager_8cpp.js @@ -0,0 +1,5 @@ +var libsoundmanager_8cpp = +[ + [ "DLOG", "libsoundmanager_8cpp.html#a4e42b2f5af2174dd24f958351becf63d", null ], + [ "ELOG", "libsoundmanager_8cpp.html#a797aa3053bd6a29819d44f8fad8a5eca", null ] +]; \ No newline at end of file diff --git a/doc/api-ref/html/libsoundmanager_8cpp_source.html b/doc/api-ref/html/libsoundmanager_8cpp_source.html new file mode 100644 index 0000000..43e6d5d --- /dev/null +++ b/doc/api-ref/html/libsoundmanager_8cpp_source.html @@ -0,0 +1,116 @@ + + + + + + + +Sound Manager: SoundManagerBinding/libsoundmanager/libsoundmanager.cpp Source File + + + + + + + + + + + + + + +
+
+ + + + + + +
+
Sound Manager +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
libsoundmanager.cpp
+
+
+Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #include <stdarg.h>
18 #include <sys/socket.h>
19 #include <iostream>
20 #include <algorithm>
21 #include <thread>
22 #include <errno.h>
24 
25 #define ELOG(args,...) _ELOG(__FUNCTION__,__LINE__,args,##__VA_ARGS__)
26 #define DLOG(args,...) _DLOG(__FUNCTION__,__LINE__,args,##__VA_ARGS__)
27 
28 using namespace std;
29 
30 static void _DLOG(const char* func, const int line, const char* log, ...);
31 static void _ELOG(const char* func, const int line, const char* log, ...);
32 static bool has_verb(const string& verb);
33 static const char API[] = "soundmanager";
34 
35 static void _on_hangup_static(void *closure, struct afb_wsj1 *wsj)
36 {
37  static_cast<LibSoundmanager*>(closure)->on_hangup(NULL,wsj);
38 }
39 
40 static void _on_call_static(void *closure, const char *api, const char *verb, struct afb_wsj1_msg *msg)
41 {
42  /* LibSoundmanager is not called from other process */
43 }
44 
45 static void _on_event_static(void* closure, const char* event, struct afb_wsj1_msg *msg)
46 {
47  static_cast<LibSoundmanager*>(closure)->on_event(NULL,event,msg);
48 }
49 
50 static void _on_reply_static(void *closure, struct afb_wsj1_msg *msg)
51 {
52  static_cast<LibSoundmanager*>(closure)->on_reply(NULL,msg);
53 }
54 
55 
70 LibSoundmanager::LibSoundmanager(const int port, const string& token)
71 {
72  int ret;
73  if(port > 0 && token.size() > 0)
74  {
75  mport = port;
76  mtoken = token;
77  }
78  else
79  {
80  ELOG("port and token should be > 0, Initial port and token uses.");
81  }
82 
83  ret = initialize_websocket();
84  if(ret != 0 )
85  {
86  ELOG("Failed to initialize websocket");
87  }
88  else{
89  DLOG("Initialized");
90  }
91 }
92 
94 {
95  if(mploop)
96  {
97  sd_event_unref(mploop);
98  }
99  if(sp_websock != NULL)
100  {
101  free(sp_websock);
102  }
103 }
104 
120  void (*event_cb)(const std::string& event, struct json_object* event_contents),
121  void (*reply_cb)(struct json_object* reply_contents))
122 {
123  onEvent = event_cb;
124  onReply = reply_cb;
125 }
126 
127 int LibSoundmanager::initialize_websocket()
128 {
129  mploop = NULL;
130  onEvent = nullptr;
131  onReply = nullptr;
132  int ret = sd_event_default(&mploop);
133  if(ret < 0)
134  {
135  ELOG("Failed to create event loop");
136  goto END;
137  }
138  /* Initialize interface from websocket */
139 
140  minterface.on_hangup = _on_hangup_static;
141  minterface.on_call = _on_call_static; /* Is this necessary? */
142  minterface.on_event = _on_event_static;
143  muri += "ws://localhost:" + to_string(mport) + "/api?token=" + mtoken; /*To be modified*/
144  sp_websock = afb_ws_client_connect_wsj1(mploop, muri.c_str(), &minterface, this);
145  if(sp_websock == NULL)
146  {
147  ELOG("Failed to create websocket connection");
148  goto END;
149  }
150 
151  /* creates the evsrc */
152  //ret = sd_event_add_io(mploop,&mevent_src, sp_websock->fd, EPOLLIN, event_callback, NULL);
153 
154  return 0;
155 END:
156  if(mploop)
157  {
158  sd_event_unref(mploop);
159  }
160  return -1;
161 }
162 
163 static void *event_loop_run(void *args)
164 {
165  struct sd_event* loop = (struct sd_event*)(args);
166  DLOG("start eventloop");
167  for(;;)
168  sd_event_run(loop, 30000000);
169 }
170 
183 {
184  if(mploop && sp_websock)
185  {
186  pthread_t thread_id;
187  int ret = pthread_create(&thread_id, NULL, event_loop_run, mploop);
188  if(ret != 0)
189  {
190  ELOG("Cannot run eventloop due to error:%d", errno);
191  return -1;
192  }
193  else
194  return thread_id;
195  }
196  else
197  {
198  ELOG("Connecting is not established yet");
199  return -1;
200  }
201 }
202 
217 int LibSoundmanager::call(const string& verb, struct json_object* arg)
218 {
219  int ret;
220  if(!sp_websock)
221  {
222  return -1;
223  }
224  if (!has_verb(verb))
225  {
226  ELOG("verb doesn't exit");
227  return -1;
228  }
229  ret = afb_wsj1_call_j(sp_websock, API, verb.c_str(), arg, _on_reply_static, this);
230  if (ret < 0) {
231  ELOG("Failed to call verb:%s",verb.c_str());
232  }
233  return ret;
234 }
235 
236 int LibSoundmanager::call_sync(const string& verb, struct json_object* arg, struct json_object* ret)
237 {
238  /* I haven't implemented yet */
239 }
240 
255 int LibSoundmanager::subscribe(const string& event_name)
256 {
257  if(!sp_websock)
258  {
259  return -1;
260  }
261  struct json_object* j_obj = json_object_new_object();
262  json_object_object_add(j_obj, "event", json_object_new_string(event_name.c_str()));
263 
264  int ret = afb_wsj1_call_j(sp_websock, API, "subscribe", j_obj, _on_reply_static, this);
265  if (ret < 0) {
266  ELOG("Failed to call verb:%s",__FUNCTION__);
267  }
268  return ret;
269 }
270 
284 int LibSoundmanager::unsubscribe(const string& event_name)
285 {
286  if(!sp_websock)
287  {
288  return -1;
289  }
290  struct json_object* j_obj = json_object_new_object();
291  json_object_object_add(j_obj, "event", json_object_new_string(event_name.c_str()));
292 
293  int ret = afb_wsj1_call_j(sp_websock, API, "unsubscribe", j_obj, _on_reply_static, this);
294  if (ret < 0) {
295  ELOG("Failed to call verb:%s",__FUNCTION__);
296  }
297  return ret;
298 }
299 
300 am_Error_e LibSoundmanager::connect(const am_sourceID_t sourceID, const am_sinkID_t sinkID, am_mainConnectionID_t& mainConnectionID)
301 {
302  /*int ret;
303  char *key;
304  rc = asprintf(&key, "%d:%s/%s", ++num, api, "connect");
305  ret = afb_wsj1_call_s(wsj1, api, verb, object, on_reply, key);
306  if(ret < 0)
307  {
308  fprintf(stderr, "calling %s/%s(%s) failed: %m\n", api, verb, object);
309 
310  }*/
311  /* open the json scripts */
312  // get mainconnedction ID */
313  //mainConnectionID = xx;
314  return E_OK;
315 }
316 
317 am_Error_e LibSoundmanager::disconnect(const am_mainConnectionID_t mainConnectionID)
318 {
319  return E_OK;
320 }
321 
322 /*const struct afb_wsj1* LibSoundmanager::get_websocket_handler()
323 {
324  if(sp_websock)
325  {
326  return sp_websock;
327  }
328  return nullptr;
329 }
330 
331 const struct sd_event* LibSoundmanager::get_sd_event()
332 {
333  if(mploop)
334  {
335  return mploop;
336  }
337  return nullptr;
338 }*/
339 
340 /************* Callback Function *************/
341 
342 void LibSoundmanager::on_hangup(void *closure, struct afb_wsj1 *wsj)
343 {
344  DLOG("%s called", __FUNCTION__);
345 }
346 
347 void LibSoundmanager::on_call(void *closure, const char *api, const char *verb, struct afb_wsj1_msg *msg)
348 {
349 }
350 
351 /*
352 * event is like "soundmanager/newMainConnection"
353 * msg is like {"event":"soundmanager\/newMainConnection","data":{"mainConnectionID":3,"sourceID":101,"sinkID":100,"delay":0,"connectionState":4},"jtype":"afb-event"})}
354 * ^key^ ^^^^^^^^^^^^ value ^^^^^^^^^^^^
355 * so you can get
356  event name : struct json_object obj = json_object_object_get(msg,"event")
357 */
358 void LibSoundmanager::on_event(void *closure, const char *event, struct afb_wsj1_msg *msg)
359 {
360  cout << "ON-EVENT:" << event << "(" << afb_wsj1_msg_object_s(msg) << ")" << endl;
361  if(onEvent != nullptr)
362  {
363  const string ev(event);
364  struct json_object* ev_contents = afb_wsj1_msg_object_j(msg);
365  onEvent(ev, ev_contents);
366  }
367 }
368 
369 void LibSoundmanager::on_reply(void *closure, struct afb_wsj1_msg *msg)
370 {
371  cout << "ON-REPLY:" << "(" << afb_wsj1_msg_object_s(msg) << ")" << endl;
372  if(onReply != nullptr)
373  {
374  struct json_object* reply = afb_wsj1_msg_object_j(msg);
375  onReply(reply);
376  }
377 }
378 
379 /* Internal Function in libsoundmanager */
380 
381 static void _ELOG(const char* func, const int line, const char* log, ...)
382 {
383  char *message;
384  va_list args;
385  va_start(args, log);
386  if (log == NULL || vasprintf(&message, log, args) < 0)
387  message = NULL;
388  cout << "[ERROR]" << func << "(" << line << "):" << message << endl;
389  va_end(args);
390  free(message);
391 }
392 
393 static void _DLOG(const char* func, const int line, const char* log, ...)
394 {
395  char *message;
396  va_list args;
397  va_start(args, log);
398  if (log == NULL || vasprintf(&message, log, args) < 0)
399  message = NULL;
400  cout << "[DEBUG]" << func << "(" << line << "):" << message << endl;
401  va_end(args);
402  free(message);
403 }
404 
405 static bool has_verb(const string& verb)
406 {
407  DLOG("verb is %s", verb.c_str());
408  if(find(api_list.begin(), api_list.end(), verb) != api_list.end())
409  return true;
410  else
411  return false;
412 }
const std::vector< std::string > api_list
+ + +
int call_sync(const std::string &verb, struct json_object *arg, struct json_object *ret)
+
int unsubscribe(const std::string &event_name)
+
int call(const std::string &verb, struct json_object *arg)
+
void register_callback(void(*event_cb)(const std::string &event, struct json_object *event_contents), void(*reply_cb)(struct json_object *reply_contents))
+ + + +
void on_hangup(void *closure, struct afb_wsj1 *wsj)
+
int subscribe(const std::string &event_name)
+
void on_reply(void *closure, struct afb_wsj1_msg *msg)
+ +
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)
+
#define ELOG(args,...)
+
#define DLOG(args,...)
+
+
+ + + + diff --git a/doc/api-ref/html/libsoundmanager_8hpp.html b/doc/api-ref/html/libsoundmanager_8hpp.html new file mode 100644 index 0000000..4291c66 --- /dev/null +++ b/doc/api-ref/html/libsoundmanager_8hpp.html @@ -0,0 +1,158 @@ + + + + + + + +Sound Manager: SoundManagerBinding/include/libsoundmanager/libsoundmanager.hpp File Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
Sound Manager +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
libsoundmanager.hpp File Reference
+
+
+
#include <audiomanagertypes.h>
+#include <vector>
+#include <map>
+#include <string>
+#include <json-c/json.h>
+#include <systemd/sd-event.h>
+#include <afb/afb-binding.h>
+#include <afb/afb-wsj1.h>
+#include <afb/afb-ws-client.h>
+
+

Go to the source code of this file.

+ + + + +

+Data Structures

class  LibSoundmanager
 
+ + + + + +

+Variables

const std::vector< std::string > api_list
 
const std::vector< std::string > event_list
 
+

Variable Documentation

+ +

◆ api_list

+ +
+
+ + + + +
const std::vector<std::string> api_list
+
+Initial value:
{
std::string("connect"),
std::string("disconnect"),
std::string("setVolume"),
std::string("volumeStep"),
std::string("setSinkMuteState"),
std::string("getListMainConnections"),
std::string("ackConnect"),
std::string("ackDisconnect"),
std::string("ackSetSourceState"),
std::string("registerSource"),
std::string("deregisterSource"),
std::string("subscribe"),
std::string("unsubscribe")
}
+

Definition at line 34 of file libsoundmanager.hpp.

+ +
+
+ +

◆ event_list

+ +
+
+ + + + +
const std::vector<std::string> event_list
+
+Initial value:
{
std::string("newMainConnection"),
std::string("volumeChanged"),
std::string("removedMainConnection"),
std::string("sinkMuteStateChanged"),
std::string("mainConnectionStateChanged"),
std::string("setRoutingReady"),
std::string("setRoutingRundown"),
std::string("asyncConnect"),
std::string("ackSetSourceState")
}
+

Definition at line 50 of file libsoundmanager.hpp.

+ +
+
+
+
+ + + + diff --git a/doc/api-ref/html/libsoundmanager_8hpp.js b/doc/api-ref/html/libsoundmanager_8hpp.js new file mode 100644 index 0000000..16a31f8 --- /dev/null +++ b/doc/api-ref/html/libsoundmanager_8hpp.js @@ -0,0 +1,6 @@ +var libsoundmanager_8hpp = +[ + [ "LibSoundmanager", "class_lib_soundmanager.html", "class_lib_soundmanager" ], + [ "api_list", "libsoundmanager_8hpp.html#a1f6a1c6cdbe66b174179ef6395f2981f", null ], + [ "event_list", "libsoundmanager_8hpp.html#a63497e6f3147871c0c6b1b251565e7f0", null ] +]; \ No newline at end of file diff --git a/doc/api-ref/html/libsoundmanager_8hpp_source.html b/doc/api-ref/html/libsoundmanager_8hpp_source.html new file mode 100644 index 0000000..58073d6 --- /dev/null +++ b/doc/api-ref/html/libsoundmanager_8hpp_source.html @@ -0,0 +1,103 @@ + + + + + + + +Sound Manager: SoundManagerBinding/include/libsoundmanager/libsoundmanager.hpp Source File + + + + + + + + + + + + + + +
+
+ + + + + + +
+
Sound Manager +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
libsoundmanager.hpp
+
+
+Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef LIBSOUNDMANAGER_H
18 #define LIBSOUNDMANAGER_H
19 #include <audiomanagertypes.h>
20 #include <vector>
21 #include <map>
22 #include <string>
23 #include <json-c/json.h>
24 #include <systemd/sd-event.h>
25 extern "C"
26 {
27 #include <afb/afb-binding.h>
28 #include <afb/afb-wsj1.h>
29 #include <afb/afb-ws-client.h>
30 }
31 
32 using namespace am;
33 
34 const std::vector<std::string> api_list{
35  std::string("connect"),
36  std::string("disconnect"),
37  std::string("setVolume"),
38  std::string("volumeStep"),
39  std::string("setSinkMuteState"),
40  std::string("getListMainConnections"),
41  std::string("ackConnect"),
42  std::string("ackDisconnect"),
43  std::string("ackSetSourceState"),
44  std::string("registerSource"),
45  std::string("deregisterSource"),
46  std::string("subscribe"),
47  std::string("unsubscribe")
48 };
49 
50 const std::vector<std::string> event_list{
51  std::string("newMainConnection"),
52  std::string("volumeChanged"),
53  std::string("removedMainConnection"),
54  std::string("sinkMuteStateChanged"),
55  std::string("mainConnectionStateChanged"),
56  std::string("setRoutingReady"),
57  std::string("setRoutingRundown"),
58  std::string("asyncConnect"),
59  std::string("ackSetSourceState")
60 };
61 
63 {
64 private:
65  LibSoundmanager() = delete;
66 public:
67  LibSoundmanager(const int port, const std::string& token);
68  //LibSoundmanager(const std::string& uri);
69  ~LibSoundmanager();
70 
71  /* Method */
72  void register_callback(
73  void (*event_cb)(const std::string& event, struct json_object* event_contents),
74  void (*reply_cb)(struct json_object* reply_contents)
75  );
76  int run_eventloop();
77  int call(const std::string& verb, struct json_object* arg);
78  int call_sync(const std::string& verb, struct json_object* arg, struct json_object* ret);
79  int subscribe(const std::string& event_name);
80  int unsubscribe(const std::string& event_name);
81  /*const struct afb_wsj1* get_websocket_handler();
82  const struct sd_event* get_sd_event();*/
83 
84 private:
85  int initialize_websocket();
86  void (*onEvent)(const std::string& event, struct json_object* event_contents);
87  void (*onReply)(struct json_object* reply);
88 
89  struct afb_wsj1* sp_websock;
90  struct afb_wsj1_itf minterface;
91  sd_event* mploop;
92  std::string muri;
93  int mport = 12345;
94  std::string mtoken = "123456";
95 
96  am_Error_e connect(const am_sourceID_t sourceID, const am_sinkID_t sinkID, am::am_mainConnectionID_t& mainConnectionID);
97  am_Error_e disconnect(const am_mainConnectionID_t mainConnectionID);
98 
99 public:
100  /* Don't use/ Internal only */
101  void on_hangup(void *closure, struct afb_wsj1 *wsj);
102  void on_call(void *closure, const char *api, const char *verb, struct afb_wsj1_msg *msg);
103  void on_event(void *closure, const char *event, struct afb_wsj1_msg *msg);
104  void on_reply(void *closure, struct afb_wsj1_msg *msg);
105 };
106 #endif /* LIBSOUNDMANAGER_H */
+
const std::vector< std::string > api_list
+
const std::vector< std::string > event_list
+ + +
+
+ + + + diff --git a/doc/api-ref/html/menu.js b/doc/api-ref/html/menu.js new file mode 100644 index 0000000..97db4c2 --- /dev/null +++ b/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+=''; + } + 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('
  • '); + } else { + $('#main-menu').append('
  • '); + } + } + $('#main-menu').smartmenus(); +} diff --git a/doc/api-ref/html/menudata.js b/doc/api-ref/html/menudata.js new file mode 100644 index 0000000..52fe2ba --- /dev/null +++ b/doc/api-ref/html/menudata.js @@ -0,0 +1,16 @@ +var menudata={children:[ +{text:"Main Page",url:"index.html"}, +{text:"Data Structures",url:"annotated.html",children:[ +{text:"Data Structures",url:"annotated.html"}, +{text:"Data Structure Index",url:"classes.html"}, +{text:"Data Fields",url:"functions.html",children:[ +{text:"All",url:"functions.html"}, +{text:"Functions",url:"functions_func.html"}, +{text:"Variables",url:"functions_vars.html"}]}]}, +{text:"Files",url:"files.html",children:[ +{text:"File List",url:"files.html"}, +{text:"Globals",url:"globals.html",children:[ +{text:"All",url:"globals.html"}, +{text:"Functions",url:"globals_func.html"}, +{text:"Variables",url:"globals_vars.html"}, +{text:"Macros",url:"globals_defs.html"}]}]}]} diff --git a/doc/api-ref/html/nav_f.png b/doc/api-ref/html/nav_f.png new file mode 100644 index 0000000..72a58a5 Binary files /dev/null and b/doc/api-ref/html/nav_f.png differ diff --git a/doc/api-ref/html/nav_g.png b/doc/api-ref/html/nav_g.png new file mode 100644 index 0000000..2093a23 Binary files /dev/null and b/doc/api-ref/html/nav_g.png differ diff --git a/doc/api-ref/html/nav_h.png b/doc/api-ref/html/nav_h.png new file mode 100644 index 0000000..33389b1 Binary files /dev/null and b/doc/api-ref/html/nav_h.png differ diff --git a/doc/api-ref/html/navtree.css b/doc/api-ref/html/navtree.css new file mode 100644 index 0000000..0cc7e77 --- /dev/null +++ b/doc/api-ref/html/navtree.css @@ -0,0 +1,146 @@ +#nav-tree .children_ul { + margin:0; + padding:4px; +} + +#nav-tree ul { + list-style:none outside none; + margin:0px; + padding:0px; +} + +#nav-tree li { + white-space:nowrap; + margin:0px; + padding:0px; +} + +#nav-tree .plus { + margin:0px; +} + +#nav-tree .selected { + background-image: url('tab_a.png'); + background-repeat:repeat-x; + color: #fff; + text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +} + +#nav-tree img { + margin:0px; + padding:0px; + border:0px; + vertical-align: middle; +} + +#nav-tree a { + text-decoration:none; + padding:0px; + margin:0px; + outline:none; +} + +#nav-tree .label { + margin:0px; + padding:0px; + font: 12px 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; +} + +#nav-tree .label a { + padding:2px; +} + +#nav-tree .selected a { + text-decoration:none; + color:#fff; +} + +#nav-tree .children_ul { + margin:0px; + padding:0px; +} + +#nav-tree .item { + margin:0px; + padding:0px; +} + +#nav-tree { + padding: 0px 0px; + background-color: #FAFAFF; + font-size:14px; + overflow:auto; +} + +#doc-content { + overflow:auto; + display:block; + padding:0px; + margin:0px; + -webkit-overflow-scrolling : touch; /* iOS 5+ */ +} + +#side-nav { + padding:0 6px 0 0; + margin: 0px; + display:block; + position: absolute; + left: 0px; + width: 250px; +} + +.ui-resizable .ui-resizable-handle { + display:block; +} + +.ui-resizable-e { + background-image:url("splitbar.png"); + background-size:100%; + background-repeat:no-repeat; + background-attachment: scroll; + cursor:ew-resize; + height:100%; + right:0; + top:0; + width:6px; +} + +.ui-resizable-handle { + display:none; + font-size:0.1px; + position:absolute; + z-index:1; +} + +#nav-tree-contents { + margin: 6px 0px 0px 0px; +} + +#nav-tree { + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9FAFC; + -webkit-overflow-scrolling : touch; /* iOS 5+ */ +} + +#nav-sync { + position:absolute; + top:5px; + right:24px; + z-index:0; +} + +#nav-sync img { + opacity:0.3; +} + +#nav-sync img:hover { + opacity:0.9; +} + +@media print +{ + #nav-tree { display: none; } + div.ui-resizable-handle { display: none; position: relative; } +} + diff --git a/doc/api-ref/html/navtree.js b/doc/api-ref/html/navtree.js new file mode 100644 index 0000000..e6d31b0 --- /dev/null +++ b/doc/api-ref/html/navtree.js @@ -0,0 +1,517 @@ +var navTreeSubIndices = new Array(); +var arrowDown = '▼'; +var arrowRight = '►'; + +function getData(varName) +{ + var i = varName.lastIndexOf('/'); + var n = i>=0 ? varName.substring(i+1) : varName; + return eval(n.replace(/\-/g,'_')); +} + +function stripPath(uri) +{ + return uri.substring(uri.lastIndexOf('/')+1); +} + +function stripPath2(uri) +{ + var i = uri.lastIndexOf('/'); + var s = uri.substring(i+1); + var m = uri.substring(0,i+1).match(/\/d\w\/d\w\w\/$/); + return m ? uri.substring(i-6) : s; +} + +function hashValue() +{ + return $(location).attr('hash').substring(1).replace(/[^\w\-]/g,''); +} + +function hashUrl() +{ + return '#'+hashValue(); +} + +function pathName() +{ + return $(location).attr('pathname').replace(/[^-A-Za-z0-9+&@#/%?=~_|!:,.;\(\)]/g, ''); +} + +function localStorageSupported() +{ + try { + return 'localStorage' in window && window['localStorage'] !== null && window.localStorage.getItem; + } + catch(e) { + return false; + } +} + + +function storeLink(link) +{ + if (!$("#nav-sync").hasClass('sync') && localStorageSupported()) { + window.localStorage.setItem('navpath',link); + } +} + +function deleteLink() +{ + if (localStorageSupported()) { + window.localStorage.setItem('navpath',''); + } +} + +function cachedLink() +{ + if (localStorageSupported()) { + return window.localStorage.getItem('navpath'); + } else { + return ''; + } +} + +function getScript(scriptName,func,show) +{ + var head = document.getElementsByTagName("head")[0]; + var script = document.createElement('script'); + script.id = scriptName; + script.type = 'text/javascript'; + script.onload = func; + script.src = scriptName+'.js'; + if ($.browser.msie && $.browser.version<=8) { + // script.onload does not work with older versions of IE + script.onreadystatechange = function() { + if (script.readyState=='complete' || script.readyState=='loaded') { + func(); if (show) showRoot(); + } + } + } + head.appendChild(script); +} + +function createIndent(o,domNode,node,level) +{ + var level=-1; + var n = node; + while (n.parentNode) { level++; n=n.parentNode; } + if (node.childrenData) { + var imgNode = document.createElement("span"); + imgNode.className = 'arrow'; + imgNode.style.paddingLeft=(16*level).toString()+'px'; + imgNode.innerHTML=arrowRight; + node.plus_img = imgNode; + node.expandToggle = document.createElement("a"); + node.expandToggle.href = "javascript:void(0)"; + node.expandToggle.onclick = function() { + if (node.expanded) { + $(node.getChildrenUL()).slideUp("fast"); + node.plus_img.innerHTML=arrowRight; + node.expanded = false; + } else { + expandNode(o, node, false, false); + } + } + node.expandToggle.appendChild(imgNode); + domNode.appendChild(node.expandToggle); + } else { + var span = document.createElement("span"); + span.className = 'arrow'; + span.style.width = 16*(level+1)+'px'; + span.innerHTML = ' '; + domNode.appendChild(span); + } +} + +var animationInProgress = false; + +function gotoAnchor(anchor,aname,updateLocation) +{ + var pos, docContent = $('#doc-content'); + var ancParent = $(anchor.parent()); + if (ancParent.hasClass('memItemLeft') || + ancParent.hasClass('fieldname') || + ancParent.hasClass('fieldtype') || + ancParent.is(':header')) + { + pos = ancParent.position().top; + } else if (anchor.position()) { + pos = anchor.position().top; + } + if (pos) { + var dist = Math.abs(Math.min( + pos-docContent.offset().top, + docContent[0].scrollHeight- + docContent.height()-docContent.scrollTop())); + animationInProgress=true; + docContent.animate({ + scrollTop: pos + docContent.scrollTop() - docContent.offset().top + },Math.max(50,Math.min(500,dist)),function(){ + if (updateLocation) window.location.href=aname; + animationInProgress=false; + }); + } +} + +function newNode(o, po, text, link, childrenData, lastNode) +{ + var node = new Object(); + node.children = Array(); + node.childrenData = childrenData; + node.depth = po.depth + 1; + node.relpath = po.relpath; + node.isLast = lastNode; + + node.li = document.createElement("li"); + po.getChildrenUL().appendChild(node.li); + node.parentNode = po; + + node.itemDiv = document.createElement("div"); + node.itemDiv.className = "item"; + + node.labelSpan = document.createElement("span"); + node.labelSpan.className = "label"; + + createIndent(o,node.itemDiv,node,0); + node.itemDiv.appendChild(node.labelSpan); + node.li.appendChild(node.itemDiv); + + var a = document.createElement("a"); + node.labelSpan.appendChild(a); + node.label = document.createTextNode(text); + node.expanded = false; + a.appendChild(node.label); + if (link) { + var url; + if (link.substring(0,1)=='^') { + url = link.substring(1); + link = url; + } else { + url = node.relpath+link; + } + a.className = stripPath(link.replace('#',':')); + if (link.indexOf('#')!=-1) { + var aname = '#'+link.split('#')[1]; + var srcPage = stripPath(pathName()); + var targetPage = stripPath(link.split('#')[0]); + a.href = srcPage!=targetPage ? url : "javascript:void(0)"; + a.onclick = function(){ + storeLink(link); + if (!$(a).parent().parent().hasClass('selected')) + { + $('.item').removeClass('selected'); + $('.item').removeAttr('id'); + $(a).parent().parent().addClass('selected'); + $(a).parent().parent().attr('id','selected'); + } + var anchor = $(aname); + gotoAnchor(anchor,aname,true); + }; + } else { + a.href = url; + a.onclick = function() { storeLink(link); } + } + } else { + if (childrenData != null) + { + a.className = "nolink"; + a.href = "javascript:void(0)"; + a.onclick = node.expandToggle.onclick; + } + } + + node.childrenUL = null; + node.getChildrenUL = function() { + if (!node.childrenUL) { + node.childrenUL = document.createElement("ul"); + node.childrenUL.className = "children_ul"; + node.childrenUL.style.display = "none"; + node.li.appendChild(node.childrenUL); + } + return node.childrenUL; + }; + + return node; +} + +function showRoot() +{ + var headerHeight = $("#top").height(); + var footerHeight = $("#nav-path").height(); + var windowHeight = $(window).height() - headerHeight - footerHeight; + (function (){ // retry until we can scroll to the selected item + try { + var navtree=$('#nav-tree'); + navtree.scrollTo('#selected',0,{offset:-windowHeight/2}); + } catch (err) { + setTimeout(arguments.callee, 0); + } + })(); +} + +function expandNode(o, node, imm, showRoot) +{ + if (node.childrenData && !node.expanded) { + if (typeof(node.childrenData)==='string') { + var varName = node.childrenData; + getScript(node.relpath+varName,function(){ + node.childrenData = getData(varName); + expandNode(o, node, imm, showRoot); + }, showRoot); + } else { + if (!node.childrenVisited) { + getNode(o, node); + } if (imm || ($.browser.msie && $.browser.version>8)) { + // somehow slideDown jumps to the start of tree for IE9 :-( + $(node.getChildrenUL()).show(); + } else { + $(node.getChildrenUL()).slideDown("fast"); + } + node.plus_img.innerHTML = arrowDown; + node.expanded = true; + } + } +} + +function glowEffect(n,duration) +{ + n.addClass('glow').delay(duration).queue(function(next){ + $(this).removeClass('glow');next(); + }); +} + +function highlightAnchor() +{ + var aname = hashUrl(); + var anchor = $(aname); + if (anchor.parent().attr('class')=='memItemLeft'){ + var rows = $('.memberdecls tr[class$="'+hashValue()+'"]'); + glowEffect(rows.children(),300); // member without details + } else if (anchor.parent().attr('class')=='fieldname'){ + glowEffect(anchor.parent().parent(),1000); // enum value + } else if (anchor.parent().attr('class')=='fieldtype'){ + glowEffect(anchor.parent().parent(),1000); // struct field + } else if (anchor.parent().is(":header")) { + glowEffect(anchor.parent(),1000); // section header + } else { + glowEffect(anchor.next(),1000); // normal member + } + gotoAnchor(anchor,aname,false); +} + +function selectAndHighlight(hash,n) +{ + var a; + if (hash) { + var link=stripPath(pathName())+':'+hash.substring(1); + a=$('.item a[class$="'+link+'"]'); + } + if (a && a.length) { + a.parent().parent().addClass('selected'); + a.parent().parent().attr('id','selected'); + highlightAnchor(); + } else if (n) { + $(n.itemDiv).addClass('selected'); + $(n.itemDiv).attr('id','selected'); + } + if ($('#nav-tree-contents .item:first').hasClass('selected')) { + $('#nav-sync').css('top','30px'); + } else { + $('#nav-sync').css('top','5px'); + } + showRoot(); +} + +function showNode(o, node, index, hash) +{ + if (node && node.childrenData) { + if (typeof(node.childrenData)==='string') { + var varName = node.childrenData; + getScript(node.relpath+varName,function(){ + node.childrenData = getData(varName); + showNode(o,node,index,hash); + },true); + } else { + if (!node.childrenVisited) { + getNode(o, node); + } + $(node.getChildrenUL()).css({'display':'block'}); + node.plus_img.innerHTML = arrowDown; + node.expanded = true; + var n = node.children[o.breadcrumbs[index]]; + if (index+11) hash = '#'+parts[1].replace(/[^\w\-]/g,''); + else hash=''; + } + if (hash.match(/^#l\d+$/)) { + var anchor=$('a[name='+hash.substring(1)+']'); + glowEffect(anchor.parent(),1000); // line number + hash=''; // strip line number anchors + } + var url=root+hash; + var i=-1; + while (NAVTREEINDEX[i+1]<=url) i++; + if (i==-1) { i=0; root=NAVTREE[0][1]; } // fallback: show index + if (navTreeSubIndices[i]) { + gotoNode(o,i,root,hash,relpath) + } else { + getScript(relpath+'navtreeindex'+i,function(){ + navTreeSubIndices[i] = eval('NAVTREEINDEX'+i); + if (navTreeSubIndices[i]) { + gotoNode(o,i,root,hash,relpath); + } + },true); + } +} + +function showSyncOff(n,relpath) +{ + n.html(''); +} + +function showSyncOn(n,relpath) +{ + n.html(''); +} + +function toggleSyncButton(relpath) +{ + var navSync = $('#nav-sync'); + if (navSync.hasClass('sync')) { + navSync.removeClass('sync'); + showSyncOff(navSync,relpath); + storeLink(stripPath2(pathName())+hashUrl()); + } else { + navSync.addClass('sync'); + showSyncOn(navSync,relpath); + deleteLink(); + } +} + +function initNavTree(toroot,relpath) +{ + var o = new Object(); + o.toroot = toroot; + o.node = new Object(); + o.node.li = document.getElementById("nav-tree-contents"); + o.node.childrenData = NAVTREE; + o.node.children = new Array(); + o.node.childrenUL = document.createElement("ul"); + o.node.getChildrenUL = function() { return o.node.childrenUL; }; + o.node.li.appendChild(o.node.childrenUL); + o.node.depth = 0; + o.node.relpath = relpath; + o.node.expanded = false; + o.node.isLast = true; + o.node.plus_img = document.createElement("span"); + o.node.plus_img.className = 'arrow'; + o.node.plus_img.innerHTML = arrowRight; + + if (localStorageSupported()) { + var navSync = $('#nav-sync'); + if (cachedLink()) { + showSyncOff(navSync,relpath); + navSync.removeClass('sync'); + } else { + showSyncOn(navSync,relpath); + } + navSync.click(function(){ toggleSyncButton(relpath); }); + } + + $(window).load(function(){ + navTo(o,toroot,hashUrl(),relpath); + showRoot(); + }); + + $(window).bind('hashchange', function(){ + if (window.location.hash && window.location.hash.length>1){ + var a; + if ($(location).attr('hash')){ + var clslink=stripPath(pathName())+':'+hashValue(); + a=$('.item a[class$="'+clslink.replace(/=desktop_vp) { + if (!collapsed) { + collapseExpand(); + } + } else if (width>desktop_vp && collapsedWidth0) { + restoreWidth(0); + collapsed=true; + } + else { + var width = readCookie('width'); + if (width>200 && width<$(window).width()) { restoreWidth(width); } else { restoreWidth(200); } + collapsed=false; + } + } + + header = $("#top"); + sidenav = $("#side-nav"); + content = $("#doc-content"); + navtree = $("#nav-tree"); + footer = $("#nav-path"); + $(".side-nav-resizable").resizable({resize: function(e, ui) { resizeWidth(); } }); + $(sidenav).resizable({ minWidth: 0 }); + $(window).resize(function() { resizeHeight(); }); + var device = navigator.userAgent.toLowerCase(); + var touch_device = device.match(/(iphone|ipod|ipad|android)/); + if (touch_device) { /* wider split bar for touch only devices */ + $(sidenav).css({ paddingRight:'20px' }); + $('.ui-resizable-e').css({ width:'20px' }); + $('#nav-sync').css({ right:'34px' }); + barWidth=20; + } + var width = readCookie('width'); + if (width) { restoreWidth(width); } else { resizeWidth(); } + resizeHeight(); + var url = location.href; + var i=url.indexOf("#"); + if (i>=0) window.location.hash=url.substr(i); + var _preventDefault = function(evt) { evt.preventDefault(); }; + $("#splitbar").bind("dragstart", _preventDefault).bind("selectstart", _preventDefault); + $(".ui-resizable-handle").dblclick(collapseExpand); + $(window).load(resizeHeight); +} + + diff --git a/doc/api-ref/html/search/all_0.html b/doc/api-ref/html/search/all_0.html new file mode 100644 index 0000000..f25360b --- /dev/null +++ b/doc/api-ref/html/search/all_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doc/api-ref/html/search/all_0.js b/doc/api-ref/html/search/all_0.js new file mode 100644 index 0000000..b97cbfb --- /dev/null +++ b/doc/api-ref/html/search/all_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['_5fgnu_5fsource',['_GNU_SOURCE',['../soundmanager_8c.html#a369266c24eacffb87046522897a570d5',1,'soundmanager.c']]] +]; diff --git a/doc/api-ref/html/search/all_1.html b/doc/api-ref/html/search/all_1.html new file mode 100644 index 0000000..b13f0f7 --- /dev/null +++ b/doc/api-ref/html/search/all_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doc/api-ref/html/search/all_1.js b/doc/api-ref/html/search/all_1.js new file mode 100644 index 0000000..c6903b6 --- /dev/null +++ b/doc/api-ref/html/search/all_1.js @@ -0,0 +1,9 @@ +var searchData= +[ + ['afbbindingv1register',['afbBindingV1Register',['../soundmanager_8c.html#a88642b2e51aa08fd18fdfc8017c8d567',1,'soundmanager.c']]], + ['afbbindingv1serviceinit',['afbBindingV1ServiceInit',['../soundmanager_8c.html#aace0247d919659df209ceb7dbeff6a2d',1,'soundmanager.c']]], + ['am_5fcmd_5fpath',['AM_CMD_PATH',['../soundmanager_8c.html#afa98a8b4c63efeb6e209144e7b247291',1,'soundmanager.c']]], + ['am_5fname',['AM_NAME',['../soundmanager_8c.html#ad25089fbfd55bf795bed283a5b283461',1,'soundmanager.c']]], + ['am_5froute_5fpath',['AM_ROUTE_PATH',['../soundmanager_8c.html#a9a50fb496af125690fb276944b3b4cff',1,'soundmanager.c']]], + ['api_5flist',['api_list',['../libsoundmanager_8hpp.html#a1f6a1c6cdbe66b174179ef6395f2981f',1,'libsoundmanager.hpp']]] +]; diff --git a/doc/api-ref/html/search/all_2.html b/doc/api-ref/html/search/all_2.html new file mode 100644 index 0000000..9543c57 --- /dev/null +++ b/doc/api-ref/html/search/all_2.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doc/api-ref/html/search/all_2.js b/doc/api-ref/html/search/all_2.js new file mode 100644 index 0000000..6110f63 --- /dev/null +++ b/doc/api-ref/html/search/all_2.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['call',['call',['../class_lib_soundmanager.html#a1fe952a4dabbab6126cc23e36c79c773',1,'LibSoundmanager']]], + ['call_5fsync',['call_sync',['../class_lib_soundmanager.html#ae5b83ce661b1d785de2518ca10113956',1,'LibSoundmanager']]], + ['command_5fevent_5fnum',['COMMAND_EVENT_NUM',['../soundmanager_8c.html#a09f43d9e7e1c5d2198c0d66024b4500e',1,'soundmanager.c']]] +]; diff --git a/doc/api-ref/html/search/all_3.html b/doc/api-ref/html/search/all_3.html new file mode 100644 index 0000000..03405c0 --- /dev/null +++ b/doc/api-ref/html/search/all_3.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doc/api-ref/html/search/all_3.js b/doc/api-ref/html/search/all_3.js new file mode 100644 index 0000000..dacb0bc --- /dev/null +++ b/doc/api-ref/html/search/all_3.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['dlog',['DLOG',['../libsoundmanager_8cpp.html#a4e42b2f5af2174dd24f958351becf63d',1,'libsoundmanager.cpp']]] +]; diff --git a/doc/api-ref/html/search/all_4.html b/doc/api-ref/html/search/all_4.html new file mode 100644 index 0000000..8e1f4b9 --- /dev/null +++ b/doc/api-ref/html/search/all_4.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doc/api-ref/html/search/all_4.js b/doc/api-ref/html/search/all_4.js new file mode 100644 index 0000000..f241b7f --- /dev/null +++ b/doc/api-ref/html/search/all_4.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['elog',['ELOG',['../libsoundmanager_8cpp.html#a797aa3053bd6a29819d44f8fad8a5eca',1,'libsoundmanager.cpp']]], + ['event',['event',['../structevent.html',1,'event'],['../structevent.html#a58726ebc551d36562ac3f9e1fe293214',1,'event::event()']]], + ['event_5flist',['event_list',['../libsoundmanager_8hpp.html#a63497e6f3147871c0c6b1b251565e7f0',1,'libsoundmanager.hpp']]] +]; diff --git a/doc/api-ref/html/search/all_5.html b/doc/api-ref/html/search/all_5.html new file mode 100644 index 0000000..89a879e --- /dev/null +++ b/doc/api-ref/html/search/all_5.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doc/api-ref/html/search/all_5.js b/doc/api-ref/html/search/all_5.js new file mode 100644 index 0000000..626f0c6 --- /dev/null +++ b/doc/api-ref/html/search/all_5.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['libsoundmanager',['LibSoundmanager',['../class_lib_soundmanager.html',1,'LibSoundmanager'],['../class_lib_soundmanager.html#a289a9d6ff8be95ae78660f239d962d79',1,'LibSoundmanager::LibSoundmanager()']]], + ['libsoundmanager_2ecpp',['libsoundmanager.cpp',['../libsoundmanager_8cpp.html',1,'']]], + ['libsoundmanager_2ehpp',['libsoundmanager.hpp',['../libsoundmanager_8hpp.html',1,'']]] +]; diff --git a/doc/api-ref/html/search/all_6.html b/doc/api-ref/html/search/all_6.html new file mode 100644 index 0000000..6afac06 --- /dev/null +++ b/doc/api-ref/html/search/all_6.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doc/api-ref/html/search/all_6.js b/doc/api-ref/html/search/all_6.js new file mode 100644 index 0000000..4b803da --- /dev/null +++ b/doc/api-ref/html/search/all_6.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['main',['main',['../test_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627',1,'test.cpp']]], + ['max_5flen_5fstr',['MAX_LEN_STR',['../soundmanager_8c.html#ab29566f6eaf3523d21c1465a3ff71570',1,'soundmanager.c']]] +]; diff --git a/doc/api-ref/html/search/all_7.html b/doc/api-ref/html/search/all_7.html new file mode 100644 index 0000000..de19107 --- /dev/null +++ b/doc/api-ref/html/search/all_7.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doc/api-ref/html/search/all_7.js b/doc/api-ref/html/search/all_7.js new file mode 100644 index 0000000..d6f2e90 --- /dev/null +++ b/doc/api-ref/html/search/all_7.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['name',['name',['../structevent.html#a723489bec273335d13513cd1040c0216',1,'event']]] +]; diff --git a/doc/api-ref/html/search/all_8.html b/doc/api-ref/html/search/all_8.html new file mode 100644 index 0000000..11e27cd --- /dev/null +++ b/doc/api-ref/html/search/all_8.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doc/api-ref/html/search/all_8.js b/doc/api-ref/html/search/all_8.js new file mode 100644 index 0000000..07d9659 --- /dev/null +++ b/doc/api-ref/html/search/all_8.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['on_5fcall',['on_call',['../class_lib_soundmanager.html#a3ba2255cb1d29c77c4c6a2267949eda0',1,'LibSoundmanager']]], + ['on_5fevent',['on_event',['../class_lib_soundmanager.html#a86ef62e7847cd20e9cafbc1f6c017b3e',1,'LibSoundmanager']]], + ['on_5fhangup',['on_hangup',['../class_lib_soundmanager.html#a71a8165cb15c7815aa95a8955f5cd7f6',1,'LibSoundmanager']]], + ['on_5freply',['on_reply',['../class_lib_soundmanager.html#a69b4f10e509605a570cc52c795bc9d51',1,'LibSoundmanager']]] +]; diff --git a/doc/api-ref/html/search/all_9.html b/doc/api-ref/html/search/all_9.html new file mode 100644 index 0000000..f8abbbe --- /dev/null +++ b/doc/api-ref/html/search/all_9.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doc/api-ref/html/search/all_9.js b/doc/api-ref/html/search/all_9.js new file mode 100644 index 0000000..f64b6c8 --- /dev/null +++ b/doc/api-ref/html/search/all_9.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['register_5fcallback',['register_callback',['../class_lib_soundmanager.html#a560edf9ae3b1e367ad4cbb31c7021d74',1,'LibSoundmanager']]], + ['routing_5fevent_5fnum',['ROUTING_EVENT_NUM',['../soundmanager_8c.html#a33d1c40de8a5e7a3d6f0e2f45de9f37f',1,'soundmanager.c']]], + ['run_5feventloop',['run_eventloop',['../class_lib_soundmanager.html#abe71d3531e7888f47185a601b284e729',1,'LibSoundmanager']]] +]; diff --git a/doc/api-ref/html/search/all_a.html b/doc/api-ref/html/search/all_a.html new file mode 100644 index 0000000..9601fce --- /dev/null +++ b/doc/api-ref/html/search/all_a.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doc/api-ref/html/search/all_a.js b/doc/api-ref/html/search/all_a.js new file mode 100644 index 0000000..6797659 --- /dev/null +++ b/doc/api-ref/html/search/all_a.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['sm',['sm',['../test_8cpp.html#a0cbfe893edb63b7b0c419db013fa9022',1,'test.cpp']]], + ['sound_5fmanager_5fname',['SOUND_MANAGER_NAME',['../soundmanager_8c.html#a9b2ae077f774994129a3c231be6703a0',1,'soundmanager.c']]], + ['sound_5fmanager_5fpath',['SOUND_MANAGER_PATH',['../soundmanager_8c.html#a2690d3e2461f5a2f9bb0720d657280da',1,'soundmanager.c']]], + ['soundmanager_2ec',['soundmanager.c',['../soundmanager_8c.html',1,'']]], + ['subscribe',['subscribe',['../class_lib_soundmanager.html#a9cd7c5470cb135f9b1aa56d790c7e91e',1,'LibSoundmanager']]] +]; diff --git a/doc/api-ref/html/search/all_b.html b/doc/api-ref/html/search/all_b.html new file mode 100644 index 0000000..0814e4e --- /dev/null +++ b/doc/api-ref/html/search/all_b.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doc/api-ref/html/search/all_b.js b/doc/api-ref/html/search/all_b.js new file mode 100644 index 0000000..2abceaa --- /dev/null +++ b/doc/api-ref/html/search/all_b.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['test_2ecpp',['test.cpp',['../test_8cpp.html',1,'']]] +]; diff --git a/doc/api-ref/html/search/all_c.html b/doc/api-ref/html/search/all_c.html new file mode 100644 index 0000000..da08c38 --- /dev/null +++ b/doc/api-ref/html/search/all_c.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doc/api-ref/html/search/all_c.js b/doc/api-ref/html/search/all_c.js new file mode 100644 index 0000000..3c4ce14 --- /dev/null +++ b/doc/api-ref/html/search/all_c.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['unsubscribe',['unsubscribe',['../class_lib_soundmanager.html#a21060844aa7efad6473b6104546afb06',1,'LibSoundmanager']]] +]; diff --git a/doc/api-ref/html/search/all_d.html b/doc/api-ref/html/search/all_d.html new file mode 100644 index 0000000..9986c9c --- /dev/null +++ b/doc/api-ref/html/search/all_d.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doc/api-ref/html/search/all_d.js b/doc/api-ref/html/search/all_d.js new file mode 100644 index 0000000..8beb9df --- /dev/null +++ b/doc/api-ref/html/search/all_d.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['_7elibsoundmanager',['~LibSoundmanager',['../class_lib_soundmanager.html#abf861908e3d6d85d2b3c08683b08f934',1,'LibSoundmanager']]] +]; diff --git a/doc/api-ref/html/search/classes_0.html b/doc/api-ref/html/search/classes_0.html new file mode 100644 index 0000000..1c3e406 --- /dev/null +++ b/doc/api-ref/html/search/classes_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doc/api-ref/html/search/classes_0.js b/doc/api-ref/html/search/classes_0.js new file mode 100644 index 0000000..2ddd7f1 --- /dev/null +++ b/doc/api-ref/html/search/classes_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['event',['event',['../structevent.html',1,'']]] +]; diff --git a/doc/api-ref/html/search/classes_1.html b/doc/api-ref/html/search/classes_1.html new file mode 100644 index 0000000..a8e7069 --- /dev/null +++ b/doc/api-ref/html/search/classes_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doc/api-ref/html/search/classes_1.js b/doc/api-ref/html/search/classes_1.js new file mode 100644 index 0000000..8579e77 --- /dev/null +++ b/doc/api-ref/html/search/classes_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['libsoundmanager',['LibSoundmanager',['../class_lib_soundmanager.html',1,'']]] +]; diff --git a/doc/api-ref/html/search/close.png b/doc/api-ref/html/search/close.png new file mode 100644 index 0000000..9342d3d Binary files /dev/null and b/doc/api-ref/html/search/close.png differ diff --git a/doc/api-ref/html/search/defines_0.html b/doc/api-ref/html/search/defines_0.html new file mode 100644 index 0000000..5b25204 --- /dev/null +++ b/doc/api-ref/html/search/defines_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doc/api-ref/html/search/defines_0.js b/doc/api-ref/html/search/defines_0.js new file mode 100644 index 0000000..b97cbfb --- /dev/null +++ b/doc/api-ref/html/search/defines_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['_5fgnu_5fsource',['_GNU_SOURCE',['../soundmanager_8c.html#a369266c24eacffb87046522897a570d5',1,'soundmanager.c']]] +]; diff --git a/doc/api-ref/html/search/defines_1.html b/doc/api-ref/html/search/defines_1.html new file mode 100644 index 0000000..91488cb --- /dev/null +++ b/doc/api-ref/html/search/defines_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doc/api-ref/html/search/defines_1.js b/doc/api-ref/html/search/defines_1.js new file mode 100644 index 0000000..ca7fddf --- /dev/null +++ b/doc/api-ref/html/search/defines_1.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['am_5fcmd_5fpath',['AM_CMD_PATH',['../soundmanager_8c.html#afa98a8b4c63efeb6e209144e7b247291',1,'soundmanager.c']]], + ['am_5fname',['AM_NAME',['../soundmanager_8c.html#ad25089fbfd55bf795bed283a5b283461',1,'soundmanager.c']]], + ['am_5froute_5fpath',['AM_ROUTE_PATH',['../soundmanager_8c.html#a9a50fb496af125690fb276944b3b4cff',1,'soundmanager.c']]] +]; diff --git a/doc/api-ref/html/search/defines_2.html b/doc/api-ref/html/search/defines_2.html new file mode 100644 index 0000000..8655993 --- /dev/null +++ b/doc/api-ref/html/search/defines_2.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doc/api-ref/html/search/defines_2.js b/doc/api-ref/html/search/defines_2.js new file mode 100644 index 0000000..1d68a26 --- /dev/null +++ b/doc/api-ref/html/search/defines_2.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['command_5fevent_5fnum',['COMMAND_EVENT_NUM',['../soundmanager_8c.html#a09f43d9e7e1c5d2198c0d66024b4500e',1,'soundmanager.c']]] +]; diff --git a/doc/api-ref/html/search/defines_3.html b/doc/api-ref/html/search/defines_3.html new file mode 100644 index 0000000..a55d3ff --- /dev/null +++ b/doc/api-ref/html/search/defines_3.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doc/api-ref/html/search/defines_3.js b/doc/api-ref/html/search/defines_3.js new file mode 100644 index 0000000..dacb0bc --- /dev/null +++ b/doc/api-ref/html/search/defines_3.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['dlog',['DLOG',['../libsoundmanager_8cpp.html#a4e42b2f5af2174dd24f958351becf63d',1,'libsoundmanager.cpp']]] +]; diff --git a/doc/api-ref/html/search/defines_4.html b/doc/api-ref/html/search/defines_4.html new file mode 100644 index 0000000..54da39a --- /dev/null +++ b/doc/api-ref/html/search/defines_4.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doc/api-ref/html/search/defines_4.js b/doc/api-ref/html/search/defines_4.js new file mode 100644 index 0000000..0be396a --- /dev/null +++ b/doc/api-ref/html/search/defines_4.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['elog',['ELOG',['../libsoundmanager_8cpp.html#a797aa3053bd6a29819d44f8fad8a5eca',1,'libsoundmanager.cpp']]] +]; diff --git a/doc/api-ref/html/search/defines_5.html b/doc/api-ref/html/search/defines_5.html new file mode 100644 index 0000000..dd7bfdc --- /dev/null +++ b/doc/api-ref/html/search/defines_5.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doc/api-ref/html/search/defines_5.js b/doc/api-ref/html/search/defines_5.js new file mode 100644 index 0000000..da39044 --- /dev/null +++ b/doc/api-ref/html/search/defines_5.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['max_5flen_5fstr',['MAX_LEN_STR',['../soundmanager_8c.html#ab29566f6eaf3523d21c1465a3ff71570',1,'soundmanager.c']]] +]; diff --git a/doc/api-ref/html/search/defines_6.html b/doc/api-ref/html/search/defines_6.html new file mode 100644 index 0000000..58d00e9 --- /dev/null +++ b/doc/api-ref/html/search/defines_6.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doc/api-ref/html/search/defines_6.js b/doc/api-ref/html/search/defines_6.js new file mode 100644 index 0000000..3faadd4 --- /dev/null +++ b/doc/api-ref/html/search/defines_6.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['routing_5fevent_5fnum',['ROUTING_EVENT_NUM',['../soundmanager_8c.html#a33d1c40de8a5e7a3d6f0e2f45de9f37f',1,'soundmanager.c']]] +]; diff --git a/doc/api-ref/html/search/defines_7.html b/doc/api-ref/html/search/defines_7.html new file mode 100644 index 0000000..275e1b3 --- /dev/null +++ b/doc/api-ref/html/search/defines_7.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doc/api-ref/html/search/defines_7.js b/doc/api-ref/html/search/defines_7.js new file mode 100644 index 0000000..84e27d8 --- /dev/null +++ b/doc/api-ref/html/search/defines_7.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['sound_5fmanager_5fname',['SOUND_MANAGER_NAME',['../soundmanager_8c.html#a9b2ae077f774994129a3c231be6703a0',1,'soundmanager.c']]], + ['sound_5fmanager_5fpath',['SOUND_MANAGER_PATH',['../soundmanager_8c.html#a2690d3e2461f5a2f9bb0720d657280da',1,'soundmanager.c']]] +]; diff --git a/doc/api-ref/html/search/files_0.html b/doc/api-ref/html/search/files_0.html new file mode 100644 index 0000000..4f272b8 --- /dev/null +++ b/doc/api-ref/html/search/files_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doc/api-ref/html/search/files_0.js b/doc/api-ref/html/search/files_0.js new file mode 100644 index 0000000..5bbdd4a --- /dev/null +++ b/doc/api-ref/html/search/files_0.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['libsoundmanager_2ecpp',['libsoundmanager.cpp',['../libsoundmanager_8cpp.html',1,'']]], + ['libsoundmanager_2ehpp',['libsoundmanager.hpp',['../libsoundmanager_8hpp.html',1,'']]] +]; diff --git a/doc/api-ref/html/search/files_1.html b/doc/api-ref/html/search/files_1.html new file mode 100644 index 0000000..dcce422 --- /dev/null +++ b/doc/api-ref/html/search/files_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doc/api-ref/html/search/files_1.js b/doc/api-ref/html/search/files_1.js new file mode 100644 index 0000000..b6ebd2c --- /dev/null +++ b/doc/api-ref/html/search/files_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['soundmanager_2ec',['soundmanager.c',['../soundmanager_8c.html',1,'']]] +]; diff --git a/doc/api-ref/html/search/files_2.html b/doc/api-ref/html/search/files_2.html new file mode 100644 index 0000000..d5c6c3b --- /dev/null +++ b/doc/api-ref/html/search/files_2.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doc/api-ref/html/search/files_2.js b/doc/api-ref/html/search/files_2.js new file mode 100644 index 0000000..2abceaa --- /dev/null +++ b/doc/api-ref/html/search/files_2.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['test_2ecpp',['test.cpp',['../test_8cpp.html',1,'']]] +]; diff --git a/doc/api-ref/html/search/functions_0.html b/doc/api-ref/html/search/functions_0.html new file mode 100644 index 0000000..4e6d87d --- /dev/null +++ b/doc/api-ref/html/search/functions_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doc/api-ref/html/search/functions_0.js b/doc/api-ref/html/search/functions_0.js new file mode 100644 index 0000000..6ce8cfa --- /dev/null +++ b/doc/api-ref/html/search/functions_0.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['afbbindingv1register',['afbBindingV1Register',['../soundmanager_8c.html#a88642b2e51aa08fd18fdfc8017c8d567',1,'soundmanager.c']]], + ['afbbindingv1serviceinit',['afbBindingV1ServiceInit',['../soundmanager_8c.html#aace0247d919659df209ceb7dbeff6a2d',1,'soundmanager.c']]] +]; diff --git a/doc/api-ref/html/search/functions_1.html b/doc/api-ref/html/search/functions_1.html new file mode 100644 index 0000000..b343e2d --- /dev/null +++ b/doc/api-ref/html/search/functions_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doc/api-ref/html/search/functions_1.js b/doc/api-ref/html/search/functions_1.js new file mode 100644 index 0000000..caf07a6 --- /dev/null +++ b/doc/api-ref/html/search/functions_1.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['call',['call',['../class_lib_soundmanager.html#a1fe952a4dabbab6126cc23e36c79c773',1,'LibSoundmanager']]], + ['call_5fsync',['call_sync',['../class_lib_soundmanager.html#ae5b83ce661b1d785de2518ca10113956',1,'LibSoundmanager']]] +]; diff --git a/doc/api-ref/html/search/functions_2.html b/doc/api-ref/html/search/functions_2.html new file mode 100644 index 0000000..ecce2f3 --- /dev/null +++ b/doc/api-ref/html/search/functions_2.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doc/api-ref/html/search/functions_2.js b/doc/api-ref/html/search/functions_2.js new file mode 100644 index 0000000..6bc3e4c --- /dev/null +++ b/doc/api-ref/html/search/functions_2.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['libsoundmanager',['LibSoundmanager',['../class_lib_soundmanager.html#a289a9d6ff8be95ae78660f239d962d79',1,'LibSoundmanager']]] +]; diff --git a/doc/api-ref/html/search/functions_3.html b/doc/api-ref/html/search/functions_3.html new file mode 100644 index 0000000..15f06ab --- /dev/null +++ b/doc/api-ref/html/search/functions_3.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doc/api-ref/html/search/functions_3.js b/doc/api-ref/html/search/functions_3.js new file mode 100644 index 0000000..a52fe02 --- /dev/null +++ b/doc/api-ref/html/search/functions_3.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['main',['main',['../test_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627',1,'test.cpp']]] +]; diff --git a/doc/api-ref/html/search/functions_4.html b/doc/api-ref/html/search/functions_4.html new file mode 100644 index 0000000..8985ff2 --- /dev/null +++ b/doc/api-ref/html/search/functions_4.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doc/api-ref/html/search/functions_4.js b/doc/api-ref/html/search/functions_4.js new file mode 100644 index 0000000..07d9659 --- /dev/null +++ b/doc/api-ref/html/search/functions_4.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['on_5fcall',['on_call',['../class_lib_soundmanager.html#a3ba2255cb1d29c77c4c6a2267949eda0',1,'LibSoundmanager']]], + ['on_5fevent',['on_event',['../class_lib_soundmanager.html#a86ef62e7847cd20e9cafbc1f6c017b3e',1,'LibSoundmanager']]], + ['on_5fhangup',['on_hangup',['../class_lib_soundmanager.html#a71a8165cb15c7815aa95a8955f5cd7f6',1,'LibSoundmanager']]], + ['on_5freply',['on_reply',['../class_lib_soundmanager.html#a69b4f10e509605a570cc52c795bc9d51',1,'LibSoundmanager']]] +]; diff --git a/doc/api-ref/html/search/functions_5.html b/doc/api-ref/html/search/functions_5.html new file mode 100644 index 0000000..0314918 --- /dev/null +++ b/doc/api-ref/html/search/functions_5.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doc/api-ref/html/search/functions_5.js b/doc/api-ref/html/search/functions_5.js new file mode 100644 index 0000000..7e4a2c1 --- /dev/null +++ b/doc/api-ref/html/search/functions_5.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['register_5fcallback',['register_callback',['../class_lib_soundmanager.html#a560edf9ae3b1e367ad4cbb31c7021d74',1,'LibSoundmanager']]], + ['run_5feventloop',['run_eventloop',['../class_lib_soundmanager.html#abe71d3531e7888f47185a601b284e729',1,'LibSoundmanager']]] +]; diff --git a/doc/api-ref/html/search/functions_6.html b/doc/api-ref/html/search/functions_6.html new file mode 100644 index 0000000..c506123 --- /dev/null +++ b/doc/api-ref/html/search/functions_6.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doc/api-ref/html/search/functions_6.js b/doc/api-ref/html/search/functions_6.js new file mode 100644 index 0000000..4c6ed89 --- /dev/null +++ b/doc/api-ref/html/search/functions_6.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['subscribe',['subscribe',['../class_lib_soundmanager.html#a9cd7c5470cb135f9b1aa56d790c7e91e',1,'LibSoundmanager']]] +]; diff --git a/doc/api-ref/html/search/functions_7.html b/doc/api-ref/html/search/functions_7.html new file mode 100644 index 0000000..83a7b84 --- /dev/null +++ b/doc/api-ref/html/search/functions_7.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doc/api-ref/html/search/functions_7.js b/doc/api-ref/html/search/functions_7.js new file mode 100644 index 0000000..3c4ce14 --- /dev/null +++ b/doc/api-ref/html/search/functions_7.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['unsubscribe',['unsubscribe',['../class_lib_soundmanager.html#a21060844aa7efad6473b6104546afb06',1,'LibSoundmanager']]] +]; diff --git a/doc/api-ref/html/search/functions_8.html b/doc/api-ref/html/search/functions_8.html new file mode 100644 index 0000000..b55f0e6 --- /dev/null +++ b/doc/api-ref/html/search/functions_8.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doc/api-ref/html/search/functions_8.js b/doc/api-ref/html/search/functions_8.js new file mode 100644 index 0000000..8beb9df --- /dev/null +++ b/doc/api-ref/html/search/functions_8.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['_7elibsoundmanager',['~LibSoundmanager',['../class_lib_soundmanager.html#abf861908e3d6d85d2b3c08683b08f934',1,'LibSoundmanager']]] +]; diff --git a/doc/api-ref/html/search/mag_sel.png b/doc/api-ref/html/search/mag_sel.png new file mode 100644 index 0000000..81f6040 Binary files /dev/null and b/doc/api-ref/html/search/mag_sel.png differ diff --git a/doc/api-ref/html/search/nomatches.html b/doc/api-ref/html/search/nomatches.html new file mode 100644 index 0000000..b1ded27 --- /dev/null +++ b/doc/api-ref/html/search/nomatches.html @@ -0,0 +1,12 @@ + + + + + + + +
    +
    No Matches
    +
    + + diff --git a/doc/api-ref/html/search/search.css b/doc/api-ref/html/search/search.css new file mode 100644 index 0000000..3cf9df9 --- /dev/null +++ b/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/doc/api-ref/html/search/search.js b/doc/api-ref/html/search/search.js new file mode 100644 index 0000000..dedce3b --- /dev/null +++ b/doc/api-ref/html/search/search.js @@ -0,0 +1,791 @@ +function convertToId(search) +{ + var result = ''; + for (i=0;i do a search + { + this.Search(); + } + } + + this.OnSearchSelectKey = function(evt) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==40 && this.searchIndex0) // 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 . + 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 + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doc/api-ref/html/search/variables_0.js b/doc/api-ref/html/search/variables_0.js new file mode 100644 index 0000000..2e775a1 --- /dev/null +++ b/doc/api-ref/html/search/variables_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['api_5flist',['api_list',['../libsoundmanager_8hpp.html#a1f6a1c6cdbe66b174179ef6395f2981f',1,'libsoundmanager.hpp']]] +]; diff --git a/doc/api-ref/html/search/variables_1.html b/doc/api-ref/html/search/variables_1.html new file mode 100644 index 0000000..84237b6 --- /dev/null +++ b/doc/api-ref/html/search/variables_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doc/api-ref/html/search/variables_1.js b/doc/api-ref/html/search/variables_1.js new file mode 100644 index 0000000..303e342 --- /dev/null +++ b/doc/api-ref/html/search/variables_1.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['event',['event',['../structevent.html#a58726ebc551d36562ac3f9e1fe293214',1,'event']]], + ['event_5flist',['event_list',['../libsoundmanager_8hpp.html#a63497e6f3147871c0c6b1b251565e7f0',1,'libsoundmanager.hpp']]] +]; diff --git a/doc/api-ref/html/search/variables_2.html b/doc/api-ref/html/search/variables_2.html new file mode 100644 index 0000000..5c9de1a --- /dev/null +++ b/doc/api-ref/html/search/variables_2.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doc/api-ref/html/search/variables_2.js b/doc/api-ref/html/search/variables_2.js new file mode 100644 index 0000000..d6f2e90 --- /dev/null +++ b/doc/api-ref/html/search/variables_2.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['name',['name',['../structevent.html#a723489bec273335d13513cd1040c0216',1,'event']]] +]; diff --git a/doc/api-ref/html/search/variables_3.html b/doc/api-ref/html/search/variables_3.html new file mode 100644 index 0000000..f95e34c --- /dev/null +++ b/doc/api-ref/html/search/variables_3.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doc/api-ref/html/search/variables_3.js b/doc/api-ref/html/search/variables_3.js new file mode 100644 index 0000000..4f3ec89 --- /dev/null +++ b/doc/api-ref/html/search/variables_3.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['sm',['sm',['../test_8cpp.html#a0cbfe893edb63b7b0c419db013fa9022',1,'test.cpp']]] +]; diff --git a/doc/api-ref/html/soundmanager_8c.html b/doc/api-ref/html/soundmanager_8c.html new file mode 100644 index 0000000..01ac3bb --- /dev/null +++ b/doc/api-ref/html/soundmanager_8c.html @@ -0,0 +1,334 @@ + + + + + + + +Sound Manager: SoundManagerBinding/soundmanager_binging/soundmanager.c File Reference + + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    Sound Manager +
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    +
    soundmanager.c File Reference
    +
    +
    +
    #include <stdio.h>
    +#include <string.h>
    +#include <stdlib.h>
    +#include <stdint.h>
    +#include <unistd.h>
    +#include <json-c/json.h>
    +#include <pthread.h>
    +#include <afb/afb-binding.h>
    +#include "sm-helper.h"
    +#include "dbus/audio_manager_interface.h"
    +
    +

    Go to the source code of this file.

    + + + + +

    +Data Structures

    struct  event
     
    + + + + + + + + + + + + + + + + + + + +

    +Macros

    #define _GNU_SOURCE
     
    #define AM_NAME   "org.genivi.audiomanager"
     
    #define AM_CMD_PATH   "/org/genivi/audiomanager/commandinterface"
     
    #define AM_ROUTE_PATH   "/org/genivi/audiomanager/routinginterface"
     
    #define SOUND_MANAGER_NAME   "org.soundmanager.genivi.routingsend"
     
    #define SOUND_MANAGER_PATH   "org/soundmanager/genivi/routingsend"
     
    #define COMMAND_EVENT_NUM   10
     
    #define ROUTING_EVENT_NUM   10
     
    #define MAX_LEN_STR   100
     
    + + + + + +

    +Functions

    const struct afb_binding * afbBindingV1Register (const struct afb_binding_interface *itf)
     
    int afbBindingV1ServiceInit (struct afb_service service)
     
    +

    Macro Definition Documentation

    + +

    ◆ _GNU_SOURCE

    + +
    +
    + + + + +
    #define _GNU_SOURCE
    +
    + +

    Definition at line 17 of file soundmanager.c.

    + +
    +
    + +

    ◆ AM_CMD_PATH

    + +
    +
    + + + + +
    #define AM_CMD_PATH   "/org/genivi/audiomanager/commandinterface"
    +
    + +

    Definition at line 32 of file soundmanager.c.

    + +
    +
    + +

    ◆ AM_NAME

    + +
    +
    + + + + +
    #define AM_NAME   "org.genivi.audiomanager"
    +
    + +

    Definition at line 31 of file soundmanager.c.

    + +
    +
    + +

    ◆ AM_ROUTE_PATH

    + +
    +
    + + + + +
    #define AM_ROUTE_PATH   "/org/genivi/audiomanager/routinginterface"
    +
    + +

    Definition at line 33 of file soundmanager.c.

    + +
    +
    + +

    ◆ COMMAND_EVENT_NUM

    + +
    +
    + + + + +
    #define COMMAND_EVENT_NUM   10
    +
    + +

    Definition at line 37 of file soundmanager.c.

    + +
    +
    + +

    ◆ MAX_LEN_STR

    + +
    +
    + + + + +
    #define MAX_LEN_STR   100
    +
    + +

    Definition at line 39 of file soundmanager.c.

    + +
    +
    + +

    ◆ ROUTING_EVENT_NUM

    + +
    +
    + + + + +
    #define ROUTING_EVENT_NUM   10
    +
    + +

    Definition at line 38 of file soundmanager.c.

    + +
    +
    + +

    ◆ SOUND_MANAGER_NAME

    + +
    +
    + + + + +
    #define SOUND_MANAGER_NAME   "org.soundmanager.genivi.routingsend"
    +
    + +

    Definition at line 34 of file soundmanager.c.

    + +
    +
    + +

    ◆ SOUND_MANAGER_PATH

    + +
    +
    + + + + +
    #define SOUND_MANAGER_PATH   "org/soundmanager/genivi/routingsend"
    +
    + +

    Definition at line 35 of file soundmanager.c.

    + +
    +
    +

    Function Documentation

    + +

    ◆ afbBindingV1Register()

    + +
    +
    + + + + + + + + +
    const struct afb_binding* afbBindingV1Register (const struct afb_binding_interface * itf)
    +
    + +

    Definition at line 1137 of file soundmanager.c.

    + +
    +
    + +

    ◆ afbBindingV1ServiceInit()

    + +
    +
    + + + + + + + + +
    int afbBindingV1ServiceInit (struct afb_service service)
    +
    + +

    Definition at line 1145 of file soundmanager.c.

    + +
    +
    +
    +
    + + + + diff --git a/doc/api-ref/html/soundmanager_8c.js b/doc/api-ref/html/soundmanager_8c.js new file mode 100644 index 0000000..ed837d7 --- /dev/null +++ b/doc/api-ref/html/soundmanager_8c.js @@ -0,0 +1,15 @@ +var soundmanager_8c = +[ + [ "event", "structevent.html", "structevent" ], + [ "_GNU_SOURCE", "soundmanager_8c.html#a369266c24eacffb87046522897a570d5", null ], + [ "AM_CMD_PATH", "soundmanager_8c.html#afa98a8b4c63efeb6e209144e7b247291", null ], + [ "AM_NAME", "soundmanager_8c.html#ad25089fbfd55bf795bed283a5b283461", null ], + [ "AM_ROUTE_PATH", "soundmanager_8c.html#a9a50fb496af125690fb276944b3b4cff", null ], + [ "COMMAND_EVENT_NUM", "soundmanager_8c.html#a09f43d9e7e1c5d2198c0d66024b4500e", null ], + [ "MAX_LEN_STR", "soundmanager_8c.html#ab29566f6eaf3523d21c1465a3ff71570", null ], + [ "ROUTING_EVENT_NUM", "soundmanager_8c.html#a33d1c40de8a5e7a3d6f0e2f45de9f37f", null ], + [ "SOUND_MANAGER_NAME", "soundmanager_8c.html#a9b2ae077f774994129a3c231be6703a0", null ], + [ "SOUND_MANAGER_PATH", "soundmanager_8c.html#a2690d3e2461f5a2f9bb0720d657280da", null ], + [ "afbBindingV1Register", "soundmanager_8c.html#a88642b2e51aa08fd18fdfc8017c8d567", null ], + [ "afbBindingV1ServiceInit", "soundmanager_8c.html#aace0247d919659df209ceb7dbeff6a2d", null ] +]; \ No newline at end of file diff --git a/doc/api-ref/html/soundmanager_8c_source.html b/doc/api-ref/html/soundmanager_8c_source.html new file mode 100644 index 0000000..30d2f9b --- /dev/null +++ b/doc/api-ref/html/soundmanager_8c_source.html @@ -0,0 +1,110 @@ + + + + + + + +Sound Manager: SoundManagerBinding/soundmanager_binging/soundmanager.c Source File + + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    Sound Manager +
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    soundmanager.c
    +
    +
    +Go to the documentation of this file.
    1 /*
    2  * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
    3  *
    4  * Licensed under the Apache License, Version 2.0 (the "License");
    5  * you may not use this file except in compliance with the License.
    6  * You may obtain a copy of the License at
    7  *
    8  * http://www.apache.org/licenses/LICENSE-2.0
    9  *
    10  * Unless required by applicable law or agreed to in writing, software
    11  * distributed under the License is distributed on an "AS IS" BASIS,
    12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13  * See the License for the specific language governing permissions and
    14  * limitations under the License.
    15  */
    16 
    17 #define _GNU_SOURCE
    18 #include <stdio.h>
    19 #include <string.h>
    20 #include <stdlib.h>
    21 #include <stdint.h>
    22 #include <unistd.h>
    23 #include <json-c/json.h>
    24 //#include <search.h>
    25 #include <pthread.h>
    26 #include <afb/afb-binding.h>
    27 #include "sm-helper.h"
    28 #include <glib.h>
    29 #include "dbus/audio_manager_interface.h"
    30 
    31 #define AM_NAME "org.genivi.audiomanager"
    32 #define AM_CMD_PATH "/org/genivi/audiomanager/commandinterface"
    33 #define AM_ROUTE_PATH "/org/genivi/audiomanager/routinginterface"
    34 #define SOUND_MANAGER_NAME "org.soundmanager.genivi.routingsend"
    35 #define SOUND_MANAGER_PATH "org/soundmanager/genivi/routingsend"
    36 
    37 #define COMMAND_EVENT_NUM 10
    38 #define ROUTING_EVENT_NUM 10
    39 #define MAX_LEN_STR 100
    40 
    41 const static struct afb_binding_interface *afbitf;
    42 static AudiomanagerCommandinterface *am_cmd_bus;
    43 static AudiomanagerRoutinginterface *am_route_bus;
    44 static OrgSoundmanagerGeniviRoutingsend *sm_adapter;
    45 static OrgSoundmanagerGeniviRoutingsendIface* sm_itf;
    46 
    47 static GMainLoop *loop = NULL;
    48 /* To Do hash table is better */
    49 struct event{
    50  char* name;
    51  struct afb_event* event;
    52  };
    53 static struct event command_event_list[COMMAND_EVENT_NUM];
    54 static struct event routing_event_list[ROUTING_EVENT_NUM];
    55 
    56 static struct afb_event ev_new_connection;
    57 static struct afb_event ev_removed_main_connection;
    58 static struct afb_event ev_volume_changed;
    59 static struct afb_event ev_sink_mute_state_changed;
    60 static struct afb_event ev_main_connection_state_changed;
    61 
    62 /* Routing interface event */
    63 static struct afb_event ev_set_routing_ready;
    64 static struct afb_event ev_set_routing_rundown;
    65 static struct afb_event ev_async_connect;
    66 static struct afb_event ev_async_set_source_state;
    67 
    68 static const char _sourceid[] = "sourceID";
    69 static const char _sinkid[] = "sinkID" ;
    70 static const char _main_connection_id[] = "mainConnectionID";
    71 static const char _delay[] = "delay";
    72 static const char _connectionState[] = "connectionState";
    73 static const char _connectionID[] = "connectionID";
    74 static const char _volume[] = "volume";
    75 static const char _volumeStep[] = "volumeStep";
    76 static const char _muteState[] = "muteState";
    77 
    78 static const char _handle[] = "handle";
    79 static const char _appname[] = "appname";
    80 static const char _ramp[] = "ramp";
    81 static const char _time[] = "time";
    82 static const char _sourceState[] = "sourceState";
    83 static const char _sourceClassID[] = "sourceClassID";
    84 static const char _error[] = "error";
    85 static const char _sinkData[] = "sinkData";
    86 static const char _sourceData[] = "sourceData";
    87 static const char _interruptState[] = "interruptState";
    88 static const char _availability[] = "availability";
    89 static const char _domainID[] = "domainID";
    90 static const char _listvolumes[] = "listvolumes";
    91 static const char _payload[] = "payload";
    92 static const char _connectionFormat[] = "connectionFormat";
    93 /*
    94 ********** Method of Sound Manager (API) **********
    95 */
    96 
    97 /* call "connect" function of Audio Manager*/
    98 static void connect (struct afb_req request)
    99 {
    100  DEBUG(afbitf,"call connect");
    101  guint16 source_id, sink_id;
    102  guint16 main_connectionID = 0;
    103  gint16 ret;
    104  REQ_ERROR req_err1, req_err2;
    105  GError *err = NULL;
    106  /* ToDo select appname or sourceID(sinkID) */
    107 
    108  req_err1 = getid_uint16(request, _sourceid, &source_id);
    109  req_err2 = getid_uint16(request, _sinkid, &sink_id);
    110 
    111  if((req_err1 != REQ_OK) || (req_err2 != REQ_OK))
    112  {
    113  DEBUG(afbitf, "getid_uint16 source ret = %d,sink ret = %d", source_id, sink_id);
    114  NOTICE(afbitf,"wrong request");
    115  afb_req_fail(request,"wrong-request",NULL);
    116  return;
    117  }
    118 
    119  audiomanager_commandinterface_call_connect_sync(
    120  am_cmd_bus,
    121  source_id,
    122  sink_id,
    123  &ret,
    124  &main_connectionID,
    125  NULL, &err);
    126 
    127  if(err != NULL)
    128  {
    129  afb_req_fail(request, "failed", "Unable to call connect");
    130  return;
    131  }
    132 
    133  /* ToDo Remember appname(key) and tie to sourceID(value) */
    134 
    135  /*create response json object*/
    136  struct json_object *res = json_object_new_object();
    137  sm_add_object_to_json_object_func(res, __FUNCTION__, 4,
    138  "error", ret,
    139  _main_connection_id, main_connectionID);
    140  char *info;
    141  get_response_audiomanager_massage_error(ret,&info);
    142  afb_req_success(request, res, info);
    143 }
    144 
    145 /* call "disconnect" function of Audio Manager*/
    146 static void disconnect (struct afb_req request)
    147 {
    148  DEBUG(afbitf,"call disconnect");
    149 
    150  guint16 id;
    151  gint16 ret;
    152  REQ_ERROR req_err;
    153  GError *err = NULL;
    154 
    155  req_err = getid_uint16(request, _main_connection_id, &id);
    156  DEBUG(afbitf, "requested %s = %d", _main_connection_id, id);
    157 
    158  if(req_err != REQ_OK)
    159  {
    160  afb_req_fail(request,"wrong-request",afb_req_value (request, _main_connection_id));
    161  return;
    162  }
    163  audiomanager_commandinterface_call_disconnect_sync(
    164  am_cmd_bus,
    165  id,
    166  &ret,
    167  NULL, &err);
    168  DEBUG(afbitf, "ret = %d", ret);
    169 
    170  if(err != NULL)
    171  {
    172  afb_req_fail(request, "failed", "Unable to call getListMainConnections");
    173  return;
    174  }
    175 
    176  struct json_object* res_obj = json_object_new_object();
    177  sm_add_object_to_json_object_func(res_obj, __FUNCTION__, 2,
    178  "error", ret);
    179  char *info;
    180  get_response_audiomanager_massage_error(ret,&info);
    181 
    182  afb_req_success(request, res_obj, info); /* return error num as status */
    183 }
    184 
    185 static void setVolume (struct afb_req request)
    186 {
    187  DEBUG(afbitf,"call setVolume");
    188 
    189  guint16 sink_id, vol;
    190  gint16 ret;
    191  REQ_ERROR req_err1, req_err2;
    192  GError *err = NULL;
    193 
    194  req_err1 = getid_uint16(request, _sinkid, &sink_id);
    195  req_err2 = getid_int16(request, _volume, &vol);
    196  DEBUG(afbitf, "requested %s = %d, %s = %d",_sinkid, sink_id, _volume, vol);
    197  if((req_err1 != REQ_OK) || (req_err2 != REQ_OK))
    198  {
    199  afb_req_fail(request,"wrong-request", NULL);
    200  return;
    201  }
    202 
    203  audiomanager_commandinterface_call_set_volume_sync(
    204  am_cmd_bus,
    205  sink_id,
    206  vol,
    207  &ret,
    208  NULL, &err);
    209  DEBUG(afbitf, "ret = %d", ret);
    210 
    211  if(err != NULL)
    212  {
    213  afb_req_fail(request, "failed", "Unable to call setVolume");
    214  return;
    215  }
    216 
    217  struct json_object* res_obj = json_object_new_object();
    218  sm_add_object_to_json_object_func(res_obj, __FUNCTION__, 2,
    219  "error", ret);
    220  char *info;
    221  get_response_audiomanager_massage_error(ret,&info);
    222 
    223  afb_req_success(request, res_obj, info); /* return error num as status */
    224 }
    225 
    226 static void volumeStep (struct afb_req request)
    227 {
    228  DEBUG(afbitf,"call volumeStep");
    229 
    230  guint16 sink_id, vol;
    231  gint16 ret;
    232  REQ_ERROR req_err1, req_err2;
    233  GError *err = NULL;
    234 
    235  req_err1 = getid_uint16(request, _sinkid, &sink_id);
    236  req_err2 = getid_int16(request, _volumeStep, &vol);
    237  DEBUG(afbitf, "requested %s = %d, %s = %d",_sinkid, sink_id, _volumeStep, vol);
    238  if((req_err1 != REQ_OK) || (req_err2 != REQ_OK))
    239  {
    240  afb_req_fail(request,"wrong-request", NULL);
    241  return;
    242  }
    243 
    244  audiomanager_commandinterface_call_volume_step_sync(
    245  am_cmd_bus,
    246  sink_id,
    247  vol,
    248  &ret,
    249  NULL, &err);
    250  DEBUG(afbitf, "ret = %d", ret);
    251 
    252  if(err != NULL)
    253  {
    254  afb_req_fail(request, "failed", "Unable to call volumeStep");
    255  return;
    256  }
    257 
    258  struct json_object* res_obj = json_object_new_object();
    259  sm_add_object_to_json_object_func(res_obj, __FUNCTION__, 2,
    260  "error", ret);
    261  char *info;
    262  get_response_audiomanager_massage_error(ret,&info);
    263 
    264  afb_req_success(request, res_obj, info); /* return error num as status */
    265 }
    266 
    267 /* 1 means mute, 2 means unmute */
    268 static void setSinkMuteState(struct afb_req request)
    269 {
    270  DEBUG(afbitf,"call setSinkMuteStete");
    271 
    272  guint16 sink_id, mute;
    273  gint16 ret;
    274  REQ_ERROR req_err1, req_err2;
    275  GError *err = NULL;
    276 
    277  req_err1 = getid_uint16(request, _sinkid, &sink_id);
    278  req_err2 = getid_int16(request, _muteState, &mute);
    279  DEBUG(afbitf, "requested %s = %d, %s = %d",_sinkid, sink_id, _muteState, mute);
    280  if((req_err1 != REQ_OK) || (req_err2 != REQ_OK))
    281  {
    282  afb_req_fail(request,"wrong-request", NULL);
    283  return;
    284  }
    285 
    286  audiomanager_commandinterface_call_set_sink_mute_state_sync(
    287  am_cmd_bus,
    288  sink_id,
    289  mute,
    290  &ret,
    291  NULL, &err);
    292  DEBUG(afbitf, "ret = %d", ret);
    293 
    294  if(err != NULL)
    295  {
    296  afb_req_fail(request, "failed", "Unable to call setSinkMuteStete");
    297  return;
    298  }
    299 
    300  struct json_object* res_obj = json_object_new_object();
    301  sm_add_object_to_json_object_func(res_obj, __FUNCTION__, 2,
    302  "error", ret);
    303  char *info;
    304  get_response_audiomanager_massage_error(ret,&info);
    305 
    306  afb_req_success(request, res_obj, info); /* return error num as status */
    307 }
    308 
    309 /* call "getListMainConnections" function of Audio Manager */
    310 static void getListMainConnections(struct afb_req request)
    311 {
    312  DEBUG(afbitf,"call getListMainConnections");
    313  guint16 ret;
    314  GVariant* mainConnectionList;
    315  GError *err = NULL;
    316 
    317  audiomanager_commandinterface_call_get_list_main_connections_sync(
    318  am_cmd_bus,
    319  &ret,
    320  &mainConnectionList,
    321  NULL,
    322  &err
    323  );
    324  DEBUG(afbitf,"ret = %d, mainConnectionList pointer = %p", ret, &mainConnectionList);
    325 
    326  if(err != NULL)
    327  {
    328  afb_req_fail(request, "failed", "Unable to call getListMainConnections");
    329  return;
    330  }
    331 
    332  /* create response */
    333  struct json_object *array_res = json_object_new_array();
    334  gsize size = g_variant_n_children(mainConnectionList);
    335  DEBUG(afbitf, "mainConnectionList size is %u",(uint16_t)size);
    336  struct json_object *verb_obj = json_object_new_object();
    337  sm_add_object_to_json_object_func(verb_obj, __FUNCTION__, 0);
    338  json_object_array_add(array_res, verb_obj);
    339  if(size <= 0)
    340  {
    341  NOTICE(afbitf, "mainConnectionList size is 0");
    342  }
    343  else{
    344  for(int i = 0; i < size; ++i)
    345  {
    346  guint16 mcid, srcid, sinkid;
    347  gint16 delay, constate;
    348  g_variant_get_child(
    349  mainConnectionList,i,"(qqqnn)",
    350  &mcid, &srcid, &sinkid, &delay, &constate
    351  );
    352 
    353  struct json_object* res_obj = json_object_new_object();
    354  sm_add_object_to_json_object_func(res_obj,__FUNCTION__,10,
    355  _main_connection_id, mcid,
    356  _sourceid, srcid,
    357  _sinkid, sinkid,
    358  _delay, delay,
    359  _connectionState, constate
    360  );
    361  json_object_array_add(array_res,res_obj);
    362  }
    363  }
    364  DEBUG(afbitf,"json object :%s:",json_object_to_json_string(array_res));
    365  afb_req_success(request, array_res, "Success to get main connection list");
    366 }
    367 
    368 /*
    369 *
    370 ****** Routing Interface method(API) ***********
    371 *
    372 */
    373 static void ackConnect(struct afb_req request)
    374 {
    375  /* This function will be deprecated */
    376  DEBUG(afbitf,"call %s", __FUNCTION__);
    377  guint16 handle, connection_id, error;
    378  REQ_ERROR req_err1, req_err2 , req_err3;
    379  GError *err = NULL;
    380 
    381  req_err1 = getid_uint16(request, _handle, &handle);
    382  req_err2 = getid_uint16(request, _connectionID, &connection_id);
    383  req_err3 = getid_uint16(request, _error, &error);
    384 
    385  if((req_err1 != REQ_OK) || (req_err2 != REQ_OK) || (req_err3 != REQ_OK))
    386  {
    387  afb_req_fail(request,"wrong-request", NULL);
    388  return;
    389  }
    390  if(connection_id == 0)
    391  {
    392  afb_req_fail(request,"wrong-request", "connectionID is more than 0");
    393  return;
    394  }
    395 
    396 
    397  audiomanager_routinginterface_call_ack_connect_sync(
    398  am_route_bus,
    399  handle,
    400  connection_id,
    401  error,
    402  NULL, &err);
    403 
    404  if(err != NULL)
    405  {
    406  afb_req_fail(request, "failed", "Unable to call ackConnect");
    407  return;
    408  }
    409  afb_req_success(request, NULL, NULL);
    410 }
    411 static void ackDisconnect(struct afb_req request)
    412 {
    413  /* This function will be deprecated */
    414  DEBUG(afbitf,"call %s", __FUNCTION__);
    415  guint16 handle, connection_id, error;
    416  REQ_ERROR req_err1, req_err2 , req_err3;
    417  GError *err = NULL;
    418 
    419  req_err1 = getid_uint16(request, _handle, &handle);
    420  req_err2 = getid_uint16(request, _connectionID, &connection_id);
    421  req_err3 = getid_uint16(request, _error, &error);
    422 
    423  if((req_err1 != REQ_OK) || (req_err2 != REQ_OK) || (req_err3 != REQ_OK))
    424  {
    425  afb_req_fail(request,"wrong-request", "connectionID is more than 0");
    426  return;
    427  }
    428  if(connection_id == 0)
    429  {
    430  afb_req_fail(request,"wrong-request", "connectionID is more than 0");
    431  return;
    432  }
    433 
    434  audiomanager_routinginterface_call_ack_disconnect_sync(
    435  am_route_bus,
    436  handle,
    437  connection_id,
    438  error,
    439  NULL, &err);
    440 
    441  if(err != NULL)
    442  {
    443  afb_req_fail(request, "failed", "Unable to call ackDisconnect");
    444  return;
    445  }
    446  afb_req_success(request, NULL, NULL);
    447 }
    448 static void ackSetSourceState(struct afb_req request)
    449 {
    450  /* This function will be deprecated */
    451  /* This function will be deprecated */
    452  DEBUG(afbitf,"call %s", __FUNCTION__);
    453  guint16 handle, error;
    454  REQ_ERROR req_err1, req_err2;
    455  GError *err = NULL;
    456 
    457  req_err1 = getid_uint16(request, _handle, &handle);
    458  req_err2 = getid_uint16(request, _error, &error);
    459 
    460  if((req_err1 != REQ_OK) || (req_err2 != REQ_OK))
    461  {
    462  NOTICE(afbitf,"wrong request");
    463  afb_req_fail(request,"wrong-request", NULL);
    464  return;
    465  }
    466 
    467  audiomanager_routinginterface_call_ack_set_source_state_sync(
    468  am_route_bus,
    469  handle,
    470  error,
    471  NULL, &err);
    472 
    473  if(err != NULL)
    474  {
    475  afb_req_fail(request, "failed", "Unable to call ackDisconnect");
    476  return;
    477  }
    478  afb_req_success(request, NULL, NULL);
    479 }
    480 static void registerSink(struct afb_req request)
    481 {
    482  /* This function will be deprecated because application will not register function*/
    483 }
    484 static void deregisterSink(struct afb_req request)
    485 {
    486  /* This function will be deprecated because application will not register function*/
    487 }
    488 
    489 /* This function will be modified to abstract argument */
    490 static void registerSource(struct afb_req request)
    491 {
    492  DEBUG(afbitf,"call %s", __FUNCTION__);
    493  GError *err = NULL;
    494 
    495  guint16 source_id; /* q 0 is for dynamic id*/
    496  guint16 domain_id; /* q */
    497  guint16 source_class_id; /* q */
    498  gint32 source_state = 1; /* i SS_ON */
    499  gint16 volume; /* n */
    500 
    501  if(REQ_OK != getid_uint16(request, _sourceid, &source_id)){
    502  source_id = 0; /* if 0, dynamic source id will be attached */
    503  }
    504  if( REQ_OK != getid_uint16(request, _domainID, &domain_id)){
    505  afb_req_fail(request,"wrong-request", "domainID should be more than 0");
    506  return;
    507  }
    508  if(domain_id == 0)
    509  {
    510  afb_req_fail(request,"wrong-request", "domainID should be more than 0");
    511  return;
    512  }
    513  const gchar* name = afb_req_value(request, _appname); /* s */
    514  if(!name)
    515  {
    516  char* info = "Must specify the name. Please input json arg such as {\"appname\":\"radio\"}";
    517  afb_req_fail(request, NULL, info);
    518  return;
    519  }
    520  if(REQ_OK != getid_uint16(request, _sourceClassID, &source_class_id)){
    521  source_class_id = 0; /* BASE */
    522  }
    523  if(REQ_OK != getid_uint16(request, _sourceState, &source_state)){
    524  source_state = 0;
    525  }
    526  if(REQ_OK != getid_int16(request, _volume, &volume)){
    527  volume = 3000;
    528  }
    529  gboolean visible = TRUE; /* b */
    530  struct availability_s available; /* (ii) */
    531  available.availability = 1; /* A_UNKNOWN */
    532  available.avalilable_reason = 0; /* AR_UNKNOWN */
    533  guint16 interrupt = 1; /* q IS_OFF */
    534 
    535  struct sound_property_s sound_property_list; /* a(in) */
    536  sound_property_list.type = 0;
    537  sound_property_list.value = 0; /* in reality, this is array of struct */
    538 
    539  gint32 connection_format_list = 0; /* ai */
    540  struct main_sound_property_s main_property_list; /* a(in) */
    541  main_property_list.type = 0;
    542  main_property_list.value = 0;
    543 
    544  struct notification_config_s nconf_routing;
    545  struct notification_config_s nconf_command; /* a(iin)a(iin) */
    546  nconf_routing.type = 0;
    547  nconf_routing.status = 0;
    548  nconf_routing.parameter = 0;
    549 
    550  nconf_command.type = 0;
    551  nconf_command.status = 0;
    552  nconf_command.parameter = 0;
    553 
    554  /* acuire data */
    555  guint16 acquire_source_id;
    556  guint16 error;
    557 
    558  GVariant* sourceData = create_source_data (source_id, domain_id, name, source_class_id,
    559  source_state, volume, visible, available, interrupt,
    560  sound_property_list, connection_format_list, main_property_list,
    561  nconf_routing, nconf_command, afbitf);
    562 
    563  GVariant* input = g_variant_ref_sink(sourceData);
    564  audiomanager_routinginterface_call_register_source_sync(
    565  am_route_bus,
    566  input,
    567  &acquire_source_id,
    568  &error,
    569  NULL, &err);
    570  g_variant_unref(input);
    571 
    572  if(err != NULL)
    573  {
    574  afb_req_fail(request, "failed", "Unable to call registerSource");
    575  return;
    576  }
    577 
    578  /*create response json object*/
    579  struct json_object *res = json_object_new_object();
    580  sm_add_object_to_json_object_func(res, __FUNCTION__, 4,
    581  _error, error,
    582  _sourceid, acquire_source_id);
    583  char *info;
    584  get_response_audiomanager_massage_error(error,&info);
    585  afb_req_success(request, res, info);
    586 }
    587 
    588 static void deregisterSource(struct afb_req request)
    589 {
    590  guint16 source_id;
    591  guint16 error;
    592 
    593  GError *err = NULL;
    594 
    595  if(REQ_OK != getid_uint16(request, _sourceid, &source_id)){
    596  afb_req_fail(request, "wrong-request", NULL);
    597  }
    598  audiomanager_routinginterface_call_deregister_source_sync(
    599  am_route_bus,
    600  source_id,
    601  &error,
    602  NULL, &err
    603  );
    604  if(err != NULL)
    605  {
    606  afb_req_fail(request, "failed", "Unable to call deregisterSource");
    607  return;
    608  }
    609  /*create response json object*/
    610  struct json_object *res = json_object_new_object();
    611  sm_add_object_to_json_object_func(res, __FUNCTION__, 2,
    612  _error, error);
    613  char *info;
    614  get_response_audiomanager_massage_error(error,&info);
    615  afb_req_success(request, res, info);
    616 
    617 }
    618 
    619 static void confirmRoutingReady(struct afb_req request)
    620 {
    621  /* This function will be deprecated because application will not register function*/
    622 }
    623 static void confirmRoutingRundown(struct afb_req request)
    624 {
    625  /* This function will be deprecated because application will not register function*/
    626 }
    627 static void ackSetVolumes(struct afb_req request)
    628 {
    629  /* This function will be deprecated */
    630 }
    631 static void ackSinkNotificationConfiguration(struct afb_req request)
    632 {
    633  /* This function will be deprecated */
    634 }
    635 static void ackSourceNotificationConfiguration(struct afb_req request)
    636 {
    637  /* This function will be deprecated */
    638 }
    639 
    640 
    641 static void subscribe(struct afb_req request)
    642 {
    643  const char *value = afb_req_value(request, "event");
    644  char *info;
    645  DEBUG(afbitf, "value is %s", value);
    646  if(value) {
    647  int index = sm_search_event_name_index(value);
    648  if(index < 0)
    649  {
    650  index = sm_search_routing_event_name_index(value);
    651  if(index < 0)
    652  {
    653  ERROR(afbitf, "dedicated event doesn't exist");
    654  }
    655  else
    656  {
    657  afb_req_subscribe(request, *routing_event_list[index].event);
    658  }
    659  }
    660  else
    661  {
    662  afb_req_subscribe(request, *command_event_list[index].event);
    663  }
    664  }
    665  else{
    666  ERROR(afbitf, "Please input event name");
    667  }
    668  afb_req_success(request, NULL, NULL);
    669 }
    670 
    671 static void unsubscribe(struct afb_req request)
    672 {
    673  const char *value = afb_req_value(request, "event");
    674  char *info;
    675  DEBUG(afbitf, "value is %s", value);
    676  if(value) {
    677  int index = sm_search_event_name_index(value);
    678  if(index < 0)
    679  {
    680  index = sm_search_routing_event_name_index(value);
    681  if(index < 0)
    682  {
    683  ERROR(afbitf, "dedicated event doesn't exist");
    684  }
    685  else
    686  {
    687  afb_req_unsubscribe(request, *routing_event_list[index].event);
    688  }
    689  }
    690  else
    691  {
    692  afb_req_unsubscribe(request, *command_event_list[index].event);
    693  }
    694  }
    695  else{
    696  ERROR(afbitf, "Please input event name");
    697  }
    698  afb_req_success(request, NULL, NULL);
    699 }
    700 
    701 /*
    702 ********** Callback Function invoked by Audio Manager **********
    703 */
    704 
    705 static void on_new_main_connection(AudiomanagerCommandinterface* interface,
    706  GVariant* mainConnection)
    707 {
    708  DEBUG(afbitf,"%s is called",__FUNCTION__);
    709 
    710  guint16 mcid, srcid, sinkid;
    711  gint16 delay, constate;
    712  g_variant_get(
    713  mainConnection,"(qqqnn)", &mcid, &srcid, &sinkid, &delay, &constate);
    714 
    715  struct json_object* res_obj = json_object_new_object();
    716  sm_add_object_to_json_object(res_obj,10,
    717  _main_connection_id, mcid,
    718  _sourceid, srcid,
    719  _sinkid, sinkid,
    720  _delay, delay,
    721  _connectionState, constate
    722  );
    723  DEBUG(afbitf,"json object :%s:",json_object_to_json_string(res_obj));
    724 
    725  afb_event_push(ev_new_connection, res_obj);
    726 }
    727 
    728 static void on_removed_main_connection(
    729  AudiomanagerCommandinterface* interface, guint16 mainConnectionID)
    730 {
    731  DEBUG(afbitf,"%s is called",__FUNCTION__);
    732 
    733  struct json_object* res_obj = json_object_new_object();
    734  sm_add_object_to_json_object(res_obj, 2,
    735  _main_connection_id, mainConnectionID);
    736  afb_event_push(ev_removed_main_connection, res_obj);
    737 }
    738 
    739 static void on_main_connection_state_changed(
    740  AudiomanagerCommandinterface* interface, guint16 connectionID, gint16 connectionState)
    741 {
    742  DEBUG(afbitf,"%s is called",__FUNCTION__);
    743 
    744  struct json_object* res_obj = json_object_new_object();
    745  sm_add_object_to_json_object(res_obj, 4,
    746  _connectionID, connectionID,
    747  _connectionState, connectionState);
    748  afb_event_push(ev_main_connection_state_changed, res_obj);
    749 }
    750 
    751 static void on_volume_changed(
    752  AudiomanagerCommandinterface* interface, guint16 sinkID, gint16 volume)
    753 {
    754  DEBUG(afbitf,"%s is called",__FUNCTION__);
    755  struct json_object* res_obj = json_object_new_object();
    756  sm_add_object_to_json_object(res_obj, 4,
    757  _sinkid, sinkID,
    758  _volume, volume);
    759  afb_event_push(ev_volume_changed, res_obj);
    760 }
    761 
    762 static void on_sink_mute_state_changed(
    763  AudiomanagerCommandinterface* interface, guint16 sinkID, gint16 mute)
    764 {
    765  DEBUG(afbitf,"%s is called",__FUNCTION__);
    766  struct json_object* res_obj = json_object_new_object();
    767  sm_add_object_to_json_object(res_obj, 4,
    768  _sinkid, sinkID,
    769  _muteState, mute);
    770  afb_event_push(ev_sink_mute_state_changed, res_obj);
    771 }
    772 
    773 /*
    774 ********** Callback Function invoked by Audio Manager Routing Interface**********
    775 */
    776 static void on_set_routing_ready(
    777  AudiomanagerRoutinginterface* interface)
    778 {
    779  DEBUG(afbitf,"%s is called",__FUNCTION__);
    780  afb_event_push(ev_set_routing_ready, NULL);
    781 }
    782 
    783 static void on_set_routing_rundown(
    784  AudiomanagerRoutinginterface* interface)
    785 {
    786  DEBUG(afbitf,"%s is called",__FUNCTION__);
    787  afb_event_push(ev_set_routing_ready, NULL);
    788 }
    789 
    790 
    791 
    792 /*
    793 ********** Callback Function invoked by Sound Manager Adapter Interface**********
    794 *
    795 * For now, there may be no need to send events to applications from these invocation.
    796 * Sound Manager just sends ack to Audio Manager in charge of applications.
    797 * If event is needed, make events in initialize function in this source, and
    798 * write afb_event_push in the invocations.
    799 * Events should be pushed in this source.(I teseted to push events in other code, but can't)
    800 *
    801 */
    802 
    803 
    804 static gboolean on_async_abort(
    805  OrgSoundmanagerGeniviRoutingsend *object,
    806  GDBusMethodInvocation *invocation,
    807  guint16 arg_handle)
    808 {
    809  DEBUG(afbitf, "%s called", __FUNCTION__);
    810  /* Nothing To Do. If it is better to implement something, I will implement */
    811  return TRUE;
    812 }
    813 
    814 static gboolean on_async_connect(
    815  OrgSoundmanagerGeniviRoutingsend *object,
    816  GDBusMethodInvocation *invocation,
    817  guint16 arg_handle,
    818  guint16 arg_connectionID,
    819  guint16 arg_sourceID,
    820  guint16 arg_sinkID,
    821  gint arg_connectionFormat)
    822 {
    823  DEBUG(afbitf, "%s called", __FUNCTION__);
    824  GError* err;
    825  struct json_object* res_obj = json_object_new_object();
    826  sm_add_object_to_json_object(res_obj, 10,
    827  _handle, arg_handle,
    828  _connectionID, arg_connectionID,
    829  _sourceid, arg_sourceID,
    830  _sinkid, arg_sinkID,
    831  _connectionFormat, arg_connectionFormat);
    832  afb_event_push(ev_async_connect, res_obj);
    833  audiomanager_routinginterface_call_ack_connect_sync(
    834  am_route_bus,
    835  arg_handle,
    836  arg_connectionID,
    837  NULL,
    838  NULL, &err);
    839  if(err != NULL)
    840  {
    841  ERROR(afbitf, "Can't create sound manager adapter");
    842  return FALSE;
    843  }
    844  return TRUE;
    845 }
    846 
    847 static gboolean on_async_disconnect(
    848  OrgSoundmanagerGeniviRoutingsend *object,
    849  GDBusMethodInvocation *invocation,
    850  guint16 arg_handle,
    851  guint16 arg_connectionID)
    852 {
    853  DEBUG(afbitf, "%s called", __FUNCTION__);
    854  GError* err;
    855  audiomanager_routinginterface_call_ack_disconnect_sync(
    856  am_route_bus,
    857  arg_handle,
    858  arg_connectionID,
    859  NULL,
    860  NULL, &err);
    861  if(err != NULL)
    862  {
    863  ERROR(afbitf, "Can't create sound manager adapter");
    864  return FALSE;
    865  }
    866  return TRUE;
    867 }
    868 
    869 static gboolean on_async_set_sink_volume(
    870  OrgSoundmanagerGeniviRoutingsend *object,
    871  GDBusMethodInvocation *invocation,
    872  guint16 arg_handle,
    873  guint16 arg_sinkID,
    874  gint16 arg_volume,
    875  gint16 arg_ramp,
    876  guint16 arg_time)
    877 {
    878  DEBUG(afbitf, "%s called", __FUNCTION__);
    879  /* Nothing To Do. If it is better to implement something, I will implement */
    880  return TRUE;
    881 }
    882 
    883 static gboolean on_async_set_source_state(
    884  OrgSoundmanagerGeniviRoutingsend *object,
    885  GDBusMethodInvocation *invocation,
    886  guint16 arg_handle,
    887  guint16 arg_sourceID,
    888  gint arg_sourceState)
    889 {
    890  DEBUG(afbitf, "%s called", __FUNCTION__);
    891  GError* err;
    892  struct json_object* res_obj = json_object_new_object();
    893  sm_add_object_to_json_object(res_obj, 6,
    894  _handle, arg_handle,
    895  _sourceid, arg_sourceID,
    896  _sourceState, arg_sourceState);
    897  afb_event_push(ev_async_set_source_state, res_obj);
    898  /* Applications should return ackSetSourceState, then Sound Manager doen't return ackSetSourceState */
    899  /*audiomanager_routinginterface_call_ack_set_source_state_sync(
    900  am_route_bus,
    901  arg_handle,
    902  NULL,
    903  NULL, &err);*/
    904  if(err != NULL)
    905  {
    906  ERROR(afbitf, "Can't create sound manager adapter");
    907  return FALSE;
    908  }
    909  return TRUE;
    910 }
    911 
    912 static gboolean init_sound_manager_adapter(GDBusServer *server, GDBusConnection *conn, gpointer data)
    913 {
    914  DEBUG(afbitf, "%s called", __FUNCTION__);
    915  sm_adapter = org_soundmanager_genivi_routingsend_skeleton_new();
    916  sm_itf = ORG_SOUNDMANAGER_GENIVI_ROUTINGSEND_GET_IFACE(sm_adapter);
    917  /* initialize sound manager adapter */
    918  sm_itf->handle_async_abort = on_async_abort;
    919  sm_itf->handle_async_connect = on_async_connect;
    920  sm_itf->handle_async_disconnect = on_async_disconnect;
    921  sm_itf->handle_async_set_sink_volume = on_async_set_sink_volume;
    922  sm_itf->handle_async_set_source_state = on_async_set_source_state;
    923  gboolean ret = g_dbus_interface_skeleton_export(G_DBUS_INTERFACE_SKELETON(sm_adapter), conn, SOUND_MANAGER_PATH, NULL);
    924  if(!ret)
    925  {
    926  ERROR(afbitf, "Can't create sound manager adapter");
    927  return FALSE;
    928  }
    929  return TRUE;
    930 }
    931 
    932 /*
    933  * array of the verbs exported to afb-daemon
    934  */
    935 static const struct afb_verb_desc_v1 binding_verbs[]= {
    936 /* VERB'S NAME SESSION MANAGEMENT FUNCTION TO CALL SHORT DESCRIPTION */
    937 { .name = "connect", .session = AFB_SESSION_NONE, .callback = connect, .info = "Connect source id and sink id" },
    938 { .name = "disconnect", .session = AFB_SESSION_NONE, .callback = disconnect, .info = "Disconnect source id and sink id" },
    939 { .name = "setVolume", .session = AFB_SESSION_NONE, .callback = setVolume, .info = "Set volume value" }, /* it is better to show the range*/
    940 { .name = "volumeStep", .session = AFB_SESSION_NONE, .callback = volumeStep, .info = "Set volume step range" },
    941 { .name = "setSinkMuteState", .session = AFB_SESSION_NONE, .callback = setSinkMuteState, .info = "Set Mute state: 1 means mute, 2 means umute. Others are invalid" },
    942 { .name = "getListMainConnections", .session = AFB_SESSION_NONE, .callback = getListMainConnections, .info = "Get MainConnection List" },
    943 /* Routing Interface */
    944 { .name = "registerSource", .session = AFB_SESSION_NONE, .callback = registerSource, .info = "Register Application" },
    945 { .name = "deregisterSource", .session = AFB_SESSION_NONE, .callback = deregisterSource, .info = "Deregister Application" },
    946 { .name = "ackConnect", .session = AFB_SESSION_NONE, .callback = ackConnect, .info = "Acknowledge of asyncConnect" },
    947 { .name = "ackDisconnect", .session = AFB_SESSION_NONE, .callback = ackDisconnect, .info = "Acknowledge of asyncConnect" },
    948 { .name = "ackSetSourceState", .session = AFB_SESSION_NONE, .callback = ackSetSourceState, .info = "Acknowledge of asyncSetSourceState" },
    949 { .name = "subscribe", .session = AFB_SESSION_NONE, .callback = subscribe, .info = "Subscribe event" },
    950 { .name = "unsubscribe", .session = AFB_SESSION_NONE, .callback = unsubscribe, .info = "Unsubscribe event" },
    951 { .name = NULL } /* marker for end of the array */
    952 };
    953 
    954 static const struct afb_binding binding_description =
    955 {
    956  .type = AFB_BINDING_VERSION_1,
    957  .v1 = {
    958  .info = "Sound Manager" ,
    959  .prefix = "soundmanager" ,
    960  .verbs = binding_verbs
    961  }
    962 };
    963 
    964 static void *dbus_event_loop_run(void *args)
    965 {
    966  loop = g_main_loop_new(NULL, FALSE);
    967  g_main_loop_run(loop);
    968 }
    969 
    970 static void free_dbus()
    971 {
    972  ERROR(afbitf, "free dbus");
    973  if(am_cmd_bus)
    974  {
    975  free(am_cmd_bus);
    976  }
    977  if(am_route_bus)
    978  {
    979  free(am_route_bus);
    980  }
    981 }
    982 
    983 static int init()
    984 {
    985  int ret;
    986  INFO(afbitf,"Initialize Dbus object");
    987  /* Initialize Dbus interface */
    988  if(am_cmd_bus || am_route_bus)
    989  {
    990  ERROR(afbitf, "Dbus object to Audio Manager is already created");
    991  goto out;
    992  }
    993  am_cmd_bus = audiomanager_commandinterface_proxy_new_for_bus_sync(
    994  G_BUS_TYPE_SYSTEM,
    995  G_DBUS_PROXY_FLAGS_NONE,
    996  AM_NAME,
    997  AM_CMD_PATH,
    998  NULL,
    999  NULL
    1000  );
    1001  am_route_bus = audiomanager_routinginterface_proxy_new_for_bus_sync(
    1002  G_BUS_TYPE_SYSTEM,
    1003  G_DBUS_PROXY_FLAGS_NONE,
    1004  AM_NAME,
    1005  AM_ROUTE_PATH,
    1006  NULL,
    1007  NULL
    1008  );
    1009 
    1010  if(!am_cmd_bus || !am_route_bus)
    1011  {
    1012  goto out;
    1013  }
    1014 
    1015  INFO(afbitf, "Finish Initialize");
    1016  return 0;
    1017 out:
    1018  ERROR(afbitf,"Failed to initialize");
    1019  free_dbus();
    1020  return -1;
    1021 }
    1022 
    1023 static int sm_event_init()
    1024 {
    1025  INFO(afbitf,"Initialize event receive setting");
    1026  int ret;
    1027  /* Initialize make event */
    1028  size_t size = sizeof cmd_evlist / sizeof *cmd_evlist;
    1029 
    1030  /*create event*/
    1031  /*ToDo Hash table is better. And event should be created in the loop
    1032  I would like to change */
    1033  ev_volume_changed = afb_daemon_make_event(afbitf->daemon, cmd_evlist[0]);
    1034  ev_new_connection = afb_daemon_make_event(afbitf->daemon, cmd_evlist[1]);
    1035  ev_removed_main_connection = afb_daemon_make_event(afbitf->daemon, cmd_evlist[2]);
    1036  ev_sink_mute_state_changed = afb_daemon_make_event(afbitf->daemon, cmd_evlist[3]);
    1037  ev_main_connection_state_changed = afb_daemon_make_event(afbitf->daemon, cmd_evlist[4]);
    1038  command_event_list[0].name = cmd_evlist[0];
    1039  command_event_list[0].event = &ev_volume_changed;
    1040  command_event_list[1].name = cmd_evlist[1];
    1041  command_event_list[1].event = &ev_new_connection;
    1042  command_event_list[2].name = cmd_evlist[2];
    1043  command_event_list[2].event = &ev_removed_main_connection;
    1044  command_event_list[3].name = cmd_evlist[3];
    1045  command_event_list[3].event = &ev_sink_mute_state_changed;
    1046  command_event_list[4].name = cmd_evlist[4];
    1047  command_event_list[4].event = &ev_main_connection_state_changed;
    1048 
    1049  /* create routing event */
    1050  ev_set_routing_ready = afb_daemon_make_event(afbitf->daemon, route_evlist[0]);
    1051  ev_set_routing_rundown = afb_daemon_make_event(afbitf->daemon, route_evlist[1]);
    1052  ev_async_connect = afb_daemon_make_event(afbitf->daemon, route_evlist[2]);
    1053  ev_async_set_source_state = afb_daemon_make_event(afbitf->daemon, route_evlist[3]);
    1054  routing_event_list[0].name = route_evlist[0];
    1055  routing_event_list[0].event = &ev_set_routing_ready;
    1056  routing_event_list[1].name = route_evlist[1];
    1057  routing_event_list[1].event = &ev_set_routing_rundown;
    1058  routing_event_list[2].name = route_evlist[1];
    1059  routing_event_list[2].event = &ev_async_connect;
    1060  routing_event_list[3].name = route_evlist[1];
    1061  routing_event_list[3].event = &ev_async_set_source_state;
    1062  /*for(size_t i = 0; i < size; ++i)
    1063  {
    1064  struct afb_event afbev = afb_daemon_make_event(afbitf->daemon, cmd_evlist[i]));
    1065  size_t afbev_size = sizeof afbev;
    1066  size_t key_size = sizeof cmd_evlist[i];
    1067 
    1068  struct event ev = {cmd_evlist[i],afbev};
    1069  command_event_list[i] = malloc(key_size + afbev_size);
    1070  command_event_list[i] = ev;
    1071  search_result = hsearch(entry, FIND);
    1072  if(search_result)
    1073  DEBUG(afbitf, "event name is %s", search_result->key);
    1074  }*/
    1075 
    1076  /* Initialize dbus event thread */
    1077  if(!am_cmd_bus || !am_route_bus)
    1078  {
    1079  goto ev_init_out;
    1080  }
    1081  pthread_t thread_id;
    1082  ret = pthread_create(&thread_id, NULL, dbus_event_loop_run, NULL);
    1083  if(ret != 0)
    1084  {
    1085  goto ev_init_out;
    1086  }
    1087  /* initialize signal from audio manager command interface */
    1088  g_signal_connect(am_cmd_bus,
    1089  "volume_changed",
    1090  G_CALLBACK(on_volume_changed),
    1091  NULL);
    1092  g_signal_connect(am_cmd_bus,
    1093  "new_main_connection",
    1094  G_CALLBACK(on_new_main_connection),
    1095  NULL);
    1096  g_signal_connect(am_cmd_bus,
    1097  "removed_main_connection",
    1098  G_CALLBACK(on_removed_main_connection),
    1099  NULL);
    1100  g_signal_connect(am_cmd_bus,
    1101  "sink_mute_state_changed",
    1102  G_CALLBACK(on_sink_mute_state_changed),
    1103  NULL);
    1104  g_signal_connect(am_cmd_bus,
    1105  "main_connection_state_changed",
    1106  G_CALLBACK(on_main_connection_state_changed),
    1107  NULL);
    1108  g_signal_connect(am_route_bus,
    1109  "set_routing_ready",
    1110  G_CALLBACK(on_set_routing_ready),
    1111  NULL);
    1112  g_signal_connect(am_route_bus,
    1113  "set_routing_rundown",
    1114  G_CALLBACK(on_set_routing_rundown),
    1115  NULL);
    1116 
    1117  /* Get soundmanager adapter bus */
    1118  g_bus_own_name(G_BUS_TYPE_SYSTEM, SOUND_MANAGER_NAME, G_BUS_NAME_OWNER_FLAGS_NONE,
    1119  NULL, init_sound_manager_adapter, NULL, NULL, NULL);
    1120 
    1121  INFO(afbitf,"Finish Initialize event receive setting");
    1122  return 0;
    1123 
    1124 ev_init_out:
    1125  if(loop != NULL)
    1126  {
    1127  g_main_loop_unref(loop);
    1128  }
    1129  free_dbus();
    1130  ERROR(afbitf, "DBus connection is not created");
    1131  return -1;
    1132 }
    1133 
    1134 /*
    1135  * activation function for registering the binding called by afb-daemon
    1136  */
    1137 const struct afb_binding *afbBindingV1Register (const struct afb_binding_interface *itf)
    1138 {
    1139  afbitf = itf; // records the interface for accessing afb-daemon
    1140 
    1141  int ret = init(); // Set Dbus communication with audio mangaer
    1142  return (ret == 0) ? &binding_description : NULL;
    1143 }
    1144 
    1145 int afbBindingV1ServiceInit(struct afb_service service)
    1146 {
    1147  DEBUG(afbitf, "Initializing Audio Manager Notification \n");
    1148  int ret = sm_event_init();
    1149  return ret;
    1150 }
    struct afb_event * event
    Definition: soundmanager.c:51
    +
    #define AM_CMD_PATH
    Definition: soundmanager.c:32
    +
    #define AM_NAME
    Definition: soundmanager.c:31
    +
    #define AM_ROUTE_PATH
    Definition: soundmanager.c:33
    + +
    const struct afb_binding * afbBindingV1Register(const struct afb_binding_interface *itf)
    +
    int afbBindingV1ServiceInit(struct afb_service service)
    +
    #define ROUTING_EVENT_NUM
    Definition: soundmanager.c:38
    +
    #define SOUND_MANAGER_PATH
    Definition: soundmanager.c:35
    +
    #define SOUND_MANAGER_NAME
    Definition: soundmanager.c:34
    +
    #define COMMAND_EVENT_NUM
    Definition: soundmanager.c:37
    +
    char * name
    Definition: soundmanager.c:50
    +
    +
    + + + + diff --git a/doc/api-ref/html/splitbar.png b/doc/api-ref/html/splitbar.png new file mode 100644 index 0000000..fe895f2 Binary files /dev/null and b/doc/api-ref/html/splitbar.png differ diff --git a/doc/api-ref/html/structevent.html b/doc/api-ref/html/structevent.html new file mode 100644 index 0000000..efe2a4d --- /dev/null +++ b/doc/api-ref/html/structevent.html @@ -0,0 +1,147 @@ + + + + + + + +Sound Manager: event Struct Reference + + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    Sound Manager +
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    +
    event Struct Reference
    +
    +
    + + + + + + +

    +Data Fields

    char * name
     
    struct afb_event * event
     
    +

    Detailed Description

    +
    +

    Definition at line 49 of file soundmanager.c.

    +

    Field Documentation

    + +

    ◆ event

    + +
    +
    + + + + +
    struct afb_event* event::event
    +
    + +

    Definition at line 51 of file soundmanager.c.

    + +
    +
    + +

    ◆ name

    + +
    +
    + + + + +
    char* event::name
    +
    + +

    Definition at line 50 of file soundmanager.c.

    + +
    +
    +
    The documentation for this struct was generated from the following file: +
    +
    + + + + diff --git a/doc/api-ref/html/structevent.js b/doc/api-ref/html/structevent.js new file mode 100644 index 0000000..4e71468 --- /dev/null +++ b/doc/api-ref/html/structevent.js @@ -0,0 +1,5 @@ +var structevent = +[ + [ "event", "structevent.html#a58726ebc551d36562ac3f9e1fe293214", null ], + [ "name", "structevent.html#a723489bec273335d13513cd1040c0216", null ] +]; \ No newline at end of file diff --git a/doc/api-ref/html/sync_off.png b/doc/api-ref/html/sync_off.png new file mode 100644 index 0000000..3b443fc Binary files /dev/null and b/doc/api-ref/html/sync_off.png differ diff --git a/doc/api-ref/html/sync_on.png b/doc/api-ref/html/sync_on.png new file mode 100644 index 0000000..e08320f Binary files /dev/null and b/doc/api-ref/html/sync_on.png differ diff --git a/doc/api-ref/html/tab_a.png b/doc/api-ref/html/tab_a.png new file mode 100644 index 0000000..3b725c4 Binary files /dev/null and b/doc/api-ref/html/tab_a.png differ diff --git a/doc/api-ref/html/tab_b.png b/doc/api-ref/html/tab_b.png new file mode 100644 index 0000000..e2b4a86 Binary files /dev/null and b/doc/api-ref/html/tab_b.png differ diff --git a/doc/api-ref/html/tab_h.png b/doc/api-ref/html/tab_h.png new file mode 100644 index 0000000..fd5cb70 Binary files /dev/null and b/doc/api-ref/html/tab_h.png differ diff --git a/doc/api-ref/html/tab_s.png b/doc/api-ref/html/tab_s.png new file mode 100644 index 0000000..ab478c9 Binary files /dev/null and b/doc/api-ref/html/tab_s.png differ diff --git a/doc/api-ref/html/tabs.css b/doc/api-ref/html/tabs.css new file mode 100644 index 0000000..a28614b --- /dev/null +++ b/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/doc/api-ref/html/test_8cpp.html b/doc/api-ref/html/test_8cpp.html new file mode 100644 index 0000000..7d62d1f --- /dev/null +++ b/doc/api-ref/html/test_8cpp.html @@ -0,0 +1,173 @@ + + + + + + + +Sound Manager: SoundManagerBinding/libsoundmanager/test.cpp File Reference + + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    Sound Manager +
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    +
    test.cpp File Reference
    +
    +
    +
    #include <libsoundmanager/libsoundmanager.hpp>
    +#include <iostream>
    +#include <glib-2.0/glib.h>
    +#include <fcntl.h>
    +#include <string>
    +#include <sys/types.h>
    +#include <sys/stat.h>
    +#include <thread>
    +#include <exception>
    +#include <vector>
    +#include <sstream>
    +
    +

    Go to the source code of this file.

    + + + + +

    +Functions

    int main (int argc, char **argv)
     
    + + + +

    +Variables

    LibSoundmanagersm
     
    +

    Function Documentation

    + +

    ◆ main()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    int main (int argc,
    char ** argv 
    )
    +
    + +

    Definition at line 123 of file test.cpp.

    + +
    +
    +

    Variable Documentation

    + +

    ◆ sm

    + +
    +
    + + + + +
    LibSoundmanager* sm
    +
    + +

    Definition at line 33 of file test.cpp.

    + +
    +
    +
    +
    + + + + diff --git a/doc/api-ref/html/test_8cpp.js b/doc/api-ref/html/test_8cpp.js new file mode 100644 index 0000000..2de2e8c --- /dev/null +++ b/doc/api-ref/html/test_8cpp.js @@ -0,0 +1,5 @@ +var test_8cpp = +[ + [ "main", "test_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627", null ], + [ "sm", "test_8cpp.html#a0cbfe893edb63b7b0c419db013fa9022", null ] +]; \ No newline at end of file diff --git a/doc/api-ref/html/test_8cpp_source.html b/doc/api-ref/html/test_8cpp_source.html new file mode 100644 index 0000000..bde178d --- /dev/null +++ b/doc/api-ref/html/test_8cpp_source.html @@ -0,0 +1,106 @@ + + + + + + + +Sound Manager: SoundManagerBinding/libsoundmanager/test.cpp Source File + + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    Sound Manager +
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    test.cpp
    +
    +
    +Go to the documentation of this file.
    1 /*
    2  * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
    3  *
    4  * Licensed under the Apache License, Version 2.0 (the "License");
    5  * you may not use this file except in compliance with the License.
    6  * You may obtain a copy of the License at
    7  *
    8  * http://www.apache.org/licenses/LICENSE-2.0
    9  *
    10  * Unless required by applicable law or agreed to in writing, software
    11  * distributed under the License is distributed on an "AS IS" BASIS,
    12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13  * See the License for the specific language governing permissions and
    14  * limitations under the License.
    15  */
    16 
    18 #include <iostream>
    19 #include <glib-2.0/glib.h>
    20 #include <fcntl.h>
    21 #include <string>
    22 #include <sys/types.h>
    23 #include <sys/stat.h>
    24 #include <thread>
    25 #include <exception>
    26 #include <vector>
    27 #include <sstream>
    28 
    29 using namespace std;
    30 
    31 static int io_event_callback(sd_event_source *src, int fd, uint32_t revents, void *closure);
    32 static vector<string> split(const string& str, char sep);
    34 static sd_event_source *evsrc;
    35 static GMainLoop *loop = NULL;
    36 static void call_test();
    37 
    38 static void usage()
    39 {
    40  cout << "verb "<< "key:arg" << endl;
    41  cout << "example: connect sourceID 100 sinkID 100" << endl;
    42  cout << "verb list:" << endl;
    43  // Todo output api list
    44  exit(0);
    45 }
    46 
    47 static void *event_loop_run(void *args)
    48 {
    49  call_test();
    50 }
    51 
    52 static int io_event_callback(sd_event_source *src, int fd, uint32_t revents, void *closure)
    53 {
    54  /* This is for Receiving Thread */
    55 }
    56 
    57 static void call_test()
    58 {
    59  string command;
    60 
    61  cout << "input verb and argments" << endl;
    62 
    63  /* read the buffer */
    64  for(;;){
    65  char line[1023];
    66  cin.getline(line, sizeof(line));
    67  command = line;
    68  if(command.empty()){
    69  continue;
    70  }
    71 
    72  vector<string> v_command = split(command, ' ');
    73  /*for(auto itr = v_command.begin(); itr != v_command.end(); ++itr)
    74  {
    75  cout << *itr <<endl;
    76  }*/
    77  size_t num = v_command.size();
    78  if(num % 2 == 0){
    79  cout << "If command contains args, please input <key,value> in argument part" << endl;
    80  continue;
    81  }
    82  /* create json object */
    83  struct json_object* j_obj = json_object_new_object();
    84  for(int i = 1;i < (v_command.size()) ;++i){
    85  struct json_object* val = json_object_new_string(v_command[i+1].c_str());
    86  json_object_object_add(j_obj, v_command[i].c_str(), val);
    87  ++i;
    88  }
    89  /* call verb via libsoundmanager */
    90  sm->call(v_command[0], j_obj);
    91  /* free vector */
    92  vector<string>().swap(v_command);
    93  string().swap(command);
    94  }
    95 }
    96 
    97 static void onRep(struct json_object* reply_contents)
    98 {
    99  const char* str = json_object_to_json_string(reply_contents);
    100  cout << "[CB onRep]: " << str << endl;
    101  json_object_put(reply_contents);
    102 }
    103 
    104 static void onEv(const string& event, struct json_object* event_contents)
    105 {
    106  const char* str = json_object_to_json_string(event_contents);
    107  cout << "[CB onEvent]: event" << event.c_str() << " contents:" << str << endl;
    108  json_object_put(event_contents);
    109 }
    110 
    111 static vector<string> split(const string& str, char sep)
    112 {
    113  vector<string> v;
    114  stringstream ss(str);
    115  string buffer;
    116  while( getline(ss, buffer, sep) ) {
    117  if(!buffer.empty())
    118  v.push_back(buffer);
    119  }
    120  return v;
    121 }
    122 
    123 int main(int argc, char **argv)
    124 {
    125  int ret;
    126  if(argc == 1)
    127  {
    128  printf("Please input port num in first argument, and token in second argument");
    129  usage();
    130  return 0;
    131  }
    132  if(argc == 2)
    133  {
    134  string av(argv[1]);
    135  if( (av == "-h") || (av == "--help"))
    136  {
    137  usage();
    138  return 0;
    139  }
    140  }
    141 
    142  string port_string(argv[1]);
    143  string token(argv[2]);
    144  char* endptr;
    145  long port = strtol(port_string.c_str(),&endptr,10);
    146 
    147  /* error check of range */
    148  if( (port > 20000) || (port < 0) )
    149  {
    150  printf("input under 20000(temporary number)");
    151  return 0;
    152  }
    153  if(*endptr != '\0')
    154  {
    155  printf("not number");
    156  return 0;
    157  }
    158 
    159  cout << "Call test for libsoundmanager" << endl;
    160  sm = new LibSoundmanager(port, token);
    161  sm->register_callback(&onEv, &onRep);
    162  pthread_t thread_id;
    163  ret = pthread_create(&thread_id, NULL, event_loop_run, NULL);
    164 
    165  sd_event *sloop;
    166  ret = sd_event_default(&sloop);
    167 
    168  if (ret < 0) {
    169  printf("failed to create event loop");
    170  return -1;
    171  }
    172 
    173  sd_event_add_io(sloop, &evsrc, 0, EPOLLIN, io_event_callback, NULL);
    174  for(;;)
    175  sd_event_run(sloop, 30000000);
    176  return 0;
    177 }
    + +
    int call(const std::string &verb, struct json_object *arg)
    +
    void register_callback(void(*event_cb)(const std::string &event, struct json_object *event_contents), void(*reply_cb)(struct json_object *reply_contents))
    +
    LibSoundmanager * sm
    Definition: test.cpp:33
    + +
    int main(int argc, char **argv)
    Definition: test.cpp:123
    + +
    +
    + + + + diff --git a/doc/parts/am-component.png b/doc/parts/am-component.png new file mode 100644 index 0000000..bf068bb Binary files /dev/null and b/doc/parts/am-component.png differ diff --git a/doc/parts/seq_changevolume.svg b/doc/parts/seq_changevolume.svg new file mode 100644 index 0000000..9f60795 --- /dev/null +++ b/doc/parts/seq_changevolume.svg @@ -0,0 +1,117 @@ +CommandPlugInAudio Manager DaemonRoutingPlugInApplicationSoundManagerIAmCommandSendIAmCommandReceiverAudioManagerIAmRoutingReceiveIAmRoutingSendAudio DomainSetVolume()SetVolume()SetVolume()asyncSetSinkVolume()SetVolume()ackSetVolume()ackSetVolumeChange()cbVolumeChangedsignal("volumeChanged")event [volumeChanged] \ No newline at end of file diff --git a/doc/parts/seq_connectsoundroute.svg b/doc/parts/seq_connectsoundroute.svg new file mode 100644 index 0000000..a3c392a --- /dev/null +++ b/doc/parts/seq_connectsoundroute.svg @@ -0,0 +1,145 @@ +CommandPlugInAudio Manager DaemonRoutingPlugInApplicationSoundManagerIAmCommandSendIAmCommandReceiverAudioManagerIAmRoutingReceiveIAmRoutingSendAudio DomaincbMainConnectionStateChanged(CS_CONNECTING)signal("MmainConnectionChanged (CS_CONECTING)")event [mainConnectionChanged (CS_CONECTING)]Audio Manager Policy decides this mainconnection have to be established.At the beginning of sequence Audio Managershould inform cbMainConnectionStateChanged(CS_CONNECTING) to indicated pre-informationof establishment.asyncConnect()asyncConnect()setAudioMode()ackConnect()ackConnect()asyncConnect()Audio Manager have to know that Applicationcertainly start preparing sound route, and waitproceeding until Application return feedback.Main reason is to make sure that entire sound routeis established before connection state transite tonext phase. Otherwise it is possible for Application toface the problem that ALSA virtual device cannot beopened after connection state is changed.asyncConnect()event [asyncConnect]ackConnect()cbMainConnectionStateChanged(CS_SUSPENDED) \ No newline at end of file diff --git a/doc/parts/seq_disconnectsoundroute.svg b/doc/parts/seq_disconnectsoundroute.svg new file mode 100644 index 0000000..9036aca --- /dev/null +++ b/doc/parts/seq_disconnectsoundroute.svg @@ -0,0 +1,110 @@ +CommandPlugInAudio Manager DaemonRoutingPlugInApplicationSoundManagerIAmCommandSendIAmCommandReceiverAudioManagerIAmRoutingReceiveIAmRoutingSendAudio DomainasyncDisconnect()asyncDisconnect()event [asyncDisconnect]ackDisconnect()ackDisconnect()asyncDisconnect()asyncDisconnect()disconnect()ackDisconnect()cbMainConnectionStateChanged(CS_DISCONNECTED) \ No newline at end of file diff --git a/doc/parts/seq_initialization.svg b/doc/parts/seq_initialization.svg new file mode 100644 index 0000000..18cc0bb --- /dev/null +++ b/doc/parts/seq_initialization.svg @@ -0,0 +1,129 @@ + +CommandPlugInAudio Manager DaemonRoutingPlugInApplicationSoundManagerIAmCommandSendIAmCommandReceiverAudioManagerIAmRoutingReceiveIAmRoutingSendAudio Domainalt[Domain Type = DSP/Amplifier]setRoutingReady()setRoutingReady()confirmRoutingReady()[Domain Type = Application]setRoutingReady()signal("setRoutingReady")event [setRoutingReady]call("confirmRoutingReady")confirmRoutingReady()confirmRoutingReady()setCommandReady()confirmCommandReady() \ No newline at end of file diff --git a/doc/parts/seq_registration.svg b/doc/parts/seq_registration.svg new file mode 100644 index 0000000..9bff665 --- /dev/null +++ b/doc/parts/seq_registration.svg @@ -0,0 +1,235 @@ +CommandPlugInAudio Manager DaemonRoutingPlugInApplicationSoundManagerIAmCommandSendIAmCommandReceiverAudioManagerIAmRoutingReceiveIAmRoutingSendAudio Domainalt[Domain Type = DSP/Amplifier]registerDomain()registerDomain()[Domain Type = SoundManager]registerDomain()registerDomain()alt[Register Type = Dynamic]registerSource()registerSource()registerSource()[Register Type = Static]registerSourcecbNewSource()signal("NewSource")event [newSource]alt[Register Type = Dynamic]registerSink()registerSink()[Register Type = Static]registerSinkcbNewSink()signal("NewSink")event [newSink]alt[Register Type = Dynamic]registerGateway()registerGateway()[Register Type = Static]registerGatewayhookDomainRegistrationCompelte()hookDomainRegistrationCompelte() \ No newline at end of file diff --git a/doc/parts/seq_releasesoundmode.svg b/doc/parts/seq_releasesoundmode.svg new file mode 100644 index 0000000..cbe1fa0 --- /dev/null +++ b/doc/parts/seq_releasesoundmode.svg @@ -0,0 +1,119 @@ +CommandPlugInAudio Manager DaemonRoutingPlugInApplicationSoundManagerIAmCommandSendIAmCommandReceiverAudioManagerIAmRoutingReceiveIAmRoutingSendAudio Domaindisconnect()disconnect()disconnect()opt[Main connection is existing]alt[MainConnectioState = CS_SUSPENDED]refDisconnect Sound Route[CS_CONNECTED]refStop Sound StreamingrefDisconnect Sound RoutecbMainConnectionStateChanged()signal("MainConnectionStateChanged")event [mainConnectionStateChanged]cbRemoveMainConnection()signal("RemoveMainConnection")event [removeMainConnection] \ No newline at end of file diff --git a/doc/parts/seq_requestsoundmode.svg b/doc/parts/seq_requestsoundmode.svg new file mode 100644 index 0000000..5ea9616 --- /dev/null +++ b/doc/parts/seq_requestsoundmode.svg @@ -0,0 +1,165 @@ +CommandPlugInAudio Manager DaemonRoutingPlugInApplicationSoundManagerIAmCommandSendIAmCommandReceiverAudioManagerIAmRoutingReceiveIAmRoutingSendAudio Domainconnect()connect()connect()Please note that if same connection(source and sink are completely same)has bee created already, Audio Managerdoes not notify cbNewMainConnection()opt[main connection is not existing]cbNewMainConnectionsignal("NewMainConnection")event [newMainConnection(mainConnectionID)]cbMainConnectionStateChangesignal("MainConnectionStateChange")event [mainConnectionStateChange(CS_DISCONNECTED)]Once connection is requested andcreated in AudioManager, mainconnection continuously performtransition caused by policy decisionloop[Lifecycle of a main connection]alt[Transition of sound mode = Connect]Policy_Decision()refConnect Sound RouterefStart Sound Streaming[Disconnect]refStop Sound StreamingrefDisconnect Sound Route[Suspend]refStop Sound StreamingcbMainConnectionStatesignal("MainConnectionState")event [mainConnectionStateChange]cbRemoveMainConnectionsignal("RemoveMainConnection")event [removemainConnection] \ No newline at end of file diff --git a/doc/parts/seq_setmutestate.svg b/doc/parts/seq_setmutestate.svg new file mode 100644 index 0000000..8d39775 --- /dev/null +++ b/doc/parts/seq_setmutestate.svg @@ -0,0 +1,115 @@ +CommandPlugInAudio Manager DaemonRoutingPlugInApplicationSoundManagerIAmCommandSendIAmCommandReceiverAudioManagerIAmRoutingReceiveIAmRoutingSendAudio DomainSetSinkMuteState()SetSinkMuteState()SetSinkMuteState()asyncSetSinkVolume()SetMute()ackSetMute()ackSetSinkVolumeChange()cbSinkMuteStateChangedsignal("sinkMuteStateChanged")event [sinkMuteStateChanged] \ No newline at end of file diff --git a/doc/parts/seq_startsoundstreaming.svg b/doc/parts/seq_startsoundstreaming.svg new file mode 100644 index 0000000..108cfa0 --- /dev/null +++ b/doc/parts/seq_startsoundstreaming.svg @@ -0,0 +1,129 @@ +CommandPlugInAudio Manager DaemonRoutingPlugInApplicationSoundManagerIAmCommandSendIAmCommandReceiverAudioManagerIAmRoutingReceiveIAmRoutingSendAudio DomainasyncSetSourceState (SS_ON)setMute(SS_ON)Mute(UnMute)ackSetSourceState()asyncSetSourceState()signal("asyncSetSourceState(SS_ON)")event [asyncSetSourceState("on")]Prepare audio device.And start audio playingackSetSourceState()ackSetSourceState()ackSetSource()cbMainConnectionStateChanged(CS_CONNECTED)signal("mainConnectionStateChanged (CS_CONNECTED)")event [mainConnectionStateChanged (CS_CONNECTED)] \ No newline at end of file diff --git a/doc/parts/seq_startup.svg b/doc/parts/seq_startup.svg new file mode 100644 index 0000000..27f0ab0 --- /dev/null +++ b/doc/parts/seq_startup.svg @@ -0,0 +1,68 @@ + +CommandPlugInAudio Manager DaemonRoutingPlugInApplicationSoundManagerIAmCommandSendIAmCommandReceiverAudioManagerIAmRoutingReceiveIAmRoutingSendAudio DomainStartup()loop[Number of Domains]refRegistrationwait_event() \ No newline at end of file diff --git a/doc/parts/seq_stopsoundstreaming.svg b/doc/parts/seq_stopsoundstreaming.svg new file mode 100644 index 0000000..41a2e41 --- /dev/null +++ b/doc/parts/seq_stopsoundstreaming.svg @@ -0,0 +1,129 @@ +CommandPlugInAudio Manager DaemonRoutingPlugInApplicationSoundManagerIAmCommandSendIAmCommandReceiverAudioManagerIAmRoutingReceiveIAmRoutingSendAudio DomainasyncSetSourceState ()asyncSetSourceState(SS_PAUSED)event [asyncSetSourceState("paused")]Stop audio playing.And release audio device.ackSetSourceState()ackSetSourceState()ackSetSourceState()cbMainConnectionStateChanged (CS_SUSPENDED)]signal("MainConnectionStateChanged (CS_SUSPENDED)")event [mainConnectionStateChanged (CS_SUSPENDED)]asyncSetSourceState()SetMute()Mute (MUTE)ackSetSourceState() \ No newline at end of file diff --git a/doc/parts/software-stack.png b/doc/parts/software-stack.png new file mode 100644 index 0000000..cdca6ce Binary files /dev/null and b/doc/parts/software-stack.png differ diff --git a/doc/parts/software-stack2.png b/doc/parts/software-stack2.png new file mode 100644 index 0000000..870c22f Binary files /dev/null and b/doc/parts/software-stack2.png differ diff --git a/doc/parts/typical-usecase.png b/doc/parts/typical-usecase.png new file mode 100644 index 0000000..47a2d33 Binary files /dev/null and b/doc/parts/typical-usecase.png differ diff --git a/doc/parts/typical-usecase2.png b/doc/parts/typical-usecase2.png new file mode 100644 index 0000000..4d05304 Binary files /dev/null and b/doc/parts/typical-usecase2.png differ diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt new file mode 100644 index 0000000..fe8f74b --- /dev/null +++ b/include/CMakeLists.txt @@ -0,0 +1,18 @@ +# +# 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 libsoundmanager.hpp DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +endif(DEFINED CMAKE_INSTALL_INCLUDEDIR) diff --git a/include/libsoundmanager.hpp b/include/libsoundmanager.hpp new file mode 100644 index 0000000..55e23df --- /dev/null +++ b/include/libsoundmanager.hpp @@ -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. + */ + +#ifndef LIBSOUNDMANAGER_H +#define LIBSOUNDMANAGER_H +#include +#include +#include +#include +#include +#include +extern "C" +{ +#include +#include +#include +} + +class LibSoundmanager +{ +public: + LibSoundmanager(); + ~LibSoundmanager(); + LibSoundmanager(const LibSoundmanager &) = delete; + LibSoundmanager &operator=(const LibSoundmanager &) = delete; + int init(int port, const std::string& token); + + using handler_asyncSetSourceState = std::function; + + enum EventType_AsyncSetSourceState { + Event_AsyncSetSourceState_On = 1, + Event_AsyncSetSourceState_Off , + Event_AsyncSetSourceState_Pause + }; + + /* Method */ + int registerSource(const std::string& sourceName); + int connect(int sourceID, int sinkID); + int connect(int sourceID, const std::string& sinkName = "default"); + int disconnect(int connectionID); + int ackSetSourceState(int handle, int error); + + 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); + void set_event_handler(enum EventType_AsyncSetSourceState et, handler_asyncSetSourceState f); + void register_callback( + 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); + void register_callback( + void (*reply_cb)(struct json_object* reply_contents), + void (*hangup_cb)(void) = nullptr); + +private: + int run_eventloop(); + int init_event(); + int initialize_websocket(); + int dispatch_asyncSetSourceState(int sourceID, int handle, const std::string& sourceState); + + 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; + int mport; + std::string mtoken; + std::vector msourceIDs; + std::map> 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 /* LIBSOUNDMANAGER_H */ diff --git a/libsoundmanager/CMakeLists.txt b/libsoundmanager/CMakeLists.txt new file mode 100644 index 0000000..4c25a6c --- /dev/null +++ b/libsoundmanager/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 2.8) + +set(TARGET_LIBSM soundmanager) +add_definitions("-std=c++11") + +pkg_check_modules(libsm_depends json-c libafbwsc libsystemd) +set(libsm_sources libsoundmanager.cpp) + +include_directories(${LIBSM_INCLUDE_DIR}) +link_libraries(-Wl,--as-needed -Wl,--gc-sections -Wl,--no-undefined) + +add_library(${TARGET_LIBSM} SHARED ${libsm_sources}) +target_compile_options(${TARGET_LIBSM} PUBLIC ${libsm_depends_CFLAGS}) + +if(DEFINED DEBUGMODE) + target_compile_options(${TARGET_LIBSM} PRIVATE -g -O0) +else(DEFINED DEBUGMODE) + target_compile_options(${TARGET_LIBSM} PRIVATE -g -O2) +endif(DEFINED DEBUGMODE) + +include_directories(${TARGET_LIBSM} ${libsm_depends_INCLUDE_DIRS}) +target_link_libraries(${TARGET_LIBSM} afbwsc -lpthread ${link_libraries} ${libsm_depends_LIBRARIES}) + +if(DEFINED CMAKE_INSTALL_LIBDIR) + INSTALL(TARGETS ${TARGET_LIBSM} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) +endif(DEFINED CMAKE_INSTALL_LIBDIR) + +##################### +#add_subdirectory(test) + diff --git a/libsoundmanager/libsoundmanager.cpp b/libsoundmanager/libsoundmanager.cpp new file mode 100644 index 0000000..c61f9d2 --- /dev/null +++ b/libsoundmanager/libsoundmanager.cpp @@ -0,0 +1,676 @@ +/* + * 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 +#include +#include +#include +#include +#include +#include + +#define ELOG(args,...) _ELOG(__FUNCTION__,__LINE__,args,##__VA_ARGS__) +#ifdef DEBUGMODE + #define DLOG(args,...) _DLOG(__FUNCTION__,__LINE__,args,##__VA_ARGS__) +#else + #define DLOG(args,...) +#endif +static void _DLOG(const char* func, const int line, const char* log, ...); +static void _ELOG(const char* func, const int line, const char* log, ...); + +using namespace std; + +static bool has_verb(const std::string& verb); +static const char API[] = "soundmanager"; + +static const std::vector api_list{ + std::string("connect"), + std::string("disconnect"), + std::string("setVolume"), + std::string("volumeStep"), + std::string("setSinkMuteState"), + std::string("getListMainConnections"), + std::string("ackConnect"), + std::string("ackDisconnect"), + std::string("ackSetSourceState"), + std::string("registerSource"), + std::string("deregisterSource"), + std::string("subscribe"), + std::string("unsubscribe") +}; + +static const std::vector event_list{ + std::string("newMainConnection"), + std::string("volumeChanged"), + std::string("removedMainConnection"), + std::string("sinkMuteStateChanged"), + std::string("mainConnectionStateChanged"), + std::string("setRoutingReady"), + std::string("setRoutingRundown"), + std::string("asyncConnect"), + std::string("asyncSetSourceState") +}; + +static void _on_hangup_static(void *closure, struct afb_wsj1 *wsj) +{ + static_cast(closure)->on_hangup(NULL,wsj); +} + +static void _on_call_static(void *closure, const char *api, const char *verb, struct afb_wsj1_msg *msg) +{ + /* LibSoundmanager is not called from other process */ +} + +static void _on_event_static(void* closure, const char* event, struct afb_wsj1_msg *msg) +{ + static_cast(closure)->on_event(NULL,event,msg); +} + +static void _on_reply_static(void *closure, struct afb_wsj1_msg *msg) +{ + static_cast(closure)->on_reply(NULL,msg); +} + +static void *event_loop_run(void *args) +{ + struct sd_event* loop = (struct sd_event*)(args); + DLOG("start eventloop"); + for(;;) + sd_event_run(loop, 30000000); +} + +LibSoundmanager::LibSoundmanager() +{ +} + +LibSoundmanager::~LibSoundmanager() +{ + if(mploop) + { + sd_event_unref(mploop); + } + if(sp_websock != NULL) + { + afb_wsj1_unref(sp_websock); + } +} + + +/** + * This function is initialization function + * + * #### 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 + * + * #### Rreturn + * Returns 0 on success or -1 in case of error. + * + * #### Note + * + */ +int LibSoundmanager::init(int port, const string& token) +{ + int ret; + if(port > 0 && token.size() > 0) + { + mport = port; + mtoken = token; + } + else + { + ELOG("port and token should be > 0, Initial port and token uses."); + return -1; + } + + ret = initialize_websocket(); + if(ret != 0 ) + { + ELOG("Failed to initialize websocket"); + return -1; + } + ret = init_event(); + if(ret != 0 ) + { + ELOG("Failed to initialize websocket"); + return -1; + } + ret = run_eventloop(); + if(ret == -1){ + ELOG("Failed to create thread"); + return -1; + } + return 0; +} + +int LibSoundmanager::initialize_websocket() +{ + mploop = NULL; + onEvent = nullptr; + onReply = nullptr; + int ret = sd_event_default(&mploop); + if(ret < 0) + { + ELOG("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; + string muri = "ws://localhost:" + to_string(mport) + "/api?token=" + mtoken; + sp_websock = afb_ws_client_connect_wsj1(mploop, muri.c_str(), &minterface, this); + } + if(sp_websock == NULL) + { + ELOG("Failed to create websocket connection"); + goto END; + } + + return 0; +END: + if(mploop) + { + sd_event_unref(mploop); + } + return -1; +} + +int LibSoundmanager::init_event(){ + /* subscribe most important event for sound right */ + return subscribe(string("asyncSetSourceState")); +} + +/** + * This function register callback function for reply/event message from sound manager + * + * #### 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 + * + * #### Rreturn + * - Returns 0 on success or -1 in case of error. + * + * #### Note + * Event callback is invoked by sound manager for event you subscribed. + * If you would like to get event, please call subscribe function before/after this function + */ +void LibSoundmanager::register_callback( + void (*event_cb)(const 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; +} + +void LibSoundmanager::register_callback( + void (*reply_cb)(struct json_object* reply_contents), + void (*hangup_cb)(void)) +{ + onReply = reply_cb; + onHangup = hangup_cb; +} + +int LibSoundmanager::run_eventloop() +{ + if(mploop && sp_websock) + { + pthread_t thread_id; + int ret = pthread_create(&thread_id, NULL, event_loop_run, mploop); + if(ret != 0) + { + ELOG("Cannot run eventloop due to error:%d", errno); + return -1; + } + else + return 0; + } + else + { + ELOG("Connecting is not established yet"); + return -1; + } +} + +/** + * This function calls registerSource of Audio Manager via WebSocket + * registerSource is registration as source for policy management + * + * #### Parameters + * - sourceName [in] : This argument should be specified to the source name (e.g. "MediaPlayer") + * + * #### Rreturn + * - Returns 0 on success or -1 in case of error. + * + * #### Note + * This function must be called to get source ID + * mainConnectionID is returned by async reply function + * + */ +int LibSoundmanager::registerSource(const string& sourceName) +{ + if(!sp_websock) + { + return -1; + } + struct json_object* j_obj = json_object_new_object(); + struct json_object* jsn = json_object_new_string(sourceName.c_str()); + json_object_object_add(j_obj, "appname", jsn); + return this->call(__FUNCTION__, j_obj); +} + +/** + * This function calls connect of Audio Manager via WebSocket + * connect is to get sound right + * + * #### Parameters + * - sourceID [in] : This argument should be specified to the sourceID as int. This parameter is returned value of registerSource + * - sinkID [in] : This argument should be specified to the sinkID as int. ID is specified by AudioManager + * + * #### Rreturn + * - Returns 0 on success or -1 in case of error. + * + * #### Note + * This function must be called to get source right + * connectionID is + * + */ +int LibSoundmanager::connect(int sourceID, int sinkID) +{ + if(!sp_websock) + { + return -1; + } + struct json_object* j_obj = json_object_new_object(); + struct json_object* jsource = json_object_new_int(sourceID); + struct json_object* jsink = json_object_new_int(sinkID); + json_object_object_add(j_obj, "sourceID", jsource); + json_object_object_add(j_obj, "sinkID", jsink); + return this->call(__FUNCTION__, j_obj); +} + +/** + * This function calls the connect of Audio Manager via WebSocket + * + * #### Parameters + * - sourceID [in] : This argument should be specified to the sourceID as int. This parameter is returned value of registerSource + * - sinkName [in] : This argument should be specified to the sinkID as int. ID is aliased by SoundManager (e.g: "default") + * + * #### Rreturn + * - Returns 0 on success or -1 in case of error. + * + * #### Note + * For now, aliase(hardware abstraction) like "DriverZone:Speaker" is undier hard consideration + * Just "default" is usable. "default" parameter is set by soundmanager + * + */ +int LibSoundmanager::connect(int sourceID, const string& sinkName) +{ + if(!sp_websock) + { + return -1; + } + struct json_object* j_obj = json_object_new_object(); + struct json_object* jsource = json_object_new_int(sourceID); + //struct json_object* jsink = json_object_new_int(1); + struct json_object* jsink = json_object_new_string(sinkName.c_str()); + json_object_object_add(j_obj, "sourceID", jsource); + json_object_object_add(j_obj, "sinkID", jsink); + return this->call(__FUNCTION__, j_obj); +} + +/** + * This function calls the disconnect of Audio Manager via WebSocket + * + * #### Parameters + * - connectionID [in] : This parameter is returned value of connect + * + * #### Rreturn + * - Returns 0 on success or -1 in case of error. + * + * #### Note + * + * + */ +int LibSoundmanager::disconnect(int connectionID) +{ + if(!sp_websock) + { + return -1; + } + struct json_object* j_obj = json_object_new_object(); + struct json_object* jconnection = json_object_new_int(connectionID); + json_object_object_add(j_obj, "mainConnectionID", jconnection); + return this->call(__FUNCTION__, j_obj); +} + +/** + * This function calls the ackSetSourceState of Audio Manager via WebSocket + * + * #### Parameters + * - sourceID [in] : This parameter is returned value of ackSetSourceState + * - handle [in] : This parameter is returned value of ackSetSourceState + * - errno [in] : If you have some errors, input ohter than 0. 0 means acknowledge + * + * #### Rreturn + * - Returns 0 on success or -1 in case of error. + * + * #### Note + * This function must be called when application get asyncSetSourceState event + * Input handle number attached in asyncSetSourceState and error number(0 is acknowledge) + */ +int LibSoundmanager::ackSetSourceState(int handle, int error) +{ + if(!sp_websock) + { + return -1; + } + struct json_object* j_obj = json_object_new_object(); + struct json_object* jhandle = json_object_new_int(handle); + struct json_object* jerrno = json_object_new_int(error); + json_object_object_add(j_obj, "handle", jhandle); + json_object_object_add(j_obj, "error", jerrno); + return this->call(__FUNCTION__, j_obj); +} + +/** + * This function calls the API of Audio Manager via WebSocket + * + * #### Parameters + * - verb [in] : This argument should be specified to the API name (e.g. "connect") + * - arg [in] : This argument should be specified to the argument of API. And this argument expects JSON object + * + * #### Rreturn + * - Returns 0 on success or -1 in case of error. + * + * #### Note + * To call Audio Manager's APIs, the application should set its function name, arguments to JSON format. + * + */ +int LibSoundmanager::call(const string& verb, struct json_object* arg) +{ + int ret; + if(!sp_websock) + { + return -1; + } + if (!has_verb(verb)) + { + ELOG("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) { + ELOG("Failed to call verb:%s",verb.c_str()); + } + return ret; +} + +/** + * This function calls the API of Audio Manager via WebSocket + * This function is overload function of "call" + * + * #### Parameters + * - verb [in] : This argument should be specified to the API name (e.g. "connect") + * - arg [in] : This argument should be specified to the argument of API. And this argument expects JSON object + * + * #### Rreturn + * - Returns 0 on success or -1 in case of error. + * + * #### Note + * To call Audio Manager's APIs, the application should set its function name, arguments to JSON format. + * + */ +int LibSoundmanager::call(const char* verb, struct json_object* arg) +{ + int ret; + if(!sp_websock) + { + return -1; + } + if (!has_verb(string(verb))) + { + ELOG("verb doesn't exit"); + return -1; + } + ret = afb_wsj1_call_j(sp_websock, API, verb, arg, _on_reply_static, this); + if (ret < 0) { + ELOG("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 + * + * #### Rreturn + * - Returns 0 on success or -1 in case of error. + * + * #### Note + * This function enables to get an event to your callback function. + * Regarding the list of event name, please refer to CommandSender API and RountingSender API. + * + */ +int LibSoundmanager::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) { + ELOG("Failed to call verb:%s",__FUNCTION__); + } + return ret; +} + +/** + * Unregister callback function for each event + * + * #### Parameters + * - event_name [in] : This argument should be specified to the event name + * + * #### Rreturn + * - Returns 0 on success or -1 in case of error. + * + * #### Note + * This function disables to get an event to your callback function. + * + */ +int LibSoundmanager::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) { + ELOG("Failed to call verb:%s",__FUNCTION__); + } + return ret; +} + +/** + * This function calls the ackSetSourceState of Audio Manager via WebSocket + * + * #### Parameters + * - EventType_AsyncSetSourceState [in] : This parameter is EventType of soundmanager + * - handler_func [in] : This parameter is callback function + * + * #### Rreturn + * - Returns 0 on success or -1 in case of error. + * + * #### Note + * This function must be called when application get asyncSetSourceState event + * Input handle number attached in asyncSetSourceState and error number(0 is acknowledge) + */ +void LibSoundmanager::set_event_handler(enum EventType_AsyncSetSourceState et, handler_asyncSetSourceState f) +{ + if (et >= 1 && et <= 3) { + this->handlers[et] = std::move(f); + } +} + + +/************* Callback Function *************/ + +void LibSoundmanager::on_hangup(void *closure, struct afb_wsj1 *wsj) +{ + DLOG("%s called", __FUNCTION__); + if(onHangup != nullptr) + { + onHangup(); + } +} + +void LibSoundmanager::on_call(void *closure, const char *api, const char *verb, struct afb_wsj1_msg *msg) +{ +} + +/* +* event is like "soundmanager/newMainConnection" +* msg is like {"event":"soundmanager\/newMainConnection","data":{"mainConnectionID":3,"sourceID":101,"sinkID":100,"delay":0,"connectionState":4},"jtype":"afb-event"})} +* ^key^ ^^^^^^^^^^^^ value ^^^^^^^^^^^^ +* so you can get + event name : struct json_object obj = json_object_object_get(msg,"event") +*/ +void LibSoundmanager::on_event(void *closure, const char *event, struct afb_wsj1_msg *msg) +{ + /* check event is for us */ + string ev = string(event); + if (ev.find(API) == string::npos) { + /* It's not us */ + return; + } + struct json_object* ev_contents = afb_wsj1_msg_object_j(msg); + if((onEvent != nullptr)) + { + onEvent(ev, ev_contents); + } + + if(ev.find("asyncSetSourceState") != string::npos){ + // check sourceID is indicated to me + struct json_object *json_data, *jSourceID, *jsourceState, *jhandle; + json_object_object_get_ex(ev_contents, "data", &json_data); + json_object_object_get_ex(json_data, "sourceID", &jSourceID); + int sourceID = json_object_get_int(jSourceID); + /* This is not supported yet because application may have some sourceID. + Application has to check sourceID + if(find( msourceIDs.begin(),msourceIDs.end(), sourceID) != msourceIDs.end()){ + json_object_put(ev_contents); + return; + }*/ + json_object_object_get_ex(json_data, "sourceState", &jsourceState); + json_object_object_get_ex(json_data, "handle", &jhandle); + string sourceState = string(json_object_get_string(jsourceState)); + int handle = json_object_get_int(jhandle); + dispatch_asyncSetSourceState(sourceID, handle, sourceState); + json_object_put(json_data); + json_object_put(jSourceID); + json_object_put(jsourceState); + json_object_put(jhandle); + } + json_object_put(ev_contents); +} + +void LibSoundmanager::on_reply(void *closure, struct afb_wsj1_msg *msg) +{ + struct json_object* reply = afb_wsj1_msg_object_j(msg); + /*struct json_object *json_data = json_object_object_get(reply, "response"); + struct json_object *jverb = json_object_object_get(json_data, "verb"); + const char* cverb = json_object_get_string(jverb); + DLOG("cverb is %s",cverb); + string verb = string(cverb); + DLOG("verb is %s",verb.c_str()); + + if(verb == "registerSource"){ + struct json_object *jsourceID = json_object_object_get(json_data, "sourceID"); + int sourceID = json_object_get_int(jsourceID); + msourceIDs.push_back(sourceID); + DLOG("my sourceID is created: %d", sourceID); + }*/ + if(onReply != nullptr) + { + onReply(reply); + } + json_object_put(reply); +} + +int LibSoundmanager::dispatch_asyncSetSourceState(int sourceID, int handle, const string& sourceState){ + //dipatch event + EventType_AsyncSetSourceState x; + if(sourceState == "on"){ + x = Event_AsyncSetSourceState_On; + }else if(sourceState == "off"){ + x = Event_AsyncSetSourceState_Off; + }else if(sourceState == "pause"){ + x = Event_AsyncSetSourceState_Pause; + } + auto i = this->handlers.find(x); + if(i != handlers.end()){ + i->second(sourceID, handle); + return 0; + } + else{ + return -1; + } +} + +/* Internal Function in libsoundmanager */ + +static void _ELOG(const char* func, const int line, const char* log, ...) +{ + char *message; + va_list args; + va_start(args, log); + if (log == NULL || vasprintf(&message, log, args) < 0) + message = NULL; + cout << "[ERROR: soundmanager]" << func << "(" << line << "):" << message << endl; + va_end(args); + free(message); +} + +static void _DLOG(const char* func, const int line, const char* log, ...) +{ + char *message; + va_list args; + va_start(args, log); + if (log == NULL || vasprintf(&message, log, args) < 0) + message = NULL; + cout << "[DEBUG: soundmanager]" << func << "(" << line << "):" << message << endl; + va_end(args); + free(message); +} + +static bool has_verb(const string& verb) +{ + if(find(api_list.begin(), api_list.end(), verb) != api_list.end()) + return true; + else + return false; +} diff --git a/package/root/config.xml b/package/root/config.xml new file mode 100644 index 0000000..2d36a29 --- /dev/null +++ b/package/root/config.xml @@ -0,0 +1,20 @@ + + + soundmanager-service-2017 + + + Sound Manager Binding service rooting to Audio Manager + TOYOTA + APL 2.0 + + + + + + + + + + + + diff --git a/package/root/icon.svg b/package/root/icon.svg new file mode 100644 index 0000000..6628784 --- /dev/null +++ b/package/root/icon.svg @@ -0,0 +1,283 @@ + + + +image/svg+xmlSETTINGS + \ No newline at end of file diff --git a/scripts/call-sm-binding-method_test.sh b/scripts/call-sm-binding-method_test.sh new file mode 100755 index 0000000..e3f1139 --- /dev/null +++ b/scripts/call-sm-binding-method_test.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +echo "please call method after launch afb-client-demo" +echo " # ./sm-binding-test.sh" +echo "To get soundmanager api " +echo "example) monitor get {\"apis\":[\"monitor\"]}" +echo "example) soundmanager disconnect {\"mainConnectionID\":1}" +port=12345 +token=123456 +if test $1;then +port=$1 +fi +if test $2; then +token=$2 +fi +afb-client-demo ws://localhost:${port}/api?token=${token} + diff --git a/scripts/dbus-call-connect-test.sh b/scripts/dbus-call-connect-test.sh new file mode 100755 index 0000000..882afae --- /dev/null +++ b/scripts/dbus-call-connect-test.sh @@ -0,0 +1,12 @@ +#!/bin/sh +echo How to call connect and disconnect of AudioManager +echo Connect +echo dbus-send --system --dest=org.genivi.audiomanager --type=method_call \ + --print-reply /org/genivi/audiomanager/commandinterface \ + org.genivi.audiomanager.commandinterface.Connect uint16:xxx uint16:xxx +echo +echo Disconnect +echo dbus-send --system --dest=org.genivi.audiomanager --type=method_call \ + --print-reply /org/genivi/audiomanager/commandinterface \ + org.genivi.audiomanager.commandinterface.Disconnect uint16:xxx + diff --git a/scripts/dbus-call-test.sh b/scripts/dbus-call-test.sh new file mode 100755 index 0000000..f20af35 --- /dev/null +++ b/scripts/dbus-call-test.sh @@ -0,0 +1,17 @@ +#!/bin/sh +echo "This is the dbus call test to check main source/sink/connection" + +echo Get List Main Sources +dbus-send --system --dest=org.genivi.audiomanager --type=method_call \ + --print-reply /org/genivi/audiomanager/commandinterface \ + org.genivi.audiomanager.commandinterface.GetListMainSources + +echo Get List Main Sinks +dbus-send --system --dest=org.genivi.audiomanager --type=method_call \ + --print-reply /org/genivi/audiomanager/commandinterface \ + org.genivi.audiomanager.commandinterface.GetListMainSinks + +echo Get List Main Connections +dbus-send --system --dest=org.genivi.audiomanager --type=method_call \ + --print-reply /org/genivi/audiomanager/commandinterface \ + org.genivi.audiomanager.commandinterface.GetListMainConnections \ No newline at end of file diff --git a/scripts/sm-binding-test-gdb.sh b/scripts/sm-binding-test-gdb.sh new file mode 100755 index 0000000..68fabc7 --- /dev/null +++ b/scripts/sm-binding-test-gdb.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +echo "launch soundmanager binder test" +cmd=/usr/bin/afb-daemon +libsm="soundmanager-service.so" +port="12345" +token="123456" +if test $1; then + port=$1 +fi +if test $2; then + token=$2 +fi +libpath="/home/root" +arg="--verbose --verbose --verbose --port=${port} --token=${token} --binding=${libpath}/${libsm}" +echo "gdb $cmd $arg" +gdb $cmd +echo $! $? +if(test $! -gt 0); then + echo "success to launch" +fi diff --git a/scripts/sm-binding-test.sh b/scripts/sm-binding-test.sh new file mode 100755 index 0000000..0ffd759 --- /dev/null +++ b/scripts/sm-binding-test.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +echo "launch soundmanager binder test" +cmd=/usr/bin/afb-daemon +libsm="soundmanager-service.so" +port="12345" +token="123456" +if test $1; then + port=$1 +fi +if test $2; then + token=$2 +fi +libpath="/home/root" +arg="--verbose --verbose --verbose --port=${port} --token=${token} --binding=${libpath}/${libsm}" +echo "$cmd $arg" +$cmd $arg & +echo $! $? +if(test $! -gt 0); then + echo "success to launch" +fi diff --git a/soundmanager.pc.in b/soundmanager.pc.in new file mode 100644 index 0000000..a02286c --- /dev/null +++ b/soundmanager.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 audiomanager +Cflags: -I${includedir} +Libs: -L${libdir} -lsoundmanager \ No newline at end of file diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 0000000..c29aa89 --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,65 @@ +# +# 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_SMBINDER soundmanager-service) + +INCLUDE(FindThreads) +FIND_PACKAGE(Threads) + +pkg_check_modules(sm_binding_depends afb-daemon glib-2.0 gio-2.0 gio-unix-2.0 json-c) +set(binding_sm_sources + soundmanager.c + sm-helper.c + dbus/audio_manager_interface.c) + +include_directories(dbus) +link_libraries(-Wl,--as-needed -Wl,--gc-sections -Wl,--no-undefined) + +add_library(${TARGETS_SMBINDER} MODULE ${binding_sm_sources}) + +target_compile_options(${TARGETS_SMBINDER} PRIVATE ${sm_binding_depends_CFLAGS}) +if(DEFINED DEBUGMODE) + target_compile_options(${TARGETS_SMBINDER} PRIVATE -g -O0) +else(DEFINED DEBUGMODE) + target_compile_options(${TARGETS_SMBINDER} PRIVATE -g -O2) +endif(DEFINED DEBUGMODE) + +target_include_directories(${TARGETS_SMBINDER} PRIVATE ${sm_binding_depends_INCLUDE_DIRS}) +target_link_libraries(${TARGETS_SMBINDER} ${CMAKE_THREAD_LIBS_INIT} ${link_libraries} ${sm_binding_depends_LIBRARIES}) + +# Binder exposes a unique public entry point + +set_target_properties(${TARGETS_SMBINDER} PROPERTIES + PREFIX "" + LINK_FLAGS "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/export.map" + ) + +if(NOT EXISTS ${PROJECT_BINARY_DIR}/package) + add_custom_command(TARGET ${TARGETS_SMBINDER} POST_BUILD + COMMAND cp -rf ${PROJECT_SOURCE_DIR}/package ${PROJECT_BINARY_DIR} + ) +endif() + +add_custom_command(TARGET ${TARGETS_SMBINDER} POST_BUILD + COMMAND mkdir -p ${PROJECT_BINARY_DIR}/package/root/lib + COMMAND cp -rf ${PROJECT_BINARY_DIR}/src/${TARGETS_SMBINDER}.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_SMBINDER}-2017.wgt ${PROJECT_BINARY_DIR}/package/root +) diff --git a/src/dbus/audio_manager_interface.c b/src/dbus/audio_manager_interface.c new file mode 100644 index 0000000..c276d70 --- /dev/null +++ b/src/dbus/audio_manager_interface.c @@ -0,0 +1,9554 @@ +/* + * Generated by gdbus-codegen 2.40.2. DO NOT EDIT. + * + * The license of this code is the same as for the source it was derived from. + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include "audio_manager_interface.h" + +#include +#ifdef G_OS_UNIX +# include +#endif + +typedef struct +{ + GDBusArgInfo parent_struct; + gboolean use_gvariant; +} _ExtendedGDBusArgInfo; + +typedef struct +{ + GDBusMethodInfo parent_struct; + const gchar *signal_name; + gboolean pass_fdlist; +} _ExtendedGDBusMethodInfo; + +typedef struct +{ + GDBusSignalInfo parent_struct; + const gchar *signal_name; +} _ExtendedGDBusSignalInfo; + +typedef struct +{ + GDBusPropertyInfo parent_struct; + const gchar *hyphen_name; + gboolean use_gvariant; +} _ExtendedGDBusPropertyInfo; + +typedef struct +{ + GDBusInterfaceInfo parent_struct; + const gchar *hyphen_name; +} _ExtendedGDBusInterfaceInfo; + +typedef struct +{ + const _ExtendedGDBusPropertyInfo *info; + guint prop_id; + GValue orig_value; /* the value before the change */ +} ChangedProperty; + +static void +_changed_property_free (ChangedProperty *data) +{ + g_value_unset (&data->orig_value); + g_free (data); +} + +static gboolean +_g_strv_equal0 (gchar **a, gchar **b) +{ + gboolean ret = FALSE; + guint n; + if (a == NULL && b == NULL) + { + ret = TRUE; + goto out; + } + if (a == NULL || b == NULL) + goto out; + if (g_strv_length (a) != g_strv_length (b)) + goto out; + for (n = 0; a[n] != NULL; n++) + if (g_strcmp0 (a[n], b[n]) != 0) + goto out; + ret = TRUE; +out: + return ret; +} + +static gboolean +_g_variant_equal0 (GVariant *a, GVariant *b) +{ + gboolean ret = FALSE; + if (a == NULL && b == NULL) + { + ret = TRUE; + goto out; + } + if (a == NULL || b == NULL) + goto out; + ret = g_variant_equal (a, b); +out: + return ret; +} + +G_GNUC_UNUSED static gboolean +_g_value_equal (const GValue *a, const GValue *b) +{ + gboolean ret = FALSE; + g_assert (G_VALUE_TYPE (a) == G_VALUE_TYPE (b)); + switch (G_VALUE_TYPE (a)) + { + case G_TYPE_BOOLEAN: + ret = (g_value_get_boolean (a) == g_value_get_boolean (b)); + break; + case G_TYPE_UCHAR: + ret = (g_value_get_uchar (a) == g_value_get_uchar (b)); + break; + case G_TYPE_INT: + ret = (g_value_get_int (a) == g_value_get_int (b)); + break; + case G_TYPE_UINT: + ret = (g_value_get_uint (a) == g_value_get_uint (b)); + break; + case G_TYPE_INT64: + ret = (g_value_get_int64 (a) == g_value_get_int64 (b)); + break; + case G_TYPE_UINT64: + ret = (g_value_get_uint64 (a) == g_value_get_uint64 (b)); + break; + case G_TYPE_DOUBLE: + { + /* Avoid -Wfloat-equal warnings by doing a direct bit compare */ + gdouble da = g_value_get_double (a); + gdouble db = g_value_get_double (b); + ret = memcmp (&da, &db, sizeof (gdouble)) == 0; + } + break; + case G_TYPE_STRING: + ret = (g_strcmp0 (g_value_get_string (a), g_value_get_string (b)) == 0); + break; + case G_TYPE_VARIANT: + ret = _g_variant_equal0 (g_value_get_variant (a), g_value_get_variant (b)); + break; + default: + if (G_VALUE_TYPE (a) == G_TYPE_STRV) + ret = _g_strv_equal0 (g_value_get_boxed (a), g_value_get_boxed (b)); + else + g_critical ("_g_value_equal() does not handle type %s", g_type_name (G_VALUE_TYPE (a))); + break; + } + return ret; +} + +/* ------------------------------------------------------------------------ + * Code for interface org.genivi.audiomanager.commandinterface + * ------------------------------------------------------------------------ + */ + +/** + * SECTION:AudiomanagerCommandinterface + * @title: AudiomanagerCommandinterface + * @short_description: Generated C code for the org.genivi.audiomanager.commandinterface D-Bus interface + * + * This section contains code for working with the org.genivi.audiomanager.commandinterface D-Bus interface in C. + */ + +/* ---- Introspection data for org.genivi.audiomanager.commandinterface ---- */ + +static const _ExtendedGDBusArgInfo _audiomanager_commandinterface_method_info_connect_IN_ARG_sourceID = +{ + { + -1, + (gchar *) "sourceID", + (gchar *) "q", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_commandinterface_method_info_connect_IN_ARG_sinkID = +{ + { + -1, + (gchar *) "sinkID", + (gchar *) "q", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _audiomanager_commandinterface_method_info_connect_IN_ARG_pointers[] = +{ + &_audiomanager_commandinterface_method_info_connect_IN_ARG_sourceID, + &_audiomanager_commandinterface_method_info_connect_IN_ARG_sinkID, + NULL +}; + +static const _ExtendedGDBusArgInfo _audiomanager_commandinterface_method_info_connect_OUT_ARG_result = +{ + { + -1, + (gchar *) "result", + (gchar *) "n", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_commandinterface_method_info_connect_OUT_ARG_mainConnectionID = +{ + { + -1, + (gchar *) "mainConnectionID", + (gchar *) "q", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _audiomanager_commandinterface_method_info_connect_OUT_ARG_pointers[] = +{ + &_audiomanager_commandinterface_method_info_connect_OUT_ARG_result, + &_audiomanager_commandinterface_method_info_connect_OUT_ARG_mainConnectionID, + NULL +}; + +static const _ExtendedGDBusMethodInfo _audiomanager_commandinterface_method_info_connect = +{ + { + -1, + (gchar *) "Connect", + (GDBusArgInfo **) &_audiomanager_commandinterface_method_info_connect_IN_ARG_pointers, + (GDBusArgInfo **) &_audiomanager_commandinterface_method_info_connect_OUT_ARG_pointers, + NULL + }, + "handle-connect", + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_commandinterface_method_info_disconnect_IN_ARG_mainConnectionID = +{ + { + -1, + (gchar *) "mainConnectionID", + (gchar *) "q", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _audiomanager_commandinterface_method_info_disconnect_IN_ARG_pointers[] = +{ + &_audiomanager_commandinterface_method_info_disconnect_IN_ARG_mainConnectionID, + NULL +}; + +static const _ExtendedGDBusArgInfo _audiomanager_commandinterface_method_info_disconnect_OUT_ARG_result = +{ + { + -1, + (gchar *) "result", + (gchar *) "n", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _audiomanager_commandinterface_method_info_disconnect_OUT_ARG_pointers[] = +{ + &_audiomanager_commandinterface_method_info_disconnect_OUT_ARG_result, + NULL +}; + +static const _ExtendedGDBusMethodInfo _audiomanager_commandinterface_method_info_disconnect = +{ + { + -1, + (gchar *) "Disconnect", + (GDBusArgInfo **) &_audiomanager_commandinterface_method_info_disconnect_IN_ARG_pointers, + (GDBusArgInfo **) &_audiomanager_commandinterface_method_info_disconnect_OUT_ARG_pointers, + NULL + }, + "handle-disconnect", + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_commandinterface_method_info_set_volume_IN_ARG_sinkID = +{ + { + -1, + (gchar *) "sinkID", + (gchar *) "q", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_commandinterface_method_info_set_volume_IN_ARG_volume = +{ + { + -1, + (gchar *) "volume", + (gchar *) "n", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _audiomanager_commandinterface_method_info_set_volume_IN_ARG_pointers[] = +{ + &_audiomanager_commandinterface_method_info_set_volume_IN_ARG_sinkID, + &_audiomanager_commandinterface_method_info_set_volume_IN_ARG_volume, + NULL +}; + +static const _ExtendedGDBusArgInfo _audiomanager_commandinterface_method_info_set_volume_OUT_ARG_result = +{ + { + -1, + (gchar *) "result", + (gchar *) "n", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _audiomanager_commandinterface_method_info_set_volume_OUT_ARG_pointers[] = +{ + &_audiomanager_commandinterface_method_info_set_volume_OUT_ARG_result, + NULL +}; + +static const _ExtendedGDBusMethodInfo _audiomanager_commandinterface_method_info_set_volume = +{ + { + -1, + (gchar *) "SetVolume", + (GDBusArgInfo **) &_audiomanager_commandinterface_method_info_set_volume_IN_ARG_pointers, + (GDBusArgInfo **) &_audiomanager_commandinterface_method_info_set_volume_OUT_ARG_pointers, + NULL + }, + "handle-set-volume", + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_commandinterface_method_info_volume_step_IN_ARG_sinkID = +{ + { + -1, + (gchar *) "sinkID", + (gchar *) "q", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_commandinterface_method_info_volume_step_IN_ARG_volumeStep = +{ + { + -1, + (gchar *) "volumeStep", + (gchar *) "n", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _audiomanager_commandinterface_method_info_volume_step_IN_ARG_pointers[] = +{ + &_audiomanager_commandinterface_method_info_volume_step_IN_ARG_sinkID, + &_audiomanager_commandinterface_method_info_volume_step_IN_ARG_volumeStep, + NULL +}; + +static const _ExtendedGDBusArgInfo _audiomanager_commandinterface_method_info_volume_step_OUT_ARG_result = +{ + { + -1, + (gchar *) "result", + (gchar *) "n", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _audiomanager_commandinterface_method_info_volume_step_OUT_ARG_pointers[] = +{ + &_audiomanager_commandinterface_method_info_volume_step_OUT_ARG_result, + NULL +}; + +static const _ExtendedGDBusMethodInfo _audiomanager_commandinterface_method_info_volume_step = +{ + { + -1, + (gchar *) "VolumeStep", + (GDBusArgInfo **) &_audiomanager_commandinterface_method_info_volume_step_IN_ARG_pointers, + (GDBusArgInfo **) &_audiomanager_commandinterface_method_info_volume_step_OUT_ARG_pointers, + NULL + }, + "handle-volume-step", + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_commandinterface_method_info_set_sink_mute_state_IN_ARG_sinkID = +{ + { + -1, + (gchar *) "sinkID", + (gchar *) "q", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_commandinterface_method_info_set_sink_mute_state_IN_ARG_muteState = +{ + { + -1, + (gchar *) "muteState", + (gchar *) "n", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _audiomanager_commandinterface_method_info_set_sink_mute_state_IN_ARG_pointers[] = +{ + &_audiomanager_commandinterface_method_info_set_sink_mute_state_IN_ARG_sinkID, + &_audiomanager_commandinterface_method_info_set_sink_mute_state_IN_ARG_muteState, + NULL +}; + +static const _ExtendedGDBusArgInfo _audiomanager_commandinterface_method_info_set_sink_mute_state_OUT_ARG_result = +{ + { + -1, + (gchar *) "result", + (gchar *) "n", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _audiomanager_commandinterface_method_info_set_sink_mute_state_OUT_ARG_pointers[] = +{ + &_audiomanager_commandinterface_method_info_set_sink_mute_state_OUT_ARG_result, + NULL +}; + +static const _ExtendedGDBusMethodInfo _audiomanager_commandinterface_method_info_set_sink_mute_state = +{ + { + -1, + (gchar *) "SetSinkMuteState", + (GDBusArgInfo **) &_audiomanager_commandinterface_method_info_set_sink_mute_state_IN_ARG_pointers, + (GDBusArgInfo **) &_audiomanager_commandinterface_method_info_set_sink_mute_state_OUT_ARG_pointers, + NULL + }, + "handle-set-sink-mute-state", + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_commandinterface_method_info_get_list_main_connections_OUT_ARG_result = +{ + { + -1, + (gchar *) "result", + (gchar *) "n", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_commandinterface_method_info_get_list_main_connections_OUT_ARG_listConnections = +{ + { + -1, + (gchar *) "listConnections", + (gchar *) "a(qqqnn)", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _audiomanager_commandinterface_method_info_get_list_main_connections_OUT_ARG_pointers[] = +{ + &_audiomanager_commandinterface_method_info_get_list_main_connections_OUT_ARG_result, + &_audiomanager_commandinterface_method_info_get_list_main_connections_OUT_ARG_listConnections, + NULL +}; + +static const _ExtendedGDBusMethodInfo _audiomanager_commandinterface_method_info_get_list_main_connections = +{ + { + -1, + (gchar *) "GetListMainConnections", + NULL, + (GDBusArgInfo **) &_audiomanager_commandinterface_method_info_get_list_main_connections_OUT_ARG_pointers, + NULL + }, + "handle-get-list-main-connections", + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_commandinterface_method_info_get_list_main_sinks_OUT_ARG_result = +{ + { + -1, + (gchar *) "result", + (gchar *) "n", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_commandinterface_method_info_get_list_main_sinks_OUT_ARG_listMainSinks = +{ + { + -1, + (gchar *) "listMainSinks", + (gchar *) "a(qs(nn)nnq)", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _audiomanager_commandinterface_method_info_get_list_main_sinks_OUT_ARG_pointers[] = +{ + &_audiomanager_commandinterface_method_info_get_list_main_sinks_OUT_ARG_result, + &_audiomanager_commandinterface_method_info_get_list_main_sinks_OUT_ARG_listMainSinks, + NULL +}; + +static const _ExtendedGDBusMethodInfo _audiomanager_commandinterface_method_info_get_list_main_sinks = +{ + { + -1, + (gchar *) "GetListMainSinks", + NULL, + (GDBusArgInfo **) &_audiomanager_commandinterface_method_info_get_list_main_sinks_OUT_ARG_pointers, + NULL + }, + "handle-get-list-main-sinks", + FALSE +}; + +static const _ExtendedGDBusMethodInfo * const _audiomanager_commandinterface_method_info_pointers[] = +{ + &_audiomanager_commandinterface_method_info_connect, + &_audiomanager_commandinterface_method_info_disconnect, + &_audiomanager_commandinterface_method_info_set_volume, + &_audiomanager_commandinterface_method_info_volume_step, + &_audiomanager_commandinterface_method_info_set_sink_mute_state, + &_audiomanager_commandinterface_method_info_get_list_main_connections, + &_audiomanager_commandinterface_method_info_get_list_main_sinks, + NULL +}; + +static const _ExtendedGDBusArgInfo _audiomanager_commandinterface_signal_info_new_main_connection_ARG_mainConnection = +{ + { + -1, + (gchar *) "mainConnection", + (gchar *) "(qqqnn)", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _audiomanager_commandinterface_signal_info_new_main_connection_ARG_pointers[] = +{ + &_audiomanager_commandinterface_signal_info_new_main_connection_ARG_mainConnection, + NULL +}; + +static const _ExtendedGDBusSignalInfo _audiomanager_commandinterface_signal_info_new_main_connection = +{ + { + -1, + (gchar *) "NewMainConnection", + (GDBusArgInfo **) &_audiomanager_commandinterface_signal_info_new_main_connection_ARG_pointers, + NULL + }, + "new-main-connection" +}; + +static const _ExtendedGDBusArgInfo _audiomanager_commandinterface_signal_info_removed_main_connection_ARG_mainConnectionId = +{ + { + -1, + (gchar *) "mainConnectionId", + (gchar *) "q", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _audiomanager_commandinterface_signal_info_removed_main_connection_ARG_pointers[] = +{ + &_audiomanager_commandinterface_signal_info_removed_main_connection_ARG_mainConnectionId, + NULL +}; + +static const _ExtendedGDBusSignalInfo _audiomanager_commandinterface_signal_info_removed_main_connection = +{ + { + -1, + (gchar *) "RemovedMainConnection", + (GDBusArgInfo **) &_audiomanager_commandinterface_signal_info_removed_main_connection_ARG_pointers, + NULL + }, + "removed-main-connection" +}; + +static const _ExtendedGDBusArgInfo _audiomanager_commandinterface_signal_info_main_connection_state_changed_ARG_connectionID = +{ + { + -1, + (gchar *) "connectionID", + (gchar *) "q", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_commandinterface_signal_info_main_connection_state_changed_ARG_connectionState = +{ + { + -1, + (gchar *) "connectionState", + (gchar *) "n", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _audiomanager_commandinterface_signal_info_main_connection_state_changed_ARG_pointers[] = +{ + &_audiomanager_commandinterface_signal_info_main_connection_state_changed_ARG_connectionID, + &_audiomanager_commandinterface_signal_info_main_connection_state_changed_ARG_connectionState, + NULL +}; + +static const _ExtendedGDBusSignalInfo _audiomanager_commandinterface_signal_info_main_connection_state_changed = +{ + { + -1, + (gchar *) "MainConnectionStateChanged", + (GDBusArgInfo **) &_audiomanager_commandinterface_signal_info_main_connection_state_changed_ARG_pointers, + NULL + }, + "main-connection-state-changed" +}; + +static const _ExtendedGDBusArgInfo _audiomanager_commandinterface_signal_info_volume_changed_ARG_sinkID = +{ + { + -1, + (gchar *) "sinkID", + (gchar *) "q", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_commandinterface_signal_info_volume_changed_ARG_volume = +{ + { + -1, + (gchar *) "volume", + (gchar *) "n", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _audiomanager_commandinterface_signal_info_volume_changed_ARG_pointers[] = +{ + &_audiomanager_commandinterface_signal_info_volume_changed_ARG_sinkID, + &_audiomanager_commandinterface_signal_info_volume_changed_ARG_volume, + NULL +}; + +static const _ExtendedGDBusSignalInfo _audiomanager_commandinterface_signal_info_volume_changed = +{ + { + -1, + (gchar *) "VolumeChanged", + (GDBusArgInfo **) &_audiomanager_commandinterface_signal_info_volume_changed_ARG_pointers, + NULL + }, + "volume-changed" +}; + +static const _ExtendedGDBusArgInfo _audiomanager_commandinterface_signal_info_sink_mute_state_changed_ARG_sinkID = +{ + { + -1, + (gchar *) "sinkID", + (gchar *) "q", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_commandinterface_signal_info_sink_mute_state_changed_ARG_muteState = +{ + { + -1, + (gchar *) "muteState", + (gchar *) "n", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _audiomanager_commandinterface_signal_info_sink_mute_state_changed_ARG_pointers[] = +{ + &_audiomanager_commandinterface_signal_info_sink_mute_state_changed_ARG_sinkID, + &_audiomanager_commandinterface_signal_info_sink_mute_state_changed_ARG_muteState, + NULL +}; + +static const _ExtendedGDBusSignalInfo _audiomanager_commandinterface_signal_info_sink_mute_state_changed = +{ + { + -1, + (gchar *) "SinkMuteStateChanged", + (GDBusArgInfo **) &_audiomanager_commandinterface_signal_info_sink_mute_state_changed_ARG_pointers, + NULL + }, + "sink-mute-state-changed" +}; + +static const _ExtendedGDBusArgInfo _audiomanager_commandinterface_signal_info_system_property_changed_ARG_SystemProperty = +{ + { + -1, + (gchar *) "SystemProperty", + (gchar *) "(nn)", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _audiomanager_commandinterface_signal_info_system_property_changed_ARG_pointers[] = +{ + &_audiomanager_commandinterface_signal_info_system_property_changed_ARG_SystemProperty, + NULL +}; + +static const _ExtendedGDBusSignalInfo _audiomanager_commandinterface_signal_info_system_property_changed = +{ + { + -1, + (gchar *) "SystemPropertyChanged", + (GDBusArgInfo **) &_audiomanager_commandinterface_signal_info_system_property_changed_ARG_pointers, + NULL + }, + "system-property-changed" +}; + +static const _ExtendedGDBusSignalInfo * const _audiomanager_commandinterface_signal_info_pointers[] = +{ + &_audiomanager_commandinterface_signal_info_new_main_connection, + &_audiomanager_commandinterface_signal_info_removed_main_connection, + &_audiomanager_commandinterface_signal_info_main_connection_state_changed, + &_audiomanager_commandinterface_signal_info_volume_changed, + &_audiomanager_commandinterface_signal_info_sink_mute_state_changed, + &_audiomanager_commandinterface_signal_info_system_property_changed, + NULL +}; + +static const _ExtendedGDBusInterfaceInfo _audiomanager_commandinterface_interface_info = +{ + { + -1, + (gchar *) "org.genivi.audiomanager.commandinterface", + (GDBusMethodInfo **) &_audiomanager_commandinterface_method_info_pointers, + (GDBusSignalInfo **) &_audiomanager_commandinterface_signal_info_pointers, + NULL, + NULL + }, + "audiomanager-commandinterface", +}; + + +/** + * audiomanager_commandinterface_interface_info: + * + * Gets a machine-readable description of the org.genivi.audiomanager.commandinterface D-Bus interface. + * + * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free. + */ +GDBusInterfaceInfo * +audiomanager_commandinterface_interface_info (void) +{ + return (GDBusInterfaceInfo *) &_audiomanager_commandinterface_interface_info.parent_struct; +} + +/** + * audiomanager_commandinterface_override_properties: + * @klass: The class structure for a #GObject-derived class. + * @property_id_begin: The property id to assign to the first overridden property. + * + * Overrides all #GObject properties in the #AudiomanagerCommandinterface interface for a concrete class. + * The properties are overridden in the order they are defined. + * + * Returns: The last property id. + */ +guint +audiomanager_commandinterface_override_properties (GObjectClass *klass, guint property_id_begin) +{ + return property_id_begin - 1; +} + + + +/** + * AudiomanagerCommandinterface: + * + * Abstract interface type for the D-Bus interface org.genivi.audiomanager.commandinterface. + */ + +/** + * AudiomanagerCommandinterfaceIface: + * @parent_iface: The parent interface. + * @handle_connect: Handler for the #AudiomanagerCommandinterface::handle-connect signal. + * @handle_disconnect: Handler for the #AudiomanagerCommandinterface::handle-disconnect signal. + * @handle_get_list_main_connections: Handler for the #AudiomanagerCommandinterface::handle-get-list-main-connections signal. + * @handle_get_list_main_sinks: Handler for the #AudiomanagerCommandinterface::handle-get-list-main-sinks signal. + * @handle_set_sink_mute_state: Handler for the #AudiomanagerCommandinterface::handle-set-sink-mute-state signal. + * @handle_set_volume: Handler for the #AudiomanagerCommandinterface::handle-set-volume signal. + * @handle_volume_step: Handler for the #AudiomanagerCommandinterface::handle-volume-step signal. + * @main_connection_state_changed: Handler for the #AudiomanagerCommandinterface::main-connection-state-changed signal. + * @new_main_connection: Handler for the #AudiomanagerCommandinterface::new-main-connection signal. + * @removed_main_connection: Handler for the #AudiomanagerCommandinterface::removed-main-connection signal. + * @sink_mute_state_changed: Handler for the #AudiomanagerCommandinterface::sink-mute-state-changed signal. + * @system_property_changed: Handler for the #AudiomanagerCommandinterface::system-property-changed signal. + * @volume_changed: Handler for the #AudiomanagerCommandinterface::volume-changed signal. + * + * Virtual table for the D-Bus interface org.genivi.audiomanager.commandinterface. + */ + +typedef AudiomanagerCommandinterfaceIface AudiomanagerCommandinterfaceInterface; +G_DEFINE_INTERFACE (AudiomanagerCommandinterface, audiomanager_commandinterface, G_TYPE_OBJECT); + +static void +audiomanager_commandinterface_default_init (AudiomanagerCommandinterfaceIface *iface) +{ + /* GObject signals for incoming D-Bus method calls: */ + /** + * AudiomanagerCommandinterface::handle-connect: + * @object: A #AudiomanagerCommandinterface. + * @invocation: A #GDBusMethodInvocation. + * @arg_sourceID: Argument passed by remote caller. + * @arg_sinkID: Argument passed by remote caller. + * + * Signal emitted when a remote caller is invoking the Connect() D-Bus method. + * + * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call audiomanager_commandinterface_complete_connect() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-connect", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AudiomanagerCommandinterfaceIface, handle_connect), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 3, + G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UINT, G_TYPE_UINT); + + /** + * AudiomanagerCommandinterface::handle-disconnect: + * @object: A #AudiomanagerCommandinterface. + * @invocation: A #GDBusMethodInvocation. + * @arg_mainConnectionID: Argument passed by remote caller. + * + * Signal emitted when a remote caller is invoking the Disconnect() D-Bus method. + * + * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call audiomanager_commandinterface_complete_disconnect() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-disconnect", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AudiomanagerCommandinterfaceIface, handle_disconnect), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 2, + G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UINT); + + /** + * AudiomanagerCommandinterface::handle-set-volume: + * @object: A #AudiomanagerCommandinterface. + * @invocation: A #GDBusMethodInvocation. + * @arg_sinkID: Argument passed by remote caller. + * @arg_volume: Argument passed by remote caller. + * + * Signal emitted when a remote caller is invoking the SetVolume() D-Bus method. + * + * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call audiomanager_commandinterface_complete_set_volume() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-set-volume", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AudiomanagerCommandinterfaceIface, handle_set_volume), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 3, + G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UINT, G_TYPE_INT); + + /** + * AudiomanagerCommandinterface::handle-volume-step: + * @object: A #AudiomanagerCommandinterface. + * @invocation: A #GDBusMethodInvocation. + * @arg_sinkID: Argument passed by remote caller. + * @arg_volumeStep: Argument passed by remote caller. + * + * Signal emitted when a remote caller is invoking the VolumeStep() D-Bus method. + * + * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call audiomanager_commandinterface_complete_volume_step() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-volume-step", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AudiomanagerCommandinterfaceIface, handle_volume_step), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 3, + G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UINT, G_TYPE_INT); + + /** + * AudiomanagerCommandinterface::handle-set-sink-mute-state: + * @object: A #AudiomanagerCommandinterface. + * @invocation: A #GDBusMethodInvocation. + * @arg_sinkID: Argument passed by remote caller. + * @arg_muteState: Argument passed by remote caller. + * + * Signal emitted when a remote caller is invoking the SetSinkMuteState() D-Bus method. + * + * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call audiomanager_commandinterface_complete_set_sink_mute_state() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-set-sink-mute-state", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AudiomanagerCommandinterfaceIface, handle_set_sink_mute_state), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 3, + G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UINT, G_TYPE_INT); + + /** + * AudiomanagerCommandinterface::handle-get-list-main-connections: + * @object: A #AudiomanagerCommandinterface. + * @invocation: A #GDBusMethodInvocation. + * + * Signal emitted when a remote caller is invoking the GetListMainConnections() D-Bus method. + * + * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call audiomanager_commandinterface_complete_get_list_main_connections() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-get-list-main-connections", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AudiomanagerCommandinterfaceIface, handle_get_list_main_connections), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 1, + G_TYPE_DBUS_METHOD_INVOCATION); + + /** + * AudiomanagerCommandinterface::handle-get-list-main-sinks: + * @object: A #AudiomanagerCommandinterface. + * @invocation: A #GDBusMethodInvocation. + * + * Signal emitted when a remote caller is invoking the GetListMainSinks() D-Bus method. + * + * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call audiomanager_commandinterface_complete_get_list_main_sinks() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-get-list-main-sinks", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AudiomanagerCommandinterfaceIface, handle_get_list_main_sinks), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 1, + G_TYPE_DBUS_METHOD_INVOCATION); + + /* GObject signals for received D-Bus signals: */ + /** + * AudiomanagerCommandinterface::new-main-connection: + * @object: A #AudiomanagerCommandinterface. + * @arg_mainConnection: Argument. + * + * On the client-side, this signal is emitted whenever the D-Bus signal "NewMainConnection" is received. + * + * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal. + */ + g_signal_new ("new-main-connection", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AudiomanagerCommandinterfaceIface, new_main_connection), + NULL, + NULL, + g_cclosure_marshal_generic, + G_TYPE_NONE, + 1, G_TYPE_VARIANT); + + /** + * AudiomanagerCommandinterface::removed-main-connection: + * @object: A #AudiomanagerCommandinterface. + * @arg_mainConnectionId: Argument. + * + * On the client-side, this signal is emitted whenever the D-Bus signal "RemovedMainConnection" is received. + * + * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal. + */ + g_signal_new ("removed-main-connection", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AudiomanagerCommandinterfaceIface, removed_main_connection), + NULL, + NULL, + g_cclosure_marshal_generic, + G_TYPE_NONE, + 1, G_TYPE_UINT); + + /** + * AudiomanagerCommandinterface::main-connection-state-changed: + * @object: A #AudiomanagerCommandinterface. + * @arg_connectionID: Argument. + * @arg_connectionState: Argument. + * + * On the client-side, this signal is emitted whenever the D-Bus signal "MainConnectionStateChanged" is received. + * + * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal. + */ + g_signal_new ("main-connection-state-changed", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AudiomanagerCommandinterfaceIface, main_connection_state_changed), + NULL, + NULL, + g_cclosure_marshal_generic, + G_TYPE_NONE, + 2, G_TYPE_UINT, G_TYPE_INT); + + /** + * AudiomanagerCommandinterface::volume-changed: + * @object: A #AudiomanagerCommandinterface. + * @arg_sinkID: Argument. + * @arg_volume: Argument. + * + * On the client-side, this signal is emitted whenever the D-Bus signal "VolumeChanged" is received. + * + * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal. + */ + g_signal_new ("volume-changed", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AudiomanagerCommandinterfaceIface, volume_changed), + NULL, + NULL, + g_cclosure_marshal_generic, + G_TYPE_NONE, + 2, G_TYPE_UINT, G_TYPE_INT); + + /** + * AudiomanagerCommandinterface::sink-mute-state-changed: + * @object: A #AudiomanagerCommandinterface. + * @arg_sinkID: Argument. + * @arg_muteState: Argument. + * + * On the client-side, this signal is emitted whenever the D-Bus signal "SinkMuteStateChanged" is received. + * + * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal. + */ + g_signal_new ("sink-mute-state-changed", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AudiomanagerCommandinterfaceIface, sink_mute_state_changed), + NULL, + NULL, + g_cclosure_marshal_generic, + G_TYPE_NONE, + 2, G_TYPE_UINT, G_TYPE_INT); + + /** + * AudiomanagerCommandinterface::system-property-changed: + * @object: A #AudiomanagerCommandinterface. + * @arg_SystemProperty: Argument. + * + * On the client-side, this signal is emitted whenever the D-Bus signal "SystemPropertyChanged" is received. + * + * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal. + */ + g_signal_new ("system-property-changed", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AudiomanagerCommandinterfaceIface, system_property_changed), + NULL, + NULL, + g_cclosure_marshal_generic, + G_TYPE_NONE, + 1, G_TYPE_VARIANT); + +} + +/** + * audiomanager_commandinterface_emit_new_main_connection: + * @object: A #AudiomanagerCommandinterface. + * @arg_mainConnection: Argument to pass with the signal. + * + * Emits the "NewMainConnection" D-Bus signal. + */ +void +audiomanager_commandinterface_emit_new_main_connection ( + AudiomanagerCommandinterface *object, + GVariant *arg_mainConnection) +{ + g_signal_emit_by_name (object, "new-main-connection", arg_mainConnection); +} + +/** + * audiomanager_commandinterface_emit_removed_main_connection: + * @object: A #AudiomanagerCommandinterface. + * @arg_mainConnectionId: Argument to pass with the signal. + * + * Emits the "RemovedMainConnection" D-Bus signal. + */ +void +audiomanager_commandinterface_emit_removed_main_connection ( + AudiomanagerCommandinterface *object, + guint16 arg_mainConnectionId) +{ + g_signal_emit_by_name (object, "removed-main-connection", arg_mainConnectionId); +} + +/** + * audiomanager_commandinterface_emit_main_connection_state_changed: + * @object: A #AudiomanagerCommandinterface. + * @arg_connectionID: Argument to pass with the signal. + * @arg_connectionState: Argument to pass with the signal. + * + * Emits the "MainConnectionStateChanged" D-Bus signal. + */ +void +audiomanager_commandinterface_emit_main_connection_state_changed ( + AudiomanagerCommandinterface *object, + guint16 arg_connectionID, + gint16 arg_connectionState) +{ + g_signal_emit_by_name (object, "main-connection-state-changed", arg_connectionID, arg_connectionState); +} + +/** + * audiomanager_commandinterface_emit_volume_changed: + * @object: A #AudiomanagerCommandinterface. + * @arg_sinkID: Argument to pass with the signal. + * @arg_volume: Argument to pass with the signal. + * + * Emits the "VolumeChanged" D-Bus signal. + */ +void +audiomanager_commandinterface_emit_volume_changed ( + AudiomanagerCommandinterface *object, + guint16 arg_sinkID, + gint16 arg_volume) +{ + g_signal_emit_by_name (object, "volume-changed", arg_sinkID, arg_volume); +} + +/** + * audiomanager_commandinterface_emit_sink_mute_state_changed: + * @object: A #AudiomanagerCommandinterface. + * @arg_sinkID: Argument to pass with the signal. + * @arg_muteState: Argument to pass with the signal. + * + * Emits the "SinkMuteStateChanged" D-Bus signal. + */ +void +audiomanager_commandinterface_emit_sink_mute_state_changed ( + AudiomanagerCommandinterface *object, + guint16 arg_sinkID, + gint16 arg_muteState) +{ + g_signal_emit_by_name (object, "sink-mute-state-changed", arg_sinkID, arg_muteState); +} + +/** + * audiomanager_commandinterface_emit_system_property_changed: + * @object: A #AudiomanagerCommandinterface. + * @arg_SystemProperty: Argument to pass with the signal. + * + * Emits the "SystemPropertyChanged" D-Bus signal. + */ +void +audiomanager_commandinterface_emit_system_property_changed ( + AudiomanagerCommandinterface *object, + GVariant *arg_SystemProperty) +{ + g_signal_emit_by_name (object, "system-property-changed", arg_SystemProperty); +} + +/** + * audiomanager_commandinterface_call_connect: + * @proxy: A #AudiomanagerCommandinterfaceProxy. + * @arg_sourceID: Argument to pass with the method invocation. + * @arg_sinkID: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the Connect() D-Bus method on @proxy. + * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. + * You can then call audiomanager_commandinterface_call_connect_finish() to get the result of the operation. + * + * See audiomanager_commandinterface_call_connect_sync() for the synchronous, blocking version of this method. + */ +void +audiomanager_commandinterface_call_connect ( + AudiomanagerCommandinterface *proxy, + guint16 arg_sourceID, + guint16 arg_sinkID, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "Connect", + g_variant_new ("(qq)", + arg_sourceID, + arg_sinkID), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * audiomanager_commandinterface_call_connect_finish: + * @proxy: A #AudiomanagerCommandinterfaceProxy. + * @out_result: (out): Return location for return parameter or %NULL to ignore. + * @out_mainConnectionID: (out): Return location for return parameter or %NULL to ignore. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to audiomanager_commandinterface_call_connect(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with audiomanager_commandinterface_call_connect(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +audiomanager_commandinterface_call_connect_finish ( + AudiomanagerCommandinterface *proxy, + gint16 *out_result, + guint16 *out_mainConnectionID, + GAsyncResult *res, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(nq)", + out_result, + out_mainConnectionID); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * audiomanager_commandinterface_call_connect_sync: + * @proxy: A #AudiomanagerCommandinterfaceProxy. + * @arg_sourceID: Argument to pass with the method invocation. + * @arg_sinkID: Argument to pass with the method invocation. + * @out_result: (out): Return location for return parameter or %NULL to ignore. + * @out_mainConnectionID: (out): Return location for return parameter or %NULL to ignore. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the Connect() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See audiomanager_commandinterface_call_connect() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +audiomanager_commandinterface_call_connect_sync ( + AudiomanagerCommandinterface *proxy, + guint16 arg_sourceID, + guint16 arg_sinkID, + gint16 *out_result, + guint16 *out_mainConnectionID, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "Connect", + g_variant_new ("(qq)", + arg_sourceID, + arg_sinkID), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(nq)", + out_result, + out_mainConnectionID); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * audiomanager_commandinterface_call_disconnect: + * @proxy: A #AudiomanagerCommandinterfaceProxy. + * @arg_mainConnectionID: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the Disconnect() D-Bus method on @proxy. + * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. + * You can then call audiomanager_commandinterface_call_disconnect_finish() to get the result of the operation. + * + * See audiomanager_commandinterface_call_disconnect_sync() for the synchronous, blocking version of this method. + */ +void +audiomanager_commandinterface_call_disconnect ( + AudiomanagerCommandinterface *proxy, + guint16 arg_mainConnectionID, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "Disconnect", + g_variant_new ("(q)", + arg_mainConnectionID), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * audiomanager_commandinterface_call_disconnect_finish: + * @proxy: A #AudiomanagerCommandinterfaceProxy. + * @out_result: (out): Return location for return parameter or %NULL to ignore. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to audiomanager_commandinterface_call_disconnect(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with audiomanager_commandinterface_call_disconnect(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +audiomanager_commandinterface_call_disconnect_finish ( + AudiomanagerCommandinterface *proxy, + gint16 *out_result, + GAsyncResult *res, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(n)", + out_result); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * audiomanager_commandinterface_call_disconnect_sync: + * @proxy: A #AudiomanagerCommandinterfaceProxy. + * @arg_mainConnectionID: Argument to pass with the method invocation. + * @out_result: (out): Return location for return parameter or %NULL to ignore. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the Disconnect() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See audiomanager_commandinterface_call_disconnect() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +audiomanager_commandinterface_call_disconnect_sync ( + AudiomanagerCommandinterface *proxy, + guint16 arg_mainConnectionID, + gint16 *out_result, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "Disconnect", + g_variant_new ("(q)", + arg_mainConnectionID), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(n)", + out_result); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * audiomanager_commandinterface_call_set_volume: + * @proxy: A #AudiomanagerCommandinterfaceProxy. + * @arg_sinkID: Argument to pass with the method invocation. + * @arg_volume: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the SetVolume() D-Bus method on @proxy. + * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. + * You can then call audiomanager_commandinterface_call_set_volume_finish() to get the result of the operation. + * + * See audiomanager_commandinterface_call_set_volume_sync() for the synchronous, blocking version of this method. + */ +void +audiomanager_commandinterface_call_set_volume ( + AudiomanagerCommandinterface *proxy, + guint16 arg_sinkID, + gint16 arg_volume, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "SetVolume", + g_variant_new ("(qn)", + arg_sinkID, + arg_volume), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * audiomanager_commandinterface_call_set_volume_finish: + * @proxy: A #AudiomanagerCommandinterfaceProxy. + * @out_result: (out): Return location for return parameter or %NULL to ignore. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to audiomanager_commandinterface_call_set_volume(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with audiomanager_commandinterface_call_set_volume(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +audiomanager_commandinterface_call_set_volume_finish ( + AudiomanagerCommandinterface *proxy, + gint16 *out_result, + GAsyncResult *res, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(n)", + out_result); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * audiomanager_commandinterface_call_set_volume_sync: + * @proxy: A #AudiomanagerCommandinterfaceProxy. + * @arg_sinkID: Argument to pass with the method invocation. + * @arg_volume: Argument to pass with the method invocation. + * @out_result: (out): Return location for return parameter or %NULL to ignore. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the SetVolume() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See audiomanager_commandinterface_call_set_volume() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +audiomanager_commandinterface_call_set_volume_sync ( + AudiomanagerCommandinterface *proxy, + guint16 arg_sinkID, + gint16 arg_volume, + gint16 *out_result, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "SetVolume", + g_variant_new ("(qn)", + arg_sinkID, + arg_volume), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(n)", + out_result); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * audiomanager_commandinterface_call_volume_step: + * @proxy: A #AudiomanagerCommandinterfaceProxy. + * @arg_sinkID: Argument to pass with the method invocation. + * @arg_volumeStep: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the VolumeStep() D-Bus method on @proxy. + * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. + * You can then call audiomanager_commandinterface_call_volume_step_finish() to get the result of the operation. + * + * See audiomanager_commandinterface_call_volume_step_sync() for the synchronous, blocking version of this method. + */ +void +audiomanager_commandinterface_call_volume_step ( + AudiomanagerCommandinterface *proxy, + guint16 arg_sinkID, + gint16 arg_volumeStep, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "VolumeStep", + g_variant_new ("(qn)", + arg_sinkID, + arg_volumeStep), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * audiomanager_commandinterface_call_volume_step_finish: + * @proxy: A #AudiomanagerCommandinterfaceProxy. + * @out_result: (out): Return location for return parameter or %NULL to ignore. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to audiomanager_commandinterface_call_volume_step(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with audiomanager_commandinterface_call_volume_step(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +audiomanager_commandinterface_call_volume_step_finish ( + AudiomanagerCommandinterface *proxy, + gint16 *out_result, + GAsyncResult *res, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(n)", + out_result); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * audiomanager_commandinterface_call_volume_step_sync: + * @proxy: A #AudiomanagerCommandinterfaceProxy. + * @arg_sinkID: Argument to pass with the method invocation. + * @arg_volumeStep: Argument to pass with the method invocation. + * @out_result: (out): Return location for return parameter or %NULL to ignore. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the VolumeStep() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See audiomanager_commandinterface_call_volume_step() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +audiomanager_commandinterface_call_volume_step_sync ( + AudiomanagerCommandinterface *proxy, + guint16 arg_sinkID, + gint16 arg_volumeStep, + gint16 *out_result, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "VolumeStep", + g_variant_new ("(qn)", + arg_sinkID, + arg_volumeStep), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(n)", + out_result); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * audiomanager_commandinterface_call_set_sink_mute_state: + * @proxy: A #AudiomanagerCommandinterfaceProxy. + * @arg_sinkID: Argument to pass with the method invocation. + * @arg_muteState: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the SetSinkMuteState() D-Bus method on @proxy. + * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. + * You can then call audiomanager_commandinterface_call_set_sink_mute_state_finish() to get the result of the operation. + * + * See audiomanager_commandinterface_call_set_sink_mute_state_sync() for the synchronous, blocking version of this method. + */ +void +audiomanager_commandinterface_call_set_sink_mute_state ( + AudiomanagerCommandinterface *proxy, + guint16 arg_sinkID, + gint16 arg_muteState, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "SetSinkMuteState", + g_variant_new ("(qn)", + arg_sinkID, + arg_muteState), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * audiomanager_commandinterface_call_set_sink_mute_state_finish: + * @proxy: A #AudiomanagerCommandinterfaceProxy. + * @out_result: (out): Return location for return parameter or %NULL to ignore. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to audiomanager_commandinterface_call_set_sink_mute_state(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with audiomanager_commandinterface_call_set_sink_mute_state(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +audiomanager_commandinterface_call_set_sink_mute_state_finish ( + AudiomanagerCommandinterface *proxy, + gint16 *out_result, + GAsyncResult *res, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(n)", + out_result); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * audiomanager_commandinterface_call_set_sink_mute_state_sync: + * @proxy: A #AudiomanagerCommandinterfaceProxy. + * @arg_sinkID: Argument to pass with the method invocation. + * @arg_muteState: Argument to pass with the method invocation. + * @out_result: (out): Return location for return parameter or %NULL to ignore. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the SetSinkMuteState() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See audiomanager_commandinterface_call_set_sink_mute_state() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +audiomanager_commandinterface_call_set_sink_mute_state_sync ( + AudiomanagerCommandinterface *proxy, + guint16 arg_sinkID, + gint16 arg_muteState, + gint16 *out_result, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "SetSinkMuteState", + g_variant_new ("(qn)", + arg_sinkID, + arg_muteState), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(n)", + out_result); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * audiomanager_commandinterface_call_get_list_main_connections: + * @proxy: A #AudiomanagerCommandinterfaceProxy. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the GetListMainConnections() D-Bus method on @proxy. + * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. + * You can then call audiomanager_commandinterface_call_get_list_main_connections_finish() to get the result of the operation. + * + * See audiomanager_commandinterface_call_get_list_main_connections_sync() for the synchronous, blocking version of this method. + */ +void +audiomanager_commandinterface_call_get_list_main_connections ( + AudiomanagerCommandinterface *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "GetListMainConnections", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * audiomanager_commandinterface_call_get_list_main_connections_finish: + * @proxy: A #AudiomanagerCommandinterfaceProxy. + * @out_result: (out): Return location for return parameter or %NULL to ignore. + * @out_listConnections: (out): Return location for return parameter or %NULL to ignore. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to audiomanager_commandinterface_call_get_list_main_connections(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with audiomanager_commandinterface_call_get_list_main_connections(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +audiomanager_commandinterface_call_get_list_main_connections_finish ( + AudiomanagerCommandinterface *proxy, + gint16 *out_result, + GVariant **out_listConnections, + GAsyncResult *res, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(n@a(qqqnn))", + out_result, + out_listConnections); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * audiomanager_commandinterface_call_get_list_main_connections_sync: + * @proxy: A #AudiomanagerCommandinterfaceProxy. + * @out_result: (out): Return location for return parameter or %NULL to ignore. + * @out_listConnections: (out): Return location for return parameter or %NULL to ignore. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the GetListMainConnections() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See audiomanager_commandinterface_call_get_list_main_connections() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +audiomanager_commandinterface_call_get_list_main_connections_sync ( + AudiomanagerCommandinterface *proxy, + gint16 *out_result, + GVariant **out_listConnections, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "GetListMainConnections", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(n@a(qqqnn))", + out_result, + out_listConnections); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * audiomanager_commandinterface_call_get_list_main_sinks: + * @proxy: A #AudiomanagerCommandinterfaceProxy. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the GetListMainSinks() D-Bus method on @proxy. + * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. + * You can then call audiomanager_commandinterface_call_get_list_main_sinks_finish() to get the result of the operation. + * + * See audiomanager_commandinterface_call_get_list_main_sinks_sync() for the synchronous, blocking version of this method. + */ +void +audiomanager_commandinterface_call_get_list_main_sinks ( + AudiomanagerCommandinterface *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "GetListMainSinks", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * audiomanager_commandinterface_call_get_list_main_sinks_finish: + * @proxy: A #AudiomanagerCommandinterfaceProxy. + * @out_result: (out): Return location for return parameter or %NULL to ignore. + * @out_listMainSinks: (out): Return location for return parameter or %NULL to ignore. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to audiomanager_commandinterface_call_get_list_main_sinks(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with audiomanager_commandinterface_call_get_list_main_sinks(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +audiomanager_commandinterface_call_get_list_main_sinks_finish ( + AudiomanagerCommandinterface *proxy, + gint16 *out_result, + GVariant **out_listMainSinks, + GAsyncResult *res, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(n@a(qs(nn)nnq))", + out_result, + out_listMainSinks); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * audiomanager_commandinterface_call_get_list_main_sinks_sync: + * @proxy: A #AudiomanagerCommandinterfaceProxy. + * @out_result: (out): Return location for return parameter or %NULL to ignore. + * @out_listMainSinks: (out): Return location for return parameter or %NULL to ignore. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the GetListMainSinks() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See audiomanager_commandinterface_call_get_list_main_sinks() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +audiomanager_commandinterface_call_get_list_main_sinks_sync ( + AudiomanagerCommandinterface *proxy, + gint16 *out_result, + GVariant **out_listMainSinks, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "GetListMainSinks", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(n@a(qs(nn)nnq))", + out_result, + out_listMainSinks); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * audiomanager_commandinterface_complete_connect: + * @object: A #AudiomanagerCommandinterface. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @result: Parameter to return. + * @mainConnectionID: Parameter to return. + * + * Helper function used in service implementations to finish handling invocations of the Connect() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * + * This method will free @invocation, you cannot use it afterwards. + */ +void +audiomanager_commandinterface_complete_connect ( + AudiomanagerCommandinterface *object, + GDBusMethodInvocation *invocation, + gint16 result, + guint16 mainConnectionID) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(nq)", + result, + mainConnectionID)); +} + +/** + * audiomanager_commandinterface_complete_disconnect: + * @object: A #AudiomanagerCommandinterface. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @result: Parameter to return. + * + * Helper function used in service implementations to finish handling invocations of the Disconnect() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * + * This method will free @invocation, you cannot use it afterwards. + */ +void +audiomanager_commandinterface_complete_disconnect ( + AudiomanagerCommandinterface *object, + GDBusMethodInvocation *invocation, + gint16 result) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(n)", + result)); +} + +/** + * audiomanager_commandinterface_complete_set_volume: + * @object: A #AudiomanagerCommandinterface. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @result: Parameter to return. + * + * Helper function used in service implementations to finish handling invocations of the SetVolume() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * + * This method will free @invocation, you cannot use it afterwards. + */ +void +audiomanager_commandinterface_complete_set_volume ( + AudiomanagerCommandinterface *object, + GDBusMethodInvocation *invocation, + gint16 result) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(n)", + result)); +} + +/** + * audiomanager_commandinterface_complete_volume_step: + * @object: A #AudiomanagerCommandinterface. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @result: Parameter to return. + * + * Helper function used in service implementations to finish handling invocations of the VolumeStep() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * + * This method will free @invocation, you cannot use it afterwards. + */ +void +audiomanager_commandinterface_complete_volume_step ( + AudiomanagerCommandinterface *object, + GDBusMethodInvocation *invocation, + gint16 result) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(n)", + result)); +} + +/** + * audiomanager_commandinterface_complete_set_sink_mute_state: + * @object: A #AudiomanagerCommandinterface. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @result: Parameter to return. + * + * Helper function used in service implementations to finish handling invocations of the SetSinkMuteState() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * + * This method will free @invocation, you cannot use it afterwards. + */ +void +audiomanager_commandinterface_complete_set_sink_mute_state ( + AudiomanagerCommandinterface *object, + GDBusMethodInvocation *invocation, + gint16 result) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(n)", + result)); +} + +/** + * audiomanager_commandinterface_complete_get_list_main_connections: + * @object: A #AudiomanagerCommandinterface. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @result: Parameter to return. + * @listConnections: Parameter to return. + * + * Helper function used in service implementations to finish handling invocations of the GetListMainConnections() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * + * This method will free @invocation, you cannot use it afterwards. + */ +void +audiomanager_commandinterface_complete_get_list_main_connections ( + AudiomanagerCommandinterface *object, + GDBusMethodInvocation *invocation, + gint16 result, + GVariant *listConnections) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(n@a(qqqnn))", + result, + listConnections)); +} + +/** + * audiomanager_commandinterface_complete_get_list_main_sinks: + * @object: A #AudiomanagerCommandinterface. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @result: Parameter to return. + * @listMainSinks: Parameter to return. + * + * Helper function used in service implementations to finish handling invocations of the GetListMainSinks() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * + * This method will free @invocation, you cannot use it afterwards. + */ +void +audiomanager_commandinterface_complete_get_list_main_sinks ( + AudiomanagerCommandinterface *object, + GDBusMethodInvocation *invocation, + gint16 result, + GVariant *listMainSinks) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(n@a(qs(nn)nnq))", + result, + listMainSinks)); +} + +/* ------------------------------------------------------------------------ */ + +/** + * AudiomanagerCommandinterfaceProxy: + * + * The #AudiomanagerCommandinterfaceProxy structure contains only private data and should only be accessed using the provided API. + */ + +/** + * AudiomanagerCommandinterfaceProxyClass: + * @parent_class: The parent class. + * + * Class structure for #AudiomanagerCommandinterfaceProxy. + */ + +struct _AudiomanagerCommandinterfaceProxyPrivate +{ + GData *qdata; +}; + +static void audiomanager_commandinterface_proxy_iface_init (AudiomanagerCommandinterfaceIface *iface); + +#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 +G_DEFINE_TYPE_WITH_CODE (AudiomanagerCommandinterfaceProxy, audiomanager_commandinterface_proxy, G_TYPE_DBUS_PROXY, + G_ADD_PRIVATE (AudiomanagerCommandinterfaceProxy) + G_IMPLEMENT_INTERFACE (TYPE_AUDIOMANAGER_COMMANDINTERFACE, audiomanager_commandinterface_proxy_iface_init)); + +#else +G_DEFINE_TYPE_WITH_CODE (AudiomanagerCommandinterfaceProxy, audiomanager_commandinterface_proxy, G_TYPE_DBUS_PROXY, + G_IMPLEMENT_INTERFACE (TYPE_AUDIOMANAGER_COMMANDINTERFACE, audiomanager_commandinterface_proxy_iface_init)); + +#endif +static void +audiomanager_commandinterface_proxy_finalize (GObject *object) +{ + AudiomanagerCommandinterfaceProxy *proxy = AUDIOMANAGER_COMMANDINTERFACE_PROXY (object); + g_datalist_clear (&proxy->priv->qdata); + G_OBJECT_CLASS (audiomanager_commandinterface_proxy_parent_class)->finalize (object); +} + +static void +audiomanager_commandinterface_proxy_get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec G_GNUC_UNUSED) +{ +} + +static void +audiomanager_commandinterface_proxy_set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec G_GNUC_UNUSED) +{ +} + +static void +audiomanager_commandinterface_proxy_g_signal (GDBusProxy *proxy, + const gchar *sender_name G_GNUC_UNUSED, + const gchar *signal_name, + GVariant *parameters) +{ + _ExtendedGDBusSignalInfo *info; + GVariantIter iter; + GVariant *child; + GValue *paramv; + guint num_params; + guint n; + guint signal_id; + info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_audiomanager_commandinterface_interface_info.parent_struct, signal_name); + if (info == NULL) + return; + num_params = g_variant_n_children (parameters); + paramv = g_new0 (GValue, num_params + 1); + g_value_init (¶mv[0], TYPE_AUDIOMANAGER_COMMANDINTERFACE); + g_value_set_object (¶mv[0], proxy); + g_variant_iter_init (&iter, parameters); + n = 1; + while ((child = g_variant_iter_next_value (&iter)) != NULL) + { + _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1]; + if (arg_info->use_gvariant) + { + g_value_init (¶mv[n], G_TYPE_VARIANT); + g_value_set_variant (¶mv[n], child); + n++; + } + else + g_dbus_gvariant_to_gvalue (child, ¶mv[n++]); + g_variant_unref (child); + } + signal_id = g_signal_lookup (info->signal_name, TYPE_AUDIOMANAGER_COMMANDINTERFACE); + g_signal_emitv (paramv, signal_id, 0, NULL); + for (n = 0; n < num_params + 1; n++) + g_value_unset (¶mv[n]); + g_free (paramv); +} + +static void +audiomanager_commandinterface_proxy_g_properties_changed (GDBusProxy *_proxy, + GVariant *changed_properties, + const gchar *const *invalidated_properties) +{ + AudiomanagerCommandinterfaceProxy *proxy = AUDIOMANAGER_COMMANDINTERFACE_PROXY (_proxy); + guint n; + const gchar *key; + GVariantIter *iter; + _ExtendedGDBusPropertyInfo *info; + g_variant_get (changed_properties, "a{sv}", &iter); + while (g_variant_iter_next (iter, "{&sv}", &key, NULL)) + { + info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_audiomanager_commandinterface_interface_info.parent_struct, key); + g_datalist_remove_data (&proxy->priv->qdata, key); + if (info != NULL) + g_object_notify (G_OBJECT (proxy), info->hyphen_name); + } + g_variant_iter_free (iter); + for (n = 0; invalidated_properties[n] != NULL; n++) + { + info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_audiomanager_commandinterface_interface_info.parent_struct, invalidated_properties[n]); + g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]); + if (info != NULL) + g_object_notify (G_OBJECT (proxy), info->hyphen_name); + } +} + +static void +audiomanager_commandinterface_proxy_init (AudiomanagerCommandinterfaceProxy *proxy) +{ +#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 + proxy->priv = audiomanager_commandinterface_proxy_get_instance_private (proxy); +#else + proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, TYPE_AUDIOMANAGER_COMMANDINTERFACE_PROXY, AudiomanagerCommandinterfaceProxyPrivate); +#endif + + g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), audiomanager_commandinterface_interface_info ()); +} + +static void +audiomanager_commandinterface_proxy_class_init (AudiomanagerCommandinterfaceProxyClass *klass) +{ + GObjectClass *gobject_class; + GDBusProxyClass *proxy_class; + + gobject_class = G_OBJECT_CLASS (klass); + gobject_class->finalize = audiomanager_commandinterface_proxy_finalize; + gobject_class->get_property = audiomanager_commandinterface_proxy_get_property; + gobject_class->set_property = audiomanager_commandinterface_proxy_set_property; + + proxy_class = G_DBUS_PROXY_CLASS (klass); + proxy_class->g_signal = audiomanager_commandinterface_proxy_g_signal; + proxy_class->g_properties_changed = audiomanager_commandinterface_proxy_g_properties_changed; + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38 + g_type_class_add_private (klass, sizeof (AudiomanagerCommandinterfaceProxyPrivate)); +#endif +} + +static void +audiomanager_commandinterface_proxy_iface_init (AudiomanagerCommandinterfaceIface *iface) +{ +} + +/** + * audiomanager_commandinterface_proxy_new: + * @connection: A #GDBusConnection. + * @flags: Flags from the #GDBusProxyFlags enumeration. + * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. + * @object_path: An object path. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied. + * @user_data: User data to pass to @callback. + * + * Asynchronously creates a proxy for the D-Bus interface org.genivi.audiomanager.commandinterface. See g_dbus_proxy_new() for more details. + * + * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. + * You can then call audiomanager_commandinterface_proxy_new_finish() to get the result of the operation. + * + * See audiomanager_commandinterface_proxy_new_sync() for the synchronous, blocking version of this constructor. + */ +void +audiomanager_commandinterface_proxy_new ( + GDBusConnection *connection, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_async_initable_new_async (TYPE_AUDIOMANAGER_COMMANDINTERFACE_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.genivi.audiomanager.commandinterface", NULL); +} + +/** + * audiomanager_commandinterface_proxy_new_finish: + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to audiomanager_commandinterface_proxy_new(). + * @error: Return location for error or %NULL + * + * Finishes an operation started with audiomanager_commandinterface_proxy_new(). + * + * Returns: (transfer full) (type AudiomanagerCommandinterfaceProxy): The constructed proxy object or %NULL if @error is set. + */ +AudiomanagerCommandinterface * +audiomanager_commandinterface_proxy_new_finish ( + GAsyncResult *res, + GError **error) +{ + GObject *ret; + GObject *source_object; + source_object = g_async_result_get_source_object (res); + ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error); + g_object_unref (source_object); + if (ret != NULL) + return AUDIOMANAGER_COMMANDINTERFACE (ret); + else + return NULL; +} + +/** + * audiomanager_commandinterface_proxy_new_sync: + * @connection: A #GDBusConnection. + * @flags: Flags from the #GDBusProxyFlags enumeration. + * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. + * @object_path: An object path. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL + * + * Synchronously creates a proxy for the D-Bus interface org.genivi.audiomanager.commandinterface. See g_dbus_proxy_new_sync() for more details. + * + * The calling thread is blocked until a reply is received. + * + * See audiomanager_commandinterface_proxy_new() for the asynchronous version of this constructor. + * + * Returns: (transfer full) (type AudiomanagerCommandinterfaceProxy): The constructed proxy object or %NULL if @error is set. + */ +AudiomanagerCommandinterface * +audiomanager_commandinterface_proxy_new_sync ( + GDBusConnection *connection, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GError **error) +{ + GInitable *ret; + ret = g_initable_new (TYPE_AUDIOMANAGER_COMMANDINTERFACE_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.genivi.audiomanager.commandinterface", NULL); + if (ret != NULL) + return AUDIOMANAGER_COMMANDINTERFACE (ret); + else + return NULL; +} + + +/** + * audiomanager_commandinterface_proxy_new_for_bus: + * @bus_type: A #GBusType. + * @flags: Flags from the #GDBusProxyFlags enumeration. + * @name: A bus name (well-known or unique). + * @object_path: An object path. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied. + * @user_data: User data to pass to @callback. + * + * Like audiomanager_commandinterface_proxy_new() but takes a #GBusType instead of a #GDBusConnection. + * + * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. + * You can then call audiomanager_commandinterface_proxy_new_for_bus_finish() to get the result of the operation. + * + * See audiomanager_commandinterface_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor. + */ +void +audiomanager_commandinterface_proxy_new_for_bus ( + GBusType bus_type, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_async_initable_new_async (TYPE_AUDIOMANAGER_COMMANDINTERFACE_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.genivi.audiomanager.commandinterface", NULL); +} + +/** + * audiomanager_commandinterface_proxy_new_for_bus_finish: + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to audiomanager_commandinterface_proxy_new_for_bus(). + * @error: Return location for error or %NULL + * + * Finishes an operation started with audiomanager_commandinterface_proxy_new_for_bus(). + * + * Returns: (transfer full) (type AudiomanagerCommandinterfaceProxy): The constructed proxy object or %NULL if @error is set. + */ +AudiomanagerCommandinterface * +audiomanager_commandinterface_proxy_new_for_bus_finish ( + GAsyncResult *res, + GError **error) +{ + GObject *ret; + GObject *source_object; + source_object = g_async_result_get_source_object (res); + ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error); + g_object_unref (source_object); + if (ret != NULL) + return AUDIOMANAGER_COMMANDINTERFACE (ret); + else + return NULL; +} + +/** + * audiomanager_commandinterface_proxy_new_for_bus_sync: + * @bus_type: A #GBusType. + * @flags: Flags from the #GDBusProxyFlags enumeration. + * @name: A bus name (well-known or unique). + * @object_path: An object path. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL + * + * Like audiomanager_commandinterface_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection. + * + * The calling thread is blocked until a reply is received. + * + * See audiomanager_commandinterface_proxy_new_for_bus() for the asynchronous version of this constructor. + * + * Returns: (transfer full) (type AudiomanagerCommandinterfaceProxy): The constructed proxy object or %NULL if @error is set. + */ +AudiomanagerCommandinterface * +audiomanager_commandinterface_proxy_new_for_bus_sync ( + GBusType bus_type, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GError **error) +{ + GInitable *ret; + ret = g_initable_new (TYPE_AUDIOMANAGER_COMMANDINTERFACE_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.genivi.audiomanager.commandinterface", NULL); + if (ret != NULL) + return AUDIOMANAGER_COMMANDINTERFACE (ret); + else + return NULL; +} + + +/* ------------------------------------------------------------------------ */ + +/** + * AudiomanagerCommandinterfaceSkeleton: + * + * The #AudiomanagerCommandinterfaceSkeleton structure contains only private data and should only be accessed using the provided API. + */ + +/** + * AudiomanagerCommandinterfaceSkeletonClass: + * @parent_class: The parent class. + * + * Class structure for #AudiomanagerCommandinterfaceSkeleton. + */ + +struct _AudiomanagerCommandinterfaceSkeletonPrivate +{ + GValue *properties; + GList *changed_properties; + GSource *changed_properties_idle_source; + GMainContext *context; + GMutex lock; +}; + +static void +_audiomanager_commandinterface_skeleton_handle_method_call ( + GDBusConnection *connection G_GNUC_UNUSED, + const gchar *sender G_GNUC_UNUSED, + const gchar *object_path G_GNUC_UNUSED, + const gchar *interface_name, + const gchar *method_name, + GVariant *parameters, + GDBusMethodInvocation *invocation, + gpointer user_data) +{ + AudiomanagerCommandinterfaceSkeleton *skeleton = AUDIOMANAGER_COMMANDINTERFACE_SKELETON (user_data); + _ExtendedGDBusMethodInfo *info; + GVariantIter iter; + GVariant *child; + GValue *paramv; + guint num_params; + guint num_extra; + guint n; + guint signal_id; + GValue return_value = G_VALUE_INIT; + info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation); + g_assert (info != NULL); + num_params = g_variant_n_children (parameters); + num_extra = info->pass_fdlist ? 3 : 2; paramv = g_new0 (GValue, num_params + num_extra); + n = 0; + g_value_init (¶mv[n], TYPE_AUDIOMANAGER_COMMANDINTERFACE); + g_value_set_object (¶mv[n++], skeleton); + g_value_init (¶mv[n], G_TYPE_DBUS_METHOD_INVOCATION); + g_value_set_object (¶mv[n++], invocation); + if (info->pass_fdlist) + { +#ifdef G_OS_UNIX + g_value_init (¶mv[n], G_TYPE_UNIX_FD_LIST); + g_value_set_object (¶mv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation))); +#else + g_assert_not_reached (); +#endif + } + g_variant_iter_init (&iter, parameters); + while ((child = g_variant_iter_next_value (&iter)) != NULL) + { + _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra]; + if (arg_info->use_gvariant) + { + g_value_init (¶mv[n], G_TYPE_VARIANT); + g_value_set_variant (¶mv[n], child); + n++; + } + else + g_dbus_gvariant_to_gvalue (child, ¶mv[n++]); + g_variant_unref (child); + } + signal_id = g_signal_lookup (info->signal_name, TYPE_AUDIOMANAGER_COMMANDINTERFACE); + g_value_init (&return_value, G_TYPE_BOOLEAN); + g_signal_emitv (paramv, signal_id, 0, &return_value); + if (!g_value_get_boolean (&return_value)) + g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name); + g_value_unset (&return_value); + for (n = 0; n < num_params + num_extra; n++) + g_value_unset (¶mv[n]); + g_free (paramv); +} + +static GVariant * +_audiomanager_commandinterface_skeleton_handle_get_property ( + GDBusConnection *connection G_GNUC_UNUSED, + const gchar *sender G_GNUC_UNUSED, + const gchar *object_path G_GNUC_UNUSED, + const gchar *interface_name G_GNUC_UNUSED, + const gchar *property_name, + GError **error, + gpointer user_data) +{ + AudiomanagerCommandinterfaceSkeleton *skeleton = AUDIOMANAGER_COMMANDINTERFACE_SKELETON (user_data); + GValue value = G_VALUE_INIT; + GParamSpec *pspec; + _ExtendedGDBusPropertyInfo *info; + GVariant *ret; + ret = NULL; + info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_audiomanager_commandinterface_interface_info.parent_struct, property_name); + g_assert (info != NULL); + pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name); + if (pspec == NULL) + { + g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name); + } + else + { + g_value_init (&value, pspec->value_type); + g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value); + ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature)); + g_value_unset (&value); + } + return ret; +} + +static gboolean +_audiomanager_commandinterface_skeleton_handle_set_property ( + GDBusConnection *connection G_GNUC_UNUSED, + const gchar *sender G_GNUC_UNUSED, + const gchar *object_path G_GNUC_UNUSED, + const gchar *interface_name G_GNUC_UNUSED, + const gchar *property_name, + GVariant *variant, + GError **error, + gpointer user_data) +{ + AudiomanagerCommandinterfaceSkeleton *skeleton = AUDIOMANAGER_COMMANDINTERFACE_SKELETON (user_data); + GValue value = G_VALUE_INIT; + GParamSpec *pspec; + _ExtendedGDBusPropertyInfo *info; + gboolean ret; + ret = FALSE; + info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_audiomanager_commandinterface_interface_info.parent_struct, property_name); + g_assert (info != NULL); + pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name); + if (pspec == NULL) + { + g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name); + } + else + { + if (info->use_gvariant) + g_value_set_variant (&value, variant); + else + g_dbus_gvariant_to_gvalue (variant, &value); + g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value); + g_value_unset (&value); + ret = TRUE; + } + return ret; +} + +static const GDBusInterfaceVTable _audiomanager_commandinterface_skeleton_vtable = +{ + _audiomanager_commandinterface_skeleton_handle_method_call, + _audiomanager_commandinterface_skeleton_handle_get_property, + _audiomanager_commandinterface_skeleton_handle_set_property, + {NULL} +}; + +static GDBusInterfaceInfo * +audiomanager_commandinterface_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED) +{ + return audiomanager_commandinterface_interface_info (); +} + +static GDBusInterfaceVTable * +audiomanager_commandinterface_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED) +{ + return (GDBusInterfaceVTable *) &_audiomanager_commandinterface_skeleton_vtable; +} + +static GVariant * +audiomanager_commandinterface_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton) +{ + AudiomanagerCommandinterfaceSkeleton *skeleton = AUDIOMANAGER_COMMANDINTERFACE_SKELETON (_skeleton); + + GVariantBuilder builder; + guint n; + g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}")); + if (_audiomanager_commandinterface_interface_info.parent_struct.properties == NULL) + goto out; + for (n = 0; _audiomanager_commandinterface_interface_info.parent_struct.properties[n] != NULL; n++) + { + GDBusPropertyInfo *info = _audiomanager_commandinterface_interface_info.parent_struct.properties[n]; + if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE) + { + GVariant *value; + value = _audiomanager_commandinterface_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.genivi.audiomanager.commandinterface", info->name, NULL, skeleton); + if (value != NULL) + { + g_variant_take_ref (value); + g_variant_builder_add (&builder, "{sv}", info->name, value); + g_variant_unref (value); + } + } + } +out: + return g_variant_builder_end (&builder); +} + +static void +audiomanager_commandinterface_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton) +{ +} + +static void +_audiomanager_commandinterface_on_signal_new_main_connection ( + AudiomanagerCommandinterface *object, + GVariant *arg_mainConnection) +{ + AudiomanagerCommandinterfaceSkeleton *skeleton = AUDIOMANAGER_COMMANDINTERFACE_SKELETON (object); + + GList *connections, *l; + GVariant *signal_variant; + connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton)); + + signal_variant = g_variant_ref_sink (g_variant_new ("(@(qqqnn))", + arg_mainConnection)); + for (l = connections; l != NULL; l = l->next) + { + GDBusConnection *connection = l->data; + g_dbus_connection_emit_signal (connection, + NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.genivi.audiomanager.commandinterface", "NewMainConnection", + signal_variant, NULL); + } + g_variant_unref (signal_variant); + g_list_free_full (connections, g_object_unref); +} + +static void +_audiomanager_commandinterface_on_signal_removed_main_connection ( + AudiomanagerCommandinterface *object, + guint16 arg_mainConnectionId) +{ + AudiomanagerCommandinterfaceSkeleton *skeleton = AUDIOMANAGER_COMMANDINTERFACE_SKELETON (object); + + GList *connections, *l; + GVariant *signal_variant; + connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton)); + + signal_variant = g_variant_ref_sink (g_variant_new ("(q)", + arg_mainConnectionId)); + for (l = connections; l != NULL; l = l->next) + { + GDBusConnection *connection = l->data; + g_dbus_connection_emit_signal (connection, + NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.genivi.audiomanager.commandinterface", "RemovedMainConnection", + signal_variant, NULL); + } + g_variant_unref (signal_variant); + g_list_free_full (connections, g_object_unref); +} + +static void +_audiomanager_commandinterface_on_signal_main_connection_state_changed ( + AudiomanagerCommandinterface *object, + guint16 arg_connectionID, + gint16 arg_connectionState) +{ + AudiomanagerCommandinterfaceSkeleton *skeleton = AUDIOMANAGER_COMMANDINTERFACE_SKELETON (object); + + GList *connections, *l; + GVariant *signal_variant; + connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton)); + + signal_variant = g_variant_ref_sink (g_variant_new ("(qn)", + arg_connectionID, + arg_connectionState)); + for (l = connections; l != NULL; l = l->next) + { + GDBusConnection *connection = l->data; + g_dbus_connection_emit_signal (connection, + NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.genivi.audiomanager.commandinterface", "MainConnectionStateChanged", + signal_variant, NULL); + } + g_variant_unref (signal_variant); + g_list_free_full (connections, g_object_unref); +} + +static void +_audiomanager_commandinterface_on_signal_volume_changed ( + AudiomanagerCommandinterface *object, + guint16 arg_sinkID, + gint16 arg_volume) +{ + AudiomanagerCommandinterfaceSkeleton *skeleton = AUDIOMANAGER_COMMANDINTERFACE_SKELETON (object); + + GList *connections, *l; + GVariant *signal_variant; + connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton)); + + signal_variant = g_variant_ref_sink (g_variant_new ("(qn)", + arg_sinkID, + arg_volume)); + for (l = connections; l != NULL; l = l->next) + { + GDBusConnection *connection = l->data; + g_dbus_connection_emit_signal (connection, + NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.genivi.audiomanager.commandinterface", "VolumeChanged", + signal_variant, NULL); + } + g_variant_unref (signal_variant); + g_list_free_full (connections, g_object_unref); +} + +static void +_audiomanager_commandinterface_on_signal_sink_mute_state_changed ( + AudiomanagerCommandinterface *object, + guint16 arg_sinkID, + gint16 arg_muteState) +{ + AudiomanagerCommandinterfaceSkeleton *skeleton = AUDIOMANAGER_COMMANDINTERFACE_SKELETON (object); + + GList *connections, *l; + GVariant *signal_variant; + connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton)); + + signal_variant = g_variant_ref_sink (g_variant_new ("(qn)", + arg_sinkID, + arg_muteState)); + for (l = connections; l != NULL; l = l->next) + { + GDBusConnection *connection = l->data; + g_dbus_connection_emit_signal (connection, + NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.genivi.audiomanager.commandinterface", "SinkMuteStateChanged", + signal_variant, NULL); + } + g_variant_unref (signal_variant); + g_list_free_full (connections, g_object_unref); +} + +static void +_audiomanager_commandinterface_on_signal_system_property_changed ( + AudiomanagerCommandinterface *object, + GVariant *arg_SystemProperty) +{ + AudiomanagerCommandinterfaceSkeleton *skeleton = AUDIOMANAGER_COMMANDINTERFACE_SKELETON (object); + + GList *connections, *l; + GVariant *signal_variant; + connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton)); + + signal_variant = g_variant_ref_sink (g_variant_new ("(@(nn))", + arg_SystemProperty)); + for (l = connections; l != NULL; l = l->next) + { + GDBusConnection *connection = l->data; + g_dbus_connection_emit_signal (connection, + NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.genivi.audiomanager.commandinterface", "SystemPropertyChanged", + signal_variant, NULL); + } + g_variant_unref (signal_variant); + g_list_free_full (connections, g_object_unref); +} + +static void audiomanager_commandinterface_skeleton_iface_init (AudiomanagerCommandinterfaceIface *iface); +#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 +G_DEFINE_TYPE_WITH_CODE (AudiomanagerCommandinterfaceSkeleton, audiomanager_commandinterface_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON, + G_ADD_PRIVATE (AudiomanagerCommandinterfaceSkeleton) + G_IMPLEMENT_INTERFACE (TYPE_AUDIOMANAGER_COMMANDINTERFACE, audiomanager_commandinterface_skeleton_iface_init)); + +#else +G_DEFINE_TYPE_WITH_CODE (AudiomanagerCommandinterfaceSkeleton, audiomanager_commandinterface_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON, + G_IMPLEMENT_INTERFACE (TYPE_AUDIOMANAGER_COMMANDINTERFACE, audiomanager_commandinterface_skeleton_iface_init)); + +#endif +static void +audiomanager_commandinterface_skeleton_finalize (GObject *object) +{ + AudiomanagerCommandinterfaceSkeleton *skeleton = AUDIOMANAGER_COMMANDINTERFACE_SKELETON (object); + g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free); + if (skeleton->priv->changed_properties_idle_source != NULL) + g_source_destroy (skeleton->priv->changed_properties_idle_source); + g_main_context_unref (skeleton->priv->context); + g_mutex_clear (&skeleton->priv->lock); + G_OBJECT_CLASS (audiomanager_commandinterface_skeleton_parent_class)->finalize (object); +} + +static void +audiomanager_commandinterface_skeleton_init (AudiomanagerCommandinterfaceSkeleton *skeleton) +{ +#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 + skeleton->priv = audiomanager_commandinterface_skeleton_get_instance_private (skeleton); +#else + skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, TYPE_AUDIOMANAGER_COMMANDINTERFACE_SKELETON, AudiomanagerCommandinterfaceSkeletonPrivate); +#endif + + g_mutex_init (&skeleton->priv->lock); + skeleton->priv->context = g_main_context_ref_thread_default (); +} + +static void +audiomanager_commandinterface_skeleton_class_init (AudiomanagerCommandinterfaceSkeletonClass *klass) +{ + GObjectClass *gobject_class; + GDBusInterfaceSkeletonClass *skeleton_class; + + gobject_class = G_OBJECT_CLASS (klass); + gobject_class->finalize = audiomanager_commandinterface_skeleton_finalize; + + skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass); + skeleton_class->get_info = audiomanager_commandinterface_skeleton_dbus_interface_get_info; + skeleton_class->get_properties = audiomanager_commandinterface_skeleton_dbus_interface_get_properties; + skeleton_class->flush = audiomanager_commandinterface_skeleton_dbus_interface_flush; + skeleton_class->get_vtable = audiomanager_commandinterface_skeleton_dbus_interface_get_vtable; + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38 + g_type_class_add_private (klass, sizeof (AudiomanagerCommandinterfaceSkeletonPrivate)); +#endif +} + +static void +audiomanager_commandinterface_skeleton_iface_init (AudiomanagerCommandinterfaceIface *iface) +{ + iface->new_main_connection = _audiomanager_commandinterface_on_signal_new_main_connection; + iface->removed_main_connection = _audiomanager_commandinterface_on_signal_removed_main_connection; + iface->main_connection_state_changed = _audiomanager_commandinterface_on_signal_main_connection_state_changed; + iface->volume_changed = _audiomanager_commandinterface_on_signal_volume_changed; + iface->sink_mute_state_changed = _audiomanager_commandinterface_on_signal_sink_mute_state_changed; + iface->system_property_changed = _audiomanager_commandinterface_on_signal_system_property_changed; +} + +/** + * audiomanager_commandinterface_skeleton_new: + * + * Creates a skeleton object for the D-Bus interface org.genivi.audiomanager.commandinterface. + * + * Returns: (transfer full) (type AudiomanagerCommandinterfaceSkeleton): The skeleton object. + */ +AudiomanagerCommandinterface * +audiomanager_commandinterface_skeleton_new (void) +{ + return AUDIOMANAGER_COMMANDINTERFACE (g_object_new (TYPE_AUDIOMANAGER_COMMANDINTERFACE_SKELETON, NULL)); +} + +/* ------------------------------------------------------------------------ + * Code for interface org.genivi.audiomanager.routinginterface + * ------------------------------------------------------------------------ + */ + +/** + * SECTION:AudiomanagerRoutinginterface + * @title: AudiomanagerRoutinginterface + * @short_description: Generated C code for the org.genivi.audiomanager.routinginterface D-Bus interface + * + * This section contains code for working with the org.genivi.audiomanager.routinginterface D-Bus interface in C. + */ + +/* ---- Introspection data for org.genivi.audiomanager.routinginterface ---- */ + +static const _ExtendedGDBusArgInfo _audiomanager_routinginterface_method_info_ack_connect_IN_ARG_handle = +{ + { + -1, + (gchar *) "handle", + (gchar *) "q", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_routinginterface_method_info_ack_connect_IN_ARG_connectionID = +{ + { + -1, + (gchar *) "connectionID", + (gchar *) "q", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_routinginterface_method_info_ack_connect_IN_ARG_error = +{ + { + -1, + (gchar *) "error", + (gchar *) "q", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _audiomanager_routinginterface_method_info_ack_connect_IN_ARG_pointers[] = +{ + &_audiomanager_routinginterface_method_info_ack_connect_IN_ARG_handle, + &_audiomanager_routinginterface_method_info_ack_connect_IN_ARG_connectionID, + &_audiomanager_routinginterface_method_info_ack_connect_IN_ARG_error, + NULL +}; + +static const _ExtendedGDBusMethodInfo _audiomanager_routinginterface_method_info_ack_connect = +{ + { + -1, + (gchar *) "ackConnect", + (GDBusArgInfo **) &_audiomanager_routinginterface_method_info_ack_connect_IN_ARG_pointers, + NULL, + NULL + }, + "handle-ack-connect", + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_routinginterface_method_info_ack_disconnect_IN_ARG_handle = +{ + { + -1, + (gchar *) "handle", + (gchar *) "q", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_routinginterface_method_info_ack_disconnect_IN_ARG_connectionID = +{ + { + -1, + (gchar *) "connectionID", + (gchar *) "q", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_routinginterface_method_info_ack_disconnect_IN_ARG_error = +{ + { + -1, + (gchar *) "error", + (gchar *) "q", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _audiomanager_routinginterface_method_info_ack_disconnect_IN_ARG_pointers[] = +{ + &_audiomanager_routinginterface_method_info_ack_disconnect_IN_ARG_handle, + &_audiomanager_routinginterface_method_info_ack_disconnect_IN_ARG_connectionID, + &_audiomanager_routinginterface_method_info_ack_disconnect_IN_ARG_error, + NULL +}; + +static const _ExtendedGDBusMethodInfo _audiomanager_routinginterface_method_info_ack_disconnect = +{ + { + -1, + (gchar *) "ackDisconnect", + (GDBusArgInfo **) &_audiomanager_routinginterface_method_info_ack_disconnect_IN_ARG_pointers, + NULL, + NULL + }, + "handle-ack-disconnect", + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_routinginterface_method_info_ack_set_source_state_IN_ARG_handle = +{ + { + -1, + (gchar *) "handle", + (gchar *) "q", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_routinginterface_method_info_ack_set_source_state_IN_ARG_error = +{ + { + -1, + (gchar *) "error", + (gchar *) "q", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _audiomanager_routinginterface_method_info_ack_set_source_state_IN_ARG_pointers[] = +{ + &_audiomanager_routinginterface_method_info_ack_set_source_state_IN_ARG_handle, + &_audiomanager_routinginterface_method_info_ack_set_source_state_IN_ARG_error, + NULL +}; + +static const _ExtendedGDBusMethodInfo _audiomanager_routinginterface_method_info_ack_set_source_state = +{ + { + -1, + (gchar *) "ackSetSourceState", + (GDBusArgInfo **) &_audiomanager_routinginterface_method_info_ack_set_source_state_IN_ARG_pointers, + NULL, + NULL + }, + "handle-ack-set-source-state", + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_routinginterface_method_info_ack_set_sink_volume_IN_ARG_handle = +{ + { + -1, + (gchar *) "handle", + (gchar *) "q", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_routinginterface_method_info_ack_set_sink_volume_IN_ARG_volume = +{ + { + -1, + (gchar *) "volume", + (gchar *) "n", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_routinginterface_method_info_ack_set_sink_volume_IN_ARG_error = +{ + { + -1, + (gchar *) "error", + (gchar *) "q", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _audiomanager_routinginterface_method_info_ack_set_sink_volume_IN_ARG_pointers[] = +{ + &_audiomanager_routinginterface_method_info_ack_set_sink_volume_IN_ARG_handle, + &_audiomanager_routinginterface_method_info_ack_set_sink_volume_IN_ARG_volume, + &_audiomanager_routinginterface_method_info_ack_set_sink_volume_IN_ARG_error, + NULL +}; + +static const _ExtendedGDBusMethodInfo _audiomanager_routinginterface_method_info_ack_set_sink_volume = +{ + { + -1, + (gchar *) "ackSetSinkVolume", + (GDBusArgInfo **) &_audiomanager_routinginterface_method_info_ack_set_sink_volume_IN_ARG_pointers, + NULL, + NULL + }, + "handle-ack-set-sink-volume", + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_routinginterface_method_info_register_sink_IN_ARG_sinkData = +{ + { + -1, + (gchar *) "sinkData", + (gchar *) "(qsqinb(ii)nna(in)aia(in)a(iin)a(iin))", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _audiomanager_routinginterface_method_info_register_sink_IN_ARG_pointers[] = +{ + &_audiomanager_routinginterface_method_info_register_sink_IN_ARG_sinkData, + NULL +}; + +static const _ExtendedGDBusArgInfo _audiomanager_routinginterface_method_info_register_sink_OUT_ARG_sinkID = +{ + { + -1, + (gchar *) "sinkID", + (gchar *) "q", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_routinginterface_method_info_register_sink_OUT_ARG_error = +{ + { + -1, + (gchar *) "error", + (gchar *) "q", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _audiomanager_routinginterface_method_info_register_sink_OUT_ARG_pointers[] = +{ + &_audiomanager_routinginterface_method_info_register_sink_OUT_ARG_sinkID, + &_audiomanager_routinginterface_method_info_register_sink_OUT_ARG_error, + NULL +}; + +static const _ExtendedGDBusMethodInfo _audiomanager_routinginterface_method_info_register_sink = +{ + { + -1, + (gchar *) "registerSink", + (GDBusArgInfo **) &_audiomanager_routinginterface_method_info_register_sink_IN_ARG_pointers, + (GDBusArgInfo **) &_audiomanager_routinginterface_method_info_register_sink_OUT_ARG_pointers, + NULL + }, + "handle-register-sink", + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_routinginterface_method_info_deregister_sink_IN_ARG_sinkID = +{ + { + -1, + (gchar *) "sinkID", + (gchar *) "q", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _audiomanager_routinginterface_method_info_deregister_sink_IN_ARG_pointers[] = +{ + &_audiomanager_routinginterface_method_info_deregister_sink_IN_ARG_sinkID, + NULL +}; + +static const _ExtendedGDBusArgInfo _audiomanager_routinginterface_method_info_deregister_sink_OUT_ARG_error = +{ + { + -1, + (gchar *) "error", + (gchar *) "i", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _audiomanager_routinginterface_method_info_deregister_sink_OUT_ARG_pointers[] = +{ + &_audiomanager_routinginterface_method_info_deregister_sink_OUT_ARG_error, + NULL +}; + +static const _ExtendedGDBusMethodInfo _audiomanager_routinginterface_method_info_deregister_sink = +{ + { + -1, + (gchar *) "deregisterSink", + (GDBusArgInfo **) &_audiomanager_routinginterface_method_info_deregister_sink_IN_ARG_pointers, + (GDBusArgInfo **) &_audiomanager_routinginterface_method_info_deregister_sink_OUT_ARG_pointers, + NULL + }, + "handle-deregister-sink", + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_routinginterface_method_info_register_source_IN_ARG_sourceData = +{ + { + -1, + (gchar *) "sourceData", + (gchar *) "(qqsqinb(ii)qa(in)aia(in)a(iin)a(iin))", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _audiomanager_routinginterface_method_info_register_source_IN_ARG_pointers[] = +{ + &_audiomanager_routinginterface_method_info_register_source_IN_ARG_sourceData, + NULL +}; + +static const _ExtendedGDBusArgInfo _audiomanager_routinginterface_method_info_register_source_OUT_ARG_sourceID = +{ + { + -1, + (gchar *) "sourceID", + (gchar *) "q", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_routinginterface_method_info_register_source_OUT_ARG_error = +{ + { + -1, + (gchar *) "error", + (gchar *) "q", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _audiomanager_routinginterface_method_info_register_source_OUT_ARG_pointers[] = +{ + &_audiomanager_routinginterface_method_info_register_source_OUT_ARG_sourceID, + &_audiomanager_routinginterface_method_info_register_source_OUT_ARG_error, + NULL +}; + +static const _ExtendedGDBusMethodInfo _audiomanager_routinginterface_method_info_register_source = +{ + { + -1, + (gchar *) "registerSource", + (GDBusArgInfo **) &_audiomanager_routinginterface_method_info_register_source_IN_ARG_pointers, + (GDBusArgInfo **) &_audiomanager_routinginterface_method_info_register_source_OUT_ARG_pointers, + NULL + }, + "handle-register-source", + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_routinginterface_method_info_deregister_source_IN_ARG_sourceID = +{ + { + -1, + (gchar *) "sourceID", + (gchar *) "q", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _audiomanager_routinginterface_method_info_deregister_source_IN_ARG_pointers[] = +{ + &_audiomanager_routinginterface_method_info_deregister_source_IN_ARG_sourceID, + NULL +}; + +static const _ExtendedGDBusArgInfo _audiomanager_routinginterface_method_info_deregister_source_OUT_ARG_error = +{ + { + -1, + (gchar *) "error", + (gchar *) "q", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _audiomanager_routinginterface_method_info_deregister_source_OUT_ARG_pointers[] = +{ + &_audiomanager_routinginterface_method_info_deregister_source_OUT_ARG_error, + NULL +}; + +static const _ExtendedGDBusMethodInfo _audiomanager_routinginterface_method_info_deregister_source = +{ + { + -1, + (gchar *) "deregisterSource", + (GDBusArgInfo **) &_audiomanager_routinginterface_method_info_deregister_source_IN_ARG_pointers, + (GDBusArgInfo **) &_audiomanager_routinginterface_method_info_deregister_source_OUT_ARG_pointers, + NULL + }, + "handle-deregister-source", + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_routinginterface_method_info_hook_interrupt_status_change_IN_ARG_sourceID = +{ + { + -1, + (gchar *) "sourceID", + (gchar *) "q", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_routinginterface_method_info_hook_interrupt_status_change_IN_ARG_interruptState = +{ + { + -1, + (gchar *) "interruptState", + (gchar *) "q", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _audiomanager_routinginterface_method_info_hook_interrupt_status_change_IN_ARG_pointers[] = +{ + &_audiomanager_routinginterface_method_info_hook_interrupt_status_change_IN_ARG_sourceID, + &_audiomanager_routinginterface_method_info_hook_interrupt_status_change_IN_ARG_interruptState, + NULL +}; + +static const _ExtendedGDBusMethodInfo _audiomanager_routinginterface_method_info_hook_interrupt_status_change = +{ + { + -1, + (gchar *) "hookInterruptStatusChange", + (GDBusArgInfo **) &_audiomanager_routinginterface_method_info_hook_interrupt_status_change_IN_ARG_pointers, + NULL, + NULL + }, + "handle-hook-interrupt-status-change", + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_routinginterface_method_info_hook_source_availablity_status_change_IN_ARG_sourceID = +{ + { + -1, + (gchar *) "sourceID", + (gchar *) "q", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_routinginterface_method_info_hook_source_availablity_status_change_IN_ARG_availability = +{ + { + -1, + (gchar *) "availability", + (gchar *) "(nn)", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _audiomanager_routinginterface_method_info_hook_source_availablity_status_change_IN_ARG_pointers[] = +{ + &_audiomanager_routinginterface_method_info_hook_source_availablity_status_change_IN_ARG_sourceID, + &_audiomanager_routinginterface_method_info_hook_source_availablity_status_change_IN_ARG_availability, + NULL +}; + +static const _ExtendedGDBusMethodInfo _audiomanager_routinginterface_method_info_hook_source_availablity_status_change = +{ + { + -1, + (gchar *) "hookSourceAvailablityStatusChange", + (GDBusArgInfo **) &_audiomanager_routinginterface_method_info_hook_source_availablity_status_change_IN_ARG_pointers, + NULL, + NULL + }, + "handle-hook-source-availablity-status-change", + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_routinginterface_method_info_confirm_routing_ready_IN_ARG_domainID = +{ + { + -1, + (gchar *) "domainID", + (gchar *) "q", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _audiomanager_routinginterface_method_info_confirm_routing_ready_IN_ARG_pointers[] = +{ + &_audiomanager_routinginterface_method_info_confirm_routing_ready_IN_ARG_domainID, + NULL +}; + +static const _ExtendedGDBusMethodInfo _audiomanager_routinginterface_method_info_confirm_routing_ready = +{ + { + -1, + (gchar *) "confirmRoutingReady", + (GDBusArgInfo **) &_audiomanager_routinginterface_method_info_confirm_routing_ready_IN_ARG_pointers, + NULL, + NULL + }, + "handle-confirm-routing-ready", + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_routinginterface_method_info_confirm_routing_rundown_IN_ARG_domainID = +{ + { + -1, + (gchar *) "domainID", + (gchar *) "q", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _audiomanager_routinginterface_method_info_confirm_routing_rundown_IN_ARG_pointers[] = +{ + &_audiomanager_routinginterface_method_info_confirm_routing_rundown_IN_ARG_domainID, + NULL +}; + +static const _ExtendedGDBusMethodInfo _audiomanager_routinginterface_method_info_confirm_routing_rundown = +{ + { + -1, + (gchar *) "confirmRoutingRundown", + (GDBusArgInfo **) &_audiomanager_routinginterface_method_info_confirm_routing_rundown_IN_ARG_pointers, + NULL, + NULL + }, + "handle-confirm-routing-rundown", + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_routinginterface_method_info_ack_set_volumes_IN_ARG_handle = +{ + { + -1, + (gchar *) "handle", + (gchar *) "q", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_routinginterface_method_info_ack_set_volumes_IN_ARG_listvolumes = +{ + { + -1, + (gchar *) "listvolumes", + (gchar *) "a(nqqnq)", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_routinginterface_method_info_ack_set_volumes_IN_ARG_error = +{ + { + -1, + (gchar *) "error", + (gchar *) "q", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _audiomanager_routinginterface_method_info_ack_set_volumes_IN_ARG_pointers[] = +{ + &_audiomanager_routinginterface_method_info_ack_set_volumes_IN_ARG_handle, + &_audiomanager_routinginterface_method_info_ack_set_volumes_IN_ARG_listvolumes, + &_audiomanager_routinginterface_method_info_ack_set_volumes_IN_ARG_error, + NULL +}; + +static const _ExtendedGDBusMethodInfo _audiomanager_routinginterface_method_info_ack_set_volumes = +{ + { + -1, + (gchar *) "ackSetVolumes", + (GDBusArgInfo **) &_audiomanager_routinginterface_method_info_ack_set_volumes_IN_ARG_pointers, + NULL, + NULL + }, + "handle-ack-set-volumes", + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_routinginterface_method_info_ack_sink_notification_configuration_IN_ARG_handle = +{ + { + -1, + (gchar *) "handle", + (gchar *) "q", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_routinginterface_method_info_ack_sink_notification_configuration_IN_ARG_error = +{ + { + -1, + (gchar *) "error", + (gchar *) "q", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _audiomanager_routinginterface_method_info_ack_sink_notification_configuration_IN_ARG_pointers[] = +{ + &_audiomanager_routinginterface_method_info_ack_sink_notification_configuration_IN_ARG_handle, + &_audiomanager_routinginterface_method_info_ack_sink_notification_configuration_IN_ARG_error, + NULL +}; + +static const _ExtendedGDBusMethodInfo _audiomanager_routinginterface_method_info_ack_sink_notification_configuration = +{ + { + -1, + (gchar *) "ackSinkNotificationConfiguration", + (GDBusArgInfo **) &_audiomanager_routinginterface_method_info_ack_sink_notification_configuration_IN_ARG_pointers, + NULL, + NULL + }, + "handle-ack-sink-notification-configuration", + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_routinginterface_method_info_ack_source_notification_configuration_IN_ARG_handle = +{ + { + -1, + (gchar *) "handle", + (gchar *) "q", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_routinginterface_method_info_ack_source_notification_configuration_IN_ARG_error = +{ + { + -1, + (gchar *) "error", + (gchar *) "q", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _audiomanager_routinginterface_method_info_ack_source_notification_configuration_IN_ARG_pointers[] = +{ + &_audiomanager_routinginterface_method_info_ack_source_notification_configuration_IN_ARG_handle, + &_audiomanager_routinginterface_method_info_ack_source_notification_configuration_IN_ARG_error, + NULL +}; + +static const _ExtendedGDBusMethodInfo _audiomanager_routinginterface_method_info_ack_source_notification_configuration = +{ + { + -1, + (gchar *) "ackSourceNotificationConfiguration", + (GDBusArgInfo **) &_audiomanager_routinginterface_method_info_ack_source_notification_configuration_IN_ARG_pointers, + NULL, + NULL + }, + "handle-ack-source-notification-configuration", + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_routinginterface_method_info_register_domain_IN_ARG_domaindata = +{ + { + -1, + (gchar *) "domaindata", + (gchar *) "(qsssbbn)", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_routinginterface_method_info_register_domain_IN_ARG_returnBusname = +{ + { + -1, + (gchar *) "returnBusname", + (gchar *) "s", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_routinginterface_method_info_register_domain_IN_ARG_returnPath = +{ + { + -1, + (gchar *) "returnPath", + (gchar *) "s", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_routinginterface_method_info_register_domain_IN_ARG_returnInterface = +{ + { + -1, + (gchar *) "returnInterface", + (gchar *) "s", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _audiomanager_routinginterface_method_info_register_domain_IN_ARG_pointers[] = +{ + &_audiomanager_routinginterface_method_info_register_domain_IN_ARG_domaindata, + &_audiomanager_routinginterface_method_info_register_domain_IN_ARG_returnBusname, + &_audiomanager_routinginterface_method_info_register_domain_IN_ARG_returnPath, + &_audiomanager_routinginterface_method_info_register_domain_IN_ARG_returnInterface, + NULL +}; + +static const _ExtendedGDBusArgInfo _audiomanager_routinginterface_method_info_register_domain_OUT_ARG_domainid = +{ + { + -1, + (gchar *) "domainid", + (gchar *) "q", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_routinginterface_method_info_register_domain_OUT_ARG_error = +{ + { + -1, + (gchar *) "error", + (gchar *) "q", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _audiomanager_routinginterface_method_info_register_domain_OUT_ARG_pointers[] = +{ + &_audiomanager_routinginterface_method_info_register_domain_OUT_ARG_domainid, + &_audiomanager_routinginterface_method_info_register_domain_OUT_ARG_error, + NULL +}; + +static const _ExtendedGDBusMethodInfo _audiomanager_routinginterface_method_info_register_domain = +{ + { + -1, + (gchar *) "registerDomain", + (GDBusArgInfo **) &_audiomanager_routinginterface_method_info_register_domain_IN_ARG_pointers, + (GDBusArgInfo **) &_audiomanager_routinginterface_method_info_register_domain_OUT_ARG_pointers, + NULL + }, + "handle-register-domain", + FALSE +}; + +static const _ExtendedGDBusMethodInfo * const _audiomanager_routinginterface_method_info_pointers[] = +{ + &_audiomanager_routinginterface_method_info_ack_connect, + &_audiomanager_routinginterface_method_info_ack_disconnect, + &_audiomanager_routinginterface_method_info_ack_set_source_state, + &_audiomanager_routinginterface_method_info_ack_set_sink_volume, + &_audiomanager_routinginterface_method_info_register_sink, + &_audiomanager_routinginterface_method_info_deregister_sink, + &_audiomanager_routinginterface_method_info_register_source, + &_audiomanager_routinginterface_method_info_deregister_source, + &_audiomanager_routinginterface_method_info_hook_interrupt_status_change, + &_audiomanager_routinginterface_method_info_hook_source_availablity_status_change, + &_audiomanager_routinginterface_method_info_confirm_routing_ready, + &_audiomanager_routinginterface_method_info_confirm_routing_rundown, + &_audiomanager_routinginterface_method_info_ack_set_volumes, + &_audiomanager_routinginterface_method_info_ack_sink_notification_configuration, + &_audiomanager_routinginterface_method_info_ack_source_notification_configuration, + &_audiomanager_routinginterface_method_info_register_domain, + NULL +}; + +static const _ExtendedGDBusSignalInfo _audiomanager_routinginterface_signal_info_set_routing_ready = +{ + { + -1, + (gchar *) "setRoutingReady", + NULL, + NULL + }, + "set-routing-ready" +}; + +static const _ExtendedGDBusSignalInfo _audiomanager_routinginterface_signal_info_set_routing_rundown = +{ + { + -1, + (gchar *) "setRoutingRundown", + NULL, + NULL + }, + "set-routing-rundown" +}; + +static const _ExtendedGDBusSignalInfo * const _audiomanager_routinginterface_signal_info_pointers[] = +{ + &_audiomanager_routinginterface_signal_info_set_routing_ready, + &_audiomanager_routinginterface_signal_info_set_routing_rundown, + NULL +}; + +static const _ExtendedGDBusInterfaceInfo _audiomanager_routinginterface_interface_info = +{ + { + -1, + (gchar *) "org.genivi.audiomanager.routinginterface", + (GDBusMethodInfo **) &_audiomanager_routinginterface_method_info_pointers, + (GDBusSignalInfo **) &_audiomanager_routinginterface_signal_info_pointers, + NULL, + NULL + }, + "audiomanager-routinginterface", +}; + + +/** + * audiomanager_routinginterface_interface_info: + * + * Gets a machine-readable description of the org.genivi.audiomanager.routinginterface D-Bus interface. + * + * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free. + */ +GDBusInterfaceInfo * +audiomanager_routinginterface_interface_info (void) +{ + return (GDBusInterfaceInfo *) &_audiomanager_routinginterface_interface_info.parent_struct; +} + +/** + * audiomanager_routinginterface_override_properties: + * @klass: The class structure for a #GObject-derived class. + * @property_id_begin: The property id to assign to the first overridden property. + * + * Overrides all #GObject properties in the #AudiomanagerRoutinginterface interface for a concrete class. + * The properties are overridden in the order they are defined. + * + * Returns: The last property id. + */ +guint +audiomanager_routinginterface_override_properties (GObjectClass *klass, guint property_id_begin) +{ + return property_id_begin - 1; +} + + + +/** + * AudiomanagerRoutinginterface: + * + * Abstract interface type for the D-Bus interface org.genivi.audiomanager.routinginterface. + */ + +/** + * AudiomanagerRoutinginterfaceIface: + * @parent_iface: The parent interface. + * @handle_ack_connect: Handler for the #AudiomanagerRoutinginterface::handle-ack-connect signal. + * @handle_ack_disconnect: Handler for the #AudiomanagerRoutinginterface::handle-ack-disconnect signal. + * @handle_ack_set_sink_volume: Handler for the #AudiomanagerRoutinginterface::handle-ack-set-sink-volume signal. + * @handle_ack_set_source_state: Handler for the #AudiomanagerRoutinginterface::handle-ack-set-source-state signal. + * @handle_ack_set_volumes: Handler for the #AudiomanagerRoutinginterface::handle-ack-set-volumes signal. + * @handle_ack_sink_notification_configuration: Handler for the #AudiomanagerRoutinginterface::handle-ack-sink-notification-configuration signal. + * @handle_ack_source_notification_configuration: Handler for the #AudiomanagerRoutinginterface::handle-ack-source-notification-configuration signal. + * @handle_confirm_routing_ready: Handler for the #AudiomanagerRoutinginterface::handle-confirm-routing-ready signal. + * @handle_confirm_routing_rundown: Handler for the #AudiomanagerRoutinginterface::handle-confirm-routing-rundown signal. + * @handle_deregister_sink: Handler for the #AudiomanagerRoutinginterface::handle-deregister-sink signal. + * @handle_deregister_source: Handler for the #AudiomanagerRoutinginterface::handle-deregister-source signal. + * @handle_hook_interrupt_status_change: Handler for the #AudiomanagerRoutinginterface::handle-hook-interrupt-status-change signal. + * @handle_hook_source_availablity_status_change: Handler for the #AudiomanagerRoutinginterface::handle-hook-source-availablity-status-change signal. + * @handle_register_domain: Handler for the #AudiomanagerRoutinginterface::handle-register-domain signal. + * @handle_register_sink: Handler for the #AudiomanagerRoutinginterface::handle-register-sink signal. + * @handle_register_source: Handler for the #AudiomanagerRoutinginterface::handle-register-source signal. + * @set_routing_ready: Handler for the #AudiomanagerRoutinginterface::set-routing-ready signal. + * @set_routing_rundown: Handler for the #AudiomanagerRoutinginterface::set-routing-rundown signal. + * + * Virtual table for the D-Bus interface org.genivi.audiomanager.routinginterface. + */ + +typedef AudiomanagerRoutinginterfaceIface AudiomanagerRoutinginterfaceInterface; +G_DEFINE_INTERFACE (AudiomanagerRoutinginterface, audiomanager_routinginterface, G_TYPE_OBJECT); + +static void +audiomanager_routinginterface_default_init (AudiomanagerRoutinginterfaceIface *iface) +{ + /* GObject signals for incoming D-Bus method calls: */ + /** + * AudiomanagerRoutinginterface::handle-ack-connect: + * @object: A #AudiomanagerRoutinginterface. + * @invocation: A #GDBusMethodInvocation. + * @arg_handle: Argument passed by remote caller. + * @arg_connectionID: Argument passed by remote caller. + * @arg_error: Argument passed by remote caller. + * + * Signal emitted when a remote caller is invoking the ackConnect() D-Bus method. + * + * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call audiomanager_routinginterface_complete_ack_connect() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-ack-connect", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AudiomanagerRoutinginterfaceIface, handle_ack_connect), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 4, + G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT); + + /** + * AudiomanagerRoutinginterface::handle-ack-disconnect: + * @object: A #AudiomanagerRoutinginterface. + * @invocation: A #GDBusMethodInvocation. + * @arg_handle: Argument passed by remote caller. + * @arg_connectionID: Argument passed by remote caller. + * @arg_error: Argument passed by remote caller. + * + * Signal emitted when a remote caller is invoking the ackDisconnect() D-Bus method. + * + * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call audiomanager_routinginterface_complete_ack_disconnect() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-ack-disconnect", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AudiomanagerRoutinginterfaceIface, handle_ack_disconnect), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 4, + G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT); + + /** + * AudiomanagerRoutinginterface::handle-ack-set-source-state: + * @object: A #AudiomanagerRoutinginterface. + * @invocation: A #GDBusMethodInvocation. + * @arg_handle: Argument passed by remote caller. + * @arg_error: Argument passed by remote caller. + * + * Signal emitted when a remote caller is invoking the ackSetSourceState() D-Bus method. + * + * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call audiomanager_routinginterface_complete_ack_set_source_state() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-ack-set-source-state", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AudiomanagerRoutinginterfaceIface, handle_ack_set_source_state), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 3, + G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UINT, G_TYPE_UINT); + + /** + * AudiomanagerRoutinginterface::handle-ack-set-sink-volume: + * @object: A #AudiomanagerRoutinginterface. + * @invocation: A #GDBusMethodInvocation. + * @arg_handle: Argument passed by remote caller. + * @arg_volume: Argument passed by remote caller. + * @arg_error: Argument passed by remote caller. + * + * Signal emitted when a remote caller is invoking the ackSetSinkVolume() D-Bus method. + * + * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call audiomanager_routinginterface_complete_ack_set_sink_volume() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-ack-set-sink-volume", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AudiomanagerRoutinginterfaceIface, handle_ack_set_sink_volume), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 4, + G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UINT, G_TYPE_INT, G_TYPE_UINT); + + /** + * AudiomanagerRoutinginterface::handle-register-sink: + * @object: A #AudiomanagerRoutinginterface. + * @invocation: A #GDBusMethodInvocation. + * @arg_sinkData: Argument passed by remote caller. + * + * Signal emitted when a remote caller is invoking the registerSink() D-Bus method. + * + * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call audiomanager_routinginterface_complete_register_sink() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-register-sink", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AudiomanagerRoutinginterfaceIface, handle_register_sink), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 2, + G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT); + + /** + * AudiomanagerRoutinginterface::handle-deregister-sink: + * @object: A #AudiomanagerRoutinginterface. + * @invocation: A #GDBusMethodInvocation. + * @arg_sinkID: Argument passed by remote caller. + * + * Signal emitted when a remote caller is invoking the deregisterSink() D-Bus method. + * + * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call audiomanager_routinginterface_complete_deregister_sink() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-deregister-sink", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AudiomanagerRoutinginterfaceIface, handle_deregister_sink), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 2, + G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UINT); + + /** + * AudiomanagerRoutinginterface::handle-register-source: + * @object: A #AudiomanagerRoutinginterface. + * @invocation: A #GDBusMethodInvocation. + * @arg_sourceData: Argument passed by remote caller. + * + * Signal emitted when a remote caller is invoking the registerSource() D-Bus method. + * + * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call audiomanager_routinginterface_complete_register_source() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-register-source", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AudiomanagerRoutinginterfaceIface, handle_register_source), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 2, + G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT); + + /** + * AudiomanagerRoutinginterface::handle-deregister-source: + * @object: A #AudiomanagerRoutinginterface. + * @invocation: A #GDBusMethodInvocation. + * @arg_sourceID: Argument passed by remote caller. + * + * Signal emitted when a remote caller is invoking the deregisterSource() D-Bus method. + * + * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call audiomanager_routinginterface_complete_deregister_source() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-deregister-source", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AudiomanagerRoutinginterfaceIface, handle_deregister_source), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 2, + G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UINT); + + /** + * AudiomanagerRoutinginterface::handle-hook-interrupt-status-change: + * @object: A #AudiomanagerRoutinginterface. + * @invocation: A #GDBusMethodInvocation. + * @arg_sourceID: Argument passed by remote caller. + * @arg_interruptState: Argument passed by remote caller. + * + * Signal emitted when a remote caller is invoking the hookInterruptStatusChange() D-Bus method. + * + * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call audiomanager_routinginterface_complete_hook_interrupt_status_change() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-hook-interrupt-status-change", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AudiomanagerRoutinginterfaceIface, handle_hook_interrupt_status_change), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 3, + G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UINT, G_TYPE_UINT); + + /** + * AudiomanagerRoutinginterface::handle-hook-source-availablity-status-change: + * @object: A #AudiomanagerRoutinginterface. + * @invocation: A #GDBusMethodInvocation. + * @arg_sourceID: Argument passed by remote caller. + * @arg_availability: Argument passed by remote caller. + * + * Signal emitted when a remote caller is invoking the hookSourceAvailablityStatusChange() D-Bus method. + * + * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call audiomanager_routinginterface_complete_hook_source_availablity_status_change() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-hook-source-availablity-status-change", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AudiomanagerRoutinginterfaceIface, handle_hook_source_availablity_status_change), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 3, + G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UINT, G_TYPE_VARIANT); + + /** + * AudiomanagerRoutinginterface::handle-confirm-routing-ready: + * @object: A #AudiomanagerRoutinginterface. + * @invocation: A #GDBusMethodInvocation. + * @arg_domainID: Argument passed by remote caller. + * + * Signal emitted when a remote caller is invoking the confirmRoutingReady() D-Bus method. + * + * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call audiomanager_routinginterface_complete_confirm_routing_ready() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-confirm-routing-ready", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AudiomanagerRoutinginterfaceIface, handle_confirm_routing_ready), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 2, + G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UINT); + + /** + * AudiomanagerRoutinginterface::handle-confirm-routing-rundown: + * @object: A #AudiomanagerRoutinginterface. + * @invocation: A #GDBusMethodInvocation. + * @arg_domainID: Argument passed by remote caller. + * + * Signal emitted when a remote caller is invoking the confirmRoutingRundown() D-Bus method. + * + * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call audiomanager_routinginterface_complete_confirm_routing_rundown() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-confirm-routing-rundown", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AudiomanagerRoutinginterfaceIface, handle_confirm_routing_rundown), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 2, + G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UINT); + + /** + * AudiomanagerRoutinginterface::handle-ack-set-volumes: + * @object: A #AudiomanagerRoutinginterface. + * @invocation: A #GDBusMethodInvocation. + * @arg_handle: Argument passed by remote caller. + * @arg_listvolumes: Argument passed by remote caller. + * @arg_error: Argument passed by remote caller. + * + * Signal emitted when a remote caller is invoking the ackSetVolumes() D-Bus method. + * + * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call audiomanager_routinginterface_complete_ack_set_volumes() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-ack-set-volumes", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AudiomanagerRoutinginterfaceIface, handle_ack_set_volumes), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 4, + G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UINT, G_TYPE_VARIANT, G_TYPE_UINT); + + /** + * AudiomanagerRoutinginterface::handle-ack-sink-notification-configuration: + * @object: A #AudiomanagerRoutinginterface. + * @invocation: A #GDBusMethodInvocation. + * @arg_handle: Argument passed by remote caller. + * @arg_error: Argument passed by remote caller. + * + * Signal emitted when a remote caller is invoking the ackSinkNotificationConfiguration() D-Bus method. + * + * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call audiomanager_routinginterface_complete_ack_sink_notification_configuration() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-ack-sink-notification-configuration", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AudiomanagerRoutinginterfaceIface, handle_ack_sink_notification_configuration), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 3, + G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UINT, G_TYPE_UINT); + + /** + * AudiomanagerRoutinginterface::handle-ack-source-notification-configuration: + * @object: A #AudiomanagerRoutinginterface. + * @invocation: A #GDBusMethodInvocation. + * @arg_handle: Argument passed by remote caller. + * @arg_error: Argument passed by remote caller. + * + * Signal emitted when a remote caller is invoking the ackSourceNotificationConfiguration() D-Bus method. + * + * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call audiomanager_routinginterface_complete_ack_source_notification_configuration() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-ack-source-notification-configuration", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AudiomanagerRoutinginterfaceIface, handle_ack_source_notification_configuration), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 3, + G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UINT, G_TYPE_UINT); + + /** + * AudiomanagerRoutinginterface::handle-register-domain: + * @object: A #AudiomanagerRoutinginterface. + * @invocation: A #GDBusMethodInvocation. + * @arg_domaindata: Argument passed by remote caller. + * @arg_returnBusname: Argument passed by remote caller. + * @arg_returnPath: Argument passed by remote caller. + * @arg_returnInterface: Argument passed by remote caller. + * + * Signal emitted when a remote caller is invoking the registerDomain() D-Bus method. + * + * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call audiomanager_routinginterface_complete_register_domain() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-register-domain", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AudiomanagerRoutinginterfaceIface, handle_register_domain), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 5, + G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING); + + /* GObject signals for received D-Bus signals: */ + /** + * AudiomanagerRoutinginterface::set-routing-ready: + * @object: A #AudiomanagerRoutinginterface. + * + * On the client-side, this signal is emitted whenever the D-Bus signal "setRoutingReady" is received. + * + * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal. + */ + g_signal_new ("set-routing-ready", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AudiomanagerRoutinginterfaceIface, set_routing_ready), + NULL, + NULL, + g_cclosure_marshal_generic, + G_TYPE_NONE, + 0); + + /** + * AudiomanagerRoutinginterface::set-routing-rundown: + * @object: A #AudiomanagerRoutinginterface. + * + * On the client-side, this signal is emitted whenever the D-Bus signal "setRoutingRundown" is received. + * + * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal. + */ + g_signal_new ("set-routing-rundown", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AudiomanagerRoutinginterfaceIface, set_routing_rundown), + NULL, + NULL, + g_cclosure_marshal_generic, + G_TYPE_NONE, + 0); + +} + +/** + * audiomanager_routinginterface_emit_set_routing_ready: + * @object: A #AudiomanagerRoutinginterface. + * + * Emits the "setRoutingReady" D-Bus signal. + */ +void +audiomanager_routinginterface_emit_set_routing_ready ( + AudiomanagerRoutinginterface *object) +{ + g_signal_emit_by_name (object, "set-routing-ready"); +} + +/** + * audiomanager_routinginterface_emit_set_routing_rundown: + * @object: A #AudiomanagerRoutinginterface. + * + * Emits the "setRoutingRundown" D-Bus signal. + */ +void +audiomanager_routinginterface_emit_set_routing_rundown ( + AudiomanagerRoutinginterface *object) +{ + g_signal_emit_by_name (object, "set-routing-rundown"); +} + +/** + * audiomanager_routinginterface_call_ack_connect: + * @proxy: A #AudiomanagerRoutinginterfaceProxy. + * @arg_handle: Argument to pass with the method invocation. + * @arg_connectionID: Argument to pass with the method invocation. + * @arg_error: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the ackConnect() D-Bus method on @proxy. + * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. + * You can then call audiomanager_routinginterface_call_ack_connect_finish() to get the result of the operation. + * + * See audiomanager_routinginterface_call_ack_connect_sync() for the synchronous, blocking version of this method. + */ +void +audiomanager_routinginterface_call_ack_connect ( + AudiomanagerRoutinginterface *proxy, + guint16 arg_handle, + guint16 arg_connectionID, + guint16 arg_error, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "ackConnect", + g_variant_new ("(qqq)", + arg_handle, + arg_connectionID, + arg_error), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * audiomanager_routinginterface_call_ack_connect_finish: + * @proxy: A #AudiomanagerRoutinginterfaceProxy. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to audiomanager_routinginterface_call_ack_connect(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with audiomanager_routinginterface_call_ack_connect(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +audiomanager_routinginterface_call_ack_connect_finish ( + AudiomanagerRoutinginterface *proxy, + GAsyncResult *res, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "()"); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * audiomanager_routinginterface_call_ack_connect_sync: + * @proxy: A #AudiomanagerRoutinginterfaceProxy. + * @arg_handle: Argument to pass with the method invocation. + * @arg_connectionID: Argument to pass with the method invocation. + * @arg_error: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the ackConnect() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See audiomanager_routinginterface_call_ack_connect() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +audiomanager_routinginterface_call_ack_connect_sync ( + AudiomanagerRoutinginterface *proxy, + guint16 arg_handle, + guint16 arg_connectionID, + guint16 arg_error, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "ackConnect", + g_variant_new ("(qqq)", + arg_handle, + arg_connectionID, + arg_error), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "()"); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * audiomanager_routinginterface_call_ack_disconnect: + * @proxy: A #AudiomanagerRoutinginterfaceProxy. + * @arg_handle: Argument to pass with the method invocation. + * @arg_connectionID: Argument to pass with the method invocation. + * @arg_error: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the ackDisconnect() D-Bus method on @proxy. + * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. + * You can then call audiomanager_routinginterface_call_ack_disconnect_finish() to get the result of the operation. + * + * See audiomanager_routinginterface_call_ack_disconnect_sync() for the synchronous, blocking version of this method. + */ +void +audiomanager_routinginterface_call_ack_disconnect ( + AudiomanagerRoutinginterface *proxy, + guint16 arg_handle, + guint16 arg_connectionID, + guint16 arg_error, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "ackDisconnect", + g_variant_new ("(qqq)", + arg_handle, + arg_connectionID, + arg_error), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * audiomanager_routinginterface_call_ack_disconnect_finish: + * @proxy: A #AudiomanagerRoutinginterfaceProxy. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to audiomanager_routinginterface_call_ack_disconnect(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with audiomanager_routinginterface_call_ack_disconnect(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +audiomanager_routinginterface_call_ack_disconnect_finish ( + AudiomanagerRoutinginterface *proxy, + GAsyncResult *res, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "()"); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * audiomanager_routinginterface_call_ack_disconnect_sync: + * @proxy: A #AudiomanagerRoutinginterfaceProxy. + * @arg_handle: Argument to pass with the method invocation. + * @arg_connectionID: Argument to pass with the method invocation. + * @arg_error: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the ackDisconnect() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See audiomanager_routinginterface_call_ack_disconnect() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +audiomanager_routinginterface_call_ack_disconnect_sync ( + AudiomanagerRoutinginterface *proxy, + guint16 arg_handle, + guint16 arg_connectionID, + guint16 arg_error, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "ackDisconnect", + g_variant_new ("(qqq)", + arg_handle, + arg_connectionID, + arg_error), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "()"); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * audiomanager_routinginterface_call_ack_set_source_state: + * @proxy: A #AudiomanagerRoutinginterfaceProxy. + * @arg_handle: Argument to pass with the method invocation. + * @arg_error: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the ackSetSourceState() D-Bus method on @proxy. + * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. + * You can then call audiomanager_routinginterface_call_ack_set_source_state_finish() to get the result of the operation. + * + * See audiomanager_routinginterface_call_ack_set_source_state_sync() for the synchronous, blocking version of this method. + */ +void +audiomanager_routinginterface_call_ack_set_source_state ( + AudiomanagerRoutinginterface *proxy, + guint16 arg_handle, + guint16 arg_error, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "ackSetSourceState", + g_variant_new ("(qq)", + arg_handle, + arg_error), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * audiomanager_routinginterface_call_ack_set_source_state_finish: + * @proxy: A #AudiomanagerRoutinginterfaceProxy. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to audiomanager_routinginterface_call_ack_set_source_state(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with audiomanager_routinginterface_call_ack_set_source_state(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +audiomanager_routinginterface_call_ack_set_source_state_finish ( + AudiomanagerRoutinginterface *proxy, + GAsyncResult *res, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "()"); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * audiomanager_routinginterface_call_ack_set_source_state_sync: + * @proxy: A #AudiomanagerRoutinginterfaceProxy. + * @arg_handle: Argument to pass with the method invocation. + * @arg_error: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the ackSetSourceState() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See audiomanager_routinginterface_call_ack_set_source_state() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +audiomanager_routinginterface_call_ack_set_source_state_sync ( + AudiomanagerRoutinginterface *proxy, + guint16 arg_handle, + guint16 arg_error, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "ackSetSourceState", + g_variant_new ("(qq)", + arg_handle, + arg_error), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "()"); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * audiomanager_routinginterface_call_ack_set_sink_volume: + * @proxy: A #AudiomanagerRoutinginterfaceProxy. + * @arg_handle: Argument to pass with the method invocation. + * @arg_volume: Argument to pass with the method invocation. + * @arg_error: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the ackSetSinkVolume() D-Bus method on @proxy. + * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. + * You can then call audiomanager_routinginterface_call_ack_set_sink_volume_finish() to get the result of the operation. + * + * See audiomanager_routinginterface_call_ack_set_sink_volume_sync() for the synchronous, blocking version of this method. + */ +void +audiomanager_routinginterface_call_ack_set_sink_volume ( + AudiomanagerRoutinginterface *proxy, + guint16 arg_handle, + gint16 arg_volume, + guint16 arg_error, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "ackSetSinkVolume", + g_variant_new ("(qnq)", + arg_handle, + arg_volume, + arg_error), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * audiomanager_routinginterface_call_ack_set_sink_volume_finish: + * @proxy: A #AudiomanagerRoutinginterfaceProxy. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to audiomanager_routinginterface_call_ack_set_sink_volume(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with audiomanager_routinginterface_call_ack_set_sink_volume(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +audiomanager_routinginterface_call_ack_set_sink_volume_finish ( + AudiomanagerRoutinginterface *proxy, + GAsyncResult *res, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "()"); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * audiomanager_routinginterface_call_ack_set_sink_volume_sync: + * @proxy: A #AudiomanagerRoutinginterfaceProxy. + * @arg_handle: Argument to pass with the method invocation. + * @arg_volume: Argument to pass with the method invocation. + * @arg_error: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the ackSetSinkVolume() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See audiomanager_routinginterface_call_ack_set_sink_volume() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +audiomanager_routinginterface_call_ack_set_sink_volume_sync ( + AudiomanagerRoutinginterface *proxy, + guint16 arg_handle, + gint16 arg_volume, + guint16 arg_error, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "ackSetSinkVolume", + g_variant_new ("(qnq)", + arg_handle, + arg_volume, + arg_error), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "()"); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * audiomanager_routinginterface_call_register_sink: + * @proxy: A #AudiomanagerRoutinginterfaceProxy. + * @arg_sinkData: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the registerSink() D-Bus method on @proxy. + * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. + * You can then call audiomanager_routinginterface_call_register_sink_finish() to get the result of the operation. + * + * See audiomanager_routinginterface_call_register_sink_sync() for the synchronous, blocking version of this method. + */ +void +audiomanager_routinginterface_call_register_sink ( + AudiomanagerRoutinginterface *proxy, + GVariant *arg_sinkData, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "registerSink", + g_variant_new ("(@(qsqinb(ii)nna(in)aia(in)a(iin)a(iin)))", + arg_sinkData), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * audiomanager_routinginterface_call_register_sink_finish: + * @proxy: A #AudiomanagerRoutinginterfaceProxy. + * @out_sinkID: (out): Return location for return parameter or %NULL to ignore. + * @out_error: (out): Return location for return parameter or %NULL to ignore. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to audiomanager_routinginterface_call_register_sink(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with audiomanager_routinginterface_call_register_sink(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +audiomanager_routinginterface_call_register_sink_finish ( + AudiomanagerRoutinginterface *proxy, + guint16 *out_sinkID, + guint16 *out_error, + GAsyncResult *res, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(qq)", + out_sinkID, + out_error); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * audiomanager_routinginterface_call_register_sink_sync: + * @proxy: A #AudiomanagerRoutinginterfaceProxy. + * @arg_sinkData: Argument to pass with the method invocation. + * @out_sinkID: (out): Return location for return parameter or %NULL to ignore. + * @out_error: (out): Return location for return parameter or %NULL to ignore. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the registerSink() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See audiomanager_routinginterface_call_register_sink() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +audiomanager_routinginterface_call_register_sink_sync ( + AudiomanagerRoutinginterface *proxy, + GVariant *arg_sinkData, + guint16 *out_sinkID, + guint16 *out_error, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "registerSink", + g_variant_new ("(@(qsqinb(ii)nna(in)aia(in)a(iin)a(iin)))", + arg_sinkData), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(qq)", + out_sinkID, + out_error); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * audiomanager_routinginterface_call_deregister_sink: + * @proxy: A #AudiomanagerRoutinginterfaceProxy. + * @arg_sinkID: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the deregisterSink() D-Bus method on @proxy. + * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. + * You can then call audiomanager_routinginterface_call_deregister_sink_finish() to get the result of the operation. + * + * See audiomanager_routinginterface_call_deregister_sink_sync() for the synchronous, blocking version of this method. + */ +void +audiomanager_routinginterface_call_deregister_sink ( + AudiomanagerRoutinginterface *proxy, + guint16 arg_sinkID, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "deregisterSink", + g_variant_new ("(q)", + arg_sinkID), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * audiomanager_routinginterface_call_deregister_sink_finish: + * @proxy: A #AudiomanagerRoutinginterfaceProxy. + * @out_error: (out): Return location for return parameter or %NULL to ignore. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to audiomanager_routinginterface_call_deregister_sink(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with audiomanager_routinginterface_call_deregister_sink(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +audiomanager_routinginterface_call_deregister_sink_finish ( + AudiomanagerRoutinginterface *proxy, + gint *out_error, + GAsyncResult *res, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(i)", + out_error); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * audiomanager_routinginterface_call_deregister_sink_sync: + * @proxy: A #AudiomanagerRoutinginterfaceProxy. + * @arg_sinkID: Argument to pass with the method invocation. + * @out_error: (out): Return location for return parameter or %NULL to ignore. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the deregisterSink() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See audiomanager_routinginterface_call_deregister_sink() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +audiomanager_routinginterface_call_deregister_sink_sync ( + AudiomanagerRoutinginterface *proxy, + guint16 arg_sinkID, + gint *out_error, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "deregisterSink", + g_variant_new ("(q)", + arg_sinkID), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(i)", + out_error); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * audiomanager_routinginterface_call_register_source: + * @proxy: A #AudiomanagerRoutinginterfaceProxy. + * @arg_sourceData: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the registerSource() D-Bus method on @proxy. + * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. + * You can then call audiomanager_routinginterface_call_register_source_finish() to get the result of the operation. + * + * See audiomanager_routinginterface_call_register_source_sync() for the synchronous, blocking version of this method. + */ +void +audiomanager_routinginterface_call_register_source ( + AudiomanagerRoutinginterface *proxy, + GVariant *arg_sourceData, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "registerSource", + g_variant_new ("(@(qqsqinb(ii)qa(in)aia(in)a(iin)a(iin)))", + arg_sourceData), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * audiomanager_routinginterface_call_register_source_finish: + * @proxy: A #AudiomanagerRoutinginterfaceProxy. + * @out_sourceID: (out): Return location for return parameter or %NULL to ignore. + * @out_error: (out): Return location for return parameter or %NULL to ignore. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to audiomanager_routinginterface_call_register_source(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with audiomanager_routinginterface_call_register_source(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +audiomanager_routinginterface_call_register_source_finish ( + AudiomanagerRoutinginterface *proxy, + guint16 *out_sourceID, + guint16 *out_error, + GAsyncResult *res, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(qq)", + out_sourceID, + out_error); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * audiomanager_routinginterface_call_register_source_sync: + * @proxy: A #AudiomanagerRoutinginterfaceProxy. + * @arg_sourceData: Argument to pass with the method invocation. + * @out_sourceID: (out): Return location for return parameter or %NULL to ignore. + * @out_error: (out): Return location for return parameter or %NULL to ignore. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the registerSource() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See audiomanager_routinginterface_call_register_source() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +audiomanager_routinginterface_call_register_source_sync ( + AudiomanagerRoutinginterface *proxy, + GVariant *arg_sourceData, + guint16 *out_sourceID, + guint16 *out_error, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "registerSource", + g_variant_new ("(@(qqsqinb(ii)qa(in)aia(in)a(iin)a(iin)))", + arg_sourceData), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(qq)", + out_sourceID, + out_error); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * audiomanager_routinginterface_call_deregister_source: + * @proxy: A #AudiomanagerRoutinginterfaceProxy. + * @arg_sourceID: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the deregisterSource() D-Bus method on @proxy. + * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. + * You can then call audiomanager_routinginterface_call_deregister_source_finish() to get the result of the operation. + * + * See audiomanager_routinginterface_call_deregister_source_sync() for the synchronous, blocking version of this method. + */ +void +audiomanager_routinginterface_call_deregister_source ( + AudiomanagerRoutinginterface *proxy, + guint16 arg_sourceID, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "deregisterSource", + g_variant_new ("(q)", + arg_sourceID), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * audiomanager_routinginterface_call_deregister_source_finish: + * @proxy: A #AudiomanagerRoutinginterfaceProxy. + * @out_error: (out): Return location for return parameter or %NULL to ignore. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to audiomanager_routinginterface_call_deregister_source(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with audiomanager_routinginterface_call_deregister_source(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +audiomanager_routinginterface_call_deregister_source_finish ( + AudiomanagerRoutinginterface *proxy, + guint16 *out_error, + GAsyncResult *res, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(q)", + out_error); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * audiomanager_routinginterface_call_deregister_source_sync: + * @proxy: A #AudiomanagerRoutinginterfaceProxy. + * @arg_sourceID: Argument to pass with the method invocation. + * @out_error: (out): Return location for return parameter or %NULL to ignore. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the deregisterSource() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See audiomanager_routinginterface_call_deregister_source() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +audiomanager_routinginterface_call_deregister_source_sync ( + AudiomanagerRoutinginterface *proxy, + guint16 arg_sourceID, + guint16 *out_error, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "deregisterSource", + g_variant_new ("(q)", + arg_sourceID), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(q)", + out_error); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * audiomanager_routinginterface_call_hook_interrupt_status_change: + * @proxy: A #AudiomanagerRoutinginterfaceProxy. + * @arg_sourceID: Argument to pass with the method invocation. + * @arg_interruptState: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the hookInterruptStatusChange() D-Bus method on @proxy. + * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. + * You can then call audiomanager_routinginterface_call_hook_interrupt_status_change_finish() to get the result of the operation. + * + * See audiomanager_routinginterface_call_hook_interrupt_status_change_sync() for the synchronous, blocking version of this method. + */ +void +audiomanager_routinginterface_call_hook_interrupt_status_change ( + AudiomanagerRoutinginterface *proxy, + guint16 arg_sourceID, + guint16 arg_interruptState, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "hookInterruptStatusChange", + g_variant_new ("(qq)", + arg_sourceID, + arg_interruptState), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * audiomanager_routinginterface_call_hook_interrupt_status_change_finish: + * @proxy: A #AudiomanagerRoutinginterfaceProxy. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to audiomanager_routinginterface_call_hook_interrupt_status_change(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with audiomanager_routinginterface_call_hook_interrupt_status_change(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +audiomanager_routinginterface_call_hook_interrupt_status_change_finish ( + AudiomanagerRoutinginterface *proxy, + GAsyncResult *res, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "()"); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * audiomanager_routinginterface_call_hook_interrupt_status_change_sync: + * @proxy: A #AudiomanagerRoutinginterfaceProxy. + * @arg_sourceID: Argument to pass with the method invocation. + * @arg_interruptState: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the hookInterruptStatusChange() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See audiomanager_routinginterface_call_hook_interrupt_status_change() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +audiomanager_routinginterface_call_hook_interrupt_status_change_sync ( + AudiomanagerRoutinginterface *proxy, + guint16 arg_sourceID, + guint16 arg_interruptState, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "hookInterruptStatusChange", + g_variant_new ("(qq)", + arg_sourceID, + arg_interruptState), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "()"); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * audiomanager_routinginterface_call_hook_source_availablity_status_change: + * @proxy: A #AudiomanagerRoutinginterfaceProxy. + * @arg_sourceID: Argument to pass with the method invocation. + * @arg_availability: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the hookSourceAvailablityStatusChange() D-Bus method on @proxy. + * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. + * You can then call audiomanager_routinginterface_call_hook_source_availablity_status_change_finish() to get the result of the operation. + * + * See audiomanager_routinginterface_call_hook_source_availablity_status_change_sync() for the synchronous, blocking version of this method. + */ +void +audiomanager_routinginterface_call_hook_source_availablity_status_change ( + AudiomanagerRoutinginterface *proxy, + guint16 arg_sourceID, + GVariant *arg_availability, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "hookSourceAvailablityStatusChange", + g_variant_new ("(q@(nn))", + arg_sourceID, + arg_availability), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * audiomanager_routinginterface_call_hook_source_availablity_status_change_finish: + * @proxy: A #AudiomanagerRoutinginterfaceProxy. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to audiomanager_routinginterface_call_hook_source_availablity_status_change(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with audiomanager_routinginterface_call_hook_source_availablity_status_change(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +audiomanager_routinginterface_call_hook_source_availablity_status_change_finish ( + AudiomanagerRoutinginterface *proxy, + GAsyncResult *res, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "()"); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * audiomanager_routinginterface_call_hook_source_availablity_status_change_sync: + * @proxy: A #AudiomanagerRoutinginterfaceProxy. + * @arg_sourceID: Argument to pass with the method invocation. + * @arg_availability: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the hookSourceAvailablityStatusChange() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See audiomanager_routinginterface_call_hook_source_availablity_status_change() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +audiomanager_routinginterface_call_hook_source_availablity_status_change_sync ( + AudiomanagerRoutinginterface *proxy, + guint16 arg_sourceID, + GVariant *arg_availability, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "hookSourceAvailablityStatusChange", + g_variant_new ("(q@(nn))", + arg_sourceID, + arg_availability), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "()"); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * audiomanager_routinginterface_call_confirm_routing_ready: + * @proxy: A #AudiomanagerRoutinginterfaceProxy. + * @arg_domainID: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the confirmRoutingReady() D-Bus method on @proxy. + * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. + * You can then call audiomanager_routinginterface_call_confirm_routing_ready_finish() to get the result of the operation. + * + * See audiomanager_routinginterface_call_confirm_routing_ready_sync() for the synchronous, blocking version of this method. + */ +void +audiomanager_routinginterface_call_confirm_routing_ready ( + AudiomanagerRoutinginterface *proxy, + guint16 arg_domainID, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "confirmRoutingReady", + g_variant_new ("(q)", + arg_domainID), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * audiomanager_routinginterface_call_confirm_routing_ready_finish: + * @proxy: A #AudiomanagerRoutinginterfaceProxy. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to audiomanager_routinginterface_call_confirm_routing_ready(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with audiomanager_routinginterface_call_confirm_routing_ready(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +audiomanager_routinginterface_call_confirm_routing_ready_finish ( + AudiomanagerRoutinginterface *proxy, + GAsyncResult *res, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "()"); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * audiomanager_routinginterface_call_confirm_routing_ready_sync: + * @proxy: A #AudiomanagerRoutinginterfaceProxy. + * @arg_domainID: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the confirmRoutingReady() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See audiomanager_routinginterface_call_confirm_routing_ready() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +audiomanager_routinginterface_call_confirm_routing_ready_sync ( + AudiomanagerRoutinginterface *proxy, + guint16 arg_domainID, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "confirmRoutingReady", + g_variant_new ("(q)", + arg_domainID), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "()"); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * audiomanager_routinginterface_call_confirm_routing_rundown: + * @proxy: A #AudiomanagerRoutinginterfaceProxy. + * @arg_domainID: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the confirmRoutingRundown() D-Bus method on @proxy. + * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. + * You can then call audiomanager_routinginterface_call_confirm_routing_rundown_finish() to get the result of the operation. + * + * See audiomanager_routinginterface_call_confirm_routing_rundown_sync() for the synchronous, blocking version of this method. + */ +void +audiomanager_routinginterface_call_confirm_routing_rundown ( + AudiomanagerRoutinginterface *proxy, + guint16 arg_domainID, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "confirmRoutingRundown", + g_variant_new ("(q)", + arg_domainID), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * audiomanager_routinginterface_call_confirm_routing_rundown_finish: + * @proxy: A #AudiomanagerRoutinginterfaceProxy. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to audiomanager_routinginterface_call_confirm_routing_rundown(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with audiomanager_routinginterface_call_confirm_routing_rundown(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +audiomanager_routinginterface_call_confirm_routing_rundown_finish ( + AudiomanagerRoutinginterface *proxy, + GAsyncResult *res, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "()"); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * audiomanager_routinginterface_call_confirm_routing_rundown_sync: + * @proxy: A #AudiomanagerRoutinginterfaceProxy. + * @arg_domainID: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the confirmRoutingRundown() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See audiomanager_routinginterface_call_confirm_routing_rundown() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +audiomanager_routinginterface_call_confirm_routing_rundown_sync ( + AudiomanagerRoutinginterface *proxy, + guint16 arg_domainID, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "confirmRoutingRundown", + g_variant_new ("(q)", + arg_domainID), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "()"); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * audiomanager_routinginterface_call_ack_set_volumes: + * @proxy: A #AudiomanagerRoutinginterfaceProxy. + * @arg_handle: Argument to pass with the method invocation. + * @arg_listvolumes: Argument to pass with the method invocation. + * @arg_error: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the ackSetVolumes() D-Bus method on @proxy. + * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. + * You can then call audiomanager_routinginterface_call_ack_set_volumes_finish() to get the result of the operation. + * + * See audiomanager_routinginterface_call_ack_set_volumes_sync() for the synchronous, blocking version of this method. + */ +void +audiomanager_routinginterface_call_ack_set_volumes ( + AudiomanagerRoutinginterface *proxy, + guint16 arg_handle, + GVariant *arg_listvolumes, + guint16 arg_error, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "ackSetVolumes", + g_variant_new ("(q@a(nqqnq)q)", + arg_handle, + arg_listvolumes, + arg_error), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * audiomanager_routinginterface_call_ack_set_volumes_finish: + * @proxy: A #AudiomanagerRoutinginterfaceProxy. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to audiomanager_routinginterface_call_ack_set_volumes(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with audiomanager_routinginterface_call_ack_set_volumes(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +audiomanager_routinginterface_call_ack_set_volumes_finish ( + AudiomanagerRoutinginterface *proxy, + GAsyncResult *res, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "()"); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * audiomanager_routinginterface_call_ack_set_volumes_sync: + * @proxy: A #AudiomanagerRoutinginterfaceProxy. + * @arg_handle: Argument to pass with the method invocation. + * @arg_listvolumes: Argument to pass with the method invocation. + * @arg_error: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the ackSetVolumes() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See audiomanager_routinginterface_call_ack_set_volumes() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +audiomanager_routinginterface_call_ack_set_volumes_sync ( + AudiomanagerRoutinginterface *proxy, + guint16 arg_handle, + GVariant *arg_listvolumes, + guint16 arg_error, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "ackSetVolumes", + g_variant_new ("(q@a(nqqnq)q)", + arg_handle, + arg_listvolumes, + arg_error), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "()"); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * audiomanager_routinginterface_call_ack_sink_notification_configuration: + * @proxy: A #AudiomanagerRoutinginterfaceProxy. + * @arg_handle: Argument to pass with the method invocation. + * @arg_error: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the ackSinkNotificationConfiguration() D-Bus method on @proxy. + * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. + * You can then call audiomanager_routinginterface_call_ack_sink_notification_configuration_finish() to get the result of the operation. + * + * See audiomanager_routinginterface_call_ack_sink_notification_configuration_sync() for the synchronous, blocking version of this method. + */ +void +audiomanager_routinginterface_call_ack_sink_notification_configuration ( + AudiomanagerRoutinginterface *proxy, + guint16 arg_handle, + guint16 arg_error, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "ackSinkNotificationConfiguration", + g_variant_new ("(qq)", + arg_handle, + arg_error), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * audiomanager_routinginterface_call_ack_sink_notification_configuration_finish: + * @proxy: A #AudiomanagerRoutinginterfaceProxy. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to audiomanager_routinginterface_call_ack_sink_notification_configuration(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with audiomanager_routinginterface_call_ack_sink_notification_configuration(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +audiomanager_routinginterface_call_ack_sink_notification_configuration_finish ( + AudiomanagerRoutinginterface *proxy, + GAsyncResult *res, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "()"); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * audiomanager_routinginterface_call_ack_sink_notification_configuration_sync: + * @proxy: A #AudiomanagerRoutinginterfaceProxy. + * @arg_handle: Argument to pass with the method invocation. + * @arg_error: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the ackSinkNotificationConfiguration() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See audiomanager_routinginterface_call_ack_sink_notification_configuration() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +audiomanager_routinginterface_call_ack_sink_notification_configuration_sync ( + AudiomanagerRoutinginterface *proxy, + guint16 arg_handle, + guint16 arg_error, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "ackSinkNotificationConfiguration", + g_variant_new ("(qq)", + arg_handle, + arg_error), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "()"); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * audiomanager_routinginterface_call_ack_source_notification_configuration: + * @proxy: A #AudiomanagerRoutinginterfaceProxy. + * @arg_handle: Argument to pass with the method invocation. + * @arg_error: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the ackSourceNotificationConfiguration() D-Bus method on @proxy. + * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. + * You can then call audiomanager_routinginterface_call_ack_source_notification_configuration_finish() to get the result of the operation. + * + * See audiomanager_routinginterface_call_ack_source_notification_configuration_sync() for the synchronous, blocking version of this method. + */ +void +audiomanager_routinginterface_call_ack_source_notification_configuration ( + AudiomanagerRoutinginterface *proxy, + guint16 arg_handle, + guint16 arg_error, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "ackSourceNotificationConfiguration", + g_variant_new ("(qq)", + arg_handle, + arg_error), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * audiomanager_routinginterface_call_ack_source_notification_configuration_finish: + * @proxy: A #AudiomanagerRoutinginterfaceProxy. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to audiomanager_routinginterface_call_ack_source_notification_configuration(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with audiomanager_routinginterface_call_ack_source_notification_configuration(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +audiomanager_routinginterface_call_ack_source_notification_configuration_finish ( + AudiomanagerRoutinginterface *proxy, + GAsyncResult *res, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "()"); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * audiomanager_routinginterface_call_ack_source_notification_configuration_sync: + * @proxy: A #AudiomanagerRoutinginterfaceProxy. + * @arg_handle: Argument to pass with the method invocation. + * @arg_error: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the ackSourceNotificationConfiguration() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See audiomanager_routinginterface_call_ack_source_notification_configuration() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +audiomanager_routinginterface_call_ack_source_notification_configuration_sync ( + AudiomanagerRoutinginterface *proxy, + guint16 arg_handle, + guint16 arg_error, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "ackSourceNotificationConfiguration", + g_variant_new ("(qq)", + arg_handle, + arg_error), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "()"); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * audiomanager_routinginterface_call_register_domain: + * @proxy: A #AudiomanagerRoutinginterfaceProxy. + * @arg_domaindata: Argument to pass with the method invocation. + * @arg_returnBusname: Argument to pass with the method invocation. + * @arg_returnPath: Argument to pass with the method invocation. + * @arg_returnInterface: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the registerDomain() D-Bus method on @proxy. + * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. + * You can then call audiomanager_routinginterface_call_register_domain_finish() to get the result of the operation. + * + * See audiomanager_routinginterface_call_register_domain_sync() for the synchronous, blocking version of this method. + */ +void +audiomanager_routinginterface_call_register_domain ( + AudiomanagerRoutinginterface *proxy, + GVariant *arg_domaindata, + const gchar *arg_returnBusname, + const gchar *arg_returnPath, + const gchar *arg_returnInterface, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "registerDomain", + g_variant_new ("(@(qsssbbn)sss)", + arg_domaindata, + arg_returnBusname, + arg_returnPath, + arg_returnInterface), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * audiomanager_routinginterface_call_register_domain_finish: + * @proxy: A #AudiomanagerRoutinginterfaceProxy. + * @out_domainid: (out): Return location for return parameter or %NULL to ignore. + * @out_error: (out): Return location for return parameter or %NULL to ignore. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to audiomanager_routinginterface_call_register_domain(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with audiomanager_routinginterface_call_register_domain(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +audiomanager_routinginterface_call_register_domain_finish ( + AudiomanagerRoutinginterface *proxy, + guint16 *out_domainid, + guint16 *out_error, + GAsyncResult *res, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(qq)", + out_domainid, + out_error); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * audiomanager_routinginterface_call_register_domain_sync: + * @proxy: A #AudiomanagerRoutinginterfaceProxy. + * @arg_domaindata: Argument to pass with the method invocation. + * @arg_returnBusname: Argument to pass with the method invocation. + * @arg_returnPath: Argument to pass with the method invocation. + * @arg_returnInterface: Argument to pass with the method invocation. + * @out_domainid: (out): Return location for return parameter or %NULL to ignore. + * @out_error: (out): Return location for return parameter or %NULL to ignore. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the registerDomain() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See audiomanager_routinginterface_call_register_domain() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +audiomanager_routinginterface_call_register_domain_sync ( + AudiomanagerRoutinginterface *proxy, + GVariant *arg_domaindata, + const gchar *arg_returnBusname, + const gchar *arg_returnPath, + const gchar *arg_returnInterface, + guint16 *out_domainid, + guint16 *out_error, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "registerDomain", + g_variant_new ("(@(qsssbbn)sss)", + arg_domaindata, + arg_returnBusname, + arg_returnPath, + arg_returnInterface), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(qq)", + out_domainid, + out_error); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * audiomanager_routinginterface_complete_ack_connect: + * @object: A #AudiomanagerRoutinginterface. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * + * Helper function used in service implementations to finish handling invocations of the ackConnect() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * + * This method will free @invocation, you cannot use it afterwards. + */ +void +audiomanager_routinginterface_complete_ack_connect ( + AudiomanagerRoutinginterface *object, + GDBusMethodInvocation *invocation) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("()")); +} + +/** + * audiomanager_routinginterface_complete_ack_disconnect: + * @object: A #AudiomanagerRoutinginterface. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * + * Helper function used in service implementations to finish handling invocations of the ackDisconnect() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * + * This method will free @invocation, you cannot use it afterwards. + */ +void +audiomanager_routinginterface_complete_ack_disconnect ( + AudiomanagerRoutinginterface *object, + GDBusMethodInvocation *invocation) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("()")); +} + +/** + * audiomanager_routinginterface_complete_ack_set_source_state: + * @object: A #AudiomanagerRoutinginterface. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * + * Helper function used in service implementations to finish handling invocations of the ackSetSourceState() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * + * This method will free @invocation, you cannot use it afterwards. + */ +void +audiomanager_routinginterface_complete_ack_set_source_state ( + AudiomanagerRoutinginterface *object, + GDBusMethodInvocation *invocation) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("()")); +} + +/** + * audiomanager_routinginterface_complete_ack_set_sink_volume: + * @object: A #AudiomanagerRoutinginterface. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * + * Helper function used in service implementations to finish handling invocations of the ackSetSinkVolume() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * + * This method will free @invocation, you cannot use it afterwards. + */ +void +audiomanager_routinginterface_complete_ack_set_sink_volume ( + AudiomanagerRoutinginterface *object, + GDBusMethodInvocation *invocation) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("()")); +} + +/** + * audiomanager_routinginterface_complete_register_sink: + * @object: A #AudiomanagerRoutinginterface. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @sinkID: Parameter to return. + * @error: Parameter to return. + * + * Helper function used in service implementations to finish handling invocations of the registerSink() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * + * This method will free @invocation, you cannot use it afterwards. + */ +void +audiomanager_routinginterface_complete_register_sink ( + AudiomanagerRoutinginterface *object, + GDBusMethodInvocation *invocation, + guint16 sinkID, + guint16 error) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(qq)", + sinkID, + error)); +} + +/** + * audiomanager_routinginterface_complete_deregister_sink: + * @object: A #AudiomanagerRoutinginterface. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @error: Parameter to return. + * + * Helper function used in service implementations to finish handling invocations of the deregisterSink() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * + * This method will free @invocation, you cannot use it afterwards. + */ +void +audiomanager_routinginterface_complete_deregister_sink ( + AudiomanagerRoutinginterface *object, + GDBusMethodInvocation *invocation, + gint error) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(i)", + error)); +} + +/** + * audiomanager_routinginterface_complete_register_source: + * @object: A #AudiomanagerRoutinginterface. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @sourceID: Parameter to return. + * @error: Parameter to return. + * + * Helper function used in service implementations to finish handling invocations of the registerSource() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * + * This method will free @invocation, you cannot use it afterwards. + */ +void +audiomanager_routinginterface_complete_register_source ( + AudiomanagerRoutinginterface *object, + GDBusMethodInvocation *invocation, + guint16 sourceID, + guint16 error) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(qq)", + sourceID, + error)); +} + +/** + * audiomanager_routinginterface_complete_deregister_source: + * @object: A #AudiomanagerRoutinginterface. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @error: Parameter to return. + * + * Helper function used in service implementations to finish handling invocations of the deregisterSource() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * + * This method will free @invocation, you cannot use it afterwards. + */ +void +audiomanager_routinginterface_complete_deregister_source ( + AudiomanagerRoutinginterface *object, + GDBusMethodInvocation *invocation, + guint16 error) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(q)", + error)); +} + +/** + * audiomanager_routinginterface_complete_hook_interrupt_status_change: + * @object: A #AudiomanagerRoutinginterface. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * + * Helper function used in service implementations to finish handling invocations of the hookInterruptStatusChange() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * + * This method will free @invocation, you cannot use it afterwards. + */ +void +audiomanager_routinginterface_complete_hook_interrupt_status_change ( + AudiomanagerRoutinginterface *object, + GDBusMethodInvocation *invocation) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("()")); +} + +/** + * audiomanager_routinginterface_complete_hook_source_availablity_status_change: + * @object: A #AudiomanagerRoutinginterface. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * + * Helper function used in service implementations to finish handling invocations of the hookSourceAvailablityStatusChange() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * + * This method will free @invocation, you cannot use it afterwards. + */ +void +audiomanager_routinginterface_complete_hook_source_availablity_status_change ( + AudiomanagerRoutinginterface *object, + GDBusMethodInvocation *invocation) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("()")); +} + +/** + * audiomanager_routinginterface_complete_confirm_routing_ready: + * @object: A #AudiomanagerRoutinginterface. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * + * Helper function used in service implementations to finish handling invocations of the confirmRoutingReady() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * + * This method will free @invocation, you cannot use it afterwards. + */ +void +audiomanager_routinginterface_complete_confirm_routing_ready ( + AudiomanagerRoutinginterface *object, + GDBusMethodInvocation *invocation) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("()")); +} + +/** + * audiomanager_routinginterface_complete_confirm_routing_rundown: + * @object: A #AudiomanagerRoutinginterface. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * + * Helper function used in service implementations to finish handling invocations of the confirmRoutingRundown() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * + * This method will free @invocation, you cannot use it afterwards. + */ +void +audiomanager_routinginterface_complete_confirm_routing_rundown ( + AudiomanagerRoutinginterface *object, + GDBusMethodInvocation *invocation) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("()")); +} + +/** + * audiomanager_routinginterface_complete_ack_set_volumes: + * @object: A #AudiomanagerRoutinginterface. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * + * Helper function used in service implementations to finish handling invocations of the ackSetVolumes() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * + * This method will free @invocation, you cannot use it afterwards. + */ +void +audiomanager_routinginterface_complete_ack_set_volumes ( + AudiomanagerRoutinginterface *object, + GDBusMethodInvocation *invocation) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("()")); +} + +/** + * audiomanager_routinginterface_complete_ack_sink_notification_configuration: + * @object: A #AudiomanagerRoutinginterface. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * + * Helper function used in service implementations to finish handling invocations of the ackSinkNotificationConfiguration() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * + * This method will free @invocation, you cannot use it afterwards. + */ +void +audiomanager_routinginterface_complete_ack_sink_notification_configuration ( + AudiomanagerRoutinginterface *object, + GDBusMethodInvocation *invocation) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("()")); +} + +/** + * audiomanager_routinginterface_complete_ack_source_notification_configuration: + * @object: A #AudiomanagerRoutinginterface. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * + * Helper function used in service implementations to finish handling invocations of the ackSourceNotificationConfiguration() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * + * This method will free @invocation, you cannot use it afterwards. + */ +void +audiomanager_routinginterface_complete_ack_source_notification_configuration ( + AudiomanagerRoutinginterface *object, + GDBusMethodInvocation *invocation) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("()")); +} + +/** + * audiomanager_routinginterface_complete_register_domain: + * @object: A #AudiomanagerRoutinginterface. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @domainid: Parameter to return. + * @error: Parameter to return. + * + * Helper function used in service implementations to finish handling invocations of the registerDomain() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * + * This method will free @invocation, you cannot use it afterwards. + */ +void +audiomanager_routinginterface_complete_register_domain ( + AudiomanagerRoutinginterface *object, + GDBusMethodInvocation *invocation, + guint16 domainid, + guint16 error) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(qq)", + domainid, + error)); +} + +/* ------------------------------------------------------------------------ */ + +/** + * AudiomanagerRoutinginterfaceProxy: + * + * The #AudiomanagerRoutinginterfaceProxy structure contains only private data and should only be accessed using the provided API. + */ + +/** + * AudiomanagerRoutinginterfaceProxyClass: + * @parent_class: The parent class. + * + * Class structure for #AudiomanagerRoutinginterfaceProxy. + */ + +struct _AudiomanagerRoutinginterfaceProxyPrivate +{ + GData *qdata; +}; + +static void audiomanager_routinginterface_proxy_iface_init (AudiomanagerRoutinginterfaceIface *iface); + +#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 +G_DEFINE_TYPE_WITH_CODE (AudiomanagerRoutinginterfaceProxy, audiomanager_routinginterface_proxy, G_TYPE_DBUS_PROXY, + G_ADD_PRIVATE (AudiomanagerRoutinginterfaceProxy) + G_IMPLEMENT_INTERFACE (TYPE_AUDIOMANAGER_ROUTINGINTERFACE, audiomanager_routinginterface_proxy_iface_init)); + +#else +G_DEFINE_TYPE_WITH_CODE (AudiomanagerRoutinginterfaceProxy, audiomanager_routinginterface_proxy, G_TYPE_DBUS_PROXY, + G_IMPLEMENT_INTERFACE (TYPE_AUDIOMANAGER_ROUTINGINTERFACE, audiomanager_routinginterface_proxy_iface_init)); + +#endif +static void +audiomanager_routinginterface_proxy_finalize (GObject *object) +{ + AudiomanagerRoutinginterfaceProxy *proxy = AUDIOMANAGER_ROUTINGINTERFACE_PROXY (object); + g_datalist_clear (&proxy->priv->qdata); + G_OBJECT_CLASS (audiomanager_routinginterface_proxy_parent_class)->finalize (object); +} + +static void +audiomanager_routinginterface_proxy_get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec G_GNUC_UNUSED) +{ +} + +static void +audiomanager_routinginterface_proxy_set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec G_GNUC_UNUSED) +{ +} + +static void +audiomanager_routinginterface_proxy_g_signal (GDBusProxy *proxy, + const gchar *sender_name G_GNUC_UNUSED, + const gchar *signal_name, + GVariant *parameters) +{ + _ExtendedGDBusSignalInfo *info; + GVariantIter iter; + GVariant *child; + GValue *paramv; + guint num_params; + guint n; + guint signal_id; + info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_audiomanager_routinginterface_interface_info.parent_struct, signal_name); + if (info == NULL) + return; + num_params = g_variant_n_children (parameters); + paramv = g_new0 (GValue, num_params + 1); + g_value_init (¶mv[0], TYPE_AUDIOMANAGER_ROUTINGINTERFACE); + g_value_set_object (¶mv[0], proxy); + g_variant_iter_init (&iter, parameters); + n = 1; + while ((child = g_variant_iter_next_value (&iter)) != NULL) + { + _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1]; + if (arg_info->use_gvariant) + { + g_value_init (¶mv[n], G_TYPE_VARIANT); + g_value_set_variant (¶mv[n], child); + n++; + } + else + g_dbus_gvariant_to_gvalue (child, ¶mv[n++]); + g_variant_unref (child); + } + signal_id = g_signal_lookup (info->signal_name, TYPE_AUDIOMANAGER_ROUTINGINTERFACE); + g_signal_emitv (paramv, signal_id, 0, NULL); + for (n = 0; n < num_params + 1; n++) + g_value_unset (¶mv[n]); + g_free (paramv); +} + +static void +audiomanager_routinginterface_proxy_g_properties_changed (GDBusProxy *_proxy, + GVariant *changed_properties, + const gchar *const *invalidated_properties) +{ + AudiomanagerRoutinginterfaceProxy *proxy = AUDIOMANAGER_ROUTINGINTERFACE_PROXY (_proxy); + guint n; + const gchar *key; + GVariantIter *iter; + _ExtendedGDBusPropertyInfo *info; + g_variant_get (changed_properties, "a{sv}", &iter); + while (g_variant_iter_next (iter, "{&sv}", &key, NULL)) + { + info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_audiomanager_routinginterface_interface_info.parent_struct, key); + g_datalist_remove_data (&proxy->priv->qdata, key); + if (info != NULL) + g_object_notify (G_OBJECT (proxy), info->hyphen_name); + } + g_variant_iter_free (iter); + for (n = 0; invalidated_properties[n] != NULL; n++) + { + info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_audiomanager_routinginterface_interface_info.parent_struct, invalidated_properties[n]); + g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]); + if (info != NULL) + g_object_notify (G_OBJECT (proxy), info->hyphen_name); + } +} + +static void +audiomanager_routinginterface_proxy_init (AudiomanagerRoutinginterfaceProxy *proxy) +{ +#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 + proxy->priv = audiomanager_routinginterface_proxy_get_instance_private (proxy); +#else + proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, TYPE_AUDIOMANAGER_ROUTINGINTERFACE_PROXY, AudiomanagerRoutinginterfaceProxyPrivate); +#endif + + g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), audiomanager_routinginterface_interface_info ()); +} + +static void +audiomanager_routinginterface_proxy_class_init (AudiomanagerRoutinginterfaceProxyClass *klass) +{ + GObjectClass *gobject_class; + GDBusProxyClass *proxy_class; + + gobject_class = G_OBJECT_CLASS (klass); + gobject_class->finalize = audiomanager_routinginterface_proxy_finalize; + gobject_class->get_property = audiomanager_routinginterface_proxy_get_property; + gobject_class->set_property = audiomanager_routinginterface_proxy_set_property; + + proxy_class = G_DBUS_PROXY_CLASS (klass); + proxy_class->g_signal = audiomanager_routinginterface_proxy_g_signal; + proxy_class->g_properties_changed = audiomanager_routinginterface_proxy_g_properties_changed; + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38 + g_type_class_add_private (klass, sizeof (AudiomanagerRoutinginterfaceProxyPrivate)); +#endif +} + +static void +audiomanager_routinginterface_proxy_iface_init (AudiomanagerRoutinginterfaceIface *iface) +{ +} + +/** + * audiomanager_routinginterface_proxy_new: + * @connection: A #GDBusConnection. + * @flags: Flags from the #GDBusProxyFlags enumeration. + * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. + * @object_path: An object path. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied. + * @user_data: User data to pass to @callback. + * + * Asynchronously creates a proxy for the D-Bus interface org.genivi.audiomanager.routinginterface. See g_dbus_proxy_new() for more details. + * + * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. + * You can then call audiomanager_routinginterface_proxy_new_finish() to get the result of the operation. + * + * See audiomanager_routinginterface_proxy_new_sync() for the synchronous, blocking version of this constructor. + */ +void +audiomanager_routinginterface_proxy_new ( + GDBusConnection *connection, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_async_initable_new_async (TYPE_AUDIOMANAGER_ROUTINGINTERFACE_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.genivi.audiomanager.routinginterface", NULL); +} + +/** + * audiomanager_routinginterface_proxy_new_finish: + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to audiomanager_routinginterface_proxy_new(). + * @error: Return location for error or %NULL + * + * Finishes an operation started with audiomanager_routinginterface_proxy_new(). + * + * Returns: (transfer full) (type AudiomanagerRoutinginterfaceProxy): The constructed proxy object or %NULL if @error is set. + */ +AudiomanagerRoutinginterface * +audiomanager_routinginterface_proxy_new_finish ( + GAsyncResult *res, + GError **error) +{ + GObject *ret; + GObject *source_object; + source_object = g_async_result_get_source_object (res); + ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error); + g_object_unref (source_object); + if (ret != NULL) + return AUDIOMANAGER_ROUTINGINTERFACE (ret); + else + return NULL; +} + +/** + * audiomanager_routinginterface_proxy_new_sync: + * @connection: A #GDBusConnection. + * @flags: Flags from the #GDBusProxyFlags enumeration. + * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. + * @object_path: An object path. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL + * + * Synchronously creates a proxy for the D-Bus interface org.genivi.audiomanager.routinginterface. See g_dbus_proxy_new_sync() for more details. + * + * The calling thread is blocked until a reply is received. + * + * See audiomanager_routinginterface_proxy_new() for the asynchronous version of this constructor. + * + * Returns: (transfer full) (type AudiomanagerRoutinginterfaceProxy): The constructed proxy object or %NULL if @error is set. + */ +AudiomanagerRoutinginterface * +audiomanager_routinginterface_proxy_new_sync ( + GDBusConnection *connection, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GError **error) +{ + GInitable *ret; + ret = g_initable_new (TYPE_AUDIOMANAGER_ROUTINGINTERFACE_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.genivi.audiomanager.routinginterface", NULL); + if (ret != NULL) + return AUDIOMANAGER_ROUTINGINTERFACE (ret); + else + return NULL; +} + + +/** + * audiomanager_routinginterface_proxy_new_for_bus: + * @bus_type: A #GBusType. + * @flags: Flags from the #GDBusProxyFlags enumeration. + * @name: A bus name (well-known or unique). + * @object_path: An object path. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied. + * @user_data: User data to pass to @callback. + * + * Like audiomanager_routinginterface_proxy_new() but takes a #GBusType instead of a #GDBusConnection. + * + * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. + * You can then call audiomanager_routinginterface_proxy_new_for_bus_finish() to get the result of the operation. + * + * See audiomanager_routinginterface_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor. + */ +void +audiomanager_routinginterface_proxy_new_for_bus ( + GBusType bus_type, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_async_initable_new_async (TYPE_AUDIOMANAGER_ROUTINGINTERFACE_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.genivi.audiomanager.routinginterface", NULL); +} + +/** + * audiomanager_routinginterface_proxy_new_for_bus_finish: + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to audiomanager_routinginterface_proxy_new_for_bus(). + * @error: Return location for error or %NULL + * + * Finishes an operation started with audiomanager_routinginterface_proxy_new_for_bus(). + * + * Returns: (transfer full) (type AudiomanagerRoutinginterfaceProxy): The constructed proxy object or %NULL if @error is set. + */ +AudiomanagerRoutinginterface * +audiomanager_routinginterface_proxy_new_for_bus_finish ( + GAsyncResult *res, + GError **error) +{ + GObject *ret; + GObject *source_object; + source_object = g_async_result_get_source_object (res); + ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error); + g_object_unref (source_object); + if (ret != NULL) + return AUDIOMANAGER_ROUTINGINTERFACE (ret); + else + return NULL; +} + +/** + * audiomanager_routinginterface_proxy_new_for_bus_sync: + * @bus_type: A #GBusType. + * @flags: Flags from the #GDBusProxyFlags enumeration. + * @name: A bus name (well-known or unique). + * @object_path: An object path. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL + * + * Like audiomanager_routinginterface_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection. + * + * The calling thread is blocked until a reply is received. + * + * See audiomanager_routinginterface_proxy_new_for_bus() for the asynchronous version of this constructor. + * + * Returns: (transfer full) (type AudiomanagerRoutinginterfaceProxy): The constructed proxy object or %NULL if @error is set. + */ +AudiomanagerRoutinginterface * +audiomanager_routinginterface_proxy_new_for_bus_sync ( + GBusType bus_type, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GError **error) +{ + GInitable *ret; + ret = g_initable_new (TYPE_AUDIOMANAGER_ROUTINGINTERFACE_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.genivi.audiomanager.routinginterface", NULL); + if (ret != NULL) + return AUDIOMANAGER_ROUTINGINTERFACE (ret); + else + return NULL; +} + + +/* ------------------------------------------------------------------------ */ + +/** + * AudiomanagerRoutinginterfaceSkeleton: + * + * The #AudiomanagerRoutinginterfaceSkeleton structure contains only private data and should only be accessed using the provided API. + */ + +/** + * AudiomanagerRoutinginterfaceSkeletonClass: + * @parent_class: The parent class. + * + * Class structure for #AudiomanagerRoutinginterfaceSkeleton. + */ + +struct _AudiomanagerRoutinginterfaceSkeletonPrivate +{ + GValue *properties; + GList *changed_properties; + GSource *changed_properties_idle_source; + GMainContext *context; + GMutex lock; +}; + +static void +_audiomanager_routinginterface_skeleton_handle_method_call ( + GDBusConnection *connection G_GNUC_UNUSED, + const gchar *sender G_GNUC_UNUSED, + const gchar *object_path G_GNUC_UNUSED, + const gchar *interface_name, + const gchar *method_name, + GVariant *parameters, + GDBusMethodInvocation *invocation, + gpointer user_data) +{ + AudiomanagerRoutinginterfaceSkeleton *skeleton = AUDIOMANAGER_ROUTINGINTERFACE_SKELETON (user_data); + _ExtendedGDBusMethodInfo *info; + GVariantIter iter; + GVariant *child; + GValue *paramv; + guint num_params; + guint num_extra; + guint n; + guint signal_id; + GValue return_value = G_VALUE_INIT; + info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation); + g_assert (info != NULL); + num_params = g_variant_n_children (parameters); + num_extra = info->pass_fdlist ? 3 : 2; paramv = g_new0 (GValue, num_params + num_extra); + n = 0; + g_value_init (¶mv[n], TYPE_AUDIOMANAGER_ROUTINGINTERFACE); + g_value_set_object (¶mv[n++], skeleton); + g_value_init (¶mv[n], G_TYPE_DBUS_METHOD_INVOCATION); + g_value_set_object (¶mv[n++], invocation); + if (info->pass_fdlist) + { +#ifdef G_OS_UNIX + g_value_init (¶mv[n], G_TYPE_UNIX_FD_LIST); + g_value_set_object (¶mv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation))); +#else + g_assert_not_reached (); +#endif + } + g_variant_iter_init (&iter, parameters); + while ((child = g_variant_iter_next_value (&iter)) != NULL) + { + _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra]; + if (arg_info->use_gvariant) + { + g_value_init (¶mv[n], G_TYPE_VARIANT); + g_value_set_variant (¶mv[n], child); + n++; + } + else + g_dbus_gvariant_to_gvalue (child, ¶mv[n++]); + g_variant_unref (child); + } + signal_id = g_signal_lookup (info->signal_name, TYPE_AUDIOMANAGER_ROUTINGINTERFACE); + g_value_init (&return_value, G_TYPE_BOOLEAN); + g_signal_emitv (paramv, signal_id, 0, &return_value); + if (!g_value_get_boolean (&return_value)) + g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name); + g_value_unset (&return_value); + for (n = 0; n < num_params + num_extra; n++) + g_value_unset (¶mv[n]); + g_free (paramv); +} + +static GVariant * +_audiomanager_routinginterface_skeleton_handle_get_property ( + GDBusConnection *connection G_GNUC_UNUSED, + const gchar *sender G_GNUC_UNUSED, + const gchar *object_path G_GNUC_UNUSED, + const gchar *interface_name G_GNUC_UNUSED, + const gchar *property_name, + GError **error, + gpointer user_data) +{ + AudiomanagerRoutinginterfaceSkeleton *skeleton = AUDIOMANAGER_ROUTINGINTERFACE_SKELETON (user_data); + GValue value = G_VALUE_INIT; + GParamSpec *pspec; + _ExtendedGDBusPropertyInfo *info; + GVariant *ret; + ret = NULL; + info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_audiomanager_routinginterface_interface_info.parent_struct, property_name); + g_assert (info != NULL); + pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name); + if (pspec == NULL) + { + g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name); + } + else + { + g_value_init (&value, pspec->value_type); + g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value); + ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature)); + g_value_unset (&value); + } + return ret; +} + +static gboolean +_audiomanager_routinginterface_skeleton_handle_set_property ( + GDBusConnection *connection G_GNUC_UNUSED, + const gchar *sender G_GNUC_UNUSED, + const gchar *object_path G_GNUC_UNUSED, + const gchar *interface_name G_GNUC_UNUSED, + const gchar *property_name, + GVariant *variant, + GError **error, + gpointer user_data) +{ + AudiomanagerRoutinginterfaceSkeleton *skeleton = AUDIOMANAGER_ROUTINGINTERFACE_SKELETON (user_data); + GValue value = G_VALUE_INIT; + GParamSpec *pspec; + _ExtendedGDBusPropertyInfo *info; + gboolean ret; + ret = FALSE; + info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_audiomanager_routinginterface_interface_info.parent_struct, property_name); + g_assert (info != NULL); + pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name); + if (pspec == NULL) + { + g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name); + } + else + { + if (info->use_gvariant) + g_value_set_variant (&value, variant); + else + g_dbus_gvariant_to_gvalue (variant, &value); + g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value); + g_value_unset (&value); + ret = TRUE; + } + return ret; +} + +static const GDBusInterfaceVTable _audiomanager_routinginterface_skeleton_vtable = +{ + _audiomanager_routinginterface_skeleton_handle_method_call, + _audiomanager_routinginterface_skeleton_handle_get_property, + _audiomanager_routinginterface_skeleton_handle_set_property, + {NULL} +}; + +static GDBusInterfaceInfo * +audiomanager_routinginterface_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED) +{ + return audiomanager_routinginterface_interface_info (); +} + +static GDBusInterfaceVTable * +audiomanager_routinginterface_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED) +{ + return (GDBusInterfaceVTable *) &_audiomanager_routinginterface_skeleton_vtable; +} + +static GVariant * +audiomanager_routinginterface_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton) +{ + AudiomanagerRoutinginterfaceSkeleton *skeleton = AUDIOMANAGER_ROUTINGINTERFACE_SKELETON (_skeleton); + + GVariantBuilder builder; + guint n; + g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}")); + if (_audiomanager_routinginterface_interface_info.parent_struct.properties == NULL) + goto out; + for (n = 0; _audiomanager_routinginterface_interface_info.parent_struct.properties[n] != NULL; n++) + { + GDBusPropertyInfo *info = _audiomanager_routinginterface_interface_info.parent_struct.properties[n]; + if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE) + { + GVariant *value; + value = _audiomanager_routinginterface_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.genivi.audiomanager.routinginterface", info->name, NULL, skeleton); + if (value != NULL) + { + g_variant_take_ref (value); + g_variant_builder_add (&builder, "{sv}", info->name, value); + g_variant_unref (value); + } + } + } +out: + return g_variant_builder_end (&builder); +} + +static void +audiomanager_routinginterface_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton) +{ +} + +static void +_audiomanager_routinginterface_on_signal_set_routing_ready ( + AudiomanagerRoutinginterface *object) +{ + AudiomanagerRoutinginterfaceSkeleton *skeleton = AUDIOMANAGER_ROUTINGINTERFACE_SKELETON (object); + + GList *connections, *l; + GVariant *signal_variant; + connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton)); + + signal_variant = g_variant_ref_sink (g_variant_new ("()")); + for (l = connections; l != NULL; l = l->next) + { + GDBusConnection *connection = l->data; + g_dbus_connection_emit_signal (connection, + NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.genivi.audiomanager.routinginterface", "setRoutingReady", + signal_variant, NULL); + } + g_variant_unref (signal_variant); + g_list_free_full (connections, g_object_unref); +} + +static void +_audiomanager_routinginterface_on_signal_set_routing_rundown ( + AudiomanagerRoutinginterface *object) +{ + AudiomanagerRoutinginterfaceSkeleton *skeleton = AUDIOMANAGER_ROUTINGINTERFACE_SKELETON (object); + + GList *connections, *l; + GVariant *signal_variant; + connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton)); + + signal_variant = g_variant_ref_sink (g_variant_new ("()")); + for (l = connections; l != NULL; l = l->next) + { + GDBusConnection *connection = l->data; + g_dbus_connection_emit_signal (connection, + NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.genivi.audiomanager.routinginterface", "setRoutingRundown", + signal_variant, NULL); + } + g_variant_unref (signal_variant); + g_list_free_full (connections, g_object_unref); +} + +static void audiomanager_routinginterface_skeleton_iface_init (AudiomanagerRoutinginterfaceIface *iface); +#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 +G_DEFINE_TYPE_WITH_CODE (AudiomanagerRoutinginterfaceSkeleton, audiomanager_routinginterface_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON, + G_ADD_PRIVATE (AudiomanagerRoutinginterfaceSkeleton) + G_IMPLEMENT_INTERFACE (TYPE_AUDIOMANAGER_ROUTINGINTERFACE, audiomanager_routinginterface_skeleton_iface_init)); + +#else +G_DEFINE_TYPE_WITH_CODE (AudiomanagerRoutinginterfaceSkeleton, audiomanager_routinginterface_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON, + G_IMPLEMENT_INTERFACE (TYPE_AUDIOMANAGER_ROUTINGINTERFACE, audiomanager_routinginterface_skeleton_iface_init)); + +#endif +static void +audiomanager_routinginterface_skeleton_finalize (GObject *object) +{ + AudiomanagerRoutinginterfaceSkeleton *skeleton = AUDIOMANAGER_ROUTINGINTERFACE_SKELETON (object); + g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free); + if (skeleton->priv->changed_properties_idle_source != NULL) + g_source_destroy (skeleton->priv->changed_properties_idle_source); + g_main_context_unref (skeleton->priv->context); + g_mutex_clear (&skeleton->priv->lock); + G_OBJECT_CLASS (audiomanager_routinginterface_skeleton_parent_class)->finalize (object); +} + +static void +audiomanager_routinginterface_skeleton_init (AudiomanagerRoutinginterfaceSkeleton *skeleton) +{ +#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 + skeleton->priv = audiomanager_routinginterface_skeleton_get_instance_private (skeleton); +#else + skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, TYPE_AUDIOMANAGER_ROUTINGINTERFACE_SKELETON, AudiomanagerRoutinginterfaceSkeletonPrivate); +#endif + + g_mutex_init (&skeleton->priv->lock); + skeleton->priv->context = g_main_context_ref_thread_default (); +} + +static void +audiomanager_routinginterface_skeleton_class_init (AudiomanagerRoutinginterfaceSkeletonClass *klass) +{ + GObjectClass *gobject_class; + GDBusInterfaceSkeletonClass *skeleton_class; + + gobject_class = G_OBJECT_CLASS (klass); + gobject_class->finalize = audiomanager_routinginterface_skeleton_finalize; + + skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass); + skeleton_class->get_info = audiomanager_routinginterface_skeleton_dbus_interface_get_info; + skeleton_class->get_properties = audiomanager_routinginterface_skeleton_dbus_interface_get_properties; + skeleton_class->flush = audiomanager_routinginterface_skeleton_dbus_interface_flush; + skeleton_class->get_vtable = audiomanager_routinginterface_skeleton_dbus_interface_get_vtable; + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38 + g_type_class_add_private (klass, sizeof (AudiomanagerRoutinginterfaceSkeletonPrivate)); +#endif +} + +static void +audiomanager_routinginterface_skeleton_iface_init (AudiomanagerRoutinginterfaceIface *iface) +{ + iface->set_routing_ready = _audiomanager_routinginterface_on_signal_set_routing_ready; + iface->set_routing_rundown = _audiomanager_routinginterface_on_signal_set_routing_rundown; +} + +/** + * audiomanager_routinginterface_skeleton_new: + * + * Creates a skeleton object for the D-Bus interface org.genivi.audiomanager.routinginterface. + * + * Returns: (transfer full) (type AudiomanagerRoutinginterfaceSkeleton): The skeleton object. + */ +AudiomanagerRoutinginterface * +audiomanager_routinginterface_skeleton_new (void) +{ + return AUDIOMANAGER_ROUTINGINTERFACE (g_object_new (TYPE_AUDIOMANAGER_ROUTINGINTERFACE_SKELETON, NULL)); +} + +/* ------------------------------------------------------------------------ + * Code for interface org.genivi.audiomanager.routing.soundmanager + * ------------------------------------------------------------------------ + */ + +/** + * SECTION:AudiomanagerRoutingSoundmanager + * @title: AudiomanagerRoutingSoundmanager + * @short_description: Generated C code for the org.genivi.audiomanager.routing.soundmanager D-Bus interface + * + * This section contains code for working with the org.genivi.audiomanager.routing.soundmanager D-Bus interface in C. + */ + +/* ---- Introspection data for org.genivi.audiomanager.routing.soundmanager ---- */ + +static const _ExtendedGDBusArgInfo _audiomanager_routing_soundmanager_method_info_async_abort_IN_ARG_handle = +{ + { + -1, + (gchar *) "handle", + (gchar *) "q", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _audiomanager_routing_soundmanager_method_info_async_abort_IN_ARG_pointers[] = +{ + &_audiomanager_routing_soundmanager_method_info_async_abort_IN_ARG_handle, + NULL +}; + +static const _ExtendedGDBusArgInfo _audiomanager_routing_soundmanager_method_info_async_abort_OUT_ARG_error = +{ + { + -1, + (gchar *) "error", + (gchar *) "n", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _audiomanager_routing_soundmanager_method_info_async_abort_OUT_ARG_pointers[] = +{ + &_audiomanager_routing_soundmanager_method_info_async_abort_OUT_ARG_error, + NULL +}; + +static const _ExtendedGDBusMethodInfo _audiomanager_routing_soundmanager_method_info_async_abort = +{ + { + -1, + (gchar *) "asyncAbort", + (GDBusArgInfo **) &_audiomanager_routing_soundmanager_method_info_async_abort_IN_ARG_pointers, + (GDBusArgInfo **) &_audiomanager_routing_soundmanager_method_info_async_abort_OUT_ARG_pointers, + NULL + }, + "handle-async-abort", + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_routing_soundmanager_method_info_async_connect_IN_ARG_handle = +{ + { + -1, + (gchar *) "handle", + (gchar *) "q", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_routing_soundmanager_method_info_async_connect_IN_ARG_connectionID = +{ + { + -1, + (gchar *) "connectionID", + (gchar *) "q", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_routing_soundmanager_method_info_async_connect_IN_ARG_sourceID = +{ + { + -1, + (gchar *) "sourceID", + (gchar *) "q", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_routing_soundmanager_method_info_async_connect_IN_ARG_sinkID = +{ + { + -1, + (gchar *) "sinkID", + (gchar *) "q", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_routing_soundmanager_method_info_async_connect_IN_ARG_connectionFormat = +{ + { + -1, + (gchar *) "connectionFormat", + (gchar *) "i", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _audiomanager_routing_soundmanager_method_info_async_connect_IN_ARG_pointers[] = +{ + &_audiomanager_routing_soundmanager_method_info_async_connect_IN_ARG_handle, + &_audiomanager_routing_soundmanager_method_info_async_connect_IN_ARG_connectionID, + &_audiomanager_routing_soundmanager_method_info_async_connect_IN_ARG_sourceID, + &_audiomanager_routing_soundmanager_method_info_async_connect_IN_ARG_sinkID, + &_audiomanager_routing_soundmanager_method_info_async_connect_IN_ARG_connectionFormat, + NULL +}; + +static const _ExtendedGDBusMethodInfo _audiomanager_routing_soundmanager_method_info_async_connect = +{ + { + -1, + (gchar *) "asyncConnect", + (GDBusArgInfo **) &_audiomanager_routing_soundmanager_method_info_async_connect_IN_ARG_pointers, + NULL, + NULL + }, + "handle-async-connect", + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_routing_soundmanager_method_info_async_disconnect_IN_ARG_handle = +{ + { + -1, + (gchar *) "handle", + (gchar *) "q", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_routing_soundmanager_method_info_async_disconnect_IN_ARG_connectionID = +{ + { + -1, + (gchar *) "connectionID", + (gchar *) "q", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _audiomanager_routing_soundmanager_method_info_async_disconnect_IN_ARG_pointers[] = +{ + &_audiomanager_routing_soundmanager_method_info_async_disconnect_IN_ARG_handle, + &_audiomanager_routing_soundmanager_method_info_async_disconnect_IN_ARG_connectionID, + NULL +}; + +static const _ExtendedGDBusMethodInfo _audiomanager_routing_soundmanager_method_info_async_disconnect = +{ + { + -1, + (gchar *) "asyncDisconnect", + (GDBusArgInfo **) &_audiomanager_routing_soundmanager_method_info_async_disconnect_IN_ARG_pointers, + NULL, + NULL + }, + "handle-async-disconnect", + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_routing_soundmanager_method_info_async_set_sink_volume_IN_ARG_handle = +{ + { + -1, + (gchar *) "handle", + (gchar *) "q", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_routing_soundmanager_method_info_async_set_sink_volume_IN_ARG_sinkID = +{ + { + -1, + (gchar *) "sinkID", + (gchar *) "q", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_routing_soundmanager_method_info_async_set_sink_volume_IN_ARG_volume = +{ + { + -1, + (gchar *) "volume", + (gchar *) "n", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_routing_soundmanager_method_info_async_set_sink_volume_IN_ARG_ramp = +{ + { + -1, + (gchar *) "ramp", + (gchar *) "n", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_routing_soundmanager_method_info_async_set_sink_volume_IN_ARG_time = +{ + { + -1, + (gchar *) "time", + (gchar *) "q", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _audiomanager_routing_soundmanager_method_info_async_set_sink_volume_IN_ARG_pointers[] = +{ + &_audiomanager_routing_soundmanager_method_info_async_set_sink_volume_IN_ARG_handle, + &_audiomanager_routing_soundmanager_method_info_async_set_sink_volume_IN_ARG_sinkID, + &_audiomanager_routing_soundmanager_method_info_async_set_sink_volume_IN_ARG_volume, + &_audiomanager_routing_soundmanager_method_info_async_set_sink_volume_IN_ARG_ramp, + &_audiomanager_routing_soundmanager_method_info_async_set_sink_volume_IN_ARG_time, + NULL +}; + +static const _ExtendedGDBusMethodInfo _audiomanager_routing_soundmanager_method_info_async_set_sink_volume = +{ + { + -1, + (gchar *) "asyncSetSinkVolume", + (GDBusArgInfo **) &_audiomanager_routing_soundmanager_method_info_async_set_sink_volume_IN_ARG_pointers, + NULL, + NULL + }, + "handle-async-set-sink-volume", + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_routing_soundmanager_method_info_async_set_source_state_IN_ARG_handle = +{ + { + -1, + (gchar *) "handle", + (gchar *) "q", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_routing_soundmanager_method_info_async_set_source_state_IN_ARG_sourceID = +{ + { + -1, + (gchar *) "sourceID", + (gchar *) "q", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo _audiomanager_routing_soundmanager_method_info_async_set_source_state_IN_ARG_sourceState = +{ + { + -1, + (gchar *) "sourceState", + (gchar *) "i", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _audiomanager_routing_soundmanager_method_info_async_set_source_state_IN_ARG_pointers[] = +{ + &_audiomanager_routing_soundmanager_method_info_async_set_source_state_IN_ARG_handle, + &_audiomanager_routing_soundmanager_method_info_async_set_source_state_IN_ARG_sourceID, + &_audiomanager_routing_soundmanager_method_info_async_set_source_state_IN_ARG_sourceState, + NULL +}; + +static const _ExtendedGDBusMethodInfo _audiomanager_routing_soundmanager_method_info_async_set_source_state = +{ + { + -1, + (gchar *) "asyncSetSourceState", + (GDBusArgInfo **) &_audiomanager_routing_soundmanager_method_info_async_set_source_state_IN_ARG_pointers, + NULL, + NULL + }, + "handle-async-set-source-state", + FALSE +}; + +static const _ExtendedGDBusMethodInfo * const _audiomanager_routing_soundmanager_method_info_pointers[] = +{ + &_audiomanager_routing_soundmanager_method_info_async_abort, + &_audiomanager_routing_soundmanager_method_info_async_connect, + &_audiomanager_routing_soundmanager_method_info_async_disconnect, + &_audiomanager_routing_soundmanager_method_info_async_set_sink_volume, + &_audiomanager_routing_soundmanager_method_info_async_set_source_state, + NULL +}; + +static const _ExtendedGDBusInterfaceInfo _audiomanager_routing_soundmanager_interface_info = +{ + { + -1, + (gchar *) "org.genivi.audiomanager.routing.soundmanager", + (GDBusMethodInfo **) &_audiomanager_routing_soundmanager_method_info_pointers, + NULL, + NULL, + NULL + }, + "audiomanager-routing-soundmanager", +}; + + +/** + * audiomanager_routing_soundmanager_interface_info: + * + * Gets a machine-readable description of the org.genivi.audiomanager.routing.soundmanager D-Bus interface. + * + * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free. + */ +GDBusInterfaceInfo * +audiomanager_routing_soundmanager_interface_info (void) +{ + return (GDBusInterfaceInfo *) &_audiomanager_routing_soundmanager_interface_info.parent_struct; +} + +/** + * audiomanager_routing_soundmanager_override_properties: + * @klass: The class structure for a #GObject-derived class. + * @property_id_begin: The property id to assign to the first overridden property. + * + * Overrides all #GObject properties in the #AudiomanagerRoutingSoundmanager interface for a concrete class. + * The properties are overridden in the order they are defined. + * + * Returns: The last property id. + */ +guint +audiomanager_routing_soundmanager_override_properties (GObjectClass *klass, guint property_id_begin) +{ + return property_id_begin - 1; +} + + + +/** + * AudiomanagerRoutingSoundmanager: + * + * Abstract interface type for the D-Bus interface org.genivi.audiomanager.routing.soundmanager. + */ + +/** + * AudiomanagerRoutingSoundmanagerIface: + * @parent_iface: The parent interface. + * @handle_async_abort: Handler for the #AudiomanagerRoutingSoundmanager::handle-async-abort signal. + * @handle_async_connect: Handler for the #AudiomanagerRoutingSoundmanager::handle-async-connect signal. + * @handle_async_disconnect: Handler for the #AudiomanagerRoutingSoundmanager::handle-async-disconnect signal. + * @handle_async_set_sink_volume: Handler for the #AudiomanagerRoutingSoundmanager::handle-async-set-sink-volume signal. + * @handle_async_set_source_state: Handler for the #AudiomanagerRoutingSoundmanager::handle-async-set-source-state signal. + * + * Virtual table for the D-Bus interface org.genivi.audiomanager.routing.soundmanager. + */ + +typedef AudiomanagerRoutingSoundmanagerIface AudiomanagerRoutingSoundmanagerInterface; +G_DEFINE_INTERFACE (AudiomanagerRoutingSoundmanager, audiomanager_routing_soundmanager, G_TYPE_OBJECT); + +static void +audiomanager_routing_soundmanager_default_init (AudiomanagerRoutingSoundmanagerIface *iface) +{ + /* GObject signals for incoming D-Bus method calls: */ + /** + * AudiomanagerRoutingSoundmanager::handle-async-abort: + * @object: A #AudiomanagerRoutingSoundmanager. + * @invocation: A #GDBusMethodInvocation. + * @arg_handle: Argument passed by remote caller. + * + * Signal emitted when a remote caller is invoking the asyncAbort() D-Bus method. + * + * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call audiomanager_routing_soundmanager_complete_async_abort() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-async-abort", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AudiomanagerRoutingSoundmanagerIface, handle_async_abort), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 2, + G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UINT); + + /** + * AudiomanagerRoutingSoundmanager::handle-async-connect: + * @object: A #AudiomanagerRoutingSoundmanager. + * @invocation: A #GDBusMethodInvocation. + * @arg_handle: Argument passed by remote caller. + * @arg_connectionID: Argument passed by remote caller. + * @arg_sourceID: Argument passed by remote caller. + * @arg_sinkID: Argument passed by remote caller. + * @arg_connectionFormat: Argument passed by remote caller. + * + * Signal emitted when a remote caller is invoking the asyncConnect() D-Bus method. + * + * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call audiomanager_routing_soundmanager_complete_async_connect() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-async-connect", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AudiomanagerRoutingSoundmanagerIface, handle_async_connect), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 6, + G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_INT); + + /** + * AudiomanagerRoutingSoundmanager::handle-async-disconnect: + * @object: A #AudiomanagerRoutingSoundmanager. + * @invocation: A #GDBusMethodInvocation. + * @arg_handle: Argument passed by remote caller. + * @arg_connectionID: Argument passed by remote caller. + * + * Signal emitted when a remote caller is invoking the asyncDisconnect() D-Bus method. + * + * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call audiomanager_routing_soundmanager_complete_async_disconnect() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-async-disconnect", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AudiomanagerRoutingSoundmanagerIface, handle_async_disconnect), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 3, + G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UINT, G_TYPE_UINT); + + /** + * AudiomanagerRoutingSoundmanager::handle-async-set-sink-volume: + * @object: A #AudiomanagerRoutingSoundmanager. + * @invocation: A #GDBusMethodInvocation. + * @arg_handle: Argument passed by remote caller. + * @arg_sinkID: Argument passed by remote caller. + * @arg_volume: Argument passed by remote caller. + * @arg_ramp: Argument passed by remote caller. + * @arg_time: Argument passed by remote caller. + * + * Signal emitted when a remote caller is invoking the asyncSetSinkVolume() D-Bus method. + * + * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call audiomanager_routing_soundmanager_complete_async_set_sink_volume() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-async-set-sink-volume", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AudiomanagerRoutingSoundmanagerIface, handle_async_set_sink_volume), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 6, + G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_INT, G_TYPE_INT, G_TYPE_UINT); + + /** + * AudiomanagerRoutingSoundmanager::handle-async-set-source-state: + * @object: A #AudiomanagerRoutingSoundmanager. + * @invocation: A #GDBusMethodInvocation. + * @arg_handle: Argument passed by remote caller. + * @arg_sourceID: Argument passed by remote caller. + * @arg_sourceState: Argument passed by remote caller. + * + * Signal emitted when a remote caller is invoking the asyncSetSourceState() D-Bus method. + * + * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call audiomanager_routing_soundmanager_complete_async_set_source_state() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-async-set-source-state", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AudiomanagerRoutingSoundmanagerIface, handle_async_set_source_state), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 4, + G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_INT); + +} + +/** + * audiomanager_routing_soundmanager_call_async_abort: + * @proxy: A #AudiomanagerRoutingSoundmanagerProxy. + * @arg_handle: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the asyncAbort() D-Bus method on @proxy. + * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. + * You can then call audiomanager_routing_soundmanager_call_async_abort_finish() to get the result of the operation. + * + * See audiomanager_routing_soundmanager_call_async_abort_sync() for the synchronous, blocking version of this method. + */ +void +audiomanager_routing_soundmanager_call_async_abort ( + AudiomanagerRoutingSoundmanager *proxy, + guint16 arg_handle, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "asyncAbort", + g_variant_new ("(q)", + arg_handle), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * audiomanager_routing_soundmanager_call_async_abort_finish: + * @proxy: A #AudiomanagerRoutingSoundmanagerProxy. + * @out_error: (out): Return location for return parameter or %NULL to ignore. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to audiomanager_routing_soundmanager_call_async_abort(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with audiomanager_routing_soundmanager_call_async_abort(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +audiomanager_routing_soundmanager_call_async_abort_finish ( + AudiomanagerRoutingSoundmanager *proxy, + gint16 *out_error, + GAsyncResult *res, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(n)", + out_error); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * audiomanager_routing_soundmanager_call_async_abort_sync: + * @proxy: A #AudiomanagerRoutingSoundmanagerProxy. + * @arg_handle: Argument to pass with the method invocation. + * @out_error: (out): Return location for return parameter or %NULL to ignore. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the asyncAbort() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See audiomanager_routing_soundmanager_call_async_abort() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +audiomanager_routing_soundmanager_call_async_abort_sync ( + AudiomanagerRoutingSoundmanager *proxy, + guint16 arg_handle, + gint16 *out_error, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "asyncAbort", + g_variant_new ("(q)", + arg_handle), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(n)", + out_error); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * audiomanager_routing_soundmanager_call_async_connect: + * @proxy: A #AudiomanagerRoutingSoundmanagerProxy. + * @arg_handle: Argument to pass with the method invocation. + * @arg_connectionID: Argument to pass with the method invocation. + * @arg_sourceID: Argument to pass with the method invocation. + * @arg_sinkID: Argument to pass with the method invocation. + * @arg_connectionFormat: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the asyncConnect() D-Bus method on @proxy. + * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. + * You can then call audiomanager_routing_soundmanager_call_async_connect_finish() to get the result of the operation. + * + * See audiomanager_routing_soundmanager_call_async_connect_sync() for the synchronous, blocking version of this method. + */ +void +audiomanager_routing_soundmanager_call_async_connect ( + AudiomanagerRoutingSoundmanager *proxy, + guint16 arg_handle, + guint16 arg_connectionID, + guint16 arg_sourceID, + guint16 arg_sinkID, + gint arg_connectionFormat, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "asyncConnect", + g_variant_new ("(qqqqi)", + arg_handle, + arg_connectionID, + arg_sourceID, + arg_sinkID, + arg_connectionFormat), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * audiomanager_routing_soundmanager_call_async_connect_finish: + * @proxy: A #AudiomanagerRoutingSoundmanagerProxy. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to audiomanager_routing_soundmanager_call_async_connect(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with audiomanager_routing_soundmanager_call_async_connect(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +audiomanager_routing_soundmanager_call_async_connect_finish ( + AudiomanagerRoutingSoundmanager *proxy, + GAsyncResult *res, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "()"); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * audiomanager_routing_soundmanager_call_async_connect_sync: + * @proxy: A #AudiomanagerRoutingSoundmanagerProxy. + * @arg_handle: Argument to pass with the method invocation. + * @arg_connectionID: Argument to pass with the method invocation. + * @arg_sourceID: Argument to pass with the method invocation. + * @arg_sinkID: Argument to pass with the method invocation. + * @arg_connectionFormat: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the asyncConnect() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See audiomanager_routing_soundmanager_call_async_connect() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +audiomanager_routing_soundmanager_call_async_connect_sync ( + AudiomanagerRoutingSoundmanager *proxy, + guint16 arg_handle, + guint16 arg_connectionID, + guint16 arg_sourceID, + guint16 arg_sinkID, + gint arg_connectionFormat, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "asyncConnect", + g_variant_new ("(qqqqi)", + arg_handle, + arg_connectionID, + arg_sourceID, + arg_sinkID, + arg_connectionFormat), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "()"); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * audiomanager_routing_soundmanager_call_async_disconnect: + * @proxy: A #AudiomanagerRoutingSoundmanagerProxy. + * @arg_handle: Argument to pass with the method invocation. + * @arg_connectionID: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the asyncDisconnect() D-Bus method on @proxy. + * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. + * You can then call audiomanager_routing_soundmanager_call_async_disconnect_finish() to get the result of the operation. + * + * See audiomanager_routing_soundmanager_call_async_disconnect_sync() for the synchronous, blocking version of this method. + */ +void +audiomanager_routing_soundmanager_call_async_disconnect ( + AudiomanagerRoutingSoundmanager *proxy, + guint16 arg_handle, + guint16 arg_connectionID, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "asyncDisconnect", + g_variant_new ("(qq)", + arg_handle, + arg_connectionID), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * audiomanager_routing_soundmanager_call_async_disconnect_finish: + * @proxy: A #AudiomanagerRoutingSoundmanagerProxy. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to audiomanager_routing_soundmanager_call_async_disconnect(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with audiomanager_routing_soundmanager_call_async_disconnect(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +audiomanager_routing_soundmanager_call_async_disconnect_finish ( + AudiomanagerRoutingSoundmanager *proxy, + GAsyncResult *res, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "()"); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * audiomanager_routing_soundmanager_call_async_disconnect_sync: + * @proxy: A #AudiomanagerRoutingSoundmanagerProxy. + * @arg_handle: Argument to pass with the method invocation. + * @arg_connectionID: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the asyncDisconnect() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See audiomanager_routing_soundmanager_call_async_disconnect() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +audiomanager_routing_soundmanager_call_async_disconnect_sync ( + AudiomanagerRoutingSoundmanager *proxy, + guint16 arg_handle, + guint16 arg_connectionID, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "asyncDisconnect", + g_variant_new ("(qq)", + arg_handle, + arg_connectionID), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "()"); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * audiomanager_routing_soundmanager_call_async_set_sink_volume: + * @proxy: A #AudiomanagerRoutingSoundmanagerProxy. + * @arg_handle: Argument to pass with the method invocation. + * @arg_sinkID: Argument to pass with the method invocation. + * @arg_volume: Argument to pass with the method invocation. + * @arg_ramp: Argument to pass with the method invocation. + * @arg_time: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the asyncSetSinkVolume() D-Bus method on @proxy. + * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. + * You can then call audiomanager_routing_soundmanager_call_async_set_sink_volume_finish() to get the result of the operation. + * + * See audiomanager_routing_soundmanager_call_async_set_sink_volume_sync() for the synchronous, blocking version of this method. + */ +void +audiomanager_routing_soundmanager_call_async_set_sink_volume ( + AudiomanagerRoutingSoundmanager *proxy, + guint16 arg_handle, + guint16 arg_sinkID, + gint16 arg_volume, + gint16 arg_ramp, + guint16 arg_time, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "asyncSetSinkVolume", + g_variant_new ("(qqnnq)", + arg_handle, + arg_sinkID, + arg_volume, + arg_ramp, + arg_time), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * audiomanager_routing_soundmanager_call_async_set_sink_volume_finish: + * @proxy: A #AudiomanagerRoutingSoundmanagerProxy. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to audiomanager_routing_soundmanager_call_async_set_sink_volume(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with audiomanager_routing_soundmanager_call_async_set_sink_volume(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +audiomanager_routing_soundmanager_call_async_set_sink_volume_finish ( + AudiomanagerRoutingSoundmanager *proxy, + GAsyncResult *res, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "()"); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * audiomanager_routing_soundmanager_call_async_set_sink_volume_sync: + * @proxy: A #AudiomanagerRoutingSoundmanagerProxy. + * @arg_handle: Argument to pass with the method invocation. + * @arg_sinkID: Argument to pass with the method invocation. + * @arg_volume: Argument to pass with the method invocation. + * @arg_ramp: Argument to pass with the method invocation. + * @arg_time: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the asyncSetSinkVolume() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See audiomanager_routing_soundmanager_call_async_set_sink_volume() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +audiomanager_routing_soundmanager_call_async_set_sink_volume_sync ( + AudiomanagerRoutingSoundmanager *proxy, + guint16 arg_handle, + guint16 arg_sinkID, + gint16 arg_volume, + gint16 arg_ramp, + guint16 arg_time, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "asyncSetSinkVolume", + g_variant_new ("(qqnnq)", + arg_handle, + arg_sinkID, + arg_volume, + arg_ramp, + arg_time), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "()"); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * audiomanager_routing_soundmanager_call_async_set_source_state: + * @proxy: A #AudiomanagerRoutingSoundmanagerProxy. + * @arg_handle: Argument to pass with the method invocation. + * @arg_sourceID: Argument to pass with the method invocation. + * @arg_sourceState: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the asyncSetSourceState() D-Bus method on @proxy. + * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. + * You can then call audiomanager_routing_soundmanager_call_async_set_source_state_finish() to get the result of the operation. + * + * See audiomanager_routing_soundmanager_call_async_set_source_state_sync() for the synchronous, blocking version of this method. + */ +void +audiomanager_routing_soundmanager_call_async_set_source_state ( + AudiomanagerRoutingSoundmanager *proxy, + guint16 arg_handle, + guint16 arg_sourceID, + gint arg_sourceState, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "asyncSetSourceState", + g_variant_new ("(qqi)", + arg_handle, + arg_sourceID, + arg_sourceState), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * audiomanager_routing_soundmanager_call_async_set_source_state_finish: + * @proxy: A #AudiomanagerRoutingSoundmanagerProxy. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to audiomanager_routing_soundmanager_call_async_set_source_state(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with audiomanager_routing_soundmanager_call_async_set_source_state(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +audiomanager_routing_soundmanager_call_async_set_source_state_finish ( + AudiomanagerRoutingSoundmanager *proxy, + GAsyncResult *res, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "()"); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * audiomanager_routing_soundmanager_call_async_set_source_state_sync: + * @proxy: A #AudiomanagerRoutingSoundmanagerProxy. + * @arg_handle: Argument to pass with the method invocation. + * @arg_sourceID: Argument to pass with the method invocation. + * @arg_sourceState: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the asyncSetSourceState() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See audiomanager_routing_soundmanager_call_async_set_source_state() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +audiomanager_routing_soundmanager_call_async_set_source_state_sync ( + AudiomanagerRoutingSoundmanager *proxy, + guint16 arg_handle, + guint16 arg_sourceID, + gint arg_sourceState, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "asyncSetSourceState", + g_variant_new ("(qqi)", + arg_handle, + arg_sourceID, + arg_sourceState), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "()"); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * audiomanager_routing_soundmanager_complete_async_abort: + * @object: A #AudiomanagerRoutingSoundmanager. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @error: Parameter to return. + * + * Helper function used in service implementations to finish handling invocations of the asyncAbort() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * + * This method will free @invocation, you cannot use it afterwards. + */ +void +audiomanager_routing_soundmanager_complete_async_abort ( + AudiomanagerRoutingSoundmanager *object, + GDBusMethodInvocation *invocation, + gint16 error) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(n)", + error)); +} + +/** + * audiomanager_routing_soundmanager_complete_async_connect: + * @object: A #AudiomanagerRoutingSoundmanager. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * + * Helper function used in service implementations to finish handling invocations of the asyncConnect() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * + * This method will free @invocation, you cannot use it afterwards. + */ +void +audiomanager_routing_soundmanager_complete_async_connect ( + AudiomanagerRoutingSoundmanager *object, + GDBusMethodInvocation *invocation) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("()")); +} + +/** + * audiomanager_routing_soundmanager_complete_async_disconnect: + * @object: A #AudiomanagerRoutingSoundmanager. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * + * Helper function used in service implementations to finish handling invocations of the asyncDisconnect() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * + * This method will free @invocation, you cannot use it afterwards. + */ +void +audiomanager_routing_soundmanager_complete_async_disconnect ( + AudiomanagerRoutingSoundmanager *object, + GDBusMethodInvocation *invocation) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("()")); +} + +/** + * audiomanager_routing_soundmanager_complete_async_set_sink_volume: + * @object: A #AudiomanagerRoutingSoundmanager. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * + * Helper function used in service implementations to finish handling invocations of the asyncSetSinkVolume() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * + * This method will free @invocation, you cannot use it afterwards. + */ +void +audiomanager_routing_soundmanager_complete_async_set_sink_volume ( + AudiomanagerRoutingSoundmanager *object, + GDBusMethodInvocation *invocation) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("()")); +} + +/** + * audiomanager_routing_soundmanager_complete_async_set_source_state: + * @object: A #AudiomanagerRoutingSoundmanager. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * + * Helper function used in service implementations to finish handling invocations of the asyncSetSourceState() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * + * This method will free @invocation, you cannot use it afterwards. + */ +void +audiomanager_routing_soundmanager_complete_async_set_source_state ( + AudiomanagerRoutingSoundmanager *object, + GDBusMethodInvocation *invocation) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("()")); +} + +/* ------------------------------------------------------------------------ */ + +/** + * AudiomanagerRoutingSoundmanagerProxy: + * + * The #AudiomanagerRoutingSoundmanagerProxy structure contains only private data and should only be accessed using the provided API. + */ + +/** + * AudiomanagerRoutingSoundmanagerProxyClass: + * @parent_class: The parent class. + * + * Class structure for #AudiomanagerRoutingSoundmanagerProxy. + */ + +struct _AudiomanagerRoutingSoundmanagerProxyPrivate +{ + GData *qdata; +}; + +static void audiomanager_routing_soundmanager_proxy_iface_init (AudiomanagerRoutingSoundmanagerIface *iface); + +#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 +G_DEFINE_TYPE_WITH_CODE (AudiomanagerRoutingSoundmanagerProxy, audiomanager_routing_soundmanager_proxy, G_TYPE_DBUS_PROXY, + G_ADD_PRIVATE (AudiomanagerRoutingSoundmanagerProxy) + G_IMPLEMENT_INTERFACE (TYPE_AUDIOMANAGER_ROUTING_SOUNDMANAGER, audiomanager_routing_soundmanager_proxy_iface_init)); + +#else +G_DEFINE_TYPE_WITH_CODE (AudiomanagerRoutingSoundmanagerProxy, audiomanager_routing_soundmanager_proxy, G_TYPE_DBUS_PROXY, + G_IMPLEMENT_INTERFACE (TYPE_AUDIOMANAGER_ROUTING_SOUNDMANAGER, audiomanager_routing_soundmanager_proxy_iface_init)); + +#endif +static void +audiomanager_routing_soundmanager_proxy_finalize (GObject *object) +{ + AudiomanagerRoutingSoundmanagerProxy *proxy = AUDIOMANAGER_ROUTING_SOUNDMANAGER_PROXY (object); + g_datalist_clear (&proxy->priv->qdata); + G_OBJECT_CLASS (audiomanager_routing_soundmanager_proxy_parent_class)->finalize (object); +} + +static void +audiomanager_routing_soundmanager_proxy_get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec G_GNUC_UNUSED) +{ +} + +static void +audiomanager_routing_soundmanager_proxy_set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec G_GNUC_UNUSED) +{ +} + +static void +audiomanager_routing_soundmanager_proxy_g_signal (GDBusProxy *proxy, + const gchar *sender_name G_GNUC_UNUSED, + const gchar *signal_name, + GVariant *parameters) +{ + _ExtendedGDBusSignalInfo *info; + GVariantIter iter; + GVariant *child; + GValue *paramv; + guint num_params; + guint n; + guint signal_id; + info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_audiomanager_routing_soundmanager_interface_info.parent_struct, signal_name); + if (info == NULL) + return; + num_params = g_variant_n_children (parameters); + paramv = g_new0 (GValue, num_params + 1); + g_value_init (¶mv[0], TYPE_AUDIOMANAGER_ROUTING_SOUNDMANAGER); + g_value_set_object (¶mv[0], proxy); + g_variant_iter_init (&iter, parameters); + n = 1; + while ((child = g_variant_iter_next_value (&iter)) != NULL) + { + _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1]; + if (arg_info->use_gvariant) + { + g_value_init (¶mv[n], G_TYPE_VARIANT); + g_value_set_variant (¶mv[n], child); + n++; + } + else + g_dbus_gvariant_to_gvalue (child, ¶mv[n++]); + g_variant_unref (child); + } + signal_id = g_signal_lookup (info->signal_name, TYPE_AUDIOMANAGER_ROUTING_SOUNDMANAGER); + g_signal_emitv (paramv, signal_id, 0, NULL); + for (n = 0; n < num_params + 1; n++) + g_value_unset (¶mv[n]); + g_free (paramv); +} + +static void +audiomanager_routing_soundmanager_proxy_g_properties_changed (GDBusProxy *_proxy, + GVariant *changed_properties, + const gchar *const *invalidated_properties) +{ + AudiomanagerRoutingSoundmanagerProxy *proxy = AUDIOMANAGER_ROUTING_SOUNDMANAGER_PROXY (_proxy); + guint n; + const gchar *key; + GVariantIter *iter; + _ExtendedGDBusPropertyInfo *info; + g_variant_get (changed_properties, "a{sv}", &iter); + while (g_variant_iter_next (iter, "{&sv}", &key, NULL)) + { + info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_audiomanager_routing_soundmanager_interface_info.parent_struct, key); + g_datalist_remove_data (&proxy->priv->qdata, key); + if (info != NULL) + g_object_notify (G_OBJECT (proxy), info->hyphen_name); + } + g_variant_iter_free (iter); + for (n = 0; invalidated_properties[n] != NULL; n++) + { + info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_audiomanager_routing_soundmanager_interface_info.parent_struct, invalidated_properties[n]); + g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]); + if (info != NULL) + g_object_notify (G_OBJECT (proxy), info->hyphen_name); + } +} + +static void +audiomanager_routing_soundmanager_proxy_init (AudiomanagerRoutingSoundmanagerProxy *proxy) +{ +#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 + proxy->priv = audiomanager_routing_soundmanager_proxy_get_instance_private (proxy); +#else + proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, TYPE_AUDIOMANAGER_ROUTING_SOUNDMANAGER_PROXY, AudiomanagerRoutingSoundmanagerProxyPrivate); +#endif + + g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), audiomanager_routing_soundmanager_interface_info ()); +} + +static void +audiomanager_routing_soundmanager_proxy_class_init (AudiomanagerRoutingSoundmanagerProxyClass *klass) +{ + GObjectClass *gobject_class; + GDBusProxyClass *proxy_class; + + gobject_class = G_OBJECT_CLASS (klass); + gobject_class->finalize = audiomanager_routing_soundmanager_proxy_finalize; + gobject_class->get_property = audiomanager_routing_soundmanager_proxy_get_property; + gobject_class->set_property = audiomanager_routing_soundmanager_proxy_set_property; + + proxy_class = G_DBUS_PROXY_CLASS (klass); + proxy_class->g_signal = audiomanager_routing_soundmanager_proxy_g_signal; + proxy_class->g_properties_changed = audiomanager_routing_soundmanager_proxy_g_properties_changed; + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38 + g_type_class_add_private (klass, sizeof (AudiomanagerRoutingSoundmanagerProxyPrivate)); +#endif +} + +static void +audiomanager_routing_soundmanager_proxy_iface_init (AudiomanagerRoutingSoundmanagerIface *iface) +{ +} + +/** + * audiomanager_routing_soundmanager_proxy_new: + * @connection: A #GDBusConnection. + * @flags: Flags from the #GDBusProxyFlags enumeration. + * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. + * @object_path: An object path. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied. + * @user_data: User data to pass to @callback. + * + * Asynchronously creates a proxy for the D-Bus interface org.genivi.audiomanager.routing.soundmanager. See g_dbus_proxy_new() for more details. + * + * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. + * You can then call audiomanager_routing_soundmanager_proxy_new_finish() to get the result of the operation. + * + * See audiomanager_routing_soundmanager_proxy_new_sync() for the synchronous, blocking version of this constructor. + */ +void +audiomanager_routing_soundmanager_proxy_new ( + GDBusConnection *connection, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_async_initable_new_async (TYPE_AUDIOMANAGER_ROUTING_SOUNDMANAGER_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.genivi.audiomanager.routing.soundmanager", NULL); +} + +/** + * audiomanager_routing_soundmanager_proxy_new_finish: + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to audiomanager_routing_soundmanager_proxy_new(). + * @error: Return location for error or %NULL + * + * Finishes an operation started with audiomanager_routing_soundmanager_proxy_new(). + * + * Returns: (transfer full) (type AudiomanagerRoutingSoundmanagerProxy): The constructed proxy object or %NULL if @error is set. + */ +AudiomanagerRoutingSoundmanager * +audiomanager_routing_soundmanager_proxy_new_finish ( + GAsyncResult *res, + GError **error) +{ + GObject *ret; + GObject *source_object; + source_object = g_async_result_get_source_object (res); + ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error); + g_object_unref (source_object); + if (ret != NULL) + return AUDIOMANAGER_ROUTING_SOUNDMANAGER (ret); + else + return NULL; +} + +/** + * audiomanager_routing_soundmanager_proxy_new_sync: + * @connection: A #GDBusConnection. + * @flags: Flags from the #GDBusProxyFlags enumeration. + * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. + * @object_path: An object path. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL + * + * Synchronously creates a proxy for the D-Bus interface org.genivi.audiomanager.routing.soundmanager. See g_dbus_proxy_new_sync() for more details. + * + * The calling thread is blocked until a reply is received. + * + * See audiomanager_routing_soundmanager_proxy_new() for the asynchronous version of this constructor. + * + * Returns: (transfer full) (type AudiomanagerRoutingSoundmanagerProxy): The constructed proxy object or %NULL if @error is set. + */ +AudiomanagerRoutingSoundmanager * +audiomanager_routing_soundmanager_proxy_new_sync ( + GDBusConnection *connection, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GError **error) +{ + GInitable *ret; + ret = g_initable_new (TYPE_AUDIOMANAGER_ROUTING_SOUNDMANAGER_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.genivi.audiomanager.routing.soundmanager", NULL); + if (ret != NULL) + return AUDIOMANAGER_ROUTING_SOUNDMANAGER (ret); + else + return NULL; +} + + +/** + * audiomanager_routing_soundmanager_proxy_new_for_bus: + * @bus_type: A #GBusType. + * @flags: Flags from the #GDBusProxyFlags enumeration. + * @name: A bus name (well-known or unique). + * @object_path: An object path. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied. + * @user_data: User data to pass to @callback. + * + * Like audiomanager_routing_soundmanager_proxy_new() but takes a #GBusType instead of a #GDBusConnection. + * + * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. + * You can then call audiomanager_routing_soundmanager_proxy_new_for_bus_finish() to get the result of the operation. + * + * See audiomanager_routing_soundmanager_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor. + */ +void +audiomanager_routing_soundmanager_proxy_new_for_bus ( + GBusType bus_type, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_async_initable_new_async (TYPE_AUDIOMANAGER_ROUTING_SOUNDMANAGER_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.genivi.audiomanager.routing.soundmanager", NULL); +} + +/** + * audiomanager_routing_soundmanager_proxy_new_for_bus_finish: + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to audiomanager_routing_soundmanager_proxy_new_for_bus(). + * @error: Return location for error or %NULL + * + * Finishes an operation started with audiomanager_routing_soundmanager_proxy_new_for_bus(). + * + * Returns: (transfer full) (type AudiomanagerRoutingSoundmanagerProxy): The constructed proxy object or %NULL if @error is set. + */ +AudiomanagerRoutingSoundmanager * +audiomanager_routing_soundmanager_proxy_new_for_bus_finish ( + GAsyncResult *res, + GError **error) +{ + GObject *ret; + GObject *source_object; + source_object = g_async_result_get_source_object (res); + ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error); + g_object_unref (source_object); + if (ret != NULL) + return AUDIOMANAGER_ROUTING_SOUNDMANAGER (ret); + else + return NULL; +} + +/** + * audiomanager_routing_soundmanager_proxy_new_for_bus_sync: + * @bus_type: A #GBusType. + * @flags: Flags from the #GDBusProxyFlags enumeration. + * @name: A bus name (well-known or unique). + * @object_path: An object path. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL + * + * Like audiomanager_routing_soundmanager_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection. + * + * The calling thread is blocked until a reply is received. + * + * See audiomanager_routing_soundmanager_proxy_new_for_bus() for the asynchronous version of this constructor. + * + * Returns: (transfer full) (type AudiomanagerRoutingSoundmanagerProxy): The constructed proxy object or %NULL if @error is set. + */ +AudiomanagerRoutingSoundmanager * +audiomanager_routing_soundmanager_proxy_new_for_bus_sync ( + GBusType bus_type, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GError **error) +{ + GInitable *ret; + ret = g_initable_new (TYPE_AUDIOMANAGER_ROUTING_SOUNDMANAGER_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.genivi.audiomanager.routing.soundmanager", NULL); + if (ret != NULL) + return AUDIOMANAGER_ROUTING_SOUNDMANAGER (ret); + else + return NULL; +} + + +/* ------------------------------------------------------------------------ */ + +/** + * AudiomanagerRoutingSoundmanagerSkeleton: + * + * The #AudiomanagerRoutingSoundmanagerSkeleton structure contains only private data and should only be accessed using the provided API. + */ + +/** + * AudiomanagerRoutingSoundmanagerSkeletonClass: + * @parent_class: The parent class. + * + * Class structure for #AudiomanagerRoutingSoundmanagerSkeleton. + */ + +struct _AudiomanagerRoutingSoundmanagerSkeletonPrivate +{ + GValue *properties; + GList *changed_properties; + GSource *changed_properties_idle_source; + GMainContext *context; + GMutex lock; +}; + +static void +_audiomanager_routing_soundmanager_skeleton_handle_method_call ( + GDBusConnection *connection G_GNUC_UNUSED, + const gchar *sender G_GNUC_UNUSED, + const gchar *object_path G_GNUC_UNUSED, + const gchar *interface_name, + const gchar *method_name, + GVariant *parameters, + GDBusMethodInvocation *invocation, + gpointer user_data) +{ + AudiomanagerRoutingSoundmanagerSkeleton *skeleton = AUDIOMANAGER_ROUTING_SOUNDMANAGER_SKELETON (user_data); + _ExtendedGDBusMethodInfo *info; + GVariantIter iter; + GVariant *child; + GValue *paramv; + guint num_params; + guint num_extra; + guint n; + guint signal_id; + GValue return_value = G_VALUE_INIT; + info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation); + g_assert (info != NULL); + num_params = g_variant_n_children (parameters); + num_extra = info->pass_fdlist ? 3 : 2; paramv = g_new0 (GValue, num_params + num_extra); + n = 0; + g_value_init (¶mv[n], TYPE_AUDIOMANAGER_ROUTING_SOUNDMANAGER); + g_value_set_object (¶mv[n++], skeleton); + g_value_init (¶mv[n], G_TYPE_DBUS_METHOD_INVOCATION); + g_value_set_object (¶mv[n++], invocation); + if (info->pass_fdlist) + { +#ifdef G_OS_UNIX + g_value_init (¶mv[n], G_TYPE_UNIX_FD_LIST); + g_value_set_object (¶mv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation))); +#else + g_assert_not_reached (); +#endif + } + g_variant_iter_init (&iter, parameters); + while ((child = g_variant_iter_next_value (&iter)) != NULL) + { + _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra]; + if (arg_info->use_gvariant) + { + g_value_init (¶mv[n], G_TYPE_VARIANT); + g_value_set_variant (¶mv[n], child); + n++; + } + else + g_dbus_gvariant_to_gvalue (child, ¶mv[n++]); + g_variant_unref (child); + } + signal_id = g_signal_lookup (info->signal_name, TYPE_AUDIOMANAGER_ROUTING_SOUNDMANAGER); + g_value_init (&return_value, G_TYPE_BOOLEAN); + g_signal_emitv (paramv, signal_id, 0, &return_value); + if (!g_value_get_boolean (&return_value)) + g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name); + g_value_unset (&return_value); + for (n = 0; n < num_params + num_extra; n++) + g_value_unset (¶mv[n]); + g_free (paramv); +} + +static GVariant * +_audiomanager_routing_soundmanager_skeleton_handle_get_property ( + GDBusConnection *connection G_GNUC_UNUSED, + const gchar *sender G_GNUC_UNUSED, + const gchar *object_path G_GNUC_UNUSED, + const gchar *interface_name G_GNUC_UNUSED, + const gchar *property_name, + GError **error, + gpointer user_data) +{ + AudiomanagerRoutingSoundmanagerSkeleton *skeleton = AUDIOMANAGER_ROUTING_SOUNDMANAGER_SKELETON (user_data); + GValue value = G_VALUE_INIT; + GParamSpec *pspec; + _ExtendedGDBusPropertyInfo *info; + GVariant *ret; + ret = NULL; + info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_audiomanager_routing_soundmanager_interface_info.parent_struct, property_name); + g_assert (info != NULL); + pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name); + if (pspec == NULL) + { + g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name); + } + else + { + g_value_init (&value, pspec->value_type); + g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value); + ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature)); + g_value_unset (&value); + } + return ret; +} + +static gboolean +_audiomanager_routing_soundmanager_skeleton_handle_set_property ( + GDBusConnection *connection G_GNUC_UNUSED, + const gchar *sender G_GNUC_UNUSED, + const gchar *object_path G_GNUC_UNUSED, + const gchar *interface_name G_GNUC_UNUSED, + const gchar *property_name, + GVariant *variant, + GError **error, + gpointer user_data) +{ + AudiomanagerRoutingSoundmanagerSkeleton *skeleton = AUDIOMANAGER_ROUTING_SOUNDMANAGER_SKELETON (user_data); + GValue value = G_VALUE_INIT; + GParamSpec *pspec; + _ExtendedGDBusPropertyInfo *info; + gboolean ret; + ret = FALSE; + info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_audiomanager_routing_soundmanager_interface_info.parent_struct, property_name); + g_assert (info != NULL); + pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name); + if (pspec == NULL) + { + g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name); + } + else + { + if (info->use_gvariant) + g_value_set_variant (&value, variant); + else + g_dbus_gvariant_to_gvalue (variant, &value); + g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value); + g_value_unset (&value); + ret = TRUE; + } + return ret; +} + +static const GDBusInterfaceVTable _audiomanager_routing_soundmanager_skeleton_vtable = +{ + _audiomanager_routing_soundmanager_skeleton_handle_method_call, + _audiomanager_routing_soundmanager_skeleton_handle_get_property, + _audiomanager_routing_soundmanager_skeleton_handle_set_property, + {NULL} +}; + +static GDBusInterfaceInfo * +audiomanager_routing_soundmanager_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED) +{ + return audiomanager_routing_soundmanager_interface_info (); +} + +static GDBusInterfaceVTable * +audiomanager_routing_soundmanager_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED) +{ + return (GDBusInterfaceVTable *) &_audiomanager_routing_soundmanager_skeleton_vtable; +} + +static GVariant * +audiomanager_routing_soundmanager_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton) +{ + AudiomanagerRoutingSoundmanagerSkeleton *skeleton = AUDIOMANAGER_ROUTING_SOUNDMANAGER_SKELETON (_skeleton); + + GVariantBuilder builder; + guint n; + g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}")); + if (_audiomanager_routing_soundmanager_interface_info.parent_struct.properties == NULL) + goto out; + for (n = 0; _audiomanager_routing_soundmanager_interface_info.parent_struct.properties[n] != NULL; n++) + { + GDBusPropertyInfo *info = _audiomanager_routing_soundmanager_interface_info.parent_struct.properties[n]; + if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE) + { + GVariant *value; + value = _audiomanager_routing_soundmanager_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.genivi.audiomanager.routing.soundmanager", info->name, NULL, skeleton); + if (value != NULL) + { + g_variant_take_ref (value); + g_variant_builder_add (&builder, "{sv}", info->name, value); + g_variant_unref (value); + } + } + } +out: + return g_variant_builder_end (&builder); +} + +static void +audiomanager_routing_soundmanager_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton) +{ +} + +static void audiomanager_routing_soundmanager_skeleton_iface_init (AudiomanagerRoutingSoundmanagerIface *iface); +#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 +G_DEFINE_TYPE_WITH_CODE (AudiomanagerRoutingSoundmanagerSkeleton, audiomanager_routing_soundmanager_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON, + G_ADD_PRIVATE (AudiomanagerRoutingSoundmanagerSkeleton) + G_IMPLEMENT_INTERFACE (TYPE_AUDIOMANAGER_ROUTING_SOUNDMANAGER, audiomanager_routing_soundmanager_skeleton_iface_init)); + +#else +G_DEFINE_TYPE_WITH_CODE (AudiomanagerRoutingSoundmanagerSkeleton, audiomanager_routing_soundmanager_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON, + G_IMPLEMENT_INTERFACE (TYPE_AUDIOMANAGER_ROUTING_SOUNDMANAGER, audiomanager_routing_soundmanager_skeleton_iface_init)); + +#endif +static void +audiomanager_routing_soundmanager_skeleton_finalize (GObject *object) +{ + AudiomanagerRoutingSoundmanagerSkeleton *skeleton = AUDIOMANAGER_ROUTING_SOUNDMANAGER_SKELETON (object); + g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free); + if (skeleton->priv->changed_properties_idle_source != NULL) + g_source_destroy (skeleton->priv->changed_properties_idle_source); + g_main_context_unref (skeleton->priv->context); + g_mutex_clear (&skeleton->priv->lock); + G_OBJECT_CLASS (audiomanager_routing_soundmanager_skeleton_parent_class)->finalize (object); +} + +static void +audiomanager_routing_soundmanager_skeleton_init (AudiomanagerRoutingSoundmanagerSkeleton *skeleton) +{ +#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 + skeleton->priv = audiomanager_routing_soundmanager_skeleton_get_instance_private (skeleton); +#else + skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, TYPE_AUDIOMANAGER_ROUTING_SOUNDMANAGER_SKELETON, AudiomanagerRoutingSoundmanagerSkeletonPrivate); +#endif + + g_mutex_init (&skeleton->priv->lock); + skeleton->priv->context = g_main_context_ref_thread_default (); +} + +static void +audiomanager_routing_soundmanager_skeleton_class_init (AudiomanagerRoutingSoundmanagerSkeletonClass *klass) +{ + GObjectClass *gobject_class; + GDBusInterfaceSkeletonClass *skeleton_class; + + gobject_class = G_OBJECT_CLASS (klass); + gobject_class->finalize = audiomanager_routing_soundmanager_skeleton_finalize; + + skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass); + skeleton_class->get_info = audiomanager_routing_soundmanager_skeleton_dbus_interface_get_info; + skeleton_class->get_properties = audiomanager_routing_soundmanager_skeleton_dbus_interface_get_properties; + skeleton_class->flush = audiomanager_routing_soundmanager_skeleton_dbus_interface_flush; + skeleton_class->get_vtable = audiomanager_routing_soundmanager_skeleton_dbus_interface_get_vtable; + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38 + g_type_class_add_private (klass, sizeof (AudiomanagerRoutingSoundmanagerSkeletonPrivate)); +#endif +} + +static void +audiomanager_routing_soundmanager_skeleton_iface_init (AudiomanagerRoutingSoundmanagerIface *iface) +{ +} + +/** + * audiomanager_routing_soundmanager_skeleton_new: + * + * Creates a skeleton object for the D-Bus interface org.genivi.audiomanager.routing.soundmanager. + * + * Returns: (transfer full) (type AudiomanagerRoutingSoundmanagerSkeleton): The skeleton object. + */ +AudiomanagerRoutingSoundmanager * +audiomanager_routing_soundmanager_skeleton_new (void) +{ + return AUDIOMANAGER_ROUTING_SOUNDMANAGER (g_object_new (TYPE_AUDIOMANAGER_ROUTING_SOUNDMANAGER_SKELETON, NULL)); +} + +/* ------------------------------------------------------------------------ + * Code for Object, ObjectProxy and ObjectSkeleton + * ------------------------------------------------------------------------ + */ + +/** + * SECTION:Object + * @title: Object + * @short_description: Specialized GDBusObject types + * + * This section contains the #Object, #ObjectProxy, and #ObjectSkeleton types which make it easier to work with objects implementing generated types for D-Bus interfaces. + */ + +/** + * Object: + * + * The #Object type is a specialized container of interfaces. + */ + +/** + * ObjectIface: + * @parent_iface: The parent interface. + * + * Virtual table for the #Object interface. + */ + +typedef ObjectIface ObjectInterface; +G_DEFINE_INTERFACE_WITH_CODE (Object, object, G_TYPE_OBJECT, g_type_interface_add_prerequisite (g_define_type_id, G_TYPE_DBUS_OBJECT)); + +static void +object_default_init (ObjectIface *iface) +{ + /** + * Object:audiomanager-commandinterface: + * + * The #AudiomanagerCommandinterface instance corresponding to the D-Bus interface org.genivi.audiomanager.commandinterface, if any. + * + * Connect to the #GObject::notify signal to get informed of property changes. + */ + g_object_interface_install_property (iface, g_param_spec_object ("audiomanager-commandinterface", "audiomanager-commandinterface", "audiomanager-commandinterface", TYPE_AUDIOMANAGER_COMMANDINTERFACE, G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS)); + + /** + * Object:audiomanager-routinginterface: + * + * The #AudiomanagerRoutinginterface instance corresponding to the D-Bus interface org.genivi.audiomanager.routinginterface, if any. + * + * Connect to the #GObject::notify signal to get informed of property changes. + */ + g_object_interface_install_property (iface, g_param_spec_object ("audiomanager-routinginterface", "audiomanager-routinginterface", "audiomanager-routinginterface", TYPE_AUDIOMANAGER_ROUTINGINTERFACE, G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS)); + + /** + * Object:audiomanager-routing-soundmanager: + * + * The #AudiomanagerRoutingSoundmanager instance corresponding to the D-Bus interface org.genivi.audiomanager.routing.soundmanager, if any. + * + * Connect to the #GObject::notify signal to get informed of property changes. + */ + g_object_interface_install_property (iface, g_param_spec_object ("audiomanager-routing-soundmanager", "audiomanager-routing-soundmanager", "audiomanager-routing-soundmanager", TYPE_AUDIOMANAGER_ROUTING_SOUNDMANAGER, G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS)); + +} + +/** + * object_get_audiomanager_commandinterface: + * @object: A #Object. + * + * Gets the #AudiomanagerCommandinterface instance for the D-Bus interface org.genivi.audiomanager.commandinterface on @object, if any. + * + * Returns: (transfer full): A #AudiomanagerCommandinterface that must be freed with g_object_unref() or %NULL if @object does not implement the interface. + */ +AudiomanagerCommandinterface *object_get_audiomanager_commandinterface (Object *object) +{ + GDBusInterface *ret; + ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.genivi.audiomanager.commandinterface"); + if (ret == NULL) + return NULL; + return AUDIOMANAGER_COMMANDINTERFACE (ret); +} + +/** + * object_get_audiomanager_routinginterface: + * @object: A #Object. + * + * Gets the #AudiomanagerRoutinginterface instance for the D-Bus interface org.genivi.audiomanager.routinginterface on @object, if any. + * + * Returns: (transfer full): A #AudiomanagerRoutinginterface that must be freed with g_object_unref() or %NULL if @object does not implement the interface. + */ +AudiomanagerRoutinginterface *object_get_audiomanager_routinginterface (Object *object) +{ + GDBusInterface *ret; + ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.genivi.audiomanager.routinginterface"); + if (ret == NULL) + return NULL; + return AUDIOMANAGER_ROUTINGINTERFACE (ret); +} + +/** + * object_get_audiomanager_routing_soundmanager: + * @object: A #Object. + * + * Gets the #AudiomanagerRoutingSoundmanager instance for the D-Bus interface org.genivi.audiomanager.routing.soundmanager on @object, if any. + * + * Returns: (transfer full): A #AudiomanagerRoutingSoundmanager that must be freed with g_object_unref() or %NULL if @object does not implement the interface. + */ +AudiomanagerRoutingSoundmanager *object_get_audiomanager_routing_soundmanager (Object *object) +{ + GDBusInterface *ret; + ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.genivi.audiomanager.routing.soundmanager"); + if (ret == NULL) + return NULL; + return AUDIOMANAGER_ROUTING_SOUNDMANAGER (ret); +} + + +/** + * object_peek_audiomanager_commandinterface: (skip) + * @object: A #Object. + * + * Like object_get_audiomanager_commandinterface() but doesn't increase the reference count on the returned object. + * + * It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running. + * + * Returns: (transfer none): A #AudiomanagerCommandinterface or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object. + */ +AudiomanagerCommandinterface *object_peek_audiomanager_commandinterface (Object *object) +{ + GDBusInterface *ret; + ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.genivi.audiomanager.commandinterface"); + if (ret == NULL) + return NULL; + g_object_unref (ret); + return AUDIOMANAGER_COMMANDINTERFACE (ret); +} + +/** + * object_peek_audiomanager_routinginterface: (skip) + * @object: A #Object. + * + * Like object_get_audiomanager_routinginterface() but doesn't increase the reference count on the returned object. + * + * It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running. + * + * Returns: (transfer none): A #AudiomanagerRoutinginterface or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object. + */ +AudiomanagerRoutinginterface *object_peek_audiomanager_routinginterface (Object *object) +{ + GDBusInterface *ret; + ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.genivi.audiomanager.routinginterface"); + if (ret == NULL) + return NULL; + g_object_unref (ret); + return AUDIOMANAGER_ROUTINGINTERFACE (ret); +} + +/** + * object_peek_audiomanager_routing_soundmanager: (skip) + * @object: A #Object. + * + * Like object_get_audiomanager_routing_soundmanager() but doesn't increase the reference count on the returned object. + * + * It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running. + * + * Returns: (transfer none): A #AudiomanagerRoutingSoundmanager or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object. + */ +AudiomanagerRoutingSoundmanager *object_peek_audiomanager_routing_soundmanager (Object *object) +{ + GDBusInterface *ret; + ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.genivi.audiomanager.routing.soundmanager"); + if (ret == NULL) + return NULL; + g_object_unref (ret); + return AUDIOMANAGER_ROUTING_SOUNDMANAGER (ret); +} + + +static void +object_notify (GDBusObject *object, GDBusInterface *interface) +{ + _ExtendedGDBusInterfaceInfo *info = (_ExtendedGDBusInterfaceInfo *) g_dbus_interface_get_info (interface); + /* info can be NULL if the other end is using a D-Bus interface we don't know + * anything about, for example old generated code in this process talking to + * newer generated code in the other process. */ + if (info != NULL) + g_object_notify (G_OBJECT (object), info->hyphen_name); +} + +/** + * ObjectProxy: + * + * The #ObjectProxy structure contains only private data and should only be accessed using the provided API. + */ + +/** + * ObjectProxyClass: + * @parent_class: The parent class. + * + * Class structure for #ObjectProxy. + */ + +static void +object_proxy__object_iface_init (ObjectIface *iface G_GNUC_UNUSED) +{ +} + +static void +object_proxy__g_dbus_object_iface_init (GDBusObjectIface *iface) +{ + iface->interface_added = object_notify; + iface->interface_removed = object_notify; +} + + +G_DEFINE_TYPE_WITH_CODE (ObjectProxy, object_proxy, G_TYPE_DBUS_OBJECT_PROXY, + G_IMPLEMENT_INTERFACE (TYPE_OBJECT, object_proxy__object_iface_init) + G_IMPLEMENT_INTERFACE (G_TYPE_DBUS_OBJECT, object_proxy__g_dbus_object_iface_init)); + +static void +object_proxy_init (ObjectProxy *object G_GNUC_UNUSED) +{ +} + +static void +object_proxy_set_property (GObject *gobject, + guint prop_id, + const GValue *value G_GNUC_UNUSED, + GParamSpec *pspec) +{ + G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec); +} + +static void +object_proxy_get_property (GObject *gobject, + guint prop_id, + GValue *value, + GParamSpec *pspec) +{ + ObjectProxy *object = OBJECT_PROXY (gobject); + GDBusInterface *interface; + + switch (prop_id) + { + case 1: + interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.genivi.audiomanager.commandinterface"); + g_value_take_object (value, interface); + break; + + case 2: + interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.genivi.audiomanager.routinginterface"); + g_value_take_object (value, interface); + break; + + case 3: + interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.genivi.audiomanager.routing.soundmanager"); + g_value_take_object (value, interface); + break; + + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec); + break; + } +} + +static void +object_proxy_class_init (ObjectProxyClass *klass) +{ + GObjectClass *gobject_class = G_OBJECT_CLASS (klass); + + gobject_class->set_property = object_proxy_set_property; + gobject_class->get_property = object_proxy_get_property; + + g_object_class_override_property (gobject_class, 1, "audiomanager-commandinterface"); + g_object_class_override_property (gobject_class, 2, "audiomanager-routinginterface"); + g_object_class_override_property (gobject_class, 3, "audiomanager-routing-soundmanager"); +} + +/** + * object_proxy_new: + * @connection: A #GDBusConnection. + * @object_path: An object path. + * + * Creates a new proxy object. + * + * Returns: (transfer full): The proxy object. + */ +ObjectProxy * +object_proxy_new (GDBusConnection *connection, + const gchar *object_path) +{ + g_return_val_if_fail (G_IS_DBUS_CONNECTION (connection), NULL); + g_return_val_if_fail (g_variant_is_object_path (object_path), NULL); + return OBJECT_PROXY (g_object_new (TYPE_OBJECT_PROXY, "g-connection", connection, "g-object-path", object_path, NULL)); +} + +/** + * ObjectSkeleton: + * + * The #ObjectSkeleton structure contains only private data and should only be accessed using the provided API. + */ + +/** + * ObjectSkeletonClass: + * @parent_class: The parent class. + * + * Class structure for #ObjectSkeleton. + */ + +static void +object_skeleton__object_iface_init (ObjectIface *iface G_GNUC_UNUSED) +{ +} + + +static void +object_skeleton__g_dbus_object_iface_init (GDBusObjectIface *iface) +{ + iface->interface_added = object_notify; + iface->interface_removed = object_notify; +} + +G_DEFINE_TYPE_WITH_CODE (ObjectSkeleton, object_skeleton, G_TYPE_DBUS_OBJECT_SKELETON, + G_IMPLEMENT_INTERFACE (TYPE_OBJECT, object_skeleton__object_iface_init) + G_IMPLEMENT_INTERFACE (G_TYPE_DBUS_OBJECT, object_skeleton__g_dbus_object_iface_init)); + +static void +object_skeleton_init (ObjectSkeleton *object G_GNUC_UNUSED) +{ +} + +static void +object_skeleton_set_property (GObject *gobject, + guint prop_id, + const GValue *value, + GParamSpec *pspec) +{ + ObjectSkeleton *object = OBJECT_SKELETON (gobject); + GDBusInterfaceSkeleton *interface; + + switch (prop_id) + { + case 1: + interface = g_value_get_object (value); + if (interface != NULL) + { + g_warn_if_fail (IS_AUDIOMANAGER_COMMANDINTERFACE (interface)); + g_dbus_object_skeleton_add_interface (G_DBUS_OBJECT_SKELETON (object), interface); + } + else + { + g_dbus_object_skeleton_remove_interface_by_name (G_DBUS_OBJECT_SKELETON (object), "org.genivi.audiomanager.commandinterface"); + } + break; + + case 2: + interface = g_value_get_object (value); + if (interface != NULL) + { + g_warn_if_fail (IS_AUDIOMANAGER_ROUTINGINTERFACE (interface)); + g_dbus_object_skeleton_add_interface (G_DBUS_OBJECT_SKELETON (object), interface); + } + else + { + g_dbus_object_skeleton_remove_interface_by_name (G_DBUS_OBJECT_SKELETON (object), "org.genivi.audiomanager.routinginterface"); + } + break; + + case 3: + interface = g_value_get_object (value); + if (interface != NULL) + { + g_warn_if_fail (IS_AUDIOMANAGER_ROUTING_SOUNDMANAGER (interface)); + g_dbus_object_skeleton_add_interface (G_DBUS_OBJECT_SKELETON (object), interface); + } + else + { + g_dbus_object_skeleton_remove_interface_by_name (G_DBUS_OBJECT_SKELETON (object), "org.genivi.audiomanager.routing.soundmanager"); + } + break; + + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec); + break; + } +} + +static void +object_skeleton_get_property (GObject *gobject, + guint prop_id, + GValue *value, + GParamSpec *pspec) +{ + ObjectSkeleton *object = OBJECT_SKELETON (gobject); + GDBusInterface *interface; + + switch (prop_id) + { + case 1: + interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.genivi.audiomanager.commandinterface"); + g_value_take_object (value, interface); + break; + + case 2: + interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.genivi.audiomanager.routinginterface"); + g_value_take_object (value, interface); + break; + + case 3: + interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.genivi.audiomanager.routing.soundmanager"); + g_value_take_object (value, interface); + break; + + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec); + break; + } +} + +static void +object_skeleton_class_init (ObjectSkeletonClass *klass) +{ + GObjectClass *gobject_class = G_OBJECT_CLASS (klass); + + gobject_class->set_property = object_skeleton_set_property; + gobject_class->get_property = object_skeleton_get_property; + + g_object_class_override_property (gobject_class, 1, "audiomanager-commandinterface"); + g_object_class_override_property (gobject_class, 2, "audiomanager-routinginterface"); + g_object_class_override_property (gobject_class, 3, "audiomanager-routing-soundmanager"); +} + +/** + * object_skeleton_new: + * @object_path: An object path. + * + * Creates a new skeleton object. + * + * Returns: (transfer full): The skeleton object. + */ +ObjectSkeleton * +object_skeleton_new (const gchar *object_path) +{ + g_return_val_if_fail (g_variant_is_object_path (object_path), NULL); + return OBJECT_SKELETON (g_object_new (TYPE_OBJECT_SKELETON, "g-object-path", object_path, NULL)); +} + +/** + * object_skeleton_set_audiomanager_commandinterface: + * @object: A #ObjectSkeleton. + * @interface_: (allow-none): A #AudiomanagerCommandinterface or %NULL to clear the interface. + * + * Sets the #AudiomanagerCommandinterface instance for the D-Bus interface org.genivi.audiomanager.commandinterface on @object. + */ +void object_skeleton_set_audiomanager_commandinterface (ObjectSkeleton *object, AudiomanagerCommandinterface *interface_) +{ + g_object_set (G_OBJECT (object), "audiomanager-commandinterface", interface_, NULL); +} + +/** + * object_skeleton_set_audiomanager_routinginterface: + * @object: A #ObjectSkeleton. + * @interface_: (allow-none): A #AudiomanagerRoutinginterface or %NULL to clear the interface. + * + * Sets the #AudiomanagerRoutinginterface instance for the D-Bus interface org.genivi.audiomanager.routinginterface on @object. + */ +void object_skeleton_set_audiomanager_routinginterface (ObjectSkeleton *object, AudiomanagerRoutinginterface *interface_) +{ + g_object_set (G_OBJECT (object), "audiomanager-routinginterface", interface_, NULL); +} + +/** + * object_skeleton_set_audiomanager_routing_soundmanager: + * @object: A #ObjectSkeleton. + * @interface_: (allow-none): A #AudiomanagerRoutingSoundmanager or %NULL to clear the interface. + * + * Sets the #AudiomanagerRoutingSoundmanager instance for the D-Bus interface org.genivi.audiomanager.routing.soundmanager on @object. + */ +void object_skeleton_set_audiomanager_routing_soundmanager (ObjectSkeleton *object, AudiomanagerRoutingSoundmanager *interface_) +{ + g_object_set (G_OBJECT (object), "audiomanager-routing-soundmanager", interface_, NULL); +} + + +/* ------------------------------------------------------------------------ + * Code for ObjectManager client + * ------------------------------------------------------------------------ + */ + +/** + * SECTION:ObjectManagerClient + * @title: ObjectManagerClient + * @short_description: Generated GDBusObjectManagerClient type + * + * This section contains a #GDBusObjectManagerClient that uses object_manager_client_get_proxy_type() as the #GDBusProxyTypeFunc. + */ + +/** + * ObjectManagerClient: + * + * The #ObjectManagerClient structure contains only private data and should only be accessed using the provided API. + */ + +/** + * ObjectManagerClientClass: + * @parent_class: The parent class. + * + * Class structure for #ObjectManagerClient. + */ + +G_DEFINE_TYPE (ObjectManagerClient, object_manager_client, G_TYPE_DBUS_OBJECT_MANAGER_CLIENT); + +static void +object_manager_client_init (ObjectManagerClient *manager G_GNUC_UNUSED) +{ +} + +static void +object_manager_client_class_init (ObjectManagerClientClass *klass G_GNUC_UNUSED) +{ +} + +/** + * object_manager_client_get_proxy_type: + * @manager: A #GDBusObjectManagerClient. + * @object_path: The object path of the remote object (unused). + * @interface_name: (allow-none): Interface name of the remote object or %NULL to get the object proxy #GType. + * @user_data: User data (unused). + * + * A #GDBusProxyTypeFunc that maps @interface_name to the generated #GDBusObjectProxy- and #GDBusProxy-derived types. + * + * Returns: A #GDBusProxy-derived #GType if @interface_name is not %NULL, otherwise the #GType for #ObjectProxy. + */ +GType +object_manager_client_get_proxy_type (GDBusObjectManagerClient *manager G_GNUC_UNUSED, const gchar *object_path G_GNUC_UNUSED, const gchar *interface_name, gpointer user_data G_GNUC_UNUSED) +{ + static gsize once_init_value = 0; + static GHashTable *lookup_hash; + GType ret; + + if (interface_name == NULL) + return TYPE_OBJECT_PROXY; + if (g_once_init_enter (&once_init_value)) + { + lookup_hash = g_hash_table_new (g_str_hash, g_str_equal); + g_hash_table_insert (lookup_hash, (gpointer) "org.genivi.audiomanager.commandinterface", GSIZE_TO_POINTER (TYPE_AUDIOMANAGER_COMMANDINTERFACE_PROXY)); + g_hash_table_insert (lookup_hash, (gpointer) "org.genivi.audiomanager.routinginterface", GSIZE_TO_POINTER (TYPE_AUDIOMANAGER_ROUTINGINTERFACE_PROXY)); + g_hash_table_insert (lookup_hash, (gpointer) "org.genivi.audiomanager.routing.soundmanager", GSIZE_TO_POINTER (TYPE_AUDIOMANAGER_ROUTING_SOUNDMANAGER_PROXY)); + g_once_init_leave (&once_init_value, 1); + } + ret = (GType) GPOINTER_TO_SIZE (g_hash_table_lookup (lookup_hash, interface_name)); + if (ret == (GType) 0) + ret = G_TYPE_DBUS_PROXY; + return ret; +} + +/** + * object_manager_client_new: + * @connection: A #GDBusConnection. + * @flags: Flags from the #GDBusObjectManagerClientFlags enumeration. + * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. + * @object_path: An object path. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied. + * @user_data: User data to pass to @callback. + * + * Asynchronously creates #GDBusObjectManagerClient using object_manager_client_get_proxy_type() as the #GDBusProxyTypeFunc. See g_dbus_object_manager_client_new() for more details. + * + * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. + * You can then call object_manager_client_new_finish() to get the result of the operation. + * + * See object_manager_client_new_sync() for the synchronous, blocking version of this constructor. + */ +void +object_manager_client_new ( + GDBusConnection *connection, + GDBusObjectManagerClientFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_async_initable_new_async (TYPE_OBJECT_MANAGER_CLIENT, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "flags", flags, "name", name, "connection", connection, "object-path", object_path, "get-proxy-type-func", object_manager_client_get_proxy_type, NULL); +} + +/** + * object_manager_client_new_finish: + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to object_manager_client_new(). + * @error: Return location for error or %NULL + * + * Finishes an operation started with object_manager_client_new(). + * + * Returns: (transfer full) (type ObjectManagerClient): The constructed object manager client or %NULL if @error is set. + */ +GDBusObjectManager * +object_manager_client_new_finish ( + GAsyncResult *res, + GError **error) +{ + GObject *ret; + GObject *source_object; + source_object = g_async_result_get_source_object (res); + ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error); + g_object_unref (source_object); + if (ret != NULL) + return G_DBUS_OBJECT_MANAGER (ret); + else + return NULL; +} + +/** + * object_manager_client_new_sync: + * @connection: A #GDBusConnection. + * @flags: Flags from the #GDBusObjectManagerClientFlags enumeration. + * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. + * @object_path: An object path. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL + * + * Synchronously creates #GDBusObjectManagerClient using object_manager_client_get_proxy_type() as the #GDBusProxyTypeFunc. See g_dbus_object_manager_client_new_sync() for more details. + * + * The calling thread is blocked until a reply is received. + * + * See object_manager_client_new() for the asynchronous version of this constructor. + * + * Returns: (transfer full) (type ObjectManagerClient): The constructed object manager client or %NULL if @error is set. + */ +GDBusObjectManager * +object_manager_client_new_sync ( + GDBusConnection *connection, + GDBusObjectManagerClientFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GError **error) +{ + GInitable *ret; + ret = g_initable_new (TYPE_OBJECT_MANAGER_CLIENT, cancellable, error, "flags", flags, "name", name, "connection", connection, "object-path", object_path, "get-proxy-type-func", object_manager_client_get_proxy_type, NULL); + if (ret != NULL) + return G_DBUS_OBJECT_MANAGER (ret); + else + return NULL; +} + + +/** + * object_manager_client_new_for_bus: + * @bus_type: A #GBusType. + * @flags: Flags from the #GDBusObjectManagerClientFlags enumeration. + * @name: A bus name (well-known or unique). + * @object_path: An object path. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied. + * @user_data: User data to pass to @callback. + * + * Like object_manager_client_new() but takes a #GBusType instead of a #GDBusConnection. + * + * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. + * You can then call object_manager_client_new_for_bus_finish() to get the result of the operation. + * + * See object_manager_client_new_for_bus_sync() for the synchronous, blocking version of this constructor. + */ +void +object_manager_client_new_for_bus ( + GBusType bus_type, + GDBusObjectManagerClientFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_async_initable_new_async (TYPE_OBJECT_MANAGER_CLIENT, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "flags", flags, "name", name, "bus-type", bus_type, "object-path", object_path, "get-proxy-type-func", object_manager_client_get_proxy_type, NULL); +} + +/** + * object_manager_client_new_for_bus_finish: + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to object_manager_client_new_for_bus(). + * @error: Return location for error or %NULL + * + * Finishes an operation started with object_manager_client_new_for_bus(). + * + * Returns: (transfer full) (type ObjectManagerClient): The constructed object manager client or %NULL if @error is set. + */ +GDBusObjectManager * +object_manager_client_new_for_bus_finish ( + GAsyncResult *res, + GError **error) +{ + GObject *ret; + GObject *source_object; + source_object = g_async_result_get_source_object (res); + ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error); + g_object_unref (source_object); + if (ret != NULL) + return G_DBUS_OBJECT_MANAGER (ret); + else + return NULL; +} + +/** + * object_manager_client_new_for_bus_sync: + * @bus_type: A #GBusType. + * @flags: Flags from the #GDBusObjectManagerClientFlags enumeration. + * @name: A bus name (well-known or unique). + * @object_path: An object path. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL + * + * Like object_manager_client_new_sync() but takes a #GBusType instead of a #GDBusConnection. + * + * The calling thread is blocked until a reply is received. + * + * See object_manager_client_new_for_bus() for the asynchronous version of this constructor. + * + * Returns: (transfer full) (type ObjectManagerClient): The constructed object manager client or %NULL if @error is set. + */ +GDBusObjectManager * +object_manager_client_new_for_bus_sync ( + GBusType bus_type, + GDBusObjectManagerClientFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GError **error) +{ + GInitable *ret; + ret = g_initable_new (TYPE_OBJECT_MANAGER_CLIENT, cancellable, error, "flags", flags, "name", name, "bus-type", bus_type, "object-path", object_path, "get-proxy-type-func", object_manager_client_get_proxy_type, NULL); + if (ret != NULL) + return G_DBUS_OBJECT_MANAGER (ret); + else + return NULL; +} + + diff --git a/src/dbus/audio_manager_interface.h b/src/dbus/audio_manager_interface.h new file mode 100644 index 0000000..c2568f1 --- /dev/null +++ b/src/dbus/audio_manager_interface.h @@ -0,0 +1,1517 @@ +/* + * Generated by gdbus-codegen 2.40.2. DO NOT EDIT. + * + * The license of this code is the same as for the source it was derived from. + */ + +#ifndef __AUDIO_MANAGER_INTERFACE_H__ +#define __AUDIO_MANAGER_INTERFACE_H__ + +#include + +G_BEGIN_DECLS + + +/* ------------------------------------------------------------------------ */ +/* Declarations for org.genivi.audiomanager.commandinterface */ + +#define TYPE_AUDIOMANAGER_COMMANDINTERFACE (audiomanager_commandinterface_get_type ()) +#define AUDIOMANAGER_COMMANDINTERFACE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_AUDIOMANAGER_COMMANDINTERFACE, AudiomanagerCommandinterface)) +#define IS_AUDIOMANAGER_COMMANDINTERFACE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_AUDIOMANAGER_COMMANDINTERFACE)) +#define AUDIOMANAGER_COMMANDINTERFACE_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), TYPE_AUDIOMANAGER_COMMANDINTERFACE, AudiomanagerCommandinterfaceIface)) + +struct _AudiomanagerCommandinterface; +typedef struct _AudiomanagerCommandinterface AudiomanagerCommandinterface; +typedef struct _AudiomanagerCommandinterfaceIface AudiomanagerCommandinterfaceIface; + +struct _AudiomanagerCommandinterfaceIface +{ + GTypeInterface parent_iface; + + + gboolean (*handle_connect) ( + AudiomanagerCommandinterface *object, + GDBusMethodInvocation *invocation, + guint16 arg_sourceID, + guint16 arg_sinkID); + + gboolean (*handle_disconnect) ( + AudiomanagerCommandinterface *object, + GDBusMethodInvocation *invocation, + guint16 arg_mainConnectionID); + + gboolean (*handle_get_list_main_connections) ( + AudiomanagerCommandinterface *object, + GDBusMethodInvocation *invocation); + + gboolean (*handle_get_list_main_sinks) ( + AudiomanagerCommandinterface *object, + GDBusMethodInvocation *invocation); + + gboolean (*handle_set_sink_mute_state) ( + AudiomanagerCommandinterface *object, + GDBusMethodInvocation *invocation, + guint16 arg_sinkID, + gint16 arg_muteState); + + gboolean (*handle_set_volume) ( + AudiomanagerCommandinterface *object, + GDBusMethodInvocation *invocation, + guint16 arg_sinkID, + gint16 arg_volume); + + gboolean (*handle_volume_step) ( + AudiomanagerCommandinterface *object, + GDBusMethodInvocation *invocation, + guint16 arg_sinkID, + gint16 arg_volumeStep); + + void (*main_connection_state_changed) ( + AudiomanagerCommandinterface *object, + guint16 arg_connectionID, + gint16 arg_connectionState); + + void (*new_main_connection) ( + AudiomanagerCommandinterface *object, + GVariant *arg_mainConnection); + + void (*removed_main_connection) ( + AudiomanagerCommandinterface *object, + guint16 arg_mainConnectionId); + + void (*sink_mute_state_changed) ( + AudiomanagerCommandinterface *object, + guint16 arg_sinkID, + gint16 arg_muteState); + + void (*system_property_changed) ( + AudiomanagerCommandinterface *object, + GVariant *arg_SystemProperty); + + void (*volume_changed) ( + AudiomanagerCommandinterface *object, + guint16 arg_sinkID, + gint16 arg_volume); + +}; + +GType audiomanager_commandinterface_get_type (void) G_GNUC_CONST; + +GDBusInterfaceInfo *audiomanager_commandinterface_interface_info (void); +guint audiomanager_commandinterface_override_properties (GObjectClass *klass, guint property_id_begin); + + +/* D-Bus method call completion functions: */ +void audiomanager_commandinterface_complete_connect ( + AudiomanagerCommandinterface *object, + GDBusMethodInvocation *invocation, + gint16 result, + guint16 mainConnectionID); + +void audiomanager_commandinterface_complete_disconnect ( + AudiomanagerCommandinterface *object, + GDBusMethodInvocation *invocation, + gint16 result); + +void audiomanager_commandinterface_complete_set_volume ( + AudiomanagerCommandinterface *object, + GDBusMethodInvocation *invocation, + gint16 result); + +void audiomanager_commandinterface_complete_volume_step ( + AudiomanagerCommandinterface *object, + GDBusMethodInvocation *invocation, + gint16 result); + +void audiomanager_commandinterface_complete_set_sink_mute_state ( + AudiomanagerCommandinterface *object, + GDBusMethodInvocation *invocation, + gint16 result); + +void audiomanager_commandinterface_complete_get_list_main_connections ( + AudiomanagerCommandinterface *object, + GDBusMethodInvocation *invocation, + gint16 result, + GVariant *listConnections); + +void audiomanager_commandinterface_complete_get_list_main_sinks ( + AudiomanagerCommandinterface *object, + GDBusMethodInvocation *invocation, + gint16 result, + GVariant *listMainSinks); + + + +/* D-Bus signal emissions functions: */ +void audiomanager_commandinterface_emit_new_main_connection ( + AudiomanagerCommandinterface *object, + GVariant *arg_mainConnection); + +void audiomanager_commandinterface_emit_removed_main_connection ( + AudiomanagerCommandinterface *object, + guint16 arg_mainConnectionId); + +void audiomanager_commandinterface_emit_main_connection_state_changed ( + AudiomanagerCommandinterface *object, + guint16 arg_connectionID, + gint16 arg_connectionState); + +void audiomanager_commandinterface_emit_volume_changed ( + AudiomanagerCommandinterface *object, + guint16 arg_sinkID, + gint16 arg_volume); + +void audiomanager_commandinterface_emit_sink_mute_state_changed ( + AudiomanagerCommandinterface *object, + guint16 arg_sinkID, + gint16 arg_muteState); + +void audiomanager_commandinterface_emit_system_property_changed ( + AudiomanagerCommandinterface *object, + GVariant *arg_SystemProperty); + + + +/* D-Bus method calls: */ +void audiomanager_commandinterface_call_connect ( + AudiomanagerCommandinterface *proxy, + guint16 arg_sourceID, + guint16 arg_sinkID, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean audiomanager_commandinterface_call_connect_finish ( + AudiomanagerCommandinterface *proxy, + gint16 *out_result, + guint16 *out_mainConnectionID, + GAsyncResult *res, + GError **error); + +gboolean audiomanager_commandinterface_call_connect_sync ( + AudiomanagerCommandinterface *proxy, + guint16 arg_sourceID, + guint16 arg_sinkID, + gint16 *out_result, + guint16 *out_mainConnectionID, + GCancellable *cancellable, + GError **error); + +void audiomanager_commandinterface_call_disconnect ( + AudiomanagerCommandinterface *proxy, + guint16 arg_mainConnectionID, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean audiomanager_commandinterface_call_disconnect_finish ( + AudiomanagerCommandinterface *proxy, + gint16 *out_result, + GAsyncResult *res, + GError **error); + +gboolean audiomanager_commandinterface_call_disconnect_sync ( + AudiomanagerCommandinterface *proxy, + guint16 arg_mainConnectionID, + gint16 *out_result, + GCancellable *cancellable, + GError **error); + +void audiomanager_commandinterface_call_set_volume ( + AudiomanagerCommandinterface *proxy, + guint16 arg_sinkID, + gint16 arg_volume, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean audiomanager_commandinterface_call_set_volume_finish ( + AudiomanagerCommandinterface *proxy, + gint16 *out_result, + GAsyncResult *res, + GError **error); + +gboolean audiomanager_commandinterface_call_set_volume_sync ( + AudiomanagerCommandinterface *proxy, + guint16 arg_sinkID, + gint16 arg_volume, + gint16 *out_result, + GCancellable *cancellable, + GError **error); + +void audiomanager_commandinterface_call_volume_step ( + AudiomanagerCommandinterface *proxy, + guint16 arg_sinkID, + gint16 arg_volumeStep, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean audiomanager_commandinterface_call_volume_step_finish ( + AudiomanagerCommandinterface *proxy, + gint16 *out_result, + GAsyncResult *res, + GError **error); + +gboolean audiomanager_commandinterface_call_volume_step_sync ( + AudiomanagerCommandinterface *proxy, + guint16 arg_sinkID, + gint16 arg_volumeStep, + gint16 *out_result, + GCancellable *cancellable, + GError **error); + +void audiomanager_commandinterface_call_set_sink_mute_state ( + AudiomanagerCommandinterface *proxy, + guint16 arg_sinkID, + gint16 arg_muteState, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean audiomanager_commandinterface_call_set_sink_mute_state_finish ( + AudiomanagerCommandinterface *proxy, + gint16 *out_result, + GAsyncResult *res, + GError **error); + +gboolean audiomanager_commandinterface_call_set_sink_mute_state_sync ( + AudiomanagerCommandinterface *proxy, + guint16 arg_sinkID, + gint16 arg_muteState, + gint16 *out_result, + GCancellable *cancellable, + GError **error); + +void audiomanager_commandinterface_call_get_list_main_connections ( + AudiomanagerCommandinterface *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean audiomanager_commandinterface_call_get_list_main_connections_finish ( + AudiomanagerCommandinterface *proxy, + gint16 *out_result, + GVariant **out_listConnections, + GAsyncResult *res, + GError **error); + +gboolean audiomanager_commandinterface_call_get_list_main_connections_sync ( + AudiomanagerCommandinterface *proxy, + gint16 *out_result, + GVariant **out_listConnections, + GCancellable *cancellable, + GError **error); + +void audiomanager_commandinterface_call_get_list_main_sinks ( + AudiomanagerCommandinterface *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean audiomanager_commandinterface_call_get_list_main_sinks_finish ( + AudiomanagerCommandinterface *proxy, + gint16 *out_result, + GVariant **out_listMainSinks, + GAsyncResult *res, + GError **error); + +gboolean audiomanager_commandinterface_call_get_list_main_sinks_sync ( + AudiomanagerCommandinterface *proxy, + gint16 *out_result, + GVariant **out_listMainSinks, + GCancellable *cancellable, + GError **error); + + + +/* ---- */ + +#define TYPE_AUDIOMANAGER_COMMANDINTERFACE_PROXY (audiomanager_commandinterface_proxy_get_type ()) +#define AUDIOMANAGER_COMMANDINTERFACE_PROXY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_AUDIOMANAGER_COMMANDINTERFACE_PROXY, AudiomanagerCommandinterfaceProxy)) +#define AUDIOMANAGER_COMMANDINTERFACE_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), TYPE_AUDIOMANAGER_COMMANDINTERFACE_PROXY, AudiomanagerCommandinterfaceProxyClass)) +#define AUDIOMANAGER_COMMANDINTERFACE_PROXY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TYPE_AUDIOMANAGER_COMMANDINTERFACE_PROXY, AudiomanagerCommandinterfaceProxyClass)) +#define IS_AUDIOMANAGER_COMMANDINTERFACE_PROXY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_AUDIOMANAGER_COMMANDINTERFACE_PROXY)) +#define IS_AUDIOMANAGER_COMMANDINTERFACE_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), TYPE_AUDIOMANAGER_COMMANDINTERFACE_PROXY)) + +typedef struct _AudiomanagerCommandinterfaceProxy AudiomanagerCommandinterfaceProxy; +typedef struct _AudiomanagerCommandinterfaceProxyClass AudiomanagerCommandinterfaceProxyClass; +typedef struct _AudiomanagerCommandinterfaceProxyPrivate AudiomanagerCommandinterfaceProxyPrivate; + +struct _AudiomanagerCommandinterfaceProxy +{ + /*< private >*/ + GDBusProxy parent_instance; + AudiomanagerCommandinterfaceProxyPrivate *priv; +}; + +struct _AudiomanagerCommandinterfaceProxyClass +{ + GDBusProxyClass parent_class; +}; + +GType audiomanager_commandinterface_proxy_get_type (void) G_GNUC_CONST; + +void audiomanager_commandinterface_proxy_new ( + GDBusConnection *connection, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +AudiomanagerCommandinterface *audiomanager_commandinterface_proxy_new_finish ( + GAsyncResult *res, + GError **error); +AudiomanagerCommandinterface *audiomanager_commandinterface_proxy_new_sync ( + GDBusConnection *connection, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GError **error); + +void audiomanager_commandinterface_proxy_new_for_bus ( + GBusType bus_type, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +AudiomanagerCommandinterface *audiomanager_commandinterface_proxy_new_for_bus_finish ( + GAsyncResult *res, + GError **error); +AudiomanagerCommandinterface *audiomanager_commandinterface_proxy_new_for_bus_sync ( + GBusType bus_type, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GError **error); + + +/* ---- */ + +#define TYPE_AUDIOMANAGER_COMMANDINTERFACE_SKELETON (audiomanager_commandinterface_skeleton_get_type ()) +#define AUDIOMANAGER_COMMANDINTERFACE_SKELETON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_AUDIOMANAGER_COMMANDINTERFACE_SKELETON, AudiomanagerCommandinterfaceSkeleton)) +#define AUDIOMANAGER_COMMANDINTERFACE_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), TYPE_AUDIOMANAGER_COMMANDINTERFACE_SKELETON, AudiomanagerCommandinterfaceSkeletonClass)) +#define AUDIOMANAGER_COMMANDINTERFACE_SKELETON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TYPE_AUDIOMANAGER_COMMANDINTERFACE_SKELETON, AudiomanagerCommandinterfaceSkeletonClass)) +#define IS_AUDIOMANAGER_COMMANDINTERFACE_SKELETON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_AUDIOMANAGER_COMMANDINTERFACE_SKELETON)) +#define IS_AUDIOMANAGER_COMMANDINTERFACE_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), TYPE_AUDIOMANAGER_COMMANDINTERFACE_SKELETON)) + +typedef struct _AudiomanagerCommandinterfaceSkeleton AudiomanagerCommandinterfaceSkeleton; +typedef struct _AudiomanagerCommandinterfaceSkeletonClass AudiomanagerCommandinterfaceSkeletonClass; +typedef struct _AudiomanagerCommandinterfaceSkeletonPrivate AudiomanagerCommandinterfaceSkeletonPrivate; + +struct _AudiomanagerCommandinterfaceSkeleton +{ + /*< private >*/ + GDBusInterfaceSkeleton parent_instance; + AudiomanagerCommandinterfaceSkeletonPrivate *priv; +}; + +struct _AudiomanagerCommandinterfaceSkeletonClass +{ + GDBusInterfaceSkeletonClass parent_class; +}; + +GType audiomanager_commandinterface_skeleton_get_type (void) G_GNUC_CONST; + +AudiomanagerCommandinterface *audiomanager_commandinterface_skeleton_new (void); + + +/* ------------------------------------------------------------------------ */ +/* Declarations for org.genivi.audiomanager.routinginterface */ + +#define TYPE_AUDIOMANAGER_ROUTINGINTERFACE (audiomanager_routinginterface_get_type ()) +#define AUDIOMANAGER_ROUTINGINTERFACE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_AUDIOMANAGER_ROUTINGINTERFACE, AudiomanagerRoutinginterface)) +#define IS_AUDIOMANAGER_ROUTINGINTERFACE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_AUDIOMANAGER_ROUTINGINTERFACE)) +#define AUDIOMANAGER_ROUTINGINTERFACE_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), TYPE_AUDIOMANAGER_ROUTINGINTERFACE, AudiomanagerRoutinginterfaceIface)) + +struct _AudiomanagerRoutinginterface; +typedef struct _AudiomanagerRoutinginterface AudiomanagerRoutinginterface; +typedef struct _AudiomanagerRoutinginterfaceIface AudiomanagerRoutinginterfaceIface; + +struct _AudiomanagerRoutinginterfaceIface +{ + GTypeInterface parent_iface; + + + gboolean (*handle_ack_connect) ( + AudiomanagerRoutinginterface *object, + GDBusMethodInvocation *invocation, + guint16 arg_handle, + guint16 arg_connectionID, + guint16 arg_error); + + gboolean (*handle_ack_disconnect) ( + AudiomanagerRoutinginterface *object, + GDBusMethodInvocation *invocation, + guint16 arg_handle, + guint16 arg_connectionID, + guint16 arg_error); + + gboolean (*handle_ack_set_sink_volume) ( + AudiomanagerRoutinginterface *object, + GDBusMethodInvocation *invocation, + guint16 arg_handle, + gint16 arg_volume, + guint16 arg_error); + + gboolean (*handle_ack_set_source_state) ( + AudiomanagerRoutinginterface *object, + GDBusMethodInvocation *invocation, + guint16 arg_handle, + guint16 arg_error); + + gboolean (*handle_ack_set_volumes) ( + AudiomanagerRoutinginterface *object, + GDBusMethodInvocation *invocation, + guint16 arg_handle, + GVariant *arg_listvolumes, + guint16 arg_error); + + gboolean (*handle_ack_sink_notification_configuration) ( + AudiomanagerRoutinginterface *object, + GDBusMethodInvocation *invocation, + guint16 arg_handle, + guint16 arg_error); + + gboolean (*handle_ack_source_notification_configuration) ( + AudiomanagerRoutinginterface *object, + GDBusMethodInvocation *invocation, + guint16 arg_handle, + guint16 arg_error); + + gboolean (*handle_confirm_routing_ready) ( + AudiomanagerRoutinginterface *object, + GDBusMethodInvocation *invocation, + guint16 arg_domainID); + + gboolean (*handle_confirm_routing_rundown) ( + AudiomanagerRoutinginterface *object, + GDBusMethodInvocation *invocation, + guint16 arg_domainID); + + gboolean (*handle_deregister_sink) ( + AudiomanagerRoutinginterface *object, + GDBusMethodInvocation *invocation, + guint16 arg_sinkID); + + gboolean (*handle_deregister_source) ( + AudiomanagerRoutinginterface *object, + GDBusMethodInvocation *invocation, + guint16 arg_sourceID); + + gboolean (*handle_hook_interrupt_status_change) ( + AudiomanagerRoutinginterface *object, + GDBusMethodInvocation *invocation, + guint16 arg_sourceID, + guint16 arg_interruptState); + + gboolean (*handle_hook_source_availablity_status_change) ( + AudiomanagerRoutinginterface *object, + GDBusMethodInvocation *invocation, + guint16 arg_sourceID, + GVariant *arg_availability); + + gboolean (*handle_register_domain) ( + AudiomanagerRoutinginterface *object, + GDBusMethodInvocation *invocation, + GVariant *arg_domaindata, + const gchar *arg_returnBusname, + const gchar *arg_returnPath, + const gchar *arg_returnInterface); + + gboolean (*handle_register_sink) ( + AudiomanagerRoutinginterface *object, + GDBusMethodInvocation *invocation, + GVariant *arg_sinkData); + + gboolean (*handle_register_source) ( + AudiomanagerRoutinginterface *object, + GDBusMethodInvocation *invocation, + GVariant *arg_sourceData); + + void (*set_routing_ready) ( + AudiomanagerRoutinginterface *object); + + void (*set_routing_rundown) ( + AudiomanagerRoutinginterface *object); + +}; + +GType audiomanager_routinginterface_get_type (void) G_GNUC_CONST; + +GDBusInterfaceInfo *audiomanager_routinginterface_interface_info (void); +guint audiomanager_routinginterface_override_properties (GObjectClass *klass, guint property_id_begin); + + +/* D-Bus method call completion functions: */ +void audiomanager_routinginterface_complete_ack_connect ( + AudiomanagerRoutinginterface *object, + GDBusMethodInvocation *invocation); + +void audiomanager_routinginterface_complete_ack_disconnect ( + AudiomanagerRoutinginterface *object, + GDBusMethodInvocation *invocation); + +void audiomanager_routinginterface_complete_ack_set_source_state ( + AudiomanagerRoutinginterface *object, + GDBusMethodInvocation *invocation); + +void audiomanager_routinginterface_complete_ack_set_sink_volume ( + AudiomanagerRoutinginterface *object, + GDBusMethodInvocation *invocation); + +void audiomanager_routinginterface_complete_register_sink ( + AudiomanagerRoutinginterface *object, + GDBusMethodInvocation *invocation, + guint16 sinkID, + guint16 error); + +void audiomanager_routinginterface_complete_deregister_sink ( + AudiomanagerRoutinginterface *object, + GDBusMethodInvocation *invocation, + gint error); + +void audiomanager_routinginterface_complete_register_source ( + AudiomanagerRoutinginterface *object, + GDBusMethodInvocation *invocation, + guint16 sourceID, + guint16 error); + +void audiomanager_routinginterface_complete_deregister_source ( + AudiomanagerRoutinginterface *object, + GDBusMethodInvocation *invocation, + guint16 error); + +void audiomanager_routinginterface_complete_hook_interrupt_status_change ( + AudiomanagerRoutinginterface *object, + GDBusMethodInvocation *invocation); + +void audiomanager_routinginterface_complete_hook_source_availablity_status_change ( + AudiomanagerRoutinginterface *object, + GDBusMethodInvocation *invocation); + +void audiomanager_routinginterface_complete_confirm_routing_ready ( + AudiomanagerRoutinginterface *object, + GDBusMethodInvocation *invocation); + +void audiomanager_routinginterface_complete_confirm_routing_rundown ( + AudiomanagerRoutinginterface *object, + GDBusMethodInvocation *invocation); + +void audiomanager_routinginterface_complete_ack_set_volumes ( + AudiomanagerRoutinginterface *object, + GDBusMethodInvocation *invocation); + +void audiomanager_routinginterface_complete_ack_sink_notification_configuration ( + AudiomanagerRoutinginterface *object, + GDBusMethodInvocation *invocation); + +void audiomanager_routinginterface_complete_ack_source_notification_configuration ( + AudiomanagerRoutinginterface *object, + GDBusMethodInvocation *invocation); + +void audiomanager_routinginterface_complete_register_domain ( + AudiomanagerRoutinginterface *object, + GDBusMethodInvocation *invocation, + guint16 domainid, + guint16 error); + + + +/* D-Bus signal emissions functions: */ +void audiomanager_routinginterface_emit_set_routing_ready ( + AudiomanagerRoutinginterface *object); + +void audiomanager_routinginterface_emit_set_routing_rundown ( + AudiomanagerRoutinginterface *object); + + + +/* D-Bus method calls: */ +void audiomanager_routinginterface_call_ack_connect ( + AudiomanagerRoutinginterface *proxy, + guint16 arg_handle, + guint16 arg_connectionID, + guint16 arg_error, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean audiomanager_routinginterface_call_ack_connect_finish ( + AudiomanagerRoutinginterface *proxy, + GAsyncResult *res, + GError **error); + +gboolean audiomanager_routinginterface_call_ack_connect_sync ( + AudiomanagerRoutinginterface *proxy, + guint16 arg_handle, + guint16 arg_connectionID, + guint16 arg_error, + GCancellable *cancellable, + GError **error); + +void audiomanager_routinginterface_call_ack_disconnect ( + AudiomanagerRoutinginterface *proxy, + guint16 arg_handle, + guint16 arg_connectionID, + guint16 arg_error, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean audiomanager_routinginterface_call_ack_disconnect_finish ( + AudiomanagerRoutinginterface *proxy, + GAsyncResult *res, + GError **error); + +gboolean audiomanager_routinginterface_call_ack_disconnect_sync ( + AudiomanagerRoutinginterface *proxy, + guint16 arg_handle, + guint16 arg_connectionID, + guint16 arg_error, + GCancellable *cancellable, + GError **error); + +void audiomanager_routinginterface_call_ack_set_source_state ( + AudiomanagerRoutinginterface *proxy, + guint16 arg_handle, + guint16 arg_error, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean audiomanager_routinginterface_call_ack_set_source_state_finish ( + AudiomanagerRoutinginterface *proxy, + GAsyncResult *res, + GError **error); + +gboolean audiomanager_routinginterface_call_ack_set_source_state_sync ( + AudiomanagerRoutinginterface *proxy, + guint16 arg_handle, + guint16 arg_error, + GCancellable *cancellable, + GError **error); + +void audiomanager_routinginterface_call_ack_set_sink_volume ( + AudiomanagerRoutinginterface *proxy, + guint16 arg_handle, + gint16 arg_volume, + guint16 arg_error, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean audiomanager_routinginterface_call_ack_set_sink_volume_finish ( + AudiomanagerRoutinginterface *proxy, + GAsyncResult *res, + GError **error); + +gboolean audiomanager_routinginterface_call_ack_set_sink_volume_sync ( + AudiomanagerRoutinginterface *proxy, + guint16 arg_handle, + gint16 arg_volume, + guint16 arg_error, + GCancellable *cancellable, + GError **error); + +void audiomanager_routinginterface_call_register_sink ( + AudiomanagerRoutinginterface *proxy, + GVariant *arg_sinkData, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean audiomanager_routinginterface_call_register_sink_finish ( + AudiomanagerRoutinginterface *proxy, + guint16 *out_sinkID, + guint16 *out_error, + GAsyncResult *res, + GError **error); + +gboolean audiomanager_routinginterface_call_register_sink_sync ( + AudiomanagerRoutinginterface *proxy, + GVariant *arg_sinkData, + guint16 *out_sinkID, + guint16 *out_error, + GCancellable *cancellable, + GError **error); + +void audiomanager_routinginterface_call_deregister_sink ( + AudiomanagerRoutinginterface *proxy, + guint16 arg_sinkID, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean audiomanager_routinginterface_call_deregister_sink_finish ( + AudiomanagerRoutinginterface *proxy, + gint *out_error, + GAsyncResult *res, + GError **error); + +gboolean audiomanager_routinginterface_call_deregister_sink_sync ( + AudiomanagerRoutinginterface *proxy, + guint16 arg_sinkID, + gint *out_error, + GCancellable *cancellable, + GError **error); + +void audiomanager_routinginterface_call_register_source ( + AudiomanagerRoutinginterface *proxy, + GVariant *arg_sourceData, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean audiomanager_routinginterface_call_register_source_finish ( + AudiomanagerRoutinginterface *proxy, + guint16 *out_sourceID, + guint16 *out_error, + GAsyncResult *res, + GError **error); + +gboolean audiomanager_routinginterface_call_register_source_sync ( + AudiomanagerRoutinginterface *proxy, + GVariant *arg_sourceData, + guint16 *out_sourceID, + guint16 *out_error, + GCancellable *cancellable, + GError **error); + +void audiomanager_routinginterface_call_deregister_source ( + AudiomanagerRoutinginterface *proxy, + guint16 arg_sourceID, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean audiomanager_routinginterface_call_deregister_source_finish ( + AudiomanagerRoutinginterface *proxy, + guint16 *out_error, + GAsyncResult *res, + GError **error); + +gboolean audiomanager_routinginterface_call_deregister_source_sync ( + AudiomanagerRoutinginterface *proxy, + guint16 arg_sourceID, + guint16 *out_error, + GCancellable *cancellable, + GError **error); + +void audiomanager_routinginterface_call_hook_interrupt_status_change ( + AudiomanagerRoutinginterface *proxy, + guint16 arg_sourceID, + guint16 arg_interruptState, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean audiomanager_routinginterface_call_hook_interrupt_status_change_finish ( + AudiomanagerRoutinginterface *proxy, + GAsyncResult *res, + GError **error); + +gboolean audiomanager_routinginterface_call_hook_interrupt_status_change_sync ( + AudiomanagerRoutinginterface *proxy, + guint16 arg_sourceID, + guint16 arg_interruptState, + GCancellable *cancellable, + GError **error); + +void audiomanager_routinginterface_call_hook_source_availablity_status_change ( + AudiomanagerRoutinginterface *proxy, + guint16 arg_sourceID, + GVariant *arg_availability, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean audiomanager_routinginterface_call_hook_source_availablity_status_change_finish ( + AudiomanagerRoutinginterface *proxy, + GAsyncResult *res, + GError **error); + +gboolean audiomanager_routinginterface_call_hook_source_availablity_status_change_sync ( + AudiomanagerRoutinginterface *proxy, + guint16 arg_sourceID, + GVariant *arg_availability, + GCancellable *cancellable, + GError **error); + +void audiomanager_routinginterface_call_confirm_routing_ready ( + AudiomanagerRoutinginterface *proxy, + guint16 arg_domainID, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean audiomanager_routinginterface_call_confirm_routing_ready_finish ( + AudiomanagerRoutinginterface *proxy, + GAsyncResult *res, + GError **error); + +gboolean audiomanager_routinginterface_call_confirm_routing_ready_sync ( + AudiomanagerRoutinginterface *proxy, + guint16 arg_domainID, + GCancellable *cancellable, + GError **error); + +void audiomanager_routinginterface_call_confirm_routing_rundown ( + AudiomanagerRoutinginterface *proxy, + guint16 arg_domainID, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean audiomanager_routinginterface_call_confirm_routing_rundown_finish ( + AudiomanagerRoutinginterface *proxy, + GAsyncResult *res, + GError **error); + +gboolean audiomanager_routinginterface_call_confirm_routing_rundown_sync ( + AudiomanagerRoutinginterface *proxy, + guint16 arg_domainID, + GCancellable *cancellable, + GError **error); + +void audiomanager_routinginterface_call_ack_set_volumes ( + AudiomanagerRoutinginterface *proxy, + guint16 arg_handle, + GVariant *arg_listvolumes, + guint16 arg_error, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean audiomanager_routinginterface_call_ack_set_volumes_finish ( + AudiomanagerRoutinginterface *proxy, + GAsyncResult *res, + GError **error); + +gboolean audiomanager_routinginterface_call_ack_set_volumes_sync ( + AudiomanagerRoutinginterface *proxy, + guint16 arg_handle, + GVariant *arg_listvolumes, + guint16 arg_error, + GCancellable *cancellable, + GError **error); + +void audiomanager_routinginterface_call_ack_sink_notification_configuration ( + AudiomanagerRoutinginterface *proxy, + guint16 arg_handle, + guint16 arg_error, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean audiomanager_routinginterface_call_ack_sink_notification_configuration_finish ( + AudiomanagerRoutinginterface *proxy, + GAsyncResult *res, + GError **error); + +gboolean audiomanager_routinginterface_call_ack_sink_notification_configuration_sync ( + AudiomanagerRoutinginterface *proxy, + guint16 arg_handle, + guint16 arg_error, + GCancellable *cancellable, + GError **error); + +void audiomanager_routinginterface_call_ack_source_notification_configuration ( + AudiomanagerRoutinginterface *proxy, + guint16 arg_handle, + guint16 arg_error, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean audiomanager_routinginterface_call_ack_source_notification_configuration_finish ( + AudiomanagerRoutinginterface *proxy, + GAsyncResult *res, + GError **error); + +gboolean audiomanager_routinginterface_call_ack_source_notification_configuration_sync ( + AudiomanagerRoutinginterface *proxy, + guint16 arg_handle, + guint16 arg_error, + GCancellable *cancellable, + GError **error); + +void audiomanager_routinginterface_call_register_domain ( + AudiomanagerRoutinginterface *proxy, + GVariant *arg_domaindata, + const gchar *arg_returnBusname, + const gchar *arg_returnPath, + const gchar *arg_returnInterface, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean audiomanager_routinginterface_call_register_domain_finish ( + AudiomanagerRoutinginterface *proxy, + guint16 *out_domainid, + guint16 *out_error, + GAsyncResult *res, + GError **error); + +gboolean audiomanager_routinginterface_call_register_domain_sync ( + AudiomanagerRoutinginterface *proxy, + GVariant *arg_domaindata, + const gchar *arg_returnBusname, + const gchar *arg_returnPath, + const gchar *arg_returnInterface, + guint16 *out_domainid, + guint16 *out_error, + GCancellable *cancellable, + GError **error); + + + +/* ---- */ + +#define TYPE_AUDIOMANAGER_ROUTINGINTERFACE_PROXY (audiomanager_routinginterface_proxy_get_type ()) +#define AUDIOMANAGER_ROUTINGINTERFACE_PROXY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_AUDIOMANAGER_ROUTINGINTERFACE_PROXY, AudiomanagerRoutinginterfaceProxy)) +#define AUDIOMANAGER_ROUTINGINTERFACE_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), TYPE_AUDIOMANAGER_ROUTINGINTERFACE_PROXY, AudiomanagerRoutinginterfaceProxyClass)) +#define AUDIOMANAGER_ROUTINGINTERFACE_PROXY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TYPE_AUDIOMANAGER_ROUTINGINTERFACE_PROXY, AudiomanagerRoutinginterfaceProxyClass)) +#define IS_AUDIOMANAGER_ROUTINGINTERFACE_PROXY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_AUDIOMANAGER_ROUTINGINTERFACE_PROXY)) +#define IS_AUDIOMANAGER_ROUTINGINTERFACE_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), TYPE_AUDIOMANAGER_ROUTINGINTERFACE_PROXY)) + +typedef struct _AudiomanagerRoutinginterfaceProxy AudiomanagerRoutinginterfaceProxy; +typedef struct _AudiomanagerRoutinginterfaceProxyClass AudiomanagerRoutinginterfaceProxyClass; +typedef struct _AudiomanagerRoutinginterfaceProxyPrivate AudiomanagerRoutinginterfaceProxyPrivate; + +struct _AudiomanagerRoutinginterfaceProxy +{ + /*< private >*/ + GDBusProxy parent_instance; + AudiomanagerRoutinginterfaceProxyPrivate *priv; +}; + +struct _AudiomanagerRoutinginterfaceProxyClass +{ + GDBusProxyClass parent_class; +}; + +GType audiomanager_routinginterface_proxy_get_type (void) G_GNUC_CONST; + +void audiomanager_routinginterface_proxy_new ( + GDBusConnection *connection, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +AudiomanagerRoutinginterface *audiomanager_routinginterface_proxy_new_finish ( + GAsyncResult *res, + GError **error); +AudiomanagerRoutinginterface *audiomanager_routinginterface_proxy_new_sync ( + GDBusConnection *connection, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GError **error); + +void audiomanager_routinginterface_proxy_new_for_bus ( + GBusType bus_type, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +AudiomanagerRoutinginterface *audiomanager_routinginterface_proxy_new_for_bus_finish ( + GAsyncResult *res, + GError **error); +AudiomanagerRoutinginterface *audiomanager_routinginterface_proxy_new_for_bus_sync ( + GBusType bus_type, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GError **error); + + +/* ---- */ + +#define TYPE_AUDIOMANAGER_ROUTINGINTERFACE_SKELETON (audiomanager_routinginterface_skeleton_get_type ()) +#define AUDIOMANAGER_ROUTINGINTERFACE_SKELETON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_AUDIOMANAGER_ROUTINGINTERFACE_SKELETON, AudiomanagerRoutinginterfaceSkeleton)) +#define AUDIOMANAGER_ROUTINGINTERFACE_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), TYPE_AUDIOMANAGER_ROUTINGINTERFACE_SKELETON, AudiomanagerRoutinginterfaceSkeletonClass)) +#define AUDIOMANAGER_ROUTINGINTERFACE_SKELETON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TYPE_AUDIOMANAGER_ROUTINGINTERFACE_SKELETON, AudiomanagerRoutinginterfaceSkeletonClass)) +#define IS_AUDIOMANAGER_ROUTINGINTERFACE_SKELETON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_AUDIOMANAGER_ROUTINGINTERFACE_SKELETON)) +#define IS_AUDIOMANAGER_ROUTINGINTERFACE_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), TYPE_AUDIOMANAGER_ROUTINGINTERFACE_SKELETON)) + +typedef struct _AudiomanagerRoutinginterfaceSkeleton AudiomanagerRoutinginterfaceSkeleton; +typedef struct _AudiomanagerRoutinginterfaceSkeletonClass AudiomanagerRoutinginterfaceSkeletonClass; +typedef struct _AudiomanagerRoutinginterfaceSkeletonPrivate AudiomanagerRoutinginterfaceSkeletonPrivate; + +struct _AudiomanagerRoutinginterfaceSkeleton +{ + /*< private >*/ + GDBusInterfaceSkeleton parent_instance; + AudiomanagerRoutinginterfaceSkeletonPrivate *priv; +}; + +struct _AudiomanagerRoutinginterfaceSkeletonClass +{ + GDBusInterfaceSkeletonClass parent_class; +}; + +GType audiomanager_routinginterface_skeleton_get_type (void) G_GNUC_CONST; + +AudiomanagerRoutinginterface *audiomanager_routinginterface_skeleton_new (void); + + +/* ------------------------------------------------------------------------ */ +/* Declarations for org.genivi.audiomanager.routing.soundmanager */ + +#define TYPE_AUDIOMANAGER_ROUTING_SOUNDMANAGER (audiomanager_routing_soundmanager_get_type ()) +#define AUDIOMANAGER_ROUTING_SOUNDMANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_AUDIOMANAGER_ROUTING_SOUNDMANAGER, AudiomanagerRoutingSoundmanager)) +#define IS_AUDIOMANAGER_ROUTING_SOUNDMANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_AUDIOMANAGER_ROUTING_SOUNDMANAGER)) +#define AUDIOMANAGER_ROUTING_SOUNDMANAGER_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), TYPE_AUDIOMANAGER_ROUTING_SOUNDMANAGER, AudiomanagerRoutingSoundmanagerIface)) + +struct _AudiomanagerRoutingSoundmanager; +typedef struct _AudiomanagerRoutingSoundmanager AudiomanagerRoutingSoundmanager; +typedef struct _AudiomanagerRoutingSoundmanagerIface AudiomanagerRoutingSoundmanagerIface; + +struct _AudiomanagerRoutingSoundmanagerIface +{ + GTypeInterface parent_iface; + + gboolean (*handle_async_abort) ( + AudiomanagerRoutingSoundmanager *object, + GDBusMethodInvocation *invocation, + guint16 arg_handle); + + gboolean (*handle_async_connect) ( + AudiomanagerRoutingSoundmanager *object, + GDBusMethodInvocation *invocation, + guint16 arg_handle, + guint16 arg_connectionID, + guint16 arg_sourceID, + guint16 arg_sinkID, + gint arg_connectionFormat); + + gboolean (*handle_async_disconnect) ( + AudiomanagerRoutingSoundmanager *object, + GDBusMethodInvocation *invocation, + guint16 arg_handle, + guint16 arg_connectionID); + + gboolean (*handle_async_set_sink_volume) ( + AudiomanagerRoutingSoundmanager *object, + GDBusMethodInvocation *invocation, + guint16 arg_handle, + guint16 arg_sinkID, + gint16 arg_volume, + gint16 arg_ramp, + guint16 arg_time); + + gboolean (*handle_async_set_source_state) ( + AudiomanagerRoutingSoundmanager *object, + GDBusMethodInvocation *invocation, + guint16 arg_handle, + guint16 arg_sourceID, + gint arg_sourceState); + +}; + +GType audiomanager_routing_soundmanager_get_type (void) G_GNUC_CONST; + +GDBusInterfaceInfo *audiomanager_routing_soundmanager_interface_info (void); +guint audiomanager_routing_soundmanager_override_properties (GObjectClass *klass, guint property_id_begin); + + +/* D-Bus method call completion functions: */ +void audiomanager_routing_soundmanager_complete_async_abort ( + AudiomanagerRoutingSoundmanager *object, + GDBusMethodInvocation *invocation, + gint16 error); + +void audiomanager_routing_soundmanager_complete_async_connect ( + AudiomanagerRoutingSoundmanager *object, + GDBusMethodInvocation *invocation); + +void audiomanager_routing_soundmanager_complete_async_disconnect ( + AudiomanagerRoutingSoundmanager *object, + GDBusMethodInvocation *invocation); + +void audiomanager_routing_soundmanager_complete_async_set_sink_volume ( + AudiomanagerRoutingSoundmanager *object, + GDBusMethodInvocation *invocation); + +void audiomanager_routing_soundmanager_complete_async_set_source_state ( + AudiomanagerRoutingSoundmanager *object, + GDBusMethodInvocation *invocation); + + + +/* D-Bus method calls: */ +void audiomanager_routing_soundmanager_call_async_abort ( + AudiomanagerRoutingSoundmanager *proxy, + guint16 arg_handle, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean audiomanager_routing_soundmanager_call_async_abort_finish ( + AudiomanagerRoutingSoundmanager *proxy, + gint16 *out_error, + GAsyncResult *res, + GError **error); + +gboolean audiomanager_routing_soundmanager_call_async_abort_sync ( + AudiomanagerRoutingSoundmanager *proxy, + guint16 arg_handle, + gint16 *out_error, + GCancellable *cancellable, + GError **error); + +void audiomanager_routing_soundmanager_call_async_connect ( + AudiomanagerRoutingSoundmanager *proxy, + guint16 arg_handle, + guint16 arg_connectionID, + guint16 arg_sourceID, + guint16 arg_sinkID, + gint arg_connectionFormat, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean audiomanager_routing_soundmanager_call_async_connect_finish ( + AudiomanagerRoutingSoundmanager *proxy, + GAsyncResult *res, + GError **error); + +gboolean audiomanager_routing_soundmanager_call_async_connect_sync ( + AudiomanagerRoutingSoundmanager *proxy, + guint16 arg_handle, + guint16 arg_connectionID, + guint16 arg_sourceID, + guint16 arg_sinkID, + gint arg_connectionFormat, + GCancellable *cancellable, + GError **error); + +void audiomanager_routing_soundmanager_call_async_disconnect ( + AudiomanagerRoutingSoundmanager *proxy, + guint16 arg_handle, + guint16 arg_connectionID, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean audiomanager_routing_soundmanager_call_async_disconnect_finish ( + AudiomanagerRoutingSoundmanager *proxy, + GAsyncResult *res, + GError **error); + +gboolean audiomanager_routing_soundmanager_call_async_disconnect_sync ( + AudiomanagerRoutingSoundmanager *proxy, + guint16 arg_handle, + guint16 arg_connectionID, + GCancellable *cancellable, + GError **error); + +void audiomanager_routing_soundmanager_call_async_set_sink_volume ( + AudiomanagerRoutingSoundmanager *proxy, + guint16 arg_handle, + guint16 arg_sinkID, + gint16 arg_volume, + gint16 arg_ramp, + guint16 arg_time, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean audiomanager_routing_soundmanager_call_async_set_sink_volume_finish ( + AudiomanagerRoutingSoundmanager *proxy, + GAsyncResult *res, + GError **error); + +gboolean audiomanager_routing_soundmanager_call_async_set_sink_volume_sync ( + AudiomanagerRoutingSoundmanager *proxy, + guint16 arg_handle, + guint16 arg_sinkID, + gint16 arg_volume, + gint16 arg_ramp, + guint16 arg_time, + GCancellable *cancellable, + GError **error); + +void audiomanager_routing_soundmanager_call_async_set_source_state ( + AudiomanagerRoutingSoundmanager *proxy, + guint16 arg_handle, + guint16 arg_sourceID, + gint arg_sourceState, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean audiomanager_routing_soundmanager_call_async_set_source_state_finish ( + AudiomanagerRoutingSoundmanager *proxy, + GAsyncResult *res, + GError **error); + +gboolean audiomanager_routing_soundmanager_call_async_set_source_state_sync ( + AudiomanagerRoutingSoundmanager *proxy, + guint16 arg_handle, + guint16 arg_sourceID, + gint arg_sourceState, + GCancellable *cancellable, + GError **error); + + + +/* ---- */ + +#define TYPE_AUDIOMANAGER_ROUTING_SOUNDMANAGER_PROXY (audiomanager_routing_soundmanager_proxy_get_type ()) +#define AUDIOMANAGER_ROUTING_SOUNDMANAGER_PROXY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_AUDIOMANAGER_ROUTING_SOUNDMANAGER_PROXY, AudiomanagerRoutingSoundmanagerProxy)) +#define AUDIOMANAGER_ROUTING_SOUNDMANAGER_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), TYPE_AUDIOMANAGER_ROUTING_SOUNDMANAGER_PROXY, AudiomanagerRoutingSoundmanagerProxyClass)) +#define AUDIOMANAGER_ROUTING_SOUNDMANAGER_PROXY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TYPE_AUDIOMANAGER_ROUTING_SOUNDMANAGER_PROXY, AudiomanagerRoutingSoundmanagerProxyClass)) +#define IS_AUDIOMANAGER_ROUTING_SOUNDMANAGER_PROXY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_AUDIOMANAGER_ROUTING_SOUNDMANAGER_PROXY)) +#define IS_AUDIOMANAGER_ROUTING_SOUNDMANAGER_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), TYPE_AUDIOMANAGER_ROUTING_SOUNDMANAGER_PROXY)) + +typedef struct _AudiomanagerRoutingSoundmanagerProxy AudiomanagerRoutingSoundmanagerProxy; +typedef struct _AudiomanagerRoutingSoundmanagerProxyClass AudiomanagerRoutingSoundmanagerProxyClass; +typedef struct _AudiomanagerRoutingSoundmanagerProxyPrivate AudiomanagerRoutingSoundmanagerProxyPrivate; + +struct _AudiomanagerRoutingSoundmanagerProxy +{ + /*< private >*/ + GDBusProxy parent_instance; + AudiomanagerRoutingSoundmanagerProxyPrivate *priv; +}; + +struct _AudiomanagerRoutingSoundmanagerProxyClass +{ + GDBusProxyClass parent_class; +}; + +GType audiomanager_routing_soundmanager_proxy_get_type (void) G_GNUC_CONST; + +void audiomanager_routing_soundmanager_proxy_new ( + GDBusConnection *connection, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +AudiomanagerRoutingSoundmanager *audiomanager_routing_soundmanager_proxy_new_finish ( + GAsyncResult *res, + GError **error); +AudiomanagerRoutingSoundmanager *audiomanager_routing_soundmanager_proxy_new_sync ( + GDBusConnection *connection, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GError **error); + +void audiomanager_routing_soundmanager_proxy_new_for_bus ( + GBusType bus_type, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +AudiomanagerRoutingSoundmanager *audiomanager_routing_soundmanager_proxy_new_for_bus_finish ( + GAsyncResult *res, + GError **error); +AudiomanagerRoutingSoundmanager *audiomanager_routing_soundmanager_proxy_new_for_bus_sync ( + GBusType bus_type, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GError **error); + + +/* ---- */ + +#define TYPE_AUDIOMANAGER_ROUTING_SOUNDMANAGER_SKELETON (audiomanager_routing_soundmanager_skeleton_get_type ()) +#define AUDIOMANAGER_ROUTING_SOUNDMANAGER_SKELETON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_AUDIOMANAGER_ROUTING_SOUNDMANAGER_SKELETON, AudiomanagerRoutingSoundmanagerSkeleton)) +#define AUDIOMANAGER_ROUTING_SOUNDMANAGER_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), TYPE_AUDIOMANAGER_ROUTING_SOUNDMANAGER_SKELETON, AudiomanagerRoutingSoundmanagerSkeletonClass)) +#define AUDIOMANAGER_ROUTING_SOUNDMANAGER_SKELETON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TYPE_AUDIOMANAGER_ROUTING_SOUNDMANAGER_SKELETON, AudiomanagerRoutingSoundmanagerSkeletonClass)) +#define IS_AUDIOMANAGER_ROUTING_SOUNDMANAGER_SKELETON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_AUDIOMANAGER_ROUTING_SOUNDMANAGER_SKELETON)) +#define IS_AUDIOMANAGER_ROUTING_SOUNDMANAGER_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), TYPE_AUDIOMANAGER_ROUTING_SOUNDMANAGER_SKELETON)) + +typedef struct _AudiomanagerRoutingSoundmanagerSkeleton AudiomanagerRoutingSoundmanagerSkeleton; +typedef struct _AudiomanagerRoutingSoundmanagerSkeletonClass AudiomanagerRoutingSoundmanagerSkeletonClass; +typedef struct _AudiomanagerRoutingSoundmanagerSkeletonPrivate AudiomanagerRoutingSoundmanagerSkeletonPrivate; + +struct _AudiomanagerRoutingSoundmanagerSkeleton +{ + /*< private >*/ + GDBusInterfaceSkeleton parent_instance; + AudiomanagerRoutingSoundmanagerSkeletonPrivate *priv; +}; + +struct _AudiomanagerRoutingSoundmanagerSkeletonClass +{ + GDBusInterfaceSkeletonClass parent_class; +}; + +GType audiomanager_routing_soundmanager_skeleton_get_type (void) G_GNUC_CONST; + +AudiomanagerRoutingSoundmanager *audiomanager_routing_soundmanager_skeleton_new (void); + + +/* ---- */ + +#define TYPE_OBJECT (object_get_type ()) +#define OBJECT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_OBJECT, Object)) +#define IS_OBJECT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_OBJECT)) +#define OBJECT_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), TYPE_OBJECT, Object)) + +struct _Object; +typedef struct _Object Object; +typedef struct _ObjectIface ObjectIface; + +struct _ObjectIface +{ + GTypeInterface parent_iface; +}; + +GType object_get_type (void) G_GNUC_CONST; + +AudiomanagerCommandinterface *object_get_audiomanager_commandinterface (Object *object); +AudiomanagerRoutinginterface *object_get_audiomanager_routinginterface (Object *object); +AudiomanagerRoutingSoundmanager *object_get_audiomanager_routing_soundmanager (Object *object); +AudiomanagerCommandinterface *object_peek_audiomanager_commandinterface (Object *object); +AudiomanagerRoutinginterface *object_peek_audiomanager_routinginterface (Object *object); +AudiomanagerRoutingSoundmanager *object_peek_audiomanager_routing_soundmanager (Object *object); + +#define TYPE_OBJECT_PROXY (object_proxy_get_type ()) +#define OBJECT_PROXY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_OBJECT_PROXY, ObjectProxy)) +#define OBJECT_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), TYPE_OBJECT_PROXY, ObjectProxyClass)) +#define OBJECT_PROXY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TYPE_OBJECT_PROXY, ObjectProxyClass)) +#define IS_OBJECT_PROXY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_OBJECT_PROXY)) +#define IS_OBJECT_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), TYPE_OBJECT_PROXY)) + +typedef struct _ObjectProxy ObjectProxy; +typedef struct _ObjectProxyClass ObjectProxyClass; +typedef struct _ObjectProxyPrivate ObjectProxyPrivate; + +struct _ObjectProxy +{ + /*< private >*/ + GDBusObjectProxy parent_instance; + ObjectProxyPrivate *priv; +}; + +struct _ObjectProxyClass +{ + GDBusObjectProxyClass parent_class; +}; + +GType object_proxy_get_type (void) G_GNUC_CONST; +ObjectProxy *object_proxy_new (GDBusConnection *connection, const gchar *object_path); + +#define TYPE_OBJECT_SKELETON (object_skeleton_get_type ()) +#define OBJECT_SKELETON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_OBJECT_SKELETON, ObjectSkeleton)) +#define OBJECT_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), TYPE_OBJECT_SKELETON, ObjectSkeletonClass)) +#define OBJECT_SKELETON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TYPE_OBJECT_SKELETON, ObjectSkeletonClass)) +#define IS_OBJECT_SKELETON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_OBJECT_SKELETON)) +#define IS_OBJECT_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), TYPE_OBJECT_SKELETON)) + +typedef struct _ObjectSkeleton ObjectSkeleton; +typedef struct _ObjectSkeletonClass ObjectSkeletonClass; +typedef struct _ObjectSkeletonPrivate ObjectSkeletonPrivate; + +struct _ObjectSkeleton +{ + /*< private >*/ + GDBusObjectSkeleton parent_instance; + ObjectSkeletonPrivate *priv; +}; + +struct _ObjectSkeletonClass +{ + GDBusObjectSkeletonClass parent_class; +}; + +GType object_skeleton_get_type (void) G_GNUC_CONST; +ObjectSkeleton *object_skeleton_new (const gchar *object_path); +void object_skeleton_set_audiomanager_commandinterface (ObjectSkeleton *object, AudiomanagerCommandinterface *interface_); +void object_skeleton_set_audiomanager_routinginterface (ObjectSkeleton *object, AudiomanagerRoutinginterface *interface_); +void object_skeleton_set_audiomanager_routing_soundmanager (ObjectSkeleton *object, AudiomanagerRoutingSoundmanager *interface_); + +/* ---- */ + +#define TYPE_OBJECT_MANAGER_CLIENT (object_manager_client_get_type ()) +#define OBJECT_MANAGER_CLIENT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_OBJECT_MANAGER_CLIENT, ObjectManagerClient)) +#define OBJECT_MANAGER_CLIENT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), TYPE_OBJECT_MANAGER_CLIENT, ObjectManagerClientClass)) +#define OBJECT_MANAGER_CLIENT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TYPE_OBJECT_MANAGER_CLIENT, ObjectManagerClientClass)) +#define IS_OBJECT_MANAGER_CLIENT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_OBJECT_MANAGER_CLIENT)) +#define IS_OBJECT_MANAGER_CLIENT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), TYPE_OBJECT_MANAGER_CLIENT)) + +typedef struct _ObjectManagerClient ObjectManagerClient; +typedef struct _ObjectManagerClientClass ObjectManagerClientClass; +typedef struct _ObjectManagerClientPrivate ObjectManagerClientPrivate; + +struct _ObjectManagerClient +{ + /*< private >*/ + GDBusObjectManagerClient parent_instance; + ObjectManagerClientPrivate *priv; +}; + +struct _ObjectManagerClientClass +{ + GDBusObjectManagerClientClass parent_class; +}; + +GType object_manager_client_get_type (void) G_GNUC_CONST; + +GType object_manager_client_get_proxy_type (GDBusObjectManagerClient *manager, const gchar *object_path, const gchar *interface_name, gpointer user_data); + +void object_manager_client_new ( + GDBusConnection *connection, + GDBusObjectManagerClientFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GDBusObjectManager *object_manager_client_new_finish ( + GAsyncResult *res, + GError **error); +GDBusObjectManager *object_manager_client_new_sync ( + GDBusConnection *connection, + GDBusObjectManagerClientFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GError **error); + +void object_manager_client_new_for_bus ( + GBusType bus_type, + GDBusObjectManagerClientFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GDBusObjectManager *object_manager_client_new_for_bus_finish ( + GAsyncResult *res, + GError **error); +GDBusObjectManager *object_manager_client_new_for_bus_sync ( + GBusType bus_type, + GDBusObjectManagerClientFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GError **error); + + +G_END_DECLS + +#endif /* __AUDIO_MANAGER_INTERFACE_H__ */ diff --git a/src/dbus/command_interface.xml b/src/dbus/command_interface.xml new file mode 100644 index 0000000..e33d7fb --- /dev/null +++ b/src/dbus/command_interface.xml @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/dbus/generate_dbus.sh b/src/dbus/generate_dbus.sh new file mode 100755 index 0000000..cacf518 --- /dev/null +++ b/src/dbus/generate_dbus.sh @@ -0,0 +1,24 @@ +# +# 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. +# +#!/bin/sh +echo "generate dbus c code" +gdbus-codegen \ + --interface-prefix org.genivi. \ + --generate-c-code audio_manager_interface \ + --c-generate-object-manager \ + command_interface.xml routing_interface.xml sound_manager_interface.xml + +echo "end generate dbus c code" diff --git a/src/dbus/routing_interface.xml b/src/dbus/routing_interface.xml new file mode 100644 index 0000000..a91d6eb --- /dev/null +++ b/src/dbus/routing_interface.xml @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/dbus/sound_manager_interface.xml b/src/dbus/sound_manager_interface.xml new file mode 100644 index 0000000..df7df04 --- /dev/null +++ b/src/dbus/sound_manager_interface.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/export.map b/src/export.map new file mode 100644 index 0000000..f3961c0 --- /dev/null +++ b/src/export.map @@ -0,0 +1 @@ +{ global: afbBindingV*; local: *; }; \ No newline at end of file diff --git a/src/sm-error.h b/src/sm-error.h new file mode 100644 index 0000000..a963d47 --- /dev/null +++ b/src/sm-error.h @@ -0,0 +1,52 @@ +#ifndef SM_ERROR_H +#define SM_ERROR_H + +char* get_response_audiomanager_massage_error(int am_error_code) +{ + switch (am_error_code){ + case 0: + return "OK"; + case 1: + return "unknown error"; + case 2: + return "value out of range"; + case 3: + return "not used"; + case 4: + return "database error occured"; + case 5: + return "the desired object already exists"; + case 6: + return "there is no change"; + case 7: + return "the desired action is not possible"; + case 8: + return "the desired object is non existent"; + case 9: + return "the asynchronous action was aborted"; + case 10: + return "connectionFormat is not selected"; + case 11: + return "communication error"; + case 100: + return "desired event doesn't exist"; + default: + return "Audio Manager responsed unknown error number"; + } +} + +char* get_source_state_key(int am_source_state){ + switch (am_source_state){ + case 0: + return "unknown"; + case 1: + return "on"; + case 2: + return "off"; + case 3: + return "paused"; + default: + return ""; + } +} +#endif diff --git a/src/sm-helper.c b/src/sm-helper.c new file mode 100644 index 0000000..3300d67 --- /dev/null +++ b/src/sm-helper.c @@ -0,0 +1,231 @@ +/* + * 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 "sm-helper.h" +#include +#include +#include +#include +#include + +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; +} + +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; +} + +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; +} + +void sm_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); +} + +void sm_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); +} + +int sm_search_event_name_index(const char* value) +{ + size_t buf_size = 50; + size_t size = sizeof cmd_evlist / sizeof *cmd_evlist; + int ret = -1; + for(size_t i = 0 ; i < size ; ++i) + { + if(!strncmp(value, cmd_evlist[i], buf_size)) + { + ret = i; + break; + } + } + return ret; +} + +int sm_search_routing_event_name_index(const char* value) +{ + size_t buf_size = 50; + size_t size = sizeof route_evlist / sizeof *route_evlist; + int ret = -1; + for(size_t i = 0 ; i < size ; ++i) + { + if(!strncmp(value, route_evlist[i], buf_size)) + { + ret = i; + break; + } + } + return ret; +} + +GVariant* create_source_data(guint16 sourceID, guint16 domainID, const char* appname, guint16 sourceClassID, + gint32 sourceState, gint16 volume, gboolean visible, struct availability_s availables, + guint16 interrupt, struct sound_property_s soundPropertyList, gint32 connectionFormatList, + struct main_sound_property_s mainPropertyList, struct notification_config_s NConfRouting, + struct notification_config_s NConfCommand) +{ + GVariantBuilder builder; + + AFB_DEBUG("create sourceData %d", __LINE__); + g_variant_builder_init (&builder, G_VARIANT_TYPE ("(qqsqinb(ii)qa(in)aia(in)a(iin)a(iin))")); + g_variant_builder_add (&builder, "q", sourceID); + g_variant_builder_add (&builder, "q", domainID); + g_variant_builder_add (&builder, "s", appname); + g_variant_builder_add (&builder, "q", sourceClassID); + g_variant_builder_add (&builder, "i", sourceState); + g_variant_builder_add (&builder, "n", volume); + g_variant_builder_add (&builder, "b", visible); + g_variant_builder_add (&builder, "(ii)", availables.availability, availables.avalilable_reason); + g_variant_builder_add (&builder, "q", interrupt); + + g_variant_builder_open(&builder, G_VARIANT_TYPE("a(in)")); + g_variant_builder_open(&builder, G_VARIANT_TYPE("(in)")); + g_variant_builder_add (&builder, "i", soundPropertyList.type); + g_variant_builder_add (&builder, "n", soundPropertyList.value); + g_variant_builder_close(&builder); + g_variant_builder_close (&builder); + + g_variant_builder_open(&builder, G_VARIANT_TYPE("ai")); + g_variant_builder_add (&builder, "i", connectionFormatList); + g_variant_builder_close (&builder); + + g_variant_builder_open(&builder, G_VARIANT_TYPE("a(in)")); + g_variant_builder_open(&builder, G_VARIANT_TYPE("(in)")); + g_variant_builder_add (&builder, "i", mainPropertyList.type); + g_variant_builder_add (&builder, "n", mainPropertyList.value); + g_variant_builder_close (&builder); + g_variant_builder_close(&builder); + + g_variant_builder_open(&builder, G_VARIANT_TYPE("a(iin)")); + g_variant_builder_open(&builder, G_VARIANT_TYPE("(iin)")); + g_variant_builder_add (&builder, "i", NConfRouting.type); + g_variant_builder_add (&builder, "i", NConfRouting.status); + g_variant_builder_add (&builder, "n", NConfRouting.parameter); + g_variant_builder_close(&builder); + g_variant_builder_close (&builder); + + + g_variant_builder_open(&builder, G_VARIANT_TYPE("a(iin)")); + g_variant_builder_open(&builder, G_VARIANT_TYPE("(iin)")); + g_variant_builder_add (&builder, "i", NConfCommand.type); + g_variant_builder_add (&builder, "i", NConfCommand.status); + g_variant_builder_add (&builder, "n", NConfCommand.parameter); + g_variant_builder_close(&builder); + g_variant_builder_close (&builder); + + AFB_DEBUG("created sourceData %d", __LINE__); + return g_variant_builder_end (&builder); +} + +GVariant* create_domain_data(struct domain_data* data) +{ + GVariantBuilder builder; + g_variant_builder_init (&builder, G_VARIANT_TYPE ("(qsssbbn)")); + g_variant_builder_add (&builder, "q", data->domainID); + g_variant_builder_add (&builder, "s", data->name); + g_variant_builder_add (&builder, "s", data->busname); + g_variant_builder_add (&builder, "s", data->nodename); + g_variant_builder_add (&builder, "b", data->early); + g_variant_builder_add (&builder, "b", data->complete); + g_variant_builder_add (&builder, "n", data->state); + AFB_DEBUG("created domainData %d", __LINE__); + return g_variant_builder_end (&builder); +} diff --git a/src/sm-helper.h b/src/sm-helper.h new file mode 100644 index 0000000..f6a3601 --- /dev/null +++ b/src/sm-helper.h @@ -0,0 +1,94 @@ +/* + * 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 AM_HELPER_H +#define AM_HELPER_H +#define _GNU_SOURCE +#define AFB_BINDING_VERSION 2 +#include +#include +#include +//#include + +typedef enum REQ_ERROR +{ + REQ_FAIL = -1, + REQ_OK=0, + NOT_NUMBER, + OUT_RANGE +}REQ_ERROR; + +static const char* cmd_evlist[] = { + "volumeChanged", + "newMainConnection", + "removedMainConnection", + "sinkMuteStateChanged", + "mainConnectionStateChanged" +}; + +static const char* route_evlist[] = { + /* Routing event*/ + "setRoutingReady", + "setRoutingRundown", + "asyncConnect", + "asyncSetSourceState", + "asyncDisconnect" +}; + +struct sound_property_s{ + guint16 type; + gint16 value; +}; +struct availability_s{ + gint32 availability; + gint32 avalilable_reason; +}; +struct notification_config_s{ + gint32 type; + gint32 status; + gint16 parameter; +}; +struct main_sound_property_s{ + gint32 type; /* am_CustomMainSoundPropertyType_t */ + gint16 value; +}; + +struct domain_data{ + guint16 domainID; + gchar* name; + gchar* busname; + gchar* nodename; + gboolean early; + gboolean complete; + gint16 state; +}; + +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 sm_add_object_to_json_object(struct json_object* j_obj, int count, ...); +void sm_add_object_to_json_object_func(struct json_object* j_obj, const char* verb_name, int count, ...); +int sm_search_event_name_index(const char* value); +int sm_search_routing_event_name_index(const char* value); +GVariant* create_source_data(guint16 sourceID, guint16 domainID, const char* appname, guint16 sourceClassID, + gint32 sourceState, gint16 volume, gboolean visible, struct availability_s availables, + guint16 interrupt, struct sound_property_s soundPropertyList, gint32 connectionFormatList, + struct main_sound_property_s mainPropertyList, struct notification_config_s NConfRouting, + struct notification_config_s NConfCommand); +GVariant* create_domain_data(struct domain_data*); + + +#endif /*AM_HELPER_H*/ \ No newline at end of file diff --git a/src/soundmanager.c b/src/soundmanager.c new file mode 100644 index 0000000..030b1ab --- /dev/null +++ b/src/soundmanager.c @@ -0,0 +1,1570 @@ +/* + * 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. + */ + +#define _GNU_SOURCE +#define AFB_BINDING_VERSION 2 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "sm-error.h" +#include "sm-helper.h" +#include "dbus/audio_manager_interface.h" + +#define AM_NAME "org.genivi.audiomanager" +#define AM_CMD_PATH "/org/genivi/audiomanager/commandinterface" +#define AM_ROUTE_PATH "/org/genivi/audiomanager/routinginterface" +#define AM_ROUTE_NAME "org.genivi.audiomanager.routinginterface" +#define SOUND_MANAGER_RETURN_INTERFACE "org.genivi.audiomanager.routing.soundmanager" +#define SOUND_MANAGER_BUS_NAME "org.genivi.audiomanager.routing.soundmanager" +#define SOUND_MANAGER_PATH "/org/genivi/audiomanager/routing/soundmanager" + +#define COMMAND_EVENT_NUM 10 +#define ROUTING_EVENT_NUM 10 +#define DEFAULT_SINK 1 +#define DEFAULT_SOURCE_CLASS_ID 100 +#define DYNAMIC_DOMAIN_ID 100 +#define DEFAULT_DOMAIN_ID 0 +#define DYNAMIC_SOURCE_ID 0 +#define DEFAULT_VOLUME 100 +#define DEFAULT_AVAILABLES 1 +#define DEFAULT_CONNECTION_FORMAT 2 +#define DEFAULT_INTERRUPT 0 +#define DEFAULT_SOURCE_STATE 2 +#define DS_CONTROLLED 1 + +#define EVENT_SUBSCRIBE_ERROR_CODE 100 + +const static struct afb_binding_interface *afbitf; +static AudiomanagerCommandinterface *am_cmd_bus; +static AudiomanagerRoutinginterface *am_route_bus; +static AudiomanagerRoutingSoundmanager *sm_adapter; +static AudiomanagerRoutingSoundmanagerIface* sm_itf; +static GDBusConnection* system_conn = NULL; + +static GMainLoop *loop = NULL; +static guint16 SOUNDMANAGER_DOMAIN_ID; +/* To Do hash table is better */ +struct event{ + char* name; + struct afb_event* event; + }; +static struct event command_event_list[COMMAND_EVENT_NUM]; +static struct event routing_event_list[ROUTING_EVENT_NUM]; + +static struct afb_event ev_new_connection; +static struct afb_event ev_removed_main_connection; +static struct afb_event ev_volume_changed; +static struct afb_event ev_sink_mute_state_changed; +static struct afb_event ev_main_connection_state_changed; + +/* Routing interface event */ +static struct afb_event ev_set_routing_ready; +static struct afb_event ev_set_routing_rundown; +static struct afb_event ev_async_connect; +static struct afb_event ev_async_disconnect; +static struct afb_event ev_async_set_source_state; + +static const char _source_id[] = "sourceID"; +static const char _sink_id[] = "sinkID" ; +static const char _sink_name[] = "sinkName" ; +static const char _main_connection_id[] = "mainConnectionID"; +static const char _delay[] = "delay"; +static const char _connection_state[] = "connectionState"; +static const char _connection_id[] = "connectionID"; +static const char _volume[] = "volume"; +static const char _volume_step[] = "volumeStep"; +static const char _mute_state[] = "muteState"; + +static const char _domain_id[] = "domainID"; +static const char _handle[] = "handle"; +static const char _appname[] = "appname"; +static const char _ramp[] = "ramp"; +static const char _time[] = "time"; +static const char _source_state[] = "sourceState"; +static const char _source_class_id[] = "sourceClassID"; +static const char _sink_class_id[] = "sinkClassID"; +static const char _error[] = "error"; +static const char _sink_data[] = "sinkData"; +static const char _source_data[] = "sourceData"; +static const char _interrupt_state[] = "interruptState"; +static const char _availability[] = "availability"; +static const char _list_volumes[] = "listVolumes"; +static const char _payload[] = "payload"; +static const char _connection_format[] = "connectionFormat"; +/* +********** Method of Sound Manager (API) ********** +*/ + +/** + * Call "connect" function of Audio Manager. + * Getting resource right to output audio stream. + * Please input following keys with value into json string object in argument. + * In case of using libsoundmanager, + * json_object *jobj = json_object_new_object(); + * json_object_object_add(jobj, "sourceID", json_object_new_int(100)); + * json_object_object_add(jobj, "sinkID", json_object_new_int(100)); + * call("connect", jobj); + * + * The order of arguments is not important. + * + * #### Parameters + * Request key + * - sourceID : Source ID getting in return value in registerSource or appname. + * - sinkID : Sink ID. This should be more than 0. If no request, defalut value is set by sound manager + * + * This will be changed in near future because these arguments should be aliased like + * sinkID:100 -> sinkID:"speaker" + * + * This will be modified after integrating + * + * #### Rreturn + * - error : Error status number. If error is 0, it means the request is accepted, otherwise error message is attached with error code in reply message. + * + * #### Note + * sourceID and sinkID should be more than 0 + * + */ +static void connect (struct afb_req request) +{ + AFB_DEBUG("call %s", __FUNCTION__); + guint16 source_id = 0, sink_id = 0; + guint16 main_connectionID = 0; + gint16 ret = -1; + REQ_ERROR req_err1 = REQ_FAIL; + REQ_ERROR req_err2 = REQ_FAIL; + GError *err = NULL; + + req_err1 = get_value_uint16(request, _source_id, &source_id); + /* ToDo: Hardware abstraction for application user is needed. + select appname(speaker) or sourceID(sinkID). If appname is desired, it changes to sourceID(sinkID) */ + + const char* default_sink = afb_req_value (request, _sink_id); + if(default_sink != NULL){ + if((strlen("default") == strlen(default_sink)) && + (0 == strncmp("default", default_sink, strlen("default")))){ + sink_id = DEFAULT_SINK; + req_err2 = REQ_OK; + } + else{ + req_err2 = get_value_uint16(request, _sink_id, &sink_id); + } + } + + if((req_err1 != REQ_OK) || (req_err2 != REQ_OK)) + { + AFB_INFO("get_value_uint16 source ret = %d,sink ret = %d", source_id, sink_id); + AFB_NOTICE("wrong request"); + afb_req_fail(request,"wrong-request",NULL); + return; + } + + audiomanager_commandinterface_call_connect_sync( + am_cmd_bus, + source_id, + sink_id, + &ret, + &main_connectionID, + NULL, &err); + + if(err != NULL) + { + afb_req_fail_f(request, "failed", "Unable to call %s", __FUNCTION__); + return; + } + + /* ToDo Remember appname(key) and tie to sourceID(value) */ + + /*create response json object*/ + struct json_object *res = json_object_new_object(); + sm_add_object_to_json_object_func(res, __FUNCTION__, 4, + "error", ret, + _main_connection_id, main_connectionID); + char *info = get_response_audiomanager_massage_error(ret); + afb_req_success(request, res, info); +} + +/** + * Call "disconnect" function of Audio Manager. + * Release resource right to output audio stream. + * + * #### Parameters + * Request key + * - sourceID : Source ID getting in return value in registerSource or appname. + * + * + * #### Rreturn + * - error : Error status number. If error is 0, it means the request is accepted, otherwise error message is attached with error code in reply message. + * + * #### Note + * sourceID should be more than 0 + * + */ +static void disconnect (struct afb_req request) +{ + AFB_DEBUG("call %s", __FUNCTION__); + + guint16 id; + gint16 ret; + REQ_ERROR req_err; + GError *err = NULL; + + req_err = get_value_uint16(request, _main_connection_id, &id); + AFB_DEBUG( "requested %s = %d", _main_connection_id, id); + + if(req_err != REQ_OK) + { + afb_req_fail(request,"wrong-request",afb_req_value (request, _main_connection_id)); + return; + } + audiomanager_commandinterface_call_disconnect_sync( + am_cmd_bus, + id, + &ret, + NULL, &err); + AFB_DEBUG( "ret = %d", ret); + + if(err != NULL) + { + afb_req_fail_f(request, "failed", "Unable to call %s", __FUNCTION__); + return; + } + + struct json_object* res_obj = json_object_new_object(); + sm_add_object_to_json_object_func(res_obj, __FUNCTION__, 2, + _error, ret); + char *info = get_response_audiomanager_massage_error(ret); + + afb_req_success(request, res_obj, info); /* return error num as status */ +} + +/** + * Call "setVolume" function of Audio Manager. + * Set sink volume. + * + * #### Parameters + * Request key + * - volume : volume value. The range of value should be [0-100] + * - sinkID : sinkID you would like to change volume at + * + * #### Rreturn + * - error : Error status number. If error is 0, it means the request is accepted, otherwise error message is attached with error code in reply message. + * + * #### Note + * + */ +static void setVolume (struct afb_req request) +{ + AFB_DEBUG("call %s", __FUNCTION__); + + guint16 sink_id, vol; + gint16 ret; + REQ_ERROR req_err1, req_err2; + GError *err = NULL; + + req_err1 = get_value_uint16(request, _sink_id, &sink_id); + req_err2 = get_value_int16(request, _volume, &vol); + AFB_DEBUG( "requested %s = %d, %s = %d",_sink_id, sink_id, _volume, vol); + if((req_err1 != REQ_OK) || (req_err2 != REQ_OK)) + { + afb_req_fail(request,"wrong-request", NULL); + return; + } + + audiomanager_commandinterface_call_set_volume_sync( + am_cmd_bus, + sink_id, + vol, + &ret, + NULL, &err); + AFB_DEBUG( "ret = %d", ret); + + if(err != NULL) + { + afb_req_fail_f(request, "failed", "Unable to call %s", __FUNCTION__); + return; + } + + struct json_object* res_obj = json_object_new_object(); + sm_add_object_to_json_object_func(res_obj, __FUNCTION__, 2, + "error", ret); + char *info = get_response_audiomanager_massage_error(ret); + + afb_req_success(request, res_obj, info); /* return error num as status */ +} + +/** + * Call "volumeStep" function of Audio Manager. + * Change volume step of sink + * + * #### Parameters + * Request key + * - sinkID : sinkID you would to change volume step + * - volumeStep : Step size of volume + * + * + * #### Rreturn + * - error : Error status number. If error is 0, it means the request is accepted, otherwise error message is attached with error code in reply message. + * + * #### Note + * + */ +static void volumeStep (struct afb_req request) +{ + AFB_DEBUG("call %s", __FUNCTION__); + + guint16 sink_id, vol; + gint16 ret; + REQ_ERROR req_err1, req_err2; + GError *err = NULL; + + req_err1 = get_value_uint16(request, _sink_id, &sink_id); + req_err2 = get_value_int16(request, _volume_step, &vol); + AFB_DEBUG( "requested %s = %d, %s = %d",_sink_id, sink_id, _volume_step, vol); + if((req_err1 != REQ_OK) || (req_err2 != REQ_OK)) + { + afb_req_fail(request,"wrong-request", NULL); + return; + } + + audiomanager_commandinterface_call_volume_step_sync( + am_cmd_bus, + sink_id, + vol, + &ret, + NULL, &err); + AFB_DEBUG( "ret = %d", ret); + + if(err != NULL) + { + afb_req_fail_f(request, "failed", "Unable to call %s", __FUNCTION__); + return; + } + + struct json_object* res_obj = json_object_new_object(); + sm_add_object_to_json_object_func(res_obj, __FUNCTION__, 2, + "error", ret); + char *info = get_response_audiomanager_massage_error(ret); + + afb_req_success(request, res_obj, info); /* return error num as status */ +} + +/** + * Call "volumeStep" function of Audio Manager. + * Change volume step of sink + * + * #### Parameters + * Request key + * - sinkID : sinkID you would like to change mute state + * - muteState : muteState, 1 means mute, 2 means unmute. Or you can designate as "mute" or "unmute" + * + * + * #### Rreturn + * - error : Error status number. If error is 0, it means the request is accepted, otherwise error message is attached with error code in reply message. + * + * #### Note + * + */ +static void setSinkMuteState(struct afb_req request) +{ + AFB_DEBUG("call %s", __FUNCTION__); + + guint16 sink_id, mute; + gint16 ret; + REQ_ERROR req_err1, req_err2; + GError *err = NULL; + + req_err1 = get_value_uint16(request, _sink_id, &sink_id); + req_err2 = get_value_int16(request, _mute_state, &mute); + AFB_DEBUG( "requested %s = %d, %s = %d",_sink_id, sink_id, _mute_state, mute); + if((req_err1 != REQ_OK) || (req_err2 != REQ_OK)) + { + afb_req_fail(request,"wrong-request", NULL); + return; + } + + audiomanager_commandinterface_call_set_sink_mute_state_sync( + am_cmd_bus, + sink_id, + mute, + &ret, + NULL, &err); + AFB_DEBUG( "ret = %d", ret); + + if(err != NULL) + { + afb_req_fail_f(request, "failed", "Unable to call %s", __FUNCTION__); + return; + } + + struct json_object* res_obj = json_object_new_object(); + sm_add_object_to_json_object_func(res_obj, __FUNCTION__, 2, + "error", ret); + char *info = get_response_audiomanager_massage_error(ret); + + afb_req_success(request, res_obj, info); /* return error num as status */ +} + +/** + * Call "getListMainConnections" function of Audio Manager. + * Get mainc connection list + * + * #### Parameters + * Request key + * None + * + * + * #### Rreturn + * - error : Error status number. If error is 0, it means the request is accepted, otherwise error message is attached with error code in reply message. Even if there is no connection list, + * Sound Manager return success. + * + * #### Note + * + */ +static void getListMainConnections(struct afb_req request) +{ + AFB_DEBUG("call getListMainConnections"); + guint16 ret; + GVariant* mainConnectionList; + GError *err = NULL; + + audiomanager_commandinterface_call_get_list_main_connections_sync( + am_cmd_bus, + &ret, + &mainConnectionList, + NULL, + &err + ); + + if(err != NULL) + { + afb_req_fail_f(request, "failed", "Unable to call %s", __FUNCTION__); + return; + } + + /* create response */ + struct json_object *array_res = json_object_new_array(); + gsize size = g_variant_n_children(mainConnectionList); + AFB_DEBUG("mainConnectionList size is %u",(uint16_t)size); + struct json_object *verb_obj = json_object_new_object(); + sm_add_object_to_json_object_func(verb_obj, __FUNCTION__, 0); + json_object_array_add(array_res, verb_obj); + if(size <= 0) + { + AFB_NOTICE( "mainConnectionList size is 0"); + } + else{ + for(int i = 0; i < size; ++i) + { + guint16 mcid, srcid, sinkid; + gint16 delay, constate; + g_variant_get_child( + mainConnectionList,i,"(qqqnn)", + &mcid, &srcid, &sinkid, &delay, &constate + ); + + struct json_object* res_obj = json_object_new_object(); + sm_add_object_to_json_object(res_obj,10, + _main_connection_id, mcid, + _source_id, srcid, + _sink_id, sinkid, + _delay, delay, + _connection_state, constate + ); + json_object_array_add(array_res,res_obj); + } + } + AFB_DEBUG("json object :%s:",json_object_to_json_string(array_res)); + afb_req_success(request, array_res, "Success to get main connection list"); +} + +/** + * Call "getListMainSinks" function of Audio Manager. + * Get main sink list + * + * #### Parameters + * Request key + * None + * + * + * #### Rreturn + * - error : Error status number. If error is 0, it means the request is accepted, otherwise error message is attached with error code in reply message. Even if there is no connection list, + * Sound Manager return success. + * + * #### Note + * + */ +static void getListMainSinks(struct afb_req request) +{ + AFB_DEBUG("call %s", __FUNCTION__); + guint16 ret; + GVariant* mainSinkList; + GError *err = NULL; + + audiomanager_commandinterface_call_get_list_main_sinks_sync( + am_cmd_bus, + &ret, + &mainSinkList, + NULL, + &err + ); + + if(err != NULL) + { + afb_req_fail_f(request, "failed", "Unable to call %s", __FUNCTION__); + return; + } + + /* create response */ + struct json_object *array_res = json_object_new_array(); + gsize size = g_variant_n_children(mainSinkList); + AFB_DEBUG( "%s size is %u",__FUNCTION__, (uint16_t)size); + struct json_object *verb_obj = json_object_new_object(); + sm_add_object_to_json_object_func(verb_obj, __FUNCTION__, 0); + json_object_array_add(array_res, verb_obj); + if(size <= 0) + { + AFB_NOTICE("%s size is 0", __FUNCTION__); + } + else{ + /*for(int i = 0; i < size; ++i) + { + guint16 sinkid, sinkclassid; + gchar* sinkname; + GVariant* available = g_variant_new("(nn)", -1, -1); + gint16 volume, mutestate; + g_variant_get_child( + mainSinkList,i,"(qs(nn)nnq)", + &sinkid, sinkname, &volume, &mutestate, &sinkclassid); + struct json_object* res_obj = json_object_new_object(); + sm_add_object_to_json_object(res_obj,2,_sink_id, sinkid); + json_object_object_add(res_obj, _sink_name, json_object_new_string(sinkname)); + sm_add_object_to_json_object(res_obj,6, + _volume, volume, + _mute_state, mutestate, + _sink_class_id, sinkclassid); + json_object_array_add(array_res,res_obj); + }*/ + } + AFB_DEBUG("json object :%s:",json_object_to_json_string(array_res)); + //afb_req_success(request, array_res, "Success to get main sink list"); + afb_req_success(request, array_res, "This is not implemented yet"); +} +/* +* +****** Routing Interface method(API) *********** +* +*/ + +/** + * Call "ackConnect" function of Audio Manager. + * Return acknowledge of connect against asyncConnect + * + * #### Parameters + * - handle : Handle id when you get on asyncConnect + * - connectionID : connection id when you got on connect return value + * - error : Error Number you would like to send. If error is 0, it means OK. + * If an application has some error, send error number in function then AM release + * resources the application got in connect. + * + * + * #### Rreturn + * - error : Error status number. If error is 0, it means the request is accepted, otherwise error message is attached with error code in reply message. Even if there is no connection list, + * Sound Manager return success. So you should check the contents size of return json object + * + * #### Note + * + */ +static void ackConnect(struct afb_req request) +{ + /* This function will be deprecated */ + AFB_DEBUG("call %s", __FUNCTION__); + guint16 handle, connection_id, error; + guint16 ret = 0; + REQ_ERROR req_err1, req_err2 , req_err3; + GError *err = NULL; + + req_err1 = get_value_uint16(request, _handle, &handle); + req_err2 = get_value_uint16(request, _connection_id, &connection_id); + req_err3 = get_value_uint16(request, _error, &error); + + if((req_err1 != REQ_OK) || (req_err2 != REQ_OK) || (req_err3 != REQ_OK)) + { + afb_req_fail(request,"wrong-request", NULL); + return; + } + if(connection_id == 0) + { + afb_req_fail(request,"wrong-request", "connectionID is more than 0"); + return; + } + + audiomanager_routinginterface_call_ack_connect_sync( + am_route_bus, + handle, + connection_id, + error, + NULL, &err); + + if(err != NULL) + { + afb_req_fail_f(request, "failed", "Unable to call %s", __FUNCTION__); + return; + } + /*create response json object*/ + struct json_object *res = json_object_new_object(); + sm_add_object_to_json_object_func(res, __FUNCTION__, 2, + _error, ret); + char *info = get_response_audiomanager_massage_error(ret); + afb_req_success(request, res, info); +} + +/** + * Call "ackDisconnect" function of Audio Manager. + * Return acknowledge of disconnect against asyncDisconnect + * + * #### Parameters + * - handle : Handle id when you get on asyncDisconnect + * - connectionID : connection id when you got on connect return value + * - error : Error Number you would like to send. If error is 0, it means OK. + * If an application has some error, send error number in function then AM + * + * + * #### Rreturn + * - error : Error status number. If error is 0, it means the request is accepted, otherwise error message is attached with error code in reply message. Even if there is no connection list, + * Sound Manager return success. So you should check the contents size of return json object + * + * #### Note + * + */ +static void ackDisconnect(struct afb_req request) +{ + /* This function will be deprecated */ + AFB_DEBUG("call %s", __FUNCTION__); + guint16 handle, connection_id, error; + guint16 ret = 0; + REQ_ERROR req_err1, req_err2 , req_err3; + GError *err = NULL; + + req_err1 = get_value_uint16(request, _handle, &handle); + req_err2 = get_value_uint16(request, _connection_id, &connection_id); + req_err3 = get_value_uint16(request, _error, &error); + + if((req_err1 != REQ_OK) || (req_err2 != REQ_OK) || (req_err3 != REQ_OK)) + { + afb_req_fail(request,"wrong-request", "connectionID is more than 0"); + return; + } + if(connection_id == 0) + { + afb_req_fail(request,"wrong-request", "connectionID is more than 0"); + return; + } + + audiomanager_routinginterface_call_ack_disconnect_sync( + am_route_bus, + handle, + connection_id, + error, + NULL, &err); + + if(err != NULL) + { + afb_req_fail_f(request, "failed", "Unable to call %s", __FUNCTION__); + return; + } + /*create response json object*/ + struct json_object *res = json_object_new_object(); + sm_add_object_to_json_object_func(res, __FUNCTION__, 2, + _error, ret); + char *info = get_response_audiomanager_massage_error(ret); + afb_req_success(request, res, info); +} + +/** + * Call "ackSetSourceState" function of Audio Manager. + * Return acknowledge of setSourceState against asyncSetSourceState. + * + * #### Parameters + * - handle : Handle id when you get on asyncSetSourceState + * - error : Error Number you would like to send. If error is 0, it means OK. + * If an application has some errors, send error number in function + * + * #### Rreturn + * - error : Error status number. If error is 0, it means the request is accepted, otherwise error message is attached with error code in reply message. + * + * #### Note + * This function is very important for applications to realise the sequence of Audio Management. + * An Application which matches with sourceID in the parameter of asyncSetSourceState has to return ack to use this function + * + */ +static void ackSetSourceState(struct afb_req request) +{ + AFB_DEBUG("call %s", __FUNCTION__); + guint16 handle, error; + guint16 ret = 0; + REQ_ERROR req_err1, req_err2; + GError *err = NULL; + + req_err1 = get_value_uint16(request, _handle, &handle); + req_err2 = get_value_uint16(request, _error, &error); + + if((req_err1 != REQ_OK) || (req_err2 != REQ_OK)) + { + AFB_DEBUG("wrong request"); + afb_req_fail(request,"wrong-request", NULL); + return; + } + + audiomanager_routinginterface_call_ack_set_source_state_sync( + am_route_bus, + handle, + error, + NULL, &err); + + if(err != NULL) + { + afb_req_fail_f(request, "failed", "Unable to call %s", __FUNCTION__); + return; + } + /*create response json object*/ + struct json_object *res = json_object_new_object(); + sm_add_object_to_json_object_func(res, __FUNCTION__, 2, + _error, ret); + char *info = get_response_audiomanager_massage_error(ret); + afb_req_success(request, res, info); +} + +/** + * Call "registerSource" function of Audio Manager. + * Register source(application) to Audio Manager Policy Management + * Application must call this function on its initialization + * + * #### Parameters + * - appname : Application unieque name + * [Option] + * It is not necessary to designate following argument, because these are default value is selected y soundmanager + * If you would like to set value, please input the following key and value + * - sourceClassID : + * - sourceState : + * + * #### Return + * - error : Error status number. If error is 0, it means the request is accepted, otherwise error message is attached with error code in reply message. + * + * #### Note + * + */ +static void registerSource(struct afb_req request) +{ + AFB_DEBUG("call %s", __FUNCTION__); + GError *err = NULL; + + + guint16 source_id; /* q 0 is for dynamic id*/ + guint16 domain_id; /* q */ + guint16 source_class_id; /* q */ + gint32 source_state; /* i */ + gint16 volume; /* n */ + + if(REQ_OK != get_value_uint16(request, _source_id, &source_id)){ + source_id = DYNAMIC_SOURCE_ID; /* if 0, dynamic source id will be applied */ + } + REQ_ERROR req_err = get_value_uint16(request, _domain_id, &domain_id); + if( req_err != REQ_OK){ + if(req_err == REQ_FAIL) + { + domain_id = SOUNDMANAGER_DOMAIN_ID; /* default in AGL */ + } + else{ + afb_req_fail(request,"wrong-request", "Please input domainID as uint16, otherwise no value is OK"); + return; + } + } + if(domain_id == 0) + { + afb_req_fail(request,"wrong-request", "domainID should be more than 0"); + return; + } + const gchar* name = afb_req_value(request, _appname); /* s */ + if(!name) + { + char* info = "Must specify the name. Please input json arg such as {\"appname\":\"radio\"}"; + afb_req_fail(request, NULL, info); + return; + } + if(REQ_OK != get_value_uint16(request, _source_class_id, &source_class_id)){ + source_class_id = DEFAULT_SOURCE_CLASS_ID; /* BASE */ + } + if(REQ_OK != get_value_int32(request, _source_state, &source_state)){ + source_state = DEFAULT_SOURCE_STATE; /* SS_OFF */ + } + if(REQ_OK != get_value_int16(request, _volume, &volume)){ + volume = DEFAULT_VOLUME; + } + gboolean visible = TRUE; /* b */ + struct availability_s available; /* (ii) */ + available.availability = DEFAULT_AVAILABLES; /* A_UNKNOWN */ + available.avalilable_reason = 0; /* AR_UNKNOWN */ + guint16 interrupt = DEFAULT_INTERRUPT; /* q IS_OFF */ + + struct sound_property_s sound_property_list; /* a(in) */ + sound_property_list.type = 0; + sound_property_list.value = 0; /* in reality, this is array of struct */ + + gint32 connection_format_list = DEFAULT_CONNECTION_FORMAT; /* ai */ + struct main_sound_property_s main_property_list; /* a(in) */ + main_property_list.type = 0; + main_property_list.value = 0; + + struct notification_config_s nconf_routing; + struct notification_config_s nconf_command; /* a(iin)a(iin) */ + nconf_routing.type = 0; + nconf_routing.status = 0; + nconf_routing.parameter = 0; + + nconf_command.type = 0; + nconf_command.status = 0; + nconf_command.parameter = 0; + + /* acquire data */ + guint16 acquire_source_id; + guint16 ret; + + GVariant* sourceData = create_source_data (source_id, domain_id, name, source_class_id, + source_state, volume, visible, available, interrupt, + sound_property_list, connection_format_list, main_property_list, + nconf_routing, nconf_command); + + GVariant* input = g_variant_ref_sink(sourceData); + audiomanager_routinginterface_call_register_source_sync( + am_route_bus, + input, + &acquire_source_id, + &ret, + NULL, &err); + g_variant_unref(input); + + if(err != NULL) + { + afb_req_fail_f(request, "failed", "Unable to call %s", __FUNCTION__); + return; + } + + /*create response json object*/ + struct json_object *res = json_object_new_object(); + sm_add_object_to_json_object_func(res, __FUNCTION__, 4, + _error, ret, + _source_id, acquire_source_id); + char *info = get_response_audiomanager_massage_error(ret); + afb_req_success(request, res, info); +} + +/** + * Call "deregisterSource" function of Audio Manager. + * Deregister source(application) to Audio Manager Policy Management + * + * #### Parameters + * - sourceID : sourceID returned in resisterSource + * + * #### Rreturn + * - error : Error status number. If error is 0, it means the request is accepted, otherwise error message is attached with error code in reply message. + * + * #### Note + * + */ +static void deregisterSource(struct afb_req request) +{ + guint16 source_id; + guint16 ret; + + GError *err = NULL; + + if(REQ_OK != get_value_uint16(request, _source_id, &source_id)){ + afb_req_fail(request, "wrong-request", NULL); + } + audiomanager_routinginterface_call_deregister_source_sync( + am_route_bus, + source_id, + &ret, + NULL, &err + ); + if(err != NULL) + { + afb_req_fail_f(request, "failed", "Unable to call %s", __FUNCTION__); + return; + } + /*create response json object*/ + struct json_object *res = json_object_new_object(); + sm_add_object_to_json_object_func(res, __FUNCTION__, 2, + _error, ret); + char *info = get_response_audiomanager_massage_error(ret); + afb_req_success(request, res, info); + +} + +/** + * Subscribe event + * + * #### Parameters + * - event : Event name. Event list is written in libsoundmanager.hpp + * + * #### Rreturn + * - error : Error status number. If error is 0, it means the request is accepted, otherwise error message is attached with error code in reply message. + * + * #### Note + * + */ +static void subscribe(struct afb_req request) +{ + const char *value = afb_req_value(request, "event"); + AFB_DEBUG( "value is %s", value); + int ret = 0; + if(value) { + int index = sm_search_event_name_index(value); + if(index < 0) + { + index = sm_search_routing_event_name_index(value); + if(index < 0) + { + AFB_NOTICE( "dedicated event doesn't exist"); + ret = EVENT_SUBSCRIBE_ERROR_CODE; + } + else + { + afb_req_subscribe(request, *routing_event_list[index].event); + } + } + else + { + afb_req_subscribe(request, *command_event_list[index].event); + } + } + else{ + AFB_NOTICE( "Please input event name"); + ret = EVENT_SUBSCRIBE_ERROR_CODE; + } + /*create response json object*/ + struct json_object *res = json_object_new_object(); + sm_add_object_to_json_object_func(res, __FUNCTION__, 2, + _error, ret); + char *info = get_response_audiomanager_massage_error(ret); + afb_req_success(request, res, info); +} + +/** + * Unsubscribe event + * + * #### Parameters + * - event : Event name. Event list is written in libsoundmanager.hpp + * + * #### Rreturn + * - error : Error status number. If error is 0, it means the request is accepted, otherwise error message is attached with error code in reply message. + * + * #### Note + * + */ +static void unsubscribe(struct afb_req request) +{ + const char *value = afb_req_value(request, "event"); + AFB_DEBUG( "value is %s", value); + int ret = 0; + if(value) { + int index = sm_search_event_name_index(value); + if(index < 0) + { + index = sm_search_routing_event_name_index(value); + if(index < 0) + { + AFB_NOTICE( "dedicated event doesn't exist"); + ret = EVENT_SUBSCRIBE_ERROR_CODE; + } + else + { + afb_req_unsubscribe(request, *routing_event_list[index].event); + } + } + else + { + afb_req_unsubscribe(request, *command_event_list[index].event); + } + } + else{ + AFB_NOTICE( "Please input event name"); + ret = EVENT_SUBSCRIBE_ERROR_CODE; + } + /*create response json object*/ + struct json_object *res = json_object_new_object(); + sm_add_object_to_json_object_func(res, __FUNCTION__, 2, + _error, ret); + char *info = get_response_audiomanager_massage_error(ret); + afb_req_success(request, res, info); +} + +/* +********** Callback Function invoked by Audio Manager ********** +*/ + +static void on_new_main_connection(AudiomanagerCommandinterface* interface, + GVariant* mainConnection) +{ + AFB_DEBUG("%s is called",__FUNCTION__); + + guint16 mcid, srcid, sinkid; + gint16 delay, constate; + g_variant_get( + mainConnection,"(qqqnn)", &mcid, &srcid, &sinkid, &delay, &constate); + + struct json_object* res_obj = json_object_new_object(); + sm_add_object_to_json_object(res_obj,10, + _main_connection_id, mcid, + _source_id, srcid, + _sink_id, sinkid, + _delay, delay, + _connection_state, constate + ); + AFB_DEBUG("json object :%s:",json_object_to_json_string(res_obj)); + + afb_event_push(ev_new_connection, res_obj); +} + +static void on_removed_main_connection( + AudiomanagerCommandinterface* interface, guint16 mainConnectionID) +{ + AFB_DEBUG("%s is called",__FUNCTION__); + + struct json_object* res_obj = json_object_new_object(); + sm_add_object_to_json_object(res_obj, 2, + _main_connection_id, mainConnectionID); + afb_event_push(ev_removed_main_connection, res_obj); +} + +static void on_main_connection_state_changed( + AudiomanagerCommandinterface* interface, guint16 connectionID, gint16 connectionState) +{ + AFB_DEBUG("%s is called",__FUNCTION__); + + struct json_object* res_obj = json_object_new_object(); + sm_add_object_to_json_object(res_obj, 4, + _connection_id, connectionID, + _connection_state, connectionState); + afb_event_push(ev_main_connection_state_changed, res_obj); +} + +static void on_volume_changed( + AudiomanagerCommandinterface* interface, guint16 sinkID, gint16 volume) +{ + AFB_DEBUG("%s is called",__FUNCTION__); + struct json_object* res_obj = json_object_new_object(); + sm_add_object_to_json_object(res_obj, 4, + _sink_id, sinkID, + _volume, volume); + afb_event_push(ev_volume_changed, res_obj); +} + +static void on_sink_mute_state_changed( + AudiomanagerCommandinterface* interface, guint16 sinkID, gint16 mute) +{ + AFB_DEBUG("%s is called",__FUNCTION__); + struct json_object* res_obj = json_object_new_object(); + sm_add_object_to_json_object(res_obj, 4, + _sink_id, sinkID, + _mute_state, mute); + afb_event_push(ev_sink_mute_state_changed, res_obj); +} + +/* +********** Callback Function invoked by Audio Manager Routing Interface********** +*/ +static void on_set_routing_ready( + AudiomanagerRoutinginterface* interface) +{ + AFB_DEBUG("%s is called",__FUNCTION__); + afb_event_push(ev_set_routing_ready, NULL); +} + +static void on_set_routing_rundown( + AudiomanagerRoutinginterface* interface) +{ + AFB_DEBUG("%s is called",__FUNCTION__); + afb_event_push(ev_set_routing_ready, NULL); +} + + + +/* +********** Callback Function invoked by Sound Manager Adapter Interface********** +* +* For now, there may be no need to send events to applications from these invocation. +* Sound Manager just sends ack to Audio Manager in charge of applications. +* +*/ +static gboolean on_async_abort( + AudiomanagerRoutingSoundmanager *object, + GDBusMethodInvocation *invocation, + guint16 arg_handle) +{ + AFB_DEBUG( "%s called", __FUNCTION__); + /* Nothing To Do. If it is better to implement something, I will implement */ + return TRUE; +} + +static gboolean on_async_connect( + AudiomanagerRoutingSoundmanager *object, + GDBusMethodInvocation *invocation, + guint16 arg_handle, + guint16 arg_connectionID, + guint16 arg_sourceID, + guint16 arg_sinkID, + gint arg_connectionFormat) +{ + AFB_DEBUG( "%s called", __FUNCTION__); + + struct json_object* ev_obj = json_object_new_object(); + sm_add_object_to_json_object(ev_obj, 10, + _handle, arg_handle, + _connection_id, arg_connectionID, + _source_id, arg_sourceID, + _sink_id, arg_sinkID, + _connection_format, arg_connectionFormat); + afb_event_push(ev_async_connect, ev_obj); + + /* GError must be initialized here because it is same as grobal errno, + so if afb_event_push is failed due to something, number will be changed */ + GError* err = NULL; + audiomanager_routinginterface_call_ack_connect_sync( + am_route_bus, + arg_handle, + arg_connectionID, + 0, + NULL, &err); + if(err != NULL) + { + AFB_ERROR( "Can't send ack to sound manager adapter %s", __FUNCTION__); + return FALSE; + } + return TRUE; +} + +static gboolean on_async_disconnect( + AudiomanagerRoutingSoundmanager *object, + GDBusMethodInvocation *invocation, + guint16 arg_handle, + guint16 arg_connectionID) +{ + AFB_DEBUG( "%s called", __FUNCTION__); + struct json_object* ev_obj = json_object_new_object(); + sm_add_object_to_json_object(ev_obj, 4, + _handle, arg_handle, + _connection_id, arg_connectionID); + afb_event_push(ev_async_disconnect, ev_obj); + GError* err = NULL; + audiomanager_routinginterface_call_ack_disconnect_sync( + am_route_bus, + arg_handle, + arg_connectionID, + 0, + NULL, &err); + if(err != NULL) + { + AFB_ERROR( "Can't send ack to sound manager adapter %s", __FUNCTION__); + return FALSE; + } + return TRUE; +} + +static gboolean on_async_set_sink_volume( + AudiomanagerRoutingSoundmanager *object, + GDBusMethodInvocation *invocation, + guint16 arg_handle, + guint16 arg_sinkID, + gint16 arg_volume, + gint16 arg_ramp, + guint16 arg_time) +{ + AFB_DEBUG( "%s called", __FUNCTION__); + GError* err = NULL; + audiomanager_routinginterface_call_ack_set_sink_volume_sync( + am_route_bus, + arg_handle, + arg_volume, + 0, NULL, &err); + if(err != NULL);{ + AFB_ERROR( "Can't send ack to sound manager adapter %s", __FUNCTION__); + return FALSE; + } + return TRUE; +} + +/** + * Event "asyncSetSourceState" + * This event is one of the result of Audio Management for connect/disconnect. + * + * #### Parameters + * Request key + * - sourceID : sourceID to be commanded by Audio Manager. The contents of command is sourceState + * - handle : handle is the dynamic number managed by Audio Manager. Please return this parameter to input ackSetSourceState as is + * - sourceState : "on" is the instruction that application can output sound + * "off" is the instruction that application sound right will be removed_main_connection + * "pause" is the instruction that application must stop output sound because other applications temporaly got sound right and will output sound + * + * #### Note + * This function is very important for applications to realise the sequence of Audio Management. + * An Application which matches with sourceID in the parameter of asyncSetSourceState has to return ack to use this function + * + */ +static gboolean on_async_set_source_state( + AudiomanagerRoutingSoundmanager *object, + GDBusMethodInvocation *invocation, + guint16 arg_handle, + guint16 arg_sourceID, + gint arg_sourceState) +{ + AFB_DEBUG( "%s called", __FUNCTION__); + struct json_object* ev_obj = json_object_new_object(); + char* ss_key = get_source_state_key(arg_sourceState); + sm_add_object_to_json_object(ev_obj, 4, + _handle, arg_handle, + _source_id, arg_sourceID); + json_object_object_add(ev_obj, _source_state, json_object_new_string(ss_key)); + afb_event_push(ev_async_set_source_state, ev_obj); + /* Applications must return ackSetSourceState to look sourceID, then Sound Manager doen't return ackSetSourceState */ + /*audiomanager_routinginterface_call_ack_set_source_state_sync( + am_route_bus, + arg_handle, + NULL, + NULL, &err);*/ +} + + +/* + * array of the verbs exported to afb-daemon + */ +static const struct afb_verb_v2 binding_verbs[]= { +{ .verb = "connect", .callback = connect, .auth = NULL, + .info = "Connect source id and sink id" , .session = AFB_SESSION_NONE}, +{ .verb = "disconnect", .callback = disconnect, .auth = NULL, + .info = "Disconnect source id and sink id" , .session = AFB_SESSION_NONE}, +{ .verb = "setVolume", .callback = setVolume, .auth = NULL, + .info = "Set volume value" , .session = AFB_SESSION_NONE}, /* it is better to show the range*/ +{ .verb = "volumeStep", .callback = volumeStep, .auth = NULL, + .info = "Set volume step range" , .session = AFB_SESSION_NONE}, +{ .verb = "setSinkMuteState", .callback = setSinkMuteState, .auth = NULL, + .info = "Set Mute state: 1 means mute, 2 means umute. Others are invalid" ,.session = AFB_SESSION_NONE}, +{ .verb = "getListMainConnections", .callback = getListMainConnections, .auth = NULL, + .info = "Get MainConnection List" , .session = AFB_SESSION_NONE}, +{ .verb = "getListMainSinks", .callback = getListMainSinks, .auth = NULL, + .info = "Get MainSink List" , .session = AFB_SESSION_NONE}, +{ .verb = "registerSource", .callback = registerSource, .auth = NULL, + .info = "Register Application" , .session = AFB_SESSION_NONE}, +{ .verb = "deregisterSource", .callback = deregisterSource, .auth = NULL, + .info = "Deregister Application" , .session = AFB_SESSION_NONE}, +{ .verb = "ackConnect", .callback = ackConnect, .auth = NULL, + .info = "Acknowledge of asyncConnect" , .session = AFB_SESSION_NONE}, +{ .verb = "ackDisconnect", .callback = ackDisconnect, .auth = NULL, + .info = "Acknowledge of asyncConnect" , .session = AFB_SESSION_NONE}, +{ .verb = "ackSetSourceState", .callback = ackSetSourceState, .auth = NULL, + .info = "Acknowledge of asyncSetSourceState" , .session = AFB_SESSION_NONE}, +{ .verb = "subscribe", .callback = subscribe, .auth = NULL, + .info = "Subscribe event" , .session = AFB_SESSION_NONE}, +{ .verb = "unsubscribe", .callback = unsubscribe, .auth = NULL, + .info = "Unsubscribe event" , .session = AFB_SESSION_NONE}, +{ .verb = NULL } /* marker for end of the array */}; + +static void *dbus_event_loop_run(void *args) +{ + loop = g_main_loop_new(NULL, FALSE); + g_main_loop_run(loop); +} + +/* +* +********** Internal Function used by Sound Manager ********** +* +*/ + +static int registerDomain() +{ + /* Default Setting of Sound Manager Domain */ + struct domain_data ddata = { + .domainID = DYNAMIC_DOMAIN_ID, + .name = "SoundManager", + .busname = SOUND_MANAGER_BUS_NAME, + .nodename = "soundmanager", + .early = FALSE, + .complete = TRUE, + .state = DS_CONTROLLED + }; + GVariant* domainData = create_domain_data(&ddata); + gchar* retBusName = SOUND_MANAGER_BUS_NAME; + gchar* retPath = SOUND_MANAGER_PATH; + gchar* retInterface = SOUND_MANAGER_RETURN_INTERFACE; + guint16 domain_id; + GError *err = NULL; + guint16 error; + + audiomanager_routinginterface_call_register_domain_sync( + am_route_bus, + domainData, + retBusName, + retPath, + retInterface, + &domain_id, &error, + NULL, &err); + if(err != NULL){ + AFB_ERROR( "Failed to call %s", __FUNCTION__); + return -1; + } + if(error != 0) + { + AFB_ERROR( "Failed to register domain"); + return error; + } + SOUNDMANAGER_DOMAIN_ID = domain_id; + AFB_NOTICE( "Complete registered domain id:%d",SOUNDMANAGER_DOMAIN_ID); + return 0; +} + +static int preinit() +{ + int ret; + AFB_INFO("Initialize Dbus object"); + /* Initialize Dbus interface */ + if(am_cmd_bus || am_route_bus) + { + AFB_ERROR( "Dbus object to Audio Manager is already created"); + goto out; + } + am_cmd_bus = audiomanager_commandinterface_proxy_new_for_bus_sync( + G_BUS_TYPE_SYSTEM, + G_DBUS_PROXY_FLAGS_NONE, + AM_NAME, + AM_CMD_PATH, + NULL, + NULL + ); + am_route_bus = audiomanager_routinginterface_proxy_new_for_bus_sync( + G_BUS_TYPE_SYSTEM, + G_DBUS_PROXY_FLAGS_NONE, + AM_NAME, + AM_ROUTE_PATH, + NULL, + NULL + ); + + if(!am_cmd_bus || !am_route_bus) + { + goto out; + } + + AFB_NOTICE( "Finish Initialize"); + return 0; +out: + AFB_ERROR("Failed to initialize"); + return -1; +} + +static int create_adapter() +{ + GError *error = NULL; + gboolean ret; + GVariant *value; + system_conn = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &error); + if (error) + { + g_error_free(error); + return -1; + } + sm_adapter = audiomanager_routing_soundmanager_skeleton_new(); + sm_itf = AUDIOMANAGER_ROUTING_SOUNDMANAGER_GET_IFACE(sm_adapter); + + /* initialize sound manager adapter */ + sm_itf->handle_async_abort = on_async_abort; + sm_itf->handle_async_connect = on_async_connect; + sm_itf->handle_async_disconnect = on_async_disconnect; + sm_itf->handle_async_set_sink_volume = on_async_set_sink_volume; + sm_itf->handle_async_set_source_state = on_async_set_source_state; + + int sigret = g_signal_connect(sm_adapter, "handle-async-abort", G_CALLBACK(on_async_abort),NULL); + sigret = g_signal_connect(sm_adapter, "handle-async-connect", G_CALLBACK(on_async_connect),NULL); + sigret = g_signal_connect(sm_adapter, "handle-async-disconnect", G_CALLBACK(on_async_disconnect),NULL); + sigret = g_signal_connect(sm_adapter, "handle-async-set-sink-volume", G_CALLBACK(on_async_set_sink_volume),NULL); + sigret = g_signal_connect(sm_adapter, "handle-async-set-source-state", G_CALLBACK(on_async_set_source_state),NULL); + ret = g_dbus_interface_skeleton_export(G_DBUS_INTERFACE_SKELETON(sm_adapter), system_conn, SOUND_MANAGER_PATH, &error); + if (FALSE == ret) + { + AFB_ERROR( "failed to export"); + g_error_free(error); + g_object_unref(system_conn); + + return -1; + } + + return 0; +} + + +static void on_name_lost(GDBusServer *server, GDBusConnection *conn, gpointer data) +{ + AFB_WARNING("%s called", __FUNCTION__); +} + + +static int sm_event_init() +{ + AFB_NOTICE("Initialize event receive setting"); + printf("Initialize event receive setting"); + int ret; + /* Initialize make event */ + size_t size = sizeof cmd_evlist / sizeof *cmd_evlist; + + /*create event*/ + /*ToDo Hash table is better. And event should be created in the loop + I would like to change */ + ev_volume_changed = afb_daemon_make_event(cmd_evlist[0]); + ev_new_connection = afb_daemon_make_event(cmd_evlist[1]); + ev_removed_main_connection = afb_daemon_make_event(cmd_evlist[2]); + ev_sink_mute_state_changed = afb_daemon_make_event(cmd_evlist[3]); + ev_main_connection_state_changed = afb_daemon_make_event(cmd_evlist[4]); + command_event_list[0].name = cmd_evlist[0]; + command_event_list[0].event = &ev_volume_changed; + command_event_list[1].name = cmd_evlist[1]; + command_event_list[1].event = &ev_new_connection; + command_event_list[2].name = cmd_evlist[2]; + command_event_list[2].event = &ev_removed_main_connection; + command_event_list[3].name = cmd_evlist[3]; + command_event_list[3].event = &ev_sink_mute_state_changed; + command_event_list[4].name = cmd_evlist[4]; + command_event_list[4].event = &ev_main_connection_state_changed; + + /* create routing event */ + ev_set_routing_ready = afb_daemon_make_event(route_evlist[0]); + ev_set_routing_rundown = afb_daemon_make_event(route_evlist[1]); + ev_async_connect = afb_daemon_make_event(route_evlist[2]); + ev_async_set_source_state = afb_daemon_make_event(route_evlist[3]); + ev_async_disconnect = afb_daemon_make_event(route_evlist[4]); + + routing_event_list[0].name = route_evlist[0]; + routing_event_list[0].event = &ev_set_routing_ready; + routing_event_list[1].name = route_evlist[1]; + routing_event_list[1].event = &ev_set_routing_rundown; + routing_event_list[2].name = route_evlist[2]; + routing_event_list[2].event = &ev_async_connect; + routing_event_list[3].name = route_evlist[3]; + routing_event_list[3].event = &ev_async_set_source_state; + routing_event_list[4].name = route_evlist[4]; + routing_event_list[4].event = &ev_async_disconnect; + /*for(size_t i = 0; i < size; ++i) + { + struct afb_event afbev = afb_daemon_make_event(afbitf->daemon, cmd_evlist[i])); + size_t afbev_size = sizeof afbev; + size_t key_size = sizeof cmd_evlist[i]; + + struct event ev = {cmd_evlist[i],afbev}; + command_event_list[i] = malloc(key_size + afbev_size); + command_event_list[i] = ev; + search_result = hsearch(entry, FIND); + if(search_result) + AFB_NOTICE( "event name is %s", search_result->key); + }*/ + + /* Initialize dbus event thread */ + if(!am_cmd_bus || !am_route_bus) + { + goto ev_init_out; + } + pthread_t thread_id; + ret = pthread_create(&thread_id, NULL, dbus_event_loop_run, NULL); + if(ret != 0) + { + goto ev_init_out; + } + /* initialize signal from audio manager command interface */ + g_signal_connect(am_cmd_bus, + "volume_changed", + G_CALLBACK(on_volume_changed), + NULL); + g_signal_connect(am_cmd_bus, + "new_main_connection", + G_CALLBACK(on_new_main_connection), + NULL); + g_signal_connect(am_cmd_bus, + "removed_main_connection", + G_CALLBACK(on_removed_main_connection), + NULL); + g_signal_connect(am_cmd_bus, + "sink_mute_state_changed", + G_CALLBACK(on_sink_mute_state_changed), + NULL); + g_signal_connect(am_cmd_bus, + "main_connection_state_changed", + G_CALLBACK(on_main_connection_state_changed), + NULL); + g_signal_connect(am_route_bus, + "set_routing_ready", + G_CALLBACK(on_set_routing_ready), + NULL); + g_signal_connect(am_route_bus, + "set_routing_rundown", + G_CALLBACK(on_set_routing_rundown), + NULL); + + /* Get soundmanager adapter bus */ + ret = g_bus_own_name(G_BUS_TYPE_SYSTEM, SOUND_MANAGER_BUS_NAME, G_BUS_NAME_OWNER_FLAGS_NONE, + NULL,NULL, NULL, NULL, NULL); + AFB_DEBUG( "g_bus_own_name ret: %d", ret); + ret = create_adapter(); + if(ret != 0) + { + goto ev_init_out; + } + ret = registerDomain(); + + if(ret != 0) + { + AFB_ERROR("registerDomain error: %s",get_response_audiomanager_massage_error(ret)); + goto ev_init_out; + } + + AFB_INFO("Finish Initialize event receive setting"); + return 0; + +ev_init_out: + if(loop != NULL) + { + g_main_loop_unref(loop); + } + AFB_WARNING( "DBus connection is not created"); + return -1; +} + +static void onevent(const char *event, struct json_object *object) +{ + AFB_NOTICE("on_event %s", event); +} + +const struct afb_binding_v2 afbBindingV2 = { + .api = "soundmanager", + .specification = NULL, + .verbs = binding_verbs, + .preinit = preinit, + .init = sm_event_init, + .onevent = onevent +}; -- cgit 1.2.3-korg