aboutsummaryrefslogtreecommitdiffstats
path: root/doc/api-ref/html/d0/d1e/homescreen_8c_source.html
blob: 6a4f516e2d5edf86fdfcefc9d623f198743243bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>HomeScreenBinding: src/homescreen.c Source File</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">HomeScreenBinding
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('../../',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="../../dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">homescreen.c</div>  </div>
</div><!--header-->
<div class="contents">
<a href="../../d0/d1e/homescreen_8c.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * Copyright (c) 2017 TOYOTA MOTOR CORPORATION</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> * you may not use this file except in compliance with the License.</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * You may obtain a copy of the License at</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> *      http://www.apache.org/licenses/LICENSE-2.0</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> * Unless required by applicable law or agreed to in writing, software</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> * See the License for the specific language governing permissions and</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> * limitations under the License.</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;</div><div class="line"><a name="l00017"></a><span class="lineno"><a class="line" href="../../d0/d1e/homescreen_8c.html#a369266c24eacffb87046522897a570d5">   17</a></span>&#160;<span class="preprocessor">#define _GNU_SOURCE</span></div><div class="line"><a name="l00018"></a><span class="lineno"><a class="line" href="../../d0/d1e/homescreen_8c.html#ad2c1fbc92ba364fcf83f15e6d0af66f0">   18</a></span>&#160;<span class="preprocessor">#define AFB_BINDING_VERSION 2</span></div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="preprocessor">#include &lt;afb/afb-binding.h&gt;</span></div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="preprocessor">#include &lt;stdio.h&gt;</span></div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="preprocessor">#include &lt;string.h&gt;</span></div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor">#include &lt;stdlib.h&gt;</span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="preprocessor">#include &lt;stdint.h&gt;</span></div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="preprocessor">#include &lt;unistd.h&gt;</span></div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="preprocessor">#include &lt;json-c/json.h&gt;</span></div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="preprocessor">#include &lt;glib.h&gt;</span></div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="preprocessor">#include &lt;pthread.h&gt;</span></div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="../../d3/d3d/hs-helper_8h.html">hs-helper.h</a>&quot;</span></div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;</div><div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="../../d0/d1e/homescreen_8c.html#a09f43d9e7e1c5d2198c0d66024b4500e">   31</a></span>&#160;<span class="preprocessor">#define COMMAND_EVENT_NUM 4</span></div><div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="../../d0/d1e/homescreen_8c.html#a9a68ed04201d9390bb85b2c6ab1d7250">   32</a></span>&#160;<span class="preprocessor">#define EVENT_SUBSCRIBE_ERROR_CODE 100</span></div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="comment">/* To Do hash table is better */</span></div><div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="../../df/d7d/structevent.html">   35</a></span>&#160;<span class="keyword">struct </span><a class="code" href="../../df/d7d/structevent.html">event</a>{</div><div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="../../df/d7d/structevent.html#a45c6cfb7961a21a3366db067e4cc59ab">   36</a></span>&#160;    <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="../../df/d7d/structevent.html#a45c6cfb7961a21a3366db067e4cc59ab">name</a>;</div><div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="../../df/d7d/structevent.html#a58726ebc551d36562ac3f9e1fe293214">   37</a></span>&#160;    <span class="keyword">struct </span>afb_event* <a class="code" href="../../df/d7d/structevent.html#a58726ebc551d36562ac3f9e1fe293214">event</a>;</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;    };</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;</div><div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="../../d0/d1e/homescreen_8c.html#a1c3c5bfa861dcb58d9e9d216d893864c">   40</a></span>&#160;<span class="keyword">static</span> <span class="keyword">struct </span><a class="code" href="../../df/d7d/structevent.html">event</a> <a class="code" href="../../d0/d1e/homescreen_8c.html#a1c3c5bfa861dcb58d9e9d216d893864c">event_list</a>[<a class="code" href="../../d0/d1e/homescreen_8c.html#a09f43d9e7e1c5d2198c0d66024b4500e">COMMAND_EVENT_NUM</a>];</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;</div><div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="../../d0/d1e/homescreen_8c.html#a2af1ff5a4cbf03125e61e903832035f5">   42</a></span>&#160;<span class="keyword">static</span> <span class="keyword">struct </span>afb_event <a class="code" href="../../d0/d1e/homescreen_8c.html#a2af1ff5a4cbf03125e61e903832035f5">ev_tap_shortcut</a>;</div><div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="../../d0/d1e/homescreen_8c.html#af7cfc4f688bb898c09291252c4cb832c">   43</a></span>&#160;<span class="keyword">static</span> <span class="keyword">struct </span>afb_event <a class="code" href="../../d0/d1e/homescreen_8c.html#af7cfc4f688bb898c09291252c4cb832c">ev_on_screen_message</a>;</div><div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="../../d0/d1e/homescreen_8c.html#a5c225341e0ecbae0585302ef754a55ec">   44</a></span>&#160;<span class="keyword">static</span> <span class="keyword">struct </span>afb_event <a class="code" href="../../d0/d1e/homescreen_8c.html#a5c225341e0ecbae0585302ef754a55ec">ev_on_screen_reply</a>;</div><div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="../../d0/d1e/homescreen_8c.html#a25fbdcc4e5787e3f41d99f4a71e86611">   45</a></span>&#160;<span class="keyword">static</span> <span class="keyword">struct </span>afb_event <a class="code" href="../../d0/d1e/homescreen_8c.html#a25fbdcc4e5787e3f41d99f4a71e86611">ev_reserved</a>;</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;</div><div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="../../d0/d1e/homescreen_8c.html#aed1c5296a2e6d34945507a0fca17a376">   47</a></span>&#160;<span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span> <a class="code" href="../../d0/d1e/homescreen_8c.html#aed1c5296a2e6d34945507a0fca17a376">_error</a>[] = <span class="stringliteral">&quot;error&quot;</span>;</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;</div><div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="../../d0/d1e/homescreen_8c.html#a1f2c79fa6801b63751e270d67994fe81">   49</a></span>&#160;<span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span> <a class="code" href="../../d0/d1e/homescreen_8c.html#a1f2c79fa6801b63751e270d67994fe81">_application_name</a>[] = <span class="stringliteral">&quot;application_name&quot;</span>;</div><div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="../../d0/d1e/homescreen_8c.html#abfd6c1d6f316fa952b11553f8f275e92">   50</a></span>&#160;<span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span> <a class="code" href="../../d0/d1e/homescreen_8c.html#abfd6c1d6f316fa952b11553f8f275e92">_display_message</a>[] = <span class="stringliteral">&quot;display_message&quot;</span>;</div><div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="../../d0/d1e/homescreen_8c.html#a79b0f0b481161527ccb80e83da143219">   51</a></span>&#160;<span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span> <a class="code" href="../../d0/d1e/homescreen_8c.html#a79b0f0b481161527ccb80e83da143219">_reply_message</a>[] = <span class="stringliteral">&quot;reply_message&quot;</span>;</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;<span class="comment">********** Method of HomeScreen Service (API) **********</span></div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;<span class="comment">*/</span></div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;</div><div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="../../d0/d1e/homescreen_8c.html#af48cab759d4ae0ddbfcdd60f4051ba05">   57</a></span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="../../d0/d1e/homescreen_8c.html#af48cab759d4ae0ddbfcdd60f4051ba05">pingSample</a>(<span class="keyword">struct</span> afb_req request)</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;{</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;   <span class="keyword">static</span> <span class="keywordtype">int</span> pingcount = 0;</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;   afb_req_success_f(request, json_object_new_int(pingcount), <span class="stringliteral">&quot;Ping count = %d&quot;</span>, pingcount);</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;   <a class="code" href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a>(<span class="stringliteral">&quot;homescreen-service&quot;</span>,<span class="stringliteral">&quot;Verbosity macro at level notice invoked at ping invocation count = %d&quot;</span>, pingcount);</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;   pingcount++;</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;}</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;</div><div class="line"><a name="l00077"></a><span class="lineno"><a class="line" href="../../d0/d1e/homescreen_8c.html#a096eae5c8f297f9df142a406eea56227">   77</a></span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="../../d0/d1e/homescreen_8c.html#a096eae5c8f297f9df142a406eea56227">tap_shortcut</a> (<span class="keyword">struct</span> afb_req request)</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;{</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;    <a class="code" href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a>(<span class="stringliteral">&quot;homescreen-service&quot;</span>,<span class="stringliteral">&quot;is called.&quot;</span>);</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;    <span class="keywordtype">int</span> ret = 0;</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;    <span class="keyword">const</span> <span class="keywordtype">char</span>* value = afb_req_value(request, <a class="code" href="../../d0/d1e/homescreen_8c.html#a1f2c79fa6801b63751e270d67994fe81">_application_name</a>);</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;    <span class="keywordflow">if</span> (value) {</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;      <a class="code" href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a>(<span class="stringliteral">&quot;homescreen-service&quot;</span>,<span class="stringliteral">&quot;request params = %s.&quot;</span>, value);</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;      <span class="keyword">struct </span>json_object* push_obj = json_object_new_object();</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;      <a class="code" href="../../dd/d1d/hs-helper_8c.html#a8777c53f1d4d5412f19b134ad85ffedf">hs_add_object_to_json_object_str</a>( push_obj, 2,</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;      <a class="code" href="../../d0/d1e/homescreen_8c.html#a1f2c79fa6801b63751e270d67994fe81">_application_name</a>, value);</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;      afb_event_push(<a class="code" href="../../d0/d1e/homescreen_8c.html#a2af1ff5a4cbf03125e61e903832035f5">ev_tap_shortcut</a>, push_obj);</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;    } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;      afb_req_fail_f(request, <span class="stringliteral">&quot;failed&quot;</span>, <span class="stringliteral">&quot;called %s, Unknown palameter&quot;</span>, __FUNCTION__);</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;      <span class="keywordflow">return</span>;</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;    }</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;  <span class="comment">// response to HomeScreen</span></div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;    <span class="keyword">struct </span>json_object *res = json_object_new_object();</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;    <a class="code" href="../../dd/d1d/hs-helper_8c.html#ae83604a37134e7bdee3ce4f10bb0b47a">hs_add_object_to_json_object_func</a>(res, __FUNCTION__, 2,</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;      <a class="code" href="../../d0/d1e/homescreen_8c.html#aed1c5296a2e6d34945507a0fca17a376">_error</a>,  ret);</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    afb_req_success(request, res, <span class="stringliteral">&quot;afb_event_push event [tap_shortcut]&quot;</span>);</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;}</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;</div><div class="line"><a name="l00114"></a><span class="lineno"><a class="line" href="../../d0/d1e/homescreen_8c.html#a640cf8ed97d804c5ed1c09a349056338">  114</a></span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="../../d0/d1e/homescreen_8c.html#a640cf8ed97d804c5ed1c09a349056338">on_screen_message</a> (<span class="keyword">struct</span> afb_req request)</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;{</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;    <a class="code" href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a>(<span class="stringliteral">&quot;homescreen-service&quot;</span>,<span class="stringliteral">&quot;is called.&quot;</span>);</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;    <span class="keywordtype">int</span> ret = 0;</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;    <span class="keyword">const</span> <span class="keywordtype">char</span>* value = afb_req_value(request, <a class="code" href="../../d0/d1e/homescreen_8c.html#abfd6c1d6f316fa952b11553f8f275e92">_display_message</a>);</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;    <span class="keywordflow">if</span> (value) {</div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;</div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;      <a class="code" href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a>(<span class="stringliteral">&quot;homescreen-service&quot;</span>,<span class="stringliteral">&quot;request params = %s.&quot;</span>, value);</div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;      <span class="keyword">struct </span>json_object* push_obj = json_object_new_object();</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;      <a class="code" href="../../dd/d1d/hs-helper_8c.html#a8777c53f1d4d5412f19b134ad85ffedf">hs_add_object_to_json_object_str</a>( push_obj, 2,</div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;      <a class="code" href="../../d0/d1e/homescreen_8c.html#abfd6c1d6f316fa952b11553f8f275e92">_display_message</a>, value);</div><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;      afb_event_push(<a class="code" href="../../d0/d1e/homescreen_8c.html#af7cfc4f688bb898c09291252c4cb832c">ev_on_screen_message</a>, push_obj);</div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;    } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;      afb_req_fail_f(request, <span class="stringliteral">&quot;failed&quot;</span>, <span class="stringliteral">&quot;called %s, Unknown palameter&quot;</span>, __FUNCTION__);</div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;      <span class="keywordflow">return</span>;</div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;    }</div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;</div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;  <span class="comment">// response to HomeScreen</span></div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;    <span class="keyword">struct </span>json_object *res = json_object_new_object();</div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;    <a class="code" href="../../dd/d1d/hs-helper_8c.html#ae83604a37134e7bdee3ce4f10bb0b47a">hs_add_object_to_json_object_func</a>(res, __FUNCTION__, 2,</div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;      <a class="code" href="../../d0/d1e/homescreen_8c.html#aed1c5296a2e6d34945507a0fca17a376">_error</a>,  ret);</div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;    afb_req_success(request, res, <span class="stringliteral">&quot;afb_event_push event [on_screen_message]&quot;</span>);</div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;}</div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;</div><div class="line"><a name="l00151"></a><span class="lineno"><a class="line" href="../../d0/d1e/homescreen_8c.html#a2f380055d7d69828115d2a8951634933">  151</a></span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="../../d0/d1e/homescreen_8c.html#a2f380055d7d69828115d2a8951634933">on_screen_reply</a> (<span class="keyword">struct</span> afb_req request)</div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;{</div><div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;    <a class="code" href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a>(<span class="stringliteral">&quot;homescreen-service&quot;</span>,<span class="stringliteral">&quot;is called.&quot;</span>);</div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;</div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;    <span class="keywordtype">int</span> ret = 0;</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;    <span class="keyword">const</span> <span class="keywordtype">char</span>* value = afb_req_value(request, <a class="code" href="../../d0/d1e/homescreen_8c.html#a79b0f0b481161527ccb80e83da143219">_reply_message</a>);</div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;    <span class="keywordflow">if</span> (value) {</div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;</div><div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;      <a class="code" href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a>(<span class="stringliteral">&quot;homescreen-service&quot;</span>,<span class="stringliteral">&quot;request params = %s.&quot;</span>, value);</div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;</div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;      <span class="keyword">struct </span>json_object* push_obj = json_object_new_object();</div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;      <a class="code" href="../../dd/d1d/hs-helper_8c.html#a8777c53f1d4d5412f19b134ad85ffedf">hs_add_object_to_json_object_str</a>( push_obj, 2,</div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;      <a class="code" href="../../d0/d1e/homescreen_8c.html#a79b0f0b481161527ccb80e83da143219">_reply_message</a>, value);</div><div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;      afb_event_push(<a class="code" href="../../d0/d1e/homescreen_8c.html#a5c225341e0ecbae0585302ef754a55ec">ev_on_screen_reply</a>, push_obj);</div><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;    } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;      afb_req_fail_f(request, <span class="stringliteral">&quot;failed&quot;</span>, <span class="stringliteral">&quot;called %s, Unknown palameter&quot;</span>, __FUNCTION__);</div><div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;      <span class="keywordflow">return</span>;</div><div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;    }</div><div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;</div><div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;  <span class="comment">// response to HomeScreen</span></div><div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;    <span class="keyword">struct </span>json_object *res = json_object_new_object();</div><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;    <a class="code" href="../../dd/d1d/hs-helper_8c.html#ae83604a37134e7bdee3ce4f10bb0b47a">hs_add_object_to_json_object_func</a>(res, __FUNCTION__, 2,</div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;      <a class="code" href="../../d0/d1e/homescreen_8c.html#aed1c5296a2e6d34945507a0fca17a376">_error</a>,  ret);</div><div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;    afb_req_success(request, res, <span class="stringliteral">&quot;afb_event_push event [on_screen_reply]&quot;</span>);</div><div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;}</div><div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;</div><div class="line"><a name="l00189"></a><span class="lineno"><a class="line" href="../../d0/d1e/homescreen_8c.html#a4ff0c8b506669e5622a6ee168134d8f1">  189</a></span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="../../d0/d1e/homescreen_8c.html#a4ff0c8b506669e5622a6ee168134d8f1">subscribe</a>(<span class="keyword">struct</span> afb_req request)</div><div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;{</div><div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;    <span class="keyword">const</span> <span class="keywordtype">char</span> *value = afb_req_value(request, <span class="stringliteral">&quot;event&quot;</span>);</div><div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;    <a class="code" href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a>(<span class="stringliteral">&quot;homescreen-service&quot;</span>,<span class="stringliteral">&quot;value is %s&quot;</span>, value);</div><div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;    <span class="keywordtype">int</span> ret = 0;</div><div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;    <span class="keywordflow">if</span>(value) {</div><div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;        <span class="keywordtype">int</span> index = <a class="code" href="../../dd/d1d/hs-helper_8c.html#a2ff1b894941c3b461ca8119079c4146a">hs_search_event_name_index</a>(value);</div><div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;        <span class="keywordflow">if</span>(index &lt; 0)</div><div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;        {</div><div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;            <a class="code" href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a>(<span class="stringliteral">&quot;homescreen-service&quot;</span>,<span class="stringliteral">&quot;dedicated event doesn&#39;t exist&quot;</span>);</div><div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;            ret = <a class="code" href="../../d0/d1e/homescreen_8c.html#a9a68ed04201d9390bb85b2c6ab1d7250">EVENT_SUBSCRIBE_ERROR_CODE</a>;</div><div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;        }</div><div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;        <span class="keywordflow">else</span></div><div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;        {</div><div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;            afb_req_subscribe(request, *<a class="code" href="../../d0/d1e/homescreen_8c.html#a1c3c5bfa861dcb58d9e9d216d893864c">event_list</a>[index].<a class="code" href="../../df/d7d/structevent.html">event</a>);</div><div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;        }</div><div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;    }</div><div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;    <span class="keywordflow">else</span>{</div><div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;        <a class="code" href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a>(<span class="stringliteral">&quot;homescreen-service&quot;</span>,<span class="stringliteral">&quot;Please input event name&quot;</span>);</div><div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;        ret = <a class="code" href="../../d0/d1e/homescreen_8c.html#a9a68ed04201d9390bb85b2c6ab1d7250">EVENT_SUBSCRIBE_ERROR_CODE</a>;</div><div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;    }</div><div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;    <span class="comment">/*create response json object*/</span></div><div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;    <span class="keyword">struct </span>json_object *res = json_object_new_object();</div><div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;    <a class="code" href="../../dd/d1d/hs-helper_8c.html#ae83604a37134e7bdee3ce4f10bb0b47a">hs_add_object_to_json_object_func</a>(res, __FUNCTION__, 2,</div><div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;        <a class="code" href="../../d0/d1e/homescreen_8c.html#aed1c5296a2e6d34945507a0fca17a376">_error</a>, ret);</div><div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;    afb_req_success_f(request, res, <span class="stringliteral">&quot;homescreen binder subscribe event name [%s]&quot;</span>, value);</div><div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;}</div><div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;</div><div class="line"><a name="l00229"></a><span class="lineno"><a class="line" href="../../d0/d1e/homescreen_8c.html#ab92621255d7370c6dd8a0f1a8e376ad3">  229</a></span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="../../d0/d1e/homescreen_8c.html#ab92621255d7370c6dd8a0f1a8e376ad3">unsubscribe</a>(<span class="keyword">struct</span> afb_req request)</div><div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;{</div><div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;    <span class="keyword">const</span> <span class="keywordtype">char</span> *value = afb_req_value(request, <span class="stringliteral">&quot;event&quot;</span>);</div><div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;    <a class="code" href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a>(<span class="stringliteral">&quot;homescreen-service&quot;</span>,<span class="stringliteral">&quot;value is %s&quot;</span>, value);</div><div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;    <span class="keywordtype">int</span> ret = 0;</div><div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;    <span class="keywordflow">if</span>(value) {</div><div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;        <span class="keywordtype">int</span> index = <a class="code" href="../../dd/d1d/hs-helper_8c.html#a2ff1b894941c3b461ca8119079c4146a">hs_search_event_name_index</a>(value);</div><div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;        <span class="keywordflow">if</span>(index &lt; 0)</div><div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;        {</div><div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;            <a class="code" href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a>(<span class="stringliteral">&quot;homescreen-service&quot;</span>,<span class="stringliteral">&quot;dedicated event doesn&#39;t exist&quot;</span>);</div><div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;            ret = <a class="code" href="../../d0/d1e/homescreen_8c.html#a9a68ed04201d9390bb85b2c6ab1d7250">EVENT_SUBSCRIBE_ERROR_CODE</a>;</div><div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;        }</div><div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;        <span class="keywordflow">else</span></div><div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;        {</div><div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;            afb_req_unsubscribe(request, *<a class="code" href="../../d0/d1e/homescreen_8c.html#a1c3c5bfa861dcb58d9e9d216d893864c">event_list</a>[index].<a class="code" href="../../df/d7d/structevent.html">event</a>);</div><div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;        }</div><div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;    }</div><div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;    <span class="keywordflow">else</span>{</div><div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;        <a class="code" href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a>(<span class="stringliteral">&quot;homescreen-service&quot;</span>,<span class="stringliteral">&quot;Please input event name&quot;</span>);</div><div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;        ret = <a class="code" href="../../d0/d1e/homescreen_8c.html#a9a68ed04201d9390bb85b2c6ab1d7250">EVENT_SUBSCRIBE_ERROR_CODE</a>;</div><div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;    }</div><div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;    <span class="comment">/*create response json object*/</span></div><div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;    <span class="keyword">struct </span>json_object *res = json_object_new_object();</div><div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;    <a class="code" href="../../dd/d1d/hs-helper_8c.html#ae83604a37134e7bdee3ce4f10bb0b47a">hs_add_object_to_json_object_func</a>(res, __FUNCTION__, 2,</div><div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;        <a class="code" href="../../d0/d1e/homescreen_8c.html#aed1c5296a2e6d34945507a0fca17a376">_error</a>, ret);</div><div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;    afb_req_success_f(request, res, <span class="stringliteral">&quot;homescreen binder unsubscribe event name [%s]&quot;</span>, value);</div><div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;}</div><div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;</div><div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;<span class="comment"> * array of the verbs exported to afb-daemon</span></div><div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00260"></a><span class="lineno"><a class="line" href="../../d0/d1e/homescreen_8c.html#acad6dadf60fac3d701e488e4fcd11c89">  260</a></span>&#160;<span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">struct </span>afb_verb_v2 <a class="code" href="../../d0/d1e/homescreen_8c.html#acad6dadf60fac3d701e488e4fcd11c89">verbs</a>[]= {</div><div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;    <span class="comment">/* VERB&#39;S NAME                    SESSION MANAGEMENT                FUNCTION TO CALL                     */</span></div><div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;    { .verb = <span class="stringliteral">&quot;ping&quot;</span>,              .session = AFB_SESSION_NONE,    .callback = <a class="code" href="../../d0/d1e/homescreen_8c.html#af48cab759d4ae0ddbfcdd60f4051ba05">pingSample</a>,        .auth = NULL },</div><div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;    { .verb = <span class="stringliteral">&quot;tap_shortcut&quot;</span>,      .session = AFB_SESSION_NONE,    .callback = <a class="code" href="../../d0/d1e/homescreen_8c.html#a096eae5c8f297f9df142a406eea56227">tap_shortcut</a>,      .auth = NULL },</div><div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;    { .verb = <span class="stringliteral">&quot;on_screen_message&quot;</span>, .session = AFB_SESSION_NONE,    .callback = <a class="code" href="../../d0/d1e/homescreen_8c.html#a640cf8ed97d804c5ed1c09a349056338">on_screen_message</a>, .auth = NULL },</div><div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;    { .verb = <span class="stringliteral">&quot;on_screen_reply&quot;</span>,   .session = AFB_SESSION_NONE,    .callback = <a class="code" href="../../d0/d1e/homescreen_8c.html#a2f380055d7d69828115d2a8951634933">on_screen_reply</a>,   .auth = NULL },</div><div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;    { .verb = <span class="stringliteral">&quot;subscribe&quot;</span>,         .session = AFB_SESSION_NONE,    .callback = <a class="code" href="../../d0/d1e/homescreen_8c.html#a4ff0c8b506669e5622a6ee168134d8f1">subscribe</a>,         .auth = NULL },</div><div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;    { .verb = <span class="stringliteral">&quot;unsubscribe&quot;</span>,       .session = AFB_SESSION_NONE,    .callback = <a class="code" href="../../d0/d1e/homescreen_8c.html#ab92621255d7370c6dd8a0f1a8e376ad3">unsubscribe</a>,       .auth = NULL },</div><div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;    {NULL } <span class="comment">/* marker for end of the array */</span></div><div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;};</div><div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;</div><div class="line"><a name="l00271"></a><span class="lineno"><a class="line" href="../../d0/d1e/homescreen_8c.html#a83d646edf54a6a082f69121bc89a08de">  271</a></span>&#160;<span class="keyword">static</span> <span class="keywordtype">int</span> <a class="code" href="../../d0/d1e/homescreen_8c.html#a83d646edf54a6a082f69121bc89a08de">preinit</a>()</div><div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;{</div><div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;   <a class="code" href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a>(<span class="stringliteral">&quot;homescreen-service&quot;</span>,<span class="stringliteral">&quot;binding preinit (was register)&quot;</span>);</div><div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;   <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;}</div><div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;</div><div class="line"><a name="l00277"></a><span class="lineno"><a class="line" href="../../d0/d1e/homescreen_8c.html#a00cbbc0f3f4452db078ae511684a6adc">  277</a></span>&#160;<span class="keyword">static</span> <span class="keywordtype">int</span> <a class="code" href="../../d0/d1e/homescreen_8c.html#a00cbbc0f3f4452db078ae511684a6adc">init</a>()</div><div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;{</div><div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;   <a class="code" href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a>(<span class="stringliteral">&quot;homescreen-service&quot;</span>,<span class="stringliteral">&quot;binding init&quot;</span>);</div><div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;</div><div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;   <a class="code" href="../../d0/d1e/homescreen_8c.html#a2af1ff5a4cbf03125e61e903832035f5">ev_tap_shortcut</a> = afb_daemon_make_event(<a class="code" href="../../d3/d3d/hs-helper_8h.html#a0cd84b1a2184c9b84d1b7bf24582f28e">evlist</a>[0]);</div><div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;   <a class="code" href="../../d0/d1e/homescreen_8c.html#af7cfc4f688bb898c09291252c4cb832c">ev_on_screen_message</a> = afb_daemon_make_event(<a class="code" href="../../d3/d3d/hs-helper_8h.html#a0cd84b1a2184c9b84d1b7bf24582f28e">evlist</a>[1]);</div><div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;   <a class="code" href="../../d0/d1e/homescreen_8c.html#a5c225341e0ecbae0585302ef754a55ec">ev_on_screen_reply</a> = afb_daemon_make_event(<a class="code" href="../../d3/d3d/hs-helper_8h.html#a0cd84b1a2184c9b84d1b7bf24582f28e">evlist</a>[2]);</div><div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;   <a class="code" href="../../d0/d1e/homescreen_8c.html#a25fbdcc4e5787e3f41d99f4a71e86611">ev_reserved</a> = afb_daemon_make_event(<a class="code" href="../../d3/d3d/hs-helper_8h.html#a0cd84b1a2184c9b84d1b7bf24582f28e">evlist</a>[3]);</div><div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;</div><div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;   <a class="code" href="../../d0/d1e/homescreen_8c.html#a1c3c5bfa861dcb58d9e9d216d893864c">event_list</a>[0].<a class="code" href="../../df/d7d/structevent.html#a45c6cfb7961a21a3366db067e4cc59ab">name</a> = <a class="code" href="../../d3/d3d/hs-helper_8h.html#a0cd84b1a2184c9b84d1b7bf24582f28e">evlist</a>[0];</div><div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;   <a class="code" href="../../d0/d1e/homescreen_8c.html#a1c3c5bfa861dcb58d9e9d216d893864c">event_list</a>[0].<a class="code" href="../../df/d7d/structevent.html#a58726ebc551d36562ac3f9e1fe293214">event</a> = &amp;<a class="code" href="../../d0/d1e/homescreen_8c.html#a2af1ff5a4cbf03125e61e903832035f5">ev_tap_shortcut</a>;</div><div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;</div><div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;   <a class="code" href="../../d0/d1e/homescreen_8c.html#a1c3c5bfa861dcb58d9e9d216d893864c">event_list</a>[1].<a class="code" href="../../df/d7d/structevent.html#a45c6cfb7961a21a3366db067e4cc59ab">name</a> = <a class="code" href="../../d3/d3d/hs-helper_8h.html#a0cd84b1a2184c9b84d1b7bf24582f28e">evlist</a>[1];</div><div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;   <a class="code" href="../../d0/d1e/homescreen_8c.html#a1c3c5bfa861dcb58d9e9d216d893864c">event_list</a>[1].<a class="code" href="../../df/d7d/structevent.html#a58726ebc551d36562ac3f9e1fe293214">event</a> = &amp;<a class="code" href="../../d0/d1e/homescreen_8c.html#af7cfc4f688bb898c09291252c4cb832c">ev_on_screen_message</a>;</div><div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;</div><div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;   <a class="code" href="../../d0/d1e/homescreen_8c.html#a1c3c5bfa861dcb58d9e9d216d893864c">event_list</a>[2].<a class="code" href="../../df/d7d/structevent.html#a45c6cfb7961a21a3366db067e4cc59ab">name</a> = <a class="code" href="../../d3/d3d/hs-helper_8h.html#a0cd84b1a2184c9b84d1b7bf24582f28e">evlist</a>[2];</div><div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;   <a class="code" href="../../d0/d1e/homescreen_8c.html#a1c3c5bfa861dcb58d9e9d216d893864c">event_list</a>[2].<a class="code" href="../../df/d7d/structevent.html#a58726ebc551d36562ac3f9e1fe293214">event</a> = &amp;<a class="code" href="../../d0/d1e/homescreen_8c.html#a5c225341e0ecbae0585302ef754a55ec">ev_on_screen_reply</a>;</div><div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;</div><div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160;   <a class="code" href="../../d0/d1e/homescreen_8c.html#a1c3c5bfa861dcb58d9e9d216d893864c">event_list</a>[3].<a class="code" href="../../df/d7d/structevent.html#a45c6cfb7961a21a3366db067e4cc59ab">name</a> = <a class="code" href="../../d3/d3d/hs-helper_8h.html#a0cd84b1a2184c9b84d1b7bf24582f28e">evlist</a>[3];</div><div class="line"><a name="l00296"></a><span class="lineno">  296</span>&#160;   <a class="code" href="../../d0/d1e/homescreen_8c.html#a1c3c5bfa861dcb58d9e9d216d893864c">event_list</a>[3].<a class="code" href="../../df/d7d/structevent.html#a58726ebc551d36562ac3f9e1fe293214">event</a> = &amp;<a class="code" href="../../d0/d1e/homescreen_8c.html#a25fbdcc4e5787e3f41d99f4a71e86611">ev_reserved</a>;</div><div class="line"><a name="l00297"></a><span class="lineno">  297</span>&#160;</div><div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160;   <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;}</div><div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;</div><div class="line"><a name="l00301"></a><span class="lineno"><a class="line" href="../../d0/d1e/homescreen_8c.html#a1279893c0fe937311a81e0a98fb4cf1c">  301</a></span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="../../d0/d1e/homescreen_8c.html#a1279893c0fe937311a81e0a98fb4cf1c">onevent</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="../../df/d7d/structevent.html">event</a>, <span class="keyword">struct</span> json_object *<span class="keywordtype">object</span>)</div><div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160;{</div><div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;   <a class="code" href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a>(<span class="stringliteral">&quot;homescreen-service&quot;</span>,<span class="stringliteral">&quot;on_event %s&quot;</span>, event);</div><div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;}</div><div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160;</div><div class="line"><a name="l00306"></a><span class="lineno"><a class="line" href="../../d0/d1e/homescreen_8c.html#ae2a62ab481a2922cbfc788193857a12e">  306</a></span>&#160;<span class="keyword">const</span> <span class="keyword">struct </span>afb_binding_v2 <a class="code" href="../../d0/d1e/homescreen_8c.html#ae2a62ab481a2922cbfc788193857a12e">afbBindingV2</a> = {</div><div class="line"><a name="l00307"></a><span class="lineno">  307</span>&#160;    .api = <span class="stringliteral">&quot;homescreen&quot;</span>,</div><div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160;    .specification = NULL,</div><div class="line"><a name="l00309"></a><span class="lineno">  309</span>&#160;    .verbs = <a class="code" href="../../d0/d1e/homescreen_8c.html#acad6dadf60fac3d701e488e4fcd11c89">verbs</a>,</div><div class="line"><a name="l00310"></a><span class="lineno">  310</span>&#160;    .preinit = <a class="code" href="../../d0/d1e/homescreen_8c.html#a83d646edf54a6a082f69121bc89a08de">preinit</a>,</div><div class="line"><a name="l00311"></a><span class="lineno">  311</span>&#160;    .init = <a class="code" href="../../d0/d1e/homescreen_8c.html#a00cbbc0f3f4452db078ae511684a6adc">init</a>,</div><div class="line"><a name="l00312"></a><span class="lineno">  312</span>&#160;    .onevent = <a class="code" href="../../d0/d1e/homescreen_8c.html#a1279893c0fe937311a81e0a98fb4cf1c">onevent</a></div><div class="line"><a name="l00313"></a><span class="lineno">  313</span>&#160;};</div><div class="ttc" id="hs-helper_8c_html_a8777c53f1d4d5412f19b134ad85ffedf"><div class="ttname"><a href="../../dd/d1d/hs-helper_8c.html#a8777c53f1d4d5412f19b134ad85ffedf">hs_add_object_to_json_object_str</a></div><div class="ttdeci">void hs_add_object_to_json_object_str(struct json_object *j_obj, int count,...)</div><div class="ttdef"><b>Definition:</b> <a href="../../dd/d1d/hs-helper_8c_source.html#l00110">hs-helper.c:110</a></div></div>
<div class="ttc" id="structevent_html_a58726ebc551d36562ac3f9e1fe293214"><div class="ttname"><a href="../../df/d7d/structevent.html#a58726ebc551d36562ac3f9e1fe293214">event::event</a></div><div class="ttdeci">struct afb_event * event</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00037">homescreen.c:37</a></div></div>
<div class="ttc" id="hmi-debug_8h_html_abc0d6e0760017d8ae48b836925b2ef15"><div class="ttname"><a href="../../df/d76/hmi-debug_8h.html#abc0d6e0760017d8ae48b836925b2ef15">HMI_NOTICE</a></div><div class="ttdeci">#define HMI_NOTICE(prefix, args,...)</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d76/hmi-debug_8h_source.html#l00020">hmi-debug.h:20</a></div></div>
<div class="ttc" id="homescreen_8c_html_a83d646edf54a6a082f69121bc89a08de"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#a83d646edf54a6a082f69121bc89a08de">preinit</a></div><div class="ttdeci">static int preinit()</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00271">homescreen.c:271</a></div></div>
<div class="ttc" id="homescreen_8c_html_a096eae5c8f297f9df142a406eea56227"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#a096eae5c8f297f9df142a406eea56227">tap_shortcut</a></div><div class="ttdeci">static void tap_shortcut(struct afb_req request)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00077">homescreen.c:77</a></div></div>
<div class="ttc" id="homescreen_8c_html_a1f2c79fa6801b63751e270d67994fe81"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#a1f2c79fa6801b63751e270d67994fe81">_application_name</a></div><div class="ttdeci">static const char _application_name[]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00049">homescreen.c:49</a></div></div>
<div class="ttc" id="homescreen_8c_html_a25fbdcc4e5787e3f41d99f4a71e86611"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#a25fbdcc4e5787e3f41d99f4a71e86611">ev_reserved</a></div><div class="ttdeci">static struct afb_event ev_reserved</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00045">homescreen.c:45</a></div></div>
<div class="ttc" id="homescreen_8c_html_aed1c5296a2e6d34945507a0fca17a376"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#aed1c5296a2e6d34945507a0fca17a376">_error</a></div><div class="ttdeci">static const char _error[]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00047">homescreen.c:47</a></div></div>
<div class="ttc" id="homescreen_8c_html_af48cab759d4ae0ddbfcdd60f4051ba05"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#af48cab759d4ae0ddbfcdd60f4051ba05">pingSample</a></div><div class="ttdeci">static void pingSample(struct afb_req request)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00057">homescreen.c:57</a></div></div>
<div class="ttc" id="homescreen_8c_html_a1279893c0fe937311a81e0a98fb4cf1c"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#a1279893c0fe937311a81e0a98fb4cf1c">onevent</a></div><div class="ttdeci">static void onevent(const char *event, struct json_object *object)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00301">homescreen.c:301</a></div></div>
<div class="ttc" id="hs-helper_8h_html"><div class="ttname"><a href="../../d3/d3d/hs-helper_8h.html">hs-helper.h</a></div></div>
<div class="ttc" id="structevent_html"><div class="ttname"><a href="../../df/d7d/structevent.html">event</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00035">homescreen.c:35</a></div></div>
<div class="ttc" id="homescreen_8c_html_a2f380055d7d69828115d2a8951634933"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#a2f380055d7d69828115d2a8951634933">on_screen_reply</a></div><div class="ttdeci">static void on_screen_reply(struct afb_req request)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00151">homescreen.c:151</a></div></div>
<div class="ttc" id="homescreen_8c_html_a00cbbc0f3f4452db078ae511684a6adc"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#a00cbbc0f3f4452db078ae511684a6adc">init</a></div><div class="ttdeci">static int init()</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00277">homescreen.c:277</a></div></div>
<div class="ttc" id="hs-helper_8h_html_a0cd84b1a2184c9b84d1b7bf24582f28e"><div class="ttname"><a href="../../d3/d3d/hs-helper_8h.html#a0cd84b1a2184c9b84d1b7bf24582f28e">evlist</a></div><div class="ttdeci">static const char * evlist[]</div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d3d/hs-helper_8h_source.html#l00034">hs-helper.h:34</a></div></div>
<div class="ttc" id="structevent_html_a45c6cfb7961a21a3366db067e4cc59ab"><div class="ttname"><a href="../../df/d7d/structevent.html#a45c6cfb7961a21a3366db067e4cc59ab">event::name</a></div><div class="ttdeci">const char * name</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00036">homescreen.c:36</a></div></div>
<div class="ttc" id="homescreen_8c_html_ab92621255d7370c6dd8a0f1a8e376ad3"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#ab92621255d7370c6dd8a0f1a8e376ad3">unsubscribe</a></div><div class="ttdeci">static void unsubscribe(struct afb_req request)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00229">homescreen.c:229</a></div></div>
<div class="ttc" id="hs-helper_8c_html_a2ff1b894941c3b461ca8119079c4146a"><div class="ttname"><a href="../../dd/d1d/hs-helper_8c.html#a2ff1b894941c3b461ca8119079c4146a">hs_search_event_name_index</a></div><div class="ttdeci">int hs_search_event_name_index(const char *value)</div><div class="ttdef"><b>Definition:</b> <a href="../../dd/d1d/hs-helper_8c_source.html#l00142">hs-helper.c:142</a></div></div>
<div class="ttc" id="homescreen_8c_html_a5c225341e0ecbae0585302ef754a55ec"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#a5c225341e0ecbae0585302ef754a55ec">ev_on_screen_reply</a></div><div class="ttdeci">static struct afb_event ev_on_screen_reply</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00044">homescreen.c:44</a></div></div>
<div class="ttc" id="homescreen_8c_html_af7cfc4f688bb898c09291252c4cb832c"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#af7cfc4f688bb898c09291252c4cb832c">ev_on_screen_message</a></div><div class="ttdeci">static struct afb_event ev_on_screen_message</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00043">homescreen.c:43</a></div></div>
<div class="ttc" id="homescreen_8c_html_a09f43d9e7e1c5d2198c0d66024b4500e"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#a09f43d9e7e1c5d2198c0d66024b4500e">COMMAND_EVENT_NUM</a></div><div class="ttdeci">#define COMMAND_EVENT_NUM</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00031">homescreen.c:31</a></div></div>
<div class="ttc" id="homescreen_8c_html_a640cf8ed97d804c5ed1c09a349056338"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#a640cf8ed97d804c5ed1c09a349056338">on_screen_message</a></div><div class="ttdeci">static void on_screen_message(struct afb_req request)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00114">homescreen.c:114</a></div></div>
<div class="ttc" id="homescreen_8c_html_acad6dadf60fac3d701e488e4fcd11c89"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#acad6dadf60fac3d701e488e4fcd11c89">verbs</a></div><div class="ttdeci">static const struct afb_verb_v2 verbs[]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00260">homescreen.c:260</a></div></div>
<div class="ttc" id="homescreen_8c_html_a1c3c5bfa861dcb58d9e9d216d893864c"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#a1c3c5bfa861dcb58d9e9d216d893864c">event_list</a></div><div class="ttdeci">static struct event event_list[COMMAND_EVENT_NUM]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00040">homescreen.c:40</a></div></div>
<div class="ttc" id="homescreen_8c_html_abfd6c1d6f316fa952b11553f8f275e92"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#abfd6c1d6f316fa952b11553f8f275e92">_display_message</a></div><div class="ttdeci">static const char _display_message[]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00050">homescreen.c:50</a></div></div>
<div class="ttc" id="homescreen_8c_html_a4ff0c8b506669e5622a6ee168134d8f1"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#a4ff0c8b506669e5622a6ee168134d8f1">subscribe</a></div><div class="ttdeci">static void subscribe(struct afb_req request)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00189">homescreen.c:189</a></div></div>
<div class="ttc" id="homescreen_8c_html_a9a68ed04201d9390bb85b2c6ab1d7250"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#a9a68ed04201d9390bb85b2c6ab1d7250">EVENT_SUBSCRIBE_ERROR_CODE</a></div><div class="ttdeci">#define EVENT_SUBSCRIBE_ERROR_CODE</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00032">homescreen.c:32</a></div></div>
<div class="ttc" id="homescreen_8c_html_a2af1ff5a4cbf03125e61e903832035f5"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#a2af1ff5a4cbf03125e61e903832035f5">ev_tap_shortcut</a></div><div class="ttdeci">static struct afb_event ev_tap_shortcut</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00042">homescreen.c:42</a></div></div>
<div class="ttc" id="homescreen_8c_html_a79b0f0b481161527ccb80e83da143219"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#a79b0f0b481161527ccb80e83da143219">_reply_message</a></div><div class="ttdeci">static const char _reply_message[]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00051">homescreen.c:51</a></div></div>
<div class="ttc" id="homescreen_8c_html_ae2a62ab481a2922cbfc788193857a12e"><div class="ttname"><a href="../../d0/d1e/homescreen_8c.html#ae2a62ab481a2922cbfc788193857a12e">afbBindingV2</a></div><div class="ttdeci">const struct afb_binding_v2 afbBindingV2</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d1e/homescreen_8c_source.html#l00306">homescreen.c:306</a></div></div>
<div class="ttc" id="hs-helper_8c_html_ae83604a37134e7bdee3ce4f10bb0b47a"><div class="ttname"><a href="../../dd/d1d/hs-helper_8c.html#ae83604a37134e7bdee3ce4f10bb0b47a">hs_add_object_to_json_object_func</a></div><div class="ttdeci">void hs_add_object_to_json_object_func(struct json_object *j_obj, const char *verb_name, int count,...)</div><div class="ttdef"><b>Definition:</b> <a href="../../dd/d1d/hs-helper_8c_source.html#l00125">hs-helper.c:125</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="../../doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>