\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 
typedef enum \hyperlink{group__Ecore__System__Events_gaac9bede53dc76753ef06f457297ab028}{\+\_\+\+Ecore\+\_\+\+Memory\+\_\+\+State} {\bfseries Ecore\+\_\+\+Memory\+\_\+\+State}\hypertarget{group__Ecore__System__Events_gad2a7331b5b08ece28020a27076611587}{}\label{group__Ecore__System__Events_gad2a7331b5b08ece28020a27076611587}

\item 
typedef enum \hyperlink{group__Ecore__System__Events_gab44d4c4dcdcf67c2d95059efbdf75183}{\+\_\+\+Ecore\+\_\+\+Power\+\_\+\+State} {\bfseries Ecore\+\_\+\+Power\+\_\+\+State}\hypertarget{group__Ecore__System__Events_ga424cf0e1fefed4fc2e2986a3b1cc6623}{}\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\+AL}, 
\\*
\hyperlink{group__Ecore__System__Events_ggaac9bede53dc76753ef06f457297ab028a2466602da2bf2c1e9b9c3bde541ea411}{E\+C\+O\+R\+E\+\_\+\+M\+E\+M\+O\+R\+Y\+\_\+\+S\+T\+A\+T\+E\+\_\+\+L\+OW}
 \}\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\+NS}, 
\\*
\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\+RY}, 
\\*
\hyperlink{group__Ecore__System__Events_ggab44d4c4dcdcf67c2d95059efbdf75183a3e18e34798467b86fecba2fff417e4e6}{E\+C\+O\+R\+E\+\_\+\+P\+O\+W\+E\+R\+\_\+\+S\+T\+A\+T\+E\+\_\+\+L\+OW}
 \}\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\+TE} 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\+TE} 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\+ED} 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\+IX 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\+ED} 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\+IX. \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\+ED} indicates the system time or date changed. This may happen as result of Daylight Saving changes, N\+TP 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}
