Skip to content

Commit

Permalink
Merge branch 'rdkcentral:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
cmuhammedrafi authored Aug 27, 2024
2 parents 6d3347d + 944f678 commit e2cdb06
Show file tree
Hide file tree
Showing 9 changed files with 480 additions and 207 deletions.
2 changes: 1 addition & 1 deletion NetworkManager/NetworkManagerLogger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ namespace NetworkManagerLogger {
struct timeval tv;
struct tm* lt;

if (gDefaultLogLevel < level)
if (level < gDefaultLogLevel)
return;

gettimeofday(&tv, NULL);
Expand Down
4 changes: 4 additions & 0 deletions RDKShell/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ All notable changes to this RDK Service will be documented in this file.

* For more details, refer to [versioning](https://github.com/rdkcentral/rdkservices#versioning) section under Main README.

## [1.6.2] - 2024-08-26
### Added
- Added Delay of Auto Hibernation for Native Apps: 15sec for L2S, 5sec for others

## [1.6.1] - 2024-07-17
### Fixed
- Fix for Retry to get wake up keycode when Unknown
Expand Down
271 changes: 219 additions & 52 deletions RDKShell/RDKShell.cpp

Large diffs are not rendered by default.

35 changes: 35 additions & 0 deletions RDKShell/RDKShell.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
#pragma once

#include <mutex>
#include <condition_variable>
#include <set>
#include "Module.h"
#include <rdkshell/rdkshellevents.h>
#include <rdkshell/rdkshell.h>
Expand Down Expand Up @@ -469,6 +471,36 @@ namespace WPEFramework {
RDKShell* mShell;
std::vector<ICapture::IStore *>mCaptureStorers;
};
#ifdef HIBERNATE_SUPPORT_ENABLED
class HibernateExecutor {
public:
HibernateExecutor(RDKShell& shell);
HibernateExecutor(const HibernateExecutor&) = delete;
HibernateExecutor& operator=(const HibernateExecutor&) = delete;
~HibernateExecutor();

void schedule(std::string callsign, uint32_t timeoutMs, uint32_t delayMs = 0);
void abort(std::string callsign);

private:

struct Params {
std::chrono::steady_clock::time_point timePoint;
uint32_t timeoutMs;
};

void run();
void hibernateInternal(std::string callsign, uint32_t timeoutMs);

RDKShell &mShell;
std::thread mThread;
std::mutex mMutex;
std::condition_variable mCondition;
std::unordered_map<std::string, Params> mCallsignsExecTimeMap;
std::set<std::string> mCallsignsHibernating;
bool mRunning;
};
#endif

private/*members*/:
bool mRemoteShell;
Expand All @@ -487,6 +519,9 @@ namespace WPEFramework {
#ifdef ENABLE_RIALTO_FEATURE
std::shared_ptr<RialtoConnector> rialtoConnector;
#endif //ENABLE_RIALTO_FEATURE
#ifdef HIBERNATE_SUPPORT_ENABLED
HibernateExecutor mHibernateExecutor;
#endif
};

struct PluginData
Expand Down
8 changes: 6 additions & 2 deletions UserSettings/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,15 @@ All notable changes to this RDK Service will be documented in this file.
* For more details, refer to [versioning](https://github.com/rdkcentral/rdkservices#versioning) section under Main README.


## [1.0.2] - 2024-07-08
## [1.1.2] - 2024-08-26
### Fixed
- Updated api documentation according to interface.

## [1.1.1] - 2024-07-08
### Fixed
- UserSettings Plugin missing default values updated.

## [1.0.1] - 2024-06-02
## [1.1.0] - 2024-06-02
### Added
- Added GetPrivacyMode/GetPrivacyMode calls.

Expand Down
2 changes: 1 addition & 1 deletion UserSettings/UserSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#define API_VERSION_NUMBER_MAJOR 1
#define API_VERSION_NUMBER_MINOR 1
#define API_VERSION_NUMBER_PATCH 0
#define API_VERSION_NUMBER_PATCH 2

namespace WPEFramework
{
Expand Down
118 changes: 84 additions & 34 deletions UserSettings/UserSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,46 @@
"jsonrpc": "2.0",
"info": {
"title": "UserSettings API",
"class": "UserSettings",
"class": "org.rdk.UserSettings",
"description": "The `UserSettings`, that is responsible for persisting and notifying listeners of any change of these settings.."
},
"common": {
"$ref": "../common/common.json"
},
"definitions": {
"preferredLanguages": {
"summary": "A prioritized list of ISO 639-2/B codes for the preferred audio languages",
"type": "string",
"example": "eng"
},
"preferredCaptionsLanguages": {
"summary": "A prioritized list of ISO 639-2/B codes for the preferred captions languages",
"type": "string",
"example": "eng"
},
"preferredClosedCaptionService": {
"summary": "A string for the preferred closed captions service. Valid values are AUTO, CC[1-4], TEXT[1-4], SERVICE[1-64] where CC and TEXT is CTA-608 and SERVICE is CTA-708. AUTO indicates that the choice is left to the player",
"type": "string",
"example": "CC3"
},
"presentationLanguage": {
"summary": "The preferred presentationLanguages in a full BCP 47 value, including script, * region, variant The language set and used by Immerse UI",
"type": "string",
"example": "en-US"
}
},
"methods": {
"SetAudioDescription": {
"summary": "Setting Audio Description.",
"params": {
"summary": "Audio Description Enabled: true/false",
"type": "boolean",
"example": true
"type": "object",
"properties": {
"enabled": {
"summary": "Audio Description Enabled: true/false",
"type": "boolean",
"example":true
}
}
},
"result": {
"summary": "Null string will display",
Expand All @@ -26,9 +53,12 @@
"SetPreferredAudioLanguages": {
"summary": "Setting Preferred Audio Languages.",
"params": {
"summary": "Preferred Audio Languages: eng, wel",
"type": "string",
"example": "eng"
"type": "object",
"properties": {
"preferredLanguages": {
"$ref": "#/definitions/preferredLanguages"
}
}
},
"result": {
"summary": "Null string will display",
Expand All @@ -39,9 +69,12 @@
"SetPresentationLanguage": {
"summary": "Setting Presentation Languages.",
"params": {
"summary": "Presentation Languages: en-US, es-US",
"type": "string",
"example": "en-US"
"type": "object",
"properties": {
"presentationLanguages": {
"$ref": "#/definitions/presentationLanguage"
}
}
},
"result": {
"summary": "Null string will display",
Expand All @@ -52,9 +85,14 @@
"SetCaptions": {
"summary": "Setting Captions.",
"params": {
"summary": "Captions Enabled: true/false",
"type": "boolean",
"example": true
"type": "object",
"properties": {
"enabled": {
"summary": "Captions Enabled: true/false",
"type": "boolean",
"example": true
}
}
},
"result": {
"summary": "Null string will display ",
Expand All @@ -65,9 +103,12 @@
"SetPreferredCaptionsLanguages": {
"summary": "Setting PreferredCaption Languages.",
"params": {
"summary": "PreferredCaption Languages: eng, fra",
"type": "string",
"example": "eng"
"type": "object",
"properties": {
"preferredLanguages": {
"$ref": "#/definitions/preferredCaptionsLanguages"
}
}
},
"result": {
"summary": "Null string will display",
Expand All @@ -78,9 +119,12 @@
"SetPreferredClosedCaptionService": {
"summary": "Setting Preferred Closed Caption Service.",
"params": {
"summary": "Preferred Closed Caption Service: CC3",
"type": "string",
"example": "CC3"
"type": "object",
"properties": {
"service": {
"$ref": "#/definitions/preferredClosedCaptionService"
}
}
},
"result": {
"summary": "Null string will display",
Expand Down Expand Up @@ -109,49 +153,55 @@
"GetAudioDescription":{
"summary": "Returns Audio Description.",
"result": {
"type": "boolean"
"summary": "Audio Description Enabled: true/false",
"type": "boolean",
"example": true
}
},
"GetPreferredAudioLanguages":{
"summary": "Returns Audio Description.",
"summary": "Returns Preferred Audio Languages.",
"result": {
"type": "string"
"$ref": "#/definitions/preferredLanguages"
}
},
"GetPresentationLanguage":{
"summary": "Getting Presentation Languages.",
"result": {
"type": "string"
"$ref": "#/definitions/presentationLanguage"
}
},
"GetCaptions":{
"summary": "Getting Captions Enabled.",
"result": {
"type": "boolean"
"summary": "Captions Enabled: true/false",
"type": "boolean",
"example": true
}
},
"GetPreferredCaptionsLanguages":{
"summary": "Getting Preferred Caption Languages.",
"result": {
"type": "string"
"$ref": "#/definitions/preferredCaptionsLanguages"
}
},
"GetPreferredClosedCaptionService":{
"summary": "Getting Preferred ClosedCaption Service.",
"result": {
"type": "string"
"$ref": "#/definitions/preferredClosedCaptionService"
}
},
"GetPrivacyMode":{
"summary": "Getting Privacy Mode",
"result": {
"type": "string"
"summary": "Current Privacy Mode",
"type": "string",
"example": "DO_NOT_SHARE"
}
}
},
"events": {
"OnAudioDescriptionChanged": {
"summary": "Triggered after the audio description changes (see `setaudiodescription`)",
"summary": "Triggered after the audio description changes (see `SetAudioDescription`)",
"params": {
"type": "object",
"properties": {
Expand All @@ -167,7 +217,7 @@
}
},
"OnPreferredAudioLanguagesChanged": {
"summary": "Triggered after the audio preferred Audio languages changes (see `setpreferredaudiolanguages`)",
"summary": "Triggered after the audio preferred Audio languages changes (see `SetPreferredAudioLanguages`)",
"params": {
"type": "object",
"properties": {
Expand All @@ -183,7 +233,7 @@
}
},
"OnPresentationLanguageChanged": {
"summary": "Triggered after the Presentation Language changes (see `setpresentationlanguages`)",
"summary": "Triggered after the Presentation Language changes (see `SetPresentationLanguage`)",
"params": {
"type": "object",
"properties": {
Expand All @@ -199,7 +249,7 @@
}
},
"OnCaptionsChanged": {
"summary": "Triggered after the captions changes (see `setcaptionsenabled`)",
"summary": "Triggered after the captions changes (see `SetCaptions`)",
"params": {
"type": "object",
"properties": {
Expand All @@ -215,7 +265,7 @@
}
},
"OnPreferredCaptionsLanguagesChanged": {
"summary": "Triggered after the PreferredCaption Languages changes (see `setpreferredcaptionlanguages`)",
"summary": "Triggered after the PreferredCaption Languages changes (see `SetPreferredCaptionsLanguages`)",
"params": {
"type": "object",
"properties": {
Expand All @@ -231,12 +281,12 @@
}
},
"OnPreferredClosedCaptionServiceChanged": {
"summary": "Triggered after the Preferred Closed Caption changes (see `setpreferredclosedcaptionservice`)",
"summary": "Triggered after the Preferred Closed Caption changes (see `SetPreferredClosedCaptionService`)",
"params": {
"type": "object",
"properties": {
"service":{
"summary": "Receive Preferred Closed Caption changes",
"summary": "Receive Preferred Closed Caption Service changes",
"type": "string",
"example": "CC3"
}
Expand Down
7 changes: 2 additions & 5 deletions docs/api/RDKShellPlugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -4426,8 +4426,7 @@ Hibernate an application.
| params | object | |
| params.callsign | string | The application callsign |
| params?.timeout | number | <sup>*(optional)*</sup> Timeout in ms for hibernate procedure |
| params?.procsequence | array | <sup>*(optional)*</sup> Hibernate sequence of application processes |
| params?.procsequence[#] | string | <sup>*(optional)*</sup> |
| params?.delay | number | <sup>*(optional)*</sup> Hibernate execution delay in ms |

### Result

Expand All @@ -4448,9 +4447,7 @@ Hibernate an application.
"params": {
"callsign": "Cobalt",
"timeout": 10000,
"procsequence": [
"LightningApp-0"
]
"delay": 5000
}
}
```
Expand Down
Loading

0 comments on commit e2cdb06

Please sign in to comment.