diff --git a/core/main/src/bootstrap/start_fbgateway_step.rs b/core/main/src/bootstrap/start_fbgateway_step.rs index c3f6a73d1..7183e8a64 100644 --- a/core/main/src/bootstrap/start_fbgateway_step.rs +++ b/core/main/src/bootstrap/start_fbgateway_step.rs @@ -22,15 +22,14 @@ use crate::{ firebolt_gateway::FireboltGateway, handlers::{ accessory_rpc::AccessoryRippleProvider, advertising_rpc::AdvertisingRPCProvider, - audio_description_rpc::AudioDescriptionRPCProvider, capabilities_rpc::CapRPCProvider, - closed_captions_rpc::ClosedcaptionsRPCProvider, device_rpc::DeviceRPCProvider, - discovery_rpc::DiscoveryRPCProvider, internal_rpc::InternalProvider, - keyboard_rpc::KeyboardRPCProvider, lcm_rpc::LifecycleManagementProvider, - lifecycle_rpc::LifecycleRippleProvider, localization_rpc::LocalizationRPCProvider, - parameters_rpc::ParametersRPCProvider, privacy_rpc::PrivacyProvider, - profile_rpc::ProfileRPCProvider, provider_registrar::ProviderRegistrar, - second_screen_rpc::SecondScreenRPCProvider, user_grants_rpc::UserGrantsRPCProvider, - wifi_rpc::WifiRPCProvider, + capabilities_rpc::CapRPCProvider, closed_captions_rpc::ClosedcaptionsRPCProvider, + device_rpc::DeviceRPCProvider, discovery_rpc::DiscoveryRPCProvider, + internal_rpc::InternalProvider, keyboard_rpc::KeyboardRPCProvider, + lcm_rpc::LifecycleManagementProvider, lifecycle_rpc::LifecycleRippleProvider, + localization_rpc::LocalizationRPCProvider, parameters_rpc::ParametersRPCProvider, + privacy_rpc::PrivacyProvider, profile_rpc::ProfileRPCProvider, + provider_registrar::ProviderRegistrar, second_screen_rpc::SecondScreenRPCProvider, + user_grants_rpc::UserGrantsRPCProvider, wifi_rpc::WifiRPCProvider, }, rpc::RippleRPCProvider, }, @@ -71,9 +70,6 @@ impl FireboltGatewayStep { let _ = methods.merge(ParametersRPCProvider::provide_with_alias(state.clone())); let _ = methods.merge(AdvertisingRPCProvider::provide_with_alias(state.clone())); let _ = methods.merge(DiscoveryRPCProvider::provide_with_alias(state.clone())); - let _ = methods.merge(AudioDescriptionRPCProvider::provide_with_alias( - state.clone(), - )); let _ = methods.merge(InternalProvider::provide_with_alias(state.clone())); // LCM Api(s) not required for internal launcher diff --git a/core/main/src/firebolt/handlers/audio_description_rpc.rs b/core/main/src/firebolt/handlers/audio_description_rpc.rs deleted file mode 100644 index 228f71f3a..000000000 --- a/core/main/src/firebolt/handlers/audio_description_rpc.rs +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2023 Comcast Cable Communications Management, LLC -// -// 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. -// -// SPDX-License-Identifier: Apache-2.0 -// -use jsonrpsee::{ - core::{async_trait, RpcResult}, - proc_macros::rpc, - RpcModule, -}; -use ripple_sdk::api::{ - device::device_accessibility_data::AudioDescriptionSettings, - gateway::rpc_gateway_api::CallContext, storage_property::StorageProperty, -}; - -use crate::{ - firebolt::rpc::RippleRPCProvider, processor::storage::storage_manager::StorageManager, - state::platform_state::PlatformState, -}; - -#[rpc(server)] -pub trait AudioDescription { - #[method(name = "accessibility.audioDescriptionSettings")] - async fn ad_settings_get(&self, ctx: CallContext) -> RpcResult; -} - -#[derive(Debug)] -pub struct AudioDescriptionImpl { - pub platform_state: PlatformState, -} - -#[async_trait] -impl AudioDescriptionServer for AudioDescriptionImpl { - async fn ad_settings_get(&self, _ctx: CallContext) -> RpcResult { - let v = StorageManager::get_bool( - &self.platform_state, - StorageProperty::AudioDescriptionEnabled, - ) - .await?; - Ok(AudioDescriptionSettings { enabled: v }) - } -} - -pub struct AudioDescriptionRPCProvider; -impl RippleRPCProvider for AudioDescriptionRPCProvider { - fn provide(platform_state: PlatformState) -> RpcModule { - (AudioDescriptionImpl { platform_state }).into_rpc() - } -} diff --git a/core/main/src/firebolt/handlers/localization_rpc.rs b/core/main/src/firebolt/handlers/localization_rpc.rs index d5d0f33e6..e7ca0c215 100644 --- a/core/main/src/firebolt/handlers/localization_rpc.rs +++ b/core/main/src/firebolt/handlers/localization_rpc.rs @@ -71,16 +71,6 @@ pub trait Localization { ctx: CallContext, request: ListenRequest, ) -> RpcResult; - #[method(name = "localization.locale")] - async fn locale(&self, _ctx: CallContext) -> RpcResult; - #[method(name = "localization.setLocale")] - async fn locale_set(&self, ctx: CallContext, set_request: SetStringProperty) -> RpcResult<()>; - #[method(name = "localization.onLocaleChanged")] - async fn on_locale_changed( - &self, - ctx: CallContext, - request: ListenRequest, - ) -> RpcResult; #[method(name = "localization.latlon")] async fn latlon(&self, _ctx: CallContext) -> RpcResult; #[method(name = "localization.setLatlon")] @@ -286,34 +276,6 @@ impl LocalizationServer for LocalizationImpl { .await } - async fn locale(&self, _ctx: CallContext) -> RpcResult { - StorageManager::get_string(&self.platform_state, StorageProperty::Locale).await - } - - async fn locale_set(&self, _ctx: CallContext, set_request: SetStringProperty) -> RpcResult<()> { - StorageManager::set_string( - &self.platform_state, - StorageProperty::Locale, - set_request.value, - None, - ) - .await - } - - async fn on_locale_changed( - &self, - ctx: CallContext, - request: ListenRequest, - ) -> RpcResult { - self.on_request_app_event( - ctx, - request, - "LocalizationLocaleChanged", - "localization.onLocaleChanged", - ) - .await - } - async fn latlon(&self, _ctx: CallContext) -> RpcResult { StorageManager::get_string(&self.platform_state, StorageProperty::LatLon).await } diff --git a/core/main/src/firebolt/mod.rs b/core/main/src/firebolt/mod.rs index 7154b6f59..adb8c870b 100644 --- a/core/main/src/firebolt/mod.rs +++ b/core/main/src/firebolt/mod.rs @@ -20,7 +20,6 @@ pub mod handlers { pub mod accessory_rpc; pub mod advertising_rpc; - pub mod audio_description_rpc; pub mod capabilities_rpc; pub mod closed_captions_rpc; pub mod device_rpc; diff --git a/core/main/src/processor/storage/default_storage_properties.rs b/core/main/src/processor/storage/default_storage_properties.rs index ad201eeb2..3d509a4b5 100644 --- a/core/main/src/processor/storage/default_storage_properties.rs +++ b/core/main/src/processor/storage/default_storage_properties.rs @@ -22,13 +22,11 @@ use ripple_sdk::{ KEY_ALLOW_PRIMARY_BROWSE_AD_TARGETING, KEY_ALLOW_PRIMARY_CONTENT_AD_TARGETING, KEY_ALLOW_PRODUCT_ANALYTICS, KEY_ALLOW_REMOTE_DIAGNOSTICS, KEY_ALLOW_RESUME_POINTS, KEY_ALLOW_UNENTITLED_PERSONALIZATION, KEY_ALLOW_UNENTITLED_RESUME_POINTS, - KEY_ALLOW_WATCH_HISTORY, KEY_AUDIO_DESCRIPTION_ENABLED, KEY_BACKGROUND_COLOR, - KEY_BACKGROUND_OPACITY, KEY_ENABLED, KEY_FONT_COLOR, KEY_FONT_EDGE, KEY_FONT_EDGE_COLOR, - KEY_FONT_FAMILY, KEY_FONT_OPACITY, KEY_FONT_SIZE, KEY_LOCALE, KEY_NAME, - KEY_SKIP_RESTRICTION, KEY_TEXT_ALIGN, KEY_TEXT_ALIGN_VERTICAL, KEY_WINDOW_COLOR, - KEY_WINDOW_OPACITY, NAMESPACE_ADVERTISING, NAMESPACE_AUDIO_DESCRIPTION, - NAMESPACE_CLOSED_CAPTIONS, NAMESPACE_DEVICE_NAME, NAMESPACE_LOCALIZATION, - NAMESPACE_PRIVACY, + KEY_ALLOW_WATCH_HISTORY, KEY_BACKGROUND_COLOR, KEY_BACKGROUND_OPACITY, KEY_ENABLED, + KEY_FONT_COLOR, KEY_FONT_EDGE, KEY_FONT_EDGE_COLOR, KEY_FONT_FAMILY, KEY_FONT_OPACITY, + KEY_FONT_SIZE, KEY_NAME, KEY_SKIP_RESTRICTION, KEY_TEXT_ALIGN, KEY_TEXT_ALIGN_VERTICAL, + KEY_WINDOW_COLOR, KEY_WINDOW_OPACITY, NAMESPACE_ADVERTISING, NAMESPACE_CLOSED_CAPTIONS, + NAMESPACE_DEVICE_NAME, NAMESPACE_PRIVACY, }, log::trace, }; @@ -135,17 +133,6 @@ impl DefaultStorageProperties { key.to_owned(), )), } - } else if namespace.eq(NAMESPACE_AUDIO_DESCRIPTION) { - match key { - KEY_AUDIO_DESCRIPTION_ENABLED => Ok(state - .get_device_manifest() - .configuration - .default_values - .accessibility_audio_description_settings), - _ => Err(DefaultStoragePropertiesError::UnreconizedKey( - key.to_owned(), - )), - } } else { Err(DefaultStoragePropertiesError::UnreconizedNamespace( namespace.to_owned(), @@ -214,22 +201,6 @@ impl DefaultStorageProperties { key.to_owned(), )), } - } else if namespace.eq(NAMESPACE_LOCALIZATION) { - match key { - KEY_LOCALE => Ok(state - .get_device_manifest() - .configuration - .default_values - .locale), - // Not used anywhere just yet - // KEY_ADDITIONAL_INFO => { - // let a_info_map: HashMap = state.get_device_manifest().clone().configuration.default_values.additional_info; - // Ok(serde_json::to_string(&a_info_map).unwrap()) - // } - _ => Err(DefaultStoragePropertiesError::UnreconizedKey( - key.to_owned(), - )), - } } else if namespace.eq(NAMESPACE_ADVERTISING) { match key { KEY_SKIP_RESTRICTION => Ok(state diff --git a/core/sdk/src/api/default_storage_properties.rs b/core/sdk/src/api/default_storage_properties.rs index cd67e17cb..180cd699b 100644 --- a/core/sdk/src/api/default_storage_properties.rs +++ b/core/sdk/src/api/default_storage_properties.rs @@ -22,13 +22,11 @@ use crate::{ KEY_ALLOW_PRIMARY_BROWSE_AD_TARGETING, KEY_ALLOW_PRIMARY_CONTENT_AD_TARGETING, KEY_ALLOW_PRODUCT_ANALYTICS, KEY_ALLOW_REMOTE_DIAGNOSTICS, KEY_ALLOW_RESUME_POINTS, KEY_ALLOW_UNENTITLED_PERSONALIZATION, KEY_ALLOW_UNENTITLED_RESUME_POINTS, - KEY_ALLOW_WATCH_HISTORY, KEY_AUDIO_DESCRIPTION_ENABLED, KEY_BACKGROUND_COLOR, - KEY_BACKGROUND_OPACITY, KEY_ENABLED, KEY_FONT_COLOR, KEY_FONT_EDGE, KEY_FONT_EDGE_COLOR, - KEY_FONT_FAMILY, KEY_FONT_OPACITY, KEY_FONT_SIZE, KEY_LOCALE, KEY_NAME, - KEY_SKIP_RESTRICTION, KEY_TEXT_ALIGN, KEY_TEXT_ALIGN_VERTICAL, KEY_WINDOW_COLOR, - KEY_WINDOW_OPACITY, NAMESPACE_ADVERTISING, NAMESPACE_AUDIO_DESCRIPTION, - NAMESPACE_CLOSED_CAPTIONS, NAMESPACE_DEVICE_NAME, NAMESPACE_LOCALIZATION, - NAMESPACE_PRIVACY, + KEY_ALLOW_WATCH_HISTORY, KEY_BACKGROUND_COLOR, KEY_BACKGROUND_OPACITY, KEY_ENABLED, + KEY_FONT_COLOR, KEY_FONT_EDGE, KEY_FONT_EDGE_COLOR, KEY_FONT_FAMILY, KEY_FONT_OPACITY, + KEY_FONT_SIZE, KEY_NAME, KEY_SKIP_RESTRICTION, KEY_TEXT_ALIGN, KEY_TEXT_ALIGN_VERTICAL, + KEY_WINDOW_COLOR, KEY_WINDOW_OPACITY, NAMESPACE_ADVERTISING, NAMESPACE_CLOSED_CAPTIONS, + NAMESPACE_DEVICE_NAME, NAMESPACE_PRIVACY, }, log::trace, }; @@ -82,13 +80,6 @@ impl DefaultStorageProperties { key.to_owned(), )), } - } else if namespace.eq(NAMESPACE_AUDIO_DESCRIPTION) { - match key { - KEY_AUDIO_DESCRIPTION_ENABLED => Ok(value.accessibility_audio_description_settings), - _ => Err(DefaultStoragePropertiesError::UnreconizedKey( - key.to_owned(), - )), - } } else { Err(DefaultStoragePropertiesError::UnreconizedNamespace( namespace.to_owned(), @@ -149,18 +140,6 @@ impl DefaultStorageProperties { key.to_owned(), )), } - } else if namespace.eq(NAMESPACE_LOCALIZATION) { - match key { - KEY_LOCALE => Ok(value.clone().locale), - // Not used anywhere just yet - // KEY_ADDITIONAL_INFO => { - // let a_info_map: HashMap = state.clone().configuration.default_values.additional_info; - // Ok(serde_json::to_string(&a_info_map).unwrap()) - // } - _ => Err(DefaultStoragePropertiesError::UnreconizedKey( - key.to_owned(), - )), - } } else if namespace.eq(NAMESPACE_ADVERTISING) { match key { KEY_SKIP_RESTRICTION => Ok(value.clone().skip_restriction), diff --git a/core/sdk/src/api/storage_property.rs b/core/sdk/src/api/storage_property.rs index 67fe6f257..208993376 100644 --- a/core/sdk/src/api/storage_property.rs +++ b/core/sdk/src/api/storage_property.rs @@ -33,7 +33,6 @@ pub const NAMESPACE_PRIVACY: &str = "Privacy"; pub const NAMESPACE_DEVICE_NAME: &str = "DeviceName"; pub const NAMESPACE_LOCALIZATION: &str = "Localization"; pub const NAMESPACE_ADVERTISING: &str = "Advertising"; -pub const NAMESPACE_AUDIO_DESCRIPTION: &str = "AudioDescription"; pub const KEY_ENABLED: &str = "enabled"; pub const KEY_FONT_FAMILY: &str = "fontFamily"; @@ -53,7 +52,6 @@ pub const KEY_POSTAL_CODE: &str = "postalCode"; pub const KEY_LOCALITY: &str = "locality"; //pub const KEY_COUNTRY_CODE: &str = "countryCode"; //pub const KEY_LANGUAGE: &str = "language"; -pub const KEY_LOCALE: &str = "locale"; pub const KEY_LATLON: &str = "latlon"; pub const KEY_ADDITIONAL_INFO: &str = "additionalInfo"; pub const KEY_ALLOW_ACR_COLLECTION: &str = "allowACRCollection"; @@ -72,7 +70,6 @@ pub const KEY_ALLOW_WATCH_HISTORY: &str = "allowWatchHistory"; pub const KEY_VOICE_GUIDANCE_SPEED: &str = "speed"; pub const KEY_PARTNER_EXCLUSIONS: &str = "partnerExclusions"; pub const KEY_SKIP_RESTRICTION: &str = "skipRestriction"; -pub const KEY_AUDIO_DESCRIPTION_ENABLED: &str = "audioDescriptionEnabled"; pub const KEY_PREFERRED_AUDIO_LANGUAGES: &str = "preferredAudioLanguages"; pub const EVENT_CLOSED_CAPTIONS_SETTINGS_CHANGED: &str = @@ -247,12 +244,6 @@ const PROPERTY_DATA_POSTAL_CODE: PropertyData = PropertyData { event_names: Some(&[EVENT_POSTAL_CODE]), }; -const PROPERTY_DATA_LOCALE: PropertyData = PropertyData { - key: KEY_LOCALE, - namespace: NAMESPACE_LOCALIZATION, - event_names: Some(&[EVENT_LOCALE]), -}; - const PROPERTY_DATA_LATLON: PropertyData = PropertyData { key: KEY_LATLON, namespace: NAMESPACE_LOCALIZATION, @@ -368,12 +359,6 @@ const PROPERTY_DATA_SKIP_RESTRICTION: PropertyData = PropertyData { ]), }; -const PROPERTY_AUDIO_DESCRIPTION_ENABLED: PropertyData = PropertyData { - key: KEY_AUDIO_DESCRIPTION_ENABLED, - namespace: NAMESPACE_AUDIO_DESCRIPTION, - event_names: Some(&[EVENT_AUDIO_DESCRIPTION_SETTINGS_CHANGED]), -}; - const PROPERTY_CC_PREFERRED_LANGUAGES: PropertyData = PropertyData { key: KEY_PREFERRED_AUDIO_LANGUAGES, namespace: NAMESPACE_CLOSED_CAPTIONS, @@ -414,7 +399,6 @@ pub enum StorageProperty { ClosedCaptionsTextAlignVertical, Locality, PostalCode, - Locale, LatLon, AdditionalInfo, AllowAcrCollection, @@ -432,7 +416,6 @@ pub enum StorageProperty { AllowWatchHistory, PartnerExclusions, SkipRestriction, - AudioDescriptionEnabled, CCPreferredLanguages, } @@ -489,7 +472,6 @@ impl StorageProperty { } StorageProperty::Locality => PROPERTY_DATA_LOCALITY, StorageProperty::PostalCode => PROPERTY_DATA_POSTAL_CODE, - StorageProperty::Locale => PROPERTY_DATA_LOCALE, StorageProperty::LatLon => PROPERTY_DATA_LATLON, StorageProperty::AdditionalInfo => PROPERTY_DATA_ADDITIONAL_INFO, StorageProperty::AllowAcrCollection => PROPERTY_DATA_ALLOW_ACR_COLLECTION, @@ -517,7 +499,6 @@ impl StorageProperty { StorageProperty::AllowWatchHistory => PROPERTY_DATA_ALLOW_WATCH_HISTORY, StorageProperty::PartnerExclusions => PROPERTY_DATA_PARTNER_EXCLUSIONS, StorageProperty::SkipRestriction => PROPERTY_DATA_SKIP_RESTRICTION, - StorageProperty::AudioDescriptionEnabled => PROPERTY_AUDIO_DESCRIPTION_ENABLED, StorageProperty::CCPreferredLanguages => PROPERTY_CC_PREFERRED_LANGUAGES, } }