From 298221ea5622c6a5a08d06e064eeee67adca8aca Mon Sep 17 00:00:00 2001 From: Adrian Muzyka Date: Tue, 31 Oct 2023 09:31:25 +0100 Subject: [PATCH] RDK-43052: RDKShell: change namings to 'hibernate' from 'checkpoint' --- RDKShell/RDKShell.cpp | 28 ++++++++++++++-------------- RDKShell/RDKShell.h | 6 +++--- RDKShell/RDKShell.json | 14 +++++++------- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/RDKShell/RDKShell.cpp b/RDKShell/RDKShell.cpp index d65a305c8c..9654f3e101 100755 --- a/RDKShell/RDKShell.cpp +++ b/RDKShell/RDKShell.cpp @@ -142,7 +142,7 @@ const string WPEFramework::Plugin::RDKShell::RDKSHELL_METHOD_KEY_REPEAT_CONFIG = const string WPEFramework::Plugin::RDKShell::RDKSHELL_METHOD_GET_GRAPHICS_FRAME_RATE = "getGraphicsFrameRate"; const string WPEFramework::Plugin::RDKShell::RDKSHELL_METHOD_SET_GRAPHICS_FRAME_RATE = "setGraphicsFrameRate"; #ifdef HIBERNATE_SUPPORT_ENABLED -const string WPEFramework::Plugin::RDKShell::RDKSHELL_METHOD_CHECKPOINT = "checkpoint"; +const string WPEFramework::Plugin::RDKShell::RDKSHELL_METHOD_HIBERNATE = "hibernate"; const string WPEFramework::Plugin::RDKShell::RDKSHELL_METHOD_RESTORE = "restore"; #endif @@ -167,7 +167,7 @@ const string WPEFramework::Plugin::RDKShell::RDKSHELL_EVENT_ON_EASTER_EGG = "onE const string WPEFramework::Plugin::RDKShell::RDKSHELL_EVENT_ON_WILL_DESTROY = "onWillDestroy"; const string WPEFramework::Plugin::RDKShell::RDKSHELL_EVENT_ON_SCREENSHOT_COMPLETE = "onScreenshotComplete"; #ifdef HIBERNATE_SUPPORT_ENABLED -const string WPEFramework::Plugin::RDKShell::RDKSHELL_EVENT_ON_CHECKPOINTED = "onCheckpointed"; +const string WPEFramework::Plugin::RDKShell::RDKSHELL_EVENT_ON_HIBERNATED = "onHibernated"; const string WPEFramework::Plugin::RDKShell::RDKSHELL_EVENT_ON_RESTORED = "onRestored"; #endif @@ -627,14 +627,14 @@ namespace WPEFramework { && nativeAppWasResumed.find(mCallSign) != nativeAppWasResumed.end() && nativeAppWasResumed[mCallSign]) { - // call RDKShell.checkpoint + // call RDKShell.hibernate std::thread requestsThread = std::thread([=]() { - JsonObject checkpointParams; - JsonObject checkpointResponse; - checkpointParams["callsign"] = mCallSign; - mRDKShell.getThunderControllerClient("org.rdk.RDKShell.1")->Invoke(0, "checkpoint", checkpointParams, checkpointResponse); }); + JsonObject hibernateParams; + JsonObject hibernatetResponse; + hibernateParams["callsign"] = mCallSign; + mRDKShell.getThunderControllerClient("org.rdk.RDKShell.1")->Invoke(0, "hibernate", hibernateParams, hibernatetResponse); }); requestsThread.detach(); } @@ -1432,7 +1432,7 @@ namespace WPEFramework { Register(RDKSHELL_METHOD_SET_AV_BLOCKED, &RDKShell::setAVBlockedWrapper, this); Register(RDKSHELL_METHOD_GET_AV_BLOCKED_APPS, &RDKShell::getBlockedAVApplicationsWrapper, this); #ifdef HIBERNATE_SUPPORT_ENABLED - Register(RDKSHELL_METHOD_CHECKPOINT, &RDKShell::checkpointWrapper, this); + Register(RDKSHELL_METHOD_HIBERNATE, &RDKShell::hibernateWrapper, this); Register(RDKSHELL_METHOD_RESTORE, &RDKShell::restoreWrapper, this); #endif m_timer.connect(std::bind(&RDKShell::onTimer, this)); @@ -6231,7 +6231,7 @@ namespace WPEFramework { } #ifdef HIBERNATE_SUPPORT_ENABLED - uint32_t RDKShell::checkpointWrapper(const JsonObject& parameters, JsonObject& response) + uint32_t RDKShell::hibernateWrapper(const JsonObject& parameters, JsonObject& response) { LOGINFOMETHOD(); bool status = false; @@ -6253,9 +6253,9 @@ namespace WPEFramework { if (isApplicationBeingDestroyed) { - std::cout << "ignoring checkpoint for " << callsign << " as it is being destroyed " << std::endl; + std::cout << "ignoring hibernate for " << callsign << " as it is being destroyed " << std::endl; status = false; - response["message"] = "failed to checkpoint application, is being destroyed"; + response["message"] = "failed to hibernate application, is being destroyed"; returnResponse(status); } @@ -6269,9 +6269,9 @@ namespace WPEFramework { stateStatus = thunderPlugin->Get(RDKSHELL_THUNDER_TIMEOUT, "state", stateString); if(stateStatus || stateString != "suspended") { - std::cout << "ignoring checkpoint for " << callsign << " as it is not suspended " << std::endl; + std::cout << "ignoring hibenrate for " << callsign << " as it is not suspended " << std::endl; status = false; - response["message"] = "failed to checkpoint native application, not suspended"; + response["message"] = "failed to hibernate native application, not suspended"; returnResponse(status); } } @@ -6301,7 +6301,7 @@ namespace WPEFramework { { eventMsg["success"] = true; } - notify(RDKShell::RDKSHELL_EVENT_ON_CHECKPOINTED, eventMsg); + notify(RDKShell::RDKSHELL_EVENT_ON_HIBERNATED, eventMsg); }); requestsThread.detach(); status = true; diff --git a/RDKShell/RDKShell.h b/RDKShell/RDKShell.h index fe6b2bb609..9427229c02 100755 --- a/RDKShell/RDKShell.h +++ b/RDKShell/RDKShell.h @@ -146,7 +146,7 @@ namespace WPEFramework { static const string RDKSHELL_METHOD_GET_GRAPHICS_FRAME_RATE; static const string RDKSHELL_METHOD_SET_GRAPHICS_FRAME_RATE; #ifdef HIBERNATE_SUPPORT_ENABLED - static const string RDKSHELL_METHOD_CHECKPOINT; + static const string RDKSHELL_METHOD_HIBERNATE; static const string RDKSHELL_METHOD_RESTORE; #endif @@ -172,7 +172,7 @@ namespace WPEFramework { static const string RDKSHELL_EVENT_ON_WILL_DESTROY; static const string RDKSHELL_EVENT_ON_SCREENSHOT_COMPLETE; #ifdef HIBERNATE_SUPPORT_ENABLED - static const string RDKSHELL_EVENT_ON_CHECKPOINTED; + static const string RDKSHELL_EVENT_ON_HIBERNATED; static const string RDKSHELL_EVENT_ON_RESTORED; #endif @@ -270,7 +270,7 @@ namespace WPEFramework { uint32_t getGraphicsFrameRateWrapper(const JsonObject& parameters, JsonObject& response); uint32_t setGraphicsFrameRateWrapper(const JsonObject& parameters, JsonObject& response); #ifdef HIBERNATE_SUPPORT_ENABLED - uint32_t checkpointWrapper(const JsonObject& parameters, JsonObject& response); + uint32_t hibernateWrapper(const JsonObject& parameters, JsonObject& response); uint32_t restoreWrapper(const JsonObject& parameters, JsonObject& response); #endif diff --git a/RDKShell/RDKShell.json b/RDKShell/RDKShell.json index 53f19fc5a2..dc17d61ed3 100755 --- a/RDKShell/RDKShell.json +++ b/RDKShell/RDKShell.json @@ -2233,10 +2233,10 @@ ] } }, - "checkpoint": { - "summary": "Checkpoint an application.", + "hibernate": { + "summary": "Hibernate an application.", "events": { - "onCheckpointed" : "Triggers when an application is checkpointed" + "onHibernated" : "Triggers when an application is hibernated" }, "params": { "type": "object", @@ -2245,12 +2245,12 @@ "$ref": "#/definitions/callsign" }, "timeout": { - "summary": "Timeout in ms for checkpoint procedure", + "summary": "Timeout in ms for hibernate procedure", "type": "number", "example": 10000 }, "procsequence": { - "summary": "Checkpoint sequence of application processes", + "summary": "Hibernate sequence of application processes", "type": "array", "items": { "type": "string", @@ -2599,8 +2599,8 @@ ] } }, - "onCheckpointed":{ - "summary": "Triggers when an application is checkpointed.", + "onHibernated":{ + "summary": "Triggers when an application is hibernated.", "params": { "type": "object", "properties": {