\hypertarget{group__Ecore__System__Events}{\section{System Events}
\label{group__Ecore__System__Events}\index{System Events@{System Events}}
}


Ecore is aware of some system events that one may be interested, they are described below\+:  


\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
\hypertarget{group__Ecore__System__Events_gad2a7331b5b08ece28020a27076611587}{typedef enum \hyperlink{group__Ecore__System__Events_gaac9bede53dc76753ef06f457297ab028}{\+\_\+\+Ecore\+\_\+\+Memory\+\_\+\+State} {\bfseries Ecore\+\_\+\+Memory\+\_\+\+State}}\label{group__Ecore__System__Events_gad2a7331b5b08ece28020a27076611587}

\item 
\hypertarget{group__Ecore__System__Events_ga424cf0e1fefed4fc2e2986a3b1cc6623}{typedef enum \hyperlink{group__Ecore__System__Events_gab44d4c4dcdcf67c2d95059efbdf75183}{\+\_\+\+Ecore\+\_\+\+Power\+\_\+\+State} {\bfseries Ecore\+\_\+\+Power\+\_\+\+State}}\label{group__Ecore__System__Events_ga424cf0e1fefed4fc2e2986a3b1cc6623}

\end{DoxyCompactItemize}
\subsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum \hyperlink{group__Ecore__System__Events_gaac9bede53dc76753ef06f457297ab028}{\+\_\+\+Ecore\+\_\+\+Memory\+\_\+\+State} \{ \\*
\hyperlink{group__Ecore__System__Events_ggaac9bede53dc76753ef06f457297ab028aeda61ff1a742817967525d460045a2fd}{E\+C\+O\+R\+E\+\_\+\+M\+E\+M\+O\+R\+Y\+\_\+\+S\+T\+A\+T\+E\+\_\+\+N\+O\+R\+M\+A\+L}, 
\\*
\hyperlink{group__Ecore__System__Events_ggaac9bede53dc76753ef06f457297ab028a2466602da2bf2c1e9b9c3bde541ea411}{E\+C\+O\+R\+E\+\_\+\+M\+E\+M\+O\+R\+Y\+\_\+\+S\+T\+A\+T\+E\+\_\+\+L\+O\+W}
 \}
\begin{DoxyCompactList}\small\item\em In dicates current system memory state. \end{DoxyCompactList}\item 
enum \hyperlink{group__Ecore__System__Events_gab44d4c4dcdcf67c2d95059efbdf75183}{\+\_\+\+Ecore\+\_\+\+Power\+\_\+\+State} \{ \\*
\hyperlink{group__Ecore__System__Events_ggab44d4c4dcdcf67c2d95059efbdf75183ae63f453054c0d13fbe26c6b93411152f}{E\+C\+O\+R\+E\+\_\+\+P\+O\+W\+E\+R\+\_\+\+S\+T\+A\+T\+E\+\_\+\+M\+A\+I\+N\+S}, 
\\*
\hyperlink{group__Ecore__System__Events_ggab44d4c4dcdcf67c2d95059efbdf75183a42ecf3daf641f50561ca7bb11d5122e2}{E\+C\+O\+R\+E\+\_\+\+P\+O\+W\+E\+R\+\_\+\+S\+T\+A\+T\+E\+\_\+\+B\+A\+T\+T\+E\+R\+Y}, 
\\*
\hyperlink{group__Ecore__System__Events_ggab44d4c4dcdcf67c2d95059efbdf75183a3e18e34798467b86fecba2fff417e4e6}{E\+C\+O\+R\+E\+\_\+\+P\+O\+W\+E\+R\+\_\+\+S\+T\+A\+T\+E\+\_\+\+L\+O\+W}
 \}
