Add a new OnScreenReply api to agl-service-homescreen
[apps/agl-service-homescreen.git] / doc / api-ref / latex / d3 / d3d / hs-helper_8h.tex
1 \hypertarget{hs-helper_8h}{}\section{src/hs-\/helper.h File Reference}
2 \label{hs-helper_8h}\index{src/hs-\/helper.\+h@{src/hs-\/helper.\+h}}
3 {\ttfamily \#include $<$afb/afb-\/binding.\+h$>$}\newline
4 {\ttfamily \#include $<$stdint.\+h$>$}\newline
5 {\ttfamily \#include $<$glib.\+h$>$}\newline
6 {\ttfamily \#include $<$errno.\+h$>$}\newline
7 {\ttfamily \#include \char`\"{}hmi-\/debug.\+h\char`\"{}}\newline
8 \subsection*{Macros}
9 \begin{DoxyCompactItemize}
10 \item 
11 \#define \hyperlink{hs-helper_8h_ad2c1fbc92ba364fcf83f15e6d0af66f0}{A\+F\+B\+\_\+\+B\+I\+N\+D\+I\+N\+G\+\_\+\+V\+E\+R\+S\+I\+ON}~2
12 \end{DoxyCompactItemize}
13 \subsection*{Typedefs}
14 \begin{DoxyCompactItemize}
15 \item 
16 typedef enum \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899}{R\+E\+Q\+\_\+\+E\+R\+R\+OR} \hyperlink{hs-helper_8h_ab0d62ccfa9c3ab87f090f67c3d50adce}{R\+E\+Q\+\_\+\+E\+R\+R\+OR}
17 \end{DoxyCompactItemize}
18 \subsection*{Enumerations}
19 \begin{DoxyCompactItemize}
20 \item 
21 enum \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899}{R\+E\+Q\+\_\+\+E\+R\+R\+OR} \{ \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899a96a855966bc63045222b3dcac524cee1}{R\+E\+Q\+\_\+\+F\+A\+IL} = -\/1, 
22 \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899ab093abb14c097b3b7719debb04d5e8ee}{R\+E\+Q\+\_\+\+OK} =0, 
23 \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899aa223eed65c9bee2bf1f4cdecaf90d66a}{N\+O\+T\+\_\+\+N\+U\+M\+B\+ER}, 
24 \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899add1c84bf80c5f80741ee8f37fef1e12b}{O\+U\+T\+\_\+\+R\+A\+N\+GE}
25  \}
26 \end{DoxyCompactItemize}
27 \subsection*{Functions}
28 \begin{DoxyCompactItemize}
29 \item 
30 \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899}{R\+E\+Q\+\_\+\+E\+R\+R\+OR} \hyperlink{hs-helper_8h_a649900645417f2df3a70b9ad67529f53}{get\+\_\+value\+\_\+uint16} (const struct afb\+\_\+req request, const char $\ast$source, uint16\+\_\+t $\ast$out\+\_\+id)
31 \item 
32 \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899}{R\+E\+Q\+\_\+\+E\+R\+R\+OR} \hyperlink{hs-helper_8h_a2e62366684e39ea94436bf017e416827}{get\+\_\+value\+\_\+int16} (const struct afb\+\_\+req request, const char $\ast$source, int16\+\_\+t $\ast$out\+\_\+id)
33 \item 
34 \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899}{R\+E\+Q\+\_\+\+E\+R\+R\+OR} \hyperlink{hs-helper_8h_ac5b0370643c520377afd3fd4891918d2}{get\+\_\+value\+\_\+int32} (const struct afb\+\_\+req request, const char $\ast$source, int32\+\_\+t $\ast$out\+\_\+id)
35 \item 
36 void \hyperlink{hs-helper_8h_a1ba31a6a94515ff1730ba0043a67d59e}{hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object} (struct json\+\_\+object $\ast$j\+\_\+obj, int count,...)
37 \item 
38 void \hyperlink{hs-helper_8h_a8777c53f1d4d5412f19b134ad85ffedf}{hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object\+\_\+str} (struct json\+\_\+object $\ast$j\+\_\+obj, int count,...)
39 \item 
40 void \hyperlink{hs-helper_8h_ae83604a37134e7bdee3ce4f10bb0b47a}{hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object\+\_\+func} (struct json\+\_\+object $\ast$j\+\_\+obj, const char $\ast$verb\+\_\+name, int count,...)
41 \item 
42 int \hyperlink{hs-helper_8h_a2ff1b894941c3b461ca8119079c4146a}{hs\+\_\+search\+\_\+event\+\_\+name\+\_\+index} (const char $\ast$value)
43 \end{DoxyCompactItemize}
44 \subsection*{Variables}
45 \begin{DoxyCompactItemize}
46 \item 
47 static const char $\ast$ \hyperlink{hs-helper_8h_a0cd84b1a2184c9b84d1b7bf24582f28e}{evlist} \mbox{[}$\,$\mbox{]}
48 \end{DoxyCompactItemize}
49
50
51 \subsection{Macro Definition Documentation}
52 \mbox{\Hypertarget{hs-helper_8h_ad2c1fbc92ba364fcf83f15e6d0af66f0}\label{hs-helper_8h_ad2c1fbc92ba364fcf83f15e6d0af66f0}} 
53 \index{hs-\/helper.\+h@{hs-\/helper.\+h}!A\+F\+B\+\_\+\+B\+I\+N\+D\+I\+N\+G\+\_\+\+V\+E\+R\+S\+I\+ON@{A\+F\+B\+\_\+\+B\+I\+N\+D\+I\+N\+G\+\_\+\+V\+E\+R\+S\+I\+ON}}
54 \index{A\+F\+B\+\_\+\+B\+I\+N\+D\+I\+N\+G\+\_\+\+V\+E\+R\+S\+I\+ON@{A\+F\+B\+\_\+\+B\+I\+N\+D\+I\+N\+G\+\_\+\+V\+E\+R\+S\+I\+ON}!hs-\/helper.\+h@{hs-\/helper.\+h}}
55 \subsubsection{\texorpdfstring{A\+F\+B\+\_\+\+B\+I\+N\+D\+I\+N\+G\+\_\+\+V\+E\+R\+S\+I\+ON}{AFB\_BINDING\_VERSION}}
56 {\footnotesize\ttfamily \#define A\+F\+B\+\_\+\+B\+I\+N\+D\+I\+N\+G\+\_\+\+V\+E\+R\+S\+I\+ON~2}
57
58
59
60 Definition at line 19 of file hs-\/helper.\+h.
61
62
63
64 \subsection{Typedef Documentation}
65 \mbox{\Hypertarget{hs-helper_8h_ab0d62ccfa9c3ab87f090f67c3d50adce}\label{hs-helper_8h_ab0d62ccfa9c3ab87f090f67c3d50adce}} 
66 \index{hs-\/helper.\+h@{hs-\/helper.\+h}!R\+E\+Q\+\_\+\+E\+R\+R\+OR@{R\+E\+Q\+\_\+\+E\+R\+R\+OR}}
67 \index{R\+E\+Q\+\_\+\+E\+R\+R\+OR@{R\+E\+Q\+\_\+\+E\+R\+R\+OR}!hs-\/helper.\+h@{hs-\/helper.\+h}}
68 \subsubsection{\texorpdfstring{R\+E\+Q\+\_\+\+E\+R\+R\+OR}{REQ\_ERROR}}
69 {\footnotesize\ttfamily typedef enum \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899}{R\+E\+Q\+\_\+\+E\+R\+R\+OR} \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899}{R\+E\+Q\+\_\+\+E\+R\+R\+OR}}
70
71
72
73 \subsection{Enumeration Type Documentation}
74 \mbox{\Hypertarget{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899}\label{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899}} 
75 \index{hs-\/helper.\+h@{hs-\/helper.\+h}!R\+E\+Q\+\_\+\+E\+R\+R\+OR@{R\+E\+Q\+\_\+\+E\+R\+R\+OR}}
76 \index{R\+E\+Q\+\_\+\+E\+R\+R\+OR@{R\+E\+Q\+\_\+\+E\+R\+R\+OR}!hs-\/helper.\+h@{hs-\/helper.\+h}}
77 \subsubsection{\texorpdfstring{R\+E\+Q\+\_\+\+E\+R\+R\+OR}{REQ\_ERROR}}
78 {\footnotesize\ttfamily enum \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899}{R\+E\+Q\+\_\+\+E\+R\+R\+OR}}
79
80 \begin{DoxyEnumFields}{Enumerator}
81 \raisebox{\heightof{T}}[0pt][0pt]{\index{R\+E\+Q\+\_\+\+F\+A\+IL@{R\+E\+Q\+\_\+\+F\+A\+IL}!hs-\/helper.\+h@{hs-\/helper.\+h}}\index{hs-\/helper.\+h@{hs-\/helper.\+h}!R\+E\+Q\+\_\+\+F\+A\+IL@{R\+E\+Q\+\_\+\+F\+A\+IL}}}\mbox{\Hypertarget{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899a96a855966bc63045222b3dcac524cee1}\label{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899a96a855966bc63045222b3dcac524cee1}} 
82 R\+E\+Q\+\_\+\+F\+A\+IL&\\
83 \hline
84
85 \raisebox{\heightof{T}}[0pt][0pt]{\index{R\+E\+Q\+\_\+\+OK@{R\+E\+Q\+\_\+\+OK}!hs-\/helper.\+h@{hs-\/helper.\+h}}\index{hs-\/helper.\+h@{hs-\/helper.\+h}!R\+E\+Q\+\_\+\+OK@{R\+E\+Q\+\_\+\+OK}}}\mbox{\Hypertarget{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899ab093abb14c097b3b7719debb04d5e8ee}\label{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899ab093abb14c097b3b7719debb04d5e8ee}} 
86 R\+E\+Q\+\_\+\+OK&\\
87 \hline
88
89 \raisebox{\heightof{T}}[0pt][0pt]{\index{N\+O\+T\+\_\+\+N\+U\+M\+B\+ER@{N\+O\+T\+\_\+\+N\+U\+M\+B\+ER}!hs-\/helper.\+h@{hs-\/helper.\+h}}\index{hs-\/helper.\+h@{hs-\/helper.\+h}!N\+O\+T\+\_\+\+N\+U\+M\+B\+ER@{N\+O\+T\+\_\+\+N\+U\+M\+B\+ER}}}\mbox{\Hypertarget{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899aa223eed65c9bee2bf1f4cdecaf90d66a}\label{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899aa223eed65c9bee2bf1f4cdecaf90d66a}} 
90 N\+O\+T\+\_\+\+N\+U\+M\+B\+ER&\\
91 \hline
92
93 \raisebox{\heightof{T}}[0pt][0pt]{\index{O\+U\+T\+\_\+\+R\+A\+N\+GE@{O\+U\+T\+\_\+\+R\+A\+N\+GE}!hs-\/helper.\+h@{hs-\/helper.\+h}}\index{hs-\/helper.\+h@{hs-\/helper.\+h}!O\+U\+T\+\_\+\+R\+A\+N\+GE@{O\+U\+T\+\_\+\+R\+A\+N\+GE}}}\mbox{\Hypertarget{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899add1c84bf80c5f80741ee8f37fef1e12b}\label{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899add1c84bf80c5f80741ee8f37fef1e12b}} 
94 O\+U\+T\+\_\+\+R\+A\+N\+GE&\\
95 \hline
96
97 \end{DoxyEnumFields}
98
99
100 Definition at line 26 of file hs-\/helper.\+h.
101
102
103 \begin{DoxyCode}
104 27 \{
105 28   \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899a96a855966bc63045222b3dcac524cee1}{REQ\_FAIL} = -1,
106 29   \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899ab093abb14c097b3b7719debb04d5e8ee}{REQ\_OK}=0,
107 30   \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899aa223eed65c9bee2bf1f4cdecaf90d66a}{NOT\_NUMBER},
108 31   \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899add1c84bf80c5f80741ee8f37fef1e12b}{OUT\_RANGE}
109 32 \}\hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899}{REQ\_ERROR};
110 \end{DoxyCode}
111
112
113 \subsection{Function Documentation}
114 \mbox{\Hypertarget{hs-helper_8h_a2e62366684e39ea94436bf017e416827}\label{hs-helper_8h_a2e62366684e39ea94436bf017e416827}} 
115 \index{hs-\/helper.\+h@{hs-\/helper.\+h}!get\+\_\+value\+\_\+int16@{get\+\_\+value\+\_\+int16}}
116 \index{get\+\_\+value\+\_\+int16@{get\+\_\+value\+\_\+int16}!hs-\/helper.\+h@{hs-\/helper.\+h}}
117 \subsubsection{\texorpdfstring{get\+\_\+value\+\_\+int16()}{get\_value\_int16()}}
118 {\footnotesize\ttfamily \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899}{R\+E\+Q\+\_\+\+E\+R\+R\+OR} get\+\_\+value\+\_\+int16 (\begin{DoxyParamCaption}\item[{const struct afb\+\_\+req}]{request,  }\item[{const char $\ast$}]{source,  }\item[{int16\+\_\+t $\ast$}]{out\+\_\+id }\end{DoxyParamCaption})}
119
120
121
122 Definition at line 48 of file hs-\/helper.\+c.
123
124
125 \begin{DoxyCode}
126 49 \{
127 50     \textcolor{keywordtype}{char}* endptr;
128 51     \textcolor{keyword}{const} \textcolor{keywordtype}{char}* tmp = afb\_req\_value (request, source);
129 52     \textcolor{keywordflow}{if}(!tmp)
130 53     \{
131 54         \textcolor{keywordflow}{return} \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899a96a855966bc63045222b3dcac524cee1}{REQ\_FAIL};
132 55     \}
133 56     \textcolor{keywordtype}{long} tmp\_id = strtol(tmp,&endptr,10);
134 57 
135 58     \textcolor{comment}{/* error check of range */}
136 59     \textcolor{keywordflow}{if}( (tmp\_id > INT16\_MAX) || (tmp\_id < INT16\_MIN) )
137 60     \{
138 61         \textcolor{keywordflow}{return} \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899add1c84bf80c5f80741ee8f37fef1e12b}{OUT\_RANGE};
139 62     \}
140 63     \textcolor{keywordflow}{if}(*endptr != \textcolor{charliteral}{'\(\backslash\)0'})
141 64     \{
142 65         \textcolor{keywordflow}{return} \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899aa223eed65c9bee2bf1f4cdecaf90d66a}{NOT\_NUMBER};
143 66     \}
144 67 
145 68     *out\_id = (int16\_t)tmp\_id;
146 69     \textcolor{keywordflow}{return} \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899ab093abb14c097b3b7719debb04d5e8ee}{REQ\_OK};
147 70 \}
148 \end{DoxyCode}
149 \mbox{\Hypertarget{hs-helper_8h_ac5b0370643c520377afd3fd4891918d2}\label{hs-helper_8h_ac5b0370643c520377afd3fd4891918d2}} 
150 \index{hs-\/helper.\+h@{hs-\/helper.\+h}!get\+\_\+value\+\_\+int32@{get\+\_\+value\+\_\+int32}}
151 \index{get\+\_\+value\+\_\+int32@{get\+\_\+value\+\_\+int32}!hs-\/helper.\+h@{hs-\/helper.\+h}}
152 \subsubsection{\texorpdfstring{get\+\_\+value\+\_\+int32()}{get\_value\_int32()}}
153 {\footnotesize\ttfamily \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899}{R\+E\+Q\+\_\+\+E\+R\+R\+OR} get\+\_\+value\+\_\+int32 (\begin{DoxyParamCaption}\item[{const struct afb\+\_\+req}]{request,  }\item[{const char $\ast$}]{source,  }\item[{int32\+\_\+t $\ast$}]{out\+\_\+id }\end{DoxyParamCaption})}
154
155
156
157 Definition at line 72 of file hs-\/helper.\+c.
158
159
160 \begin{DoxyCode}
161 73 \{
162 74     \textcolor{keywordtype}{char}* endptr;
163 75     \textcolor{keyword}{const} \textcolor{keywordtype}{char}* tmp = afb\_req\_value (request, source);
164 76     \textcolor{keywordflow}{if}(!tmp)
165 77     \{
166 78         \textcolor{keywordflow}{return} \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899a96a855966bc63045222b3dcac524cee1}{REQ\_FAIL};
167 79     \}
168 80     \textcolor{keywordtype}{long} tmp\_id = strtol(tmp,&endptr,10);
169 81 
170 82     \textcolor{comment}{/* error check of range */}
171 83     \textcolor{keywordflow}{if}( (tmp\_id > INT32\_MAX) || (tmp\_id < INT32\_MIN) )
172 84     \{
173 85         \textcolor{keywordflow}{return} \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899add1c84bf80c5f80741ee8f37fef1e12b}{OUT\_RANGE};
174 86     \}
175 87     \textcolor{keywordflow}{if}(*endptr != \textcolor{charliteral}{'\(\backslash\)0'})
176 88     \{
177 89         \textcolor{keywordflow}{return} \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899aa223eed65c9bee2bf1f4cdecaf90d66a}{NOT\_NUMBER};
178 90     \}
179 91 
180 92     *out\_id = (int32\_t)tmp\_id;
181 93     \textcolor{keywordflow}{return} \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899ab093abb14c097b3b7719debb04d5e8ee}{REQ\_OK};
182 94 \}
183 \end{DoxyCode}
184 \mbox{\Hypertarget{hs-helper_8h_a649900645417f2df3a70b9ad67529f53}\label{hs-helper_8h_a649900645417f2df3a70b9ad67529f53}} 
185 \index{hs-\/helper.\+h@{hs-\/helper.\+h}!get\+\_\+value\+\_\+uint16@{get\+\_\+value\+\_\+uint16}}
186 \index{get\+\_\+value\+\_\+uint16@{get\+\_\+value\+\_\+uint16}!hs-\/helper.\+h@{hs-\/helper.\+h}}
187 \subsubsection{\texorpdfstring{get\+\_\+value\+\_\+uint16()}{get\_value\_uint16()}}
188 {\footnotesize\ttfamily \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899}{R\+E\+Q\+\_\+\+E\+R\+R\+OR} get\+\_\+value\+\_\+uint16 (\begin{DoxyParamCaption}\item[{const struct afb\+\_\+req}]{request,  }\item[{const char $\ast$}]{source,  }\item[{uint16\+\_\+t $\ast$}]{out\+\_\+id }\end{DoxyParamCaption})}
189
190
191
192 Definition at line 24 of file hs-\/helper.\+c.
193
194
195 \begin{DoxyCode}
196 25 \{
197 26     \textcolor{keywordtype}{char}* endptr;
198 27     \textcolor{keyword}{const} \textcolor{keywordtype}{char}* tmp = afb\_req\_value (request, source);
199 28     \textcolor{keywordflow}{if}(!tmp)
200 29     \{
201 30         \textcolor{keywordflow}{return} \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899a96a855966bc63045222b3dcac524cee1}{REQ\_FAIL};
202 31     \}
203 32     \textcolor{keywordtype}{long} tmp\_id = strtol(tmp,&endptr,10);
204 33 
205 34     \textcolor{comment}{/* error check of range */}
206 35     \textcolor{keywordflow}{if}( (tmp\_id > UINT16\_MAX) || (tmp\_id < 0) )
207 36     \{
208 37         \textcolor{keywordflow}{return} \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899add1c84bf80c5f80741ee8f37fef1e12b}{OUT\_RANGE};
209 38     \}
210 39     \textcolor{keywordflow}{if}(*endptr != \textcolor{charliteral}{'\(\backslash\)0'})
211 40     \{
212 41         \textcolor{keywordflow}{return} \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899aa223eed65c9bee2bf1f4cdecaf90d66a}{NOT\_NUMBER};
213 42     \}
214 43 
215 44     *out\_id = (uint16\_t)tmp\_id;
216 45     \textcolor{keywordflow}{return} \hyperlink{hs-helper_8h_aa49f1dbbf26f01627a5737cf43aad899ab093abb14c097b3b7719debb04d5e8ee}{REQ\_OK};
217 46 \}
218 \end{DoxyCode}
219 \mbox{\Hypertarget{hs-helper_8h_a1ba31a6a94515ff1730ba0043a67d59e}\label{hs-helper_8h_a1ba31a6a94515ff1730ba0043a67d59e}} 
220 \index{hs-\/helper.\+h@{hs-\/helper.\+h}!hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object@{hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object}}
221 \index{hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object@{hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object}!hs-\/helper.\+h@{hs-\/helper.\+h}}
222 \subsubsection{\texorpdfstring{hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object()}{hs\_add\_object\_to\_json\_object()}}
223 {\footnotesize\ttfamily void hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object (\begin{DoxyParamCaption}\item[{struct json\+\_\+object $\ast$}]{j\+\_\+obj,  }\item[{int}]{count,  }\item[{}]{... }\end{DoxyParamCaption})}
224
225
226
227 Definition at line 96 of file hs-\/helper.\+c.
228
229
230 \begin{DoxyCode}
231 97 \{
232 98     va\_list args;
233 99     va\_start(args, count);
234 100     \textcolor{keywordflow}{for}(\textcolor{keywordtype}{int} i = 0; i < count; ++i )
235 101     \{
236 102         \textcolor{keywordtype}{char} *key = va\_arg(args, \textcolor{keywordtype}{char}*);
237 103         \textcolor{keywordtype}{int} value = va\_arg(args, \textcolor{keywordtype}{int});
238 104         json\_object\_object\_add(j\_obj, key, json\_object\_new\_int((int32\_t)value));
239 105         ++i;
240 106     \}
241 107     va\_end(args);
242 108 \}
243 \end{DoxyCode}
244 \mbox{\Hypertarget{hs-helper_8h_ae83604a37134e7bdee3ce4f10bb0b47a}\label{hs-helper_8h_ae83604a37134e7bdee3ce4f10bb0b47a}} 
245 \index{hs-\/helper.\+h@{hs-\/helper.\+h}!hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object\+\_\+func@{hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object\+\_\+func}}
246 \index{hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object\+\_\+func@{hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object\+\_\+func}!hs-\/helper.\+h@{hs-\/helper.\+h}}
247 \subsubsection{\texorpdfstring{hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object\+\_\+func()}{hs\_add\_object\_to\_json\_object\_func()}}
248 {\footnotesize\ttfamily void hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object\+\_\+func (\begin{DoxyParamCaption}\item[{struct json\+\_\+object $\ast$}]{j\+\_\+obj,  }\item[{const char $\ast$}]{verb\+\_\+name,  }\item[{int}]{count,  }\item[{}]{... }\end{DoxyParamCaption})}
249
250
251
252 Definition at line 125 of file hs-\/helper.\+c.
253
254
255 \begin{DoxyCode}
256 126 \{
257 127     va\_list args;
258 128     va\_start(args, count);
259 129 
260 130     json\_object\_object\_add(j\_obj,\textcolor{stringliteral}{"verb"}, json\_object\_new\_string(verb\_name));
261 131 
262 132     \textcolor{keywordflow}{for}(\textcolor{keywordtype}{int} i = 0; i < count; ++i )
263 133     \{
264 134         \textcolor{keywordtype}{char} *key = va\_arg(args, \textcolor{keywordtype}{char}*);
265 135         \textcolor{keywordtype}{int} value = va\_arg(args, \textcolor{keywordtype}{int});
266 136         json\_object\_object\_add(j\_obj, key, json\_object\_new\_int((int32\_t)value));
267 137         ++i;
268 138     \}
269 139     va\_end(args);
270 140 \}
271 \end{DoxyCode}
272 \mbox{\Hypertarget{hs-helper_8h_a8777c53f1d4d5412f19b134ad85ffedf}\label{hs-helper_8h_a8777c53f1d4d5412f19b134ad85ffedf}} 
273 \index{hs-\/helper.\+h@{hs-\/helper.\+h}!hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object\+\_\+str@{hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object\+\_\+str}}
274 \index{hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object\+\_\+str@{hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object\+\_\+str}!hs-\/helper.\+h@{hs-\/helper.\+h}}
275 \subsubsection{\texorpdfstring{hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object\+\_\+str()}{hs\_add\_object\_to\_json\_object\_str()}}
276 {\footnotesize\ttfamily void hs\+\_\+add\+\_\+object\+\_\+to\+\_\+json\+\_\+object\+\_\+str (\begin{DoxyParamCaption}\item[{struct json\+\_\+object $\ast$}]{j\+\_\+obj,  }\item[{int}]{count,  }\item[{}]{... }\end{DoxyParamCaption})}
277
278
279
280 Definition at line 110 of file hs-\/helper.\+c.
281
282
283 \begin{DoxyCode}
284 111 \{
285 112     va\_list args;
286 113     va\_start(args, count);
287 114     \textcolor{keywordflow}{for}(\textcolor{keywordtype}{int} i = 0; i < count; ++i )
288 115     \{
289 116         \textcolor{keywordtype}{char} *key = va\_arg(args, \textcolor{keywordtype}{char}*);
290 117         \textcolor{keywordtype}{char} *value = va\_arg(args, \textcolor{keywordtype}{char}*);
291 118         json\_object\_object\_add(j\_obj, key, json\_object\_new\_string(value));
292 119         ++i;
293 120     \}
294 121     va\_end(args);
295 122 \}
296 \end{DoxyCode}
297 \mbox{\Hypertarget{hs-helper_8h_a2ff1b894941c3b461ca8119079c4146a}\label{hs-helper_8h_a2ff1b894941c3b461ca8119079c4146a}} 
298 \index{hs-\/helper.\+h@{hs-\/helper.\+h}!hs\+\_\+search\+\_\+event\+\_\+name\+\_\+index@{hs\+\_\+search\+\_\+event\+\_\+name\+\_\+index}}
299 \index{hs\+\_\+search\+\_\+event\+\_\+name\+\_\+index@{hs\+\_\+search\+\_\+event\+\_\+name\+\_\+index}!hs-\/helper.\+h@{hs-\/helper.\+h}}
300 \subsubsection{\texorpdfstring{hs\+\_\+search\+\_\+event\+\_\+name\+\_\+index()}{hs\_search\_event\_name\_index()}}
301 {\footnotesize\ttfamily int hs\+\_\+search\+\_\+event\+\_\+name\+\_\+index (\begin{DoxyParamCaption}\item[{const char $\ast$}]{value }\end{DoxyParamCaption})}
302
303
304
305 Definition at line 142 of file hs-\/helper.\+c.
306
307
308 \begin{DoxyCode}
309 143 \{
310 144     \textcolor{keywordtype}{size\_t} buf\_size = 50;
311 145     \textcolor{keywordtype}{size\_t} size = \textcolor{keyword}{sizeof} \hyperlink{hs-helper_8h_a0cd84b1a2184c9b84d1b7bf24582f28e}{evlist} / \textcolor{keyword}{sizeof} *\hyperlink{hs-helper_8h_a0cd84b1a2184c9b84d1b7bf24582f28e}{evlist};
312 146     \textcolor{keywordtype}{int} ret = -1;
313 147     \textcolor{keywordflow}{for}(\textcolor{keywordtype}{size\_t} i = 0 ; i < size ; ++i)
314 148     \{
315 149         \textcolor{keywordflow}{if}(!strncmp(value, \hyperlink{hs-helper_8h_a0cd84b1a2184c9b84d1b7bf24582f28e}{evlist}[i], buf\_size))
316 150         \{
317 151             ret = i;
318 152             \textcolor{keywordflow}{break};
319 153         \}
320 154     \}
321 155     \textcolor{keywordflow}{return} ret;
322 156 \}
323 \end{DoxyCode}
324
325
326 \subsection{Variable Documentation}
327 \mbox{\Hypertarget{hs-helper_8h_a0cd84b1a2184c9b84d1b7bf24582f28e}\label{hs-helper_8h_a0cd84b1a2184c9b84d1b7bf24582f28e}} 
328 \index{hs-\/helper.\+h@{hs-\/helper.\+h}!evlist@{evlist}}
329 \index{evlist@{evlist}!hs-\/helper.\+h@{hs-\/helper.\+h}}
330 \subsubsection{\texorpdfstring{evlist}{evlist}}
331 {\footnotesize\ttfamily const char$\ast$ evlist\mbox{[}$\,$\mbox{]}\hspace{0.3cm}{\ttfamily [static]}}
332
333 {\bfseries Initial value\+:}
334 \begin{DoxyCode}
335 = \{
336     \textcolor{stringliteral}{"tap\_shortcut"},
337     \textcolor{stringliteral}{"on\_screen\_message"},
338     \textcolor{stringliteral}{"on\_screen\_reply"},
339     \textcolor{stringliteral}{"reserved"}
340   \}
341 \end{DoxyCode}
342
343
344 Definition at line 34 of file hs-\/helper.\+h.
345