RDK Documentation (Open Sourced RDK Components)
Graphics-lifecycle

Description

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
 

Data Structure Documentation

◆ GraphicsLifeCycle

class GraphicsLifeCycle

Definition at line 81 of file LifeCycle.h.

Inheritance diagram for GraphicsLifeCycle:
Inheritance graph
Collaboration diagram for GraphicsLifeCycle:
Collaboration graph

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

RtUtilsmRtUtils
 
Callbacks mCb
 

Member Function Documentation

◆ suspend()

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.

◆ resume()

rtError GraphicsLifeCycle::resume ( )

This API is used to resume the application suspended by the app manager.

Returns
Returns RT_OK on success, appropriate error code otherwise.

Definition at line 53 of file LifeCycle.cpp.

◆ setRtUtils()

void GraphicsLifeCycle::setRtUtils ( RtUtils rtUtils)

This initializes the rt object, sets the event listeners and also set the remote ready flag.

Parameters
[in]rtUtilsrt object.
Returns
Returns RMF_SUCCESS on success, appropriate error code otherwise.

Definition at line 37 of file LifeCycle.cpp.

◆ setCallbacks()

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.