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