1 \hypertarget{libhomescreen_8cpp}{}\section{libhomescreen/libhomescreen.cpp File Reference}
2 \label{libhomescreen_8cpp}\index{libhomescreen/libhomescreen.\+cpp@{libhomescreen/libhomescreen.\+cpp}}
3 {\ttfamily \#include $<$stdarg.\+h$>$}\newline
4 {\ttfamily \#include $<$sys/socket.\+h$>$}\newline
5 {\ttfamily \#include $<$iostream$>$}\newline
6 {\ttfamily \#include $<$algorithm$>$}\newline
7 {\ttfamily \#include $<$thread$>$}\newline
8 {\ttfamily \#include $<$errno.\+h$>$}\newline
9 {\ttfamily \#include $<$cassert$>$}\newline
10 {\ttfamily \#include $<$cctype$>$}\newline
11 {\ttfamily \#include $<$cerrno$>$}\newline
12 {\ttfamily \#include $<$cstdio$>$}\newline
13 {\ttfamily \#include $<$cstdlib$>$}\newline
14 {\ttfamily \#include $<$cstring$>$}\newline
15 {\ttfamily \#include $<$libhomescreen.\+hpp$>$}\newline
16 {\ttfamily \#include \char`\"{}hmi-\/debug.\+h\char`\"{}}\newline
17 \subsection*{Functions}
18 \begin{DoxyCompactItemize}
20 static bool \hyperlink{libhomescreen_8cpp_a7a2176c3d71fec0f09dcb2aa0866b17e}{has\+\_\+verb} (const string \&verb)
22 static void \hyperlink{libhomescreen_8cpp_a73c05b96c151e5e46c28585ccb143c1c}{\+\_\+on\+\_\+hangup\+\_\+static} (void $\ast$closure, struct afb\+\_\+wsj1 $\ast$wsj)
24 static void \hyperlink{libhomescreen_8cpp_a782a05fde0f1c17e0c4c8f972a3f53c8}{\+\_\+on\+\_\+call\+\_\+static} (void $\ast$closure, const char $\ast$api, const char $\ast$verb, struct afb\+\_\+wsj1\+\_\+msg $\ast$msg)
26 static void \hyperlink{libhomescreen_8cpp_a3df86185aa9453726556da201d95a6f9}{\+\_\+on\+\_\+event\+\_\+static} (void $\ast$closure, const char $\ast$\hyperlink{structevent}{event}, struct afb\+\_\+wsj1\+\_\+msg $\ast$msg)
28 static void \hyperlink{libhomescreen_8cpp_a7778933bffa862c63fa0a1b8219faa8b}{\+\_\+on\+\_\+reply\+\_\+static} (void $\ast$closure, struct afb\+\_\+wsj1\+\_\+msg $\ast$msg)
30 static void $\ast$ \hyperlink{libhomescreen_8cpp_aa73353e1bf62c68b6b0aba7a1e4e275e}{event\+\_\+loop\+\_\+run} (void $\ast$args)
31 \end{DoxyCompactItemize}
32 \subsection*{Variables}
33 \begin{DoxyCompactItemize}
35 static const char \hyperlink{libhomescreen_8cpp_a1e2d6e77dd8f0162f830058579eab42f}{A\+PI} \mbox{[}$\,$\mbox{]} = \char`\"{}homescreen\char`\"{}
36 \end{DoxyCompactItemize}
39 \subsection{Function Documentation}
40 \mbox{\Hypertarget{libhomescreen_8cpp_a782a05fde0f1c17e0c4c8f972a3f53c8}\label{libhomescreen_8cpp_a782a05fde0f1c17e0c4c8f972a3f53c8}}
41 \index{libhomescreen.\+cpp@{libhomescreen.\+cpp}!\+\_\+on\+\_\+call\+\_\+static@{\+\_\+on\+\_\+call\+\_\+static}}
42 \index{\+\_\+on\+\_\+call\+\_\+static@{\+\_\+on\+\_\+call\+\_\+static}!libhomescreen.\+cpp@{libhomescreen.\+cpp}}
43 \subsubsection{\texorpdfstring{\+\_\+on\+\_\+call\+\_\+static()}{\_on\_call\_static()}}
44 {\footnotesize\ttfamily static void \+\_\+on\+\_\+call\+\_\+static (\begin{DoxyParamCaption}\item[{void $\ast$}]{closure, }\item[{const char $\ast$}]{api, }\item[{const char $\ast$}]{verb, }\item[{struct afb\+\_\+wsj1\+\_\+msg $\ast$}]{msg }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}
48 Definition at line 64 of file libhomescreen.\+cpp.
53 66 \textcolor{comment}{/* LibHomeScreen is not called from other process */}
56 \mbox{\Hypertarget{libhomescreen_8cpp_a3df86185aa9453726556da201d95a6f9}\label{libhomescreen_8cpp_a3df86185aa9453726556da201d95a6f9}}
57 \index{libhomescreen.\+cpp@{libhomescreen.\+cpp}!\+\_\+on\+\_\+event\+\_\+static@{\+\_\+on\+\_\+event\+\_\+static}}
58 \index{\+\_\+on\+\_\+event\+\_\+static@{\+\_\+on\+\_\+event\+\_\+static}!libhomescreen.\+cpp@{libhomescreen.\+cpp}}
59 \subsubsection{\texorpdfstring{\+\_\+on\+\_\+event\+\_\+static()}{\_on\_event\_static()}}
60 {\footnotesize\ttfamily static void \+\_\+on\+\_\+event\+\_\+static (\begin{DoxyParamCaption}\item[{void $\ast$}]{closure, }\item[{const char $\ast$}]{event, }\item[{struct afb\+\_\+wsj1\+\_\+msg $\ast$}]{msg }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}
64 Definition at line 69 of file libhomescreen.\+cpp.
69 71 \textcolor{keyword}{static\_cast<}\hyperlink{class_lib_home_screen}{LibHomeScreen}*\textcolor{keyword}{>}(closure)->on\_event(NULL,\hyperlink{structevent}{event},msg);
72 \mbox{\Hypertarget{libhomescreen_8cpp_a73c05b96c151e5e46c28585ccb143c1c}\label{libhomescreen_8cpp_a73c05b96c151e5e46c28585ccb143c1c}}
73 \index{libhomescreen.\+cpp@{libhomescreen.\+cpp}!\+\_\+on\+\_\+hangup\+\_\+static@{\+\_\+on\+\_\+hangup\+\_\+static}}
74 \index{\+\_\+on\+\_\+hangup\+\_\+static@{\+\_\+on\+\_\+hangup\+\_\+static}!libhomescreen.\+cpp@{libhomescreen.\+cpp}}
75 \subsubsection{\texorpdfstring{\+\_\+on\+\_\+hangup\+\_\+static()}{\_on\_hangup\_static()}}
76 {\footnotesize\ttfamily static void \+\_\+on\+\_\+hangup\+\_\+static (\begin{DoxyParamCaption}\item[{void $\ast$}]{closure, }\item[{struct afb\+\_\+wsj1 $\ast$}]{wsj }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}
80 Definition at line 59 of file libhomescreen.\+cpp.
85 61 \textcolor{keyword}{static\_cast<}\hyperlink{class_lib_home_screen}{LibHomeScreen}*\textcolor{keyword}{>}(closure)->on\_hangup(NULL,wsj);
88 \mbox{\Hypertarget{libhomescreen_8cpp_a7778933bffa862c63fa0a1b8219faa8b}\label{libhomescreen_8cpp_a7778933bffa862c63fa0a1b8219faa8b}}
89 \index{libhomescreen.\+cpp@{libhomescreen.\+cpp}!\+\_\+on\+\_\+reply\+\_\+static@{\+\_\+on\+\_\+reply\+\_\+static}}
90 \index{\+\_\+on\+\_\+reply\+\_\+static@{\+\_\+on\+\_\+reply\+\_\+static}!libhomescreen.\+cpp@{libhomescreen.\+cpp}}
91 \subsubsection{\texorpdfstring{\+\_\+on\+\_\+reply\+\_\+static()}{\_on\_reply\_static()}}
92 {\footnotesize\ttfamily static void \+\_\+on\+\_\+reply\+\_\+static (\begin{DoxyParamCaption}\item[{void $\ast$}]{closure, }\item[{struct afb\+\_\+wsj1\+\_\+msg $\ast$}]{msg }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}
96 Definition at line 74 of file libhomescreen.\+cpp.
101 76 \textcolor{keyword}{static\_cast<}\hyperlink{class_lib_home_screen}{LibHomeScreen}*\textcolor{keyword}{>}(closure)->on\_reply(NULL,msg);
104 \mbox{\Hypertarget{libhomescreen_8cpp_aa73353e1bf62c68b6b0aba7a1e4e275e}\label{libhomescreen_8cpp_aa73353e1bf62c68b6b0aba7a1e4e275e}}
105 \index{libhomescreen.\+cpp@{libhomescreen.\+cpp}!event\+\_\+loop\+\_\+run@{event\+\_\+loop\+\_\+run}}
106 \index{event\+\_\+loop\+\_\+run@{event\+\_\+loop\+\_\+run}!libhomescreen.\+cpp@{libhomescreen.\+cpp}}
107 \subsubsection{\texorpdfstring{event\+\_\+loop\+\_\+run()}{event\_loop\_run()}}
108 {\footnotesize\ttfamily static void$\ast$ event\+\_\+loop\+\_\+run (\begin{DoxyParamCaption}\item[{void $\ast$}]{args }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}
112 Definition at line 201 of file libhomescreen.\+cpp.
117 203 \textcolor{keyword}{struct }sd\_event* loop = (\textcolor{keyword}{struct }sd\_event*)(args);
118 204 \hyperlink{hmi-debug_8h_a0d26d8b8201011dade787236519711c0}{HMI\_DEBUG}(\textcolor{stringliteral}{"libhomescreen"},\textcolor{stringliteral}{"start eventloop"});
119 205 \textcolor{keywordflow}{for}(;;)
120 206 sd\_event\_run(loop, 30000000);
123 \mbox{\Hypertarget{libhomescreen_8cpp_a7a2176c3d71fec0f09dcb2aa0866b17e}\label{libhomescreen_8cpp_a7a2176c3d71fec0f09dcb2aa0866b17e}}
124 \index{libhomescreen.\+cpp@{libhomescreen.\+cpp}!has\+\_\+verb@{has\+\_\+verb}}
125 \index{has\+\_\+verb@{has\+\_\+verb}!libhomescreen.\+cpp@{libhomescreen.\+cpp}}
126 \subsubsection{\texorpdfstring{has\+\_\+verb()}{has\_verb()}}
127 {\footnotesize\ttfamily static bool has\+\_\+verb (\begin{DoxyParamCaption}\item[{const string \&}]{verb }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}
131 Definition at line 518 of file libhomescreen.\+cpp.
136 520 \hyperlink{hmi-debug_8h_a0d26d8b8201011dade787236519711c0}{HMI\_DEBUG}(\textcolor{stringliteral}{"libhomescreen"},\textcolor{stringliteral}{"verb is %s"}, verb.c\_str());
137 521 \textcolor{keywordflow}{if}(find(\hyperlink{class_lib_home_screen_a5593ff5ac78f6495ccb649904cf0ab08}{LibHomeScreen::api\_list}.begin(),
138 \hyperlink{class_lib_home_screen_a5593ff5ac78f6495ccb649904cf0ab08}{LibHomeScreen::api\_list}.end(), verb) !=
139 \hyperlink{class_lib_home_screen_a5593ff5ac78f6495ccb649904cf0ab08}{LibHomeScreen::api\_list}.end())
140 522 \textcolor{keywordflow}{return} \textcolor{keyword}{true};
141 523 \textcolor{keywordflow}{else}
142 524 \textcolor{keywordflow}{return} \textcolor{keyword}{false};
147 \subsection{Variable Documentation}
148 \mbox{\Hypertarget{libhomescreen_8cpp_a1e2d6e77dd8f0162f830058579eab42f}\label{libhomescreen_8cpp_a1e2d6e77dd8f0162f830058579eab42f}}
149 \index{libhomescreen.\+cpp@{libhomescreen.\+cpp}!A\+PI@{A\+PI}}
150 \index{A\+PI@{A\+PI}!libhomescreen.\+cpp@{libhomescreen.\+cpp}}
151 \subsubsection{\texorpdfstring{A\+PI}{API}}
152 {\footnotesize\ttfamily const char A\+PI\mbox{[}$\,$\mbox{]} = \char`\"{}homescreen\char`\"{}\hspace{0.3cm}{\ttfamily [static]}}
156 Definition at line 36 of file libhomescreen.\+cpp.