update doc
[apps/agl-service-homescreen.git] / doc / api-ref / latex / d2 / d8e / class_h_s___client_manager.tex
1 \hypertarget{class_h_s___client_manager}{}\section{H\+S\+\_\+\+Client\+Manager Class Reference}
2 \label{class_h_s___client_manager}\index{H\+S\+\_\+\+Client\+Manager@{H\+S\+\_\+\+Client\+Manager}}
3
4
5 {\ttfamily \#include $<$hs-\/clientmanager.\+h$>$}
6
7 \subsection*{Public Member Functions}
8 \begin{DoxyCompactItemize}
9 \item 
10 \hyperlink{class_h_s___client_manager_adac35e476e559cc89bc39363525268bf}{H\+S\+\_\+\+Client\+Manager} ()
11 \item 
12 \hyperlink{class_h_s___client_manager_a50733274a93293fef892fdd453d74cae}{$\sim$\+H\+S\+\_\+\+Client\+Manager} ()=default
13 \item 
14 \hyperlink{class_h_s___client_manager_a0033db6b552f9de818789e76735c1ebc}{H\+S\+\_\+\+Client\+Manager} (\hyperlink{class_h_s___client_manager}{H\+S\+\_\+\+Client\+Manager} const \&)=delete
15 \item 
16 \hyperlink{class_h_s___client_manager}{H\+S\+\_\+\+Client\+Manager} \& \hyperlink{class_h_s___client_manager_ac8e02cffc79d4530b06e1143abb18891}{operator=} (\hyperlink{class_h_s___client_manager}{H\+S\+\_\+\+Client\+Manager} const \&)=delete
17 \item 
18 \hyperlink{class_h_s___client_manager_a715811c549cccd93cb1f903d179c8b41}{H\+S\+\_\+\+Client\+Manager} (\hyperlink{class_h_s___client_manager}{H\+S\+\_\+\+Client\+Manager} \&\&)=delete
19 \item 
20 \hyperlink{class_h_s___client_manager}{H\+S\+\_\+\+Client\+Manager} \& \hyperlink{class_h_s___client_manager_a49e225bb8421c812ac016309d54a00fa}{operator=} (\hyperlink{class_h_s___client_manager}{H\+S\+\_\+\+Client\+Manager} \&\&)=delete
21 \item 
22 int \hyperlink{class_h_s___client_manager_ae0b9b18adeffca7822b060ad4ea8a7a1}{init} (void)
23 \item 
24 void \hyperlink{class_h_s___client_manager_adc23f8b3f5cc06eeab39fb24098af3e2}{remove\+Client\+Ctxt} (void $\ast$data)
25 \item 
26 int \hyperlink{class_h_s___client_manager_a9910fc27c412530b5b9854b00bd16c07}{tap\+\_\+shortcut} (afb\+\_\+req\+\_\+t request)
27 \item 
28 int \hyperlink{class_h_s___client_manager_afed8158f276d1d22c32b0d89e970d442}{show\+Window} (afb\+\_\+req\+\_\+t request)
29 \item 
30 int \hyperlink{class_h_s___client_manager_a6195694d281a3b97b0345b96c0add1fd}{hide\+Window} (afb\+\_\+req\+\_\+t request)
31 \item 
32 int \hyperlink{class_h_s___client_manager_a59b1c1e115b5a257a585c41f854f5fdd}{reply\+Show\+Window} (afb\+\_\+req\+\_\+t request)
33 \item 
34 int \hyperlink{class_h_s___client_manager_a58ce4a013d3694265dd69f481bf88510}{on\+\_\+screen\+\_\+message} (afb\+\_\+req\+\_\+t request)
35 \item 
36 int \hyperlink{class_h_s___client_manager_aa78f992287e3b8fe93422b331dc9edc5}{on\+\_\+screen\+\_\+reply} (afb\+\_\+req\+\_\+t request)
37 \item 
38 int \hyperlink{class_h_s___client_manager_a1b8a4e42342c4bcdc4e7dc4934e02469}{subscribe} (afb\+\_\+req\+\_\+t request)
39 \item 
40 int \hyperlink{class_h_s___client_manager_ac86314afbb90116e2f02ce071166226e}{unsubscribe} (afb\+\_\+req\+\_\+t request)
41 \item 
42 int \hyperlink{class_h_s___client_manager_a857934af280081ca6ac61d9f2cac37c5}{show\+Notification} (afb\+\_\+req\+\_\+t request)
43 \item 
44 int \hyperlink{class_h_s___client_manager_a0645294f89c67fd3c9b0cce62a900f69}{show\+Information} (afb\+\_\+req\+\_\+t request)
45 \end{DoxyCompactItemize}
46 \subsection*{Static Public Member Functions}
47 \begin{DoxyCompactItemize}
48 \item 
49 static \hyperlink{class_h_s___client_manager}{H\+S\+\_\+\+Client\+Manager} $\ast$ \hyperlink{class_h_s___client_manager_ad86c1fea7d107d52cbf0466fb7a2658b}{instance} (void)
50 \end{DoxyCompactItemize}
51
52
53 \subsection{Detailed Description}
54
55
56 Definition at line 37 of file hs-\/clientmanager.\+h.
57
58
59
60 \subsection{Constructor \& Destructor Documentation}
61 \index{H\+S\+\_\+\+Client\+Manager@{H\+S\+\_\+\+Client\+Manager}!H\+S\+\_\+\+Client\+Manager@{H\+S\+\_\+\+Client\+Manager}}
62 \index{H\+S\+\_\+\+Client\+Manager@{H\+S\+\_\+\+Client\+Manager}!H\+S\+\_\+\+Client\+Manager@{H\+S\+\_\+\+Client\+Manager}}
63 \subsubsection[{\texorpdfstring{H\+S\+\_\+\+Client\+Manager()}{HS_ClientManager()}}]{\setlength{\rightskip}{0pt plus 5cm}H\+S\+\_\+\+Client\+Manager\+::\+H\+S\+\_\+\+Client\+Manager (
64 \begin{DoxyParamCaption}
65 {}
66 \end{DoxyParamCaption}
67 )}\hypertarget{class_h_s___client_manager_adac35e476e559cc89bc39363525268bf}{}\label{class_h_s___client_manager_adac35e476e559cc89bc39363525268bf}
68 \hyperlink{class_h_s___client_manager}{H\+S\+\_\+\+Client\+Manager} construction function
69
70 \subparagraph*{Parameters}
71
72
73 \begin{DoxyItemize}
74 \item Nothing
75 \end{DoxyItemize}
76
77 \subparagraph*{Return}
78
79 None 
80
81 Definition at line 39 of file hs-\/clientmanager.\+cpp.
82
83
84 \begin{DoxyCode}
85 40 \{
86 41 \}
87 \end{DoxyCode}
88 \index{H\+S\+\_\+\+Client\+Manager@{H\+S\+\_\+\+Client\+Manager}!````~H\+S\+\_\+\+Client\+Manager@{$\sim$\+H\+S\+\_\+\+Client\+Manager}}
89 \index{````~H\+S\+\_\+\+Client\+Manager@{$\sim$\+H\+S\+\_\+\+Client\+Manager}!H\+S\+\_\+\+Client\+Manager@{H\+S\+\_\+\+Client\+Manager}}
90 \subsubsection[{\texorpdfstring{$\sim$\+H\+S\+\_\+\+Client\+Manager()=default}{~HS_ClientManager()=default}}]{\setlength{\rightskip}{0pt plus 5cm}H\+S\+\_\+\+Client\+Manager\+::$\sim$\+H\+S\+\_\+\+Client\+Manager (
91 \begin{DoxyParamCaption}
92 {}
93 \end{DoxyParamCaption}
94 )\hspace{0.3cm}{\ttfamily [default]}}\hypertarget{class_h_s___client_manager_a50733274a93293fef892fdd453d74cae}{}\label{class_h_s___client_manager_a50733274a93293fef892fdd453d74cae}
95 \index{H\+S\+\_\+\+Client\+Manager@{H\+S\+\_\+\+Client\+Manager}!H\+S\+\_\+\+Client\+Manager@{H\+S\+\_\+\+Client\+Manager}}
96 \index{H\+S\+\_\+\+Client\+Manager@{H\+S\+\_\+\+Client\+Manager}!H\+S\+\_\+\+Client\+Manager@{H\+S\+\_\+\+Client\+Manager}}
97 \subsubsection[{\texorpdfstring{H\+S\+\_\+\+Client\+Manager(\+H\+S\+\_\+\+Client\+Manager const \&)=delete}{HS_ClientManager(HS_ClientManager const &)=delete}}]{\setlength{\rightskip}{0pt plus 5cm}H\+S\+\_\+\+Client\+Manager\+::\+H\+S\+\_\+\+Client\+Manager (
98 \begin{DoxyParamCaption}
99 \item[{{\bf H\+S\+\_\+\+Client\+Manager} const \&}]{}
100 \end{DoxyParamCaption}
101 )\hspace{0.3cm}{\ttfamily [delete]}}\hypertarget{class_h_s___client_manager_a0033db6b552f9de818789e76735c1ebc}{}\label{class_h_s___client_manager_a0033db6b552f9de818789e76735c1ebc}
102 \index{H\+S\+\_\+\+Client\+Manager@{H\+S\+\_\+\+Client\+Manager}!H\+S\+\_\+\+Client\+Manager@{H\+S\+\_\+\+Client\+Manager}}
103 \index{H\+S\+\_\+\+Client\+Manager@{H\+S\+\_\+\+Client\+Manager}!H\+S\+\_\+\+Client\+Manager@{H\+S\+\_\+\+Client\+Manager}}
104 \subsubsection[{\texorpdfstring{H\+S\+\_\+\+Client\+Manager(\+H\+S\+\_\+\+Client\+Manager \&\&)=delete}{HS_ClientManager(HS_ClientManager &&)=delete}}]{\setlength{\rightskip}{0pt plus 5cm}H\+S\+\_\+\+Client\+Manager\+::\+H\+S\+\_\+\+Client\+Manager (
105 \begin{DoxyParamCaption}
106 \item[{{\bf H\+S\+\_\+\+Client\+Manager} \&\&}]{}
107 \end{DoxyParamCaption}
108 )\hspace{0.3cm}{\ttfamily [delete]}}\hypertarget{class_h_s___client_manager_a715811c549cccd93cb1f903d179c8b41}{}\label{class_h_s___client_manager_a715811c549cccd93cb1f903d179c8b41}
109
110
111 \subsection{Member Function Documentation}
112 \index{H\+S\+\_\+\+Client\+Manager@{H\+S\+\_\+\+Client\+Manager}!hide\+Window@{hide\+Window}}
113 \index{hide\+Window@{hide\+Window}!H\+S\+\_\+\+Client\+Manager@{H\+S\+\_\+\+Client\+Manager}}
114 \subsubsection[{\texorpdfstring{hide\+Window(afb\+\_\+req\+\_\+t request)}{hideWindow(afb_req_t request)}}]{\setlength{\rightskip}{0pt plus 5cm}int H\+S\+\_\+\+Client\+Manager\+::hide\+Window (
115 \begin{DoxyParamCaption}
116 \item[{afb\+\_\+req\+\_\+t}]{request}
117 \end{DoxyParamCaption}
118 )}\hypertarget{class_h_s___client_manager_a6195694d281a3b97b0345b96c0add1fd}{}\label{class_h_s___client_manager_a6195694d281a3b97b0345b96c0add1fd}
119 hide\+Window event
120
121 \subparagraph*{Parameters}
122
123
124 \begin{DoxyItemize}
125 \item request \+: the request
126 \end{DoxyItemize}
127
128 \subparagraph*{Return}
129
130 0 \+: success others \+: fail 
131
132 Definition at line 356 of file hs-\/clientmanager.\+cpp.
133
134
135 \begin{DoxyCode}
136 357 \{
137 358     \textcolor{keywordtype}{int} ret = 0;
138 359     \textcolor{keyword}{const} \textcolor{keywordtype}{char}* value = afb\_req\_value(request, \hyperlink{homescreen_8cpp_a6a0e1db2562b442f8131ddf64b61d1ba}{\_application\_id});
139 360     \textcolor{keywordflow}{if} (value) \{
140 361         \hyperlink{include_2hmi-debug_8h_abc0d6e0760017d8ae48b836925b2ef15}{HMI\_NOTICE}(\textcolor{stringliteral}{"homescreen-service"},\textcolor{stringliteral}{"request params = %s."}, value);
141 362         std::lock\_guard<std::mutex> lock(this->mtx);
142 363         \textcolor{keyword}{auto} ip = client\_list.find(std::string(value));
143 364         \textcolor{keywordflow}{if}(ip != client\_list.end()) \{
144 365             ret = ip->second->hideWindow(request);
145 366         \}
146 367     \}
147 368     \textcolor{keywordflow}{else} \{
148 369         \hyperlink{include_2hmi-debug_8h_abc0d6e0760017d8ae48b836925b2ef15}{HMI\_NOTICE}(\textcolor{stringliteral}{"homescreen-service"},\textcolor{stringliteral}{"Please input application\_id"});
149 370         ret = \hyperlink{hs-helper_8h_aa611e2ec24ef295bd87825889fe2ce5e}{AFB\_EVENT\_BAD\_REQUEST};
150 371     \}
151 372     \textcolor{keywordflow}{return} ret;
152 373 \}
153 \end{DoxyCode}
154 \index{H\+S\+\_\+\+Client\+Manager@{H\+S\+\_\+\+Client\+Manager}!init@{init}}
155 \index{init@{init}!H\+S\+\_\+\+Client\+Manager@{H\+S\+\_\+\+Client\+Manager}}
156 \subsubsection[{\texorpdfstring{init(void)}{init(void)}}]{\setlength{\rightskip}{0pt plus 5cm}int H\+S\+\_\+\+Client\+Manager\+::init (
157 \begin{DoxyParamCaption}
158 \item[{void}]{}
159 \end{DoxyParamCaption}
160 )}\hypertarget{class_h_s___client_manager_ae0b9b18adeffca7822b060ad4ea8a7a1}{}\label{class_h_s___client_manager_ae0b9b18adeffca7822b060ad4ea8a7a1}
161 \hyperlink{class_h_s___client_manager}{H\+S\+\_\+\+Client\+Manager} init function
162
163 \subparagraph*{Parameters}
164
165
166 \begin{DoxyItemize}
167 \item Nothing
168 \end{DoxyItemize}
169
170 \subparagraph*{Return}
171
172 init result 
173
174 Definition at line 71 of file hs-\/clientmanager.\+cpp.
175
176
177 \begin{DoxyCode}
178 72 \{
179 73     \hyperlink{include_2hmi-debug_8h_abc0d6e0760017d8ae48b836925b2ef15}{HMI\_NOTICE}(\textcolor{stringliteral}{"homescreen-service"},\textcolor{stringliteral}{"called."});
180 74 \}
181 \end{DoxyCode}
182 \index{H\+S\+\_\+\+Client\+Manager@{H\+S\+\_\+\+Client\+Manager}!instance@{instance}}
183 \index{instance@{instance}!H\+S\+\_\+\+Client\+Manager@{H\+S\+\_\+\+Client\+Manager}}
184 \subsubsection[{\texorpdfstring{instance(void)}{instance(void)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf H\+S\+\_\+\+Client\+Manager} $\ast$ H\+S\+\_\+\+Client\+Manager\+::instance (
185 \begin{DoxyParamCaption}
186 \item[{void}]{}
187 \end{DoxyParamCaption}
188 )\hspace{0.3cm}{\ttfamily [static]}}\hypertarget{class_h_s___client_manager_ad86c1fea7d107d52cbf0466fb7a2658b}{}\label{class_h_s___client_manager_ad86c1fea7d107d52cbf0466fb7a2658b}
189 get instance
190
191 \subparagraph*{Parameters}
192
193
194 \begin{DoxyItemize}
195 \item Nothing
196 \end{DoxyItemize}
197
198 \subparagraph*{Return}
199
200 \hyperlink{class_h_s___client_manager}{H\+S\+\_\+\+Client\+Manager} instance pointer 
201
202 Definition at line 53 of file hs-\/clientmanager.\+cpp.
203
204
205 \begin{DoxyCode}
206 54 \{
207 55     \textcolor{keywordflow}{if}(me == \textcolor{keyword}{nullptr})
208 56         me = \textcolor{keyword}{new} \hyperlink{class_h_s___client_manager_adac35e476e559cc89bc39363525268bf}{HS\_ClientManager}();
209 57 
210 58     \textcolor{keywordflow}{return} me;
211 59 \}
212 \end{DoxyCode}
213 \index{H\+S\+\_\+\+Client\+Manager@{H\+S\+\_\+\+Client\+Manager}!on\+\_\+screen\+\_\+message@{on\+\_\+screen\+\_\+message}}
214 \index{on\+\_\+screen\+\_\+message@{on\+\_\+screen\+\_\+message}!H\+S\+\_\+\+Client\+Manager@{H\+S\+\_\+\+Client\+Manager}}
215 \subsubsection[{\texorpdfstring{on\+\_\+screen\+\_\+message(afb\+\_\+req\+\_\+t request)}{on_screen_message(afb_req_t request)}}]{\setlength{\rightskip}{0pt plus 5cm}int H\+S\+\_\+\+Client\+Manager\+::on\+\_\+screen\+\_\+message (
216 \begin{DoxyParamCaption}
217 \item[{afb\+\_\+req\+\_\+t}]{request}
218 \end{DoxyParamCaption}
219 )}\hypertarget{class_h_s___client_manager_a58ce4a013d3694265dd69f481bf88510}{}\label{class_h_s___client_manager_a58ce4a013d3694265dd69f481bf88510}
220 on\+\_\+screen\+\_\+message
221
222 \subparagraph*{Parameters}
223
224
225 \begin{DoxyItemize}
226 \item request\+: the request to bindings
227 \end{DoxyItemize}
228
229 \subparagraph*{Return}
230
231 result 
232
233 Definition at line 195 of file hs-\/clientmanager.\+cpp.
234
235
236 \begin{DoxyCode}
237 196 \{
238 197     \textcolor{keywordtype}{int} ret = 0;
239 198     \textcolor{keyword}{const} \textcolor{keywordtype}{char}* value = afb\_req\_value(request, \hyperlink{homescreen_8cpp_abfd6c1d6f316fa952b11553f8f275e92}{\_display\_message});
240 199     \textcolor{keywordflow}{if} (value) \{
241 200         \hyperlink{include_2hmi-debug_8h_abc0d6e0760017d8ae48b836925b2ef15}{HMI\_NOTICE}(\textcolor{stringliteral}{"homescreen-service"},\textcolor{stringliteral}{"request params = %s."}, value);
242 201         std::lock\_guard<std::mutex> lock(this->mtx);
243 202         \textcolor{keywordflow}{for}(\textcolor{keyword}{auto} m : client\_list) \{
244 203             m.second->on\_screen\_message(request, value);
245 204         \}
246 205     \}
247 206     \textcolor{keywordflow}{else} \{
248 207         \hyperlink{include_2hmi-debug_8h_abc0d6e0760017d8ae48b836925b2ef15}{HMI\_NOTICE}(\textcolor{stringliteral}{"homescreen-service"},\textcolor{stringliteral}{"Please input display\_message"});
249 208         ret = \hyperlink{hs-helper_8h_aa611e2ec24ef295bd87825889fe2ce5e}{AFB\_EVENT\_BAD\_REQUEST};
250 209     \}
251 210     \textcolor{keywordflow}{return} ret;
252 211 \}
253 \end{DoxyCode}
254 \index{H\+S\+\_\+\+Client\+Manager@{H\+S\+\_\+\+Client\+Manager}!on\+\_\+screen\+\_\+reply@{on\+\_\+screen\+\_\+reply}}
255 \index{on\+\_\+screen\+\_\+reply@{on\+\_\+screen\+\_\+reply}!H\+S\+\_\+\+Client\+Manager@{H\+S\+\_\+\+Client\+Manager}}
256 \subsubsection[{\texorpdfstring{on\+\_\+screen\+\_\+reply(afb\+\_\+req\+\_\+t request)}{on_screen_reply(afb_req_t request)}}]{\setlength{\rightskip}{0pt plus 5cm}int H\+S\+\_\+\+Client\+Manager\+::on\+\_\+screen\+\_\+reply (
257 \begin{DoxyParamCaption}
258 \item[{afb\+\_\+req\+\_\+t}]{request}
259 \end{DoxyParamCaption}
260 )}\hypertarget{class_h_s___client_manager_aa78f992287e3b8fe93422b331dc9edc5}{}\label{class_h_s___client_manager_aa78f992287e3b8fe93422b331dc9edc5}
261 on\+\_\+screen\+\_\+reply
262
263 \subparagraph*{Parameters}
264
265
266 \begin{DoxyItemize}
267 \item request\+: the request to bindings
268 \end{DoxyItemize}
269
270 \subparagraph*{Return}
271
272 result 
273
274 Definition at line 223 of file hs-\/clientmanager.\+cpp.
275
276
277 \begin{DoxyCode}
278 224 \{
279 225     \textcolor{keywordtype}{int} ret = 0;
280 226     \textcolor{keyword}{const} \textcolor{keywordtype}{char}* value = afb\_req\_value(request, \hyperlink{homescreen_8cpp_a79b0f0b481161527ccb80e83da143219}{\_reply\_message});
281 227     \textcolor{keywordflow}{if} (value) \{
282 228       \hyperlink{include_2hmi-debug_8h_abc0d6e0760017d8ae48b836925b2ef15}{HMI\_NOTICE}(\textcolor{stringliteral}{"homescreen-service"},\textcolor{stringliteral}{"request params = %s."}, value);
283 229       std::lock\_guard<std::mutex> lock(this->mtx);
284 230       \textcolor{keywordflow}{for}(\textcolor{keyword}{auto} m : client\_list) \{
285 231         m.second->on\_screen\_reply(request, value);
286 232       \}
287 233     \}
288 234     \textcolor{keywordflow}{else} \{
289 235         \hyperlink{include_2hmi-debug_8h_abc0d6e0760017d8ae48b836925b2ef15}{HMI\_NOTICE}(\textcolor{stringliteral}{"homescreen-service"},\textcolor{stringliteral}{"Please input reply\_message"});
290 236         ret = \hyperlink{hs-helper_8h_aa611e2ec24ef295bd87825889fe2ce5e}{AFB\_EVENT\_BAD\_REQUEST};
291 237     \}
292 238     \textcolor{keywordflow}{return} ret;
293 239 \}
294 \end{DoxyCode}
295 \index{H\+S\+\_\+\+Client\+Manager@{H\+S\+\_\+\+Client\+Manager}!operator=@{operator=}}
296 \index{operator=@{operator=}!H\+S\+\_\+\+Client\+Manager@{H\+S\+\_\+\+Client\+Manager}}
297 \subsubsection[{\texorpdfstring{operator=(\+H\+S\+\_\+\+Client\+Manager const \&)=delete}{operator=(HS_ClientManager const &)=delete}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf H\+S\+\_\+\+Client\+Manager}\& H\+S\+\_\+\+Client\+Manager\+::operator= (
298 \begin{DoxyParamCaption}
299 \item[{{\bf H\+S\+\_\+\+Client\+Manager} const \&}]{}
300 \end{DoxyParamCaption}
301 )\hspace{0.3cm}{\ttfamily [delete]}}\hypertarget{class_h_s___client_manager_ac8e02cffc79d4530b06e1143abb18891}{}\label{class_h_s___client_manager_ac8e02cffc79d4530b06e1143abb18891}
302 \index{H\+S\+\_\+\+Client\+Manager@{H\+S\+\_\+\+Client\+Manager}!operator=@{operator=}}
303 \index{operator=@{operator=}!H\+S\+\_\+\+Client\+Manager@{H\+S\+\_\+\+Client\+Manager}}
304 \subsubsection[{\texorpdfstring{operator=(\+H\+S\+\_\+\+Client\+Manager \&\&)=delete}{operator=(HS_ClientManager &&)=delete}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf H\+S\+\_\+\+Client\+Manager}\& H\+S\+\_\+\+Client\+Manager\+::operator= (
305 \begin{DoxyParamCaption}
306 \item[{{\bf H\+S\+\_\+\+Client\+Manager} \&\&}]{}
307 \end{DoxyParamCaption}
308 )\hspace{0.3cm}{\ttfamily [delete]}}\hypertarget{class_h_s___client_manager_a49e225bb8421c812ac016309d54a00fa}{}\label{class_h_s___client_manager_a49e225bb8421c812ac016309d54a00fa}
309 \index{H\+S\+\_\+\+Client\+Manager@{H\+S\+\_\+\+Client\+Manager}!remove\+Client\+Ctxt@{remove\+Client\+Ctxt}}
310 \index{remove\+Client\+Ctxt@{remove\+Client\+Ctxt}!H\+S\+\_\+\+Client\+Manager@{H\+S\+\_\+\+Client\+Manager}}
311 \subsubsection[{\texorpdfstring{remove\+Client\+Ctxt(void $\ast$data)}{removeClientCtxt(void *data)}}]{\setlength{\rightskip}{0pt plus 5cm}void H\+S\+\_\+\+Client\+Manager\+::remove\+Client\+Ctxt (
312 \begin{DoxyParamCaption}
313 \item[{void $\ast$}]{data}
314 \end{DoxyParamCaption}
315 )}\hypertarget{class_h_s___client_manager_adc23f8b3f5cc06eeab39fb24098af3e2}{}\label{class_h_s___client_manager_adc23f8b3f5cc06eeab39fb24098af3e2}
316 remove Client from list
317
318 \subparagraph*{Parameters}
319
320
321 \begin{DoxyItemize}
322 \item data\+: \hyperlink{struct_h_s___client_ctxt}{H\+S\+\_\+\+Client\+Ctxt} pointer
323 \end{DoxyItemize}
324
325 \subparagraph*{Return}
326
327 None 
328
329 Definition at line 140 of file hs-\/clientmanager.\+cpp.
330
331
332 \begin{DoxyCode}
333 141 \{
334 142     \hyperlink{struct_h_s___client_ctxt}{HS\_ClientCtxt} *ctxt = (\hyperlink{struct_h_s___client_ctxt}{HS\_ClientCtxt} *)data;
335 143     \textcolor{keywordflow}{if}(ctxt == \textcolor{keyword}{nullptr})
336 144     \{
337 145         \hyperlink{include_2hmi-debug_8h_a65bb6c7cfe38f8a724beab5059d36fb2}{HMI\_ERROR}(\textcolor{stringliteral}{"homescreen-service"}, \textcolor{stringliteral}{"data is nullptr"});
338 146         \textcolor{keywordflow}{return};
339 147     \}
340 148 
341 149     \hyperlink{include_2hmi-debug_8h_abc0d6e0760017d8ae48b836925b2ef15}{HMI\_NOTICE}(\textcolor{stringliteral}{"homescreen-service"}, \textcolor{stringliteral}{"remove app %s"}, ctxt->\hyperlink{struct_h_s___client_ctxt_a04929d7d5f583a821d3d594815f77d1c}{id}.c\_str());
342 150     std::lock\_guard<std::mutex> lock(this->mtx);
343 151     removeClient(ctxt->\hyperlink{struct_h_s___client_ctxt_a04929d7d5f583a821d3d594815f77d1c}{id});
344 152     \textcolor{keyword}{delete} appid2ctxt[ctxt->\hyperlink{struct_h_s___client_ctxt_a04929d7d5f583a821d3d594815f77d1c}{id}];
345 153     appid2ctxt.erase(ctxt->\hyperlink{struct_h_s___client_ctxt_a04929d7d5f583a821d3d594815f77d1c}{id});
346 154 \}
347 \end{DoxyCode}
348 \index{H\+S\+\_\+\+Client\+Manager@{H\+S\+\_\+\+Client\+Manager}!reply\+Show\+Window@{reply\+Show\+Window}}
349 \index{reply\+Show\+Window@{reply\+Show\+Window}!H\+S\+\_\+\+Client\+Manager@{H\+S\+\_\+\+Client\+Manager}}
350 \subsubsection[{\texorpdfstring{reply\+Show\+Window(afb\+\_\+req\+\_\+t request)}{replyShowWindow(afb_req_t request)}}]{\setlength{\rightskip}{0pt plus 5cm}int H\+S\+\_\+\+Client\+Manager\+::reply\+Show\+Window (
351 \begin{DoxyParamCaption}
352 \item[{afb\+\_\+req\+\_\+t}]{request}
353 \end{DoxyParamCaption}
354 )}\hypertarget{class_h_s___client_manager_a59b1c1e115b5a257a585c41f854f5fdd}{}\label{class_h_s___client_manager_a59b1c1e115b5a257a585c41f854f5fdd}
355 reply\+Show\+Window event
356
357 \subparagraph*{Parameters}
358
359
360 \begin{DoxyItemize}
361 \item request \+: the request
362 \end{DoxyItemize}
363
364 \subparagraph*{Return}
365
366 0 \+: success others \+: fail 
367
368 Definition at line 386 of file hs-\/clientmanager.\+cpp.
369
370
371 \begin{DoxyCode}
372 387 \{
373 388     \textcolor{keywordtype}{int} ret = 0;
374 389     \textcolor{keyword}{const} \textcolor{keywordtype}{char}* value = afb\_req\_value(request, \hyperlink{homescreen_8cpp_a6a0e1db2562b442f8131ddf64b61d1ba}{\_application\_id});
375 390     \textcolor{keywordflow}{if} (value) \{
376 391         \hyperlink{include_2hmi-debug_8h_abc0d6e0760017d8ae48b836925b2ef15}{HMI\_NOTICE}(\textcolor{stringliteral}{"homescreen-service"},\textcolor{stringliteral}{"request params = %s."}, value);
377 392         std::lock\_guard<std::mutex> lock(this->mtx);
378 393         \textcolor{keyword}{auto} ip = client\_list.find(std::string(value));
379 394         \textcolor{keywordflow}{if}(ip != client\_list.end()) \{
380 395             ret = ip->second->replyShowWindow(request, value);
381 396         \}
382 397     \}
383 398     \textcolor{keywordflow}{else} \{
384 399         \hyperlink{include_2hmi-debug_8h_abc0d6e0760017d8ae48b836925b2ef15}{HMI\_NOTICE}(\textcolor{stringliteral}{"homescreen-service"},\textcolor{stringliteral}{"Please input application\_id"});
385 400         ret = \hyperlink{hs-helper_8h_aa611e2ec24ef295bd87825889fe2ce5e}{AFB\_EVENT\_BAD\_REQUEST};
386 401     \}
387 402     \textcolor{keywordflow}{return} ret;
388 403 \}
389 \end{DoxyCode}
390 \index{H\+S\+\_\+\+Client\+Manager@{H\+S\+\_\+\+Client\+Manager}!show\+Information@{show\+Information}}
391 \index{show\+Information@{show\+Information}!H\+S\+\_\+\+Client\+Manager@{H\+S\+\_\+\+Client\+Manager}}
392 \subsubsection[{\texorpdfstring{show\+Information(afb\+\_\+req\+\_\+t request)}{showInformation(afb_req_t request)}}]{\setlength{\rightskip}{0pt plus 5cm}int H\+S\+\_\+\+Client\+Manager\+::show\+Information (
393 \begin{DoxyParamCaption}
394 \item[{afb\+\_\+req\+\_\+t}]{request}
395 \end{DoxyParamCaption}
396 )}\hypertarget{class_h_s___client_manager_a0645294f89c67fd3c9b0cce62a900f69}{}\label{class_h_s___client_manager_a0645294f89c67fd3c9b0cce62a900f69}
397 show\+Information event
398
399 \subparagraph*{Parameters}
400
401
402 \begin{DoxyItemize}
403 \item request \+: the request
404 \end{DoxyItemize}
405
406 \subparagraph*{Return}
407
408 0 \+: success others \+: fail 
409
410 Definition at line 443 of file hs-\/clientmanager.\+cpp.
411
412
413 \begin{DoxyCode}
414 444 \{
415 445     \textcolor{keywordtype}{int} ret = 0;
416 446     std::lock\_guard<std::mutex> lock(this->mtx);
417 447     \textcolor{keyword}{auto} ip = client\_list.find(\hyperlink{hs-clientmanager_8cpp_a8bbab9002543614eacdc7a319d13a476}{\_homescreen});
418 448     \textcolor{keywordflow}{if}(ip != client\_list.end()) \{
419 449         ret = ip->second->showInformation(request);
420 450     \}
421 451     \textcolor{keywordflow}{else} \{
422 452         \hyperlink{include_2hmi-debug_8h_abc0d6e0760017d8ae48b836925b2ef15}{HMI\_NOTICE}(\textcolor{stringliteral}{"homescreen-service"},\textcolor{stringliteral}{"not exist sessiion with homescreen"});
423 453         ret = \hyperlink{hs-helper_8h_aefe0d7ff8202f954693c235c1fb8e310}{AFB\_REQ\_SHOWINFORMATION\_ERROR};
424 454     \}
425 455 
426 456     \textcolor{keywordflow}{return} ret;
427 457 \}
428 \end{DoxyCode}
429 \index{H\+S\+\_\+\+Client\+Manager@{H\+S\+\_\+\+Client\+Manager}!show\+Notification@{show\+Notification}}
430 \index{show\+Notification@{show\+Notification}!H\+S\+\_\+\+Client\+Manager@{H\+S\+\_\+\+Client\+Manager}}
431 \subsubsection[{\texorpdfstring{show\+Notification(afb\+\_\+req\+\_\+t request)}{showNotification(afb_req_t request)}}]{\setlength{\rightskip}{0pt plus 5cm}int H\+S\+\_\+\+Client\+Manager\+::show\+Notification (
432 \begin{DoxyParamCaption}
433 \item[{afb\+\_\+req\+\_\+t}]{request}
434 \end{DoxyParamCaption}
435 )}\hypertarget{class_h_s___client_manager_a857934af280081ca6ac61d9f2cac37c5}{}\label{class_h_s___client_manager_a857934af280081ca6ac61d9f2cac37c5}
436 show\+Notification event
437
438 \subparagraph*{Parameters}
439
440
441 \begin{DoxyItemize}
442 \item request \+: the request
443 \end{DoxyItemize}
444
445 \subparagraph*{Return}
446
447 0 \+: success others \+: fail 
448
449 Definition at line 416 of file hs-\/clientmanager.\+cpp.
450
451
452 \begin{DoxyCode}
453 417 \{
454 418     \textcolor{keywordtype}{int} ret = 0;
455 419     std::lock\_guard<std::mutex> lock(this->mtx);
456 420     \textcolor{keyword}{auto} ip = client\_list.find(\hyperlink{hs-clientmanager_8cpp_a8bbab9002543614eacdc7a319d13a476}{\_homescreen});
457 421     \textcolor{keywordflow}{if}(ip != client\_list.end()) \{
458 422         ret = ip->second->showNotification(request);
459 423     \}
460 424     \textcolor{keywordflow}{else} \{
461 425         \hyperlink{include_2hmi-debug_8h_abc0d6e0760017d8ae48b836925b2ef15}{HMI\_NOTICE}(\textcolor{stringliteral}{"homescreen-service"},\textcolor{stringliteral}{"not exist sessiion with homescreen"});
462 426         ret = \hyperlink{hs-helper_8h_a057fc88b8445828c261305cf9107d99d}{AFB\_REQ\_SHOWNOTIFICATION\_ERROR};
463 427     \}
464 428 
465 429     \textcolor{keywordflow}{return} ret;
466 430 \}
467 \end{DoxyCode}
468 \index{H\+S\+\_\+\+Client\+Manager@{H\+S\+\_\+\+Client\+Manager}!show\+Window@{show\+Window}}
469 \index{show\+Window@{show\+Window}!H\+S\+\_\+\+Client\+Manager@{H\+S\+\_\+\+Client\+Manager}}
470 \subsubsection[{\texorpdfstring{show\+Window(afb\+\_\+req\+\_\+t request)}{showWindow(afb_req_t request)}}]{\setlength{\rightskip}{0pt plus 5cm}int H\+S\+\_\+\+Client\+Manager\+::show\+Window (
471 \begin{DoxyParamCaption}
472 \item[{afb\+\_\+req\+\_\+t}]{request}
473 \end{DoxyParamCaption}
474 )}\hypertarget{class_h_s___client_manager_afed8158f276d1d22c32b0d89e970d442}{}\label{class_h_s___client_manager_afed8158f276d1d22c32b0d89e970d442}
475 show\+Window event
476
477 \subparagraph*{Parameters}
478
479
480 \begin{DoxyItemize}
481 \item request \+: the request
482 \end{DoxyItemize}
483
484 \subparagraph*{Return}
485
486 0 \+: success others \+: fail 
487
488 Definition at line 326 of file hs-\/clientmanager.\+cpp.
489
490
491 \begin{DoxyCode}
492 327 \{
493 328     \textcolor{keywordtype}{int} ret = 0;
494 329     \textcolor{keyword}{const} \textcolor{keywordtype}{char}* value = afb\_req\_value(request, \hyperlink{homescreen_8cpp_a6a0e1db2562b442f8131ddf64b61d1ba}{\_application\_id});
495 330     \textcolor{keywordflow}{if} (value) \{
496 331         \hyperlink{include_2hmi-debug_8h_abc0d6e0760017d8ae48b836925b2ef15}{HMI\_NOTICE}(\textcolor{stringliteral}{"homescreen-service"},\textcolor{stringliteral}{"request params = %s."}, value);
497 332         std::lock\_guard<std::mutex> lock(this->mtx);
498 333         \textcolor{keyword}{auto} ip = client\_list.find(std::string(value));
499 334         \textcolor{keywordflow}{if}(ip != client\_list.end()) \{
500 335             ret = ip->second->showWindow(request, value);
501 336         \}
502 337     \}
503 338     \textcolor{keywordflow}{else} \{
504 339         \hyperlink{include_2hmi-debug_8h_abc0d6e0760017d8ae48b836925b2ef15}{HMI\_NOTICE}(\textcolor{stringliteral}{"homescreen-service"},\textcolor{stringliteral}{"Please input application\_id"});
505 340         ret = \hyperlink{hs-helper_8h_aa611e2ec24ef295bd87825889fe2ce5e}{AFB\_EVENT\_BAD\_REQUEST};
506 341     \}
507 342     \textcolor{keywordflow}{return} ret;
508 343 \}
509 \end{DoxyCode}
510 \index{H\+S\+\_\+\+Client\+Manager@{H\+S\+\_\+\+Client\+Manager}!subscribe@{subscribe}}
511 \index{subscribe@{subscribe}!H\+S\+\_\+\+Client\+Manager@{H\+S\+\_\+\+Client\+Manager}}
512 \subsubsection[{\texorpdfstring{subscribe(afb\+\_\+req\+\_\+t request)}{subscribe(afb_req_t request)}}]{\setlength{\rightskip}{0pt plus 5cm}int H\+S\+\_\+\+Client\+Manager\+::subscribe (
513 \begin{DoxyParamCaption}
514 \item[{afb\+\_\+req\+\_\+t}]{request}
515 \end{DoxyParamCaption}
516 )}\hypertarget{class_h_s___client_manager_a1b8a4e42342c4bcdc4e7dc4934e02469}{}\label{class_h_s___client_manager_a1b8a4e42342c4bcdc4e7dc4934e02469}
517 subscribe
518
519 \subparagraph*{Parameters}
520
521
522 \begin{DoxyItemize}
523 \item request\+: the request to bindings
524 \end{DoxyItemize}
525
526 \subparagraph*{Return}
527
528 result 
529
530 Definition at line 251 of file hs-\/clientmanager.\+cpp.
531
532
533 \begin{DoxyCode}
534 252 \{
535 253     \textcolor{keywordtype}{int} ret = 0;
536 254     \textcolor{keyword}{const} \textcolor{keywordtype}{char} *value = afb\_req\_value(request, \textcolor{stringliteral}{"event"});
537 255     \hyperlink{include_2hmi-debug_8h_abc0d6e0760017d8ae48b836925b2ef15}{HMI\_NOTICE}(\textcolor{stringliteral}{"homescreen-service"},\textcolor{stringliteral}{"value is %s"}, value);
538 256     \textcolor{keywordflow}{if}(value) \{
539 257         std::string appid(afb\_req\_get\_application\_id(request));
540 258         std::lock\_guard<std::mutex> lock(this->mtx);
541 259 
542 260         \hyperlink{class_h_s___client}{HS\_Client}* client = \textcolor{keyword}{nullptr};
543 261         \textcolor{keyword}{auto} ip = client\_list.find(appid);
544 262         \textcolor{keywordflow}{if}(ip != client\_list.end()) \{
545 263             client = client\_list[appid];
546 264         \}
547 265         \textcolor{keywordflow}{else} \{
548 266             appid2ctxt[appid] = createClientCtxt(request, appid);
549 267             client = addClient(request, appid);
550 268         \}
551 269 
552 270         \textcolor{keywordflow}{if}(client->\hyperlink{class_h_s___client_a3d000ca70bd4a8af7c4895d95bc7d0d0}{subscribe}(request, value) != 0) \{
553 271             \hyperlink{include_2hmi-debug_8h_abc0d6e0760017d8ae48b836925b2ef15}{HMI\_NOTICE}(\textcolor{stringliteral}{"homescreen-service"},\textcolor{stringliteral}{"subscribe failed"});
554 272             ret = \hyperlink{hs-helper_8h_a995612de89db4df1483c16e4b9b70571}{AFB\_REQ\_SUBSCRIBE\_ERROR};
555 273         \}
556 274     \}
557 275     \textcolor{keywordflow}{else} \{
558 276         \hyperlink{include_2hmi-debug_8h_abc0d6e0760017d8ae48b836925b2ef15}{HMI\_NOTICE}(\textcolor{stringliteral}{"homescreen-service"},\textcolor{stringliteral}{"Please input event name"});
559 277         ret = \hyperlink{hs-helper_8h_aa611e2ec24ef295bd87825889fe2ce5e}{AFB\_EVENT\_BAD\_REQUEST};
560 278     \}
561 279     \textcolor{keywordflow}{return} ret;
562 280 \}
563 \end{DoxyCode}
564 \index{H\+S\+\_\+\+Client\+Manager@{H\+S\+\_\+\+Client\+Manager}!tap\+\_\+shortcut@{tap\+\_\+shortcut}}
565 \index{tap\+\_\+shortcut@{tap\+\_\+shortcut}!H\+S\+\_\+\+Client\+Manager@{H\+S\+\_\+\+Client\+Manager}}
566 \subsubsection[{\texorpdfstring{tap\+\_\+shortcut(afb\+\_\+req\+\_\+t request)}{tap_shortcut(afb_req_t request)}}]{\setlength{\rightskip}{0pt plus 5cm}int H\+S\+\_\+\+Client\+Manager\+::tap\+\_\+shortcut (
567 \begin{DoxyParamCaption}
568 \item[{afb\+\_\+req\+\_\+t}]{request}
569 \end{DoxyParamCaption}
570 )}\hypertarget{class_h_s___client_manager_a9910fc27c412530b5b9854b00bd16c07}{}\label{class_h_s___client_manager_a9910fc27c412530b5b9854b00bd16c07}
571 tap\+\_\+shortcut
572
573 \subparagraph*{Parameters}
574
575
576 \begin{DoxyItemize}
577 \item request\+: the request to bindings
578 \end{DoxyItemize}
579
580 \subparagraph*{Return}
581
582 result 
583
584 Definition at line 166 of file hs-\/clientmanager.\+cpp.
585
586
587 \begin{DoxyCode}
588 167 \{
589 168     \textcolor{keywordtype}{int} ret = 0;
590 169     \textcolor{keyword}{const} \textcolor{keywordtype}{char}* value = afb\_req\_value(request, \hyperlink{homescreen_8cpp_a6a0e1db2562b442f8131ddf64b61d1ba}{\_application\_id});
591 170     \textcolor{keywordflow}{if} (value) \{
592 171         \hyperlink{include_2hmi-debug_8h_abc0d6e0760017d8ae48b836925b2ef15}{HMI\_NOTICE}(\textcolor{stringliteral}{"homescreen-service"},\textcolor{stringliteral}{"request params = %s."}, value);
593 172         std::lock\_guard<std::mutex> lock(this->mtx);
594 173         \textcolor{keyword}{auto} ip = client\_list.find(std::string(value));
595 174         \textcolor{keywordflow}{if}(ip != client\_list.end()) \{
596 175             ip->second->tap\_shortcut(value);
597 176         \}
598 177     \}
599 178     \textcolor{keywordflow}{else} \{
600 179         \hyperlink{include_2hmi-debug_8h_abc0d6e0760017d8ae48b836925b2ef15}{HMI\_NOTICE}(\textcolor{stringliteral}{"homescreen-service"},\textcolor{stringliteral}{"Please input application\_id"});
601 180         ret = \hyperlink{hs-helper_8h_aa611e2ec24ef295bd87825889fe2ce5e}{AFB\_EVENT\_BAD\_REQUEST};
602 181     \}
603 182     \textcolor{keywordflow}{return} ret;
604 183 \}
605 \end{DoxyCode}
606 \index{H\+S\+\_\+\+Client\+Manager@{H\+S\+\_\+\+Client\+Manager}!unsubscribe@{unsubscribe}}
607 \index{unsubscribe@{unsubscribe}!H\+S\+\_\+\+Client\+Manager@{H\+S\+\_\+\+Client\+Manager}}
608 \subsubsection[{\texorpdfstring{unsubscribe(afb\+\_\+req\+\_\+t request)}{unsubscribe(afb_req_t request)}}]{\setlength{\rightskip}{0pt plus 5cm}int H\+S\+\_\+\+Client\+Manager\+::unsubscribe (
609 \begin{DoxyParamCaption}
610 \item[{afb\+\_\+req\+\_\+t}]{request}
611 \end{DoxyParamCaption}
612 )}\hypertarget{class_h_s___client_manager_ac86314afbb90116e2f02ce071166226e}{}\label{class_h_s___client_manager_ac86314afbb90116e2f02ce071166226e}
613 unsubscribe
614
615 \subparagraph*{Parameters}
616
617
618 \begin{DoxyItemize}
619 \item request\+: the request to bindings
620 \end{DoxyItemize}
621
622 \subparagraph*{Return}
623
624 result 
625
626 Definition at line 292 of file hs-\/clientmanager.\+cpp.
627
628
629 \begin{DoxyCode}
630 293 \{
631 294     \textcolor{keyword}{const} \textcolor{keywordtype}{char} *value = afb\_req\_value(request, \textcolor{stringliteral}{"event"});
632 295     \hyperlink{include_2hmi-debug_8h_abc0d6e0760017d8ae48b836925b2ef15}{HMI\_NOTICE}(\textcolor{stringliteral}{"homescreen-service"},\textcolor{stringliteral}{"value is %s"}, value);
633 296     \textcolor{keywordtype}{int} ret = 0;
634 297     \textcolor{keywordflow}{if}(value) \{
635 298         std::string appid(afb\_req\_get\_application\_id(request));
636 299         std::lock\_guard<std::mutex> lock(this->mtx);
637 300 
638 301         \textcolor{keyword}{auto} ip = client\_list.find(appid);
639 302         \textcolor{keywordflow}{if}(ip != client\_list.end()
640 303         && ip->second->unsubscribe(request, value) != 0) \{
641 304             \hyperlink{include_2hmi-debug_8h_abc0d6e0760017d8ae48b836925b2ef15}{HMI\_NOTICE}(\textcolor{stringliteral}{"homescreen-service"},\textcolor{stringliteral}{"unsubscribe failed"});
642 305             ret = \hyperlink{hs-helper_8h_a78e930a97920b821706a80ca8f430034}{AFB\_REQ\_UNSUBSCRIBE\_ERROR};
643 306         \}
644 307     \}
645 308     \textcolor{keywordflow}{else} \{
646 309         \hyperlink{include_2hmi-debug_8h_abc0d6e0760017d8ae48b836925b2ef15}{HMI\_NOTICE}(\textcolor{stringliteral}{"homescreen-service"},\textcolor{stringliteral}{"Please input event name"});
647 310         ret = \hyperlink{hs-helper_8h_aa611e2ec24ef295bd87825889fe2ce5e}{AFB\_EVENT\_BAD\_REQUEST};
648 311     \}
649 312     \textcolor{keywordflow}{return} ret;
650 313 \}
651 \end{DoxyCode}
652
653
654 The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
655 \item 
656 src/\hyperlink{hs-clientmanager_8h}{hs-\/clientmanager.\+h}\item 
657 src/\hyperlink{hs-clientmanager_8cpp}{hs-\/clientmanager.\+cpp}\end{DoxyCompactItemize}