RDK Documentation (Open Sourced RDK Components)
|
Graphics-lifecycle sample app extends the rne-triangle sample app to support rt and suspend/resume. The following key features are demonstrated:
Data Structures | |
class | GraphicsLifeCycle |
class GraphicsLifeCycle |
Definition at line 81 of file LifeCycle.h.
Public Member Functions | |
rtDeclareObject (GraphicsLifeCycle, rtObject) | |
rtMethodNoArgAndNoReturn ("suspend", suspend) | |
rtMethodNoArgAndNoReturn ("resume", resume) | |
rtError | suspend () |
rtError | resume () |
This API is used to resume the application suspended by the app manager. More... | |
void | setRtUtils (RtUtils *rtUtils) |
This initializes the rt object, sets the event listeners and also set the remote ready flag. More... | |
void | setCallbacks (const Callbacks &cb) |
Private Attributes | |
RtUtils * | mRtUtils |
Callbacks | mCb |
rtError GraphicsLifeCycle::suspend | ( | ) |
@brief This API is called by the app manager to suspend the currently running application.
Apps when suspended should free all graphics and AV resources. Uses minimal CPU and RAM while running in the background. The app manager invokes suspend call from the app through rt.
@return Returns RT_OK on success, appropriate error code otherwise.
Definition at line 47 of file LifeCycle.cpp.
rtError GraphicsLifeCycle::resume | ( | ) |
This API is used to resume the application suspended by the app manager.
Definition at line 53 of file LifeCycle.cpp.
void GraphicsLifeCycle::setRtUtils | ( | RtUtils * | rtUtils | ) |
This initializes the rt object, sets the event listeners and also set the remote ready flag.
[in] | rtUtils | rt object. |
Definition at line 37 of file LifeCycle.cpp.
void GraphicsLifeCycle::setCallbacks | ( | const Callbacks & | cb | ) |
@brief This API sets the callback functions.
Apps should support a suspend and resume option if needed so they can start quickly and stay running in the background.
@param[in] cb Callback functions to set. @return Returns RMF_SUCCESS on success, appropiate error code otherwise.
Definition at line 42 of file LifeCycle.cpp.