-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PoC: Interface for Firebolt Privacy Module #332
Draft
Karthick-Somasundaresan
wants to merge
9
commits into
rdkcentral:master
Choose a base branch
from
Karthick-Somasundaresan:firebolt_poc
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
ef65d45
PoC: Interface for Firebolt Privacy Module
Karthick-Somasundaresan 1b02404
Addressing code review comments
Karthick-Somasundaresan c2f6bd6
Addressing code review comments
Karthick-Somasundaresan f890ab9
WIP Firebolt headers
Karthick-Somasundaresan edd1a62
chore: Merge branch 'master' into firebolt_poc
Karthick-Somasundaresan 341109e
Adding FireboltDisccovery WIP
Karthick-Somasundaresan d753185
Adding FireboltDiscovery interface
Karthick-Somasundaresan c81a6bb
Update IFireboltDiscovery.h
Karthick-Somasundaresan 8c16e1d
Update IFireboltPrivacy.h
Karthick-Somasundaresan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
/* | ||
* If not stated otherwise in this file or this component's LICENSE file the | ||
* following copyright and licenses apply: | ||
* | ||
* Copyright 2024 Metrological | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#pragma once | ||
#include "Module.h" | ||
|
||
// @insert <com/IIteratorType.h> | ||
|
||
namespace WPEFramework { | ||
|
||
namespace Exchange { | ||
|
||
|
||
struct EXTERNAL IFireboltDiscovery : virtual public Core::IUnknown { | ||
|
||
enum { ID = ID_FIREBOLT_DISCOVERY }; | ||
struct EXTERNAL DiscoveryPolicy{ | ||
bool enableRecommendation; | ||
bool shareWatchHistory; | ||
bool rememberWatchedProgram; | ||
}; | ||
|
||
// @event | ||
struct EXTERNAL INotification : virtual public Core::IUnknown { | ||
enum { ID = ID_FIREBOLT_DISCOVERY_NOTIFICATION }; | ||
~INotification() override = default; | ||
|
||
// @brief Notifies that PolicyValue Changed | ||
/* @text:onPolicyChanged */ | ||
virtual void OnPolicyChanged(const struct DiscoveryPolicy policy) = 0; | ||
}; | ||
|
||
// Pushing notifications to interested sinks | ||
virtual Core::hresult Register(IFireboltDiscovery::INotification* sink) = 0; | ||
virtual Core::hresult Unregister(IFireboltDiscovery::INotification* sink) = 0; | ||
|
||
// @brief Provides Current Policy in action | ||
virtual Core::hresult GetDiscoveryPolicy(DiscoveryPolicy& policy /* @out */) = 0; | ||
|
||
virtual Core::hresult watched(const string& appId) = 0; | ||
}; | ||
|
||
namespace JSONRPC { | ||
|
||
/* @json 1.0.0 */ | ||
struct EXTERNAL IFireboltDiscoveryJSONRPC { | ||
|
||
virtual ~IFireboltDiscoveryJSONRPC() = default; | ||
|
||
|
||
/* @event */ | ||
struct EXTERNAL INotification { | ||
|
||
virtual ~INotification() = default; | ||
|
||
// @brief Notifies change in the discovery policy | ||
virtual void PolicyChanged(const IFireboltDiscovery::DiscoveryPolicy policy) = 0; | ||
}; | ||
// @text SignIn | ||
// @brief Signin the user in the app | ||
// @details AppID shall be passed through the security token. | ||
// @param signin: True - SignIn | ||
// @retval ERROR_PRIVILIGED_REQUEST: App security errors | ||
virtual Core::hresult SignIn(const Core::JSONRPC::Context& context, const bool signin /*@optional*/) = 0; | ||
|
||
// @text Policy | ||
// @brief Signin the user in the app | ||
// @details Get the current Discovery Policy | ||
// @retval ERROR_PRIVILIGED_REQUEST: App security errors | ||
virtual Core::hresult Policy(const Core::JSONRPC::Context& context, IFireboltDiscovery::DiscoveryPolicy& policy /*@out*/) = 0; | ||
|
||
}; | ||
|
||
} // namespace JSONRPC | ||
|
||
} // namespace Exchange | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
/* | ||
* If not stated otherwise in this file or this component's LICENSE file the | ||
* following copyright and licenses apply: | ||
* | ||
* Copyright 2022 Metrological | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#pragma once | ||
#include "Module.h" | ||
namespace WPEFramework { | ||
namespace Exchange { | ||
|
||
/* @json 1.0.0*/ | ||
struct EXTERNAL IFireboltPrivacy : virtual public Core::IUnknown { | ||
enum { ID = ID_FIREBOLT_PRIVACY }; | ||
|
||
// @event | ||
struct EXTERNAL INotification : virtual public Core::IUnknown { | ||
enum { ID = ID_FIREBOLT_PRIVACY_NOTIFICATION }; | ||
~INotification() override = default; | ||
|
||
// @brief Notifies that Allow Resume points value change | ||
/* @text:onAllowResumePointsChanged */ | ||
virtual void OnAllowResumePointsChanged(const bool value) = 0; | ||
// @brief Notifies that Allow personalization value change | ||
/* @text:onAllowPersonalizationChanged */ | ||
virtual void OnAllowPersonalizationChanged(const bool value) = 0; | ||
// @brief Notifies that Allow Watch History value change | ||
/* @text:onAllowWatchHistoryChanged */ | ||
virtual void OnAllowWatchHistoryChanged(const bool value) = 0; | ||
}; | ||
|
||
~IFireboltPrivacy() override = default; | ||
|
||
// Pushing notifications to interested sinks | ||
virtual Core::hresult Register(IFireboltPrivacy::INotification* sink) = 0; | ||
virtual Core::hresult Unregister(IFireboltPrivacy::INotification* sink) = 0; | ||
|
||
// @brief Provides Current resume watch status | ||
// @text:AllowResumePoints | ||
virtual Core::hresult GetAllowResumePoints(bool& allow /* @out */) const = 0; | ||
// @brief sets the current resume watch status | ||
// @text:SetAllowResumePoints | ||
virtual Core::hresult SetAllowResumePoints(const bool& value ) = 0; | ||
// @brief Provides Current resume watch status | ||
// @text:AllowPersonalization | ||
virtual Core::hresult GetAllowPersonalization(bool& allow /* @out */) const = 0; | ||
// @brief sets the current resume watch status | ||
// @text:SetAllowPersonalization | ||
virtual Core::hresult SetAllowPersonalization(const bool& value ) = 0; | ||
// @brief Provides Current resume watch status | ||
// @text:AllowWatchHistory | ||
virtual Core::hresult GetAllowWatchHistory(bool& allow /* @out */) const = 0; | ||
// @brief sets the current resume watch status | ||
// @text:SetAllowWatchHistory | ||
virtual Core::hresult SetAllowWatchHistory(const bool& value ) = 0; | ||
|
||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oke to create both methods (i.s.o. properties) but please keep it consistent. Or both are prefixed with Get and Set or both are not prefixed (so no Get/Set in front of it).