update doc
[apps/agl-service-homescreen.git] / doc / api-ref / latex / de / dd0 / class_lib_home_screen.tex
1 \hypertarget{class_lib_home_screen}{}\section{Lib\+Home\+Screen Class Reference}
2 \label{class_lib_home_screen}\index{Lib\+Home\+Screen@{Lib\+Home\+Screen}}
3
4
5 {\ttfamily \#include $<$libhomescreen.\+hpp$>$}
6
7 \subsection*{Public Types}
8 \begin{DoxyCompactItemize}
9 \item 
10 enum \hyperlink{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154}{Event\+Type} \{ \\*
11 \hyperlink{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154a3fb3563c64786f1a2ae404df6edffd5c}{Event\+\_\+\+Show\+Window} = 1, 
12 \hyperlink{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154a4b0a82d501e4db5fbfe25c254c92896f}{Event\+\_\+\+Tap\+Shortcut} = 1, 
13 \hyperlink{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154aea56fa32a124a8ddcbea127755280a1d}{Event\+\_\+\+On\+Screen\+Message}, 
14 \hyperlink{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154acae91db4efc2394fd701f581d277a3fd}{Event\+\_\+\+On\+Screen\+Reply}, 
15 \\*
16 \hyperlink{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154aef8bb1086ddbc0a125d77af9da3146a0}{Event\+\_\+\+Hide\+Window}, 
17 \hyperlink{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154aaacb8babce7fac884ab4bf7605da0d9f}{Event\+\_\+\+Reply\+Show\+Window}, 
18 \hyperlink{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154a68119a9c3ff85e807db38d3282e5ca30}{Event\+\_\+\+Show\+Notification}, 
19 \hyperlink{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154a1fad2ac5071a1dae7db9c8e1b522669b}{Event\+\_\+\+Show\+Information}
20  \}
21 \item 
22 using \hyperlink{class_lib_home_screen_a334f11f81c84c98d18284215dcaada3a}{handler\+\_\+func} = std\+::function$<$ void(json\+\_\+object $\ast$)$>$
23 \end{DoxyCompactItemize}
24 \subsection*{Public Member Functions}
25 \begin{DoxyCompactItemize}
26 \item 
27 \hyperlink{class_lib_home_screen_a724bd949c4154fad041f96a15ef0f5dc}{Lib\+Home\+Screen} ()
28 \item 
29 \hyperlink{class_lib_home_screen_a249902aebf71a5383ca8ec6ae558d095}{$\sim$\+Lib\+Home\+Screen} ()
30 \item 
31 \hyperlink{class_lib_home_screen_a0fff2f703c8ce184eb9edd133e0f4137}{Lib\+Home\+Screen} (const \hyperlink{class_lib_home_screen}{Lib\+Home\+Screen} \&)=delete
32 \item 
33 \hyperlink{class_lib_home_screen}{Lib\+Home\+Screen} \& \hyperlink{class_lib_home_screen_a23bc17798453cfca50904562736f6b25}{operator=} (const \hyperlink{class_lib_home_screen}{Lib\+Home\+Screen} \&)=delete
34 \item 
35 int \hyperlink{class_lib_home_screen_a6a57b573cc767725762ba9beab032220}{init} (const int \hyperlink{simple-egl_8cpp_a300b6806fe6818927fe4df08f2398124}{port}, const std\+::string \&\hyperlink{simple-egl_8cpp_a623ef6987ef3bd185c07b28b13e46d34}{token})
36 \item 
37 int \hyperlink{class_lib_home_screen_a6ca8ff4a2aa019a735afaff713e0ef44}{tap\+Shortcut} (const char $\ast$application\+\_\+id)
38 \item 
39 int \hyperlink{class_lib_home_screen_ac336482036a72b51a822725f1929523c}{on\+Screen\+Message} (const char $\ast$display\+\_\+message)
40 \item 
41 int \hyperlink{class_lib_home_screen_a6c065f41f2c5d1f58d2763bfb4da9c37}{on\+Screen\+Reply} (const char $\ast$reply\+\_\+message)
42 \item 
43 void \hyperlink{class_lib_home_screen_ab1b0e08bf35415de9064afed899e9f85}{set\+\_\+event\+\_\+handler} (enum \hyperlink{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154}{Event\+Type} et, \hyperlink{class_lib_home_screen_a334f11f81c84c98d18284215dcaada3a}{handler\+\_\+func} f)
44 \item 
45 void \hyperlink{class_lib_home_screen_a2789e8a5372202cc36f48e71dbb9b7cf}{register\+Callback} (void($\ast$event\+\_\+cb)(const std\+::string \&event, struct json\+\_\+object $\ast$event\+\_\+contents), void($\ast$reply\+\_\+cb)(struct json\+\_\+object $\ast$reply\+\_\+contents), void($\ast$hangup\+\_\+cb)(void)=nullptr)
46 \item 
47 int \hyperlink{class_lib_home_screen_a527b49dcfe581be6275d0eb2236ba37f}{call} (const std\+::string \&verb, struct json\+\_\+object $\ast$arg)
48 \item 
49 int \hyperlink{class_lib_home_screen_ab5e8e8ab7d53e0f114e9e907fcbb7643}{call} (const char $\ast$verb, struct json\+\_\+object $\ast$arg)
50 \item 
51 int \hyperlink{class_lib_home_screen_aa4c189807b75d070f567967f0d690738}{subscribe} (const std\+::string \&event\+\_\+name)
52 \item 
53 int \hyperlink{class_lib_home_screen_aac03a45cbd453ba69ddb00c1016930a6}{unsubscribe} (const std\+::string \&event\+\_\+name)
54 \item 
55 int \hyperlink{class_lib_home_screen_a69fc770cb3f94d30a10c2c8c81eb892f}{show\+Window} (const char $\ast$application\+\_\+id, json\+\_\+object $\ast$json)
56 \item 
57 int \hyperlink{class_lib_home_screen_a4dbaea6c7b310e8ce7207155ff11b32a}{hide\+Window} (const char $\ast$application\+\_\+id)
58 \item 
59 int \hyperlink{class_lib_home_screen_a6310b129fc85ef0623e2e2063950cc4b}{reply\+Show\+Window} (const char $\ast$application\+\_\+id, json\+\_\+object $\ast$json)
60 \item 
61 int \hyperlink{class_lib_home_screen_a93ad567ed597a80a344ba82457c2bd7f}{show\+Notification} (json\+\_\+object $\ast$json)
62 \item 
63 int \hyperlink{class_lib_home_screen_ada999aeb0444c964428bdf1ee236727f}{show\+Information} (json\+\_\+object $\ast$json)
64 \item 
65 void \hyperlink{class_lib_home_screen_ab1c1fa69f24b981e824dd9fb810c4b74}{on\+\_\+hangup} (void $\ast$closure, struct afb\+\_\+wsj1 $\ast$wsj)
66 \item 
67 void \hyperlink{class_lib_home_screen_a608638eb87b2772a3dcc92d8ca8f3596}{on\+\_\+call} (void $\ast$closure, const char $\ast$api, const char $\ast$verb, struct afb\+\_\+wsj1\+\_\+msg $\ast$msg)
68 \item 
69 void \hyperlink{class_lib_home_screen_a9c4885b51b43ab24a548d49fb3ab2de3}{on\+\_\+event} (void $\ast$closure, const char $\ast$event, struct afb\+\_\+wsj1\+\_\+msg $\ast$msg)
70 \item 
71 void \hyperlink{class_lib_home_screen_a248d9648c6186287a7632ec1c75fc9c5}{on\+\_\+reply} (void $\ast$closure, struct afb\+\_\+wsj1\+\_\+msg $\ast$msg)
72 \end{DoxyCompactItemize}
73 \subsection*{Public Attributes}
74 \begin{DoxyCompactItemize}
75 \item 
76 const char $\ast$ \hyperlink{class_lib_home_screen_a927592eff8e34efbbceaf12522f8897f}{\+\_\+key\+Parameter} = \char`\"{}parameter\char`\"{}
77 \item 
78 const char $\ast$ \hyperlink{class_lib_home_screen_a8becda1b035ae45f5a11c7e7963091bf}{\+\_\+key\+Area} = \char`\"{}area\char`\"{}
79 \item 
80 const char $\ast$ \hyperlink{class_lib_home_screen_aac718b60b83c74e2b061f6f7f7ec3bf5}{\+\_\+area\+Normal} = \char`\"{}normal\char`\"{}
81 \item 
82 const char $\ast$ \hyperlink{class_lib_home_screen_ad0569f5323ead77a43bd8735377a6f25}{\+\_\+area\+Full\+Screen} = \char`\"{}fullscreen\char`\"{}
83 \item 
84 const char $\ast$ \hyperlink{class_lib_home_screen_a7f201fc366146790520bf8d990f7b2eb}{\+\_\+area\+Split\+Main} = \char`\"{}split.\+main\char`\"{}
85 \item 
86 const char $\ast$ \hyperlink{class_lib_home_screen_ab4f54373b0681de11243152f01c48888}{\+\_\+area\+Split\+Sub} = \char`\"{}split.\+sub\char`\"{}
87 \end{DoxyCompactItemize}
88 \subsection*{Static Public Attributes}
89 \begin{DoxyCompactItemize}
90 \item 
91 static const std\+::vector$<$ std\+::string $>$ \hyperlink{class_lib_home_screen_a5593ff5ac78f6495ccb649904cf0ab08}{api\+\_\+list}
92 \item 
93 static const std\+::vector$<$ std\+::string $>$ \hyperlink{class_lib_home_screen_a6a6d8a4d33a006a08652e7377a4c29e9}{event\+\_\+list}
94 \end{DoxyCompactItemize}
95
96
97 \subsection{Detailed Description}
98
99
100 Definition at line 31 of file libhomescreen.\+hpp.
101
102
103
104 \subsection{Member Typedef Documentation}
105 \index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!handler\+\_\+func@{handler\+\_\+func}}
106 \index{handler\+\_\+func@{handler\+\_\+func}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}
107 \subsubsection[{\texorpdfstring{handler\+\_\+func}{handler_func}}]{\setlength{\rightskip}{0pt plus 5cm}using {\bf Lib\+Home\+Screen\+::handler\+\_\+func} =  std\+::function$<$void(json\+\_\+object$\ast$)$>$}\hypertarget{class_lib_home_screen_a334f11f81c84c98d18284215dcaada3a}{}\label{class_lib_home_screen_a334f11f81c84c98d18284215dcaada3a}
108
109
110 Definition at line 40 of file libhomescreen.\+hpp.
111
112
113
114 \subsection{Member Enumeration Documentation}
115 \index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!Event\+Type@{Event\+Type}}
116 \index{Event\+Type@{Event\+Type}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}
117 \subsubsection[{\texorpdfstring{Event\+Type}{EventType}}]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf Lib\+Home\+Screen\+::\+Event\+Type}}\hypertarget{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154}{}\label{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154}
118 \begin{Desc}
119 \item[Enumerator]\par
120 \begin{description}
121 \index{Event\+\_\+\+Show\+Window@{Event\+\_\+\+Show\+Window}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}\index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!Event\+\_\+\+Show\+Window@{Event\+\_\+\+Show\+Window}}\item[{\em 
122 Event\+\_\+\+Show\+Window\hypertarget{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154a3fb3563c64786f1a2ae404df6edffd5c}{}\label{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154a3fb3563c64786f1a2ae404df6edffd5c}
123 }]\index{Event\+\_\+\+Tap\+Shortcut@{Event\+\_\+\+Tap\+Shortcut}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}\index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!Event\+\_\+\+Tap\+Shortcut@{Event\+\_\+\+Tap\+Shortcut}}\item[{\em 
124 Event\+\_\+\+Tap\+Shortcut\hypertarget{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154a4b0a82d501e4db5fbfe25c254c92896f}{}\label{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154a4b0a82d501e4db5fbfe25c254c92896f}
125 }]\index{Event\+\_\+\+On\+Screen\+Message@{Event\+\_\+\+On\+Screen\+Message}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}\index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!Event\+\_\+\+On\+Screen\+Message@{Event\+\_\+\+On\+Screen\+Message}}\item[{\em 
126 Event\+\_\+\+On\+Screen\+Message\hypertarget{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154aea56fa32a124a8ddcbea127755280a1d}{}\label{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154aea56fa32a124a8ddcbea127755280a1d}
127 }]\index{Event\+\_\+\+On\+Screen\+Reply@{Event\+\_\+\+On\+Screen\+Reply}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}\index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!Event\+\_\+\+On\+Screen\+Reply@{Event\+\_\+\+On\+Screen\+Reply}}\item[{\em 
128 Event\+\_\+\+On\+Screen\+Reply\hypertarget{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154acae91db4efc2394fd701f581d277a3fd}{}\label{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154acae91db4efc2394fd701f581d277a3fd}
129 }]\index{Event\+\_\+\+Hide\+Window@{Event\+\_\+\+Hide\+Window}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}\index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!Event\+\_\+\+Hide\+Window@{Event\+\_\+\+Hide\+Window}}\item[{\em 
130 Event\+\_\+\+Hide\+Window\hypertarget{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154aef8bb1086ddbc0a125d77af9da3146a0}{}\label{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154aef8bb1086ddbc0a125d77af9da3146a0}
131 }]\index{Event\+\_\+\+Reply\+Show\+Window@{Event\+\_\+\+Reply\+Show\+Window}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}\index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!Event\+\_\+\+Reply\+Show\+Window@{Event\+\_\+\+Reply\+Show\+Window}}\item[{\em 
132 Event\+\_\+\+Reply\+Show\+Window\hypertarget{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154aaacb8babce7fac884ab4bf7605da0d9f}{}\label{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154aaacb8babce7fac884ab4bf7605da0d9f}
133 }]\index{Event\+\_\+\+Show\+Notification@{Event\+\_\+\+Show\+Notification}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}\index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!Event\+\_\+\+Show\+Notification@{Event\+\_\+\+Show\+Notification}}\item[{\em 
134 Event\+\_\+\+Show\+Notification\hypertarget{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154a68119a9c3ff85e807db38d3282e5ca30}{}\label{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154a68119a9c3ff85e807db38d3282e5ca30}
135 }]\index{Event\+\_\+\+Show\+Information@{Event\+\_\+\+Show\+Information}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}\index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!Event\+\_\+\+Show\+Information@{Event\+\_\+\+Show\+Information}}\item[{\em 
136 Event\+\_\+\+Show\+Information\hypertarget{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154a1fad2ac5071a1dae7db9c8e1b522669b}{}\label{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154a1fad2ac5071a1dae7db9c8e1b522669b}
137 }]\end{description}
138 \end{Desc}
139
140
141 Definition at line 42 of file libhomescreen.\+hpp.
142
143
144 \begin{DoxyCode}
145 42                    \{
146 43         \hyperlink{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154a3fb3563c64786f1a2ae404df6edffd5c}{Event\_ShowWindow} = 1,
147 44         \hyperlink{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154a4b0a82d501e4db5fbfe25c254c92896f}{Event\_TapShortcut} = 1,
148 45         \hyperlink{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154aea56fa32a124a8ddcbea127755280a1d}{Event\_OnScreenMessage},
149 46         \hyperlink{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154acae91db4efc2394fd701f581d277a3fd}{Event\_OnScreenReply},
150 47         \hyperlink{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154aef8bb1086ddbc0a125d77af9da3146a0}{Event\_HideWindow},
151 48         \hyperlink{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154aaacb8babce7fac884ab4bf7605da0d9f}{Event\_ReplyShowWindow},
152 49         \hyperlink{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154a68119a9c3ff85e807db38d3282e5ca30}{Event\_ShowNotification},
153 50         \hyperlink{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154a1fad2ac5071a1dae7db9c8e1b522669b}{Event\_ShowInformation}
154 51     \};
155 \end{DoxyCode}
156
157
158 \subsection{Constructor \& Destructor Documentation}
159 \index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}
160 \index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}
161 \subsubsection[{\texorpdfstring{Lib\+Home\+Screen()}{LibHomeScreen()}}]{\setlength{\rightskip}{0pt plus 5cm}Lib\+Home\+Screen\+::\+Lib\+Home\+Screen (
162 \begin{DoxyParamCaption}
163 {}
164 \end{DoxyParamCaption}
165 )}\hypertarget{class_lib_home_screen_a724bd949c4154fad041f96a15ef0f5dc}{}\label{class_lib_home_screen_a724bd949c4154fad041f96a15ef0f5dc}
166 constructor 
167
168 Definition at line 93 of file libhomescreen.\+cpp.
169
170
171 \begin{DoxyCode}
172 94 \{
173 95 \}
174 \end{DoxyCode}
175 \index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!````~Lib\+Home\+Screen@{$\sim$\+Lib\+Home\+Screen}}
176 \index{````~Lib\+Home\+Screen@{$\sim$\+Lib\+Home\+Screen}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}
177 \subsubsection[{\texorpdfstring{$\sim$\+Lib\+Home\+Screen()}{~LibHomeScreen()}}]{\setlength{\rightskip}{0pt plus 5cm}Lib\+Home\+Screen\+::$\sim$\+Lib\+Home\+Screen (
178 \begin{DoxyParamCaption}
179 {}
180 \end{DoxyParamCaption}
181 )}\hypertarget{class_lib_home_screen_a249902aebf71a5383ca8ec6ae558d095}{}\label{class_lib_home_screen_a249902aebf71a5383ca8ec6ae558d095}
182 destructor 
183
184 Definition at line 100 of file libhomescreen.\+cpp.
185
186
187 \begin{DoxyCode}
188 101 \{
189 102     \textcolor{keywordflow}{if}(mploop)
190 103     \{
191 104         sd\_event\_unref(mploop);
192 105     \}
193 106     \textcolor{keywordflow}{if}(sp\_websock != NULL)
194 107     \{
195 108         afb\_wsj1\_unref(sp\_websock);
196 109     \}
197 110 \}
198 \end{DoxyCode}
199 \index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}
200 \index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}
201 \subsubsection[{\texorpdfstring{Lib\+Home\+Screen(const Lib\+Home\+Screen \&)=delete}{LibHomeScreen(const LibHomeScreen &)=delete}}]{\setlength{\rightskip}{0pt plus 5cm}Lib\+Home\+Screen\+::\+Lib\+Home\+Screen (
202 \begin{DoxyParamCaption}
203 \item[{const {\bf Lib\+Home\+Screen} \&}]{}
204 \end{DoxyParamCaption}
205 )\hspace{0.3cm}{\ttfamily [delete]}}\hypertarget{class_lib_home_screen_a0fff2f703c8ce184eb9edd133e0f4137}{}\label{class_lib_home_screen_a0fff2f703c8ce184eb9edd133e0f4137}
206
207
208 \subsection{Member Function Documentation}
209 \index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!call@{call}}
210 \index{call@{call}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}
211 \subsubsection[{\texorpdfstring{call(const std\+::string \&verb, struct json\+\_\+object $\ast$arg)}{call(const std::string &verb, struct json_object *arg)}}]{\setlength{\rightskip}{0pt plus 5cm}int Lib\+Home\+Screen\+::call (
212 \begin{DoxyParamCaption}
213 \item[{const std\+::string \&}]{verb, }
214 \item[{struct json\+\_\+object $\ast$}]{arg}
215 \end{DoxyParamCaption}
216 )}\hypertarget{class_lib_home_screen_a527b49dcfe581be6275d0eb2236ba37f}{}\label{class_lib_home_screen_a527b49dcfe581be6275d0eb2236ba37f}
217 \index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!call@{call}}
218 \index{call@{call}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}
219 \subsubsection[{\texorpdfstring{call(const char $\ast$verb, struct json\+\_\+object $\ast$arg)}{call(const char *verb, struct json_object *arg)}}]{\setlength{\rightskip}{0pt plus 5cm}int Lib\+Home\+Screen\+::call (
220 \begin{DoxyParamCaption}
221 \item[{const char $\ast$}]{verb, }
222 \item[{struct json\+\_\+object $\ast$}]{arg}
223 \end{DoxyParamCaption}
224 )}\hypertarget{class_lib_home_screen_ab5e8e8ab7d53e0f114e9e907fcbb7643}{}\label{class_lib_home_screen_ab5e8e8ab7d53e0f114e9e907fcbb7643}
225 This function calls the A\+PI of Home\+Screen via Web\+Socket This function is overload function of \char`\"{}call\char`\"{}
226
227 \subparagraph*{Parameters}
228
229
230 \begin{DoxyItemize}
231 \item verb \mbox{[}in\mbox{]} \+: This argument should be specified to the A\+PI name (e.\+g. \char`\"{}tap\+\_\+shortcut\char`\"{})
232 \item arg \mbox{[}in\mbox{]} \+: This argument should be specified to the argument of A\+PI. And this argument expects J\+S\+ON object
233 \end{DoxyItemize}
234
235 \subparagraph*{Return}
236
237
238 \begin{DoxyItemize}
239 \item Returns 0 on success or -\/1 in case of error.
240 \end{DoxyItemize}
241
242 \subparagraph*{Note}
243
244 To call Home\+Screen\textquotesingle{}s A\+P\+Is, the application should set its function name, arguments to J\+S\+ON format. 
245
246 Definition at line 377 of file libhomescreen.\+cpp.
247
248
249 \begin{DoxyCode}
250 378 \{
251 379     \textcolor{keywordtype}{int} ret;
252 380     \textcolor{keywordflow}{if}(!sp\_websock)
253 381     \{
254 382         \textcolor{keywordflow}{return} -1;
255 383     \}
256 384     \textcolor{keywordflow}{if} (!\hyperlink{libhomescreen_8cpp_a7a2176c3d71fec0f09dcb2aa0866b17e}{has\_verb}(\textcolor{keywordtype}{string}(verb)))
257 385     \{
258 386         \hyperlink{include_2hmi-debug_8h_a65bb6c7cfe38f8a724beab5059d36fb2}{HMI\_ERROR}(\textcolor{stringliteral}{"libhomescreen"},\textcolor{stringliteral}{"verb doesn't exit"});
259 387         \textcolor{keywordflow}{return} -1;
260 388     \}
261 389     ret = afb\_wsj1\_call\_j(sp\_websock, \hyperlink{libhomescreen_8cpp_a1e2d6e77dd8f0162f830058579eab42f}{API}, verb, arg, \hyperlink{libhomescreen_8cpp_a7778933bffa862c63fa0a1b8219faa8b}{\_on\_reply\_static}, \textcolor{keyword}{this});
262 390     \textcolor{keywordflow}{if} (ret < 0) \{
263 391         \hyperlink{include_2hmi-debug_8h_a65bb6c7cfe38f8a724beab5059d36fb2}{HMI\_ERROR}(\textcolor{stringliteral}{"libhomescreen"},\textcolor{stringliteral}{"Failed to call verb:%s"},verb);
264 392     \}
265 393     \textcolor{keywordflow}{return} ret;
266 394 \}
267 \end{DoxyCode}
268 \index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!hide\+Window@{hide\+Window}}
269 \index{hide\+Window@{hide\+Window}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}
270 \subsubsection[{\texorpdfstring{hide\+Window(const char $\ast$application\+\_\+id)}{hideWindow(const char *application_id)}}]{\setlength{\rightskip}{0pt plus 5cm}int Lib\+Home\+Screen\+::hide\+Window (
271 \begin{DoxyParamCaption}
272 \item[{const char $\ast$}]{application\+\_\+id}
273 \end{DoxyParamCaption}
274 )}\hypertarget{class_lib_home_screen_a4dbaea6c7b310e8ce7207155ff11b32a}{}\label{class_lib_home_screen_a4dbaea6c7b310e8ce7207155ff11b32a}
275 Sending hide window event
276
277 Call Home\+Screen Service\textquotesingle{}s hide\+Window verb to release id\textquotesingle{}s screen.
278
279 \subparagraph*{Parameters}
280
281
282 \begin{DoxyItemize}
283 \item application\+\_\+id \mbox{[}in\mbox{]} \+: This argument should be specified to the application\textquotesingle{}s id.
284 \end{DoxyItemize}
285
286 \subparagraph*{Return}
287
288
289 \begin{DoxyItemize}
290 \item Returns 0 on success or -\/1 in case of error. 
291 \end{DoxyItemize}
292
293 Definition at line 503 of file libhomescreen.\+cpp.
294
295
296 \begin{DoxyCode}
297 504 \{
298 505     \textcolor{keywordflow}{if}(!sp\_websock)
299 506     \{
300 507         \textcolor{keywordflow}{return} -1;
301 508     \}
302 509 
303 510     \textcolor{keyword}{struct }json\_object* j\_obj = json\_object\_new\_object();
304 511     \textcolor{keyword}{struct }json\_object* val = json\_object\_new\_string(application\_id);
305 512     json\_object\_object\_add(j\_obj, \hyperlink{libhomescreen_8cpp_a5a89bcb5a83f6b2e5c664a041bd8fd00}{ApplicationId}, val);
306 513 
307 514     \textcolor{keywordflow}{return} this->\hyperlink{class_lib_home_screen_a527b49dcfe581be6275d0eb2236ba37f}{call}(\textcolor{stringliteral}{"hideWindow"}, j\_obj);
308 515 \}
309 \end{DoxyCode}
310 \index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!init@{init}}
311 \index{init@{init}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}
312 \subsubsection[{\texorpdfstring{init(const int port, const std\+::string \&token)}{init(const int port, const std::string &token)}}]{\setlength{\rightskip}{0pt plus 5cm}int Lib\+Home\+Screen\+::init (
313 \begin{DoxyParamCaption}
314 \item[{const int}]{port, }
315 \item[{const std\+::string \&}]{token}
316 \end{DoxyParamCaption}
317 )}\hypertarget{class_lib_home_screen_a6a57b573cc767725762ba9beab032220}{}\label{class_lib_home_screen_a6a57b573cc767725762ba9beab032220}
318 This function is initializer
319
320 \subparagraph*{Parameters}
321
322
323 \begin{DoxyItemize}
324 \item port \mbox{[}in\mbox{]} \+: This argument should be specified to the port number to be used for websocket
325 \item token \mbox{[}in\mbox{]} \+: This argument should be specified to the token to be used for websocket
326 \end{DoxyItemize}
327
328 \subparagraph*{Return}
329
330 Nothing
331
332 \subparagraph*{Note}
333
334 Use this constructor 
335
336 Definition at line 126 of file libhomescreen.\+cpp.
337
338
339 \begin{DoxyCode}
340 127 \{
341 128     \textcolor{keywordtype}{int} ret = 0;
342 129     \textcolor{keywordflow}{if}(\hyperlink{simple-egl_8cpp_a300b6806fe6818927fe4df08f2398124}{port} > 0 && \hyperlink{simple-egl_8cpp_a623ef6987ef3bd185c07b28b13e46d34}{token}.size() > 0)
343 130     \{
344 131         mport = \hyperlink{simple-egl_8cpp_a300b6806fe6818927fe4df08f2398124}{port};
345 132         mtoken = \hyperlink{simple-egl_8cpp_a623ef6987ef3bd185c07b28b13e46d34}{token};
346 133     \}
347 134     \textcolor{keywordflow}{else}
348 135     \{
349 136         \hyperlink{include_2hmi-debug_8h_a65bb6c7cfe38f8a724beab5059d36fb2}{HMI\_ERROR}(\textcolor{stringliteral}{"libhomescreen"},\textcolor{stringliteral}{"port and token should be > 0, Initial port and token uses."});
350 137     \}
351 138 
352 139     ret = initialize\_websocket();
353 140     \textcolor{keywordflow}{if}(ret != 0 )
354 141     \{
355 142         \hyperlink{include_2hmi-debug_8h_a65bb6c7cfe38f8a724beab5059d36fb2}{HMI\_ERROR}(\textcolor{stringliteral}{"libhomescreen"},\textcolor{stringliteral}{"Failed to initialize websocket"});
356 143     \}
357 144     \textcolor{keywordflow}{else}\{
358 145         \hyperlink{include_2hmi-debug_8h_a0d26d8b8201011dade787236519711c0}{HMI\_DEBUG}(\textcolor{stringliteral}{"libhomescreen"},\textcolor{stringliteral}{"Initialized"});
359 146     \}
360 147 
361 148     \textcolor{keywordflow}{return} ret;
362 149 \}
363 \end{DoxyCode}
364 \index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!on\+\_\+call@{on\+\_\+call}}
365 \index{on\+\_\+call@{on\+\_\+call}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}
366 \subsubsection[{\texorpdfstring{on\+\_\+call(void $\ast$closure, const char $\ast$api, const char $\ast$verb, struct afb\+\_\+wsj1\+\_\+msg $\ast$msg)}{on_call(void *closure, const char *api, const char *verb, struct afb_wsj1_msg *msg)}}]{\setlength{\rightskip}{0pt plus 5cm}void Lib\+Home\+Screen\+::on\+\_\+call (
367 \begin{DoxyParamCaption}
368 \item[{void $\ast$}]{closure, }
369 \item[{const char $\ast$}]{api, }
370 \item[{const char $\ast$}]{verb, }
371 \item[{struct afb\+\_\+wsj1\+\_\+msg $\ast$}]{msg}
372 \end{DoxyParamCaption}
373 )}\hypertarget{class_lib_home_screen_a608638eb87b2772a3dcc92d8ca8f3596}{}\label{class_lib_home_screen_a608638eb87b2772a3dcc92d8ca8f3596}
374
375
376 Definition at line 606 of file libhomescreen.\+cpp.
377
378
379 \begin{DoxyCode}
380 607 \{
381 608 \}
382 \end{DoxyCode}
383 \index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!on\+\_\+event@{on\+\_\+event}}
384 \index{on\+\_\+event@{on\+\_\+event}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}
385 \subsubsection[{\texorpdfstring{on\+\_\+event(void $\ast$closure, const char $\ast$event, struct afb\+\_\+wsj1\+\_\+msg $\ast$msg)}{on_event(void *closure, const char *event, struct afb_wsj1_msg *msg)}}]{\setlength{\rightskip}{0pt plus 5cm}void Lib\+Home\+Screen\+::on\+\_\+event (
386 \begin{DoxyParamCaption}
387 \item[{void $\ast$}]{closure, }
388 \item[{const char $\ast$}]{event, }
389 \item[{struct afb\+\_\+wsj1\+\_\+msg $\ast$}]{msg}
390 \end{DoxyParamCaption}
391 )}\hypertarget{class_lib_home_screen_a9c4885b51b43ab24a548d49fb3ab2de3}{}\label{class_lib_home_screen_a9c4885b51b43ab24a548d49fb3ab2de3}
392
393
394 Definition at line 616 of file libhomescreen.\+cpp.
395
396
397 \begin{DoxyCode}
398 617 \{
399 618     \hyperlink{include_2hmi-debug_8h_a0d26d8b8201011dade787236519711c0}{HMI\_DEBUG}(\textcolor{stringliteral}{"libhomescreen"},\textcolor{stringliteral}{"event: (%s) msg: (%s)."}, event, afb\_wsj1\_msg\_object\_s(msg));
400 619 
401 620     \textcolor{keywordflow}{if} (strstr(event, \hyperlink{libhomescreen_8cpp_a1e2d6e77dd8f0162f830058579eab42f}{API}) == NULL) \{
402 621         \textcolor{keywordflow}{return};
403 622     \}
404 623 
405 624     \textcolor{keyword}{struct }json\_object* ev\_contents = afb\_wsj1\_msg\_object\_j(msg);
406 625     \textcolor{keyword}{struct }json\_object *json\_data;
407 626     \textcolor{keywordflow}{if}(!json\_object\_object\_get\_ex(ev\_contents, \textcolor{stringliteral}{"data"}, &json\_data)) \{
408 627         \hyperlink{include_2hmi-debug_8h_a65bb6c7cfe38f8a724beab5059d36fb2}{HMI\_ERROR}(\textcolor{stringliteral}{"libhomescreen"}, \textcolor{stringliteral}{"got ev\_contents error."});
409 628         \textcolor{keywordflow}{return};
410 629     \}
411 630 
412 631     \textcolor{keywordflow}{if}(onEvent != \textcolor{keyword}{nullptr})
413 632     \{
414 633         \textcolor{keyword}{const} \textcolor{keywordtype}{string} ev(event);
415 634         onEvent(ev, ev\_contents);
416 635     \}
417 636 
418 637     \textcolor{keyword}{const} \textcolor{keywordtype}{char}* event\_type = \textcolor{keyword}{nullptr};
419 638     \textcolor{keyword}{struct }json\_object *json\_event\_type;
420 639     \textcolor{keywordflow}{if}(json\_object\_object\_get\_ex(json\_data, \textcolor{stringliteral}{"type"}, &json\_event\_type)) \{
421 640         event\_type = json\_object\_get\_string(json\_event\_type);
422 641     \}
423 642     \textcolor{keywordflow}{else} \{
424 643         \hyperlink{include_2hmi-debug_8h_a25361812432cd2480bc8f1a8e56ecbf7}{HMI\_WARNING}(\textcolor{stringliteral}{"libhomescreen"},\textcolor{stringliteral}{"event\_type is null."});
425 644         \textcolor{keywordflow}{return};
426 645     \}
427 646 
428 647     \textcolor{keywordflow}{if} (strcasecmp(event\_type, \hyperlink{class_lib_home_screen_a6a6d8a4d33a006a08652e7377a4c29e9}{LibHomeScreen::event\_list}[0].c\_str()) == 0) \{
429 648         \textcolor{keyword}{auto} i = this->handlers.find(\hyperlink{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154a3fb3563c64786f1a2ae404df6edffd5c}{Event\_ShowWindow});
430 649         \textcolor{keywordflow}{if} ( i != this->handlers.end() ) \{
431 650             i->second(json\_data);
432 651         \}
433 652     \}
434 653     \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (strcasecmp(event\_type, \hyperlink{class_lib_home_screen_a6a6d8a4d33a006a08652e7377a4c29e9}{LibHomeScreen::event\_list}[1].c\_str()) == 0) \{
435 654         \textcolor{keyword}{auto} i = this->handlers.find(\hyperlink{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154aea56fa32a124a8ddcbea127755280a1d}{Event\_OnScreenMessage});
436 655         \textcolor{keywordflow}{if} ( i != this->handlers.end() ) \{
437 656             i->second(json\_data);
438 657         \}
439 658     \}
440 659     \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (strcasecmp(event\_type, \hyperlink{class_lib_home_screen_a6a6d8a4d33a006a08652e7377a4c29e9}{LibHomeScreen::event\_list}[2].c\_str()) == 0) \{
441 660         \textcolor{keyword}{auto} i = this->handlers.find(\hyperlink{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154acae91db4efc2394fd701f581d277a3fd}{Event\_OnScreenReply});
442 661         \textcolor{keywordflow}{if} ( i != this->handlers.end() ) \{
443 662             i->second(json\_data);
444 663         \}
445 664     \}
446 665     \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (strcasecmp(event\_type, \hyperlink{class_lib_home_screen_a6a6d8a4d33a006a08652e7377a4c29e9}{LibHomeScreen::event\_list}[3].c\_str()) == 0) \{
447 666         \textcolor{keyword}{auto} i = this->handlers.find(\hyperlink{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154aef8bb1086ddbc0a125d77af9da3146a0}{Event\_HideWindow});
448 667         \textcolor{keywordflow}{if} ( i != this->handlers.end() ) \{
449 668             i->second(json\_data);
450 669         \}
451 670     \}
452 671     \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (strcasecmp(event\_type, \hyperlink{class_lib_home_screen_a6a6d8a4d33a006a08652e7377a4c29e9}{LibHomeScreen::event\_list}[4].c\_str()) == 0) \{
453 672         \textcolor{keyword}{auto} i = this->handlers.find(\hyperlink{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154aaacb8babce7fac884ab4bf7605da0d9f}{Event\_ReplyShowWindow});
454 673         \textcolor{keywordflow}{if} ( i != this->handlers.end() ) \{
455 674             i->second(json\_data);
456 675         \}
457 676     \}
458 677     \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (strcasecmp(event\_type, \hyperlink{class_lib_home_screen_a6a6d8a4d33a006a08652e7377a4c29e9}{LibHomeScreen::event\_list}[5].c\_str()) == 0) \{
459 678         \textcolor{keyword}{auto} i = this->handlers.find(\hyperlink{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154a68119a9c3ff85e807db38d3282e5ca30}{Event\_ShowNotification});
460 679         \textcolor{keywordflow}{if} ( i != this->handlers.end() ) \{
461 680             i->second(json\_data);
462 681         \}
463 682     \}
464 683     \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (strcasecmp(event\_type, \hyperlink{class_lib_home_screen_a6a6d8a4d33a006a08652e7377a4c29e9}{LibHomeScreen::event\_list}[6].c\_str()) == 0) \{
465 684         \textcolor{keyword}{auto} i = this->handlers.find(\hyperlink{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154a1fad2ac5071a1dae7db9c8e1b522669b}{Event\_ShowInformation});
466 685         \textcolor{keywordflow}{if} ( i != this->handlers.end() ) \{
467 686             i->second(json\_data);
468 687         \}
469 688     \}
470 689 \}
471 \end{DoxyCode}
472 \index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!on\+\_\+hangup@{on\+\_\+hangup}}
473 \index{on\+\_\+hangup@{on\+\_\+hangup}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}
474 \subsubsection[{\texorpdfstring{on\+\_\+hangup(void $\ast$closure, struct afb\+\_\+wsj1 $\ast$wsj)}{on_hangup(void *closure, struct afb_wsj1 *wsj)}}]{\setlength{\rightskip}{0pt plus 5cm}void Lib\+Home\+Screen\+::on\+\_\+hangup (
475 \begin{DoxyParamCaption}
476 \item[{void $\ast$}]{closure, }
477 \item[{struct afb\+\_\+wsj1 $\ast$}]{wsj}
478 \end{DoxyParamCaption}
479 )}\hypertarget{class_lib_home_screen_ab1c1fa69f24b981e824dd9fb810c4b74}{}\label{class_lib_home_screen_ab1c1fa69f24b981e824dd9fb810c4b74}
480
481
482 Definition at line 597 of file libhomescreen.\+cpp.
483
484
485 \begin{DoxyCode}
486 598 \{
487 599     \hyperlink{include_2hmi-debug_8h_a0d26d8b8201011dade787236519711c0}{HMI\_DEBUG}(\textcolor{stringliteral}{"libhomescreen"},\textcolor{stringliteral}{"called"});
488 600     \textcolor{keywordflow}{if}(onHangup != \textcolor{keyword}{nullptr})
489 601     \{
490 602         onHangup();
491 603     \}
492 604 \}
493 \end{DoxyCode}
494 \index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!on\+\_\+reply@{on\+\_\+reply}}
495 \index{on\+\_\+reply@{on\+\_\+reply}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}
496 \subsubsection[{\texorpdfstring{on\+\_\+reply(void $\ast$closure, struct afb\+\_\+wsj1\+\_\+msg $\ast$msg)}{on_reply(void *closure, struct afb_wsj1_msg *msg)}}]{\setlength{\rightskip}{0pt plus 5cm}void Lib\+Home\+Screen\+::on\+\_\+reply (
497 \begin{DoxyParamCaption}
498 \item[{void $\ast$}]{closure, }
499 \item[{struct afb\+\_\+wsj1\+\_\+msg $\ast$}]{msg}
500 \end{DoxyParamCaption}
501 )}\hypertarget{class_lib_home_screen_a248d9648c6186287a7632ec1c75fc9c5}{}\label{class_lib_home_screen_a248d9648c6186287a7632ec1c75fc9c5}
502 msg is like (\{\char`\"{}response\char`\"{}\+:\{\char`\"{}verb\char`\"{}\+:\char`\"{}subscribe\char`\"{},\char`\"{}error\char`\"{}\+:0\},\char`\"{}jtype\char`\"{}\+:\char`\"{}afb-\/reply\char`\"{},\char`\"{}request\char`\"{}\+:\{\char`\"{}status\char`\"{}\+:\char`\"{}success\char`\"{},\char`\"{}info\char`\"{}\+:\char`\"{}homescreen binder subscribe event name \mbox{[}on\+\_\+screen\+\_\+message\mbox{]}\char`\"{}\}\}) msg is like (\{\char`\"{}response\char`\"{}\+:\{\char`\"{}verb\char`\"{}\+:\char`\"{}tap\+\_\+shortcut\char`\"{},\char`\"{}error\char`\"{}\+:0\},\char`\"{}jtype\char`\"{}\+:\char`\"{}afb-\/reply\char`\"{},\char`\"{}request\char`\"{}\+:\{\char`\"{}status\char`\"{}\+:\char`\"{}success\char`\"{},\char`\"{}info\char`\"{}\+:\char`\"{}afb\+\_\+event\+\_\+push event \mbox{[}tap\+\_\+shortcut\mbox{]}\char`\"{}\}\}) 
503
504 Definition at line 695 of file libhomescreen.\+cpp.
505
506
507 \begin{DoxyCode}
508 696 \{
509 697     \hyperlink{include_2hmi-debug_8h_a0d26d8b8201011dade787236519711c0}{HMI\_DEBUG}(\textcolor{stringliteral}{"libhomescreen"},\textcolor{stringliteral}{"msg: (%s)"}, afb\_wsj1\_msg\_object\_s(msg));
510 698     \textcolor{keywordflow}{if}(onReply != \textcolor{keyword}{nullptr})
511 699     \{
512 700         \textcolor{keyword}{struct }json\_object* reply = afb\_wsj1\_msg\_object\_j(msg);
513 701         onReply(reply);
514 702     \}
515 703 \}
516 \end{DoxyCode}
517 \index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!on\+Screen\+Message@{on\+Screen\+Message}}
518 \index{on\+Screen\+Message@{on\+Screen\+Message}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}
519 \subsubsection[{\texorpdfstring{on\+Screen\+Message(const char $\ast$display\+\_\+message)}{onScreenMessage(const char *display_message)}}]{\setlength{\rightskip}{0pt plus 5cm}int Lib\+Home\+Screen\+::on\+Screen\+Message (
520 \begin{DoxyParamCaption}
521 \item[{const char $\ast$}]{display\+\_\+message}
522 \end{DoxyParamCaption}
523 )}\hypertarget{class_lib_home_screen_ac336482036a72b51a822725f1929523c}{}\label{class_lib_home_screen_ac336482036a72b51a822725f1929523c}
524 Sending on\+Screen message event
525
526 Sending On\+Screen message event to Home\+Screen from applications
527
528 \subparagraph*{Parameters}
529
530
531 \begin{DoxyItemize}
532 \item display\+\_\+message \mbox{[}in\mbox{]} \+: message for display
533 \end{DoxyItemize}
534
535 \subparagraph*{Return}
536
537
538 \begin{DoxyItemize}
539 \item Returns 0 on success or -\/1 in case of error. 
540 \end{DoxyItemize}
541
542 Definition at line 242 of file libhomescreen.\+cpp.
543
544
545 \begin{DoxyCode}
546 243 \{
547 244     \textcolor{keywordflow}{if}(!sp\_websock)
548 245     \{
549 246         \textcolor{keywordflow}{return} -1;
550 247     \}
551 248 
552 249     \textcolor{keyword}{struct }json\_object* j\_obj = json\_object\_new\_object();
553 250     \textcolor{keyword}{struct }json\_object* val = json\_object\_new\_string(display\_message);
554 251     json\_object\_object\_add(j\_obj, \textcolor{stringliteral}{"display\_message"}, val);
555 252     \textcolor{keywordflow}{return} this->\hyperlink{class_lib_home_screen_a527b49dcfe581be6275d0eb2236ba37f}{call}(\textcolor{stringliteral}{"on\_screen\_message"}, j\_obj);
556 253 \}
557 \end{DoxyCode}
558 \index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!on\+Screen\+Reply@{on\+Screen\+Reply}}
559 \index{on\+Screen\+Reply@{on\+Screen\+Reply}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}
560 \subsubsection[{\texorpdfstring{on\+Screen\+Reply(const char $\ast$reply\+\_\+message)}{onScreenReply(const char *reply_message)}}]{\setlength{\rightskip}{0pt plus 5cm}int Lib\+Home\+Screen\+::on\+Screen\+Reply (
561 \begin{DoxyParamCaption}
562 \item[{const char $\ast$}]{reply\+\_\+message}
563 \end{DoxyParamCaption}
564 )}\hypertarget{class_lib_home_screen_a6c065f41f2c5d1f58d2763bfb4da9c37}{}\label{class_lib_home_screen_a6c065f41f2c5d1f58d2763bfb4da9c37}
565 Sending on\+Screen reply event
566
567 Sending On\+Screen reply event to applications from Home\+Screen
568
569 \subparagraph*{Parameters}
570
571
572 \begin{DoxyItemize}
573 \item reply\+\_\+message \mbox{[}in\mbox{]} \+: message for reply
574 \end{DoxyItemize}
575
576 \subparagraph*{Return}
577
578
579 \begin{DoxyItemize}
580 \item Returns 0 on success or -\/1 in case of error. 
581 \end{DoxyItemize}
582
583 Definition at line 266 of file libhomescreen.\+cpp.
584
585
586 \begin{DoxyCode}
587 267 \{
588 268     \textcolor{keywordflow}{if}(!sp\_websock)
589 269     \{
590 270         \textcolor{keywordflow}{return} -1;
591 271     \}
592 272 
593 273     \textcolor{keyword}{struct }json\_object* j\_obj = json\_object\_new\_object();
594 274     \textcolor{keyword}{struct }json\_object* val = json\_object\_new\_string(reply\_message);
595 275     json\_object\_object\_add(j\_obj, \textcolor{stringliteral}{"reply\_message"}, val);
596 276     \textcolor{keywordflow}{return} this->\hyperlink{class_lib_home_screen_a527b49dcfe581be6275d0eb2236ba37f}{call}(\textcolor{stringliteral}{"on\_screen\_reply"}, j\_obj);
597 277 \}
598 \end{DoxyCode}
599 \index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!operator=@{operator=}}
600 \index{operator=@{operator=}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}
601 \subsubsection[{\texorpdfstring{operator=(const Lib\+Home\+Screen \&)=delete}{operator=(const LibHomeScreen &)=delete}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Lib\+Home\+Screen}\& Lib\+Home\+Screen\+::operator= (
602 \begin{DoxyParamCaption}
603 \item[{const {\bf Lib\+Home\+Screen} \&}]{}
604 \end{DoxyParamCaption}
605 )\hspace{0.3cm}{\ttfamily [delete]}}\hypertarget{class_lib_home_screen_a23bc17798453cfca50904562736f6b25}{}\label{class_lib_home_screen_a23bc17798453cfca50904562736f6b25}
606 \index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!register\+Callback@{register\+Callback}}
607 \index{register\+Callback@{register\+Callback}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}
608 \subsubsection[{\texorpdfstring{register\+Callback(void($\ast$event\+\_\+cb)(const std\+::string \&event, struct json\+\_\+object $\ast$event\+\_\+contents), void($\ast$reply\+\_\+cb)(struct json\+\_\+object $\ast$reply\+\_\+contents), void($\ast$hangup\+\_\+cb)(void)=nullptr)}{registerCallback(void(*event_cb)(const std::string &event, struct json_object *event_contents), void(*reply_cb)(struct json_object *reply_contents), void(*hangup_cb)(void)=nullptr)}}]{\setlength{\rightskip}{0pt plus 5cm}void Lib\+Home\+Screen\+::register\+Callback (
609 \begin{DoxyParamCaption}
610 \item[{void($\ast$)(const std\+::string \&event, struct json\+\_\+object $\ast$event\+\_\+contents)}]{event\+\_\+cb, }
611 \item[{void($\ast$)(struct json\+\_\+object $\ast$reply\+\_\+contents)}]{reply\+\_\+cb, }
612 \item[{void($\ast$)(void)}]{hangup\+\_\+cb = {\ttfamily nullptr}}
613 \end{DoxyParamCaption}
614 )}\hypertarget{class_lib_home_screen_a2789e8a5372202cc36f48e71dbb9b7cf}{}\label{class_lib_home_screen_a2789e8a5372202cc36f48e71dbb9b7cf}
615 This function register callback function for reply/event message from home screen
616
617 \subparagraph*{Parameters}
618
619
620 \begin{DoxyItemize}
621 \item event\+\_\+cb \mbox{[}in\mbox{]} \+: This argument should be specified to the callback for subscribed event
622 \item reply\+\_\+cb \mbox{[}in\mbox{]} \+: This argument should be specified to the reply callback for call function
623 \end{DoxyItemize}
624
625 \subparagraph*{Return}
626
627 Nothing
628
629 \subparagraph*{Note}
630
631 Event callback is invoked by home screen for event you subscribed. If you would like to get event, please call subscribe function before/after this function 
632
633 Definition at line 165 of file libhomescreen.\+cpp.
634
635
636 \begin{DoxyCode}
637 169 \{
638 170     onEvent = event\_cb;
639 171     onReply = reply\_cb;
640 172     onHangup = hangup\_cb;
641 173 \}
642 \end{DoxyCode}
643 \index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!reply\+Show\+Window@{reply\+Show\+Window}}
644 \index{reply\+Show\+Window@{reply\+Show\+Window}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}
645 \subsubsection[{\texorpdfstring{reply\+Show\+Window(const char $\ast$application\+\_\+id, json\+\_\+object $\ast$json)}{replyShowWindow(const char *application_id, json_object *json)}}]{\setlength{\rightskip}{0pt plus 5cm}int Lib\+Home\+Screen\+::reply\+Show\+Window (
646 \begin{DoxyParamCaption}
647 \item[{const char $\ast$}]{application\+\_\+id, }
648 \item[{json\+\_\+object $\ast$}]{json}
649 \end{DoxyParamCaption}
650 )}\hypertarget{class_lib_home_screen_a6310b129fc85ef0623e2e2063950cc4b}{}\label{class_lib_home_screen_a6310b129fc85ef0623e2e2063950cc4b}
651 Sending reply onscreen message event
652
653 Call Home\+Screen Service\textquotesingle{}s reply\+Show\+Window verb to reply onscreen message.
654
655 \subparagraph*{Parameters}
656
657
658 \begin{DoxyItemize}
659 \item application\+\_\+id \mbox{[}in\mbox{]} \+: This argument should be specified to the onscreen reply to applilcation id.
660 \item json \mbox{[}in\mbox{]} \+: This argument should be specified to the json parameters.
661 \end{DoxyItemize}
662
663 \subparagraph*{Return}
664
665
666 \begin{DoxyItemize}
667 \item Returns 0 on success or -\/1 in case of error. 
668 \end{DoxyItemize}
669
670 Definition at line 530 of file libhomescreen.\+cpp.
671
672
673 \begin{DoxyCode}
674 531 \{
675 532     \textcolor{keywordflow}{if}(!sp\_websock)
676 533     \{
677 534         \textcolor{keywordflow}{return} -1;
678 535     \}
679 536 
680 537     \textcolor{keywordflow}{if} (json == \textcolor{keyword}{nullptr}) \{
681 538         \hyperlink{include_2hmi-debug_8h_a25361812432cd2480bc8f1a8e56ecbf7}{HMI\_WARNING}(\textcolor{stringliteral}{"libhomescreen"}, \textcolor{stringliteral}{"replyShowWindow`s parameter is null"});
682 539         \textcolor{keywordflow}{return} -1;
683 540     \}
684 541 
685 542     \textcolor{keyword}{struct }json\_object* j\_obj = json\_object\_new\_object();
686 543     \textcolor{keyword}{struct }json\_object* val = json\_object\_new\_string(application\_id);
687 544     json\_object\_object\_add(j\_obj, \hyperlink{libhomescreen_8cpp_a5a89bcb5a83f6b2e5c664a041bd8fd00}{ApplicationId}, val);
688 545     json\_object\_object\_add(j\_obj, \textcolor{stringliteral}{"parameter"}, json);
689 546 
690 547     \textcolor{keywordflow}{return} this->\hyperlink{class_lib_home_screen_a527b49dcfe581be6275d0eb2236ba37f}{call}(\textcolor{stringliteral}{"replyShowWindow"}, j\_obj);
691 548 \}
692 \end{DoxyCode}
693 \index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!set\+\_\+event\+\_\+handler@{set\+\_\+event\+\_\+handler}}
694 \index{set\+\_\+event\+\_\+handler@{set\+\_\+event\+\_\+handler}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}
695 \subsubsection[{\texorpdfstring{set\+\_\+event\+\_\+handler(enum Event\+Type et, handler\+\_\+func f)}{set_event_handler(enum EventType et, handler_func f)}}]{\setlength{\rightskip}{0pt plus 5cm}void Lib\+Home\+Screen\+::set\+\_\+event\+\_\+handler (
696 \begin{DoxyParamCaption}
697 \item[{enum {\bf Event\+Type}}]{et, }
698 \item[{{\bf handler\+\_\+func}}]{f}
699 \end{DoxyParamCaption}
700 )}\hypertarget{class_lib_home_screen_ab1b0e08bf35415de9064afed899e9f85}{}\label{class_lib_home_screen_ab1b0e08bf35415de9064afed899e9f85}
701 Setting Event Handler
702
703 Setting event handler for Homescreen
704
705 \subparagraph*{Parameters}
706
707
708 \begin{DoxyItemize}
709 \item et \mbox{[}in\mbox{]} \+: event name
710 \item f \mbox{[}in\mbox{]} \+: event handler
711 \end{DoxyItemize}
712
713 \subparagraph*{Return}
714
715 Nothing
716
717 \subparagraph*{Note}
718
719 Don\textquotesingle{}t release json\+\_\+object by json\+\_\+object\+\_\+put in handler\+\_\+func. The resource is released by libafbwsc library. 
720
721 Definition at line 295 of file libhomescreen.\+cpp.
722
723
724 \begin{DoxyCode}
725 296 \{
726 297     \textcolor{keywordflow}{if} (et >= 1 && et <= 7) \{
727 298         \textcolor{keywordflow}{switch} (et) \{
728 299 \textcolor{comment}{/*          case Event\_TapShortcut:}
729 300 \textcolor{comment}{                this->subscribe(LibHomeScreen::event\_list[0]);}
730 301 \textcolor{comment}{                break;*/}
731 302             \textcolor{keywordflow}{case} \hyperlink{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154a3fb3563c64786f1a2ae404df6edffd5c}{Event\_ShowWindow}:
732 303                 this->\hyperlink{class_lib_home_screen_aa4c189807b75d070f567967f0d690738}{subscribe}(\hyperlink{class_lib_home_screen_a6a6d8a4d33a006a08652e7377a4c29e9}{LibHomeScreen::event\_list}[0]);
733 304                 \textcolor{keywordflow}{break};
734 305             \textcolor{keywordflow}{case} \hyperlink{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154aea56fa32a124a8ddcbea127755280a1d}{Event\_OnScreenMessage}:
735 306                 this->\hyperlink{class_lib_home_screen_aa4c189807b75d070f567967f0d690738}{subscribe}(\hyperlink{class_lib_home_screen_a6a6d8a4d33a006a08652e7377a4c29e9}{LibHomeScreen::event\_list}[1]);
736 307                 \textcolor{keywordflow}{break};
737 308             \textcolor{keywordflow}{case} \hyperlink{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154acae91db4efc2394fd701f581d277a3fd}{Event\_OnScreenReply}:
738 309                 this->\hyperlink{class_lib_home_screen_aa4c189807b75d070f567967f0d690738}{subscribe}(\hyperlink{class_lib_home_screen_a6a6d8a4d33a006a08652e7377a4c29e9}{LibHomeScreen::event\_list}[2]);
739 310                 \textcolor{keywordflow}{break};
740 311             \textcolor{keywordflow}{case} \hyperlink{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154aef8bb1086ddbc0a125d77af9da3146a0}{Event\_HideWindow}:
741 312                 this->\hyperlink{class_lib_home_screen_aa4c189807b75d070f567967f0d690738}{subscribe}(\hyperlink{class_lib_home_screen_a6a6d8a4d33a006a08652e7377a4c29e9}{LibHomeScreen::event\_list}[3]);
742 313                 \textcolor{keywordflow}{break};
743 314             \textcolor{keywordflow}{case} \hyperlink{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154aaacb8babce7fac884ab4bf7605da0d9f}{Event\_ReplyShowWindow}:
744 315                 this->\hyperlink{class_lib_home_screen_aa4c189807b75d070f567967f0d690738}{subscribe}(\hyperlink{class_lib_home_screen_a6a6d8a4d33a006a08652e7377a4c29e9}{LibHomeScreen::event\_list}[4]);
745 316                 \textcolor{keywordflow}{break};
746 317             \textcolor{keywordflow}{case} \hyperlink{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154a68119a9c3ff85e807db38d3282e5ca30}{Event\_ShowNotification}:
747 318                 this->\hyperlink{class_lib_home_screen_aa4c189807b75d070f567967f0d690738}{subscribe}(\hyperlink{class_lib_home_screen_a6a6d8a4d33a006a08652e7377a4c29e9}{LibHomeScreen::event\_list}[5]);
748 319                 \textcolor{keywordflow}{break};
749 320             \textcolor{keywordflow}{case} \hyperlink{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154a1fad2ac5071a1dae7db9c8e1b522669b}{Event\_ShowInformation}:
750 321                 this->\hyperlink{class_lib_home_screen_aa4c189807b75d070f567967f0d690738}{subscribe}(\hyperlink{class_lib_home_screen_a6a6d8a4d33a006a08652e7377a4c29e9}{LibHomeScreen::event\_list}[6]);
751 322                 \textcolor{keywordflow}{break};
752 323         \}
753 324 
754 325         this->handlers[et] = std::move(f);
755 326     \}
756 327 \}
757 \end{DoxyCode}
758 \index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!show\+Information@{show\+Information}}
759 \index{show\+Information@{show\+Information}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}
760 \subsubsection[{\texorpdfstring{show\+Information(json\+\_\+object $\ast$json)}{showInformation(json_object *json)}}]{\setlength{\rightskip}{0pt plus 5cm}int Lib\+Home\+Screen\+::show\+Information (
761 \begin{DoxyParamCaption}
762 \item[{json\+\_\+object $\ast$}]{json}
763 \end{DoxyParamCaption}
764 )}\hypertarget{class_lib_home_screen_ada999aeb0444c964428bdf1ee236727f}{}\label{class_lib_home_screen_ada999aeb0444c964428bdf1ee236727f}
765 Sending show information event
766
767 Call Home\+Screen Service\textquotesingle{}s information verb to show notification on Information Bar.
768
769 \subparagraph*{Parameters}
770
771
772 \begin{DoxyItemize}
773 \item json \mbox{[}in\mbox{]} \+: This argument should be specified to the json parameters.
774 \end{DoxyItemize}
775
776 \subparagraph*{Return}
777
778
779 \begin{DoxyItemize}
780 \item Returns 0 on success or -\/1 in case of error. 
781 \end{DoxyItemize}
782
783 Definition at line 584 of file libhomescreen.\+cpp.
784
785
786 \begin{DoxyCode}
787 585 \{
788 586     \textcolor{keywordflow}{if}(!sp\_websock)
789 587     \{
790 588         \textcolor{keywordflow}{return} -1;
791 589     \}
792 590 
793 591     \textcolor{keywordflow}{return} this->\hyperlink{class_lib_home_screen_a527b49dcfe581be6275d0eb2236ba37f}{call}(\textcolor{stringliteral}{"showInformation"}, json);
794 592 \}
795 \end{DoxyCode}
796 \index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!show\+Notification@{show\+Notification}}
797 \index{show\+Notification@{show\+Notification}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}
798 \subsubsection[{\texorpdfstring{show\+Notification(json\+\_\+object $\ast$json)}{showNotification(json_object *json)}}]{\setlength{\rightskip}{0pt plus 5cm}int Lib\+Home\+Screen\+::show\+Notification (
799 \begin{DoxyParamCaption}
800 \item[{json\+\_\+object $\ast$}]{json}
801 \end{DoxyParamCaption}
802 )}\hypertarget{class_lib_home_screen_a93ad567ed597a80a344ba82457c2bd7f}{}\label{class_lib_home_screen_a93ad567ed597a80a344ba82457c2bd7f}
803 Sending show notification event
804
805 Call Home\+Screen Service\textquotesingle{}s notification verb to show notification on Status Bar.
806
807 \subparagraph*{Parameters}
808
809
810 \begin{DoxyItemize}
811 \item json \mbox{[}in\mbox{]} \+: This argument should be specified to the json parameters.
812 \end{DoxyItemize}
813
814 \subparagraph*{Return}
815
816
817 \begin{DoxyItemize}
818 \item Returns 0 on success or -\/1 in case of error. 
819 \end{DoxyItemize}
820
821 Definition at line 562 of file libhomescreen.\+cpp.
822
823
824 \begin{DoxyCode}
825 563 \{
826 564     \textcolor{keywordflow}{if}(!sp\_websock)
827 565     \{
828 566         \textcolor{keywordflow}{return} -1;
829 567     \}
830 568 
831 569     \textcolor{keywordflow}{return} this->\hyperlink{class_lib_home_screen_a527b49dcfe581be6275d0eb2236ba37f}{call}(\textcolor{stringliteral}{"showNotification"}, json);
832 570 \}
833 \end{DoxyCode}
834 \index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!show\+Window@{show\+Window}}
835 \index{show\+Window@{show\+Window}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}
836 \subsubsection[{\texorpdfstring{show\+Window(const char $\ast$application\+\_\+id, json\+\_\+object $\ast$json)}{showWindow(const char *application_id, json_object *json)}}]{\setlength{\rightskip}{0pt plus 5cm}int Lib\+Home\+Screen\+::show\+Window (
837 \begin{DoxyParamCaption}
838 \item[{const char $\ast$}]{application\+\_\+id, }
839 \item[{json\+\_\+object $\ast$}]{json}
840 \end{DoxyParamCaption}
841 )}\hypertarget{class_lib_home_screen_a69fc770cb3f94d30a10c2c8c81eb892f}{}\label{class_lib_home_screen_a69fc770cb3f94d30a10c2c8c81eb892f}
842 Sending show window event
843
844 Call Home\+Screen Service\textquotesingle{}s show\+Window verb to request display id\textquotesingle{}s screen.
845
846 \subparagraph*{Parameters}
847
848
849 \begin{DoxyItemize}
850 \item application\+\_\+id \mbox{[}in\mbox{]} \+: This argument should be specified to the application\textquotesingle{}s id.
851 \item json \mbox{[}in\mbox{]} \+: This argument should be specified to the json parameters.
852 \end{DoxyItemize}
853
854 \subparagraph*{Return}
855
856
857 \begin{DoxyItemize}
858 \item Returns 0 on success or -\/1 in case of error. 
859 \end{DoxyItemize}
860
861 Definition at line 467 of file libhomescreen.\+cpp.
862
863
864 \begin{DoxyCode}
865 468 \{
866 469     \textcolor{keywordflow}{if}(!sp\_websock)
867 470     \{
868 471         \textcolor{keywordflow}{return} -1;
869 472     \}
870 473 
871 474     \textcolor{keyword}{struct }json\_object* j\_obj = json\_object\_new\_object();
872 475     \textcolor{keyword}{struct }json\_object* val = json\_object\_new\_string(application\_id);
873 476     json\_object\_object\_add(j\_obj, \hyperlink{libhomescreen_8cpp_a5a89bcb5a83f6b2e5c664a041bd8fd00}{ApplicationId}, val);
874 477 
875 478     \textcolor{keywordflow}{if} (json == \textcolor{keyword}{nullptr}) \{
876 479         \textcolor{keyword}{struct }json\_object* j\_json = json\_object\_new\_object();
877 480         \textcolor{keyword}{struct }json\_object* value = json\_object\_new\_string(\textcolor{stringliteral}{"normal"});
878 481         json\_object\_object\_add(j\_json, \textcolor{stringliteral}{"area"}, value);
879 482         json\_object\_object\_add(j\_obj, \textcolor{stringliteral}{"parameter"}, j\_json);
880 483     \}
881 484     \textcolor{keywordflow}{else} \{
882 485         json\_object\_object\_add(j\_obj, \textcolor{stringliteral}{"parameter"}, json);
883 486     \}
884 487 
885 488     \textcolor{keywordflow}{return} this->\hyperlink{class_lib_home_screen_a527b49dcfe581be6275d0eb2236ba37f}{call}(\textcolor{stringliteral}{"showWindow"}, j\_obj);
886 489 \}
887 \end{DoxyCode}
888 \index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!subscribe@{subscribe}}
889 \index{subscribe@{subscribe}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}
890 \subsubsection[{\texorpdfstring{subscribe(const std\+::string \&event\+\_\+name)}{subscribe(const std::string &event_name)}}]{\setlength{\rightskip}{0pt plus 5cm}int Lib\+Home\+Screen\+::subscribe (
891 \begin{DoxyParamCaption}
892 \item[{const std\+::string \&}]{event\+\_\+name}
893 \end{DoxyParamCaption}
894 )}\hypertarget{class_lib_home_screen_aa4c189807b75d070f567967f0d690738}{}\label{class_lib_home_screen_aa4c189807b75d070f567967f0d690738}
895 Register callback function for each event
896
897 \subparagraph*{Parameters}
898
899
900 \begin{DoxyItemize}
901 \item event\+\_\+name \mbox{[}in\mbox{]} \+: This argument should be specified to the event name
902 \end{DoxyItemize}
903
904 \subparagraph*{Return}
905
906
907 \begin{DoxyItemize}
908 \item Returns 0 on success or -\/1 in case of error.
909 \end{DoxyItemize}
910
911 \subparagraph*{Note}
912
913 This function enables to get an event to your callback function. 
914
915 Definition at line 409 of file libhomescreen.\+cpp.
916
917
918 \begin{DoxyCode}
919 410 \{
920 411     \textcolor{keywordflow}{if}(!sp\_websock)
921 412     \{
922 413         \textcolor{keywordflow}{return} -1;
923 414     \}
924 415     \textcolor{keyword}{struct }json\_object* j\_obj = json\_object\_new\_object();
925 416     json\_object\_object\_add(j\_obj, \textcolor{stringliteral}{"event"}, json\_object\_new\_string(event\_name.c\_str()));
926 417 
927 418     \textcolor{keywordtype}{int} ret = afb\_wsj1\_call\_j(sp\_websock, \hyperlink{libhomescreen_8cpp_a1e2d6e77dd8f0162f830058579eab42f}{API}, \textcolor{stringliteral}{"subscribe"}, j\_obj, 
928       \hyperlink{libhomescreen_8cpp_a7778933bffa862c63fa0a1b8219faa8b}{\_on\_reply\_static}, \textcolor{keyword}{this});
929 419     \textcolor{keywordflow}{if} (ret < 0) \{
930 420         \hyperlink{include_2hmi-debug_8h_a65bb6c7cfe38f8a724beab5059d36fb2}{HMI\_ERROR}(\textcolor{stringliteral}{"libhomescreen"},\textcolor{stringliteral}{"Failed to call verb"});
931 421     \}
932 422     \textcolor{keywordflow}{return} ret;
933 423 \}
934 \end{DoxyCode}
935 \index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!tap\+Shortcut@{tap\+Shortcut}}
936 \index{tap\+Shortcut@{tap\+Shortcut}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}
937 \subsubsection[{\texorpdfstring{tap\+Shortcut(const char $\ast$application\+\_\+id)}{tapShortcut(const char *application_id)}}]{\setlength{\rightskip}{0pt plus 5cm}int Lib\+Home\+Screen\+::tap\+Shortcut (
938 \begin{DoxyParamCaption}
939 \item[{const char $\ast$}]{application\+\_\+id}
940 \end{DoxyParamCaption}
941 )}\hypertarget{class_lib_home_screen_a6ca8ff4a2aa019a735afaff713e0ef44}{}\label{class_lib_home_screen_a6ca8ff4a2aa019a735afaff713e0ef44}
942 Sending Short\+Cut Icon tapped event
943
944 When Home\+Screen shortcut area is tapped, sending a event
945
946 \subparagraph*{Parameters}
947
948
949 \begin{DoxyItemize}
950 \item application\+\_\+id \mbox{[}in\mbox{]} \+: Tapped application id (label)
951 \end{DoxyItemize}
952
953 \subparagraph*{Return}
954
955
956 \begin{DoxyItemize}
957 \item Returns 0 on success or -\/1 in case of error. 
958 \end{DoxyItemize}
959
960 Definition at line 222 of file libhomescreen.\+cpp.
961
962
963 \begin{DoxyCode}
964 223 \{
965 224     \textcolor{keyword}{struct }json\_object* obj = json\_object\_new\_object();
966 225     \textcolor{keyword}{struct }json\_object* val = json\_object\_new\_string(\textcolor{stringliteral}{"normal"});
967 226     json\_object\_object\_add(obj, \textcolor{stringliteral}{"area"}, val);
968 227 
969 228     \textcolor{keywordflow}{return} \hyperlink{class_lib_home_screen_a69fc770cb3f94d30a10c2c8c81eb892f}{showWindow}(application\_id, obj);
970 229 \}
971 \end{DoxyCode}
972 \index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!unsubscribe@{unsubscribe}}
973 \index{unsubscribe@{unsubscribe}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}
974 \subsubsection[{\texorpdfstring{unsubscribe(const std\+::string \&event\+\_\+name)}{unsubscribe(const std::string &event_name)}}]{\setlength{\rightskip}{0pt plus 5cm}int Lib\+Home\+Screen\+::unsubscribe (
975 \begin{DoxyParamCaption}
976 \item[{const std\+::string \&}]{event\+\_\+name}
977 \end{DoxyParamCaption}
978 )}\hypertarget{class_lib_home_screen_aac03a45cbd453ba69ddb00c1016930a6}{}\label{class_lib_home_screen_aac03a45cbd453ba69ddb00c1016930a6}
979 Unregister callback function for each event
980
981 \subparagraph*{Parameters}
982
983
984 \begin{DoxyItemize}
985 \item event\+\_\+name \mbox{[}in\mbox{]} \+: This argument should be specified to the event name
986 \end{DoxyItemize}
987
988 \subparagraph*{Return}
989
990
991 \begin{DoxyItemize}
992 \item Returns 0 on success or -\/1 in case of error.
993 \end{DoxyItemize}
994
995 \subparagraph*{Note}
996
997 This function disables to get an event to your callback function. 
998
999 Definition at line 438 of file libhomescreen.\+cpp.
1000
1001
1002 \begin{DoxyCode}
1003 439 \{
1004 440     \textcolor{keywordflow}{if}(!sp\_websock)
1005 441     \{
1006 442         \textcolor{keywordflow}{return} -1;
1007 443     \}
1008 444     \textcolor{keyword}{struct }json\_object* j\_obj = json\_object\_new\_object();
1009 445     json\_object\_object\_add(j\_obj, \textcolor{stringliteral}{"event"}, json\_object\_new\_string(event\_name.c\_str()));
1010 446 
1011 447     \textcolor{keywordtype}{int} ret = afb\_wsj1\_call\_j(sp\_websock, \hyperlink{libhomescreen_8cpp_a1e2d6e77dd8f0162f830058579eab42f}{API}, \textcolor{stringliteral}{"unsubscribe"}, j\_obj, 
1012       \hyperlink{libhomescreen_8cpp_a7778933bffa862c63fa0a1b8219faa8b}{\_on\_reply\_static}, \textcolor{keyword}{this});
1013 448     \textcolor{keywordflow}{if} (ret < 0) \{
1014 449         \hyperlink{include_2hmi-debug_8h_a65bb6c7cfe38f8a724beab5059d36fb2}{HMI\_ERROR}(\textcolor{stringliteral}{"libhomescreen"},\textcolor{stringliteral}{"Failed to call verb"});
1015 450     \}
1016 451     \textcolor{keywordflow}{return} ret;
1017 452 \}
1018 \end{DoxyCode}
1019
1020
1021 \subsection{Member Data Documentation}
1022 \index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!\+\_\+area\+Full\+Screen@{\+\_\+area\+Full\+Screen}}
1023 \index{\+\_\+area\+Full\+Screen@{\+\_\+area\+Full\+Screen}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}
1024 \subsubsection[{\texorpdfstring{\+\_\+area\+Full\+Screen}{_areaFullScreen}}]{\setlength{\rightskip}{0pt plus 5cm}const char$\ast$ Lib\+Home\+Screen\+::\+\_\+area\+Full\+Screen = \char`\"{}fullscreen\char`\"{}}\hypertarget{class_lib_home_screen_ad0569f5323ead77a43bd8735377a6f25}{}\label{class_lib_home_screen_ad0569f5323ead77a43bd8735377a6f25}
1025
1026
1027 Definition at line 59 of file libhomescreen.\+hpp.
1028
1029 \index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!\+\_\+area\+Normal@{\+\_\+area\+Normal}}
1030 \index{\+\_\+area\+Normal@{\+\_\+area\+Normal}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}
1031 \subsubsection[{\texorpdfstring{\+\_\+area\+Normal}{_areaNormal}}]{\setlength{\rightskip}{0pt plus 5cm}const char$\ast$ Lib\+Home\+Screen\+::\+\_\+area\+Normal = \char`\"{}normal\char`\"{}}\hypertarget{class_lib_home_screen_aac718b60b83c74e2b061f6f7f7ec3bf5}{}\label{class_lib_home_screen_aac718b60b83c74e2b061f6f7f7ec3bf5}
1032
1033
1034 Definition at line 58 of file libhomescreen.\+hpp.
1035
1036 \index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!\+\_\+area\+Split\+Main@{\+\_\+area\+Split\+Main}}
1037 \index{\+\_\+area\+Split\+Main@{\+\_\+area\+Split\+Main}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}
1038 \subsubsection[{\texorpdfstring{\+\_\+area\+Split\+Main}{_areaSplitMain}}]{\setlength{\rightskip}{0pt plus 5cm}const char$\ast$ Lib\+Home\+Screen\+::\+\_\+area\+Split\+Main = \char`\"{}split.\+main\char`\"{}}\hypertarget{class_lib_home_screen_a7f201fc366146790520bf8d990f7b2eb}{}\label{class_lib_home_screen_a7f201fc366146790520bf8d990f7b2eb}
1039
1040
1041 Definition at line 60 of file libhomescreen.\+hpp.
1042
1043 \index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!\+\_\+area\+Split\+Sub@{\+\_\+area\+Split\+Sub}}
1044 \index{\+\_\+area\+Split\+Sub@{\+\_\+area\+Split\+Sub}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}
1045 \subsubsection[{\texorpdfstring{\+\_\+area\+Split\+Sub}{_areaSplitSub}}]{\setlength{\rightskip}{0pt plus 5cm}const char$\ast$ Lib\+Home\+Screen\+::\+\_\+area\+Split\+Sub = \char`\"{}split.\+sub\char`\"{}}\hypertarget{class_lib_home_screen_ab4f54373b0681de11243152f01c48888}{}\label{class_lib_home_screen_ab4f54373b0681de11243152f01c48888}
1046
1047
1048 Definition at line 61 of file libhomescreen.\+hpp.
1049
1050 \index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!\+\_\+key\+Area@{\+\_\+key\+Area}}
1051 \index{\+\_\+key\+Area@{\+\_\+key\+Area}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}
1052 \subsubsection[{\texorpdfstring{\+\_\+key\+Area}{_keyArea}}]{\setlength{\rightskip}{0pt plus 5cm}const char$\ast$ Lib\+Home\+Screen\+::\+\_\+key\+Area = \char`\"{}area\char`\"{}}\hypertarget{class_lib_home_screen_a8becda1b035ae45f5a11c7e7963091bf}{}\label{class_lib_home_screen_a8becda1b035ae45f5a11c7e7963091bf}
1053
1054
1055 Definition at line 55 of file libhomescreen.\+hpp.
1056
1057 \index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!\+\_\+key\+Parameter@{\+\_\+key\+Parameter}}
1058 \index{\+\_\+key\+Parameter@{\+\_\+key\+Parameter}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}
1059 \subsubsection[{\texorpdfstring{\+\_\+key\+Parameter}{_keyParameter}}]{\setlength{\rightskip}{0pt plus 5cm}const char$\ast$ Lib\+Home\+Screen\+::\+\_\+key\+Parameter = \char`\"{}parameter\char`\"{}}\hypertarget{class_lib_home_screen_a927592eff8e34efbbceaf12522f8897f}{}\label{class_lib_home_screen_a927592eff8e34efbbceaf12522f8897f}
1060
1061
1062 Definition at line 54 of file libhomescreen.\+hpp.
1063
1064 \index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!api\+\_\+list@{api\+\_\+list}}
1065 \index{api\+\_\+list@{api\+\_\+list}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}
1066 \subsubsection[{\texorpdfstring{api\+\_\+list}{api_list}}]{\setlength{\rightskip}{0pt plus 5cm}const std\+::vector$<$ std\+::string $>$ Lib\+Home\+Screen\+::api\+\_\+list\hspace{0.3cm}{\ttfamily [static]}}\hypertarget{class_lib_home_screen_a5593ff5ac78f6495ccb649904cf0ab08}{}\label{class_lib_home_screen_a5593ff5ac78f6495ccb649904cf0ab08}
1067 {\bfseries Initial value\+:}
1068 \begin{DoxyCode}
1069 \{
1070     std::string(\textcolor{stringliteral}{"ping"}), 
1071     std::string(\textcolor{stringliteral}{"tap\_shortcut"}), 
1072     std::string(\textcolor{stringliteral}{"on\_screen\_message"}),
1073     std::string(\textcolor{stringliteral}{"on\_screen\_reply"}),
1074     std::string(\textcolor{stringliteral}{"subscribe"}),
1075     std::string(\textcolor{stringliteral}{"unsubscribe"}),
1076     std::string(\textcolor{stringliteral}{"showWindow"}),
1077     std::string(\textcolor{stringliteral}{"hideWindow"}),
1078     std::string(\textcolor{stringliteral}{"replyShowWindow"}),
1079     std::string(\textcolor{stringliteral}{"showNotification"}),
1080     std::string(\textcolor{stringliteral}{"showInformation"})
1081 \}
1082 \end{DoxyCode}
1083
1084
1085 Definition at line 63 of file libhomescreen.\+hpp.
1086
1087 \index{Lib\+Home\+Screen@{Lib\+Home\+Screen}!event\+\_\+list@{event\+\_\+list}}
1088 \index{event\+\_\+list@{event\+\_\+list}!Lib\+Home\+Screen@{Lib\+Home\+Screen}}
1089 \subsubsection[{\texorpdfstring{event\+\_\+list}{event_list}}]{\setlength{\rightskip}{0pt plus 5cm}const std\+::vector$<$ std\+::string $>$ Lib\+Home\+Screen\+::event\+\_\+list\hspace{0.3cm}{\ttfamily [static]}}\hypertarget{class_lib_home_screen_a6a6d8a4d33a006a08652e7377a4c29e9}{}\label{class_lib_home_screen_a6a6d8a4d33a006a08652e7377a4c29e9}
1090 {\bfseries Initial value\+:}
1091 \begin{DoxyCode}
1092 \{
1093
1094     std::string(\textcolor{stringliteral}{"showWindow"}),
1095     std::string(\textcolor{stringliteral}{"on\_screen\_message"}),
1096     std::string(\textcolor{stringliteral}{"on\_screen\_reply"}),
1097     std::string(\textcolor{stringliteral}{"hideWindow"}),
1098     std::string(\textcolor{stringliteral}{"replyShowWindow"}),
1099     std::string(\textcolor{stringliteral}{"showNotification"}),
1100     std::string(\textcolor{stringliteral}{"showInformation"}),
1101     std::string(\textcolor{stringliteral}{"none"})
1102 \}
1103 \end{DoxyCode}
1104
1105
1106 Definition at line 64 of file libhomescreen.\+hpp.
1107
1108
1109
1110 The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
1111 \item 
1112 include/\hyperlink{libhomescreen_8hpp}{libhomescreen.\+hpp}\item 
1113 libhomescreen/\hyperlink{libhomescreen_8cpp}{libhomescreen.\+cpp}\end{DoxyCompactItemize}