\begin{DoxyCompactList}\small\item\em In dicates current system memory state. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
Ecore\+\_\+\+Memory\+\_\+\+State \hyperlink{group__Ecore__System__Events_gaedb05c29f8d7f347d734c567b8a110f6}{ecore\+\_\+memory\+\_\+state\+\_\+get} (void)
\begin{DoxyCompactList}\small\item\em Get the current status of memory on the system. \end{DoxyCompactList}\item 
void \hyperlink{group__Ecore__System__Events_gad8518e0da15a192d387699857446de77}{ecore\+\_\+memory\+\_\+state\+\_\+set} (Ecore\+\_\+\+Memory\+\_\+\+State state)
\begin{DoxyCompactList}\small\item\em Set the memory state. \end{DoxyCompactList}\item 
Ecore\+\_\+\+Power\+\_\+\+State \hyperlink{group__Ecore__System__Events_ga224a33889b5f3e7496faabe9df7a640e}{ecore\+\_\+power\+\_\+state\+\_\+get} (void)
\begin{DoxyCompactList}\small\item\em Get the current power state. \end{DoxyCompactList}\item 
void \hyperlink{group__Ecore__System__Events_ga5fef957187dc452dfd745df5f8009116}{ecore\+\_\+power\+\_\+state\+\_\+set} (Ecore\+\_\+\+Power\+\_\+\+State state)
\begin{DoxyCompactList}\small\item\em Set the power state. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Ecore is aware of some system events that one may be interested, they are described below\+: 

\begin{DoxyItemize}
\item \hyperlink{group__Ecore__Event__Group_ga95e027b2b9f5817cfa57505cc9990f5a}{E\+C\+O\+R\+E\+\_\+\+E\+V\+E\+N\+T\+\_\+\+M\+E\+M\+O\+R\+Y\+\_\+\+S\+T\+A\+T\+E} indicates system changed its free memory status, going to or being back from \char`\"{}low memory\char`\"{} state. When going to low memory state the libraries and applications may help the system by reducing memory usage, dropping caches and unused resources. The event carries no information, the current state should be queried with ecore\+\_\+low\+\_\+memory\+\_\+get(). \item \hyperlink{group__Ecore__Event__Group_gaf3f2a9900d5e256ab709f7e17ef0e377}{E\+C\+O\+R\+E\+\_\+\+E\+V\+E\+N\+T\+\_\+\+P\+O\+W\+E\+R\+\_\+\+S\+T\+A\+T\+E} indicates system changed its battery level, going to or being back from \char`\"{}low battery\char`\"{} state. When going to low battery state the libraries and applications may help the system by reducing number of wake ups and processing, increasing \hyperlink{group__Ecore__Animator__Group_gaeb096f0da5f8f0fb3e9498a560d3b59c}{Ecore\+\_\+\+Animator} frame time values, reducing the number of \hyperlink{group__Ecore__Timer__Group_gaf96ffb609956658ec038e54bd39f46f0}{Ecore\+\_\+\+Timer} and \hyperlink{group__Ecore__Idle__Group_ga2cc50b0957bf0eaf0c024a7c053fa1dc}{Ecore\+\_\+\+Idler} or even going to extreme of trading quality over speed to finish tasks sooner. The event carries no information, the current state should be queried with ecore\+\_\+low\+\_\+battery\+\_\+get(). \item \hyperlink{group__Ecore__Event__Group_gaa598cc77cba5cbed8ecc617b4b842180}{E\+C\+O\+R\+E\+\_\+\+E\+V\+E\+N\+T\+\_\+\+L\+O\+C\+A\+L\+E\+\_\+\+C\+H\+A\+N\+G\+E\+D} indicates the system locale and/or language changed. This event carries no information and there is no ecore specific call to get the new locale. It is advised that the emitter of this event to set the new locale, for instance in P\+O\+S\+I\+X one should call setlocale() before adding the event. Libraries and applications should then reload their resources and reformat their strings to use the new values. \item \hyperlink{group__Ecore__Event__Group_ga55026160dc580bf7f9df3584cb28a403}{E\+C\+O\+R\+E\+\_\+\+E\+V\+E\+N\+T\+\_\+\+H\+O\+S\+T\+N\+A\+M\+E\+\_\+\+C\+H\+A\+N\+G\+E\+D} indicates the system hostname changed. This event carries no information and the new value should be queried with platform specific calls, such as gethostname() on P\+O\+S\+I\+X. \item \hyperlink{group__Ecore__Event__Group_ga040ac4c1a598c01996403da7a8c6fd4b}{E\+C\+O\+R\+E\+\_\+\+E\+V\+E\+N\+T\+\_\+\+S\+Y\+S\+T\+E\+M\+\_\+\+T\+I\+M\+E\+D\+A\+T\+E\+\_\+\+C\+H\+A\+N\+G\+E\+D} indicates the system time or date changed. This may happen as result of Daylight Saving changes, N\+T\+P fixing the clock, changing timezones or user setting a new date manually. This event carries no information and the new value should be queried with \hyperlink{group__Ecore__Time__Group_ga0b8030aa39eb3701b6b30816ee9c45df}{ecore\+\_\+time\+\_\+unix\+\_\+get()} or platform specific such as gettimeofday() \end{DoxyItemize}


