Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 8 additions & 12 deletions core/main/src/bootstrap/start_fbgateway_step.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
Expand Down Expand Up @@ -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
Expand Down
60 changes: 0 additions & 60 deletions core/main/src/firebolt/handlers/audio_description_rpc.rs

This file was deleted.

38 changes: 0 additions & 38 deletions core/main/src/firebolt/handlers/localization_rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,6 @@ pub trait Localization {
ctx: CallContext,
request: ListenRequest,
) -> RpcResult<ListenerResponse>;
#[method(name = "localization.locale")]
async fn locale(&self, _ctx: CallContext) -> RpcResult<String>;
#[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<ListenerResponse>;
#[method(name = "localization.latlon")]
async fn latlon(&self, _ctx: CallContext) -> RpcResult<String>;
#[method(name = "localization.setLatlon")]
Expand Down Expand Up @@ -286,34 +276,6 @@ impl LocalizationServer for LocalizationImpl {
.await
}

async fn locale(&self, _ctx: CallContext) -> RpcResult<String> {
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<ListenerResponse> {
self.on_request_app_event(
ctx,
request,
"LocalizationLocaleChanged",
"localization.onLocaleChanged",
)
.await
}

async fn latlon(&self, _ctx: CallContext) -> RpcResult<String> {
StorageManager::get_string(&self.platform_state, StorageProperty::LatLon).await
}
Expand Down
1 change: 0 additions & 1 deletion core/main/src/firebolt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
39 changes: 5 additions & 34 deletions core/main/src/processor/storage/default_storage_properties.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down Expand Up @@ -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(),
Expand Down Expand Up @@ -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<String, String> = 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
Expand Down
31 changes: 5 additions & 26 deletions core/sdk/src/api/default_storage_properties.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down Expand Up @@ -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(),
Expand Down Expand Up @@ -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<String, String> = 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),
Expand Down
19 changes: 0 additions & 19 deletions core/sdk/src/api/storage_property.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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";
Expand All @@ -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 =
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -414,7 +399,6 @@ pub enum StorageProperty {
ClosedCaptionsTextAlignVertical,
Locality,
PostalCode,
Locale,
LatLon,
AdditionalInfo,
AllowAcrCollection,
Expand All @@ -432,7 +416,6 @@ pub enum StorageProperty {
AllowWatchHistory,
PartnerExclusions,
SkipRestriction,
AudioDescriptionEnabled,
CCPreferredLanguages,
}

Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
}
}
Expand Down