\index{System Events@{System Events}!\+\_\+\+Ecore\+\_\+\+Memory\+\_\+\+State@{\+\_\+\+Ecore\+\_\+\+Memory\+\_\+\+State}}
\index{\+\_\+\+Ecore\+\_\+\+Memory\+\_\+\+State@{\+\_\+\+Ecore\+\_\+\+Memory\+\_\+\+State}!System Events@{System Events}}
\subsubsection[{\texorpdfstring{\+\_\+\+Ecore\+\_\+\+Memory\+\_\+\+State}{_Ecore_Memory_State}}]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf \+\_\+\+Ecore\+\_\+\+Memory\+\_\+\+State}}\hypertarget{group__Ecore__System__Events_gaac9bede53dc76753ef06f457297ab028}{}\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\+AL@{E\+C\+O\+R\+E\+\_\+\+M\+E\+M\+O\+R\+Y\+\_\+\+S\+T\+A\+T\+E\+\_\+\+N\+O\+R\+M\+AL}!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\+AL@{E\+C\+O\+R\+E\+\_\+\+M\+E\+M\+O\+R\+Y\+\_\+\+S\+T\+A\+T\+E\+\_\+\+N\+O\+R\+M\+AL}}\item[{\em 
E\+C\+O\+R\+E\+\_\+\+M\+E\+M\+O\+R\+Y\+\_\+\+S\+T\+A\+T\+E\+\_\+\+N\+O\+R\+M\+AL\hypertarget{group__Ecore__System__Events_ggaac9bede53dc76753ef06f457297ab028aeda61ff1a742817967525d460045a2fd}{}\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\+OW@{E\+C\+O\+R\+E\+\_\+\+M\+E\+M\+O\+R\+Y\+\_\+\+S\+T\+A\+T\+E\+\_\+\+L\+OW}!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\+OW@{E\+C\+O\+R\+E\+\_\+\+M\+E\+M\+O\+R\+Y\+\_\+\+S\+T\+A\+T\+E\+\_\+\+L\+OW}}\item[{\em 
E\+C\+O\+R\+E\+\_\+\+M\+E\+M\+O\+R\+Y\+\_\+\+S\+T\+A\+T\+E\+\_\+\+L\+OW\hypertarget{group__Ecore__System__Events_ggaac9bede53dc76753ef06f457297ab028a2466602da2bf2c1e9b9c3bde541ea411}{}\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\textquotesingle{}t need and minimize footprint to avoid general system problems. \end{description}
\end{Desc}
\index{System Events@{System Events}!\+\_\+\+Ecore\+\_\+\+Power\+\_\+\+State@{\+\_\+\+Ecore\+\_\+\+Power\+\_\+\+State}}
\index{\+\_\+\+Ecore\+\_\+\+Power\+\_\+\+State@{\+\_\+\+Ecore\+\_\+\+Power\+\_\+\+State}!System Events@{System Events}}
\subsubsection[{\texorpdfstring{\+\_\+\+Ecore\+\_\+\+Power\+\_\+\+State}{_Ecore_Power_State}}]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf \+\_\+\+Ecore\+\_\+\+Power\+\_\+\+State}}\hypertarget{group__Ecore__System__Events_gab44d4c4dcdcf67c2d95059efbdf75183}{}\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\+NS@{E\+C\+O\+R\+E\+\_\+\+P\+O\+W\+E\+R\+\_\+\+S\+T\+A\+T\+E\+\_\+\+M\+A\+I\+NS}!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\+NS@{E\+C\+O\+R\+E\+\_\+\+P\+O\+W\+E\+R\+\_\+\+S\+T\+A\+T\+E\+\_\+\+M\+A\+I\+NS}}\item[{\em 
E\+C\+O\+R\+E\+\_\+\+P\+O\+W\+E\+R\+\_\+\+S\+T\+A\+T\+E\+\_\+\+M\+A\+I\+NS\hypertarget{group__Ecore__System__Events_ggab44d4c4dcdcf67c2d95059efbdf75183ae63f453054c0d13fbe26c6b93411152f}{}\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\+RY@{E\+C\+O\+R\+E\+\_\+\+P\+O\+W\+E\+R\+\_\+\+S\+T\+A\+T\+E\+\_\+\+B\+A\+T\+T\+E\+RY}!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\+RY@{E\+C\+O\+R\+E\+\_\+\+P\+O\+W\+E\+R\+\_\+\+S\+T\+A\+T\+E\+\_\+\+B\+A\+T\+T\+E\+RY}}\item[{\em 
E\+C\+O\+R\+E\+\_\+\+P\+O\+W\+E\+R\+\_\+\+S\+T\+A\+T\+E\+\_\+\+B\+A\+T\+T\+E\+RY\hypertarget{group__Ecore__System__Events_ggab44d4c4dcdcf67c2d95059efbdf75183a42ecf3daf641f50561ca7bb11d5122e2}{}\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\+OW@{E\+C\+O\+R\+E\+\_\+\+P\+O\+W\+E\+R\+\_\+\+S\+T\+A\+T\+E\+\_\+\+L\+OW}!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\+OW@{E\+C\+O\+R\+E\+\_\+\+P\+O\+W\+E\+R\+\_\+\+S\+T\+A\+T\+E\+\_\+\+L\+OW}}\item[{\em 
E\+C\+O\+R\+E\+\_\+\+P\+O\+W\+E\+R\+\_\+\+S\+T\+A\+T\+E\+\_\+\+L\+OW\hypertarget{group__Ecore__System__Events_ggab44d4c4dcdcf67c2d95059efbdf75183a3e18e34798467b86fecba2fff417e4e6}{}\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}
\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[{\texorpdfstring{ecore\+\_\+memory\+\_\+state\+\_\+get(void)}{ecore_memory_state_get(void)}}]{\setlength{\rightskip}{0pt plus 5cm}Ecore\+\_\+\+Memory\+\_\+\+State ecore\+\_\+memory\+\_\+state\+\_\+get (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\hypertarget{group__Ecore__System__Events_gaedb05c29f8d7f347d734c567b8a110f6}{}\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}
\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[{\texorpdfstring{ecore\+\_\+memory\+\_\+state\+\_\+set(\+Ecore\+\_\+\+Memory\+\_\+\+State state)}{ecore_memory_state_set(Ecore_Memory_State state)}}]{\setlength{\rightskip}{0pt plus 5cm}void ecore\+\_\+memory\+\_\+state\+\_\+set (
\begin{DoxyParamCaption}
\item[{Ecore\+\_\+\+Memory\+\_\+\+State}]{state}
\end{DoxyParamCaption}
)}\hypertarget{group__Ecore__System__Events_gad8518e0da15a192d387699857446de77}{}\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\+TE} 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\+TE.

\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[{\texorpdfstring{ecore\+\_\+power\+\_\+state\+\_\+get(void)}{ecore_power_state_get(void)}}]{\setlength{\rightskip}{0pt plus 5cm}Ecore\+\_\+\+Power\+\_\+\+State ecore\+\_\+power\+\_\+state\+\_\+get (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\hypertarget{group__Ecore__System__Events_ga224a33889b5f3e7496faabe9df7a640e}{}\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}
\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[{\texorpdfstring{ecore\+\_\+power\+\_\+state\+\_\+set(\+Ecore\+\_\+\+Power\+\_\+\+State state)}{ecore_power_state_set(Ecore_Power_State state)}}]{\setlength{\rightskip}{0pt plus 5cm}void ecore\+\_\+power\+\_\+state\+\_\+set (
\begin{DoxyParamCaption}
\item[{Ecore\+\_\+\+Power\+\_\+\+State}]{state}
\end{DoxyParamCaption}
)}\hypertarget{group__Ecore__System__Events_ga5fef957187dc452dfd745df5f8009116}{}\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\+TE} 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\+TE.

