diff options
Diffstat (limited to 'doc/api-ref/html/libsoundmanager_8hpp_source.html')
-rw-r--r-- | doc/api-ref/html/libsoundmanager_8hpp_source.html | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/doc/api-ref/html/libsoundmanager_8hpp_source.html b/doc/api-ref/html/libsoundmanager_8hpp_source.html index 58073d6..a78fa16 100644 --- a/doc/api-ref/html/libsoundmanager_8hpp_source.html +++ b/doc/api-ref/html/libsoundmanager_8hpp_source.html @@ -5,7 +5,7 @@ <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.13"/> <meta name="viewport" content="width=device-width, initial-scale=1"/> -<title>Sound Manager: SoundManagerBinding/include/libsoundmanager/libsoundmanager.hpp Source File</title> +<title>Sound Manager: R:/SoundManagerBinding/include/libsoundmanager.hpp Source File</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> @@ -83,17 +83,34 @@ $(document).ready(function(){initNavTree('libsoundmanager_8hpp_source.html',''); <div class="title">libsoundmanager.hpp</div> </div> </div><!--header--> <div class="contents"> -<a href="libsoundmanager_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> * Copyright (c) 2017 TOYOTA MOTOR CORPORATION</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> *</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> * you may not use this file except in compliance with the License.</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> * You may obtain a copy of the License at</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> *</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"> *</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"> * Unless required by applicable law or agreed to in writing, software</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment"> * See the License for the specific language governing permissions and</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment"> * limitations under the License.</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"> */</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> </div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="preprocessor">#ifndef LIBSOUNDMANAGER_H</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="preprocessor">#define LIBSOUNDMANAGER_H</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="preprocessor">#include <audiomanagertypes.h></span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="preprocessor">#include <vector></span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="preprocessor">#include <map></span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="preprocessor">#include <string></span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="preprocessor">#include <json-c/json.h></span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="preprocessor">#include <systemd/sd-event.h></span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="keyword">extern</span> <span class="stringliteral">"C"</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span> {</div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="preprocessor">#include <afb/afb-binding.h></span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="preprocessor">#include <afb/afb-wsj1.h></span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="preprocessor">#include <afb/afb-ws-client.h></span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> }</div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span> </div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="keyword">using namespace </span><a class="code" href="namespaceam.html">am</a>;</div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span> </div><div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="libsoundmanager_8hpp.html#a1f6a1c6cdbe66b174179ef6395f2981f"> 34</a></span> <span class="keyword">const</span> std::vector<std::string> <a class="code" href="libsoundmanager_8hpp.html#a1f6a1c6cdbe66b174179ef6395f2981f">api_list</a>{</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>  std::string(<span class="stringliteral">"connect"</span>),</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>  std::string(<span class="stringliteral">"disconnect"</span>),</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>  std::string(<span class="stringliteral">"setVolume"</span>),</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  std::string(<span class="stringliteral">"volumeStep"</span>),</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>  std::string(<span class="stringliteral">"setSinkMuteState"</span>),</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  std::string(<span class="stringliteral">"getListMainConnections"</span>),</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  std::string(<span class="stringliteral">"ackConnect"</span>),</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  std::string(<span class="stringliteral">"ackDisconnect"</span>),</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  std::string(<span class="stringliteral">"ackSetSourceState"</span>), </div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  std::string(<span class="stringliteral">"registerSource"</span>),</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  std::string(<span class="stringliteral">"deregisterSource"</span>),</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  std::string(<span class="stringliteral">"subscribe"</span>),</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  std::string(<span class="stringliteral">"unsubscribe"</span>)</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span> };</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span> </div><div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="libsoundmanager_8hpp.html#a63497e6f3147871c0c6b1b251565e7f0"> 50</a></span> <span class="keyword">const</span> std::vector<std::string> <a class="code" href="libsoundmanager_8hpp.html#a63497e6f3147871c0c6b1b251565e7f0">event_list</a>{</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  std::string(<span class="stringliteral">"newMainConnection"</span>),</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  std::string(<span class="stringliteral">"volumeChanged"</span>),</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  std::string(<span class="stringliteral">"removedMainConnection"</span>),</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  std::string(<span class="stringliteral">"sinkMuteStateChanged"</span>),</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  std::string(<span class="stringliteral">"mainConnectionStateChanged"</span>),</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  std::string(<span class="stringliteral">"setRoutingReady"</span>),</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  std::string(<span class="stringliteral">"setRoutingRundown"</span>),</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  std::string(<span class="stringliteral">"asyncConnect"</span>),</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  std::string(<span class="stringliteral">"ackSetSourceState"</span>)</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span> };</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span> </div><div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="class_lib_soundmanager.html"> 62</a></span> <span class="keyword">class </span><a class="code" href="class_lib_soundmanager.html">LibSoundmanager</a></div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span> {</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span> <span class="keyword">private</span>:</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  <a class="code" href="class_lib_soundmanager.html">LibSoundmanager</a>() = <span class="keyword">delete</span>;</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span> <span class="keyword">public</span>:</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  <a class="code" href="class_lib_soundmanager.html">LibSoundmanager</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> port, <span class="keyword">const</span> std::string& token);</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  <span class="comment">//LibSoundmanager(const std::string& uri); </span></div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  ~<a class="code" href="class_lib_soundmanager.html">LibSoundmanager</a>();</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  </div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  <span class="comment">/* Method */</span></div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  <span class="keywordtype">void</span> register_callback(</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  <span class="keywordtype">void</span> (*event_cb)(<span class="keyword">const</span> std::string& <a class="code" href="structevent.html">event</a>, <span class="keyword">struct</span> json_object* event_contents), </div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  <span class="keywordtype">void</span> (*reply_cb)(<span class="keyword">struct</span> json_object* reply_contents)</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  );</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  <span class="keywordtype">int</span> run_eventloop();</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  <span class="keywordtype">int</span> call(<span class="keyword">const</span> std::string& verb, <span class="keyword">struct</span> json_object* arg);</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  <span class="keywordtype">int</span> call_sync(<span class="keyword">const</span> std::string& verb, <span class="keyword">struct</span> json_object* arg, <span class="keyword">struct</span> json_object* ret);</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  <span class="keywordtype">int</span> subscribe(<span class="keyword">const</span> std::string& event_name);</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  <span class="keywordtype">int</span> unsubscribe(<span class="keyword">const</span> std::string& event_name);</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  <span class="comment">/*const struct afb_wsj1* get_websocket_handler();</span></div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span> <span class="comment"> const struct sd_event* get_sd_event();*/</span></div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span> </div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span> <span class="keyword">private</span>:</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  <span class="keywordtype">int</span> initialize_websocket();</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  void (*onEvent)(<span class="keyword">const</span> std::string& event, <span class="keyword">struct </span>json_object* event_contents);</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  void (*onReply)(<span class="keyword">struct </span>json_object* reply);</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span> </div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  <span class="keyword">struct </span>afb_wsj1* sp_websock;</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  <span class="keyword">struct </span>afb_wsj1_itf minterface;</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  sd_event* mploop;</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  std::string muri;</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  <span class="keywordtype">int</span> mport = 12345;</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  std::string mtoken = <span class="stringliteral">"123456"</span>;</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span> </div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  am_Error_e connect(<span class="keyword">const</span> am_sourceID_t sourceID, <span class="keyword">const</span> am_sinkID_t sinkID, am::am_mainConnectionID_t& mainConnectionID);</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  am_Error_e disconnect(<span class="keyword">const</span> am_mainConnectionID_t mainConnectionID);</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span> </div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span> <span class="keyword">public</span>:</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  <span class="comment">/* Don't use/ Internal only */</span></div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  <span class="keywordtype">void</span> on_hangup(<span class="keywordtype">void</span> *closure, <span class="keyword">struct</span> afb_wsj1 *wsj);</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  <span class="keywordtype">void</span> on_call(<span class="keywordtype">void</span> *closure, <span class="keyword">const</span> <span class="keywordtype">char</span> *api, <span class="keyword">const</span> <span class="keywordtype">char</span> *verb, <span class="keyword">struct</span> afb_wsj1_msg *msg);</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  <span class="keywordtype">void</span> on_event(<span class="keywordtype">void</span> *closure, <span class="keyword">const</span> <span class="keywordtype">char</span> *event, <span class="keyword">struct</span> afb_wsj1_msg *msg);</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  <span class="keywordtype">void</span> on_reply(<span class="keywordtype">void</span> *closure, <span class="keyword">struct</span> afb_wsj1_msg *msg);</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span> };</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span> <span class="preprocessor">#endif </span><span class="comment">/* LIBSOUNDMANAGER_H */</span><span class="preprocessor"></span></div><div class="ttc" id="namespaceam_html"><div class="ttname"><a href="namespaceam.html">am</a></div></div> -<div class="ttc" id="libsoundmanager_8hpp_html_a1f6a1c6cdbe66b174179ef6395f2981f"><div class="ttname"><a href="libsoundmanager_8hpp.html#a1f6a1c6cdbe66b174179ef6395f2981f">api_list</a></div><div class="ttdeci">const std::vector< std::string > api_list</div><div class="ttdef"><b>Definition:</b> <a href="libsoundmanager_8hpp_source.html#l00034">libsoundmanager.hpp:34</a></div></div> -<div class="ttc" id="libsoundmanager_8hpp_html_a63497e6f3147871c0c6b1b251565e7f0"><div class="ttname"><a href="libsoundmanager_8hpp.html#a63497e6f3147871c0c6b1b251565e7f0">event_list</a></div><div class="ttdeci">const std::vector< std::string > event_list</div><div class="ttdef"><b>Definition:</b> <a href="libsoundmanager_8hpp_source.html#l00050">libsoundmanager.hpp:50</a></div></div> -<div class="ttc" id="structevent_html"><div class="ttname"><a href="structevent.html">event</a></div><div class="ttdef"><b>Definition:</b> <a href="soundmanager_8c_source.html#l00049">soundmanager.c:49</a></div></div> -<div class="ttc" id="class_lib_soundmanager_html"><div class="ttname"><a href="class_lib_soundmanager.html">LibSoundmanager</a></div><div class="ttdef"><b>Definition:</b> <a href="libsoundmanager_8hpp_source.html#l00062">libsoundmanager.hpp:62</a></div></div> +<a href="libsoundmanager_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> * Copyright (c) 2017 TOYOTA MOTOR CORPORATION</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> *</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> * you may not use this file except in compliance with the License.</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> * You may obtain a copy of the License at</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> *</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"> *</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"> * Unless required by applicable law or agreed to in writing, software</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment"> * See the License for the specific language governing permissions and</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment"> * limitations under the License.</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"> */</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> </div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="preprocessor">#ifndef LIBSOUNDMANAGER_H</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="preprocessor">#define LIBSOUNDMANAGER_H</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="preprocessor">#include <vector></span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="preprocessor">#include <map></span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="preprocessor">#include <string></span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="preprocessor">#include <functional></span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="preprocessor">#include <json-c/json.h></span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="preprocessor">#include <systemd/sd-event.h></span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="keyword">extern</span> <span class="stringliteral">"C"</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span> {</div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="preprocessor">#include <afb/afb-binding.h></span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="preprocessor">#include <afb/afb-wsj1.h></span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="preprocessor">#include <afb/afb-ws-client.h></span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> }</div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span> </div><div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="class_lib_soundmanager.html"> 32</a></span> <span class="keyword">class </span><a class="code" href="class_lib_soundmanager.html">LibSoundmanager</a></div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span> {</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <span class="keyword">public</span>:</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>  <a class="code" href="class_lib_soundmanager.html#a8b51e9891813cb62dd12109c017ad106">LibSoundmanager</a>();</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>  <a class="code" href="class_lib_soundmanager.html#abf861908e3d6d85d2b3c08683b08f934">~LibSoundmanager</a>();</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>  <a class="code" href="class_lib_soundmanager.html#a8b51e9891813cb62dd12109c017ad106">LibSoundmanager</a>(<span class="keyword">const</span> <a class="code" href="class_lib_soundmanager.html">LibSoundmanager</a> &) = <span class="keyword">delete</span>;</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  <a class="code" href="class_lib_soundmanager.html">LibSoundmanager</a> &<a class="code" href="class_lib_soundmanager.html#a875e992495c9448bc778dfe70325f672">operator=</a>(<span class="keyword">const</span> <a class="code" href="class_lib_soundmanager.html">LibSoundmanager</a> &) = <span class="keyword">delete</span>;</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>  <span class="keywordtype">int</span> <a class="code" href="class_lib_soundmanager.html#ad5026736048e49c640b25f790409a65e">init</a>(<span class="keywordtype">int</span> port, <span class="keyword">const</span> std::string& token);</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span> </div><div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="class_lib_soundmanager.html#a7c28533bfc9315d8d0b417653611aba7"> 41</a></span>  <span class="keyword">using</span> <a class="code" href="class_lib_soundmanager.html#a7c28533bfc9315d8d0b417653611aba7">handler_fun</a> = std::function<void(struct json_object*)>;</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span> </div><div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="class_lib_soundmanager.html#abd76525512641c001c3187629b58db07"> 43</a></span>  <span class="keyword">enum</span> <a class="code" href="class_lib_soundmanager.html#abd76525512641c001c3187629b58db07">EventType_SM</a> {</div><div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="class_lib_soundmanager.html#abd76525512641c001c3187629b58db07a3dabba8ce44eb980fd8f02a84ec7d002"> 44</a></span>  <a class="code" href="class_lib_soundmanager.html#abd76525512641c001c3187629b58db07a3dabba8ce44eb980fd8f02a84ec7d002">Event_AsyncSetSourceState</a> = 1 <span class="comment">/*arg key: {sourceID, handle, sourceState}*/</span></div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  };</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  </div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  <span class="comment">/* Method */</span></div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  <span class="keywordtype">int</span> <a class="code" href="class_lib_soundmanager.html#a5353df3686a64c74c9672efd0c156351">registerSource</a>(<span class="keyword">const</span> std::string& sourceName);</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  <span class="keywordtype">int</span> <a class="code" href="class_lib_soundmanager.html#aa570a8373e057127c85107e13053669c">connect</a>(<span class="keywordtype">int</span> sourceID, <span class="keywordtype">int</span> sinkID);</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  <span class="keywordtype">int</span> <a class="code" href="class_lib_soundmanager.html#aa570a8373e057127c85107e13053669c">connect</a>(<span class="keywordtype">int</span> sourceID, <span class="keyword">const</span> std::string& sinkName);</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  <span class="keywordtype">int</span> <a class="code" href="class_lib_soundmanager.html#a3e59dfb464c81824d32f3391dea9b295">disconnect</a>(<span class="keywordtype">int</span> connectionID);</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  <span class="keywordtype">int</span> <a class="code" href="class_lib_soundmanager.html#a66e6fd5ef9955df2295c450400d6eb74">ackSetSourceState</a>(<span class="keywordtype">int</span> handle, <span class="keywordtype">int</span> error);</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span> </div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  <span class="keywordtype">int</span> <a class="code" href="class_lib_soundmanager.html#a1fe952a4dabbab6126cc23e36c79c773">call</a>(<span class="keyword">const</span> std::string& verb, <span class="keyword">struct</span> json_object* arg);</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  <span class="keywordtype">int</span> <a class="code" href="class_lib_soundmanager.html#a1fe952a4dabbab6126cc23e36c79c773">call</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* verb, <span class="keyword">struct</span> json_object* arg);</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  <span class="keywordtype">int</span> <a class="code" href="class_lib_soundmanager.html#a9cd7c5470cb135f9b1aa56d790c7e91e">subscribe</a>(<span class="keyword">const</span> std::string& event_name);</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  <span class="keywordtype">int</span> <a class="code" href="class_lib_soundmanager.html#a21060844aa7efad6473b6104546afb06">unsubscribe</a>(<span class="keyword">const</span> std::string& event_name);</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  <span class="keywordtype">void</span> <a class="code" href="class_lib_soundmanager.html#af39e2ddfb07ec049565b61ab4e1fbf8d">set_event_handler</a>(<span class="keyword">enum</span> <a class="code" href="class_lib_soundmanager.html#abd76525512641c001c3187629b58db07">EventType_SM</a> et, <a class="code" href="class_lib_soundmanager.html#a7c28533bfc9315d8d0b417653611aba7">handler_fun</a> f);</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  <span class="keywordtype">void</span> <a class="code" href="class_lib_soundmanager.html#a472149619f68c2387d4ff7e02845db26">register_callback</a>(</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  <span class="keywordtype">void</span> (*event_cb)(<span class="keyword">const</span> std::string& <a class="code" href="structevent.html">event</a>, <span class="keyword">struct</span> json_object* event_contents), </div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  <span class="keywordtype">void</span> (*reply_cb)(<span class="keyword">struct</span> json_object* reply_contents),</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  <span class="keywordtype">void</span> (*hangup_cb)(<span class="keywordtype">void</span>) = <span class="keyword">nullptr</span>);</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  <span class="keywordtype">void</span> <a class="code" href="class_lib_soundmanager.html#a472149619f68c2387d4ff7e02845db26">register_callback</a>(</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  <span class="keywordtype">void</span> (*reply_cb)(<span class="keyword">struct</span> json_object* reply_contents),</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  <span class="keywordtype">void</span> (*hangup_cb)(<span class="keywordtype">void</span>) = <span class="keyword">nullptr</span>);</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span> </div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span> <span class="keyword">private</span>:</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  <span class="keywordtype">int</span> init_event();</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  <span class="keywordtype">int</span> initialize_websocket();</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  <span class="keywordtype">int</span> dispatch_event(<span class="keyword">const</span> std::string& event, <span class="keyword">struct</span> json_object* ev_contents);</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span> </div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  void (*onEvent)(<span class="keyword">const</span> std::string& event, <span class="keyword">struct </span>json_object* event_contents);</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  void (*onReply)(<span class="keyword">struct </span>json_object* reply);</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  void (*onHangup)(void);</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span> </div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  <span class="keyword">struct </span>afb_wsj1* sp_websock;</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  <span class="keyword">struct </span>afb_wsj1_itf minterface;</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  sd_event* mploop;</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  <span class="keywordtype">int</span> mport;</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  std::string mtoken;</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  std::vector<int> msourceIDs;</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  std::map<EventType_SM, handler_fun> handlers;</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  <a class="code" href="class_lib_soundmanager.html#abd76525512641c001c3187629b58db07">EventType_SM</a> <span class="keyword">const</span> NumItems = (<a class="code" href="class_lib_soundmanager.html#abd76525512641c001c3187629b58db07">EventType_SM</a>)(<a class="code" href="class_lib_soundmanager.html#abd76525512641c001c3187629b58db07a3dabba8ce44eb980fd8f02a84ec7d002">Event_AsyncSetSourceState</a> + 1);</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span> </div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span> <span class="keyword">public</span>:</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  <span class="comment">/* Don't use/ Internal only */</span></div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  <span class="keywordtype">void</span> <a class="code" href="class_lib_soundmanager.html#a71a8165cb15c7815aa95a8955f5cd7f6">on_hangup</a>(<span class="keywordtype">void</span> *closure, <span class="keyword">struct</span> afb_wsj1 *wsj);</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  <span class="keywordtype">void</span> <a class="code" href="class_lib_soundmanager.html#a3ba2255cb1d29c77c4c6a2267949eda0">on_call</a>(<span class="keywordtype">void</span> *closure, <span class="keyword">const</span> <span class="keywordtype">char</span> *api, <span class="keyword">const</span> <span class="keywordtype">char</span> *verb, <span class="keyword">struct</span> afb_wsj1_msg *msg);</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  <span class="keywordtype">void</span> <a class="code" href="class_lib_soundmanager.html#a86ef62e7847cd20e9cafbc1f6c017b3e">on_event</a>(<span class="keywordtype">void</span> *closure, <span class="keyword">const</span> <span class="keywordtype">char</span> *event, <span class="keyword">struct</span> afb_wsj1_msg *msg);</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  <span class="keywordtype">void</span> <a class="code" href="class_lib_soundmanager.html#a69b4f10e509605a570cc52c795bc9d51">on_reply</a>(<span class="keywordtype">void</span> *closure, <span class="keyword">struct</span> afb_wsj1_msg *msg);</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span> };</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span> </div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span> <span class="preprocessor">#endif </span><span class="comment">/* LIBSOUNDMANAGER_H */</span><span class="preprocessor"></span></div><div class="ttc" id="class_lib_soundmanager_html_abd76525512641c001c3187629b58db07"><div class="ttname"><a href="class_lib_soundmanager.html#abd76525512641c001c3187629b58db07">LibSoundmanager::EventType_SM</a></div><div class="ttdeci">EventType_SM</div><div class="ttdef"><b>Definition:</b> <a href="libsoundmanager_8hpp_source.html#l00043">libsoundmanager.hpp:43</a></div></div> +<div class="ttc" id="class_lib_soundmanager_html_a472149619f68c2387d4ff7e02845db26"><div class="ttname"><a href="class_lib_soundmanager.html#a472149619f68c2387d4ff7e02845db26">LibSoundmanager::register_callback</a></div><div class="ttdeci">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)</div></div> +<div class="ttc" id="class_lib_soundmanager_html_af39e2ddfb07ec049565b61ab4e1fbf8d"><div class="ttname"><a href="class_lib_soundmanager.html#af39e2ddfb07ec049565b61ab4e1fbf8d">LibSoundmanager::set_event_handler</a></div><div class="ttdeci">void set_event_handler(enum EventType_SM et, handler_fun f)</div><div class="ttdef"><b>Definition:</b> <a href="libsoundmanager_8cpp_source.html#l00528">libsoundmanager.cpp:528</a></div></div> +<div class="ttc" id="structevent_html"><div class="ttname"><a href="structevent.html">event</a></div><div class="ttdef"><b>Definition:</b> <a href="soundmanager_8c_source.html#l00066">soundmanager.c:66</a></div></div> +<div class="ttc" id="class_lib_soundmanager_html_ad5026736048e49c640b25f790409a65e"><div class="ttname"><a href="class_lib_soundmanager.html#ad5026736048e49c640b25f790409a65e">LibSoundmanager::init</a></div><div class="ttdeci">int init(int port, const std::string &token)</div><div class="ttdef"><b>Definition:</b> <a href="libsoundmanager_8cpp_source.html#l00126">libsoundmanager.cpp:126</a></div></div> +<div class="ttc" id="class_lib_soundmanager_html_a21060844aa7efad6473b6104546afb06"><div class="ttname"><a href="class_lib_soundmanager.html#a21060844aa7efad6473b6104546afb06">LibSoundmanager::unsubscribe</a></div><div class="ttdeci">int unsubscribe(const std::string &event_name)</div><div class="ttdef"><b>Definition:</b> <a href="libsoundmanager_8cpp_source.html#l00498">libsoundmanager.cpp:498</a></div></div> +<div class="ttc" id="class_lib_soundmanager_html_a3e59dfb464c81824d32f3391dea9b295"><div class="ttname"><a href="class_lib_soundmanager.html#a3e59dfb464c81824d32f3391dea9b295">LibSoundmanager::disconnect</a></div><div class="ttdeci">int disconnect(int connectionID)</div><div class="ttdef"><b>Definition:</b> <a href="libsoundmanager_8cpp_source.html#l00347">libsoundmanager.cpp:347</a></div></div> +<div class="ttc" id="class_lib_soundmanager_html_a1fe952a4dabbab6126cc23e36c79c773"><div class="ttname"><a href="class_lib_soundmanager.html#a1fe952a4dabbab6126cc23e36c79c773">LibSoundmanager::call</a></div><div class="ttdeci">int call(const std::string &verb, struct json_object *arg)</div></div> +<div class="ttc" id="class_lib_soundmanager_html_aa570a8373e057127c85107e13053669c"><div class="ttname"><a href="class_lib_soundmanager.html#aa570a8373e057127c85107e13053669c">LibSoundmanager::connect</a></div><div class="ttdeci">int connect(int sourceID, int sinkID)</div><div class="ttdef"><b>Definition:</b> <a href="libsoundmanager_8cpp_source.html#l00287">libsoundmanager.cpp:287</a></div></div> +<div class="ttc" id="class_lib_soundmanager_html_a7c28533bfc9315d8d0b417653611aba7"><div class="ttname"><a href="class_lib_soundmanager.html#a7c28533bfc9315d8d0b417653611aba7">LibSoundmanager::handler_fun</a></div><div class="ttdeci">std::function< void(struct json_object *)> handler_fun</div><div class="ttdef"><b>Definition:</b> <a href="libsoundmanager_8hpp_source.html#l00041">libsoundmanager.hpp:41</a></div></div> +<div class="ttc" id="class_lib_soundmanager_html_a875e992495c9448bc778dfe70325f672"><div class="ttname"><a href="class_lib_soundmanager.html#a875e992495c9448bc778dfe70325f672">LibSoundmanager::operator=</a></div><div class="ttdeci">LibSoundmanager & operator=(const LibSoundmanager &)=delete</div></div> +<div class="ttc" id="class_lib_soundmanager_html_a8b51e9891813cb62dd12109c017ad106"><div class="ttname"><a href="class_lib_soundmanager.html#a8b51e9891813cb62dd12109c017ad106">LibSoundmanager::LibSoundmanager</a></div><div class="ttdeci">LibSoundmanager()</div><div class="ttdef"><b>Definition:</b> <a href="libsoundmanager_8cpp_source.html#l00096">libsoundmanager.cpp:96</a></div></div> +<div class="ttc" id="class_lib_soundmanager_html_abf861908e3d6d85d2b3c08683b08f934"><div class="ttname"><a href="class_lib_soundmanager.html#abf861908e3d6d85d2b3c08683b08f934">LibSoundmanager::~LibSoundmanager</a></div><div class="ttdeci">~LibSoundmanager()</div><div class="ttdef"><b>Definition:</b> <a href="libsoundmanager_8cpp_source.html#l00100">libsoundmanager.cpp:100</a></div></div> +<div class="ttc" id="class_lib_soundmanager_html_a71a8165cb15c7815aa95a8955f5cd7f6"><div class="ttname"><a href="class_lib_soundmanager.html#a71a8165cb15c7815aa95a8955f5cd7f6">LibSoundmanager::on_hangup</a></div><div class="ttdeci">void on_hangup(void *closure, struct afb_wsj1 *wsj)</div><div class="ttdef"><b>Definition:</b> <a href="libsoundmanager_8cpp_source.html#l00538">libsoundmanager.cpp:538</a></div></div> +<div class="ttc" id="class_lib_soundmanager_html_abd76525512641c001c3187629b58db07a3dabba8ce44eb980fd8f02a84ec7d002"><div class="ttname"><a href="class_lib_soundmanager.html#abd76525512641c001c3187629b58db07a3dabba8ce44eb980fd8f02a84ec7d002">LibSoundmanager::Event_AsyncSetSourceState</a></div><div class="ttdef"><b>Definition:</b> <a href="libsoundmanager_8hpp_source.html#l00044">libsoundmanager.hpp:44</a></div></div> +<div class="ttc" id="class_lib_soundmanager_html_a9cd7c5470cb135f9b1aa56d790c7e91e"><div class="ttname"><a href="class_lib_soundmanager.html#a9cd7c5470cb135f9b1aa56d790c7e91e">LibSoundmanager::subscribe</a></div><div class="ttdeci">int subscribe(const std::string &event_name)</div><div class="ttdef"><b>Definition:</b> <a href="libsoundmanager_8cpp_source.html#l00469">libsoundmanager.cpp:469</a></div></div> +<div class="ttc" id="class_lib_soundmanager_html_a66e6fd5ef9955df2295c450400d6eb74"><div class="ttname"><a href="class_lib_soundmanager.html#a66e6fd5ef9955df2295c450400d6eb74">LibSoundmanager::ackSetSourceState</a></div><div class="ttdeci">int ackSetSourceState(int handle, int error)</div><div class="ttdef"><b>Definition:</b> <a href="libsoundmanager_8cpp_source.html#l00374">libsoundmanager.cpp:374</a></div></div> +<div class="ttc" id="class_lib_soundmanager_html_a69b4f10e509605a570cc52c795bc9d51"><div class="ttname"><a href="class_lib_soundmanager.html#a69b4f10e509605a570cc52c795bc9d51">LibSoundmanager::on_reply</a></div><div class="ttdeci">void on_reply(void *closure, struct afb_wsj1_msg *msg)</div><div class="ttdef"><b>Definition:</b> <a href="libsoundmanager_8cpp_source.html#l00578">libsoundmanager.cpp:578</a></div></div> +<div class="ttc" id="class_lib_soundmanager_html"><div class="ttname"><a href="class_lib_soundmanager.html">LibSoundmanager</a></div><div class="ttdef"><b>Definition:</b> <a href="libsoundmanager_8hpp_source.html#l00032">libsoundmanager.hpp:32</a></div></div> +<div class="ttc" id="class_lib_soundmanager_html_a3ba2255cb1d29c77c4c6a2267949eda0"><div class="ttname"><a href="class_lib_soundmanager.html#a3ba2255cb1d29c77c4c6a2267949eda0">LibSoundmanager::on_call</a></div><div class="ttdeci">void on_call(void *closure, const char *api, const char *verb, struct afb_wsj1_msg *msg)</div><div class="ttdef"><b>Definition:</b> <a href="libsoundmanager_8cpp_source.html#l00547">libsoundmanager.cpp:547</a></div></div> +<div class="ttc" id="class_lib_soundmanager_html_a86ef62e7847cd20e9cafbc1f6c017b3e"><div class="ttname"><a href="class_lib_soundmanager.html#a86ef62e7847cd20e9cafbc1f6c017b3e">LibSoundmanager::on_event</a></div><div class="ttdeci">void on_event(void *closure, const char *event, struct afb_wsj1_msg *msg)</div><div class="ttdef"><b>Definition:</b> <a href="libsoundmanager_8cpp_source.html#l00558">libsoundmanager.cpp:558</a></div></div> +<div class="ttc" id="class_lib_soundmanager_html_a5353df3686a64c74c9672efd0c156351"><div class="ttname"><a href="class_lib_soundmanager.html#a5353df3686a64c74c9672efd0c156351">LibSoundmanager::registerSource</a></div><div class="ttdeci">int registerSource(const std::string &sourceName)</div><div class="ttdef"><b>Definition:</b> <a href="libsoundmanager_8cpp_source.html#l00259">libsoundmanager.cpp:259</a></div></div> </div><!-- fragment --></div><!-- contents --> </div><!-- doc-content --> <!-- start footer part --> <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> <ul> - <li class="navelem"><a class="el" href="dir_b967abc00200c877344b4504e6cbcf3f.html">SoundManagerBinding</a></li><li class="navelem"><a class="el" href="dir_c2dc0533631c44dc5d574e7be055c656.html">include</a></li><li class="navelem"><a class="el" href="dir_4ed4f07a8451d34bdd1d92ed62b81ed4.html">libsoundmanager</a></li><li class="navelem"><a class="el" href="libsoundmanager_8hpp.html">libsoundmanager.hpp</a></li> + <li class="navelem"><a class="el" href="dir_fc265b39262ea2713c037617d421974d.html">R:</a></li><li class="navelem"><a class="el" href="dir_c0f9ac54811231ea41ecdb457a109fa8.html">SoundManagerBinding</a></li><li class="navelem"><a class="el" href="dir_874624da9b22748f4ce7f5a12a2384c3.html">include</a></li><li class="navelem"><a class="el" href="libsoundmanager_8hpp.html">libsoundmanager.hpp</a></li> <li class="footer">Generated by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li> |