\subsection{Enumeration Type Documentation}
\hypertarget{group__Ecore__System__Events_gaac9bede53dc76753ef06f457297ab028}{\index{System Events@{System Events}!\+\_\+\+Ecore\+\_\+\+Memory\+\_\+\+State@{\+\_\+\+Ecore\+\_\+\+Memory\+\_\+\+State}}
\index{\+\_\+\+Ecore\+\_\+\+Memory\+\_\+\+State@{\+\_\+\+Ecore\+\_\+\+Memory\+\_\+\+State}!System Events@{System Events}}
\subsubsection[{\+\_\+\+Ecore\+\_\+\+Memory\+\_\+\+State}]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf \+\_\+\+Ecore\+\_\+\+Memory\+\_\+\+State}}}\label{group__Ecore__System__Events_gaac9bede53dc76753ef06f457297ab028}


In dicates current system memory state. 

\begin{DoxySince}{Since}
1.\+8 
\end{DoxySince}
\begin{Desc}
\item[Enumerator]\par
\begin{description}
\index{E\+C\+O\+R\+E\+\_\+\+M\+E\+M\+O\+R\+Y\+\_\+\+S\+T\+A\+T\+E\+\_\+\+N\+O\+R\+M\+A\+L@{E\+C\+O\+R\+E\+\_\+\+M\+E\+M\+O\+R\+Y\+\_\+\+S\+T\+A\+T\+E\+\_\+\+N\+O\+R\+M\+A\+L}!System Events@{System Events}}\index{System Events@{System Events}!E\+C\+O\+R\+E\+\_\+\+M\+E\+M\+O\+R\+Y\+\_\+\+S\+T\+A\+T\+E\+\_\+\+N\+O\+R\+M\+A\+L@{E\+C\+O\+R\+E\+\_\+\+M\+E\+M\+O\+R\+Y\+\_\+\+S\+T\+A\+T\+E\+\_\+\+N\+O\+R\+M\+A\+L}}\item[{\em 
\hypertarget{group__Ecore__System__Events_ggaac9bede53dc76753ef06f457297ab028aeda61ff1a742817967525d460045a2fd}{E\+C\+O\+R\+E\+\_\+\+M\+E\+M\+O\+R\+Y\+\_\+\+S\+T\+A\+T\+E\+\_\+\+N\+O\+R\+M\+A\+L}\label{group__Ecore__System__Events_ggaac9bede53dc76753ef06f457297ab028aeda61ff1a742817967525d460045a2fd}
}]The normal memory usage state. No need to do anything special here -\/ operation as normal. \index{E\+C\+O\+R\+E\+\_\+\+M\+E\+M\+O\+R\+Y\+\_\+\+S\+T\+A\+T\+E\+\_\+\+L\+O\+W@{E\+C\+O\+R\+E\+\_\+\+M\+E\+M\+O\+R\+Y\+\_\+\+S\+T\+A\+T\+E\+\_\+\+L\+O\+W}!System Events@{System Events}}\index{System Events@{System Events}!E\+C\+O\+R\+E\+\_\+\+M\+E\+M\+O\+R\+Y\+\_\+\+S\+T\+A\+T\+E\+\_\+\+L\+O\+W@{E\+C\+O\+R\+E\+\_\+\+M\+E\+M\+O\+R\+Y\+\_\+\+S\+T\+A\+T\+E\+\_\+\+L\+O\+W}}\item[{\em 
\hypertarget{group__Ecore__System__Events_ggaac9bede53dc76753ef06f457297ab028a2466602da2bf2c1e9b9c3bde541ea411}{E\+C\+O\+R\+E\+\_\+\+M\+E\+M\+O\+R\+Y\+\_\+\+S\+T\+A\+T\+E\+\_\+\+L\+O\+W}\label{group__Ecore__System__Events_ggaac9bede53dc76753ef06f457297ab028a2466602da2bf2c1e9b9c3bde541ea411}
}]The system is low on memory resources. This would indicate that it may be a good idea to free memory you don't need and minimize footprint to avoid general system problems. \end{description}
\end{Desc}
\hypertarget{group__Ecore__System__Events_gab44d4c4dcdcf67c2d95059efbdf75183}{\index{System Events@{System Events}!\+\_\+\+Ecore\+\_\+\+Power\+\_\+\+State@{\+\_\+\+Ecore\+\_\+\+Power\+\_\+\+State}}
\index{\+\_\+\+Ecore\+\_\+\+Power\+\_\+\+State@{\+\_\+\+Ecore\+\_\+\+Power\+\_\+\+State}!System Events@{System Events}}
\subsubsection[{\+\_\+\+Ecore\+\_\+\+Power\+\_\+\+State}]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf \+\_\+\+Ecore\+\_\+\+Power\+\_\+\+State}}}\label{group__Ecore__System__Events_gab44d4c4dcdcf67c2d95059efbdf75183}


