RDK Documentation (Open Sourced RDK Components)
LifeCycle.cpp
1
/*
2
* If not stated otherwise in this file or this component's Licenses.txt file the
3
* following copyright and licenses apply:
4
*
5
* Copyright 2018 RDK Management
6
*
7
* Licensed under the Apache License, Version 2.0 (the "License");
8
* you may not use this file except in compliance with the License.
9
* You may obtain a copy of the License at
10
*
11
* http://www.apache.org/licenses/LICENSE-2.0
12
*
13
* Unless required by applicable law or agreed to in writing, software
14
* distributed under the License is distributed on an "AS IS" BASIS,
15
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
* See the License for the specific language governing permissions and
17
* limitations under the License.
18
*/
19
20
#include "LifeCycle.h"
21
22
rtDefineObject (
GraphicsLifeCycle
, rtObject);
23
rtDefineMethod (
GraphicsLifeCycle
, suspend);
24
rtDefineMethod (
GraphicsLifeCycle
, resume);
25
26
GraphicsLifeCycle::GraphicsLifeCycle()
27
{
28
mRtUtils = NULL;
29
memset(&mCb, 0,
sizeof
(mCb));
30
}
31
32
GraphicsLifeCycle::~GraphicsLifeCycle()
33
{
34
mRtUtils = NULL;
35
}
36
37
void
GraphicsLifeCycle::setRtUtils
(
RtUtils
* rtUtils)
38
{
39
mRtUtils = rtUtils;
40
}
41
42
void
GraphicsLifeCycle::setCallbacks
(
const
Callbacks
&cb)
43
{
44
mCb = cb;
45
}
46
47
rtError
GraphicsLifeCycle::suspend
()
48
{
49
if
(mCb.onSuspend) mCb.onSuspend();
50
return
RT_OK;
51
}
52
53
rtError
GraphicsLifeCycle::resume
()
54
{
55
if
(mCb.onResume) mCb.onResume(
""
);
56
return
RT_OK;
57
}
GraphicsLifeCycle::resume
rtError resume()
This API is used to resume the application suspended by the app manager.
Definition:
LifeCycle.cpp:53
RtUtils
Definition:
RtUtils.h:27
GraphicsLifeCycle::Callbacks
Definition:
LifeCycle.h:117
GraphicsLifeCycle::setRtUtils
void setRtUtils(RtUtils *rtUtils)
This initializes the rt object, sets the event listeners and also set the remote ready flag.
Definition:
LifeCycle.cpp:37
GraphicsLifeCycle
Definition:
LifeCycle.h:81
GraphicsLifeCycle::setCallbacks
void setCallbacks(const Callbacks &cb)
Definition:
LifeCycle.cpp:42
GraphicsLifeCycle::suspend
rtError suspend()
Definition:
LifeCycle.cpp:47
components
generic
rne
samples
graphics-lifecycle
LifeCycle.cpp
Generated on Thu Feb 9 2023 06:32:34 for RDK Documentation (Open Sourced RDK Components) by
1.8.17