In dicates current system memory state. 

\begin{DoxySince}{Since}
1.\+8 
\end{DoxySince}
\begin{Desc}
\item[Enumerator]\par
\begin{description}
\index{E\+C\+O\+R\+E\+\_\+\+P\+O\+W\+E\+R\+\_\+\+S\+T\+A\+T\+E\+\_\+\+M\+A\+I\+N\+S@{E\+C\+O\+R\+E\+\_\+\+P\+O\+W\+E\+R\+\_\+\+S\+T\+A\+T\+E\+\_\+\+M\+A\+I\+N\+S}!System Events@{System Events}}\index{System Events@{System Events}!E\+C\+O\+R\+E\+\_\+\+P\+O\+W\+E\+R\+\_\+\+S\+T\+A\+T\+E\+\_\+\+M\+A\+I\+N\+S@{E\+C\+O\+R\+E\+\_\+\+P\+O\+W\+E\+R\+\_\+\+S\+T\+A\+T\+E\+\_\+\+M\+A\+I\+N\+S}}\item[{\em 
\hypertarget{group__Ecore__System__Events_ggab44d4c4dcdcf67c2d95059efbdf75183ae63f453054c0d13fbe26c6b93411152f}{E\+C\+O\+R\+E\+\_\+\+P\+O\+W\+E\+R\+\_\+\+S\+T\+A\+T\+E\+\_\+\+M\+A\+I\+N\+S}\label{group__Ecore__System__Events_ggab44d4c4dcdcf67c2d95059efbdf75183ae63f453054c0d13fbe26c6b93411152f}
}]The system is connected to a mains supply of power, thus there is no need to limit processing to save battery life at all. \index{E\+C\+O\+R\+E\+\_\+\+P\+O\+W\+E\+R\+\_\+\+S\+T\+A\+T\+E\+\_\+\+B\+A\+T\+T\+E\+R\+Y@{E\+C\+O\+R\+E\+\_\+\+P\+O\+W\+E\+R\+\_\+\+S\+T\+A\+T\+E\+\_\+\+B\+A\+T\+T\+E\+R\+Y}!System Events@{System Events}}\index{System Events@{System Events}!E\+C\+O\+R\+E\+\_\+\+P\+O\+W\+E\+R\+\_\+\+S\+T\+A\+T\+E\+\_\+\+B\+A\+T\+T\+E\+R\+Y@{E\+C\+O\+R\+E\+\_\+\+P\+O\+W\+E\+R\+\_\+\+S\+T\+A\+T\+E\+\_\+\+B\+A\+T\+T\+E\+R\+Y}}\item[{\em 
\hypertarget{group__Ecore__System__Events_ggab44d4c4dcdcf67c2d95059efbdf75183a42ecf3daf641f50561ca7bb11d5122e2}{E\+C\+O\+R\+E\+\_\+\+P\+O\+W\+E\+R\+\_\+\+S\+T\+A\+T\+E\+\_\+\+B\+A\+T\+T\+E\+R\+Y}\label{group__Ecore__System__Events_ggab44d4c4dcdcf67c2d95059efbdf75183a42ecf3daf641f50561ca7bb11d5122e2}
}]The system is running off battery power, but is otherwise running normally. \index{E\+C\+O\+R\+E\+\_\+\+P\+O\+W\+E\+R\+\_\+\+S\+T\+A\+T\+E\+\_\+\+L\+O\+W@{E\+C\+O\+R\+E\+\_\+\+P\+O\+W\+E\+R\+\_\+\+S\+T\+A\+T\+E\+\_\+\+L\+O\+W}!System Events@{System Events}}\index{System Events@{System Events}!E\+C\+O\+R\+E\+\_\+\+P\+O\+W\+E\+R\+\_\+\+S\+T\+A\+T\+E\+\_\+\+L\+O\+W@{E\+C\+O\+R\+E\+\_\+\+P\+O\+W\+E\+R\+\_\+\+S\+T\+A\+T\+E\+\_\+\+L\+O\+W}}\item[{\em 
\hypertarget{group__Ecore__System__Events_ggab44d4c4dcdcf67c2d95059efbdf75183a3e18e34798467b86fecba2fff417e4e6}{E\+C\+O\+R\+E\+\_\+\+P\+O\+W\+E\+R\+\_\+\+S\+T\+A\+T\+E\+\_\+\+L\+O\+W}\label{group__Ecore__System__Events_ggab44d4c4dcdcf67c2d95059efbdf75183a3e18e34798467b86fecba2fff417e4e6}
}]The system is low on power (on battery) and the process should do its best to conserve power. For example it may reduce or suspend polling of network resources, turn off animations or reduce framerate etc. \end{description}
\end{Desc}


\subsection{Function Documentation}
\hypertarget{group__Ecore__System__Events_gaedb05c29f8d7f347d734c567b8a110f6}{\index{System Events@{System Events}!ecore\+\_\+memory\+\_\+state\+\_\+get@{ecore\+\_\+memory\+\_\+state\+\_\+get}}
\index{ecore\+\_\+memory\+\_\+state\+\_\+get@{ecore\+\_\+memory\+\_\+state\+\_\+get}!System Events@{System Events}}
\subsubsection[{ecore\+\_\+memory\+\_\+state\+\_\+get}]{\setlength{\rightskip}{0pt plus 5cm}Ecore\+\_\+\+Memory\+\_\+\+State ecore\+\_\+memory\+\_\+state\+\_\+get (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}\label{group__Ecore__System__Events_gaedb05c29f8d7f347d734c567b8a110f6}


Get the current status of memory on the system. 

\begin{DoxyReturn}{Returns}
The current memory state for the system as a whole. 
\end{DoxyReturn}
\begin{DoxySince}{Since}
1.\+8 
\end{DoxySince}
\hypertarget{group__Ecore__System__Events_gad8518e0da15a192d387699857446de77}{\index{System Events@{System Events}!ecore\+\_\+memory\+\_\+state\+\_\+set@{ecore\+\_\+memory\+\_\+state\+\_\+set}}
\index{ecore\+\_\+memory\+\_\+state\+\_\+set@{ecore\+\_\+memory\+\_\+state\+\_\+set}!System Events@{System Events}}
\subsubsection[{ecore\+\_\+memory\+\_\+state\+\_\+set}]{\setlength{\rightskip}{0pt plus 5cm}void ecore\+\_\+memory\+\_\+state\+\_\+set (
\begin{DoxyParamCaption}
\item[{Ecore\+\_\+\+Memory\+\_\+\+State}]{state}
\end{DoxyParamCaption}
)}}\label{group__Ecore__System__Events_gad8518e0da15a192d387699857446de77}


Set the memory state. 


\begin{DoxyParams}{Parameters}
{\em state} & The memory state to set.\\
\hline
\end{DoxyParams}
This function will store information about the current memory state and if it changed will automatically create an \hyperlink{group__Ecore__Event__Group_ga95e027b2b9f5817cfa57505cc9990f5a}{E\+C\+O\+R\+E\+\_\+\+E\+V\+E\+N\+T\+\_\+\+M\+E\+M\+O\+R\+Y\+\_\+\+S\+T\+A\+T\+E} event.

\begin{DoxyNote}{Note}
This function should not be called by user, instead a monitoring entity that is system dependent. Usually an ecore module that is platform-\/specific.
\end{DoxyNote}
\begin{DoxySince}{Since}
1.\+8 
\end{DoxySince}


References ecore\+\_\+event\+\_\+add(), and E\+C\+O\+R\+E\+\_\+\+E\+V\+E\+N\+T\+\_\+\+M\+E\+M\+O\+R\+Y\+\_\+\+S\+T\+A\+T\+E.

\hypertarget{group__Ecore__System__Events_ga224a33889b5f3e7496faabe9df7a640e}{\index{System Events@{System Events}!ecore\+\_\+power\+\_\+state\+\_\+get@{ecore\+\_\+power\+\_\+state\+\_\+get}}
\index{ecore\+\_\+power\+\_\+state\+\_\+get@{ecore\+\_\+power\+\_\+state\+\_\+get}!System Events@{System Events}}
\subsubsection[{ecore\+\_\+power\+\_\+state\+\_\+get}]{\setlength{\rightskip}{0pt plus 5cm}Ecore\+\_\+\+Power\+\_\+\+State ecore\+\_\+power\+\_\+state\+\_\+get (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}\label{group__Ecore__System__Events_ga224a33889b5f3e7496faabe9df7a640e}


Get the current power state. 

\begin{DoxyReturn}{Returns}
The current power state for the system. 
\end{DoxyReturn}
\begin{DoxySince}{Since}
1.\+8 
\end{DoxySince}
\hypertarget{group__Ecore__System__Events_ga5fef957187dc452dfd745df5f8009116}{\index{System Events@{System Events}!ecore\+\_\+power\+\_\+state\+\_\+set@{ecore\+\_\+power\+\_\+state\+\_\+set}}
\index{ecore\+\_\+power\+\_\+state\+\_\+set@{ecore\+\_\+power\+\_\+state\+\_\+set}!System Events@{System Events}}
\subsubsection[{ecore\+\_\+power\+\_\+state\+\_\+set}]{\setlength{\rightskip}{0pt plus 5cm}void ecore\+\_\+power\+\_\+state\+\_\+set (
\begin{DoxyParamCaption}
\item[{Ecore\+\_\+\+Power\+\_\+\+State}]{state}
\end{DoxyParamCaption}
)}}\label{group__Ecore__System__Events_ga5fef957187dc452dfd745df5f8009116}


Set the power state. 


\begin{DoxyParams}{Parameters}
{\em state} & The power state to set.\\
\hline
\end{DoxyParams}
This function will store information about the current power state and if it changed will automatically create an \hyperlink{group__Ecore__Event__Group_gaf3f2a9900d5e256ab709f7e17ef0e377}{E\+C\+O\+R\+E\+\_\+\+E\+V\+E\+N\+T\+\_\+\+P\+O\+W\+E\+R\+\_\+\+S\+T\+A\+T\+E} event.

\begin{DoxyNote}{Note}
This function should not be called by user, instead a monitoring entity that is system dependent. Usually an ecore module that is platform-\/specific.
\end{DoxyNote}
\begin{DoxySince}{Since}
1.\+8 
\end{DoxySince}


References ecore\+\_\+event\+\_\+add(), and E\+C\+O\+R\+E\+\_\+\+E\+V\+E\+N\+T\+\_\+\+P\+O\+W\+E\+R\+\_\+\+S\+T\+A\+T\+E.

