From af75c698345e1ff15ff238efc822894355c5961a Mon Sep 17 00:00:00 2001 From: swethasukumarr Date: Thu, 7 May 2026 16:04:05 -0400 Subject: [PATCH 1/3] RDKEMW-17483: Change Discovery.watched and Metrics methods return type bool to void --- include/firebolt/discovery.h | 2 +- include/firebolt/metrics.h | 36 ++++++------ src/discovery_impl.cpp | 9 +-- src/discovery_impl.h | 2 +- src/metrics_impl.cpp | 72 ++++++++++++------------ src/metrics_impl.h | 36 ++++++------ test/api_test_app/apis/discoveryDemo.cpp | 2 +- test/api_test_app/apis/metricsDemo.cpp | 36 ++++++------ test/component/discoveryTest.cpp | 7 +-- test/component/metricsTest.cpp | 51 ----------------- test/unit/discoveryTest.cpp | 11 +--- test/unit/metricsTest.cpp | 40 ++++++------- test/unit/mock_helper.h | 7 +++ 13 files changed, 126 insertions(+), 185 deletions(-) diff --git a/include/firebolt/discovery.h b/include/firebolt/discovery.h index 50cecb9..b73404c 100644 --- a/include/firebolt/discovery.h +++ b/include/firebolt/discovery.h @@ -41,7 +41,7 @@ class IDiscovery * * @retval The status. */ - virtual Result watched(const std::string& entityId, std::optional progress, + virtual Result watched(const std::string& entityId, std::optional progress, std::optional completed, std::optional watchedOn, std::optional agePolicy) const = 0; }; diff --git a/include/firebolt/metrics.h b/include/firebolt/metrics.h index d14c5bf..a13deb5 100644 --- a/include/firebolt/metrics.h +++ b/include/firebolt/metrics.h @@ -45,21 +45,21 @@ class IMetrics * * @retval The success state or error */ - virtual Result ready() const = 0; + virtual Result ready() const = 0; /** * @brief Logs a sign in event * * @retval The success state or error */ - virtual Result signIn() const = 0; + virtual Result signIn() const = 0; /** * @brief Logs a sign out event * * @retval The success state or error */ - virtual Result signOut() const = 0; + virtual Result signOut() const = 0; /** * @brief Informs the platform that your user has started content @@ -70,7 +70,7 @@ class IMetrics * * @retval The success state or error */ - virtual Result startContent(const std::optional& entityId, + virtual Result startContent(const std::optional& entityId, const std::optional agePolicy) const = 0; /** @@ -82,7 +82,7 @@ class IMetrics * * @retval The success state or error */ - virtual Result stopContent(const std::optional& entityId, + virtual Result stopContent(const std::optional& entityId, const std::optional agePolicy) const = 0; /** @@ -94,7 +94,7 @@ class IMetrics * * @retval The success state or error */ - virtual Result page(const std::string& pageId, const std::optional& agePolicy) const = 0; + virtual Result page(const std::string& pageId, const std::optional& agePolicy) const = 0; /** * @brief Informs the platform of an error that has occurred in your app @@ -109,7 +109,7 @@ class IMetrics * * @retval The success state or error */ - virtual Result error(const ErrorType type, const std::string& code, const std::string& description, + virtual Result error(const ErrorType type, const std::string& code, const std::string& description, const bool visible, const std::optional>& parameters, const std::optional& agePolicy) const = 0; @@ -122,7 +122,7 @@ class IMetrics * * @retval The success state or error */ - virtual Result mediaLoadStart(const std::string& entityId, + virtual Result mediaLoadStart(const std::string& entityId, const std::optional& agePolicy) const = 0; /** @@ -135,7 +135,7 @@ class IMetrics * * @retval The success state or error */ - virtual Result mediaPlaying(const std::string& entityId, + virtual Result mediaPlaying(const std::string& entityId, const std::optional& agePolicy) const = 0; /** @@ -147,7 +147,7 @@ class IMetrics * * @retval The success state or error */ - virtual Result mediaPlay(const std::string& entityId, + virtual Result mediaPlay(const std::string& entityId, const std::optional& agePolicy) const = 0; /** @@ -159,7 +159,7 @@ class IMetrics * * @retval The success state or error */ - virtual Result mediaPause(const std::string& entityId, + virtual Result mediaPause(const std::string& entityId, const std::optional& agePolicy) const = 0; /** @@ -171,7 +171,7 @@ class IMetrics * * @retval The success state or error */ - virtual Result mediaWaiting(const std::string& entityId, + virtual Result mediaWaiting(const std::string& entityId, const std::optional& agePolicy) const = 0; /** @@ -185,7 +185,7 @@ class IMetrics * * @retval The success state or error */ - virtual Result mediaSeeking(const std::string& entityId, const double target, + virtual Result mediaSeeking(const std::string& entityId, const double target, const std::optional& agePolicy) const = 0; /** @@ -200,7 +200,7 @@ class IMetrics * * @retval The success state or error */ - virtual Result mediaSeeked(const std::string& entityId, const double position, + virtual Result mediaSeeked(const std::string& entityId, const double position, const std::optional& agePolicy) const = 0; /** @@ -213,7 +213,7 @@ class IMetrics * * @retval The success state or error */ - virtual Result mediaRateChanged(const std::string& entityId, const double rate, + virtual Result mediaRateChanged(const std::string& entityId, const double rate, const std::optional& agePolicy) const = 0; /** @@ -229,7 +229,7 @@ class IMetrics * * @retval The success state or error */ - virtual Result mediaRenditionChanged(const std::string& entityId, const unsigned bitrate, const unsigned width, + virtual Result mediaRenditionChanged(const std::string& entityId, const unsigned bitrate, const unsigned width, const unsigned height, const std::optional& profile, const std::optional& agePolicy) const = 0; @@ -242,7 +242,7 @@ class IMetrics * * @retval The success state or error */ - virtual Result mediaEnded(const std::string& entityId, + virtual Result mediaEnded(const std::string& entityId, const std::optional& agePolicy) const = 0; /** @@ -255,7 +255,7 @@ class IMetrics * * @retval The success state or error */ - virtual Result event(const std::string& schema, const std::string& data, + virtual Result event(const std::string& schema, const std::string& data, const std::optional& agePolicy) const = 0; /** diff --git a/src/discovery_impl.cpp b/src/discovery_impl.cpp index cc209c0..e653777 100644 --- a/src/discovery_impl.cpp +++ b/src/discovery_impl.cpp @@ -27,7 +27,7 @@ DiscoveryImpl::DiscoveryImpl(Firebolt::Helpers::IHelper& helper) { } -Result DiscoveryImpl::watched(const std::string& entityId, std::optional progress, +Result DiscoveryImpl::watched(const std::string& entityId, std::optional progress, std::optional completed, std::optional watchedOn, std::optional agePolicy) const { @@ -50,11 +50,6 @@ Result DiscoveryImpl::watched(const std::string& entityId, std::optional result = helper_.get("Discovery.watched", parameters); - if (!result) - { - return Result{result.error()}; - } - return Result{result.value()}; + return helper_.invoke("Discovery.watched", parameters); } } // namespace Firebolt::Discovery diff --git a/src/discovery_impl.h b/src/discovery_impl.h index 30a78f8..34e12f1 100644 --- a/src/discovery_impl.h +++ b/src/discovery_impl.h @@ -33,7 +33,7 @@ class DiscoveryImpl : public IDiscovery ~DiscoveryImpl() override = default; - Result watched(const std::string& entityId, std::optional progress, std::optional completed, + Result watched(const std::string& entityId, std::optional progress, std::optional completed, std::optional watchedOn, std::optional agePolicy) const override; diff --git a/src/metrics_impl.cpp b/src/metrics_impl.cpp index 892be95..9f29027 100644 --- a/src/metrics_impl.cpp +++ b/src/metrics_impl.cpp @@ -28,22 +28,22 @@ MetricsImpl::MetricsImpl(Firebolt::Helpers::IHelper& helper) { } -Result MetricsImpl::ready() const +Result MetricsImpl::ready() const { - return helper_.get("Metrics.ready"); + return helper_.invoke("Metrics.ready", nlohmann::json({})); } -Result MetricsImpl::signIn() const +Result MetricsImpl::signIn() const { - return helper_.get("Metrics.signIn"); + return helper_.invoke("Metrics.signIn", nlohmann::json({})); } -Result MetricsImpl::signOut() const +Result MetricsImpl::signOut() const { - return helper_.get("Metrics.signOut"); + return helper_.invoke("Metrics.signOut", nlohmann::json({})); } -Result MetricsImpl::startContent(const std::optional& entityId, +Result MetricsImpl::startContent(const std::optional& entityId, const std::optional agePolicy) const { nlohmann::json parameters; @@ -55,10 +55,10 @@ Result MetricsImpl::startContent(const std::optional& entityI { parameters["agePolicy"] = Firebolt::JSON::toString(Firebolt::JsonData::AgePolicyEnum, *agePolicy); } - return helper_.get("Metrics.startContent", parameters); + return helper_.invoke("Metrics.startContent", parameters); } -Result MetricsImpl::stopContent(const std::optional& entityId, +Result MetricsImpl::stopContent(const std::optional& entityId, const std::optional agePolicy) const { nlohmann::json parameters; @@ -70,10 +70,10 @@ Result MetricsImpl::stopContent(const std::optional& entityId { parameters["agePolicy"] = Firebolt::JSON::toString(Firebolt::JsonData::AgePolicyEnum, *agePolicy); } - return helper_.get("Metrics.stopContent", parameters); + return helper_.invoke("Metrics.stopContent", parameters); } -Result MetricsImpl::page(const std::string& pageId, const std::optional& agePolicy) const +Result MetricsImpl::page(const std::string& pageId, const std::optional& agePolicy) const { nlohmann::json parameters; parameters["pageId"] = pageId; @@ -81,10 +81,10 @@ Result MetricsImpl::page(const std::string& pageId, const std::optional("Metrics.page", parameters); + return helper_.invoke("Metrics.page", parameters); } -Result MetricsImpl::error(const ErrorType type, const std::string& code, const std::string& description, +Result MetricsImpl::error(const ErrorType type, const std::string& code, const std::string& description, const bool visible, const std::optional>& parameters, const std::optional& agePolicy) const { @@ -106,10 +106,10 @@ Result MetricsImpl::error(const ErrorType type, const std::string& code, c { jsonParameters["agePolicy"] = Firebolt::JSON::toString(Firebolt::JsonData::AgePolicyEnum, *agePolicy); } - return helper_.get("Metrics.error", jsonParameters); + return helper_.invoke("Metrics.error", jsonParameters); } -Result MetricsImpl::mediaLoadStart(const std::string& entityId, +Result MetricsImpl::mediaLoadStart(const std::string& entityId, const std::optional& agePolicy) const { nlohmann::json parameters; @@ -118,10 +118,10 @@ Result MetricsImpl::mediaLoadStart(const std::string& entityId, { parameters["agePolicy"] = Firebolt::JSON::toString(Firebolt::JsonData::AgePolicyEnum, *agePolicy); } - return helper_.get("Metrics.mediaLoadStart", parameters); + return helper_.invoke("Metrics.mediaLoadStart", parameters); } -Result MetricsImpl::mediaPlay(const std::string& entityId, const std::optional& agePolicy) const +Result MetricsImpl::mediaPlay(const std::string& entityId, const std::optional& agePolicy) const { nlohmann::json parameters; parameters["entityId"] = entityId; @@ -129,10 +129,10 @@ Result MetricsImpl::mediaPlay(const std::string& entityId, const std::opti { parameters["agePolicy"] = Firebolt::JSON::toString(Firebolt::JsonData::AgePolicyEnum, *agePolicy); } - return helper_.get("Metrics.mediaPlay", parameters); + return helper_.invoke("Metrics.mediaPlay", parameters); } -Result MetricsImpl::mediaPlaying(const std::string& entityId, +Result MetricsImpl::mediaPlaying(const std::string& entityId, const std::optional& agePolicy) const { nlohmann::json parameters; @@ -141,10 +141,10 @@ Result MetricsImpl::mediaPlaying(const std::string& entityId, { parameters["agePolicy"] = Firebolt::JSON::toString(Firebolt::JsonData::AgePolicyEnum, *agePolicy); } - return helper_.get("Metrics.mediaPlaying", parameters); + return helper_.invoke("Metrics.mediaPlaying", parameters); } -Result MetricsImpl::mediaPause(const std::string& entityId, const std::optional& agePolicy) const +Result MetricsImpl::mediaPause(const std::string& entityId, const std::optional& agePolicy) const { nlohmann::json parameters; parameters["entityId"] = entityId; @@ -152,10 +152,10 @@ Result MetricsImpl::mediaPause(const std::string& entityId, const std::opt { parameters["agePolicy"] = Firebolt::JSON::toString(Firebolt::JsonData::AgePolicyEnum, *agePolicy); } - return helper_.get("Metrics.mediaPause", parameters); + return helper_.invoke("Metrics.mediaPause", parameters); } -Result MetricsImpl::mediaWaiting(const std::string& entityId, +Result MetricsImpl::mediaWaiting(const std::string& entityId, const std::optional& agePolicy) const { nlohmann::json parameters; @@ -164,10 +164,10 @@ Result MetricsImpl::mediaWaiting(const std::string& entityId, { parameters["agePolicy"] = Firebolt::JSON::toString(Firebolt::JsonData::AgePolicyEnum, *agePolicy); } - return helper_.get("Metrics.mediaWaiting", parameters); + return helper_.invoke("Metrics.mediaWaiting", parameters); } -Result MetricsImpl::mediaSeeking(const std::string& entityId, const double target, +Result MetricsImpl::mediaSeeking(const std::string& entityId, const double target, const std::optional& agePolicy) const { nlohmann::json parameters; @@ -177,10 +177,10 @@ Result MetricsImpl::mediaSeeking(const std::string& entityId, const double { parameters["agePolicy"] = Firebolt::JSON::toString(Firebolt::JsonData::AgePolicyEnum, *agePolicy); } - return helper_.get("Metrics.mediaSeeking", parameters); + return helper_.invoke("Metrics.mediaSeeking", parameters); } -Result MetricsImpl::mediaSeeked(const std::string& entityId, const double position, +Result MetricsImpl::mediaSeeked(const std::string& entityId, const double position, const std::optional& agePolicy) const { nlohmann::json parameters; @@ -190,10 +190,10 @@ Result MetricsImpl::mediaSeeked(const std::string& entityId, const double { parameters["agePolicy"] = Firebolt::JSON::toString(Firebolt::JsonData::AgePolicyEnum, *agePolicy); } - return helper_.get("Metrics.mediaSeeked", parameters); + return helper_.invoke("Metrics.mediaSeeked", parameters); } -Result MetricsImpl::mediaRateChanged(const std::string& entityId, const double rate, +Result MetricsImpl::mediaRateChanged(const std::string& entityId, const double rate, const std::optional& agePolicy) const { nlohmann::json parameters; @@ -203,10 +203,10 @@ Result MetricsImpl::mediaRateChanged(const std::string& entityId, const do { parameters["agePolicy"] = Firebolt::JSON::toString(Firebolt::JsonData::AgePolicyEnum, *agePolicy); } - return helper_.get("Metrics.mediaRateChanged", parameters); + return helper_.invoke("Metrics.mediaRateChanged", parameters); } -Result MetricsImpl::mediaRenditionChanged(const std::string& entityId, const unsigned bitrate, const unsigned width, +Result MetricsImpl::mediaRenditionChanged(const std::string& entityId, const unsigned bitrate, const unsigned width, const unsigned height, const std::optional& profile, const std::optional& agePolicy) const { @@ -223,10 +223,10 @@ Result MetricsImpl::mediaRenditionChanged(const std::string& entityId, con { parameters["agePolicy"] = Firebolt::JSON::toString(Firebolt::JsonData::AgePolicyEnum, *agePolicy); } - return helper_.get("Metrics.mediaRenditionChanged", parameters); + return helper_.invoke("Metrics.mediaRenditionChanged", parameters); } -Result MetricsImpl::mediaEnded(const std::string& entityId, const std::optional& agePolicy) const +Result MetricsImpl::mediaEnded(const std::string& entityId, const std::optional& agePolicy) const { nlohmann::json parameters; parameters["entityId"] = entityId; @@ -234,10 +234,10 @@ Result MetricsImpl::mediaEnded(const std::string& entityId, const std::opt { parameters["agePolicy"] = Firebolt::JSON::toString(Firebolt::JsonData::AgePolicyEnum, *agePolicy); } - return helper_.get("Metrics.mediaEnded", parameters); + return helper_.invoke("Metrics.mediaEnded", parameters); } -Result MetricsImpl::event(const std::string& schema, const std::string& data, +Result MetricsImpl::event(const std::string& schema, const std::string& data, const std::optional& agePolicy) const { nlohmann::json parameters; @@ -247,7 +247,7 @@ Result MetricsImpl::event(const std::string& schema, const std::string& da { parameters["agePolicy"] = Firebolt::JSON::toString(Firebolt::JsonData::AgePolicyEnum, *agePolicy); } - return helper_.get("Metrics.event", parameters); + return helper_.invoke("Metrics.event", parameters); } Result MetricsImpl::appInfo(const std::string& build) const diff --git a/src/metrics_impl.h b/src/metrics_impl.h index 4eb0da6..ace303b 100644 --- a/src/metrics_impl.h +++ b/src/metrics_impl.h @@ -32,39 +32,39 @@ class MetricsImpl : public IMetrics ~MetricsImpl() override = default; - Result ready() const override; - Result signIn() const override; - Result signOut() const override; - Result startContent(const std::optional& entityId, + Result ready() const override; + Result signIn() const override; + Result signOut() const override; + Result startContent(const std::optional& entityId, const std::optional agePolicy) const override; - Result stopContent(const std::optional& entityId, + Result stopContent(const std::optional& entityId, const std::optional agePolicy) const override; - Result page(const std::string& pageId, const std::optional& agePolicy) const override; - Result error(const ErrorType type, const std::string& code, const std::string& description, + Result page(const std::string& pageId, const std::optional& agePolicy) const override; + Result error(const ErrorType type, const std::string& code, const std::string& description, const bool visible, const std::optional>& parameters, const std::optional& agePolicy) const override; - Result mediaLoadStart(const std::string& entityId, + Result mediaLoadStart(const std::string& entityId, const std::optional& agePolicy) const override; - Result mediaPlay(const std::string& entityId, + Result mediaPlay(const std::string& entityId, const std::optional& agePolicy) const override; - Result mediaPlaying(const std::string& entityId, + Result mediaPlaying(const std::string& entityId, const std::optional& agePolicy) const override; - Result mediaPause(const std::string& entityId, + Result mediaPause(const std::string& entityId, const std::optional& agePolicy) const override; - Result mediaWaiting(const std::string& entityId, + Result mediaWaiting(const std::string& entityId, const std::optional& agePolicy) const override; - Result mediaSeeking(const std::string& entityId, const double target, + Result mediaSeeking(const std::string& entityId, const double target, const std::optional& agePolicy) const override; - Result mediaSeeked(const std::string& entityId, const double position, + Result mediaSeeked(const std::string& entityId, const double position, const std::optional& agePolicy) const override; - Result mediaRateChanged(const std::string& entityId, const double rate, + Result mediaRateChanged(const std::string& entityId, const double rate, const std::optional& agePolicy) const override; - Result mediaRenditionChanged(const std::string& entityId, const unsigned bitrate, const unsigned width, + Result mediaRenditionChanged(const std::string& entityId, const unsigned bitrate, const unsigned width, const unsigned height, const std::optional& profile, const std::optional& agePolicy) const override; - Result mediaEnded(const std::string& entityId, + Result mediaEnded(const std::string& entityId, const std::optional& agePolicy) const override; - Result event(const std::string& schema, const std::string& data, + Result event(const std::string& schema, const std::string& data, const std::optional& agePolicy) const override; Result appInfo(const std::string& build) const override; diff --git a/test/api_test_app/apis/discoveryDemo.cpp b/test/api_test_app/apis/discoveryDemo.cpp index 0e3afba..5e0b9d6 100644 --- a/test/api_test_app/apis/discoveryDemo.cpp +++ b/test/api_test_app/apis/discoveryDemo.cpp @@ -61,7 +61,7 @@ void DiscoveryDemo::runOption(const std::string& method) watchedOn, agePolicyOpt); if (succeed(r)) { - std::cout << "Discovery.watched result: " << std::boolalpha << *r << std::endl; + std::cout << "Discovery.watched: Success" << std::endl; } } } diff --git a/test/api_test_app/apis/metricsDemo.cpp b/test/api_test_app/apis/metricsDemo.cpp index e494cd0..9ac520d 100644 --- a/test/api_test_app/apis/metricsDemo.cpp +++ b/test/api_test_app/apis/metricsDemo.cpp @@ -56,7 +56,7 @@ void MetricsDemo::runOption(const std::string& method) auto r = Firebolt::IFireboltAccessor::Instance().MetricsInterface().ready(); if (succeed(r)) { - std::cout << "Metrics Ready: " << std::boolalpha << *r << std::endl; + std::cout << "Metrics Ready: Success" << std::endl; } } else if (method == "Metrics.signIn") @@ -64,7 +64,7 @@ void MetricsDemo::runOption(const std::string& method) auto r = Firebolt::IFireboltAccessor::Instance().MetricsInterface().signIn(); if (succeed(r)) { - std::cout << "Metrics Sign In: " << std::boolalpha << *r << std::endl; + std::cout << "Metrics Sign In: Success" << std::endl; } } else if (method == "Metrics.signOut") @@ -72,7 +72,7 @@ void MetricsDemo::runOption(const std::string& method) auto r = Firebolt::IFireboltAccessor::Instance().MetricsInterface().signOut(); if (succeed(r)) { - std::cout << "Metrics Sign Out: " << std::boolalpha << *r << std::endl; + std::cout << "Metrics Sign Out: Success" << std::endl; } } else if (method == "Metrics.startContent") @@ -80,7 +80,7 @@ void MetricsDemo::runOption(const std::string& method) auto r = Firebolt::IFireboltAccessor::Instance().MetricsInterface().startContent("entity123", std::nullopt); if (succeed(r)) { - std::cout << "Metrics Start Content: " << std::boolalpha << *r << std::endl; + std::cout << "Metrics Start Content: Success" << std::endl; } } else if (method == "Metrics.stopContent") @@ -88,7 +88,7 @@ void MetricsDemo::runOption(const std::string& method) auto r = Firebolt::IFireboltAccessor::Instance().MetricsInterface().stopContent("entity123", std::nullopt); if (succeed(r)) { - std::cout << "Metrics Stop Content: " << std::boolalpha << *r << std::endl; + std::cout << "Metrics Stop Content: Success" << std::endl; } } else if (method == "Metrics.page") @@ -96,7 +96,7 @@ void MetricsDemo::runOption(const std::string& method) auto r = Firebolt::IFireboltAccessor::Instance().MetricsInterface().page("page123", std::nullopt); if (succeed(r)) { - std::cout << "Metrics Page: " << std::boolalpha << *r << std::endl; + std::cout << "Metrics Page: Success" << std::endl; } } else if (method == "Metrics.error") @@ -106,7 +106,7 @@ void MetricsDemo::runOption(const std::string& method) std::nullopt, std::nullopt); if (succeed(r)) { - std::cout << "Metrics Error: " << std::boolalpha << *r << std::endl; + std::cout << "Metrics Error: Success" << std::endl; } } else if (method == "Metrics.mediaLoadStart") @@ -114,7 +114,7 @@ void MetricsDemo::runOption(const std::string& method) auto r = Firebolt::IFireboltAccessor::Instance().MetricsInterface().mediaLoadStart("entity123", std::nullopt); if (succeed(r)) { - std::cout << "Metrics Media Load Start: " << std::boolalpha << *r << std::endl; + std::cout << "Metrics Media Load Start: Success" << std::endl; } } else if (method == "Metrics.mediaPlay") @@ -122,7 +122,7 @@ void MetricsDemo::runOption(const std::string& method) auto r = Firebolt::IFireboltAccessor::Instance().MetricsInterface().mediaPlay("entity123", std::nullopt); if (succeed(r)) { - std::cout << "Metrics Media Play: " << std::boolalpha << *r << std::endl; + std::cout << "Metrics Media Play: Success" << std::endl; } } else if (method == "Metrics.mediaPlaying") @@ -130,7 +130,7 @@ void MetricsDemo::runOption(const std::string& method) auto r = Firebolt::IFireboltAccessor::Instance().MetricsInterface().mediaPlaying("entity123", std::nullopt); if (succeed(r)) { - std::cout << "Metrics Media Playing: " << std::boolalpha << *r << std::endl; + std::cout << "Metrics Media Playing: Success" << std::endl; } } else if (method == "Metrics.mediaPause") @@ -138,7 +138,7 @@ void MetricsDemo::runOption(const std::string& method) auto r = Firebolt::IFireboltAccessor::Instance().MetricsInterface().mediaPause("entity123", std::nullopt); if (succeed(r)) { - std::cout << "Metrics Media Pause: " << std::boolalpha << *r << std::endl; + std::cout << "Metrics Media Pause: Success" << std::endl; } } else if (method == "Metrics.mediaWaiting") @@ -146,7 +146,7 @@ void MetricsDemo::runOption(const std::string& method) auto r = Firebolt::IFireboltAccessor::Instance().MetricsInterface().mediaWaiting("entity123", std::nullopt); if (succeed(r)) { - std::cout << "Metrics Media Waiting: " << std::boolalpha << *r << std::endl; + std::cout << "Metrics Media Waiting: Success" << std::endl; } } else if (method == "Metrics.mediaSeeking") @@ -154,7 +154,7 @@ void MetricsDemo::runOption(const std::string& method) auto r = Firebolt::IFireboltAccessor::Instance().MetricsInterface().mediaSeeking("entity123", 0.5, std::nullopt); if (succeed(r)) { - std::cout << "Metrics Media Seeking: " << std::boolalpha << *r << std::endl; + std::cout << "Metrics Media Seeking: Success" << std::endl; } } else if (method == "Metrics.mediaSeeked") @@ -162,7 +162,7 @@ void MetricsDemo::runOption(const std::string& method) auto r = Firebolt::IFireboltAccessor::Instance().MetricsInterface().mediaSeeked("entity123", 0.5, std::nullopt); if (succeed(r)) { - std::cout << "Metrics Media Seeked: " << std::boolalpha << *r << std::endl; + std::cout << "Metrics Media Seeked: Success" << std::endl; } } else if (method == "Metrics.mediaRateChanged") @@ -171,7 +171,7 @@ void MetricsDemo::runOption(const std::string& method) Firebolt::IFireboltAccessor::Instance().MetricsInterface().mediaRateChanged("entity123", 1.5, std::nullopt); if (succeed(r)) { - std::cout << "Metrics Media Rate Changed: " << std::boolalpha << *r << std::endl; + std::cout << "Metrics Media Rate Changed: Success" << std::endl; } } else if (method == "Metrics.mediaRenditionChanged") @@ -181,7 +181,7 @@ void MetricsDemo::runOption(const std::string& method) std::nullopt); if (succeed(r)) { - std::cout << "Metrics Media Rendition Changed: " << std::boolalpha << *r << std::endl; + std::cout << "Metrics Media Rendition Changed: Success" << std::endl; } } else if (method == "Metrics.mediaEnded") @@ -189,7 +189,7 @@ void MetricsDemo::runOption(const std::string& method) auto r = Firebolt::IFireboltAccessor::Instance().MetricsInterface().mediaEnded("entity123", std::nullopt); if (succeed(r)) { - std::cout << "Metrics Media Ended: " << std::boolalpha << *r << std::endl; + std::cout << "Metrics Media Ended: Success" << std::endl; } } else if (method == "Metrics.event") @@ -198,7 +198,7 @@ void MetricsDemo::runOption(const std::string& method) "{\"key\":\"value\"}", std::nullopt); if (succeed(r)) { - std::cout << "Metrics Event: " << std::boolalpha << *r << std::endl; + std::cout << "Metrics Event: Success" << std::endl; } } else if (method == "Metrics.appInfo") diff --git a/test/component/discoveryTest.cpp b/test/component/discoveryTest.cpp index bc118b6..c1cfcf1 100644 --- a/test/component/discoveryTest.cpp +++ b/test/component/discoveryTest.cpp @@ -18,12 +18,10 @@ #include "firebolt/discovery.h" #include "firebolt/firebolt.h" -#include "json_engine.h" +#include class DiscoveryCTest : public ::testing::Test { -protected: - JsonEngine jsonEngine; }; TEST_F(DiscoveryCTest, Watched) @@ -32,7 +30,4 @@ TEST_F(DiscoveryCTest, Watched) "2024-10-01T12:00:00Z", Firebolt::AgePolicy::ADULT); ASSERT_TRUE(result) << "Failed to call watched"; - - auto expectedValue = jsonEngine.get_value("Discovery.watched"); - EXPECT_EQ(*result, expectedValue.get()); } diff --git a/test/component/metricsTest.cpp b/test/component/metricsTest.cpp index e626a6d..9e1d6fc 100644 --- a/test/component/metricsTest.cpp +++ b/test/component/metricsTest.cpp @@ -17,7 +17,6 @@ */ #include "firebolt/firebolt.h" -#include "json_engine.h" #include "utils.h" #include @@ -25,235 +24,185 @@ class MetricsCTest : public ::testing::Test { protected: void SetUp() override {} - - JsonEngine jsonEngine; }; TEST_F(MetricsCTest, Ready) { - auto expectedValue = jsonEngine.get_value("Metrics.ready"); auto result = Firebolt::IFireboltAccessor::Instance().MetricsInterface().ready(); ASSERT_TRUE(result) << "MetricsImpl::ready() returned an error"; - EXPECT_EQ(*result, expectedValue); } TEST_F(MetricsCTest, SignIn) { - auto expectedValue = jsonEngine.get_value("Metrics.signIn"); auto result = Firebolt::IFireboltAccessor::Instance().MetricsInterface().signIn(); ASSERT_TRUE(result) << "MetricsImpl::signIn() returned an error"; - EXPECT_EQ(*result, expectedValue); } TEST_F(MetricsCTest, SignOut) { - auto expectedValue = jsonEngine.get_value("Metrics.signOut"); auto result = Firebolt::IFireboltAccessor::Instance().MetricsInterface().signOut(); ASSERT_TRUE(result) << "MetricsImpl::signOut() returned an error"; - EXPECT_EQ(*result, expectedValue); } TEST_F(MetricsCTest, StartContent) { - auto expectedValue = jsonEngine.get_value("Metrics.startContent"); auto result = Firebolt::IFireboltAccessor::Instance().MetricsInterface().startContent("entity123", Firebolt::AgePolicy::ADULT); ASSERT_TRUE(result) << "MetricsImpl::startContent() returned an error"; - EXPECT_EQ(*result, expectedValue); } TEST_F(MetricsCTest, StopContent) { - auto expectedValue = jsonEngine.get_value("Metrics.stopContent"); auto result = Firebolt::IFireboltAccessor::Instance().MetricsInterface().stopContent("entity123", Firebolt::AgePolicy::ADULT); ASSERT_TRUE(result) << "MetricsImpl::stopContent() returned an error"; - EXPECT_EQ(*result, expectedValue); } TEST_F(MetricsCTest, Page) { - auto expectedValue = jsonEngine.get_value("Metrics.page"); auto result = Firebolt::IFireboltAccessor::Instance().MetricsInterface().page("homePage", Firebolt::AgePolicy::ADULT); ASSERT_TRUE(result) << "MetricsImpl::page() returned an error"; - EXPECT_EQ(*result, expectedValue); } TEST_F(MetricsCTest, Error) { - auto expectedValue = jsonEngine.get_value("Metrics.error"); auto result = Firebolt::IFireboltAccessor::Instance() .MetricsInterface() .error(Firebolt::Metrics::ErrorType::Network, "ERR001", "Network error occurred", true, std::map{{"param1", "value1"}, {"param2", "value2"}}, Firebolt::AgePolicy::ADULT); ASSERT_TRUE(result) << "MetricsImpl::error() returned an error"; - EXPECT_EQ(*result, expectedValue); } TEST_F(MetricsCTest, ErrorNoParameters) { - auto expectedValue = jsonEngine.get_value("Metrics.error"); auto result = Firebolt::IFireboltAccessor::Instance().MetricsInterface().error(Firebolt::Metrics::ErrorType::Network, "ERR001", "Network error occurred", true, std::nullopt, Firebolt::AgePolicy::ADULT); ASSERT_TRUE(result) << "MetricsImpl::error() returned an error"; - EXPECT_EQ(*result, expectedValue); } TEST_F(MetricsCTest, ErrorNoAgePolicy) { - auto expectedValue = jsonEngine.get_value("Metrics.error"); auto result = Firebolt::IFireboltAccessor::Instance() .MetricsInterface() .error(Firebolt::Metrics::ErrorType::Network, "ERR001", "Network error occurred", true, std::map{{"param1", "value1"}, {"param2", "value2"}}, std::nullopt); ASSERT_TRUE(result) << "MetricsImpl::error() returned an error"; - EXPECT_EQ(*result, expectedValue); } TEST_F(MetricsCTest, MediaLoadStart) { - auto expectedValue = jsonEngine.get_value("Metrics.mediaLoadStart"); auto result = Firebolt::IFireboltAccessor::Instance().MetricsInterface().mediaLoadStart("mediaEntity123", Firebolt::AgePolicy::ADULT); ASSERT_TRUE(result) << "MetricsImpl::mediaLoadStart() returned an error"; - EXPECT_EQ(*result, expectedValue); } TEST_F(MetricsCTest, MediaPlay) { - auto expectedValue = jsonEngine.get_value("Metrics.mediaPlay"); auto result = Firebolt::IFireboltAccessor::Instance().MetricsInterface().mediaPlay("mediaEntity123", Firebolt::AgePolicy::ADULT); ASSERT_TRUE(result) << "MetricsImpl::mediaPlay() returned an error"; - EXPECT_EQ(*result, expectedValue); } TEST_F(MetricsCTest, MediaPlaying) { - auto expectedValue = jsonEngine.get_value("Metrics.mediaPlaying"); auto result = Firebolt::IFireboltAccessor::Instance().MetricsInterface().mediaPlaying("mediaEntity123", Firebolt::AgePolicy::ADULT); ASSERT_TRUE(result) << "MetricsImpl::mediaPlaying() returned an error"; - EXPECT_EQ(*result, expectedValue); } TEST_F(MetricsCTest, MediaPause) { - auto expectedValue = jsonEngine.get_value("Metrics.mediaPause"); auto result = Firebolt::IFireboltAccessor::Instance().MetricsInterface().mediaPause("mediaEntity123", Firebolt::AgePolicy::ADULT); ASSERT_TRUE(result) << "MetricsImpl::mediaPause() returned an error"; - EXPECT_EQ(*result, expectedValue); } TEST_F(MetricsCTest, MediaWaiting) { - auto expectedValue = jsonEngine.get_value("Metrics.mediaWaiting"); auto result = Firebolt::IFireboltAccessor::Instance().MetricsInterface().mediaWaiting("mediaEntity123", Firebolt::AgePolicy::ADULT); ASSERT_TRUE(result) << "MetricsImpl::mediaWaiting() returned an error"; - EXPECT_EQ(*result, expectedValue); } TEST_F(MetricsCTest, MediaSeeking) { - auto expectedValue = jsonEngine.get_value("Metrics.mediaSeeking"); auto result = Firebolt::IFireboltAccessor::Instance().MetricsInterface().mediaSeeking("mediaEntity123", 0.5, Firebolt::AgePolicy::ADULT); ASSERT_TRUE(result) << "MetricsImpl::mediaSeeking() returned an error"; - EXPECT_EQ(*result, expectedValue); } TEST_F(MetricsCTest, MediaSeekingInt) { - auto expectedValue = jsonEngine.get_value("Metrics.mediaSeeking"); auto result = Firebolt::IFireboltAccessor::Instance().MetricsInterface().mediaSeeking("mediaEntity123", 500, Firebolt::AgePolicy::ADULT); ASSERT_TRUE(result) << "MetricsImpl::mediaSeeking() returned an error"; - EXPECT_EQ(*result, expectedValue); } TEST_F(MetricsCTest, MediaSeeked) { - auto expectedValue = jsonEngine.get_value("Metrics.mediaSeeked"); auto result = Firebolt::IFireboltAccessor::Instance().MetricsInterface().mediaSeeked("mediaEntity123", 0.5, Firebolt::AgePolicy::ADULT); ASSERT_TRUE(result) << "MetricsImpl::mediaSeeked() returned an error"; - EXPECT_EQ(*result, expectedValue); } TEST_F(MetricsCTest, MediaSeekedInt) { - auto expectedValue = jsonEngine.get_value("Metrics.mediaSeeked"); auto result = Firebolt::IFireboltAccessor::Instance().MetricsInterface().mediaSeeked("mediaEntity123", 500, Firebolt::AgePolicy::ADULT); ASSERT_TRUE(result) << "MetricsImpl::mediaSeeked() returned an error"; - EXPECT_EQ(*result, expectedValue); } TEST_F(MetricsCTest, MediaRateChanged) { - auto expectedValue = jsonEngine.get_value("Metrics.mediaRateChanged"); auto result = Firebolt::IFireboltAccessor::Instance().MetricsInterface().mediaRateChanged("mediaEntity123", 1.5, Firebolt::AgePolicy::ADULT); ASSERT_TRUE(result) << "MetricsImpl::mediaRateChanged() returned an error"; - EXPECT_EQ(*result, expectedValue); } TEST_F(MetricsCTest, MediaRenditionChanged) { - auto expectedValue = jsonEngine.get_value("Metrics.mediaRenditionChanged"); auto result = Firebolt::IFireboltAccessor::Instance().MetricsInterface().mediaRenditionChanged("mediaEntity123", 3000, 1920, 1080, "HDR", Firebolt::AgePolicy::ADULT); ASSERT_TRUE(result) << "MetricsImpl::mediaRenditionChanged() returned an error"; - EXPECT_EQ(*result, expectedValue); } TEST_F(MetricsCTest, MediaRenditionChangedNoProfile) { - auto expectedValue = jsonEngine.get_value("Metrics.mediaRenditionChanged"); auto result = Firebolt::IFireboltAccessor::Instance().MetricsInterface().mediaRenditionChanged("mediaEntity123", 3000, 1920, 1080, std::nullopt, Firebolt::AgePolicy::ADULT); ASSERT_TRUE(result) << "MetricsImpl::mediaRenditionChanged() returned an error"; - EXPECT_EQ(*result, expectedValue); } TEST_F(MetricsCTest, MediaRenditionChangedNoAgePolicy) { - auto expectedValue = jsonEngine.get_value("Metrics.mediaRenditionChanged"); auto result = Firebolt::IFireboltAccessor::Instance().MetricsInterface().mediaRenditionChanged("mediaEntity123", 3000, 1920, 1080, std::nullopt, std::nullopt); ASSERT_TRUE(result) << "MetricsImpl::mediaRenditionChanged() returned an error"; - EXPECT_EQ(*result, expectedValue); } TEST_F(MetricsCTest, MediaEnded) { - auto expectedValue = jsonEngine.get_value("Metrics.mediaEnded"); auto result = Firebolt::IFireboltAccessor::Instance().MetricsInterface().mediaEnded("mediaEntity123", Firebolt::AgePolicy::ADULT); ASSERT_TRUE(result) << "MetricsImpl::mediaEnded() returned an error"; - EXPECT_EQ(*result, expectedValue); } TEST_F(MetricsCTest, Event) { - auto expectedValue = jsonEngine.get_value("Metrics.event"); auto result = Firebolt::IFireboltAccessor::Instance().MetricsInterface().event("https://com.example.event", "{\"key\":\"value\"}", Firebolt::AgePolicy::ADULT); ASSERT_TRUE(result) << "MetricsImpl::event() returned an error"; - EXPECT_EQ(*result, expectedValue); } TEST_F(MetricsCTest, AppInfo) diff --git a/test/unit/discoveryTest.cpp b/test/unit/discoveryTest.cpp index 4e1c3ce..9b7b1b1 100644 --- a/test/unit/discoveryTest.cpp +++ b/test/unit/discoveryTest.cpp @@ -36,7 +36,7 @@ TEST_F(DiscoveryUTest, checkEnums) TEST_F(DiscoveryUTest, watched) { - mock("Discovery.watched"); + mockInvoke("Discovery.watched"); std::string entityId = "content123"; std::optional progress = 0.75f; std::optional completed = true; @@ -44,9 +44,6 @@ TEST_F(DiscoveryUTest, watched) std::optional agePolicy = Firebolt::AgePolicy::ADULT; auto result = discoveryImpl_.watched(entityId, progress, completed, watchedOn, agePolicy); ASSERT_TRUE(result) << "Error on watched"; - Firebolt::JSON::Boolean boolJson; - boolJson.fromJson(jsonEngine.get_value("Discovery.watched")); - EXPECT_EQ(boolJson.value(), *result); } TEST_F(DiscoveryUTest, watched_payload) @@ -57,14 +54,13 @@ TEST_F(DiscoveryUTest, watched_payload) expected["completed"] = true; expected["watchedOn"] = "2024-06-01T12:00:00Z"; expected["agePolicy"] = "app:adult"; - EXPECT_CALL(mockHelper, getJson("Discovery.watched", _)) + EXPECT_CALL(mockHelper, invoke("Discovery.watched", _)) .WillOnce(Invoke( [&](const std::string& /* methodName */, const nlohmann::json& parameters) { - bool res = parameters == expected; EXPECT_EQ(parameters, expected) << "Parameters do not match expected payload: " << expected.dump() << " but got: " << parameters.dump(); - return Firebolt::Result{res}; + return Firebolt::Result{Firebolt::Error::None}; })); std::string entityId = "content123"; std::optional progress = 0.75f; @@ -73,5 +69,4 @@ TEST_F(DiscoveryUTest, watched_payload) std::optional agePolicy = Firebolt::AgePolicy::ADULT; auto result = discoveryImpl_.watched(entityId, progress, completed, watchedOn, agePolicy); ASSERT_TRUE(result) << "Error on watched"; - EXPECT_EQ(true, *result); } diff --git a/test/unit/metricsTest.cpp b/test/unit/metricsTest.cpp index 321c6d1..a7dbcab 100644 --- a/test/unit/metricsTest.cpp +++ b/test/unit/metricsTest.cpp @@ -33,49 +33,49 @@ TEST_F(MetricsUTest, checkEnums) TEST_F(MetricsUTest, Ready) { - mock("Metrics.ready"); + mockInvoke("Metrics.ready"); auto result = metricsImpl_.ready(); EXPECT_TRUE(result); } TEST_F(MetricsUTest, SignIn) { - mock("Metrics.signIn"); + mockInvoke("Metrics.signIn"); auto result = metricsImpl_.signIn(); EXPECT_TRUE(result); } TEST_F(MetricsUTest, SignOut) { - mock("Metrics.signOut"); + mockInvoke("Metrics.signOut"); auto result = metricsImpl_.signOut(); EXPECT_TRUE(result); } TEST_F(MetricsUTest, StartContent) { - mock("Metrics.startContent"); + mockInvoke("Metrics.startContent"); auto result = metricsImpl_.startContent("entity123", Firebolt::AgePolicy::ADULT); EXPECT_TRUE(result); } TEST_F(MetricsUTest, StopContent) { - mock("Metrics.stopContent"); + mockInvoke("Metrics.stopContent"); auto result = metricsImpl_.stopContent("entity123", Firebolt::AgePolicy::ADULT); EXPECT_TRUE(result); } TEST_F(MetricsUTest, Page) { - mock("Metrics.page"); + mockInvoke("Metrics.page"); auto result = metricsImpl_.page("homePage", Firebolt::AgePolicy::ADULT); EXPECT_TRUE(result); } TEST_F(MetricsUTest, Error) { - mock("Metrics.error"); + mockInvoke("Metrics.error"); auto result = metricsImpl_.error(Firebolt::Metrics::ErrorType::Network, "ERR001", "Network error occurred", true, std::map{{"param1", "value1"}, {"param2", "value2"}}, Firebolt::AgePolicy::ADULT); @@ -84,7 +84,7 @@ TEST_F(MetricsUTest, Error) TEST_F(MetricsUTest, ErrorNoParameters) { - mock("Metrics.error"); + mockInvoke("Metrics.error"); auto result = metricsImpl_.error(Firebolt::Metrics::ErrorType::Network, "ERR001", "Network error occurred", true, std::nullopt, Firebolt::AgePolicy::ADULT); EXPECT_TRUE(result); @@ -92,7 +92,7 @@ TEST_F(MetricsUTest, ErrorNoParameters) TEST_F(MetricsUTest, ErrorNoAgePolicy) { - mock("Metrics.error"); + mockInvoke("Metrics.error"); auto result = metricsImpl_.error(Firebolt::Metrics::ErrorType::Network, "ERR001", "Network error occurred", true, std::map{{"param1", "value1"}, {"param2", "value2"}}, std::nullopt); @@ -101,63 +101,63 @@ TEST_F(MetricsUTest, ErrorNoAgePolicy) TEST_F(MetricsUTest, MediaLoadStart) { - mock("Metrics.mediaLoadStart"); + mockInvoke("Metrics.mediaLoadStart"); auto result = metricsImpl_.mediaLoadStart("mediaEntity123", Firebolt::AgePolicy::ADULT); EXPECT_TRUE(result); } TEST_F(MetricsUTest, MediaPlay) { - mock("Metrics.mediaPlay"); + mockInvoke("Metrics.mediaPlay"); auto result = metricsImpl_.mediaPlay("mediaEntity123", Firebolt::AgePolicy::ADULT); EXPECT_TRUE(result); } TEST_F(MetricsUTest, MediaPlaying) { - mock("Metrics.mediaPlaying"); + mockInvoke("Metrics.mediaPlaying"); auto result = metricsImpl_.mediaPlaying("mediaEntity123", Firebolt::AgePolicy::ADULT); EXPECT_TRUE(result); } TEST_F(MetricsUTest, MediaPause) { - mock("Metrics.mediaPause"); + mockInvoke("Metrics.mediaPause"); auto result = metricsImpl_.mediaPause("mediaEntity123", Firebolt::AgePolicy::ADULT); EXPECT_TRUE(result); } TEST_F(MetricsUTest, MediaWaiting) { - mock("Metrics.mediaWaiting"); + mockInvoke("Metrics.mediaWaiting"); auto result = metricsImpl_.mediaWaiting("mediaEntity123", Firebolt::AgePolicy::ADULT); EXPECT_TRUE(result); } TEST_F(MetricsUTest, MediaSeeking) { - mock("Metrics.mediaSeeking"); + mockInvoke("Metrics.mediaSeeking"); auto result = metricsImpl_.mediaSeeking("mediaEntity123", 0.5, Firebolt::AgePolicy::ADULT); EXPECT_TRUE(result); } TEST_F(MetricsUTest, MediaSeeked) { - mock("Metrics.mediaSeeked"); + mockInvoke("Metrics.mediaSeeked"); auto result = metricsImpl_.mediaSeeked("mediaEntity123", 0.5, Firebolt::AgePolicy::ADULT); EXPECT_TRUE(result); } TEST_F(MetricsUTest, MediaRateChanged) { - mock("Metrics.mediaRateChanged"); + mockInvoke("Metrics.mediaRateChanged"); auto result = metricsImpl_.mediaRateChanged("mediaEntity123", 1.5, Firebolt::AgePolicy::ADULT); EXPECT_TRUE(result); } TEST_F(MetricsUTest, MediaRenditionChanged) { - mock("Metrics.mediaRenditionChanged"); + mockInvoke("Metrics.mediaRenditionChanged"); auto result = metricsImpl_.mediaRenditionChanged("mediaEntity123", 3000, 1920, 1080, "HDR", Firebolt::AgePolicy::ADULT); EXPECT_TRUE(result); @@ -165,14 +165,14 @@ TEST_F(MetricsUTest, MediaRenditionChanged) TEST_F(MetricsUTest, MediaEnded) { - mock("Metrics.mediaEnded"); + mockInvoke("Metrics.mediaEnded"); auto result = metricsImpl_.mediaEnded("mediaEntity123", Firebolt::AgePolicy::ADULT); EXPECT_TRUE(result); } TEST_F(MetricsUTest, Event) { - mock("Metrics.event"); + mockInvoke("Metrics.event"); auto result = metricsImpl_.event("https://com.example.schema", "{\"key\":\"value\"}", Firebolt::AgePolicy::ADULT); EXPECT_TRUE(result); } diff --git a/test/unit/mock_helper.h b/test/unit/mock_helper.h index 9f9183e..f2a9ffb 100644 --- a/test/unit/mock_helper.h +++ b/test/unit/mock_helper.h @@ -104,6 +104,13 @@ class MockBase { return Firebolt::Result{response}; })); } + void mockInvoke(const std::string& methodName) + { + EXPECT_CALL(mockHelper, invoke(methodName, _)) + .WillOnce(Invoke([](const std::string& /*methodName*/, const nlohmann::json& /*parameters*/) + { return Firebolt::Result{Firebolt::Error::None}; })); + } + void mockSubscribe(const std::string& eventName) { EXPECT_CALL(mockHelper, subscribe(_, eventName, _, _)) From 3fc8635720c803eb87283989c1ed6743dd24a3ba Mon Sep 17 00:00:00 2001 From: swethasukumarr Date: Thu, 7 May 2026 16:04:06 -0400 Subject: [PATCH 2/3] RDKEMW-17483: Update comments and OpenRPC result schemas for void methods --- docs/openrpc/openrpc/discovery.json | 5 +- docs/openrpc/openrpc/metrics.json | 74 +- docs/openrpc/the-spec/firebolt-open-rpc.json | 7687 +++++++++--------- include/firebolt/discovery.h | 2 +- include/firebolt/metrics.h | 38 +- 5 files changed, 3902 insertions(+), 3904 deletions(-) diff --git a/docs/openrpc/openrpc/discovery.json b/docs/openrpc/openrpc/discovery.json index b6f22c0..41389e9 100644 --- a/docs/openrpc/openrpc/discovery.json +++ b/docs/openrpc/openrpc/discovery.json @@ -61,10 +61,9 @@ } ], "result": { - "name": "success", - "summary": "whether the call was successful or not", + "name": "result", "schema": { - "type": "boolean" + "type": "null" } }, "examples": [ diff --git a/docs/openrpc/openrpc/metrics.json b/docs/openrpc/openrpc/metrics.json index fe89723..31cd571 100644 --- a/docs/openrpc/openrpc/metrics.json +++ b/docs/openrpc/openrpc/metrics.json @@ -19,9 +19,9 @@ "summary": "Inform the platform that your app is minimally usable. This method is called automatically by `Lifecycle.ready()`", "params": [], "result": { - "name": "success", + "name": "result", "schema": { - "type": "boolean" + "type": "null" } }, "examples": [ @@ -51,9 +51,9 @@ "summary": "Log a sign in event, called by Discovery.signIn().", "params": [], "result": { - "name": "success", + "name": "result", "schema": { - "type": "boolean" + "type": "null" } }, "examples": [ @@ -83,9 +83,9 @@ "summary": "Log a sign out event, called by Discovery.signOut().", "params": [], "result": { - "name": "success", + "name": "result", "schema": { - "type": "boolean" + "type": "null" } }, "examples": [ @@ -128,9 +128,9 @@ } ], "result": { - "name": "success", + "name": "result", "schema": { - "type": "boolean" + "type": "null" } }, "examples": [ @@ -203,9 +203,9 @@ } ], "result": { - "name": "success", + "name": "result", "schema": { - "type": "boolean" + "type": "null" } }, "examples": [ @@ -261,9 +261,9 @@ } ], "result": { - "name": "success", + "name": "result", "schema": { - "type": "boolean" + "type": "null" } }, "examples": [ @@ -356,9 +356,9 @@ } ], "result": { - "name": "success", + "name": "result", "schema": { - "type": "boolean" + "type": "null" } }, "examples": [ @@ -418,9 +418,9 @@ } ], "result": { - "name": "success", + "name": "result", "schema": { - "type": "boolean" + "type": "null" } }, "examples": [ @@ -468,9 +468,9 @@ } ], "result": { - "name": "success", + "name": "result", "schema": { - "type": "boolean" + "type": "null" } }, "examples": [ @@ -518,9 +518,9 @@ } ], "result": { - "name": "success", + "name": "result", "schema": { - "type": "boolean" + "type": "null" } }, "examples": [ @@ -568,9 +568,9 @@ } ], "result": { - "name": "success", + "name": "result", "schema": { - "type": "boolean" + "type": "null" } }, "examples": [ @@ -618,9 +618,9 @@ } ], "result": { - "name": "success", + "name": "result", "schema": { - "type": "boolean" + "type": "null" } }, "examples": [ @@ -676,9 +676,9 @@ } ], "result": { - "name": "success", + "name": "result", "schema": { - "type": "boolean" + "type": "null" } }, "examples": [ @@ -691,7 +691,7 @@ }, { "name": "target", - "value": 0.50 + "value": 0.5 } ], "result": { @@ -738,9 +738,9 @@ } ], "result": { - "name": "success", + "name": "result", "schema": { - "type": "boolean" + "type": "null" } }, "examples": [ @@ -800,9 +800,9 @@ } ], "result": { - "name": "success", + "name": "result", "schema": { - "type": "boolean" + "type": "null" } }, "examples": [ @@ -886,9 +886,9 @@ } ], "result": { - "name": "success", + "name": "result", "schema": { - "type": "boolean" + "type": "null" } }, "examples": [ @@ -952,9 +952,9 @@ } ], "result": { - "name": "success", + "name": "result", "schema": { - "type": "boolean" + "type": "null" } }, "examples": [ @@ -1013,7 +1013,7 @@ "result": { "name": "result", "schema": { - "type": "boolean" + "type": "null" } }, "examples": [ @@ -1135,4 +1135,4 @@ } } } -} \ No newline at end of file +} diff --git a/docs/openrpc/the-spec/firebolt-open-rpc.json b/docs/openrpc/the-spec/firebolt-open-rpc.json index 05a1fc6..3a3b51a 100644 --- a/docs/openrpc/the-spec/firebolt-open-rpc.json +++ b/docs/openrpc/the-spec/firebolt-open-rpc.json @@ -1,3845 +1,3844 @@ { - "openrpc": "1.2.4", - "info": { - "title": "Firebolt JSON-RPC API", - "version": "", - "x-module-descriptions": { - "Accessibility": "The `Accessibility` module provides access to the user/device settings for closed captioning and voice guidance.\n\nApps **SHOULD** attempt o respect these settings, rather than manage and persist seprate settings, which would be different per-app.", - "Advertising": "A module for platform provided advertising settings and functionality.", - "Device": "A module for querying about the device and it's capabilities.", - "Discovery": "Your App likely wants to integrate with the Platform's discovery capabilities. For example to add a \"Watch Next\" tile that links to your app from the platform's home screen.\n\nGetting access to this information requires to connect to lower level APIs made available by the platform. Since implementations differ between operators and platforms, the Firebolt SDK offers a Discovery module, that exposes a generic, agnostic interface to the developer.\n\nUnder the hood, an underlaying transport layer will then take care of calling the right APIs for the actual platform implementation that your App is running on.\n\nThe Discovery plugin is used to _send_ information to the Platform.\n\n### Localization\nApps should provide all user-facing strings in the device's language, as specified by the Firebolt `Localization.language` property.\n\nApps should provide prices in the same currency presented in the app. If multiple currencies are supported in the app, the app should provide prices in the user's current default currency.", - "Display": "A module for querying about the display", - "Lifecycle2": "Methods and events for responding to Lifecycle changes in your app.", - "Localization": "Methods for accessing location and language preferences.", - "Metrics": "Methods for sending metrics", - "Network": "Methods for accessing network information.", - "Presentation": "Methods for accessing Presentation preferences.", - "Stats": "Provides methods to retrieve application-level system information.", - "TextToSpeech": "A module for controlling and accessing Text To Speech over Firebolt." - } - }, - "methods": [ - { - "name": "rpc.discover", - "summary": "The OpenRPC schema for this JSON-RPC API", - "params": [], - "tags": [ - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:rpc:discover" - ] - } - ], - "result": { - "name": "OpenRPC Schema", - "schema": { - "type": "object" - } - }, - "examples": [ - { - "name": "Default", - "params": [], - "result": { - "name": "schema", - "value": {} - } - } - ] - }, - { - "name": "Accessibility.audioDescription", - "summary": "Returns the audio description setting of the device", - "params": [], - "tags": [ - { - "name": "property:readonly" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:accessibility:audio-descriptions" - ] - } - ], - "result": { - "name": "setting", - "summary": "the audio description setting", - "schema": { - "type": "boolean" - } - }, - "examples": [ - { - "name": "Getting the audio description setting", - "params": [], - "result": { - "name": "Default Result", - "value": true - } - } - ] - }, - { - "name": "Accessibility.closedCaptionsSettings", - "summary": "Returns captions settings: enabled, and a list of zero or more languages in order of decreasing preference", - "params": [], - "tags": [ - { - "name": "property:readonly", - "x-notifier-params-flattening": "true" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:accessibility:closed-captions" - ] - } - ], - "result": { - "name": "closedCaptionsSettings", - "summary": "the closed captions settings", - "schema": { - "$ref": "#/x-schemas/Accessibility/ClosedCaptionsSettings" - } - }, - "examples": [ - { - "name": "Getting the closed captions settings", - "params": [], - "result": { - "name": "settings", - "value": { - "enabled": true, - "preferredLanguages": [ - "eng", - "spa" - ] - } - } - } - ] - }, - { - "name": "Accessibility.highContrastUI", - "summary": "Returns the high contrast UI device setting", - "params": [], - "tags": [ - { - "name": "property:readonly" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:accessibility:high-contrast-ui" - ] - } - ], - "result": { - "name": "highContrastUI", - "summary": "Whether high-contrast UI mode is enabled", - "schema": { - "type": "boolean" - } - }, - "examples": [ - { - "name": "High-contrast UI mode is enabled", - "params": [], - "result": { - "name": "Default Result", - "value": true - } - } - ] - }, - { - "name": "Accessibility.voiceGuidanceSettings", - "summary": "Returns voice guidance settings: enabled, rate, and verbosity", - "params": [], - "tags": [ - { - "name": "property:readonly", - "x-notifier-params-flattening": "true" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:accessibility:voice-guidance" - ] - } - ], - "result": { - "name": "settings", - "summary": "the voice guidance settings", - "schema": { - "$ref": "#/x-schemas/Accessibility/VoiceGuidanceSettings" - } - }, - "examples": [ - { - "name": "Getting the voice guidance settings", - "params": [], - "result": { - "name": "Default Result", - "value": { - "enabled": true, - "rate": 0.8, - "navigationHints": true - } - } - } - ] - }, - { - "name": "Advertising.advertisingId", - "tags": [ - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:advertising:identifier" - ] - } - ], - "summary": "Returns the IFA.", - "params": [], - "result": { - "name": "advertisingId", - "summary": "The advertising ID", - "schema": { - "$ref": "#/components/schemas/AdvertisingIdResult" - } - }, - "examples": [ - { - "name": "Getting the advertising ID", - "params": [], - "result": { - "name": "Default Result", - "value": { - "ifa": "bd87dd10-8d1d-4b93-b1a6-a8e5d410e400", - "ifa_type": "sspid", - "lmt": "0" - } - } - }, - { - "name": "Getting the advertising ID with scope browse", - "params": [], - "result": { - "name": "Default Result", - "value": { - "ifa": "bd87dd10-8d1d-4b93-b1a6-a8e5d410e400", - "ifa_type": "sspid", - "lmt": "1" - } - } - }, - { - "name": "Getting the advertising ID with scope content", - "params": [], - "result": { - "name": "Default Result", - "value": { - "ifa": "bd87dd10-8d1d-4b93-b1a6-a8e5d410e400", - "ifa_type": "idfa", - "lmt": "0" - } - } - } - ] - }, - { - "name": "Device.uid", - "summary": "Returns a persistent unique UUID for the current app and device. The UUID is reset when the app or device is reset", - "params": [], - "tags": [ - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:device:uid" - ] - } - ], - "result": { - "name": "uniqueId", - "summary": "A unique UUID for this app-device pair.", - "schema": { - "type": "string" - } - }, - "examples": [ - { - "name": "Getting the unique UUID", - "params": [], - "result": { - "name": "Default Result", - "value": "ee6723b8-7ab3-462c-8d93-dbf61227998e" - } - } - ] - }, - { - "name": "Device.deviceClass", - "summary": "Returns the class of the device", - "params": [], - "tags": [ - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:device:device-class" - ] - } - ], - "result": { - "name": "deviceClass", - "summary": "The device class", - "schema": { - "$ref": "#/components/schemas/DeviceClass" - } - }, - "examples": [ - { - "name": "Getting the device class", - "params": [], - "result": { - "name": "Default Result", - "value": "ott" - } - } - ] - }, - { - "name": "Device.uptime", - "summary": "Returns the number of seconds since most recent device boot, including any time spent during deep sleep", - "params": [], - "tags": [ - { - "name": "rpc-only" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:device:info" - ] - } - ], - "result": { - "name": "uptime", - "summary": "The device uptime", - "schema": { - "type": "number" - } - }, - "examples": [ - { - "name": "Getting the device uptime", - "params": [], - "result": { - "name": "Default Result", - "value": 123456 - } - } - ] - }, - { - "name": "Device.timeInActiveState", - "summary": "Returns the number of seconds since the device transitioned to the ON power state", - "params": [], - "tags": [ - { - "name": "rpc-only" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:device:info" - ] - } - ], - "result": { - "name": "timeInActiveState", - "summary": "The device time in active state", - "schema": { - "type": "number" - } - }, - "examples": [ - { - "name": "Getting the number of seconds since the device transitioned to the ON power state", - "params": [], - "result": { - "name": "Default Result", - "value": 654321 - } - } - ] - }, - { - "name": "Device.chipsetId", - "summary": "Returns chipset ID as a printable string, e.g. BCM72180", - "params": [], - "tags": [ - { - "name": "rpc-only" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:device:info" - ] - } - ], - "result": { - "name": "chipsetId", - "summary": "The device chipset ID", - "schema": { - "type": "string" - } - }, - "examples": [ - { - "name": "Getting the device chipset ID", - "params": [], - "result": { - "name": "Default Result", - "value": "BCM72180" - } - } - ] - }, - { - "name": "Device.hdr", - "summary": "Returns the HDR standards that are supported by the attached TV or the integral display", - "params": [], - "tags": [ - { - "name": "property:readonly" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:device:info" - ] - } - ], - "result": { - "name": "negotiatedHdrFormats", - "summary": "the negotiated HDR formats", - "schema": { - "$ref": "#/components/schemas/HDRFormatMap" - } - }, - "examples": [ - { - "name": "Getting the negotiated HDR formats", - "params": [], - "result": { - "name": "Default Result", - "value": { - "hdr10": true, - "hdr10Plus": true, - "dolbyVision": true, - "hlg": true - } - } - } - ] - }, - { - "name": "Discovery.watched", - "summary": "Notify the platform that content was partially or completely watched", - "tags": [ - { - "name": "polymorphic-reducer" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:discovery:watched" - ] - } - ], - "params": [ - { - "name": "entityId", - "required": true, - "schema": { - "type": "string" - }, - "summary": "The entity Id of the watched content." - }, - { - "name": "progress", - "summary": "How much of the content has been watched (percentage as (0-0.999) for VOD, number of seconds for live)", - "schema": { - "type": "number", - "minimum": 0 - } - }, - { - "name": "completed", - "summary": "Whether or not this viewing is considered \"complete,\" per the app's definition thereof", - "schema": { - "type": "boolean" - } - }, - { - "name": "watchedOn", - "summary": "Date/Time the content was watched, ISO 8601 Date/Time", - "schema": { - "type": "string", - "format": "date-time" - } - }, - { - "name": "agePolicy", - "description": "The age policy associated with the watch event. The age policy describes the age groups to which content may be directed.", - "schema": { - "$ref": "#/x-schemas/Policies/AgePolicy" - } - } - ], - "result": { - "name": "success", - "summary": "whether the call was successful or not", - "schema": { - "type": "boolean" - } - }, - "examples": [ - { - "name": "Notify the platform of watched content", - "params": [ - { - "name": "entityId", - "value": "partner.com/entity/123" - }, - { - "name": "progress", - "value": 0.95 - }, - { - "name": "completed", - "value": true - }, - { - "name": "watchedOn", - "value": "2021-04-23T18:25:43.511Z" - } - ], - "result": { - "name": "success", - "value": true - } - }, - { - "name": "Notify the platform that child-directed content was watched", - "params": [ - { - "name": "entityId", - "value": "partner.com/entity/123" - }, - { - "name": "progress", - "value": 0.95 - }, - { - "name": "completed", - "value": true - }, - { - "name": "watchedOn", - "value": "2021-04-23T18:25:43.511Z" - }, - { - "name": "agePolicy", - "value": "app:child" - } - ], - "result": { - "name": "success", - "value": true - } - } - ] - }, - { - "name": "Display.edid", - "summary": "Returns the EDID (and extensions) of the connected or integral display, as a Base64 encoded string", - "params": [], - "tags": [ - { - "name": "rpc-only" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:display:info" - ] - } - ], - "result": { - "name": "Base64 EDID", - "summary": "The EDID (and extensions) of the connected or integral display, as a Base64 encoded string", - "schema": { - "type": "string" - } - }, - "examples": [ - { - "name": "Getting the display EDID", - "params": [], - "result": { - "name": "Default Result", - "value": "ZWU2NzIzYjgtN2FiMy00NjJjLThkOTMtZGJmNjEyMjc5OThl" - } - } - ] - }, - { - "name": "Display.size", - "summary": "Returns the physical dimensions of the connected or integral display, in centimeters. Returns 0, 0 on a OTT/STB device when a display is not connected over HDMI", - "params": [], - "tags": [ - { - "name": "rpc-only" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:display:info" - ] - } - ], - "result": { - "name": "size", - "summary": "The display size in centimeters", - "schema": { - "type": "object", - "properties": { - "width": { - "type": "integer", - "description": "The width of the display in centimeters" - }, - "height": { - "type": "integer", - "description": "The height of the display in centimeters" - } - } - } - }, - "examples": [ - { - "name": "Getting the display size", - "params": [], - "result": { - "name": "Default Result", - "value": { - "width": 48, - "height": 27 - } - } - } - ] - }, - { - "name": "Display.maxResolution", - "summary": "Returns the physical/native resolution of the connected or integral display, in pixels. Returns 0, 0 on a OTT/STB device when a display is not connected over HDMI", - "params": [], - "tags": [ - { - "name": "rpc-only" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:display:info" - ] - } - ], - "result": { - "name": "maxResolution", - "summary": "The display resolution", - "schema": { - "type": "object", - "properties": { - "width": { - "type": "integer", - "description": "The width of the display in pixels" - }, - "height": { - "type": "integer", - "description": "The height of the display in pixels" - } - } - } - }, - "examples": [ - { - "name": "Getting the display size", - "params": [], - "result": { - "name": "Default Result", - "value": { - "width": 1920, - "height": 1080 - } - } - } - ] - }, - { - "name": "Lifecycle2.close", - "tags": [ - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:cpp-client-only" - ] - } - ], - "summary": "Request the platform to deactivate the app, and possibly take further action.", - "params": [ - { - "name": "type", - "summary": "The type of the close app is requesting", - "required": true, - "schema": { - "$ref": "#/components/schemas/CloseType" - } - } - ], - "result": { - "name": "result", - "schema": { - "type": "null" - } - }, - "examples": [ - { - "name": "Close the app when the user presses back on the app home screen", - "params": [ - { - "name": "type", - "value": "unload" - } - ], - "result": { - "name": "Default Result", - "value": null - } - }, - { - "name": "Close the app when the user selects an exit menu item", - "params": [ - { - "name": "type", - "value": "deactivate" - } - ], - "result": { - "name": "Default Result", - "value": null - } - } - ] - }, - { - "name": "Lifecycle2.state", - "summary": "Get the current lifecycle state of the app.", - "tags": [ - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:cpp-client-only" - ] - } - ], - "params": [], - "result": { - "name": "state", - "summary": "The current lifecycle state of the app.", - "schema": { - "$ref": "#/components/schemas/LifecycleState" - } - }, - "examples": [ - { - "name": "Default Example", - "params": [], - "result": { - "name": "Default Result", - "value": "active" - } - } - ] - }, - { - "name": "Localization.country", - "tags": [ - { - "name": "property:readonly" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:localization:country-code" - ] - } - ], - "summary": "Returns the ISO 3166-1 alpha-2 code for the country device is located in.", - "params": [], - "result": { - "name": "code", - "summary": "The device country code.", - "schema": { - "$ref": "#/x-schemas/Localization/CountryCode" - } - }, - "examples": [ - { - "name": "Default example", - "params": [], - "result": { - "name": "Default Result", - "value": "US" - } - }, - { - "name": "Another example", - "params": [], - "result": { - "name": "Default Result", - "value": "GB" - } - } - ] - }, - { - "name": "Localization.preferredAudioLanguages", - "summary": "Returns a list of ISO 639-2/B codes for the preferred audio languages on this device.", - "params": [], - "tags": [ - { - "name": "property:readonly" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:localization:preferred-audio-languages" - ] - } - ], - "result": { - "name": "languages", - "summary": "The preferred audio languages.", - "schema": { - "type": "array", - "items": { - "$ref": "#/x-schemas/Localization/ISO639_2Language" - } - } - }, - "examples": [ - { - "name": "Default example", - "params": [], - "result": { - "name": "Default Result", - "value": [ - "spa", - "eng" - ] - } - } - ] - }, - { - "name": "Localization.presentationLanguage", - "tags": [ - { - "name": "property:readonly" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:localization:locale" - ] - } - ], - "summary": "Get the *full* BCP 47 code, including script, region, variant, etc., for the preferred locale", - "params": [], - "result": { - "name": "locale", - "summary": "The device locale.", - "schema": { - "$ref": "#/x-schemas/Localization/Locale" - } - }, - "examples": [ - { - "name": "Default example", - "params": [], - "result": { - "name": "Default Result", - "value": "en-US" - } - } - ] - }, - { - "name": "Metrics.ready", - "tags": [ - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:metrics:general" - ] - } - ], - "summary": "Inform the platform that your app is minimally usable. This method is called automatically by `Lifecycle.ready()`", - "params": [], - "result": { - "name": "success", - "schema": { - "type": "boolean" - } - }, - "examples": [ - { - "name": "Send ready metric", - "params": [], - "result": { - "name": "success", - "value": true - } - } - ] - }, - { - "name": "Metrics.signIn", - "tags": [ - { - "name": "rpc-only" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:metrics:general" - ] - } - ], - "summary": "Log a sign in event, called by Discovery.signIn().", - "params": [], - "result": { - "name": "success", - "schema": { - "type": "boolean" - } - }, - "examples": [ - { - "name": "Send signIn metric", - "params": [], - "result": { - "name": "success", - "value": true - } - } - ] - }, - { - "name": "Metrics.signOut", - "tags": [ - { - "name": "rpc-only" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:metrics:general" - ] - } - ], - "summary": "Log a sign out event, called by Discovery.signOut().", - "params": [], - "result": { - "name": "success", - "schema": { - "type": "boolean" - } - }, - "examples": [ - { - "name": "Send signOut metric", - "params": [], - "result": { - "name": "success", - "value": true - } - } - ] - }, - { - "name": "Metrics.startContent", - "tags": [ - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:metrics:general" - ] - } - ], - "summary": "Inform the platform that your user has started content.", - "params": [ - { - "name": "entityId", - "summary": "Optional entity ID of the content.", - "schema": { - "type": "string" - }, - "required": false - }, - { - "name": "agePolicy", - "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", - "schema": { - "$ref": "#/x-schemas/Policies/AgePolicy" - } - } - ], - "result": { - "name": "success", - "schema": { - "type": "boolean" - } - }, - "examples": [ - { - "name": "Send startContent metric", - "params": [], - "result": { - "name": "success", - "value": true - } - }, - { - "name": "Send startContent metric w/ entity", - "params": [ - { - "name": "entityId", - "value": "abc" - } - ], - "result": { - "name": "success", - "value": true - } - }, - { - "name": "Send startContent metric and notify the platform that the content is child-directed", - "params": [ - { - "name": "entityId", - "value": "abc" - }, - { - "name": "agePolicy", - "value": "app:child" - } - ], - "result": { - "name": "success", - "value": true - } - } - ] - }, - { - "name": "Metrics.stopContent", - "tags": [ - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:metrics:general" - ] - } - ], - "summary": "Inform the platform that your user has stopped content.", - "params": [ - { - "name": "entityId", - "summary": "Optional entity ID of the content.", - "schema": { - "type": "string" - }, - "required": false - }, - { - "name": "agePolicy", - "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", - "schema": { - "$ref": "#/x-schemas/Policies/AgePolicy" - } - } - ], - "result": { - "name": "success", - "schema": { - "type": "boolean" - } - }, - "examples": [ - { - "name": "Send stopContent metric", - "params": [], - "result": { - "name": "success", - "value": true - } - }, - { - "name": "Send stopContent metric w/ entity", - "params": [ - { - "name": "entityId", - "value": "abc" - } - ], - "result": { - "name": "success", - "value": true - } - } - ] - }, - { - "name": "Metrics.page", - "tags": [ - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:metrics:general" - ] - } - ], - "summary": "Inform the platform that your user has navigated to a page or view.", - "params": [ - { - "name": "pageId", - "summary": "Page ID of the content.", - "schema": { - "type": "string" - }, - "required": true - }, - { - "name": "agePolicy", - "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", - "schema": { - "$ref": "#/x-schemas/Policies/AgePolicy" - } - } - ], - "result": { - "name": "success", - "schema": { - "type": "boolean" - } - }, - "examples": [ - { - "name": "Send page metric", - "params": [ - { - "name": "pageId", - "value": "xyz" - } - ], - "result": { - "name": "success", - "value": true - } - }, - { - "name": "Send page metric w/ pageId", - "params": [ - { - "name": "pageId", - "value": "home" - } - ], - "result": { - "name": "success", - "value": true - } - } - ] - }, - { - "name": "Metrics.error", - "tags": [ - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:metrics:general" - ] - } - ], - "summary": "Inform the platform of an error that has occurred in your app.", - "params": [ - { - "name": "type", - "summary": "The type of error", - "schema": { - "$ref": "#/components/schemas/ErrorType" - }, - "required": true - }, - { - "name": "code", - "summary": "an app-specific error code", - "schema": { - "type": "string" - }, - "required": true - }, - { - "name": "description", - "summary": "A short description of the error", - "schema": { - "type": "string" - }, - "required": true - }, - { - "name": "visible", - "summary": "Whether or not this error was visible to the user.", - "schema": { - "type": "boolean" - }, - "required": true - }, - { - "name": "parameters", - "summary": "Optional additional parameters to be logged with the error", - "schema": { - "$ref": "#/x-schemas/Types/FlatMap" - }, - "required": false - }, - { - "name": "agePolicy", - "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", - "schema": { - "$ref": "#/x-schemas/Policies/AgePolicy" - } - } - ], - "result": { - "name": "success", - "schema": { - "type": "boolean" - } - }, - "examples": [ - { - "name": "Send error metric", - "params": [ - { - "name": "type", - "value": "media" - }, - { - "name": "code", - "value": "MEDIA-STALLED" - }, - { - "name": "description", - "value": "playback stalled" - }, - { - "name": "visible", - "value": true - } - ], - "result": { - "name": "success", - "value": true - } - } - ] - }, - { - "name": "Metrics.mediaLoadStart", - "tags": [ - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:metrics:media" - ] - } - ], - "summary": "Called when setting the URL of a media asset to play, in order to infer load time.", - "params": [ - { - "name": "entityId", - "summary": "The entityId of the media.", - "schema": { - "type": "string" - }, - "required": true - }, - { - "name": "agePolicy", - "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", - "schema": { - "$ref": "#/x-schemas/Policies/AgePolicy" - } - } - ], - "result": { - "name": "success", - "schema": { - "type": "boolean" - } - }, - "examples": [ - { - "name": "Send loadstart metric.", - "params": [ - { - "name": "entityId", - "value": "345" - } - ], - "result": { - "name": "success", - "value": true - } - } - ] - }, - { - "name": "Metrics.mediaPlay", - "tags": [ - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:metrics:media" - ] - } - ], - "summary": "Called when media playback should start due to autoplay, user-initiated play, or unpausing.", - "params": [ - { - "name": "entityId", - "summary": "The entityId of the media.", - "schema": { - "type": "string" - }, - "required": true - }, - { - "name": "agePolicy", - "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", - "schema": { - "$ref": "#/x-schemas/Policies/AgePolicy" - } - } - ], - "result": { - "name": "success", - "schema": { - "type": "boolean" - } - }, - "examples": [ - { - "name": "Send play metric.", - "params": [ - { - "name": "entityId", - "value": "345" - } - ], - "result": { - "name": "success", - "value": true - } - } - ] - }, - { - "name": "Metrics.mediaPlaying", - "tags": [ - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:metrics:media" - ] - } - ], - "summary": "Called when media playback actually starts due to autoplay, user-initiated play, unpausing, or recovering from a buffering interruption.", - "params": [ - { - "name": "entityId", - "summary": "The entityId of the media.", - "schema": { - "type": "string" - }, - "required": true - }, - { - "name": "agePolicy", - "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", - "schema": { - "$ref": "#/x-schemas/Policies/AgePolicy" - } - } - ], - "result": { - "name": "success", - "schema": { - "type": "boolean" - } - }, - "examples": [ - { - "name": "Send playing metric.", - "params": [ - { - "name": "entityId", - "value": "345" - } - ], - "result": { - "name": "success", - "value": true - } - } - ] - }, - { - "name": "Metrics.mediaPause", - "tags": [ - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:metrics:media" - ] - } - ], - "summary": "Called when media playback will pause due to an intentional pause operation.", - "params": [ - { - "name": "entityId", - "summary": "The entityId of the media.", - "schema": { - "type": "string" - }, - "required": true - }, - { - "name": "agePolicy", - "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", - "schema": { - "$ref": "#/x-schemas/Policies/AgePolicy" - } - } - ], - "result": { - "name": "success", - "schema": { - "type": "boolean" - } - }, - "examples": [ - { - "name": "Send pause metric.", - "params": [ - { - "name": "entityId", - "value": "345" - } - ], - "result": { - "name": "success", - "value": true - } - } - ] - }, - { - "name": "Metrics.mediaWaiting", - "tags": [ - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:metrics:media" - ] - } - ], - "summary": "Called when media playback will halt due to a network, buffer, or other unintentional constraint.", - "params": [ - { - "name": "entityId", - "summary": "The entityId of the media.", - "schema": { - "type": "string" - }, - "required": true - }, - { - "name": "agePolicy", - "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", - "schema": { - "$ref": "#/x-schemas/Policies/AgePolicy" - } - } - ], - "result": { - "name": "success", - "schema": { - "type": "boolean" - } - }, - "examples": [ - { - "name": "Send waiting metric.", - "params": [ - { - "name": "entityId", - "value": "345" - } - ], - "result": { - "name": "success", - "value": true - } - } - ] - }, - { - "name": "Metrics.mediaSeeking", - "tags": [ - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:metrics:media" - ] - } - ], - "summary": "Called when a seek is initiated during media playback.", - "params": [ - { - "name": "entityId", - "summary": "The entityId of the media.", - "schema": { - "type": "string" - }, - "required": true - }, - { - "name": "target", - "summary": "Target destination of the seek, as a decimal percentage (0-0.999) for content with a known duration, or an integer number of seconds (0-86400) for content with an unknown duration.", - "schema": { - "$ref": "#/components/schemas/MediaPosition" - }, - "required": true - }, - { - "name": "agePolicy", - "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", - "schema": { - "$ref": "#/x-schemas/Policies/AgePolicy" - } - } - ], - "result": { - "name": "success", - "schema": { - "type": "boolean" - } - }, - "examples": [ - { - "name": "Send seeking metric.", - "params": [ - { - "name": "entityId", - "value": "345" - }, - { - "name": "target", - "value": 0.5 - } - ], - "result": { - "name": "success", - "value": true - } - } - ] - }, - { - "name": "Metrics.mediaSeeked", - "tags": [ - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:metrics:media" - ] - } - ], - "summary": "Called when a seek is completed during media playback.", - "params": [ - { - "name": "entityId", - "summary": "The entityId of the media.", - "schema": { - "type": "string" - }, - "required": true - }, - { - "name": "position", - "summary": "Resulting position of the seek operation, as a decimal percentage (0-0.999) for content with a known duration, or an integer number of seconds (0-86400) for content with an unknown duration.", - "schema": { - "$ref": "#/components/schemas/MediaPosition" - }, - "required": true - }, - { - "name": "agePolicy", - "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", - "schema": { - "$ref": "#/x-schemas/Policies/AgePolicy" - } - } - ], - "result": { - "name": "success", - "schema": { - "type": "boolean" - } - }, - "examples": [ - { - "name": "Send seeked metric.", - "params": [ - { - "name": "entityId", - "value": "345" - }, - { - "name": "position", - "value": 0.51 - } - ], - "result": { - "name": "success", - "value": true - } - } - ] - }, - { - "name": "Metrics.mediaRateChanged", - "tags": [ - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:metrics:media" - ] - } - ], - "summary": "Called when the playback rate of media is changed.", - "params": [ - { - "name": "entityId", - "summary": "The entityId of the media.", - "schema": { - "type": "string" - }, - "required": true - }, - { - "name": "rate", - "summary": "The new playback rate.", - "schema": { - "type": "number" - }, - "required": true - }, - { - "name": "agePolicy", - "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", - "schema": { - "$ref": "#/x-schemas/Policies/AgePolicy" - } - } - ], - "result": { - "name": "success", - "schema": { - "type": "boolean" - } - }, - "examples": [ - { - "name": "Send ratechange metric.", - "params": [ - { - "name": "entityId", - "value": "345" - }, - { - "name": "rate", - "value": 2 - } - ], - "result": { - "name": "success", - "value": true - } - } - ] - }, - { - "name": "Metrics.mediaRenditionChanged", - "tags": [ - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:metrics:media" - ] - } - ], - "summary": "Called when the playback rendition (e.g. bitrate, dimensions, profile, etc) is changed.", - "params": [ - { - "name": "entityId", - "summary": "The entityId of the media.", - "schema": { - "type": "string" - }, - "required": true - }, - { - "name": "bitrate", - "summary": "The new bitrate in kbps.", - "schema": { - "type": "number" - }, - "required": true - }, - { - "name": "width", - "summary": "The new resolution width.", - "schema": { - "type": "number" - }, - "required": true - }, - { - "name": "height", - "summary": "The new resolution height.", - "schema": { - "type": "number" - }, - "required": true - }, - { - "name": "profile", - "summary": "A description of the new profile, e.g. 'HDR' etc.", - "schema": { - "type": "string" - }, - "required": false - }, - { - "name": "agePolicy", - "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", - "schema": { - "$ref": "#/x-schemas/Policies/AgePolicy" - } - } - ], - "result": { - "name": "success", - "schema": { - "type": "boolean" - } - }, - "examples": [ - { - "name": "Send renditionchange metric.", - "params": [ - { - "name": "entityId", - "value": "345" - }, - { - "name": "bitrate", - "value": 5000 - }, - { - "name": "width", - "value": 1920 - }, - { - "name": "height", - "value": 1080 - }, - { - "name": "profile", - "value": "HDR+" - } - ], - "result": { - "name": "success", - "value": true - } - } - ] - }, - { - "name": "Metrics.mediaEnded", - "tags": [ - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:metrics:media" - ] - } - ], - "summary": "Called when playback has stopped because the end of the media was reached.", - "params": [ - { - "name": "entityId", - "summary": "The entityId of the media.", - "schema": { - "type": "string" - }, - "required": true - }, - { - "name": "agePolicy", - "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", - "schema": { - "$ref": "#/x-schemas/Policies/AgePolicy" - } - } - ], - "result": { - "name": "success", - "schema": { - "type": "boolean" - } - }, - "examples": [ - { - "name": "Send ended metric.", - "params": [ - { - "name": "entityId", - "value": "345" - } - ], - "result": { - "name": "success", - "value": true - } - } - ] - }, - { - "name": "Metrics.event", - "tags": [ - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:metrics:distributor" - ] - } - ], - "summary": "Inform the platform of 1st party distributor metrics. 'data' parameter is a JSON document", - "params": [ - { - "name": "schema", - "summary": "The schema URI of the metric type", - "schema": { - "type": "string", - "format": "uri" - }, - "required": true - }, - { - "name": "data", - "summary": "A JSON payload", - "schema": { - "type": "string" - }, - "required": true - }, - { - "name": "agePolicy", - "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", - "schema": { - "$ref": "#/x-schemas/Policies/AgePolicy" - } - } - ], - "result": { - "name": "result", - "schema": { - "type": "boolean" - } - }, - "examples": [ - { - "name": "Send foo event", - "params": [ - { - "name": "schema", - "value": "http://meta.rdkcentral.com/some/schema" - }, - { - "name": "data", - "value": "foo" - } - ], - "result": { - "name": "result", - "value": true - } - } - ] - }, - { - "name": "Metrics.appInfo", - "tags": [ - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:metrics:general" - ] - } - ], - "summary": "Inform the platform about an app's build info.", - "params": [ - { - "name": "build", - "summary": "The build / version of this app.", - "schema": { - "type": "string" - }, - "required": true - } - ], - "result": { - "name": "result", - "schema": { - "type": "null" - } - }, - "examples": [ - { - "name": "Send appInfo metric", - "params": [ - { - "name": "build", - "value": "1.2.2" - } - ], - "result": { - "name": "result", - "value": null - } - } - ] - }, - { - "name": "Network.connected", - "summary": "Returns whether the device currently has a usable network connection.", - "tags": [ - { - "name": "property:readonly" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:network:connected" - ] - } - ], - "params": [], - "result": { - "name": "success", - "summary": "Whether the device currently has a usable network connection.", - "schema": { - "$ref": "#/components/schemas/Connected" - } - }, - "examples": [ - { - "name": "Connected example", - "params": [], - "result": { - "name": "success", - "value": true - } - } - ] - }, - { - "name": "Presentation.focused", - "tags": [ - { - "name": "property:readonly" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:cpp-client-only" - ] - } - ], - "summary": "Whether the app is in focus, i.e. receiving key presses. Provided for those apps/runtimes that cannot use Wayland", - "params": [], - "result": { - "name": "focused", - "summary": "Whether the app is in focus.", - "schema": { - "type": "boolean" - } - }, - "examples": [ - { - "name": "Default example", - "params": [], - "result": { - "name": "Default Result", - "value": true - } - } - ] - }, - { - "name": "Stats.memoryUsage", - "summary": "Returns information about container memory usage, in units of 1024 bytes.", - "tags": [ - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:cpp-client-only" - ] - } - ], - "params": [], - "result": { - "name": "result", - "schema": { - "$ref": "#/components/schemas/MemoryUsage" - } - }, - "examples": [ - { - "name": "Default example", - "params": [], - "result": { - "name": "value", - "description": "The memory usage information", - "value": { - "userMemoryUsedKiB": 123456, - "userMemoryLimitKiB": 789012, - "gpuMemoryUsedKiB": 345678, - "gpuMemoryLimitKiB": 901234 - } - } - } - ] - }, - { - "name": "TextToSpeech.speak", - "summary": "Speak the utterance immediately. Any ongoing speech is interrupted.", - "description": "Text argument is either plain text or a well-formed SSML document TTS_status, not success attribute, to be used by caller to indicate success of call 0 OK, 1 Fail, 2 not enabled, 3 invalid configuration Raises onSpeechinterrupted if speaking is interrupted", - "params": [ - { - "name": "text", - "summary": "String to be converted to Audio for speech", - "schema": { - "type": "string" - }, - "required": true - } - ], - "tags": [ - { - "name": "rpc-only" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:text-to-speech:general" - ] - } - ], - "result": { - "name": "speakResult", - "summary": "Result for Speak", - "schema": { - "$ref": "#/components/schemas/SpeechResponse" - } - }, - "examples": [ - { - "name": "Getting the result of speak", - "params": [ - { - "name": "text", - "value": "I am a text waiting for speech." - } - ], - "result": { - "name": "result", - "value": { - "speechid": 1, - "TTS_Status": 0, - "success": true - } - } - } - ] - }, - { - "name": "TextToSpeech.pause", - "summary": "Pauses the speech for given speech id", - "description": "Pauses the utterance. Raises onSpeechpause if ongoing speech is paused. Does nothing if utterance is already paused", - "params": [ - { - "name": "speechid", - "summary": "Identifier for the speech call", - "schema": { - "$ref": "#/components/schemas/SpeechId" - }, - "required": true - } - ], - "tags": [ - { - "name": "rpc-only" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:text-to-speech:general" - ] - } - ], - "result": { - "name": "pauseResult", - "summary": "Result for Pause", - "schema": { - "$ref": "#/components/schemas/TTSStatusResponse" - } - }, - "examples": [ - { - "name": "Pause a given speech id", - "params": [ - { - "name": "speechid", - "value": 1 - } - ], - "result": { - "name": "TTS_Status", - "value": { - "TTS_Status": 0, - "success": true - } - } - } - ] - }, - { - "name": "TextToSpeech.resume", - "summary": "Resumes the speech for given speech id", - "description": "Continue the paused utterance. Raises onSpeechresume if paused speech is resumed. Does nothing if the utterance is not paused", - "params": [ - { - "name": "speechid", - "summary": "Identifier for the speech call", - "schema": { - "$ref": "#/components/schemas/SpeechId" - }, - "required": true - } - ], - "tags": [ - { - "name": "rpc-only" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:text-to-speech:general" - ] - } - ], - "result": { - "name": "resumeResult", - "summary": "Result for Resume", - "schema": { - "$ref": "#/components/schemas/TTSStatusResponse" - } - }, - "examples": [ - { - "name": "Resume a given speech id.", - "params": [ - { - "name": "speechid", - "value": 1 - } - ], - "result": { - "name": "TTS_Status", - "value": { - "TTS_Status": 0, - "success": true - } - } - } - ] - }, - { - "name": "TextToSpeech.cancel", - "summary": "Cancels the speech for given speech id", - "description": "Stop speaking if utterance is currently being spoken. Raises onSpeechinterrupted if speaking was interrupted.", - "params": [ - { - "name": "speechid", - "summary": "Identifier for the speech call", - "schema": { - "$ref": "#/components/schemas/SpeechId" - }, - "required": true - } - ], - "tags": [ - { - "name": "rpc-only" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:text-to-speech:general" - ] - } - ], - "result": { - "name": "cancelResult", - "summary": "Result for cancel", - "schema": { - "$ref": "#/components/schemas/TTSStatusResponse" - } - }, - "examples": [ - { - "name": "Cancel a given speech id.", - "params": [ - { - "name": "speechid", - "value": 1 - } - ], - "result": { - "name": "TTS_Status", - "value": { - "TTS_Status": 0, - "success": true - } - } - } - ] - }, - { - "name": "TextToSpeech.getspeechstate", - "summary": "Returns the state of the utterance.", - "params": [ - { - "name": "speechid", - "summary": "Identifier for the speech call", - "schema": { - "$ref": "#/components/schemas/SpeechId" - }, - "required": true - } - ], - "tags": [ - { - "name": "rpc-only" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:text-to-speech:general" - ] - } - ], - "result": { - "name": "speechStateResult", - "summary": "Result for speech state", - "schema": { - "$ref": "#/components/schemas/SpeechStateResponse" - } - }, - "examples": [ - { - "name": "State for a given speech id.", - "params": [ - { - "name": "speechid", - "value": 1 - } - ], - "result": { - "name": "speechstate", - "value": { - "speechstate": 1, - "TTS_Status": 0, - "success": true - } - } - } - ] - }, - { - "name": "TextToSpeech.listvoices", - "summary": "Returns the list of available voices as human-readable strings, e.g. 'ava', 'amelie', 'angelica'", - "params": [ - { - "name": "language", - "summary": "Language - string - BCP 47", - "schema": { - "$ref": "#/x-schemas/Localization/Locale" - }, - "required": true - } - ], - "tags": [ - { - "name": "rpc-only" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:text-to-speech:general" - ] - } - ], - "result": { - "name": "listvoices", - "summary": "The list of voices supported for the language", - "schema": { - "$ref": "#/components/schemas/ListVoicesResponse" - } - }, - "examples": [ - { - "name": "Getting the list of voices", - "params": [ - { - "name": "language", - "value": "en-US" - } - ], - "result": { - "name": "voiceList", - "value": { - "TTS_Status": 0, - "voices": [ - "carol", - "tom" - ] - } - } - } - ] - }, - { - "name": "Lifecycle2.onStateChanged", - "tags": [ - { - "name": "event", - "x-contextual-parameters": 0, - "x-notifier": "Lifecycle2.onStateChanged" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:cpp-client-only" - ] - } - ], - "summary": "Notification of lifecycle state change, raised after the platform has transitioned the app/runtime to the new lifecycle state", - "params": [ - { - "name": "listen", - "schema": { - "type": "boolean" - } - } - ], - "examples": [ - { - "name": "App is active after being initialized", - "params": [ - { - "name": "listen", - "value": true - } - ], - "result": { - "name": "result", - "value": null - } - }, - { - "name": "Single transition to paused state", - "params": [ - { - "name": "listen", - "value": true - } - ], - "result": { - "name": "result", - "value": null - } - } - ], - "result": { - "name": "result", - "schema": { - "type": "null" - } - } - }, - { - "name": "TextToSpeech.onWillspeak", - "summary": "Text to speech conversion is about to start.", - "tags": [ - { - "name": "rpc-only" - }, - { - "name": "event", - "x-notifier": "TextToSpeech.onWillspeak" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:text-to-speech:general" - ] - } - ], - "params": [ - { - "name": "listen", - "schema": { - "type": "boolean" - } - } - ], - "examples": [ - { - "name": "Default Example", - "params": [ - { - "name": "listen", - "value": true - } - ], - "result": { - "name": "result", - "value": null - } - } - ], - "result": { - "name": "result", - "schema": { - "type": "null" - } - } - }, - { - "name": "TextToSpeech.onSpeechstart", - "summary": "Utterance is about to be spoken.", - "tags": [ - { - "name": "rpc-only" - }, - { - "name": "event", - "x-notifier": "TextToSpeech.onSpeechstart" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:text-to-speech:general" - ] - } - ], - "params": [ - { - "name": "listen", - "schema": { - "type": "boolean" - } - } - ], - "examples": [ - { - "name": "Default Example", - "params": [ - { - "name": "listen", - "value": true - } - ], - "result": { - "name": "result", - "value": null - } - } - ], - "result": { - "name": "result", - "schema": { - "type": "null" - } - } - }, - { - "name": "TextToSpeech.onSpeechpause", - "summary": "Ongoing speech was paused.", - "tags": [ - { - "name": "rpc-only" - }, - { - "name": "event", - "x-notifier": "TextToSpeech.onSpeechpause" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:text-to-speech:general" - ] - } - ], - "params": [ - { - "name": "listen", - "schema": { - "type": "boolean" - } - } - ], - "examples": [ - { - "name": "Default Example", - "params": [ - { - "name": "listen", - "value": true - } - ], - "result": { - "name": "result", - "value": null - } - } - ], - "result": { - "name": "result", - "schema": { - "type": "null" - } - } - }, - { - "name": "TextToSpeech.onSpeechresume", - "summary": "Paused speech was resumed.", - "tags": [ - { - "name": "rpc-only" - }, - { - "name": "event", - "x-notifier": "TextToSpeech.onSpeechresume" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:text-to-speech:general" - ] - } - ], - "params": [ - { - "name": "listen", - "schema": { - "type": "boolean" - } - } - ], - "examples": [ - { - "name": "Default Example", - "params": [ - { - "name": "listen", - "value": true - } - ], - "result": { - "name": "result", - "value": null - } - } - ], - "result": { - "name": "result", - "schema": { - "type": "null" - } - } - }, - { - "name": "TextToSpeech.onSpeechcomplete", - "summary": "Speech completed successfully.", - "tags": [ - { - "name": "rpc-only" - }, - { - "name": "event", - "x-notifier": "TextToSpeech.onSpeechcomplete" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:text-to-speech:general" - ] - } - ], - "params": [ - { - "name": "listen", - "schema": { - "type": "boolean" - } - } - ], - "examples": [ - { - "name": "Default Example", - "params": [ - { - "name": "listen", - "value": true - } - ], - "result": { - "name": "result", - "value": null - } - } - ], - "result": { - "name": "result", - "schema": { - "type": "null" - } - } - }, - { - "name": "TextToSpeech.onSpeechinterrupted", - "summary": "Speech was stopped, due to another call to speak or cancel.", - "tags": [ - { - "name": "rpc-only" - }, - { - "name": "event", - "x-notifier": "TextToSpeech.onSpeechinterrupted" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:text-to-speech:general" - ] - } - ], - "params": [ - { - "name": "listen", - "schema": { - "type": "boolean" - } - } - ], - "examples": [ - { - "name": "Default Example", - "params": [ - { - "name": "listen", - "value": true - } - ], - "result": { - "name": "result", - "value": null - } - } - ], - "result": { - "name": "result", - "schema": { - "type": "null" - } - } - }, - { - "name": "TextToSpeech.onNetworkerror", - "summary": "Utterance failed due to network error.", - "tags": [ - { - "name": "rpc-only" - }, - { - "name": "event", - "x-notifier": "TextToSpeech.onNetworkerror" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:text-to-speech:general" - ] - } - ], - "params": [ - { - "name": "listen", - "schema": { - "type": "boolean" - } - } - ], - "examples": [ - { - "name": "Default Example", - "params": [ - { - "name": "listen", - "value": true - } - ], - "result": { - "name": "result", - "value": null - } - } - ], - "result": { - "name": "result", - "schema": { - "type": "null" - } - } - }, - { - "name": "TextToSpeech.onPlaybackerror", - "summary": "Utterance failed during playback.", - "tags": [ - { - "name": "rpc-only" - }, - { - "name": "event", - "x-notifier": "TextToSpeech.onPlaybackerror" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:text-to-speech:general" - ] - } - ], - "params": [ - { - "name": "listen", - "schema": { - "type": "boolean" - } - } - ], - "examples": [ - { - "name": "Default Example", - "params": [ - { - "name": "listen", - "value": true - } - ], - "result": { - "name": "result", - "value": null - } - } - ], - "result": { - "name": "result", - "schema": { - "type": "null" - } - } - }, - { - "name": "Accessibility.onAudioDescriptionChanged", - "summary": "Returns the audio description setting of the device", - "params": [ - { - "name": "listen", - "schema": { - "type": "boolean" - } - } - ], - "tags": [ - { - "name": "event", - "x-notifier": "Accessibility.onAudioDescriptionChanged", - "x-subscriber-for": "Accessibility.audioDescription" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:accessibility:audio-descriptions" - ] - } - ], - "examples": [ - { - "name": "Getting the audio description setting", - "params": [ - { - "name": "listen", - "value": true - } - ], - "result": { - "name": "result", - "value": null - } - } - ], - "result": { - "name": "result", - "schema": { - "type": "null" - } - } - }, - { - "name": "Accessibility.onClosedCaptionsSettingsChanged", - "summary": "Returns captions settings: enabled, and a list of zero or more languages in order of decreasing preference", - "params": [ - { - "name": "listen", - "schema": { - "type": "boolean" - } - } - ], - "tags": [ - { - "name": "event", - "x-notifier-params-flattening": "true", - "x-notifier": "Accessibility.onClosedCaptionsSettingsChanged", - "x-subscriber-for": "Accessibility.closedCaptionsSettings" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:accessibility:closed-captions" - ] - } - ], - "examples": [ - { - "name": "Getting the closed captions settings", - "params": [ - { - "name": "listen", - "value": true - } - ], - "result": { - "name": "result", - "value": null - } - } - ], - "result": { - "name": "result", - "schema": { - "type": "null" - } - } - }, - { - "name": "Accessibility.onHighContrastUIChanged", - "summary": "Returns the high contrast UI device setting", - "params": [ - { - "name": "listen", - "schema": { - "type": "boolean" - } - } - ], - "tags": [ - { - "name": "event", - "x-notifier": "Accessibility.onHighContrastUIChanged", - "x-subscriber-for": "Accessibility.highContrastUI" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:accessibility:high-contrast-ui" - ] - } - ], - "examples": [ - { - "name": "High-contrast UI mode is enabled", - "params": [ - { - "name": "listen", - "value": true - } - ], - "result": { - "name": "result", - "value": null - } - } - ], - "result": { - "name": "result", - "schema": { - "type": "null" - } - } - }, - { - "name": "Accessibility.onVoiceGuidanceSettingsChanged", - "summary": "Returns voice guidance settings: enabled, rate, and verbosity", - "params": [ - { - "name": "listen", - "schema": { - "type": "boolean" - } - } - ], - "tags": [ - { - "name": "event", - "x-notifier-params-flattening": "true", - "x-notifier": "Accessibility.onVoiceGuidanceSettingsChanged", - "x-subscriber-for": "Accessibility.voiceGuidanceSettings" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:accessibility:voice-guidance" - ] - } - ], - "examples": [ - { - "name": "Getting the voice guidance settings", - "params": [ - { - "name": "listen", - "value": true - } - ], - "result": { - "name": "result", - "value": null - } - } - ], - "result": { - "name": "result", - "schema": { - "type": "null" - } - } - }, - { - "name": "Device.onHdrChanged", - "summary": "Returns the HDR standards that are supported by the attached TV or the integral display", - "params": [ - { - "name": "listen", - "schema": { - "type": "boolean" - } - } - ], - "tags": [ - { - "name": "event", - "x-notifier": "Device.onHdrChanged", - "x-subscriber-for": "Device.hdr" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:device:info" - ] - } - ], - "examples": [ - { - "name": "Getting the negotiated HDR formats", - "params": [ - { - "name": "listen", - "value": true - } - ], - "result": { - "name": "result", - "value": null - } - } - ], - "result": { - "name": "result", - "schema": { - "type": "null" - } - } - }, - { - "name": "Localization.onCountryChanged", - "tags": [ - { - "name": "event", - "x-notifier": "Localization.onCountryChanged", - "x-subscriber-for": "Localization.country" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:localization:country-code" - ] - } - ], - "summary": "Returns the ISO 3166-1 alpha-2 code for the country device is located in.", - "params": [ - { - "name": "listen", - "schema": { - "type": "boolean" - } - } - ], - "examples": [ - { - "name": "Default example", - "params": [ - { - "name": "listen", - "value": true - } - ], - "result": { - "name": "result", - "value": null - } - }, - { - "name": "Another example", - "params": [ - { - "name": "listen", - "value": true - } - ], - "result": { - "name": "result", - "value": null - } - } - ], - "result": { - "name": "result", - "schema": { - "type": "null" - } - } - }, - { - "name": "Localization.onPreferredAudioLanguagesChanged", - "summary": "Returns a list of ISO 639-2/B codes for the preferred audio languages on this device.", - "params": [ - { - "name": "listen", - "schema": { - "type": "boolean" - } - } - ], - "tags": [ - { - "name": "event", - "x-notifier": "Localization.onPreferredAudioLanguagesChanged", - "x-subscriber-for": "Localization.preferredAudioLanguages" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:localization:preferred-audio-languages" - ] - } - ], - "examples": [ - { - "name": "Default example", - "params": [ - { - "name": "listen", - "value": true - } - ], - "result": { - "name": "result", - "value": null - } - } - ], - "result": { - "name": "result", - "schema": { - "type": "null" - } - } - }, - { - "name": "Localization.onPresentationLanguageChanged", - "tags": [ - { - "name": "event", - "x-notifier": "Localization.onPresentationLanguageChanged", - "x-subscriber-for": "Localization.presentationLanguage" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:localization:locale" - ] - } - ], - "summary": "Get the *full* BCP 47 code, including script, region, variant, etc., for the preferred locale", - "params": [ - { - "name": "listen", - "schema": { - "type": "boolean" - } - } - ], - "examples": [ - { - "name": "Default example", - "params": [ - { - "name": "listen", - "value": true - } - ], - "result": { - "name": "result", - "value": null - } - } - ], - "result": { - "name": "result", - "schema": { - "type": "null" - } - } - }, - { - "name": "Network.onConnectedChanged", - "summary": "Returns whether the device currently has a usable network connection.", - "tags": [ - { - "name": "event", - "x-notifier": "Network.onConnectedChanged", - "x-subscriber-for": "Network.connected" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:network:connected" - ] - } - ], - "params": [ - { - "name": "listen", - "schema": { - "type": "boolean" - } - } - ], - "examples": [ - { - "name": "Connected example", - "params": [ - { - "name": "listen", - "value": true - } - ], - "result": { - "name": "result", - "value": null - } - } - ], - "result": { - "name": "result", - "schema": { - "type": "null" - } - } - }, - { - "name": "Presentation.onFocusedChanged", - "tags": [ - { - "name": "event", - "x-notifier": "Presentation.onFocusedChanged", - "x-subscriber-for": "Presentation.focused" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:cpp-client-only" - ] - } - ], - "summary": "Whether the app is in focus, i.e. receiving key presses. Provided for those apps/runtimes that cannot use Wayland", - "params": [ - { - "name": "listen", - "schema": { - "type": "boolean" - } - } - ], - "examples": [ - { - "name": "Default example", - "params": [ - { - "name": "listen", - "value": true - } - ], - "result": { - "name": "result", - "value": null - } - } - ], - "result": { - "name": "result", - "schema": { - "type": "null" - } - } - } - ], - "components": { - "schemas": { - "AdvertisingIdResult": { - "title": "AdvertisingIdResult", - "type": "object", - "properties": { - "ifa": { - "type": "string", - "description": "UUID conforming to IAB standard" - }, - "ifa_type": { - "type": "string", - "description": "Source of the IFA as defined by IAB" - }, - "lmt": { - "type": "string", - "enum": [ - "0", - "1" - ], - "description": "Boolean that if set to 1, user has requested ad tracking and measurement is disabled" - } - }, - "required": [ - "ifa", - "ifa_type", - "lmt" - ] - }, - "HDRFormatMap": { - "title": "HDRFormatMap", - "type": "object", - "properties": { - "hdr10": { - "type": "boolean" - }, - "hdr10Plus": { - "type": "boolean" - }, - "dolbyVision": { - "type": "boolean" - }, - "hlg": { - "type": "boolean" - } - }, - "required": [ - "hdr10", - "hdr10Plus", - "dolbyVision", - "hlg" - ], - "description": "The type of HDR format" - }, - "DeviceClass": { - "title": "DeviceClass", - "type": "string", - "enum": [ - "ott", - "stb", - "tv" - ], - "description": "The type of device" - }, - "CloseType": { - "title": "CloseType", - "description": "The application close type", - "type": "string", - "enum": [ - "deactivate", - "unload", - "killReload", - "killReactivate" - ] - }, - "LifecycleState": { - "title": "LifecycleState", - "description": "The application Lifecycle state", - "type": "string", - "enum": [ - "initializing", - "active", - "paused", - "suspended", - "hibernated", - "terminating" - ] - }, - "StateChange": { - "title": "StateChange", - "type": "object", - "properties": { - "newState": { - "$ref": "#/components/schemas/LifecycleState" - }, - "oldState": { - "$ref": "#/components/schemas/LifecycleState" - } - } - }, - "MediaPosition": { - "title": "MediaPosition", - "description": "Represents a position inside playback content, as a decimal percentage (0-0.999) for content with a known duration, or an integer number of seconds (0-86400) for content with an unknown duration.", - "oneOf": [ - { - "const": 0 - }, - { - "type": "number", - "exclusiveMinimum": 0, - "exclusiveMaximum": 1 - }, - { - "type": "integer", - "minimum": 1, - "maximum": 86400 - } - ] - }, - "ErrorType": { - "title": "ErrorType", - "type": "string", - "enum": [ - "network", - "media", - "restriction", - "entitlement", - "other" - ] - }, - "EventObjectPrimitives": { - "title": "EventObjectPrimitives", - "anyOf": [ - { - "type": "string", - "maxLength": 256 - }, - { - "type": "number" - }, - { - "type": "integer" - }, - { - "type": "boolean" - }, - { - "type": "null" - } - ] - }, - "Connected": { - "type": "boolean", - "description": "Indicates whether the device currently has a usable network connection." - }, - "MemoryUsage": { - "title": "MemoryUsage", - "type": "object", - "description": "Describes current and maximum memory usage of the container.", - "properties": { - "userMemoryUsedKiB": { - "type": "integer", - "description": "User memory currently used in 1024 bytes." - }, - "userMemoryLimitKiB": { - "type": "integer", - "description": "Maximum user memory available in 1024 bytes." - }, - "gpuMemoryUsedKiB": { - "type": "integer", - "description": "GPU memory currently used in 1024 bytes." - }, - "gpuMemoryLimitKiB": { - "type": "integer", - "description": "Maximum GPU memory available in 1024 bytes." - } - }, - "required": [ - "userMemoryUsedKiB", - "userMemoryLimitKiB", - "gpuMemoryUsedKiB", - "gpuMemoryLimitKiB" - ] - }, - "TTSEnabled": { - "title": "TTSEnabled", - "type": "object", - "required": [ - "TTS_Status", - "isenabled" - ], - "properties": { - "TTS_Status": { - "$ref": "#/components/schemas/TTSStatus" - }, - "isenabled": { - "type": "boolean" - } - } - }, - "ListVoicesResponse": { - "title": "ListVoicesResponse", - "type": "object", - "required": [ - "TTS_Status", - "voices" - ], - "properties": { - "TTS_Status": { - "$ref": "#/components/schemas/TTSStatus" - }, - "voices": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "TTSConfiguration": { - "title": "TTSConfiguration", - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "type": "boolean" - }, - "ttsendpoint": { - "type": "string", - "description": "URL for Text to Speech API" - }, - "ttsendpointsecured": { - "type": "string", - "description": "Secure URL for Text to Speech API" - }, - "language": { - "type": "string", - "description": "Language used by Text to speech" - }, - "voice": { - "type": "string", - "description": "Voice used by Text to speech" - }, - "volume": { - "type": "integer", - "description": "Volume for Text to speech", - "minimum": 0, - "maximum": 100 - }, - "primvolduckpercent": { - "type": "integer", - "description": "Prime Volume duck percent for Text to speech", - "minimum": 0, - "maximum": 100 - }, - "rate": { - "type": "integer", - "description": "Speech rate for Text to speech", - "minimum": 0, - "maximum": 100 - }, - "speechrate": { - "description": "Rate for speech", - "$ref": "#/components/schemas/SpeechRate" - }, - "fallbacktext": { - "description": "Fallback text for TTS", - "$ref": "#/components/schemas/FallbackText" - } - }, - "examples": [ - {} - ] - }, - "SpeechRate": { - "title": "SpeechRate", - "type": "string", - "enum": [ - "slow", - "medium", - "fast", - "faster", - "fastest" - ] - }, - "FallbackText": { - "title": "FallbackText", - "type": "object", - "properties": { - "scenario": { - "type": "string", - "description": "Scenario for fallback Text" - }, - "value": { - "type": "string", - "description": "Value for fallback Text" - } - } - }, - "SpeechResponse": { - "title": "SpeechResponse", - "type": "object", - "properties": { - "speechid": { - "$ref": "#/components/schemas/SpeechId" - }, - "TTS_Status": { - "$ref": "#/components/schemas/TTSStatus" - }, - "success": { - "type": "boolean" - } - }, - "required": [ - "speechid", - "TTS_Status", - "success" - ] - }, - "SpeechId": { - "type": "integer" - }, - "SpeechIdEvent": { - "type": "object", - "properties": { - "speechid": { - "$ref": "#/components/schemas/SpeechId" - } - }, - "required": [ - "speechid" - ] - }, - "TTSStatus": { - "title": "TTSStatus", - "type": "integer", - "minimum": 0, - "maximum": 3 - }, - "SpeechState": { - "title": "SpeechState", - "type": "integer", - "enum": [ - 0, - 1, - 2, - 3 - ], - "description": "0 = SPEECH_PENDING, 1 = SPEECH_IN_PROGRESS, 2 = SPEECH_PAUSED, 3 = SPEECH_NOT_FOUND" - }, - "SpeechStateResponse": { - "title": "SpeechStateResponse", - "type": "object", - "properties": { - "speechstate": { - "$ref": "#/components/schemas/SpeechState" - }, - "TTS_Status": { - "$ref": "#/components/schemas/TTSStatus" - }, - "success": { - "type": "boolean" - } - }, - "required": [ - "speechstate", - "TTS_Status", - "success" - ] - }, - "TTSStatusResponse": { - "title": "TTSStatusResponse", - "type": "object", - "properties": { - "TTS_Status": { - "$ref": "#/components/schemas/TTSStatus" - }, - "success": { - "type": "boolean" - } - }, - "required": [ - "TTS_Status", - "success" - ] - }, - "TTSState": { - "title": "TTSState", - "type": "object", - "properties": { - "state": { - "type": "boolean" - } - }, - "required": [ - "state" - ] - }, - "TTSVoice": { - "title": "TTSVoice", - "type": "object", - "properties": { - "voice": { - "type": "string" - } - }, - "required": [ - "voice" - ] - } - } - }, - "x-schemas": { - "Accessibility": { - "uri": "https://meta.comcast.com/firebolt/accessibility", - "ClosedCaptionsSettings": { - "title": "ClosedCaptionsSettings", - "type": "object", - "required": [ - "enabled" - ], - "properties": { - "enabled": { - "type": "boolean", - "description": "Whether or not closed-captions should be enabled by default" - }, - "preferredLanguages": { - "type": "array", - "items": { - "$ref": "#/x-schemas/Localization/ISO639_2Language" - } - } - }, - "examples": [ - { - "enabled": true, - "styles": { - "fontFamily": "monospaced_serif", - "fontSize": 1, - "fontColor": "#ffffff", - "fontEdge": "none", - "fontEdgeColor": "#7F7F7F", - "fontOpacity": 100, - "backgroundColor": "#000000", - "backgroundOpacity": 100, - "textAlign": "center", - "textAlignVertical": "middle", - "windowColor": "white", - "windowOpacity": 50 - }, - "preferredLanguages": [ - "eng", - "spa" - ] - } - ] - }, - "VoiceGuidanceSettings": { - "title": "VoiceGuidanceSettings", - "type": "object", - "required": [ - "enabled", - "navigationHints", - "rate" - ], - "properties": { - "enabled": { - "type": "boolean", - "description": "Whether or not voice guidance should be enabled by default" - }, - "rate": { - "$ref": "#/x-schemas/Accessibility/SpeechRate", - "description": "The rate at which voice guidance speech will be read back to the user" - }, - "navigationHints": { - "type": "boolean", - "description": "Whether or not voice guidance should include additional navigation hints" - } - }, - "examples": [ - { - "enabled": true, - "navigationHints": true, - "rate": 0.8 - } - ] - }, - "SpeechRate": { - "title": "SpeechRate", - "type": "number", - "minimum": 0.1, - "maximum": 10 - } - }, - "Localization": { - "uri": "https://meta.comcast.com/firebolt/localization", - "ISO639_2Language": { - "type": "string", - "pattern": "^[a-z]{3}$" - }, - "CountryCode": { - "type": "string", - "pattern": "^[A-Z]{2}$" - }, - "Locale": { - "type": "string", - "pattern": "^[a-zA-Z]+([a-zA-Z0-9\\-]*)$" - } - }, - "Policies": { - "uri": "https://meta.comcast.com/firebolt/policies", - "AgePolicy": { - "title": "AgePolicy", - "description": "The policy that describes various age groups to which content is directed. See distributor documentation for further details.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "app:adult", - "app:child", - "app:teen" - ] - } - ] - } - }, - "Types": { - "uri": "https://meta.comcast.com/firebolt/types", - "FlatMap": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "boolean" - } - ] - } - } - } - } -} \ No newline at end of file + "openrpc": "1.2.4", + "info": { + "title": "Firebolt JSON-RPC API", + "version": "", + "x-module-descriptions": { + "Accessibility": "The `Accessibility` module provides access to the user/device settings for closed captioning and voice guidance.\n\nApps **SHOULD** attempt o respect these settings, rather than manage and persist seprate settings, which would be different per-app.", + "Advertising": "A module for platform provided advertising settings and functionality.", + "Device": "A module for querying about the device and it's capabilities.", + "Discovery": "Your App likely wants to integrate with the Platform's discovery capabilities. For example to add a \"Watch Next\" tile that links to your app from the platform's home screen.\n\nGetting access to this information requires to connect to lower level APIs made available by the platform. Since implementations differ between operators and platforms, the Firebolt SDK offers a Discovery module, that exposes a generic, agnostic interface to the developer.\n\nUnder the hood, an underlaying transport layer will then take care of calling the right APIs for the actual platform implementation that your App is running on.\n\nThe Discovery plugin is used to _send_ information to the Platform.\n\n### Localization\nApps should provide all user-facing strings in the device's language, as specified by the Firebolt `Localization.language` property.\n\nApps should provide prices in the same currency presented in the app. If multiple currencies are supported in the app, the app should provide prices in the user's current default currency.", + "Display": "A module for querying about the display", + "Lifecycle2": "Methods and events for responding to Lifecycle changes in your app.", + "Localization": "Methods for accessing location and language preferences.", + "Metrics": "Methods for sending metrics", + "Network": "Methods for accessing network information.", + "Presentation": "Methods for accessing Presentation preferences.", + "Stats": "Provides methods to retrieve application-level system information.", + "TextToSpeech": "A module for controlling and accessing Text To Speech over Firebolt." + } + }, + "methods": [ + { + "name": "rpc.discover", + "summary": "The OpenRPC schema for this JSON-RPC API", + "params": [], + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:rpc:discover" + ] + } + ], + "result": { + "name": "OpenRPC Schema", + "schema": { + "type": "object" + } + }, + "examples": [ + { + "name": "Default", + "params": [], + "result": { + "name": "schema", + "value": {} + } + } + ] + }, + { + "name": "Accessibility.audioDescription", + "summary": "Returns the audio description setting of the device", + "params": [], + "tags": [ + { + "name": "property:readonly" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:audio-descriptions" + ] + } + ], + "result": { + "name": "setting", + "summary": "the audio description setting", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Getting the audio description setting", + "params": [], + "result": { + "name": "Default Result", + "value": true + } + } + ] + }, + { + "name": "Accessibility.closedCaptionsSettings", + "summary": "Returns captions settings: enabled, and a list of zero or more languages in order of decreasing preference", + "params": [], + "tags": [ + { + "name": "property:readonly", + "x-notifier-params-flattening": "true" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closed-captions" + ] + } + ], + "result": { + "name": "closedCaptionsSettings", + "summary": "the closed captions settings", + "schema": { + "$ref": "#/x-schemas/Accessibility/ClosedCaptionsSettings" + } + }, + "examples": [ + { + "name": "Getting the closed captions settings", + "params": [], + "result": { + "name": "settings", + "value": { + "enabled": true, + "preferredLanguages": [ + "eng", + "spa" + ] + } + } + } + ] + }, + { + "name": "Accessibility.highContrastUI", + "summary": "Returns the high contrast UI device setting", + "params": [], + "tags": [ + { + "name": "property:readonly" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:high-contrast-ui" + ] + } + ], + "result": { + "name": "highContrastUI", + "summary": "Whether high-contrast UI mode is enabled", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "High-contrast UI mode is enabled", + "params": [], + "result": { + "name": "Default Result", + "value": true + } + } + ] + }, + { + "name": "Accessibility.voiceGuidanceSettings", + "summary": "Returns voice guidance settings: enabled, rate, and verbosity", + "params": [], + "tags": [ + { + "name": "property:readonly", + "x-notifier-params-flattening": "true" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:voice-guidance" + ] + } + ], + "result": { + "name": "settings", + "summary": "the voice guidance settings", + "schema": { + "$ref": "#/x-schemas/Accessibility/VoiceGuidanceSettings" + } + }, + "examples": [ + { + "name": "Getting the voice guidance settings", + "params": [], + "result": { + "name": "Default Result", + "value": { + "enabled": true, + "rate": 0.8, + "navigationHints": true + } + } + } + ] + }, + { + "name": "Advertising.advertisingId", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:advertising:identifier" + ] + } + ], + "summary": "Returns the IFA.", + "params": [], + "result": { + "name": "advertisingId", + "summary": "The advertising ID", + "schema": { + "$ref": "#/components/schemas/AdvertisingIdResult" + } + }, + "examples": [ + { + "name": "Getting the advertising ID", + "params": [], + "result": { + "name": "Default Result", + "value": { + "ifa": "bd87dd10-8d1d-4b93-b1a6-a8e5d410e400", + "ifa_type": "sspid", + "lmt": "0" + } + } + }, + { + "name": "Getting the advertising ID with scope browse", + "params": [], + "result": { + "name": "Default Result", + "value": { + "ifa": "bd87dd10-8d1d-4b93-b1a6-a8e5d410e400", + "ifa_type": "sspid", + "lmt": "1" + } + } + }, + { + "name": "Getting the advertising ID with scope content", + "params": [], + "result": { + "name": "Default Result", + "value": { + "ifa": "bd87dd10-8d1d-4b93-b1a6-a8e5d410e400", + "ifa_type": "idfa", + "lmt": "0" + } + } + } + ] + }, + { + "name": "Device.uid", + "summary": "Returns a persistent unique UUID for the current app and device. The UUID is reset when the app or device is reset", + "params": [], + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:uid" + ] + } + ], + "result": { + "name": "uniqueId", + "summary": "A unique UUID for this app-device pair.", + "schema": { + "type": "string" + } + }, + "examples": [ + { + "name": "Getting the unique UUID", + "params": [], + "result": { + "name": "Default Result", + "value": "ee6723b8-7ab3-462c-8d93-dbf61227998e" + } + } + ] + }, + { + "name": "Device.deviceClass", + "summary": "Returns the class of the device", + "params": [], + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:device-class" + ] + } + ], + "result": { + "name": "deviceClass", + "summary": "The device class", + "schema": { + "$ref": "#/components/schemas/DeviceClass" + } + }, + "examples": [ + { + "name": "Getting the device class", + "params": [], + "result": { + "name": "Default Result", + "value": "ott" + } + } + ] + }, + { + "name": "Device.uptime", + "summary": "Returns the number of seconds since most recent device boot, including any time spent during deep sleep", + "params": [], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:info" + ] + } + ], + "result": { + "name": "uptime", + "summary": "The device uptime", + "schema": { + "type": "number" + } + }, + "examples": [ + { + "name": "Getting the device uptime", + "params": [], + "result": { + "name": "Default Result", + "value": 123456 + } + } + ] + }, + { + "name": "Device.timeInActiveState", + "summary": "Returns the number of seconds since the device transitioned to the ON power state", + "params": [], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:info" + ] + } + ], + "result": { + "name": "timeInActiveState", + "summary": "The device time in active state", + "schema": { + "type": "number" + } + }, + "examples": [ + { + "name": "Getting the number of seconds since the device transitioned to the ON power state", + "params": [], + "result": { + "name": "Default Result", + "value": 654321 + } + } + ] + }, + { + "name": "Device.chipsetId", + "summary": "Returns chipset ID as a printable string, e.g. BCM72180", + "params": [], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:info" + ] + } + ], + "result": { + "name": "chipsetId", + "summary": "The device chipset ID", + "schema": { + "type": "string" + } + }, + "examples": [ + { + "name": "Getting the device chipset ID", + "params": [], + "result": { + "name": "Default Result", + "value": "BCM72180" + } + } + ] + }, + { + "name": "Device.hdr", + "summary": "Returns the HDR standards that are supported by the attached TV or the integral display", + "params": [], + "tags": [ + { + "name": "property:readonly" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:info" + ] + } + ], + "result": { + "name": "negotiatedHdrFormats", + "summary": "the negotiated HDR formats", + "schema": { + "$ref": "#/components/schemas/HDRFormatMap" + } + }, + "examples": [ + { + "name": "Getting the negotiated HDR formats", + "params": [], + "result": { + "name": "Default Result", + "value": { + "hdr10": true, + "hdr10Plus": true, + "dolbyVision": true, + "hlg": true + } + } + } + ] + }, + { + "name": "Discovery.watched", + "summary": "Notify the platform that content was partially or completely watched", + "tags": [ + { + "name": "polymorphic-reducer" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:discovery:watched" + ] + } + ], + "params": [ + { + "name": "entityId", + "required": true, + "schema": { + "type": "string" + }, + "summary": "The entity Id of the watched content." + }, + { + "name": "progress", + "summary": "How much of the content has been watched (percentage as (0-0.999) for VOD, number of seconds for live)", + "schema": { + "type": "number", + "minimum": 0 + } + }, + { + "name": "completed", + "summary": "Whether or not this viewing is considered \"complete,\" per the app's definition thereof", + "schema": { + "type": "boolean" + } + }, + { + "name": "watchedOn", + "summary": "Date/Time the content was watched, ISO 8601 Date/Time", + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "name": "agePolicy", + "description": "The age policy associated with the watch event. The age policy describes the age groups to which content may be directed.", + "schema": { + "$ref": "#/x-schemas/Policies/AgePolicy" + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Notify the platform of watched content", + "params": [ + { + "name": "entityId", + "value": "partner.com/entity/123" + }, + { + "name": "progress", + "value": 0.95 + }, + { + "name": "completed", + "value": true + }, + { + "name": "watchedOn", + "value": "2021-04-23T18:25:43.511Z" + } + ], + "result": { + "name": "success", + "value": true + } + }, + { + "name": "Notify the platform that child-directed content was watched", + "params": [ + { + "name": "entityId", + "value": "partner.com/entity/123" + }, + { + "name": "progress", + "value": 0.95 + }, + { + "name": "completed", + "value": true + }, + { + "name": "watchedOn", + "value": "2021-04-23T18:25:43.511Z" + }, + { + "name": "agePolicy", + "value": "app:child" + } + ], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Display.edid", + "summary": "Returns the EDID (and extensions) of the connected or integral display, as a Base64 encoded string", + "params": [], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:display:info" + ] + } + ], + "result": { + "name": "Base64 EDID", + "summary": "The EDID (and extensions) of the connected or integral display, as a Base64 encoded string", + "schema": { + "type": "string" + } + }, + "examples": [ + { + "name": "Getting the display EDID", + "params": [], + "result": { + "name": "Default Result", + "value": "ZWU2NzIzYjgtN2FiMy00NjJjLThkOTMtZGJmNjEyMjc5OThl" + } + } + ] + }, + { + "name": "Display.size", + "summary": "Returns the physical dimensions of the connected or integral display, in centimeters. Returns 0, 0 on a OTT/STB device when a display is not connected over HDMI", + "params": [], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:display:info" + ] + } + ], + "result": { + "name": "size", + "summary": "The display size in centimeters", + "schema": { + "type": "object", + "properties": { + "width": { + "type": "integer", + "description": "The width of the display in centimeters" + }, + "height": { + "type": "integer", + "description": "The height of the display in centimeters" + } + } + } + }, + "examples": [ + { + "name": "Getting the display size", + "params": [], + "result": { + "name": "Default Result", + "value": { + "width": 48, + "height": 27 + } + } + } + ] + }, + { + "name": "Display.maxResolution", + "summary": "Returns the physical/native resolution of the connected or integral display, in pixels. Returns 0, 0 on a OTT/STB device when a display is not connected over HDMI", + "params": [], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:display:info" + ] + } + ], + "result": { + "name": "maxResolution", + "summary": "The display resolution", + "schema": { + "type": "object", + "properties": { + "width": { + "type": "integer", + "description": "The width of the display in pixels" + }, + "height": { + "type": "integer", + "description": "The height of the display in pixels" + } + } + } + }, + "examples": [ + { + "name": "Getting the display size", + "params": [], + "result": { + "name": "Default Result", + "value": { + "width": 1920, + "height": 1080 + } + } + } + ] + }, + { + "name": "Lifecycle2.close", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:cpp-client-only" + ] + } + ], + "summary": "Request the platform to deactivate the app, and possibly take further action.", + "params": [ + { + "name": "type", + "summary": "The type of the close app is requesting", + "required": true, + "schema": { + "$ref": "#/components/schemas/CloseType" + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Close the app when the user presses back on the app home screen", + "params": [ + { + "name": "type", + "value": "unload" + } + ], + "result": { + "name": "Default Result", + "value": null + } + }, + { + "name": "Close the app when the user selects an exit menu item", + "params": [ + { + "name": "type", + "value": "deactivate" + } + ], + "result": { + "name": "Default Result", + "value": null + } + } + ] + }, + { + "name": "Lifecycle2.state", + "summary": "Get the current lifecycle state of the app.", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:cpp-client-only" + ] + } + ], + "params": [], + "result": { + "name": "state", + "summary": "The current lifecycle state of the app.", + "schema": { + "$ref": "#/components/schemas/LifecycleState" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "Default Result", + "value": "active" + } + } + ] + }, + { + "name": "Localization.country", + "tags": [ + { + "name": "property:readonly" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:localization:country-code" + ] + } + ], + "summary": "Returns the ISO 3166-1 alpha-2 code for the country device is located in.", + "params": [], + "result": { + "name": "code", + "summary": "The device country code.", + "schema": { + "$ref": "#/x-schemas/Localization/CountryCode" + } + }, + "examples": [ + { + "name": "Default example", + "params": [], + "result": { + "name": "Default Result", + "value": "US" + } + }, + { + "name": "Another example", + "params": [], + "result": { + "name": "Default Result", + "value": "GB" + } + } + ] + }, + { + "name": "Localization.preferredAudioLanguages", + "summary": "Returns a list of ISO 639-2/B codes for the preferred audio languages on this device.", + "params": [], + "tags": [ + { + "name": "property:readonly" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:localization:preferred-audio-languages" + ] + } + ], + "result": { + "name": "languages", + "summary": "The preferred audio languages.", + "schema": { + "type": "array", + "items": { + "$ref": "#/x-schemas/Localization/ISO639_2Language" + } + } + }, + "examples": [ + { + "name": "Default example", + "params": [], + "result": { + "name": "Default Result", + "value": [ + "spa", + "eng" + ] + } + } + ] + }, + { + "name": "Localization.presentationLanguage", + "tags": [ + { + "name": "property:readonly" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:localization:locale" + ] + } + ], + "summary": "Get the *full* BCP 47 code, including script, region, variant, etc., for the preferred locale", + "params": [], + "result": { + "name": "locale", + "summary": "The device locale.", + "schema": { + "$ref": "#/x-schemas/Localization/Locale" + } + }, + "examples": [ + { + "name": "Default example", + "params": [], + "result": { + "name": "Default Result", + "value": "en-US" + } + } + ] + }, + { + "name": "Metrics.ready", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:general" + ] + } + ], + "summary": "Inform the platform that your app is minimally usable. This method is called automatically by `Lifecycle.ready()`", + "params": [], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Send ready metric", + "params": [], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Metrics.signIn", + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:general" + ] + } + ], + "summary": "Log a sign in event, called by Discovery.signIn().", + "params": [], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Send signIn metric", + "params": [], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Metrics.signOut", + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:general" + ] + } + ], + "summary": "Log a sign out event, called by Discovery.signOut().", + "params": [], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Send signOut metric", + "params": [], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Metrics.startContent", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:general" + ] + } + ], + "summary": "Inform the platform that your user has started content.", + "params": [ + { + "name": "entityId", + "summary": "Optional entity ID of the content.", + "schema": { + "type": "string" + }, + "required": false + }, + { + "name": "agePolicy", + "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", + "schema": { + "$ref": "#/x-schemas/Policies/AgePolicy" + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Send startContent metric", + "params": [], + "result": { + "name": "success", + "value": true + } + }, + { + "name": "Send startContent metric w/ entity", + "params": [ + { + "name": "entityId", + "value": "abc" + } + ], + "result": { + "name": "success", + "value": true + } + }, + { + "name": "Send startContent metric and notify the platform that the content is child-directed", + "params": [ + { + "name": "entityId", + "value": "abc" + }, + { + "name": "agePolicy", + "value": "app:child" + } + ], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Metrics.stopContent", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:general" + ] + } + ], + "summary": "Inform the platform that your user has stopped content.", + "params": [ + { + "name": "entityId", + "summary": "Optional entity ID of the content.", + "schema": { + "type": "string" + }, + "required": false + }, + { + "name": "agePolicy", + "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", + "schema": { + "$ref": "#/x-schemas/Policies/AgePolicy" + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Send stopContent metric", + "params": [], + "result": { + "name": "success", + "value": true + } + }, + { + "name": "Send stopContent metric w/ entity", + "params": [ + { + "name": "entityId", + "value": "abc" + } + ], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Metrics.page", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:general" + ] + } + ], + "summary": "Inform the platform that your user has navigated to a page or view.", + "params": [ + { + "name": "pageId", + "summary": "Page ID of the content.", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "agePolicy", + "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", + "schema": { + "$ref": "#/x-schemas/Policies/AgePolicy" + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Send page metric", + "params": [ + { + "name": "pageId", + "value": "xyz" + } + ], + "result": { + "name": "success", + "value": true + } + }, + { + "name": "Send page metric w/ pageId", + "params": [ + { + "name": "pageId", + "value": "home" + } + ], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Metrics.error", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:general" + ] + } + ], + "summary": "Inform the platform of an error that has occurred in your app.", + "params": [ + { + "name": "type", + "summary": "The type of error", + "schema": { + "$ref": "#/components/schemas/ErrorType" + }, + "required": true + }, + { + "name": "code", + "summary": "an app-specific error code", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "description", + "summary": "A short description of the error", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "visible", + "summary": "Whether or not this error was visible to the user.", + "schema": { + "type": "boolean" + }, + "required": true + }, + { + "name": "parameters", + "summary": "Optional additional parameters to be logged with the error", + "schema": { + "$ref": "#/x-schemas/Types/FlatMap" + }, + "required": false + }, + { + "name": "agePolicy", + "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", + "schema": { + "$ref": "#/x-schemas/Policies/AgePolicy" + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Send error metric", + "params": [ + { + "name": "type", + "value": "media" + }, + { + "name": "code", + "value": "MEDIA-STALLED" + }, + { + "name": "description", + "value": "playback stalled" + }, + { + "name": "visible", + "value": true + } + ], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Metrics.mediaLoadStart", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:media" + ] + } + ], + "summary": "Called when setting the URL of a media asset to play, in order to infer load time.", + "params": [ + { + "name": "entityId", + "summary": "The entityId of the media.", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "agePolicy", + "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", + "schema": { + "$ref": "#/x-schemas/Policies/AgePolicy" + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Send loadstart metric.", + "params": [ + { + "name": "entityId", + "value": "345" + } + ], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Metrics.mediaPlay", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:media" + ] + } + ], + "summary": "Called when media playback should start due to autoplay, user-initiated play, or unpausing.", + "params": [ + { + "name": "entityId", + "summary": "The entityId of the media.", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "agePolicy", + "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", + "schema": { + "$ref": "#/x-schemas/Policies/AgePolicy" + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Send play metric.", + "params": [ + { + "name": "entityId", + "value": "345" + } + ], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Metrics.mediaPlaying", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:media" + ] + } + ], + "summary": "Called when media playback actually starts due to autoplay, user-initiated play, unpausing, or recovering from a buffering interruption.", + "params": [ + { + "name": "entityId", + "summary": "The entityId of the media.", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "agePolicy", + "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", + "schema": { + "$ref": "#/x-schemas/Policies/AgePolicy" + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Send playing metric.", + "params": [ + { + "name": "entityId", + "value": "345" + } + ], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Metrics.mediaPause", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:media" + ] + } + ], + "summary": "Called when media playback will pause due to an intentional pause operation.", + "params": [ + { + "name": "entityId", + "summary": "The entityId of the media.", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "agePolicy", + "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", + "schema": { + "$ref": "#/x-schemas/Policies/AgePolicy" + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Send pause metric.", + "params": [ + { + "name": "entityId", + "value": "345" + } + ], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Metrics.mediaWaiting", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:media" + ] + } + ], + "summary": "Called when media playback will halt due to a network, buffer, or other unintentional constraint.", + "params": [ + { + "name": "entityId", + "summary": "The entityId of the media.", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "agePolicy", + "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", + "schema": { + "$ref": "#/x-schemas/Policies/AgePolicy" + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Send waiting metric.", + "params": [ + { + "name": "entityId", + "value": "345" + } + ], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Metrics.mediaSeeking", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:media" + ] + } + ], + "summary": "Called when a seek is initiated during media playback.", + "params": [ + { + "name": "entityId", + "summary": "The entityId of the media.", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "target", + "summary": "Target destination of the seek, as a decimal percentage (0-0.999) for content with a known duration, or an integer number of seconds (0-86400) for content with an unknown duration.", + "schema": { + "$ref": "#/components/schemas/MediaPosition" + }, + "required": true + }, + { + "name": "agePolicy", + "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", + "schema": { + "$ref": "#/x-schemas/Policies/AgePolicy" + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Send seeking metric.", + "params": [ + { + "name": "entityId", + "value": "345" + }, + { + "name": "target", + "value": 0.5 + } + ], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Metrics.mediaSeeked", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:media" + ] + } + ], + "summary": "Called when a seek is completed during media playback.", + "params": [ + { + "name": "entityId", + "summary": "The entityId of the media.", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "position", + "summary": "Resulting position of the seek operation, as a decimal percentage (0-0.999) for content with a known duration, or an integer number of seconds (0-86400) for content with an unknown duration.", + "schema": { + "$ref": "#/components/schemas/MediaPosition" + }, + "required": true + }, + { + "name": "agePolicy", + "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", + "schema": { + "$ref": "#/x-schemas/Policies/AgePolicy" + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Send seeked metric.", + "params": [ + { + "name": "entityId", + "value": "345" + }, + { + "name": "position", + "value": 0.51 + } + ], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Metrics.mediaRateChanged", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:media" + ] + } + ], + "summary": "Called when the playback rate of media is changed.", + "params": [ + { + "name": "entityId", + "summary": "The entityId of the media.", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "rate", + "summary": "The new playback rate.", + "schema": { + "type": "number" + }, + "required": true + }, + { + "name": "agePolicy", + "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", + "schema": { + "$ref": "#/x-schemas/Policies/AgePolicy" + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Send ratechange metric.", + "params": [ + { + "name": "entityId", + "value": "345" + }, + { + "name": "rate", + "value": 2 + } + ], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Metrics.mediaRenditionChanged", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:media" + ] + } + ], + "summary": "Called when the playback rendition (e.g. bitrate, dimensions, profile, etc) is changed.", + "params": [ + { + "name": "entityId", + "summary": "The entityId of the media.", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "bitrate", + "summary": "The new bitrate in kbps.", + "schema": { + "type": "number" + }, + "required": true + }, + { + "name": "width", + "summary": "The new resolution width.", + "schema": { + "type": "number" + }, + "required": true + }, + { + "name": "height", + "summary": "The new resolution height.", + "schema": { + "type": "number" + }, + "required": true + }, + { + "name": "profile", + "summary": "A description of the new profile, e.g. 'HDR' etc.", + "schema": { + "type": "string" + }, + "required": false + }, + { + "name": "agePolicy", + "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", + "schema": { + "$ref": "#/x-schemas/Policies/AgePolicy" + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Send renditionchange metric.", + "params": [ + { + "name": "entityId", + "value": "345" + }, + { + "name": "bitrate", + "value": 5000 + }, + { + "name": "width", + "value": 1920 + }, + { + "name": "height", + "value": 1080 + }, + { + "name": "profile", + "value": "HDR+" + } + ], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Metrics.mediaEnded", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:media" + ] + } + ], + "summary": "Called when playback has stopped because the end of the media was reached.", + "params": [ + { + "name": "entityId", + "summary": "The entityId of the media.", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "agePolicy", + "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", + "schema": { + "$ref": "#/x-schemas/Policies/AgePolicy" + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Send ended metric.", + "params": [ + { + "name": "entityId", + "value": "345" + } + ], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Metrics.event", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:distributor" + ] + } + ], + "summary": "Inform the platform of 1st party distributor metrics. 'data' parameter is a JSON document", + "params": [ + { + "name": "schema", + "summary": "The schema URI of the metric type", + "schema": { + "type": "string", + "format": "uri" + }, + "required": true + }, + { + "name": "data", + "summary": "A JSON payload", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "agePolicy", + "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", + "schema": { + "$ref": "#/x-schemas/Policies/AgePolicy" + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Send foo event", + "params": [ + { + "name": "schema", + "value": "http://meta.rdkcentral.com/some/schema" + }, + { + "name": "data", + "value": "foo" + } + ], + "result": { + "name": "result", + "value": true + } + } + ] + }, + { + "name": "Metrics.appInfo", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:general" + ] + } + ], + "summary": "Inform the platform about an app's build info.", + "params": [ + { + "name": "build", + "summary": "The build / version of this app.", + "schema": { + "type": "string" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Send appInfo metric", + "params": [ + { + "name": "build", + "value": "1.2.2" + } + ], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "Network.connected", + "summary": "Returns whether the device currently has a usable network connection.", + "tags": [ + { + "name": "property:readonly" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:network:connected" + ] + } + ], + "params": [], + "result": { + "name": "success", + "summary": "Whether the device currently has a usable network connection.", + "schema": { + "$ref": "#/components/schemas/Connected" + } + }, + "examples": [ + { + "name": "Connected example", + "params": [], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Presentation.focused", + "tags": [ + { + "name": "property:readonly" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:cpp-client-only" + ] + } + ], + "summary": "Whether the app is in focus, i.e. receiving key presses. Provided for those apps/runtimes that cannot use Wayland", + "params": [], + "result": { + "name": "focused", + "summary": "Whether the app is in focus.", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Default example", + "params": [], + "result": { + "name": "Default Result", + "value": true + } + } + ] + }, + { + "name": "Stats.memoryUsage", + "summary": "Returns information about container memory usage, in units of 1024 bytes.", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:cpp-client-only" + ] + } + ], + "params": [], + "result": { + "name": "result", + "schema": { + "$ref": "#/components/schemas/MemoryUsage" + } + }, + "examples": [ + { + "name": "Default example", + "params": [], + "result": { + "name": "value", + "description": "The memory usage information", + "value": { + "userMemoryUsedKiB": 123456, + "userMemoryLimitKiB": 789012, + "gpuMemoryUsedKiB": 345678, + "gpuMemoryLimitKiB": 901234 + } + } + } + ] + }, + { + "name": "TextToSpeech.speak", + "summary": "Speak the utterance immediately. Any ongoing speech is interrupted.", + "description": "Text argument is either plain text or a well-formed SSML document TTS_status, not success attribute, to be used by caller to indicate success of call 0 OK, 1 Fail, 2 not enabled, 3 invalid configuration Raises onSpeechinterrupted if speaking is interrupted", + "params": [ + { + "name": "text", + "summary": "String to be converted to Audio for speech", + "schema": { + "type": "string" + }, + "required": true + } + ], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:text-to-speech:general" + ] + } + ], + "result": { + "name": "speakResult", + "summary": "Result for Speak", + "schema": { + "$ref": "#/components/schemas/SpeechResponse" + } + }, + "examples": [ + { + "name": "Getting the result of speak", + "params": [ + { + "name": "text", + "value": "I am a text waiting for speech." + } + ], + "result": { + "name": "result", + "value": { + "speechid": 1, + "TTS_Status": 0, + "success": true + } + } + } + ] + }, + { + "name": "TextToSpeech.pause", + "summary": "Pauses the speech for given speech id", + "description": "Pauses the utterance. Raises onSpeechpause if ongoing speech is paused. Does nothing if utterance is already paused", + "params": [ + { + "name": "speechid", + "summary": "Identifier for the speech call", + "schema": { + "$ref": "#/components/schemas/SpeechId" + }, + "required": true + } + ], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:text-to-speech:general" + ] + } + ], + "result": { + "name": "pauseResult", + "summary": "Result for Pause", + "schema": { + "$ref": "#/components/schemas/TTSStatusResponse" + } + }, + "examples": [ + { + "name": "Pause a given speech id", + "params": [ + { + "name": "speechid", + "value": 1 + } + ], + "result": { + "name": "TTS_Status", + "value": { + "TTS_Status": 0, + "success": true + } + } + } + ] + }, + { + "name": "TextToSpeech.resume", + "summary": "Resumes the speech for given speech id", + "description": "Continue the paused utterance. Raises onSpeechresume if paused speech is resumed. Does nothing if the utterance is not paused", + "params": [ + { + "name": "speechid", + "summary": "Identifier for the speech call", + "schema": { + "$ref": "#/components/schemas/SpeechId" + }, + "required": true + } + ], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:text-to-speech:general" + ] + } + ], + "result": { + "name": "resumeResult", + "summary": "Result for Resume", + "schema": { + "$ref": "#/components/schemas/TTSStatusResponse" + } + }, + "examples": [ + { + "name": "Resume a given speech id.", + "params": [ + { + "name": "speechid", + "value": 1 + } + ], + "result": { + "name": "TTS_Status", + "value": { + "TTS_Status": 0, + "success": true + } + } + } + ] + }, + { + "name": "TextToSpeech.cancel", + "summary": "Cancels the speech for given speech id", + "description": "Stop speaking if utterance is currently being spoken. Raises onSpeechinterrupted if speaking was interrupted.", + "params": [ + { + "name": "speechid", + "summary": "Identifier for the speech call", + "schema": { + "$ref": "#/components/schemas/SpeechId" + }, + "required": true + } + ], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:text-to-speech:general" + ] + } + ], + "result": { + "name": "cancelResult", + "summary": "Result for cancel", + "schema": { + "$ref": "#/components/schemas/TTSStatusResponse" + } + }, + "examples": [ + { + "name": "Cancel a given speech id.", + "params": [ + { + "name": "speechid", + "value": 1 + } + ], + "result": { + "name": "TTS_Status", + "value": { + "TTS_Status": 0, + "success": true + } + } + } + ] + }, + { + "name": "TextToSpeech.getspeechstate", + "summary": "Returns the state of the utterance.", + "params": [ + { + "name": "speechid", + "summary": "Identifier for the speech call", + "schema": { + "$ref": "#/components/schemas/SpeechId" + }, + "required": true + } + ], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:text-to-speech:general" + ] + } + ], + "result": { + "name": "speechStateResult", + "summary": "Result for speech state", + "schema": { + "$ref": "#/components/schemas/SpeechStateResponse" + } + }, + "examples": [ + { + "name": "State for a given speech id.", + "params": [ + { + "name": "speechid", + "value": 1 + } + ], + "result": { + "name": "speechstate", + "value": { + "speechstate": 1, + "TTS_Status": 0, + "success": true + } + } + } + ] + }, + { + "name": "TextToSpeech.listvoices", + "summary": "Returns the list of available voices as human-readable strings, e.g. 'ava', 'amelie', 'angelica'", + "params": [ + { + "name": "language", + "summary": "Language - string - BCP 47", + "schema": { + "$ref": "#/x-schemas/Localization/Locale" + }, + "required": true + } + ], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:text-to-speech:general" + ] + } + ], + "result": { + "name": "listvoices", + "summary": "The list of voices supported for the language", + "schema": { + "$ref": "#/components/schemas/ListVoicesResponse" + } + }, + "examples": [ + { + "name": "Getting the list of voices", + "params": [ + { + "name": "language", + "value": "en-US" + } + ], + "result": { + "name": "voiceList", + "value": { + "TTS_Status": 0, + "voices": [ + "carol", + "tom" + ] + } + } + } + ] + }, + { + "name": "Lifecycle2.onStateChanged", + "tags": [ + { + "name": "event", + "x-contextual-parameters": 0, + "x-notifier": "Lifecycle2.onStateChanged" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:cpp-client-only" + ] + } + ], + "summary": "Notification of lifecycle state change, raised after the platform has transitioned the app/runtime to the new lifecycle state", + "params": [ + { + "name": "listen", + "schema": { + "type": "boolean" + } + } + ], + "examples": [ + { + "name": "App is active after being initialized", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "result", + "value": null + } + }, + { + "name": "Single transition to paused state", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "result", + "value": null + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + } + }, + { + "name": "TextToSpeech.onWillspeak", + "summary": "Text to speech conversion is about to start.", + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "event", + "x-notifier": "TextToSpeech.onWillspeak" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:text-to-speech:general" + ] + } + ], + "params": [ + { + "name": "listen", + "schema": { + "type": "boolean" + } + } + ], + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "result", + "value": null + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + } + }, + { + "name": "TextToSpeech.onSpeechstart", + "summary": "Utterance is about to be spoken.", + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "event", + "x-notifier": "TextToSpeech.onSpeechstart" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:text-to-speech:general" + ] + } + ], + "params": [ + { + "name": "listen", + "schema": { + "type": "boolean" + } + } + ], + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "result", + "value": null + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + } + }, + { + "name": "TextToSpeech.onSpeechpause", + "summary": "Ongoing speech was paused.", + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "event", + "x-notifier": "TextToSpeech.onSpeechpause" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:text-to-speech:general" + ] + } + ], + "params": [ + { + "name": "listen", + "schema": { + "type": "boolean" + } + } + ], + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "result", + "value": null + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + } + }, + { + "name": "TextToSpeech.onSpeechresume", + "summary": "Paused speech was resumed.", + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "event", + "x-notifier": "TextToSpeech.onSpeechresume" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:text-to-speech:general" + ] + } + ], + "params": [ + { + "name": "listen", + "schema": { + "type": "boolean" + } + } + ], + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "result", + "value": null + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + } + }, + { + "name": "TextToSpeech.onSpeechcomplete", + "summary": "Speech completed successfully.", + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "event", + "x-notifier": "TextToSpeech.onSpeechcomplete" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:text-to-speech:general" + ] + } + ], + "params": [ + { + "name": "listen", + "schema": { + "type": "boolean" + } + } + ], + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "result", + "value": null + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + } + }, + { + "name": "TextToSpeech.onSpeechinterrupted", + "summary": "Speech was stopped, due to another call to speak or cancel.", + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "event", + "x-notifier": "TextToSpeech.onSpeechinterrupted" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:text-to-speech:general" + ] + } + ], + "params": [ + { + "name": "listen", + "schema": { + "type": "boolean" + } + } + ], + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "result", + "value": null + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + } + }, + { + "name": "TextToSpeech.onNetworkerror", + "summary": "Utterance failed due to network error.", + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "event", + "x-notifier": "TextToSpeech.onNetworkerror" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:text-to-speech:general" + ] + } + ], + "params": [ + { + "name": "listen", + "schema": { + "type": "boolean" + } + } + ], + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "result", + "value": null + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + } + }, + { + "name": "TextToSpeech.onPlaybackerror", + "summary": "Utterance failed during playback.", + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "event", + "x-notifier": "TextToSpeech.onPlaybackerror" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:text-to-speech:general" + ] + } + ], + "params": [ + { + "name": "listen", + "schema": { + "type": "boolean" + } + } + ], + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "result", + "value": null + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + } + }, + { + "name": "Accessibility.onAudioDescriptionChanged", + "summary": "Returns the audio description setting of the device", + "params": [ + { + "name": "listen", + "schema": { + "type": "boolean" + } + } + ], + "tags": [ + { + "name": "event", + "x-notifier": "Accessibility.onAudioDescriptionChanged", + "x-subscriber-for": "Accessibility.audioDescription" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:audio-descriptions" + ] + } + ], + "examples": [ + { + "name": "Getting the audio description setting", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "result", + "value": null + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + } + }, + { + "name": "Accessibility.onClosedCaptionsSettingsChanged", + "summary": "Returns captions settings: enabled, and a list of zero or more languages in order of decreasing preference", + "params": [ + { + "name": "listen", + "schema": { + "type": "boolean" + } + } + ], + "tags": [ + { + "name": "event", + "x-notifier-params-flattening": "true", + "x-notifier": "Accessibility.onClosedCaptionsSettingsChanged", + "x-subscriber-for": "Accessibility.closedCaptionsSettings" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closed-captions" + ] + } + ], + "examples": [ + { + "name": "Getting the closed captions settings", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "result", + "value": null + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + } + }, + { + "name": "Accessibility.onHighContrastUIChanged", + "summary": "Returns the high contrast UI device setting", + "params": [ + { + "name": "listen", + "schema": { + "type": "boolean" + } + } + ], + "tags": [ + { + "name": "event", + "x-notifier": "Accessibility.onHighContrastUIChanged", + "x-subscriber-for": "Accessibility.highContrastUI" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:high-contrast-ui" + ] + } + ], + "examples": [ + { + "name": "High-contrast UI mode is enabled", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "result", + "value": null + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + } + }, + { + "name": "Accessibility.onVoiceGuidanceSettingsChanged", + "summary": "Returns voice guidance settings: enabled, rate, and verbosity", + "params": [ + { + "name": "listen", + "schema": { + "type": "boolean" + } + } + ], + "tags": [ + { + "name": "event", + "x-notifier-params-flattening": "true", + "x-notifier": "Accessibility.onVoiceGuidanceSettingsChanged", + "x-subscriber-for": "Accessibility.voiceGuidanceSettings" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:voice-guidance" + ] + } + ], + "examples": [ + { + "name": "Getting the voice guidance settings", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "result", + "value": null + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + } + }, + { + "name": "Device.onHdrChanged", + "summary": "Returns the HDR standards that are supported by the attached TV or the integral display", + "params": [ + { + "name": "listen", + "schema": { + "type": "boolean" + } + } + ], + "tags": [ + { + "name": "event", + "x-notifier": "Device.onHdrChanged", + "x-subscriber-for": "Device.hdr" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:info" + ] + } + ], + "examples": [ + { + "name": "Getting the negotiated HDR formats", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "result", + "value": null + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + } + }, + { + "name": "Localization.onCountryChanged", + "tags": [ + { + "name": "event", + "x-notifier": "Localization.onCountryChanged", + "x-subscriber-for": "Localization.country" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:localization:country-code" + ] + } + ], + "summary": "Returns the ISO 3166-1 alpha-2 code for the country device is located in.", + "params": [ + { + "name": "listen", + "schema": { + "type": "boolean" + } + } + ], + "examples": [ + { + "name": "Default example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "result", + "value": null + } + }, + { + "name": "Another example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "result", + "value": null + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + } + }, + { + "name": "Localization.onPreferredAudioLanguagesChanged", + "summary": "Returns a list of ISO 639-2/B codes for the preferred audio languages on this device.", + "params": [ + { + "name": "listen", + "schema": { + "type": "boolean" + } + } + ], + "tags": [ + { + "name": "event", + "x-notifier": "Localization.onPreferredAudioLanguagesChanged", + "x-subscriber-for": "Localization.preferredAudioLanguages" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:localization:preferred-audio-languages" + ] + } + ], + "examples": [ + { + "name": "Default example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "result", + "value": null + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + } + }, + { + "name": "Localization.onPresentationLanguageChanged", + "tags": [ + { + "name": "event", + "x-notifier": "Localization.onPresentationLanguageChanged", + "x-subscriber-for": "Localization.presentationLanguage" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:localization:locale" + ] + } + ], + "summary": "Get the *full* BCP 47 code, including script, region, variant, etc., for the preferred locale", + "params": [ + { + "name": "listen", + "schema": { + "type": "boolean" + } + } + ], + "examples": [ + { + "name": "Default example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "result", + "value": null + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + } + }, + { + "name": "Network.onConnectedChanged", + "summary": "Returns whether the device currently has a usable network connection.", + "tags": [ + { + "name": "event", + "x-notifier": "Network.onConnectedChanged", + "x-subscriber-for": "Network.connected" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:network:connected" + ] + } + ], + "params": [ + { + "name": "listen", + "schema": { + "type": "boolean" + } + } + ], + "examples": [ + { + "name": "Connected example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "result", + "value": null + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + } + }, + { + "name": "Presentation.onFocusedChanged", + "tags": [ + { + "name": "event", + "x-notifier": "Presentation.onFocusedChanged", + "x-subscriber-for": "Presentation.focused" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:cpp-client-only" + ] + } + ], + "summary": "Whether the app is in focus, i.e. receiving key presses. Provided for those apps/runtimes that cannot use Wayland", + "params": [ + { + "name": "listen", + "schema": { + "type": "boolean" + } + } + ], + "examples": [ + { + "name": "Default example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "result", + "value": null + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + } + } + ], + "components": { + "schemas": { + "AdvertisingIdResult": { + "title": "AdvertisingIdResult", + "type": "object", + "properties": { + "ifa": { + "type": "string", + "description": "UUID conforming to IAB standard" + }, + "ifa_type": { + "type": "string", + "description": "Source of the IFA as defined by IAB" + }, + "lmt": { + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Boolean that if set to 1, user has requested ad tracking and measurement is disabled" + } + }, + "required": [ + "ifa", + "ifa_type", + "lmt" + ] + }, + "HDRFormatMap": { + "title": "HDRFormatMap", + "type": "object", + "properties": { + "hdr10": { + "type": "boolean" + }, + "hdr10Plus": { + "type": "boolean" + }, + "dolbyVision": { + "type": "boolean" + }, + "hlg": { + "type": "boolean" + } + }, + "required": [ + "hdr10", + "hdr10Plus", + "dolbyVision", + "hlg" + ], + "description": "The type of HDR format" + }, + "DeviceClass": { + "title": "DeviceClass", + "type": "string", + "enum": [ + "ott", + "stb", + "tv" + ], + "description": "The type of device" + }, + "CloseType": { + "title": "CloseType", + "description": "The application close type", + "type": "string", + "enum": [ + "deactivate", + "unload", + "killReload", + "killReactivate" + ] + }, + "LifecycleState": { + "title": "LifecycleState", + "description": "The application Lifecycle state", + "type": "string", + "enum": [ + "initializing", + "active", + "paused", + "suspended", + "hibernated", + "terminating" + ] + }, + "StateChange": { + "title": "StateChange", + "type": "object", + "properties": { + "newState": { + "$ref": "#/components/schemas/LifecycleState" + }, + "oldState": { + "$ref": "#/components/schemas/LifecycleState" + } + } + }, + "MediaPosition": { + "title": "MediaPosition", + "description": "Represents a position inside playback content, as a decimal percentage (0-0.999) for content with a known duration, or an integer number of seconds (0-86400) for content with an unknown duration.", + "oneOf": [ + { + "const": 0 + }, + { + "type": "number", + "exclusiveMinimum": 0, + "exclusiveMaximum": 1 + }, + { + "type": "integer", + "minimum": 1, + "maximum": 86400 + } + ] + }, + "ErrorType": { + "title": "ErrorType", + "type": "string", + "enum": [ + "network", + "media", + "restriction", + "entitlement", + "other" + ] + }, + "EventObjectPrimitives": { + "title": "EventObjectPrimitives", + "anyOf": [ + { + "type": "string", + "maxLength": 256 + }, + { + "type": "number" + }, + { + "type": "integer" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + }, + "Connected": { + "type": "boolean", + "description": "Indicates whether the device currently has a usable network connection." + }, + "MemoryUsage": { + "title": "MemoryUsage", + "type": "object", + "description": "Describes current and maximum memory usage of the container.", + "properties": { + "userMemoryUsedKiB": { + "type": "integer", + "description": "User memory currently used in 1024 bytes." + }, + "userMemoryLimitKiB": { + "type": "integer", + "description": "Maximum user memory available in 1024 bytes." + }, + "gpuMemoryUsedKiB": { + "type": "integer", + "description": "GPU memory currently used in 1024 bytes." + }, + "gpuMemoryLimitKiB": { + "type": "integer", + "description": "Maximum GPU memory available in 1024 bytes." + } + }, + "required": [ + "userMemoryUsedKiB", + "userMemoryLimitKiB", + "gpuMemoryUsedKiB", + "gpuMemoryLimitKiB" + ] + }, + "TTSEnabled": { + "title": "TTSEnabled", + "type": "object", + "required": [ + "TTS_Status", + "isenabled" + ], + "properties": { + "TTS_Status": { + "$ref": "#/components/schemas/TTSStatus" + }, + "isenabled": { + "type": "boolean" + } + } + }, + "ListVoicesResponse": { + "title": "ListVoicesResponse", + "type": "object", + "required": [ + "TTS_Status", + "voices" + ], + "properties": { + "TTS_Status": { + "$ref": "#/components/schemas/TTSStatus" + }, + "voices": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "TTSConfiguration": { + "title": "TTSConfiguration", + "type": "object", + "required": [ + "success" + ], + "properties": { + "success": { + "type": "boolean" + }, + "ttsendpoint": { + "type": "string", + "description": "URL for Text to Speech API" + }, + "ttsendpointsecured": { + "type": "string", + "description": "Secure URL for Text to Speech API" + }, + "language": { + "type": "string", + "description": "Language used by Text to speech" + }, + "voice": { + "type": "string", + "description": "Voice used by Text to speech" + }, + "volume": { + "type": "integer", + "description": "Volume for Text to speech", + "minimum": 0, + "maximum": 100 + }, + "primvolduckpercent": { + "type": "integer", + "description": "Prime Volume duck percent for Text to speech", + "minimum": 0, + "maximum": 100 + }, + "rate": { + "type": "integer", + "description": "Speech rate for Text to speech", + "minimum": 0, + "maximum": 100 + }, + "speechrate": { + "description": "Rate for speech", + "$ref": "#/components/schemas/SpeechRate" + }, + "fallbacktext": { + "description": "Fallback text for TTS", + "$ref": "#/components/schemas/FallbackText" + } + }, + "examples": [ + {} + ] + }, + "SpeechRate": { + "title": "SpeechRate", + "type": "string", + "enum": [ + "slow", + "medium", + "fast", + "faster", + "fastest" + ] + }, + "FallbackText": { + "title": "FallbackText", + "type": "object", + "properties": { + "scenario": { + "type": "string", + "description": "Scenario for fallback Text" + }, + "value": { + "type": "string", + "description": "Value for fallback Text" + } + } + }, + "SpeechResponse": { + "title": "SpeechResponse", + "type": "object", + "properties": { + "speechid": { + "$ref": "#/components/schemas/SpeechId" + }, + "TTS_Status": { + "$ref": "#/components/schemas/TTSStatus" + }, + "success": { + "type": "boolean" + } + }, + "required": [ + "speechid", + "TTS_Status", + "success" + ] + }, + "SpeechId": { + "type": "integer" + }, + "SpeechIdEvent": { + "type": "object", + "properties": { + "speechid": { + "$ref": "#/components/schemas/SpeechId" + } + }, + "required": [ + "speechid" + ] + }, + "TTSStatus": { + "title": "TTSStatus", + "type": "integer", + "minimum": 0, + "maximum": 3 + }, + "SpeechState": { + "title": "SpeechState", + "type": "integer", + "enum": [ + 0, + 1, + 2, + 3 + ], + "description": "0 = SPEECH_PENDING, 1 = SPEECH_IN_PROGRESS, 2 = SPEECH_PAUSED, 3 = SPEECH_NOT_FOUND" + }, + "SpeechStateResponse": { + "title": "SpeechStateResponse", + "type": "object", + "properties": { + "speechstate": { + "$ref": "#/components/schemas/SpeechState" + }, + "TTS_Status": { + "$ref": "#/components/schemas/TTSStatus" + }, + "success": { + "type": "boolean" + } + }, + "required": [ + "speechstate", + "TTS_Status", + "success" + ] + }, + "TTSStatusResponse": { + "title": "TTSStatusResponse", + "type": "object", + "properties": { + "TTS_Status": { + "$ref": "#/components/schemas/TTSStatus" + }, + "success": { + "type": "boolean" + } + }, + "required": [ + "TTS_Status", + "success" + ] + }, + "TTSState": { + "title": "TTSState", + "type": "object", + "properties": { + "state": { + "type": "boolean" + } + }, + "required": [ + "state" + ] + }, + "TTSVoice": { + "title": "TTSVoice", + "type": "object", + "properties": { + "voice": { + "type": "string" + } + }, + "required": [ + "voice" + ] + } + } + }, + "x-schemas": { + "Accessibility": { + "uri": "https://meta.comcast.com/firebolt/accessibility", + "ClosedCaptionsSettings": { + "title": "ClosedCaptionsSettings", + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean", + "description": "Whether or not closed-captions should be enabled by default" + }, + "preferredLanguages": { + "type": "array", + "items": { + "$ref": "#/x-schemas/Localization/ISO639_2Language" + } + } + }, + "examples": [ + { + "enabled": true, + "styles": { + "fontFamily": "monospaced_serif", + "fontSize": 1, + "fontColor": "#ffffff", + "fontEdge": "none", + "fontEdgeColor": "#7F7F7F", + "fontOpacity": 100, + "backgroundColor": "#000000", + "backgroundOpacity": 100, + "textAlign": "center", + "textAlignVertical": "middle", + "windowColor": "white", + "windowOpacity": 50 + }, + "preferredLanguages": [ + "eng", + "spa" + ] + } + ] + }, + "VoiceGuidanceSettings": { + "title": "VoiceGuidanceSettings", + "type": "object", + "required": [ + "enabled", + "navigationHints", + "rate" + ], + "properties": { + "enabled": { + "type": "boolean", + "description": "Whether or not voice guidance should be enabled by default" + }, + "rate": { + "$ref": "#/x-schemas/Accessibility/SpeechRate", + "description": "The rate at which voice guidance speech will be read back to the user" + }, + "navigationHints": { + "type": "boolean", + "description": "Whether or not voice guidance should include additional navigation hints" + } + }, + "examples": [ + { + "enabled": true, + "navigationHints": true, + "rate": 0.8 + } + ] + }, + "SpeechRate": { + "title": "SpeechRate", + "type": "number", + "minimum": 0.1, + "maximum": 10 + } + }, + "Localization": { + "uri": "https://meta.comcast.com/firebolt/localization", + "ISO639_2Language": { + "type": "string", + "pattern": "^[a-z]{3}$" + }, + "CountryCode": { + "type": "string", + "pattern": "^[A-Z]{2}$" + }, + "Locale": { + "type": "string", + "pattern": "^[a-zA-Z]+([a-zA-Z0-9\\-]*)$" + } + }, + "Policies": { + "uri": "https://meta.comcast.com/firebolt/policies", + "AgePolicy": { + "title": "AgePolicy", + "description": "The policy that describes various age groups to which content is directed. See distributor documentation for further details.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "app:adult", + "app:child", + "app:teen" + ] + } + ] + } + }, + "Types": { + "uri": "https://meta.comcast.com/firebolt/types", + "FlatMap": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + } + } +} diff --git a/include/firebolt/discovery.h b/include/firebolt/discovery.h index b73404c..885380e 100644 --- a/include/firebolt/discovery.h +++ b/include/firebolt/discovery.h @@ -39,7 +39,7 @@ class IDiscovery * @param[in] agePolicy : The age policy associated with the watch event. The age policy describes the age groups * to which content may be directed * - * @retval The status. + * @retval An ok Result on success, or an error; no value is returned */ virtual Result watched(const std::string& entityId, std::optional progress, std::optional completed, std::optional watchedOn, diff --git a/include/firebolt/metrics.h b/include/firebolt/metrics.h index a13deb5..6927674 100644 --- a/include/firebolt/metrics.h +++ b/include/firebolt/metrics.h @@ -43,21 +43,21 @@ class IMetrics /** * @brief Informs the platform that the app is minimally usable * - * @retval The success state or error + * @retval An ok Result on success, or an error; no value is returned */ virtual Result ready() const = 0; /** * @brief Logs a sign in event * - * @retval The success state or error + * @retval An ok Result on success, or an error; no value is returned */ virtual Result signIn() const = 0; /** * @brief Logs a sign out event * - * @retval The success state or error + * @retval An ok Result on success, or an error; no value is returned */ virtual Result signOut() const = 0; @@ -68,7 +68,7 @@ class IMetrics * @param[in] agePolicy : The age policy to associate with the metrics event, the age policy describes the age group * to which content is directed * - * @retval The success state or error + * @retval An ok Result on success, or an error; no value is returned */ virtual Result startContent(const std::optional& entityId, const std::optional agePolicy) const = 0; @@ -80,7 +80,7 @@ class IMetrics * @param[in] agePolicy : The age policy to associate with the metrics event, the age policy describes the age group * to which content is directed * - * @retval The success state or error + * @retval An ok Result on success, or an error; no value is returned */ virtual Result stopContent(const std::optional& entityId, const std::optional agePolicy) const = 0; @@ -92,7 +92,7 @@ class IMetrics * @param[in] agePolicy : The age policy to associate with the metrics event, the age policy describes the age group * to which content is directed * - * @retval The success state or error + * @retval An ok Result on success, or an error; no value is returned */ virtual Result page(const std::string& pageId, const std::optional& agePolicy) const = 0; @@ -107,7 +107,7 @@ class IMetrics * @param[in] agePolicy : The age policy to associate with the metrics event, the age policy describes the age * group to which content is directed * - * @retval The success state or error + * @retval An ok Result on success, or an error; no value is returned */ virtual Result error(const ErrorType type, const std::string& code, const std::string& description, const bool visible, const std::optional>& parameters, @@ -120,7 +120,7 @@ class IMetrics * @param[in] agePolicy : The age policy to associate with the metrics event, the age policy describes the age group * to which content is directed * - * @retval The success state or error + * @retval An ok Result on success, or an error; no value is returned */ virtual Result mediaLoadStart(const std::string& entityId, const std::optional& agePolicy) const = 0; @@ -133,7 +133,7 @@ class IMetrics * @param[in] agePolicy : The age policy to associate with the metrics event, the age policy describes the age group * to which content is directed * - * @retval The success state or error + * @retval An ok Result on success, or an error; no value is returned */ virtual Result mediaPlaying(const std::string& entityId, const std::optional& agePolicy) const = 0; @@ -145,7 +145,7 @@ class IMetrics * @param[in] agePolicy : The age policy to associate with the metrics event, the age policy describes the age group * to which content is directed * - * @retval The success state or error + * @retval An ok Result on success, or an error; no value is returned */ virtual Result mediaPlay(const std::string& entityId, const std::optional& agePolicy) const = 0; @@ -157,7 +157,7 @@ class IMetrics * @param[in] agePolicy : The age policy to associate with the metrics event, the age policy describes the age group * to which content is directed * - * @retval The success state or error + * @retval An ok Result on success, or an error; no value is returned */ virtual Result mediaPause(const std::string& entityId, const std::optional& agePolicy) const = 0; @@ -169,7 +169,7 @@ class IMetrics * @param[in] agePolicy : The age policy to associate with the metrics event, the age policy describes the age group * to which content is directed * - * @retval The success state or error + * @retval An ok Result on success, or an error; no value is returned */ virtual Result mediaWaiting(const std::string& entityId, const std::optional& agePolicy) const = 0; @@ -183,7 +183,7 @@ class IMetrics * @param[in] agePolicy : The age policy to associate with the metrics event, the age policy describes the age group * to which content is directed * - * @retval The success state or error + * @retval An ok Result on success, or an error; no value is returned */ virtual Result mediaSeeking(const std::string& entityId, const double target, const std::optional& agePolicy) const = 0; @@ -198,7 +198,7 @@ class IMetrics * @param[in] agePolicy : The age policy to associate with the metrics event, the age policy describes the age group * to which content is directed * - * @retval The success state or error + * @retval An ok Result on success, or an error; no value is returned */ virtual Result mediaSeeked(const std::string& entityId, const double position, const std::optional& agePolicy) const = 0; @@ -211,7 +211,7 @@ class IMetrics * @param[in] agePolicy : The age policy to associate with the metrics event, the age policy describes the age group * to which content is directed * - * @retval The success state or error + * @retval An ok Result on success, or an error; no value is returned */ virtual Result mediaRateChanged(const std::string& entityId, const double rate, const std::optional& agePolicy) const = 0; @@ -227,7 +227,7 @@ class IMetrics * @param[in] agePolicy : The age policy to associate with the metrics event, the age policy describes the age group * to which content is directed * - * @retval The success state or error + * @retval An ok Result on success, or an error; no value is returned */ virtual Result mediaRenditionChanged(const std::string& entityId, const unsigned bitrate, const unsigned width, const unsigned height, const std::optional& profile, @@ -240,7 +240,7 @@ class IMetrics * @param[in] agePolicy : The age policy to associate with the metrics event, the age policy describes the age group * to which content is directed * - * @retval The success state or error + * @retval An ok Result on success, or an error; no value is returned */ virtual Result mediaEnded(const std::string& entityId, const std::optional& agePolicy) const = 0; @@ -253,7 +253,7 @@ class IMetrics * @param[in] agePolicy : The age policy to associate with the metrics event, the age policy describes the age group * to which content is directed * - * @retval The success state or error + * @retval An ok Result on success, or an error; no value is returned */ virtual Result event(const std::string& schema, const std::string& data, const std::optional& agePolicy) const = 0; @@ -263,7 +263,7 @@ class IMetrics * * @param[in] build : The build / version of this app * - * @retval The status + * @retval An ok Result on success, or an error; no value is returned */ virtual Result appInfo(const std::string& build) const = 0; }; From bd39f0da63769552b6fd3f077750688256b8a338 Mon Sep 17 00:00:00 2001 From: swethasukumarr Date: Thu, 7 May 2026 16:04:06 -0400 Subject: [PATCH 3/3] RDKEMW-17483: Align OpenRPC example results with null result schema --- docs/openrpc/openrpc/discovery.json | 8 +- docs/openrpc/openrpc/metrics.json | 86 +- docs/openrpc/the-spec/firebolt-open-rpc.json | 7686 +++++++++--------- 3 files changed, 3890 insertions(+), 3890 deletions(-) diff --git a/docs/openrpc/openrpc/discovery.json b/docs/openrpc/openrpc/discovery.json index 41389e9..8862606 100644 --- a/docs/openrpc/openrpc/discovery.json +++ b/docs/openrpc/openrpc/discovery.json @@ -88,8 +88,8 @@ } ], "result": { - "name": "success", - "value": true + "name": "result", + "value": null } }, { @@ -117,8 +117,8 @@ } ], "result": { - "name": "success", - "value": true + "name": "result", + "value": null } } ] diff --git a/docs/openrpc/openrpc/metrics.json b/docs/openrpc/openrpc/metrics.json index 31cd571..b1d705b 100644 --- a/docs/openrpc/openrpc/metrics.json +++ b/docs/openrpc/openrpc/metrics.json @@ -29,8 +29,8 @@ "name": "Send ready metric", "params": [], "result": { - "name": "success", - "value": true + "name": "result", + "value": null } } ] @@ -61,8 +61,8 @@ "name": "Send signIn metric", "params": [], "result": { - "name": "success", - "value": true + "name": "result", + "value": null } } ] @@ -93,8 +93,8 @@ "name": "Send signOut metric", "params": [], "result": { - "name": "success", - "value": true + "name": "result", + "value": null } } ] @@ -138,8 +138,8 @@ "name": "Send startContent metric", "params": [], "result": { - "name": "success", - "value": true + "name": "result", + "value": null } }, { @@ -151,8 +151,8 @@ } ], "result": { - "name": "success", - "value": true + "name": "result", + "value": null } }, { @@ -168,8 +168,8 @@ } ], "result": { - "name": "success", - "value": true + "name": "result", + "value": null } } ] @@ -213,8 +213,8 @@ "name": "Send stopContent metric", "params": [], "result": { - "name": "success", - "value": true + "name": "result", + "value": null } }, { @@ -226,8 +226,8 @@ } ], "result": { - "name": "success", - "value": true + "name": "result", + "value": null } } ] @@ -276,8 +276,8 @@ } ], "result": { - "name": "success", - "value": true + "name": "result", + "value": null } }, { @@ -289,8 +289,8 @@ } ], "result": { - "name": "success", - "value": true + "name": "result", + "value": null } } ] @@ -383,8 +383,8 @@ } ], "result": { - "name": "success", - "value": true + "name": "result", + "value": null } } ] @@ -433,8 +433,8 @@ } ], "result": { - "name": "success", - "value": true + "name": "result", + "value": null } } ] @@ -483,8 +483,8 @@ } ], "result": { - "name": "success", - "value": true + "name": "result", + "value": null } } ] @@ -533,8 +533,8 @@ } ], "result": { - "name": "success", - "value": true + "name": "result", + "value": null } } ] @@ -583,8 +583,8 @@ } ], "result": { - "name": "success", - "value": true + "name": "result", + "value": null } } ] @@ -633,8 +633,8 @@ } ], "result": { - "name": "success", - "value": true + "name": "result", + "value": null } } ] @@ -695,8 +695,8 @@ } ], "result": { - "name": "success", - "value": true + "name": "result", + "value": null } } ] @@ -757,8 +757,8 @@ } ], "result": { - "name": "success", - "value": true + "name": "result", + "value": null } } ] @@ -819,8 +819,8 @@ } ], "result": { - "name": "success", - "value": true + "name": "result", + "value": null } } ] @@ -917,8 +917,8 @@ } ], "result": { - "name": "success", - "value": true + "name": "result", + "value": null } } ] @@ -967,8 +967,8 @@ } ], "result": { - "name": "success", - "value": true + "name": "result", + "value": null } } ] @@ -1031,7 +1031,7 @@ ], "result": { "name": "result", - "value": true + "value": null } } ] diff --git a/docs/openrpc/the-spec/firebolt-open-rpc.json b/docs/openrpc/the-spec/firebolt-open-rpc.json index 3a3b51a..82b8600 100644 --- a/docs/openrpc/the-spec/firebolt-open-rpc.json +++ b/docs/openrpc/the-spec/firebolt-open-rpc.json @@ -1,3844 +1,3844 @@ { - "openrpc": "1.2.4", - "info": { - "title": "Firebolt JSON-RPC API", - "version": "", - "x-module-descriptions": { - "Accessibility": "The `Accessibility` module provides access to the user/device settings for closed captioning and voice guidance.\n\nApps **SHOULD** attempt o respect these settings, rather than manage and persist seprate settings, which would be different per-app.", - "Advertising": "A module for platform provided advertising settings and functionality.", - "Device": "A module for querying about the device and it's capabilities.", - "Discovery": "Your App likely wants to integrate with the Platform's discovery capabilities. For example to add a \"Watch Next\" tile that links to your app from the platform's home screen.\n\nGetting access to this information requires to connect to lower level APIs made available by the platform. Since implementations differ between operators and platforms, the Firebolt SDK offers a Discovery module, that exposes a generic, agnostic interface to the developer.\n\nUnder the hood, an underlaying transport layer will then take care of calling the right APIs for the actual platform implementation that your App is running on.\n\nThe Discovery plugin is used to _send_ information to the Platform.\n\n### Localization\nApps should provide all user-facing strings in the device's language, as specified by the Firebolt `Localization.language` property.\n\nApps should provide prices in the same currency presented in the app. If multiple currencies are supported in the app, the app should provide prices in the user's current default currency.", - "Display": "A module for querying about the display", - "Lifecycle2": "Methods and events for responding to Lifecycle changes in your app.", - "Localization": "Methods for accessing location and language preferences.", - "Metrics": "Methods for sending metrics", - "Network": "Methods for accessing network information.", - "Presentation": "Methods for accessing Presentation preferences.", - "Stats": "Provides methods to retrieve application-level system information.", - "TextToSpeech": "A module for controlling and accessing Text To Speech over Firebolt." - } - }, - "methods": [ - { - "name": "rpc.discover", - "summary": "The OpenRPC schema for this JSON-RPC API", - "params": [], - "tags": [ - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:rpc:discover" - ] - } - ], - "result": { - "name": "OpenRPC Schema", - "schema": { - "type": "object" - } - }, - "examples": [ - { - "name": "Default", - "params": [], - "result": { - "name": "schema", - "value": {} - } - } - ] - }, - { - "name": "Accessibility.audioDescription", - "summary": "Returns the audio description setting of the device", - "params": [], - "tags": [ - { - "name": "property:readonly" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:accessibility:audio-descriptions" - ] - } - ], - "result": { - "name": "setting", - "summary": "the audio description setting", - "schema": { - "type": "boolean" - } - }, - "examples": [ - { - "name": "Getting the audio description setting", - "params": [], - "result": { - "name": "Default Result", - "value": true - } - } - ] - }, - { - "name": "Accessibility.closedCaptionsSettings", - "summary": "Returns captions settings: enabled, and a list of zero or more languages in order of decreasing preference", - "params": [], - "tags": [ - { - "name": "property:readonly", - "x-notifier-params-flattening": "true" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:accessibility:closed-captions" - ] - } - ], - "result": { - "name": "closedCaptionsSettings", - "summary": "the closed captions settings", - "schema": { - "$ref": "#/x-schemas/Accessibility/ClosedCaptionsSettings" - } - }, - "examples": [ - { - "name": "Getting the closed captions settings", - "params": [], - "result": { - "name": "settings", - "value": { - "enabled": true, - "preferredLanguages": [ - "eng", - "spa" - ] - } - } - } - ] - }, - { - "name": "Accessibility.highContrastUI", - "summary": "Returns the high contrast UI device setting", - "params": [], - "tags": [ - { - "name": "property:readonly" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:accessibility:high-contrast-ui" - ] - } - ], - "result": { - "name": "highContrastUI", - "summary": "Whether high-contrast UI mode is enabled", - "schema": { - "type": "boolean" - } - }, - "examples": [ - { - "name": "High-contrast UI mode is enabled", - "params": [], - "result": { - "name": "Default Result", - "value": true - } - } - ] - }, - { - "name": "Accessibility.voiceGuidanceSettings", - "summary": "Returns voice guidance settings: enabled, rate, and verbosity", - "params": [], - "tags": [ - { - "name": "property:readonly", - "x-notifier-params-flattening": "true" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:accessibility:voice-guidance" - ] - } - ], - "result": { - "name": "settings", - "summary": "the voice guidance settings", - "schema": { - "$ref": "#/x-schemas/Accessibility/VoiceGuidanceSettings" - } - }, - "examples": [ - { - "name": "Getting the voice guidance settings", - "params": [], - "result": { - "name": "Default Result", - "value": { - "enabled": true, - "rate": 0.8, - "navigationHints": true - } - } - } - ] - }, - { - "name": "Advertising.advertisingId", - "tags": [ - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:advertising:identifier" - ] - } - ], - "summary": "Returns the IFA.", - "params": [], - "result": { - "name": "advertisingId", - "summary": "The advertising ID", - "schema": { - "$ref": "#/components/schemas/AdvertisingIdResult" - } - }, - "examples": [ - { - "name": "Getting the advertising ID", - "params": [], - "result": { - "name": "Default Result", - "value": { - "ifa": "bd87dd10-8d1d-4b93-b1a6-a8e5d410e400", - "ifa_type": "sspid", - "lmt": "0" - } - } - }, - { - "name": "Getting the advertising ID with scope browse", - "params": [], - "result": { - "name": "Default Result", - "value": { - "ifa": "bd87dd10-8d1d-4b93-b1a6-a8e5d410e400", - "ifa_type": "sspid", - "lmt": "1" - } - } - }, - { - "name": "Getting the advertising ID with scope content", - "params": [], - "result": { - "name": "Default Result", - "value": { - "ifa": "bd87dd10-8d1d-4b93-b1a6-a8e5d410e400", - "ifa_type": "idfa", - "lmt": "0" - } - } - } - ] - }, - { - "name": "Device.uid", - "summary": "Returns a persistent unique UUID for the current app and device. The UUID is reset when the app or device is reset", - "params": [], - "tags": [ - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:device:uid" - ] - } - ], - "result": { - "name": "uniqueId", - "summary": "A unique UUID for this app-device pair.", - "schema": { - "type": "string" - } - }, - "examples": [ - { - "name": "Getting the unique UUID", - "params": [], - "result": { - "name": "Default Result", - "value": "ee6723b8-7ab3-462c-8d93-dbf61227998e" - } - } - ] - }, - { - "name": "Device.deviceClass", - "summary": "Returns the class of the device", - "params": [], - "tags": [ - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:device:device-class" - ] - } - ], - "result": { - "name": "deviceClass", - "summary": "The device class", - "schema": { - "$ref": "#/components/schemas/DeviceClass" - } - }, - "examples": [ - { - "name": "Getting the device class", - "params": [], - "result": { - "name": "Default Result", - "value": "ott" - } - } - ] - }, - { - "name": "Device.uptime", - "summary": "Returns the number of seconds since most recent device boot, including any time spent during deep sleep", - "params": [], - "tags": [ - { - "name": "rpc-only" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:device:info" - ] - } - ], - "result": { - "name": "uptime", - "summary": "The device uptime", - "schema": { - "type": "number" - } - }, - "examples": [ - { - "name": "Getting the device uptime", - "params": [], - "result": { - "name": "Default Result", - "value": 123456 - } - } - ] - }, - { - "name": "Device.timeInActiveState", - "summary": "Returns the number of seconds since the device transitioned to the ON power state", - "params": [], - "tags": [ - { - "name": "rpc-only" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:device:info" - ] - } - ], - "result": { - "name": "timeInActiveState", - "summary": "The device time in active state", - "schema": { - "type": "number" - } - }, - "examples": [ - { - "name": "Getting the number of seconds since the device transitioned to the ON power state", - "params": [], - "result": { - "name": "Default Result", - "value": 654321 - } - } - ] - }, - { - "name": "Device.chipsetId", - "summary": "Returns chipset ID as a printable string, e.g. BCM72180", - "params": [], - "tags": [ - { - "name": "rpc-only" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:device:info" - ] - } - ], - "result": { - "name": "chipsetId", - "summary": "The device chipset ID", - "schema": { - "type": "string" - } - }, - "examples": [ - { - "name": "Getting the device chipset ID", - "params": [], - "result": { - "name": "Default Result", - "value": "BCM72180" - } - } - ] - }, - { - "name": "Device.hdr", - "summary": "Returns the HDR standards that are supported by the attached TV or the integral display", - "params": [], - "tags": [ - { - "name": "property:readonly" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:device:info" - ] - } - ], - "result": { - "name": "negotiatedHdrFormats", - "summary": "the negotiated HDR formats", - "schema": { - "$ref": "#/components/schemas/HDRFormatMap" - } - }, - "examples": [ - { - "name": "Getting the negotiated HDR formats", - "params": [], - "result": { - "name": "Default Result", - "value": { - "hdr10": true, - "hdr10Plus": true, - "dolbyVision": true, - "hlg": true - } - } - } - ] - }, - { - "name": "Discovery.watched", - "summary": "Notify the platform that content was partially or completely watched", - "tags": [ - { - "name": "polymorphic-reducer" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:discovery:watched" - ] - } - ], - "params": [ - { - "name": "entityId", - "required": true, - "schema": { - "type": "string" - }, - "summary": "The entity Id of the watched content." - }, - { - "name": "progress", - "summary": "How much of the content has been watched (percentage as (0-0.999) for VOD, number of seconds for live)", - "schema": { - "type": "number", - "minimum": 0 - } - }, - { - "name": "completed", - "summary": "Whether or not this viewing is considered \"complete,\" per the app's definition thereof", - "schema": { - "type": "boolean" - } - }, - { - "name": "watchedOn", - "summary": "Date/Time the content was watched, ISO 8601 Date/Time", - "schema": { - "type": "string", - "format": "date-time" - } - }, - { - "name": "agePolicy", - "description": "The age policy associated with the watch event. The age policy describes the age groups to which content may be directed.", - "schema": { - "$ref": "#/x-schemas/Policies/AgePolicy" - } - } - ], - "result": { - "name": "result", - "schema": { - "type": "null" - } - }, - "examples": [ - { - "name": "Notify the platform of watched content", - "params": [ - { - "name": "entityId", - "value": "partner.com/entity/123" - }, - { - "name": "progress", - "value": 0.95 - }, - { - "name": "completed", - "value": true - }, - { - "name": "watchedOn", - "value": "2021-04-23T18:25:43.511Z" - } - ], - "result": { - "name": "success", - "value": true - } - }, - { - "name": "Notify the platform that child-directed content was watched", - "params": [ - { - "name": "entityId", - "value": "partner.com/entity/123" - }, - { - "name": "progress", - "value": 0.95 - }, - { - "name": "completed", - "value": true - }, - { - "name": "watchedOn", - "value": "2021-04-23T18:25:43.511Z" - }, - { - "name": "agePolicy", - "value": "app:child" - } - ], - "result": { - "name": "success", - "value": true - } - } - ] - }, - { - "name": "Display.edid", - "summary": "Returns the EDID (and extensions) of the connected or integral display, as a Base64 encoded string", - "params": [], - "tags": [ - { - "name": "rpc-only" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:display:info" - ] - } - ], - "result": { - "name": "Base64 EDID", - "summary": "The EDID (and extensions) of the connected or integral display, as a Base64 encoded string", - "schema": { - "type": "string" - } - }, - "examples": [ - { - "name": "Getting the display EDID", - "params": [], - "result": { - "name": "Default Result", - "value": "ZWU2NzIzYjgtN2FiMy00NjJjLThkOTMtZGJmNjEyMjc5OThl" - } - } - ] - }, - { - "name": "Display.size", - "summary": "Returns the physical dimensions of the connected or integral display, in centimeters. Returns 0, 0 on a OTT/STB device when a display is not connected over HDMI", - "params": [], - "tags": [ - { - "name": "rpc-only" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:display:info" - ] - } - ], - "result": { - "name": "size", - "summary": "The display size in centimeters", - "schema": { - "type": "object", - "properties": { - "width": { - "type": "integer", - "description": "The width of the display in centimeters" - }, - "height": { - "type": "integer", - "description": "The height of the display in centimeters" - } - } - } - }, - "examples": [ - { - "name": "Getting the display size", - "params": [], - "result": { - "name": "Default Result", - "value": { - "width": 48, - "height": 27 - } - } - } - ] - }, - { - "name": "Display.maxResolution", - "summary": "Returns the physical/native resolution of the connected or integral display, in pixels. Returns 0, 0 on a OTT/STB device when a display is not connected over HDMI", - "params": [], - "tags": [ - { - "name": "rpc-only" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:display:info" - ] - } - ], - "result": { - "name": "maxResolution", - "summary": "The display resolution", - "schema": { - "type": "object", - "properties": { - "width": { - "type": "integer", - "description": "The width of the display in pixels" - }, - "height": { - "type": "integer", - "description": "The height of the display in pixels" - } - } - } - }, - "examples": [ - { - "name": "Getting the display size", - "params": [], - "result": { - "name": "Default Result", - "value": { - "width": 1920, - "height": 1080 - } - } - } - ] - }, - { - "name": "Lifecycle2.close", - "tags": [ - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:cpp-client-only" - ] - } - ], - "summary": "Request the platform to deactivate the app, and possibly take further action.", - "params": [ - { - "name": "type", - "summary": "The type of the close app is requesting", - "required": true, - "schema": { - "$ref": "#/components/schemas/CloseType" - } - } - ], - "result": { - "name": "result", - "schema": { - "type": "null" - } - }, - "examples": [ - { - "name": "Close the app when the user presses back on the app home screen", - "params": [ - { - "name": "type", - "value": "unload" - } - ], - "result": { - "name": "Default Result", - "value": null - } - }, - { - "name": "Close the app when the user selects an exit menu item", - "params": [ - { - "name": "type", - "value": "deactivate" - } - ], - "result": { - "name": "Default Result", - "value": null - } - } - ] - }, - { - "name": "Lifecycle2.state", - "summary": "Get the current lifecycle state of the app.", - "tags": [ - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:cpp-client-only" - ] - } - ], - "params": [], - "result": { - "name": "state", - "summary": "The current lifecycle state of the app.", - "schema": { - "$ref": "#/components/schemas/LifecycleState" - } - }, - "examples": [ - { - "name": "Default Example", - "params": [], - "result": { - "name": "Default Result", - "value": "active" - } - } - ] - }, - { - "name": "Localization.country", - "tags": [ - { - "name": "property:readonly" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:localization:country-code" - ] - } - ], - "summary": "Returns the ISO 3166-1 alpha-2 code for the country device is located in.", - "params": [], - "result": { - "name": "code", - "summary": "The device country code.", - "schema": { - "$ref": "#/x-schemas/Localization/CountryCode" - } - }, - "examples": [ - { - "name": "Default example", - "params": [], - "result": { - "name": "Default Result", - "value": "US" - } - }, - { - "name": "Another example", - "params": [], - "result": { - "name": "Default Result", - "value": "GB" - } - } - ] - }, - { - "name": "Localization.preferredAudioLanguages", - "summary": "Returns a list of ISO 639-2/B codes for the preferred audio languages on this device.", - "params": [], - "tags": [ - { - "name": "property:readonly" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:localization:preferred-audio-languages" - ] - } - ], - "result": { - "name": "languages", - "summary": "The preferred audio languages.", - "schema": { - "type": "array", - "items": { - "$ref": "#/x-schemas/Localization/ISO639_2Language" - } - } - }, - "examples": [ - { - "name": "Default example", - "params": [], - "result": { - "name": "Default Result", - "value": [ - "spa", - "eng" - ] - } - } - ] - }, - { - "name": "Localization.presentationLanguage", - "tags": [ - { - "name": "property:readonly" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:localization:locale" - ] - } - ], - "summary": "Get the *full* BCP 47 code, including script, region, variant, etc., for the preferred locale", - "params": [], - "result": { - "name": "locale", - "summary": "The device locale.", - "schema": { - "$ref": "#/x-schemas/Localization/Locale" - } - }, - "examples": [ - { - "name": "Default example", - "params": [], - "result": { - "name": "Default Result", - "value": "en-US" - } - } - ] - }, - { - "name": "Metrics.ready", - "tags": [ - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:metrics:general" - ] - } - ], - "summary": "Inform the platform that your app is minimally usable. This method is called automatically by `Lifecycle.ready()`", - "params": [], - "result": { - "name": "result", - "schema": { - "type": "null" - } - }, - "examples": [ - { - "name": "Send ready metric", - "params": [], - "result": { - "name": "success", - "value": true - } - } - ] - }, - { - "name": "Metrics.signIn", - "tags": [ - { - "name": "rpc-only" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:metrics:general" - ] - } - ], - "summary": "Log a sign in event, called by Discovery.signIn().", - "params": [], - "result": { - "name": "result", - "schema": { - "type": "null" - } - }, - "examples": [ - { - "name": "Send signIn metric", - "params": [], - "result": { - "name": "success", - "value": true - } - } - ] - }, - { - "name": "Metrics.signOut", - "tags": [ - { - "name": "rpc-only" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:metrics:general" - ] - } - ], - "summary": "Log a sign out event, called by Discovery.signOut().", - "params": [], - "result": { - "name": "result", - "schema": { - "type": "null" - } - }, - "examples": [ - { - "name": "Send signOut metric", - "params": [], - "result": { - "name": "success", - "value": true - } - } - ] - }, - { - "name": "Metrics.startContent", - "tags": [ - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:metrics:general" - ] - } - ], - "summary": "Inform the platform that your user has started content.", - "params": [ - { - "name": "entityId", - "summary": "Optional entity ID of the content.", - "schema": { - "type": "string" - }, - "required": false - }, - { - "name": "agePolicy", - "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", - "schema": { - "$ref": "#/x-schemas/Policies/AgePolicy" - } - } - ], - "result": { - "name": "result", - "schema": { - "type": "null" - } - }, - "examples": [ - { - "name": "Send startContent metric", - "params": [], - "result": { - "name": "success", - "value": true - } - }, - { - "name": "Send startContent metric w/ entity", - "params": [ - { - "name": "entityId", - "value": "abc" - } - ], - "result": { - "name": "success", - "value": true - } - }, - { - "name": "Send startContent metric and notify the platform that the content is child-directed", - "params": [ - { - "name": "entityId", - "value": "abc" - }, - { - "name": "agePolicy", - "value": "app:child" - } - ], - "result": { - "name": "success", - "value": true - } - } - ] - }, - { - "name": "Metrics.stopContent", - "tags": [ - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:metrics:general" - ] - } - ], - "summary": "Inform the platform that your user has stopped content.", - "params": [ - { - "name": "entityId", - "summary": "Optional entity ID of the content.", - "schema": { - "type": "string" - }, - "required": false - }, - { - "name": "agePolicy", - "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", - "schema": { - "$ref": "#/x-schemas/Policies/AgePolicy" - } - } - ], - "result": { - "name": "result", - "schema": { - "type": "null" - } - }, - "examples": [ - { - "name": "Send stopContent metric", - "params": [], - "result": { - "name": "success", - "value": true - } - }, - { - "name": "Send stopContent metric w/ entity", - "params": [ - { - "name": "entityId", - "value": "abc" - } - ], - "result": { - "name": "success", - "value": true - } - } - ] - }, - { - "name": "Metrics.page", - "tags": [ - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:metrics:general" - ] - } - ], - "summary": "Inform the platform that your user has navigated to a page or view.", - "params": [ - { - "name": "pageId", - "summary": "Page ID of the content.", - "schema": { - "type": "string" - }, - "required": true - }, - { - "name": "agePolicy", - "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", - "schema": { - "$ref": "#/x-schemas/Policies/AgePolicy" - } - } - ], - "result": { - "name": "result", - "schema": { - "type": "null" - } - }, - "examples": [ - { - "name": "Send page metric", - "params": [ - { - "name": "pageId", - "value": "xyz" - } - ], - "result": { - "name": "success", - "value": true - } - }, - { - "name": "Send page metric w/ pageId", - "params": [ - { - "name": "pageId", - "value": "home" - } - ], - "result": { - "name": "success", - "value": true - } - } - ] - }, - { - "name": "Metrics.error", - "tags": [ - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:metrics:general" - ] - } - ], - "summary": "Inform the platform of an error that has occurred in your app.", - "params": [ - { - "name": "type", - "summary": "The type of error", - "schema": { - "$ref": "#/components/schemas/ErrorType" - }, - "required": true - }, - { - "name": "code", - "summary": "an app-specific error code", - "schema": { - "type": "string" - }, - "required": true - }, - { - "name": "description", - "summary": "A short description of the error", - "schema": { - "type": "string" - }, - "required": true - }, - { - "name": "visible", - "summary": "Whether or not this error was visible to the user.", - "schema": { - "type": "boolean" - }, - "required": true - }, - { - "name": "parameters", - "summary": "Optional additional parameters to be logged with the error", - "schema": { - "$ref": "#/x-schemas/Types/FlatMap" - }, - "required": false - }, - { - "name": "agePolicy", - "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", - "schema": { - "$ref": "#/x-schemas/Policies/AgePolicy" - } - } - ], - "result": { - "name": "result", - "schema": { - "type": "null" - } - }, - "examples": [ - { - "name": "Send error metric", - "params": [ - { - "name": "type", - "value": "media" - }, - { - "name": "code", - "value": "MEDIA-STALLED" - }, - { - "name": "description", - "value": "playback stalled" - }, - { - "name": "visible", - "value": true - } - ], - "result": { - "name": "success", - "value": true - } - } - ] - }, - { - "name": "Metrics.mediaLoadStart", - "tags": [ - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:metrics:media" - ] - } - ], - "summary": "Called when setting the URL of a media asset to play, in order to infer load time.", - "params": [ - { - "name": "entityId", - "summary": "The entityId of the media.", - "schema": { - "type": "string" - }, - "required": true - }, - { - "name": "agePolicy", - "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", - "schema": { - "$ref": "#/x-schemas/Policies/AgePolicy" - } - } - ], - "result": { - "name": "result", - "schema": { - "type": "null" - } - }, - "examples": [ - { - "name": "Send loadstart metric.", - "params": [ - { - "name": "entityId", - "value": "345" - } - ], - "result": { - "name": "success", - "value": true - } - } - ] - }, - { - "name": "Metrics.mediaPlay", - "tags": [ - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:metrics:media" - ] - } - ], - "summary": "Called when media playback should start due to autoplay, user-initiated play, or unpausing.", - "params": [ - { - "name": "entityId", - "summary": "The entityId of the media.", - "schema": { - "type": "string" - }, - "required": true - }, - { - "name": "agePolicy", - "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", - "schema": { - "$ref": "#/x-schemas/Policies/AgePolicy" - } - } - ], - "result": { - "name": "result", - "schema": { - "type": "null" - } - }, - "examples": [ - { - "name": "Send play metric.", - "params": [ - { - "name": "entityId", - "value": "345" - } - ], - "result": { - "name": "success", - "value": true - } - } - ] - }, - { - "name": "Metrics.mediaPlaying", - "tags": [ - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:metrics:media" - ] - } - ], - "summary": "Called when media playback actually starts due to autoplay, user-initiated play, unpausing, or recovering from a buffering interruption.", - "params": [ - { - "name": "entityId", - "summary": "The entityId of the media.", - "schema": { - "type": "string" - }, - "required": true - }, - { - "name": "agePolicy", - "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", - "schema": { - "$ref": "#/x-schemas/Policies/AgePolicy" - } - } - ], - "result": { - "name": "result", - "schema": { - "type": "null" - } - }, - "examples": [ - { - "name": "Send playing metric.", - "params": [ - { - "name": "entityId", - "value": "345" - } - ], - "result": { - "name": "success", - "value": true - } - } - ] - }, - { - "name": "Metrics.mediaPause", - "tags": [ - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:metrics:media" - ] - } - ], - "summary": "Called when media playback will pause due to an intentional pause operation.", - "params": [ - { - "name": "entityId", - "summary": "The entityId of the media.", - "schema": { - "type": "string" - }, - "required": true - }, - { - "name": "agePolicy", - "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", - "schema": { - "$ref": "#/x-schemas/Policies/AgePolicy" - } - } - ], - "result": { - "name": "result", - "schema": { - "type": "null" - } - }, - "examples": [ - { - "name": "Send pause metric.", - "params": [ - { - "name": "entityId", - "value": "345" - } - ], - "result": { - "name": "success", - "value": true - } - } - ] - }, - { - "name": "Metrics.mediaWaiting", - "tags": [ - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:metrics:media" - ] - } - ], - "summary": "Called when media playback will halt due to a network, buffer, or other unintentional constraint.", - "params": [ - { - "name": "entityId", - "summary": "The entityId of the media.", - "schema": { - "type": "string" - }, - "required": true - }, - { - "name": "agePolicy", - "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", - "schema": { - "$ref": "#/x-schemas/Policies/AgePolicy" - } - } - ], - "result": { - "name": "result", - "schema": { - "type": "null" - } - }, - "examples": [ - { - "name": "Send waiting metric.", - "params": [ - { - "name": "entityId", - "value": "345" - } - ], - "result": { - "name": "success", - "value": true - } - } - ] - }, - { - "name": "Metrics.mediaSeeking", - "tags": [ - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:metrics:media" - ] - } - ], - "summary": "Called when a seek is initiated during media playback.", - "params": [ - { - "name": "entityId", - "summary": "The entityId of the media.", - "schema": { - "type": "string" - }, - "required": true - }, - { - "name": "target", - "summary": "Target destination of the seek, as a decimal percentage (0-0.999) for content with a known duration, or an integer number of seconds (0-86400) for content with an unknown duration.", - "schema": { - "$ref": "#/components/schemas/MediaPosition" - }, - "required": true - }, - { - "name": "agePolicy", - "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", - "schema": { - "$ref": "#/x-schemas/Policies/AgePolicy" - } - } - ], - "result": { - "name": "result", - "schema": { - "type": "null" - } - }, - "examples": [ - { - "name": "Send seeking metric.", - "params": [ - { - "name": "entityId", - "value": "345" - }, - { - "name": "target", - "value": 0.5 - } - ], - "result": { - "name": "success", - "value": true - } - } - ] - }, - { - "name": "Metrics.mediaSeeked", - "tags": [ - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:metrics:media" - ] - } - ], - "summary": "Called when a seek is completed during media playback.", - "params": [ - { - "name": "entityId", - "summary": "The entityId of the media.", - "schema": { - "type": "string" - }, - "required": true - }, - { - "name": "position", - "summary": "Resulting position of the seek operation, as a decimal percentage (0-0.999) for content with a known duration, or an integer number of seconds (0-86400) for content with an unknown duration.", - "schema": { - "$ref": "#/components/schemas/MediaPosition" - }, - "required": true - }, - { - "name": "agePolicy", - "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", - "schema": { - "$ref": "#/x-schemas/Policies/AgePolicy" - } - } - ], - "result": { - "name": "result", - "schema": { - "type": "null" - } - }, - "examples": [ - { - "name": "Send seeked metric.", - "params": [ - { - "name": "entityId", - "value": "345" - }, - { - "name": "position", - "value": 0.51 - } - ], - "result": { - "name": "success", - "value": true - } - } - ] - }, - { - "name": "Metrics.mediaRateChanged", - "tags": [ - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:metrics:media" - ] - } - ], - "summary": "Called when the playback rate of media is changed.", - "params": [ - { - "name": "entityId", - "summary": "The entityId of the media.", - "schema": { - "type": "string" - }, - "required": true - }, - { - "name": "rate", - "summary": "The new playback rate.", - "schema": { - "type": "number" - }, - "required": true - }, - { - "name": "agePolicy", - "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", - "schema": { - "$ref": "#/x-schemas/Policies/AgePolicy" - } - } - ], - "result": { - "name": "result", - "schema": { - "type": "null" - } - }, - "examples": [ - { - "name": "Send ratechange metric.", - "params": [ - { - "name": "entityId", - "value": "345" - }, - { - "name": "rate", - "value": 2 - } - ], - "result": { - "name": "success", - "value": true - } - } - ] - }, - { - "name": "Metrics.mediaRenditionChanged", - "tags": [ - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:metrics:media" - ] - } - ], - "summary": "Called when the playback rendition (e.g. bitrate, dimensions, profile, etc) is changed.", - "params": [ - { - "name": "entityId", - "summary": "The entityId of the media.", - "schema": { - "type": "string" - }, - "required": true - }, - { - "name": "bitrate", - "summary": "The new bitrate in kbps.", - "schema": { - "type": "number" - }, - "required": true - }, - { - "name": "width", - "summary": "The new resolution width.", - "schema": { - "type": "number" - }, - "required": true - }, - { - "name": "height", - "summary": "The new resolution height.", - "schema": { - "type": "number" - }, - "required": true - }, - { - "name": "profile", - "summary": "A description of the new profile, e.g. 'HDR' etc.", - "schema": { - "type": "string" - }, - "required": false - }, - { - "name": "agePolicy", - "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", - "schema": { - "$ref": "#/x-schemas/Policies/AgePolicy" - } - } - ], - "result": { - "name": "result", - "schema": { - "type": "null" - } - }, - "examples": [ - { - "name": "Send renditionchange metric.", - "params": [ - { - "name": "entityId", - "value": "345" - }, - { - "name": "bitrate", - "value": 5000 - }, - { - "name": "width", - "value": 1920 - }, - { - "name": "height", - "value": 1080 - }, - { - "name": "profile", - "value": "HDR+" - } - ], - "result": { - "name": "success", - "value": true - } - } - ] - }, - { - "name": "Metrics.mediaEnded", - "tags": [ - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:metrics:media" - ] - } - ], - "summary": "Called when playback has stopped because the end of the media was reached.", - "params": [ - { - "name": "entityId", - "summary": "The entityId of the media.", - "schema": { - "type": "string" - }, - "required": true - }, - { - "name": "agePolicy", - "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", - "schema": { - "$ref": "#/x-schemas/Policies/AgePolicy" - } - } - ], - "result": { - "name": "result", - "schema": { - "type": "null" - } - }, - "examples": [ - { - "name": "Send ended metric.", - "params": [ - { - "name": "entityId", - "value": "345" - } - ], - "result": { - "name": "success", - "value": true - } - } - ] - }, - { - "name": "Metrics.event", - "tags": [ - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:metrics:distributor" - ] - } - ], - "summary": "Inform the platform of 1st party distributor metrics. 'data' parameter is a JSON document", - "params": [ - { - "name": "schema", - "summary": "The schema URI of the metric type", - "schema": { - "type": "string", - "format": "uri" - }, - "required": true - }, - { - "name": "data", - "summary": "A JSON payload", - "schema": { - "type": "string" - }, - "required": true - }, - { - "name": "agePolicy", - "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", - "schema": { - "$ref": "#/x-schemas/Policies/AgePolicy" - } - } - ], - "result": { - "name": "result", - "schema": { - "type": "null" - } - }, - "examples": [ - { - "name": "Send foo event", - "params": [ - { - "name": "schema", - "value": "http://meta.rdkcentral.com/some/schema" - }, - { - "name": "data", - "value": "foo" - } - ], - "result": { - "name": "result", - "value": true - } - } - ] - }, - { - "name": "Metrics.appInfo", - "tags": [ - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:metrics:general" - ] - } - ], - "summary": "Inform the platform about an app's build info.", - "params": [ - { - "name": "build", - "summary": "The build / version of this app.", - "schema": { - "type": "string" - }, - "required": true - } - ], - "result": { - "name": "result", - "schema": { - "type": "null" - } - }, - "examples": [ - { - "name": "Send appInfo metric", - "params": [ - { - "name": "build", - "value": "1.2.2" - } - ], - "result": { - "name": "result", - "value": null - } - } - ] - }, - { - "name": "Network.connected", - "summary": "Returns whether the device currently has a usable network connection.", - "tags": [ - { - "name": "property:readonly" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:network:connected" - ] - } - ], - "params": [], - "result": { - "name": "success", - "summary": "Whether the device currently has a usable network connection.", - "schema": { - "$ref": "#/components/schemas/Connected" - } - }, - "examples": [ - { - "name": "Connected example", - "params": [], - "result": { - "name": "success", - "value": true - } - } - ] - }, - { - "name": "Presentation.focused", - "tags": [ - { - "name": "property:readonly" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:cpp-client-only" - ] - } - ], - "summary": "Whether the app is in focus, i.e. receiving key presses. Provided for those apps/runtimes that cannot use Wayland", - "params": [], - "result": { - "name": "focused", - "summary": "Whether the app is in focus.", - "schema": { - "type": "boolean" - } - }, - "examples": [ - { - "name": "Default example", - "params": [], - "result": { - "name": "Default Result", - "value": true - } - } - ] - }, - { - "name": "Stats.memoryUsage", - "summary": "Returns information about container memory usage, in units of 1024 bytes.", - "tags": [ - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:cpp-client-only" - ] - } - ], - "params": [], - "result": { - "name": "result", - "schema": { - "$ref": "#/components/schemas/MemoryUsage" - } - }, - "examples": [ - { - "name": "Default example", - "params": [], - "result": { - "name": "value", - "description": "The memory usage information", - "value": { - "userMemoryUsedKiB": 123456, - "userMemoryLimitKiB": 789012, - "gpuMemoryUsedKiB": 345678, - "gpuMemoryLimitKiB": 901234 - } - } - } - ] - }, - { - "name": "TextToSpeech.speak", - "summary": "Speak the utterance immediately. Any ongoing speech is interrupted.", - "description": "Text argument is either plain text or a well-formed SSML document TTS_status, not success attribute, to be used by caller to indicate success of call 0 OK, 1 Fail, 2 not enabled, 3 invalid configuration Raises onSpeechinterrupted if speaking is interrupted", - "params": [ - { - "name": "text", - "summary": "String to be converted to Audio for speech", - "schema": { - "type": "string" - }, - "required": true - } - ], - "tags": [ - { - "name": "rpc-only" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:text-to-speech:general" - ] - } - ], - "result": { - "name": "speakResult", - "summary": "Result for Speak", - "schema": { - "$ref": "#/components/schemas/SpeechResponse" - } - }, - "examples": [ - { - "name": "Getting the result of speak", - "params": [ - { - "name": "text", - "value": "I am a text waiting for speech." - } - ], - "result": { - "name": "result", - "value": { - "speechid": 1, - "TTS_Status": 0, - "success": true - } - } - } - ] - }, - { - "name": "TextToSpeech.pause", - "summary": "Pauses the speech for given speech id", - "description": "Pauses the utterance. Raises onSpeechpause if ongoing speech is paused. Does nothing if utterance is already paused", - "params": [ - { - "name": "speechid", - "summary": "Identifier for the speech call", - "schema": { - "$ref": "#/components/schemas/SpeechId" - }, - "required": true - } - ], - "tags": [ - { - "name": "rpc-only" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:text-to-speech:general" - ] - } - ], - "result": { - "name": "pauseResult", - "summary": "Result for Pause", - "schema": { - "$ref": "#/components/schemas/TTSStatusResponse" - } - }, - "examples": [ - { - "name": "Pause a given speech id", - "params": [ - { - "name": "speechid", - "value": 1 - } - ], - "result": { - "name": "TTS_Status", - "value": { - "TTS_Status": 0, - "success": true - } - } - } - ] - }, - { - "name": "TextToSpeech.resume", - "summary": "Resumes the speech for given speech id", - "description": "Continue the paused utterance. Raises onSpeechresume if paused speech is resumed. Does nothing if the utterance is not paused", - "params": [ - { - "name": "speechid", - "summary": "Identifier for the speech call", - "schema": { - "$ref": "#/components/schemas/SpeechId" - }, - "required": true - } - ], - "tags": [ - { - "name": "rpc-only" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:text-to-speech:general" - ] - } - ], - "result": { - "name": "resumeResult", - "summary": "Result for Resume", - "schema": { - "$ref": "#/components/schemas/TTSStatusResponse" - } - }, - "examples": [ - { - "name": "Resume a given speech id.", - "params": [ - { - "name": "speechid", - "value": 1 - } - ], - "result": { - "name": "TTS_Status", - "value": { - "TTS_Status": 0, - "success": true - } - } - } - ] - }, - { - "name": "TextToSpeech.cancel", - "summary": "Cancels the speech for given speech id", - "description": "Stop speaking if utterance is currently being spoken. Raises onSpeechinterrupted if speaking was interrupted.", - "params": [ - { - "name": "speechid", - "summary": "Identifier for the speech call", - "schema": { - "$ref": "#/components/schemas/SpeechId" - }, - "required": true - } - ], - "tags": [ - { - "name": "rpc-only" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:text-to-speech:general" - ] - } - ], - "result": { - "name": "cancelResult", - "summary": "Result for cancel", - "schema": { - "$ref": "#/components/schemas/TTSStatusResponse" - } - }, - "examples": [ - { - "name": "Cancel a given speech id.", - "params": [ - { - "name": "speechid", - "value": 1 - } - ], - "result": { - "name": "TTS_Status", - "value": { - "TTS_Status": 0, - "success": true - } - } - } - ] - }, - { - "name": "TextToSpeech.getspeechstate", - "summary": "Returns the state of the utterance.", - "params": [ - { - "name": "speechid", - "summary": "Identifier for the speech call", - "schema": { - "$ref": "#/components/schemas/SpeechId" - }, - "required": true - } - ], - "tags": [ - { - "name": "rpc-only" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:text-to-speech:general" - ] - } - ], - "result": { - "name": "speechStateResult", - "summary": "Result for speech state", - "schema": { - "$ref": "#/components/schemas/SpeechStateResponse" - } - }, - "examples": [ - { - "name": "State for a given speech id.", - "params": [ - { - "name": "speechid", - "value": 1 - } - ], - "result": { - "name": "speechstate", - "value": { - "speechstate": 1, - "TTS_Status": 0, - "success": true - } - } - } - ] - }, - { - "name": "TextToSpeech.listvoices", - "summary": "Returns the list of available voices as human-readable strings, e.g. 'ava', 'amelie', 'angelica'", - "params": [ - { - "name": "language", - "summary": "Language - string - BCP 47", - "schema": { - "$ref": "#/x-schemas/Localization/Locale" - }, - "required": true - } - ], - "tags": [ - { - "name": "rpc-only" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:text-to-speech:general" - ] - } - ], - "result": { - "name": "listvoices", - "summary": "The list of voices supported for the language", - "schema": { - "$ref": "#/components/schemas/ListVoicesResponse" - } - }, - "examples": [ - { - "name": "Getting the list of voices", - "params": [ - { - "name": "language", - "value": "en-US" - } - ], - "result": { - "name": "voiceList", - "value": { - "TTS_Status": 0, - "voices": [ - "carol", - "tom" - ] - } - } - } - ] - }, - { - "name": "Lifecycle2.onStateChanged", - "tags": [ - { - "name": "event", - "x-contextual-parameters": 0, - "x-notifier": "Lifecycle2.onStateChanged" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:cpp-client-only" - ] - } - ], - "summary": "Notification of lifecycle state change, raised after the platform has transitioned the app/runtime to the new lifecycle state", - "params": [ - { - "name": "listen", - "schema": { - "type": "boolean" - } - } - ], - "examples": [ - { - "name": "App is active after being initialized", - "params": [ - { - "name": "listen", - "value": true - } - ], - "result": { - "name": "result", - "value": null - } - }, - { - "name": "Single transition to paused state", - "params": [ - { - "name": "listen", - "value": true - } - ], - "result": { - "name": "result", - "value": null - } - } - ], - "result": { - "name": "result", - "schema": { - "type": "null" - } - } - }, - { - "name": "TextToSpeech.onWillspeak", - "summary": "Text to speech conversion is about to start.", - "tags": [ - { - "name": "rpc-only" - }, - { - "name": "event", - "x-notifier": "TextToSpeech.onWillspeak" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:text-to-speech:general" - ] - } - ], - "params": [ - { - "name": "listen", - "schema": { - "type": "boolean" - } - } - ], - "examples": [ - { - "name": "Default Example", - "params": [ - { - "name": "listen", - "value": true - } - ], - "result": { - "name": "result", - "value": null - } - } - ], - "result": { - "name": "result", - "schema": { - "type": "null" - } - } - }, - { - "name": "TextToSpeech.onSpeechstart", - "summary": "Utterance is about to be spoken.", - "tags": [ - { - "name": "rpc-only" - }, - { - "name": "event", - "x-notifier": "TextToSpeech.onSpeechstart" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:text-to-speech:general" - ] - } - ], - "params": [ - { - "name": "listen", - "schema": { - "type": "boolean" - } - } - ], - "examples": [ - { - "name": "Default Example", - "params": [ - { - "name": "listen", - "value": true - } - ], - "result": { - "name": "result", - "value": null - } - } - ], - "result": { - "name": "result", - "schema": { - "type": "null" - } - } - }, - { - "name": "TextToSpeech.onSpeechpause", - "summary": "Ongoing speech was paused.", - "tags": [ - { - "name": "rpc-only" - }, - { - "name": "event", - "x-notifier": "TextToSpeech.onSpeechpause" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:text-to-speech:general" - ] - } - ], - "params": [ - { - "name": "listen", - "schema": { - "type": "boolean" - } - } - ], - "examples": [ - { - "name": "Default Example", - "params": [ - { - "name": "listen", - "value": true - } - ], - "result": { - "name": "result", - "value": null - } - } - ], - "result": { - "name": "result", - "schema": { - "type": "null" - } - } - }, - { - "name": "TextToSpeech.onSpeechresume", - "summary": "Paused speech was resumed.", - "tags": [ - { - "name": "rpc-only" - }, - { - "name": "event", - "x-notifier": "TextToSpeech.onSpeechresume" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:text-to-speech:general" - ] - } - ], - "params": [ - { - "name": "listen", - "schema": { - "type": "boolean" - } - } - ], - "examples": [ - { - "name": "Default Example", - "params": [ - { - "name": "listen", - "value": true - } - ], - "result": { - "name": "result", - "value": null - } - } - ], - "result": { - "name": "result", - "schema": { - "type": "null" - } - } - }, - { - "name": "TextToSpeech.onSpeechcomplete", - "summary": "Speech completed successfully.", - "tags": [ - { - "name": "rpc-only" - }, - { - "name": "event", - "x-notifier": "TextToSpeech.onSpeechcomplete" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:text-to-speech:general" - ] - } - ], - "params": [ - { - "name": "listen", - "schema": { - "type": "boolean" - } - } - ], - "examples": [ - { - "name": "Default Example", - "params": [ - { - "name": "listen", - "value": true - } - ], - "result": { - "name": "result", - "value": null - } - } - ], - "result": { - "name": "result", - "schema": { - "type": "null" - } - } - }, - { - "name": "TextToSpeech.onSpeechinterrupted", - "summary": "Speech was stopped, due to another call to speak or cancel.", - "tags": [ - { - "name": "rpc-only" - }, - { - "name": "event", - "x-notifier": "TextToSpeech.onSpeechinterrupted" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:text-to-speech:general" - ] - } - ], - "params": [ - { - "name": "listen", - "schema": { - "type": "boolean" - } - } - ], - "examples": [ - { - "name": "Default Example", - "params": [ - { - "name": "listen", - "value": true - } - ], - "result": { - "name": "result", - "value": null - } - } - ], - "result": { - "name": "result", - "schema": { - "type": "null" - } - } - }, - { - "name": "TextToSpeech.onNetworkerror", - "summary": "Utterance failed due to network error.", - "tags": [ - { - "name": "rpc-only" - }, - { - "name": "event", - "x-notifier": "TextToSpeech.onNetworkerror" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:text-to-speech:general" - ] - } - ], - "params": [ - { - "name": "listen", - "schema": { - "type": "boolean" - } - } - ], - "examples": [ - { - "name": "Default Example", - "params": [ - { - "name": "listen", - "value": true - } - ], - "result": { - "name": "result", - "value": null - } - } - ], - "result": { - "name": "result", - "schema": { - "type": "null" - } - } - }, - { - "name": "TextToSpeech.onPlaybackerror", - "summary": "Utterance failed during playback.", - "tags": [ - { - "name": "rpc-only" - }, - { - "name": "event", - "x-notifier": "TextToSpeech.onPlaybackerror" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:text-to-speech:general" - ] - } - ], - "params": [ - { - "name": "listen", - "schema": { - "type": "boolean" - } - } - ], - "examples": [ - { - "name": "Default Example", - "params": [ - { - "name": "listen", - "value": true - } - ], - "result": { - "name": "result", - "value": null - } - } - ], - "result": { - "name": "result", - "schema": { - "type": "null" - } - } - }, - { - "name": "Accessibility.onAudioDescriptionChanged", - "summary": "Returns the audio description setting of the device", - "params": [ - { - "name": "listen", - "schema": { - "type": "boolean" - } - } - ], - "tags": [ - { - "name": "event", - "x-notifier": "Accessibility.onAudioDescriptionChanged", - "x-subscriber-for": "Accessibility.audioDescription" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:accessibility:audio-descriptions" - ] - } - ], - "examples": [ - { - "name": "Getting the audio description setting", - "params": [ - { - "name": "listen", - "value": true - } - ], - "result": { - "name": "result", - "value": null - } - } - ], - "result": { - "name": "result", - "schema": { - "type": "null" - } - } - }, - { - "name": "Accessibility.onClosedCaptionsSettingsChanged", - "summary": "Returns captions settings: enabled, and a list of zero or more languages in order of decreasing preference", - "params": [ - { - "name": "listen", - "schema": { - "type": "boolean" - } - } - ], - "tags": [ - { - "name": "event", - "x-notifier-params-flattening": "true", - "x-notifier": "Accessibility.onClosedCaptionsSettingsChanged", - "x-subscriber-for": "Accessibility.closedCaptionsSettings" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:accessibility:closed-captions" - ] - } - ], - "examples": [ - { - "name": "Getting the closed captions settings", - "params": [ - { - "name": "listen", - "value": true - } - ], - "result": { - "name": "result", - "value": null - } - } - ], - "result": { - "name": "result", - "schema": { - "type": "null" - } - } - }, - { - "name": "Accessibility.onHighContrastUIChanged", - "summary": "Returns the high contrast UI device setting", - "params": [ - { - "name": "listen", - "schema": { - "type": "boolean" - } - } - ], - "tags": [ - { - "name": "event", - "x-notifier": "Accessibility.onHighContrastUIChanged", - "x-subscriber-for": "Accessibility.highContrastUI" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:accessibility:high-contrast-ui" - ] - } - ], - "examples": [ - { - "name": "High-contrast UI mode is enabled", - "params": [ - { - "name": "listen", - "value": true - } - ], - "result": { - "name": "result", - "value": null - } - } - ], - "result": { - "name": "result", - "schema": { - "type": "null" - } - } - }, - { - "name": "Accessibility.onVoiceGuidanceSettingsChanged", - "summary": "Returns voice guidance settings: enabled, rate, and verbosity", - "params": [ - { - "name": "listen", - "schema": { - "type": "boolean" - } - } - ], - "tags": [ - { - "name": "event", - "x-notifier-params-flattening": "true", - "x-notifier": "Accessibility.onVoiceGuidanceSettingsChanged", - "x-subscriber-for": "Accessibility.voiceGuidanceSettings" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:accessibility:voice-guidance" - ] - } - ], - "examples": [ - { - "name": "Getting the voice guidance settings", - "params": [ - { - "name": "listen", - "value": true - } - ], - "result": { - "name": "result", - "value": null - } - } - ], - "result": { - "name": "result", - "schema": { - "type": "null" - } - } - }, - { - "name": "Device.onHdrChanged", - "summary": "Returns the HDR standards that are supported by the attached TV or the integral display", - "params": [ - { - "name": "listen", - "schema": { - "type": "boolean" - } - } - ], - "tags": [ - { - "name": "event", - "x-notifier": "Device.onHdrChanged", - "x-subscriber-for": "Device.hdr" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:device:info" - ] - } - ], - "examples": [ - { - "name": "Getting the negotiated HDR formats", - "params": [ - { - "name": "listen", - "value": true - } - ], - "result": { - "name": "result", - "value": null - } - } - ], - "result": { - "name": "result", - "schema": { - "type": "null" - } - } - }, - { - "name": "Localization.onCountryChanged", - "tags": [ - { - "name": "event", - "x-notifier": "Localization.onCountryChanged", - "x-subscriber-for": "Localization.country" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:localization:country-code" - ] - } - ], - "summary": "Returns the ISO 3166-1 alpha-2 code for the country device is located in.", - "params": [ - { - "name": "listen", - "schema": { - "type": "boolean" - } - } - ], - "examples": [ - { - "name": "Default example", - "params": [ - { - "name": "listen", - "value": true - } - ], - "result": { - "name": "result", - "value": null - } - }, - { - "name": "Another example", - "params": [ - { - "name": "listen", - "value": true - } - ], - "result": { - "name": "result", - "value": null - } - } - ], - "result": { - "name": "result", - "schema": { - "type": "null" - } - } - }, - { - "name": "Localization.onPreferredAudioLanguagesChanged", - "summary": "Returns a list of ISO 639-2/B codes for the preferred audio languages on this device.", - "params": [ - { - "name": "listen", - "schema": { - "type": "boolean" - } - } - ], - "tags": [ - { - "name": "event", - "x-notifier": "Localization.onPreferredAudioLanguagesChanged", - "x-subscriber-for": "Localization.preferredAudioLanguages" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:localization:preferred-audio-languages" - ] - } - ], - "examples": [ - { - "name": "Default example", - "params": [ - { - "name": "listen", - "value": true - } - ], - "result": { - "name": "result", - "value": null - } - } - ], - "result": { - "name": "result", - "schema": { - "type": "null" - } - } - }, - { - "name": "Localization.onPresentationLanguageChanged", - "tags": [ - { - "name": "event", - "x-notifier": "Localization.onPresentationLanguageChanged", - "x-subscriber-for": "Localization.presentationLanguage" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:localization:locale" - ] - } - ], - "summary": "Get the *full* BCP 47 code, including script, region, variant, etc., for the preferred locale", - "params": [ - { - "name": "listen", - "schema": { - "type": "boolean" - } - } - ], - "examples": [ - { - "name": "Default example", - "params": [ - { - "name": "listen", - "value": true - } - ], - "result": { - "name": "result", - "value": null - } - } - ], - "result": { - "name": "result", - "schema": { - "type": "null" - } - } - }, - { - "name": "Network.onConnectedChanged", - "summary": "Returns whether the device currently has a usable network connection.", - "tags": [ - { - "name": "event", - "x-notifier": "Network.onConnectedChanged", - "x-subscriber-for": "Network.connected" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:network:connected" - ] - } - ], - "params": [ - { - "name": "listen", - "schema": { - "type": "boolean" - } - } - ], - "examples": [ - { - "name": "Connected example", - "params": [ - { - "name": "listen", - "value": true - } - ], - "result": { - "name": "result", - "value": null - } - } - ], - "result": { - "name": "result", - "schema": { - "type": "null" - } - } - }, - { - "name": "Presentation.onFocusedChanged", - "tags": [ - { - "name": "event", - "x-notifier": "Presentation.onFocusedChanged", - "x-subscriber-for": "Presentation.focused" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:cpp-client-only" - ] - } - ], - "summary": "Whether the app is in focus, i.e. receiving key presses. Provided for those apps/runtimes that cannot use Wayland", - "params": [ - { - "name": "listen", - "schema": { - "type": "boolean" - } - } - ], - "examples": [ - { - "name": "Default example", - "params": [ - { - "name": "listen", - "value": true - } - ], - "result": { - "name": "result", - "value": null - } - } - ], - "result": { - "name": "result", - "schema": { - "type": "null" - } - } - } - ], - "components": { - "schemas": { - "AdvertisingIdResult": { - "title": "AdvertisingIdResult", - "type": "object", - "properties": { - "ifa": { - "type": "string", - "description": "UUID conforming to IAB standard" - }, - "ifa_type": { - "type": "string", - "description": "Source of the IFA as defined by IAB" - }, - "lmt": { - "type": "string", - "enum": [ - "0", - "1" - ], - "description": "Boolean that if set to 1, user has requested ad tracking and measurement is disabled" - } - }, - "required": [ - "ifa", - "ifa_type", - "lmt" - ] - }, - "HDRFormatMap": { - "title": "HDRFormatMap", - "type": "object", - "properties": { - "hdr10": { - "type": "boolean" - }, - "hdr10Plus": { - "type": "boolean" - }, - "dolbyVision": { - "type": "boolean" - }, - "hlg": { - "type": "boolean" - } - }, - "required": [ - "hdr10", - "hdr10Plus", - "dolbyVision", - "hlg" - ], - "description": "The type of HDR format" - }, - "DeviceClass": { - "title": "DeviceClass", - "type": "string", - "enum": [ - "ott", - "stb", - "tv" - ], - "description": "The type of device" - }, - "CloseType": { - "title": "CloseType", - "description": "The application close type", - "type": "string", - "enum": [ - "deactivate", - "unload", - "killReload", - "killReactivate" - ] - }, - "LifecycleState": { - "title": "LifecycleState", - "description": "The application Lifecycle state", - "type": "string", - "enum": [ - "initializing", - "active", - "paused", - "suspended", - "hibernated", - "terminating" - ] - }, - "StateChange": { - "title": "StateChange", - "type": "object", - "properties": { - "newState": { - "$ref": "#/components/schemas/LifecycleState" - }, - "oldState": { - "$ref": "#/components/schemas/LifecycleState" - } - } - }, - "MediaPosition": { - "title": "MediaPosition", - "description": "Represents a position inside playback content, as a decimal percentage (0-0.999) for content with a known duration, or an integer number of seconds (0-86400) for content with an unknown duration.", - "oneOf": [ - { - "const": 0 - }, - { - "type": "number", - "exclusiveMinimum": 0, - "exclusiveMaximum": 1 - }, - { - "type": "integer", - "minimum": 1, - "maximum": 86400 - } - ] - }, - "ErrorType": { - "title": "ErrorType", - "type": "string", - "enum": [ - "network", - "media", - "restriction", - "entitlement", - "other" - ] - }, - "EventObjectPrimitives": { - "title": "EventObjectPrimitives", - "anyOf": [ - { - "type": "string", - "maxLength": 256 - }, - { - "type": "number" - }, - { - "type": "integer" - }, - { - "type": "boolean" - }, - { - "type": "null" - } - ] - }, - "Connected": { - "type": "boolean", - "description": "Indicates whether the device currently has a usable network connection." - }, - "MemoryUsage": { - "title": "MemoryUsage", - "type": "object", - "description": "Describes current and maximum memory usage of the container.", - "properties": { - "userMemoryUsedKiB": { - "type": "integer", - "description": "User memory currently used in 1024 bytes." - }, - "userMemoryLimitKiB": { - "type": "integer", - "description": "Maximum user memory available in 1024 bytes." - }, - "gpuMemoryUsedKiB": { - "type": "integer", - "description": "GPU memory currently used in 1024 bytes." - }, - "gpuMemoryLimitKiB": { - "type": "integer", - "description": "Maximum GPU memory available in 1024 bytes." - } - }, - "required": [ - "userMemoryUsedKiB", - "userMemoryLimitKiB", - "gpuMemoryUsedKiB", - "gpuMemoryLimitKiB" - ] - }, - "TTSEnabled": { - "title": "TTSEnabled", - "type": "object", - "required": [ - "TTS_Status", - "isenabled" - ], - "properties": { - "TTS_Status": { - "$ref": "#/components/schemas/TTSStatus" - }, - "isenabled": { - "type": "boolean" - } - } - }, - "ListVoicesResponse": { - "title": "ListVoicesResponse", - "type": "object", - "required": [ - "TTS_Status", - "voices" - ], - "properties": { - "TTS_Status": { - "$ref": "#/components/schemas/TTSStatus" - }, - "voices": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "TTSConfiguration": { - "title": "TTSConfiguration", - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "type": "boolean" - }, - "ttsendpoint": { - "type": "string", - "description": "URL for Text to Speech API" - }, - "ttsendpointsecured": { - "type": "string", - "description": "Secure URL for Text to Speech API" - }, - "language": { - "type": "string", - "description": "Language used by Text to speech" - }, - "voice": { - "type": "string", - "description": "Voice used by Text to speech" - }, - "volume": { - "type": "integer", - "description": "Volume for Text to speech", - "minimum": 0, - "maximum": 100 - }, - "primvolduckpercent": { - "type": "integer", - "description": "Prime Volume duck percent for Text to speech", - "minimum": 0, - "maximum": 100 - }, - "rate": { - "type": "integer", - "description": "Speech rate for Text to speech", - "minimum": 0, - "maximum": 100 - }, - "speechrate": { - "description": "Rate for speech", - "$ref": "#/components/schemas/SpeechRate" - }, - "fallbacktext": { - "description": "Fallback text for TTS", - "$ref": "#/components/schemas/FallbackText" - } - }, - "examples": [ - {} - ] - }, - "SpeechRate": { - "title": "SpeechRate", - "type": "string", - "enum": [ - "slow", - "medium", - "fast", - "faster", - "fastest" - ] - }, - "FallbackText": { - "title": "FallbackText", - "type": "object", - "properties": { - "scenario": { - "type": "string", - "description": "Scenario for fallback Text" - }, - "value": { - "type": "string", - "description": "Value for fallback Text" - } - } - }, - "SpeechResponse": { - "title": "SpeechResponse", - "type": "object", - "properties": { - "speechid": { - "$ref": "#/components/schemas/SpeechId" - }, - "TTS_Status": { - "$ref": "#/components/schemas/TTSStatus" - }, - "success": { - "type": "boolean" - } - }, - "required": [ - "speechid", - "TTS_Status", - "success" - ] - }, - "SpeechId": { - "type": "integer" - }, - "SpeechIdEvent": { - "type": "object", - "properties": { - "speechid": { - "$ref": "#/components/schemas/SpeechId" - } - }, - "required": [ - "speechid" - ] - }, - "TTSStatus": { - "title": "TTSStatus", - "type": "integer", - "minimum": 0, - "maximum": 3 - }, - "SpeechState": { - "title": "SpeechState", - "type": "integer", - "enum": [ - 0, - 1, - 2, - 3 - ], - "description": "0 = SPEECH_PENDING, 1 = SPEECH_IN_PROGRESS, 2 = SPEECH_PAUSED, 3 = SPEECH_NOT_FOUND" - }, - "SpeechStateResponse": { - "title": "SpeechStateResponse", - "type": "object", - "properties": { - "speechstate": { - "$ref": "#/components/schemas/SpeechState" - }, - "TTS_Status": { - "$ref": "#/components/schemas/TTSStatus" - }, - "success": { - "type": "boolean" - } - }, - "required": [ - "speechstate", - "TTS_Status", - "success" - ] - }, - "TTSStatusResponse": { - "title": "TTSStatusResponse", - "type": "object", - "properties": { - "TTS_Status": { - "$ref": "#/components/schemas/TTSStatus" - }, - "success": { - "type": "boolean" - } - }, - "required": [ - "TTS_Status", - "success" - ] - }, - "TTSState": { - "title": "TTSState", - "type": "object", - "properties": { - "state": { - "type": "boolean" - } - }, - "required": [ - "state" - ] - }, - "TTSVoice": { - "title": "TTSVoice", - "type": "object", - "properties": { - "voice": { - "type": "string" - } - }, - "required": [ - "voice" - ] - } - } - }, - "x-schemas": { - "Accessibility": { - "uri": "https://meta.comcast.com/firebolt/accessibility", - "ClosedCaptionsSettings": { - "title": "ClosedCaptionsSettings", - "type": "object", - "required": [ - "enabled" - ], - "properties": { - "enabled": { - "type": "boolean", - "description": "Whether or not closed-captions should be enabled by default" - }, - "preferredLanguages": { - "type": "array", - "items": { - "$ref": "#/x-schemas/Localization/ISO639_2Language" - } - } - }, - "examples": [ - { - "enabled": true, - "styles": { - "fontFamily": "monospaced_serif", - "fontSize": 1, - "fontColor": "#ffffff", - "fontEdge": "none", - "fontEdgeColor": "#7F7F7F", - "fontOpacity": 100, - "backgroundColor": "#000000", - "backgroundOpacity": 100, - "textAlign": "center", - "textAlignVertical": "middle", - "windowColor": "white", - "windowOpacity": 50 - }, - "preferredLanguages": [ - "eng", - "spa" - ] - } - ] - }, - "VoiceGuidanceSettings": { - "title": "VoiceGuidanceSettings", - "type": "object", - "required": [ - "enabled", - "navigationHints", - "rate" - ], - "properties": { - "enabled": { - "type": "boolean", - "description": "Whether or not voice guidance should be enabled by default" - }, - "rate": { - "$ref": "#/x-schemas/Accessibility/SpeechRate", - "description": "The rate at which voice guidance speech will be read back to the user" - }, - "navigationHints": { - "type": "boolean", - "description": "Whether or not voice guidance should include additional navigation hints" - } - }, - "examples": [ - { - "enabled": true, - "navigationHints": true, - "rate": 0.8 - } - ] - }, - "SpeechRate": { - "title": "SpeechRate", - "type": "number", - "minimum": 0.1, - "maximum": 10 - } - }, - "Localization": { - "uri": "https://meta.comcast.com/firebolt/localization", - "ISO639_2Language": { - "type": "string", - "pattern": "^[a-z]{3}$" - }, - "CountryCode": { - "type": "string", - "pattern": "^[A-Z]{2}$" - }, - "Locale": { - "type": "string", - "pattern": "^[a-zA-Z]+([a-zA-Z0-9\\-]*)$" - } - }, - "Policies": { - "uri": "https://meta.comcast.com/firebolt/policies", - "AgePolicy": { - "title": "AgePolicy", - "description": "The policy that describes various age groups to which content is directed. See distributor documentation for further details.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "app:adult", - "app:child", - "app:teen" - ] - } - ] - } - }, - "Types": { - "uri": "https://meta.comcast.com/firebolt/types", - "FlatMap": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "boolean" - } - ] - } - } - } - } -} + "openrpc": "1.2.4", + "info": { + "title": "Firebolt JSON-RPC API", + "version": "", + "x-module-descriptions": { + "Accessibility": "The `Accessibility` module provides access to the user/device settings for closed captioning and voice guidance.\n\nApps **SHOULD** attempt o respect these settings, rather than manage and persist seprate settings, which would be different per-app.", + "Advertising": "A module for platform provided advertising settings and functionality.", + "Device": "A module for querying about the device and it's capabilities.", + "Discovery": "Your App likely wants to integrate with the Platform's discovery capabilities. For example to add a \"Watch Next\" tile that links to your app from the platform's home screen.\n\nGetting access to this information requires to connect to lower level APIs made available by the platform. Since implementations differ between operators and platforms, the Firebolt SDK offers a Discovery module, that exposes a generic, agnostic interface to the developer.\n\nUnder the hood, an underlaying transport layer will then take care of calling the right APIs for the actual platform implementation that your App is running on.\n\nThe Discovery plugin is used to _send_ information to the Platform.\n\n### Localization\nApps should provide all user-facing strings in the device's language, as specified by the Firebolt `Localization.language` property.\n\nApps should provide prices in the same currency presented in the app. If multiple currencies are supported in the app, the app should provide prices in the user's current default currency.", + "Display": "A module for querying about the display", + "Lifecycle2": "Methods and events for responding to Lifecycle changes in your app.", + "Localization": "Methods for accessing location and language preferences.", + "Metrics": "Methods for sending metrics", + "Network": "Methods for accessing network information.", + "Presentation": "Methods for accessing Presentation preferences.", + "Stats": "Provides methods to retrieve application-level system information.", + "TextToSpeech": "A module for controlling and accessing Text To Speech over Firebolt." + } + }, + "methods": [ + { + "name": "rpc.discover", + "summary": "The OpenRPC schema for this JSON-RPC API", + "params": [], + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:rpc:discover" + ] + } + ], + "result": { + "name": "OpenRPC Schema", + "schema": { + "type": "object" + } + }, + "examples": [ + { + "name": "Default", + "params": [], + "result": { + "name": "schema", + "value": {} + } + } + ] + }, + { + "name": "Accessibility.audioDescription", + "summary": "Returns the audio description setting of the device", + "params": [], + "tags": [ + { + "name": "property:readonly" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:audio-descriptions" + ] + } + ], + "result": { + "name": "setting", + "summary": "the audio description setting", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Getting the audio description setting", + "params": [], + "result": { + "name": "Default Result", + "value": true + } + } + ] + }, + { + "name": "Accessibility.closedCaptionsSettings", + "summary": "Returns captions settings: enabled, and a list of zero or more languages in order of decreasing preference", + "params": [], + "tags": [ + { + "name": "property:readonly", + "x-notifier-params-flattening": "true" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closed-captions" + ] + } + ], + "result": { + "name": "closedCaptionsSettings", + "summary": "the closed captions settings", + "schema": { + "$ref": "#/x-schemas/Accessibility/ClosedCaptionsSettings" + } + }, + "examples": [ + { + "name": "Getting the closed captions settings", + "params": [], + "result": { + "name": "settings", + "value": { + "enabled": true, + "preferredLanguages": [ + "eng", + "spa" + ] + } + } + } + ] + }, + { + "name": "Accessibility.highContrastUI", + "summary": "Returns the high contrast UI device setting", + "params": [], + "tags": [ + { + "name": "property:readonly" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:high-contrast-ui" + ] + } + ], + "result": { + "name": "highContrastUI", + "summary": "Whether high-contrast UI mode is enabled", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "High-contrast UI mode is enabled", + "params": [], + "result": { + "name": "Default Result", + "value": true + } + } + ] + }, + { + "name": "Accessibility.voiceGuidanceSettings", + "summary": "Returns voice guidance settings: enabled, rate, and verbosity", + "params": [], + "tags": [ + { + "name": "property:readonly", + "x-notifier-params-flattening": "true" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:voice-guidance" + ] + } + ], + "result": { + "name": "settings", + "summary": "the voice guidance settings", + "schema": { + "$ref": "#/x-schemas/Accessibility/VoiceGuidanceSettings" + } + }, + "examples": [ + { + "name": "Getting the voice guidance settings", + "params": [], + "result": { + "name": "Default Result", + "value": { + "enabled": true, + "rate": 0.8, + "navigationHints": true + } + } + } + ] + }, + { + "name": "Advertising.advertisingId", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:advertising:identifier" + ] + } + ], + "summary": "Returns the IFA.", + "params": [], + "result": { + "name": "advertisingId", + "summary": "The advertising ID", + "schema": { + "$ref": "#/components/schemas/AdvertisingIdResult" + } + }, + "examples": [ + { + "name": "Getting the advertising ID", + "params": [], + "result": { + "name": "Default Result", + "value": { + "ifa": "bd87dd10-8d1d-4b93-b1a6-a8e5d410e400", + "ifa_type": "sspid", + "lmt": "0" + } + } + }, + { + "name": "Getting the advertising ID with scope browse", + "params": [], + "result": { + "name": "Default Result", + "value": { + "ifa": "bd87dd10-8d1d-4b93-b1a6-a8e5d410e400", + "ifa_type": "sspid", + "lmt": "1" + } + } + }, + { + "name": "Getting the advertising ID with scope content", + "params": [], + "result": { + "name": "Default Result", + "value": { + "ifa": "bd87dd10-8d1d-4b93-b1a6-a8e5d410e400", + "ifa_type": "idfa", + "lmt": "0" + } + } + } + ] + }, + { + "name": "Device.uid", + "summary": "Returns a persistent unique UUID for the current app and device. The UUID is reset when the app or device is reset", + "params": [], + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:uid" + ] + } + ], + "result": { + "name": "uniqueId", + "summary": "A unique UUID for this app-device pair.", + "schema": { + "type": "string" + } + }, + "examples": [ + { + "name": "Getting the unique UUID", + "params": [], + "result": { + "name": "Default Result", + "value": "ee6723b8-7ab3-462c-8d93-dbf61227998e" + } + } + ] + }, + { + "name": "Device.deviceClass", + "summary": "Returns the class of the device", + "params": [], + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:device-class" + ] + } + ], + "result": { + "name": "deviceClass", + "summary": "The device class", + "schema": { + "$ref": "#/components/schemas/DeviceClass" + } + }, + "examples": [ + { + "name": "Getting the device class", + "params": [], + "result": { + "name": "Default Result", + "value": "ott" + } + } + ] + }, + { + "name": "Device.uptime", + "summary": "Returns the number of seconds since most recent device boot, including any time spent during deep sleep", + "params": [], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:info" + ] + } + ], + "result": { + "name": "uptime", + "summary": "The device uptime", + "schema": { + "type": "number" + } + }, + "examples": [ + { + "name": "Getting the device uptime", + "params": [], + "result": { + "name": "Default Result", + "value": 123456 + } + } + ] + }, + { + "name": "Device.timeInActiveState", + "summary": "Returns the number of seconds since the device transitioned to the ON power state", + "params": [], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:info" + ] + } + ], + "result": { + "name": "timeInActiveState", + "summary": "The device time in active state", + "schema": { + "type": "number" + } + }, + "examples": [ + { + "name": "Getting the number of seconds since the device transitioned to the ON power state", + "params": [], + "result": { + "name": "Default Result", + "value": 654321 + } + } + ] + }, + { + "name": "Device.chipsetId", + "summary": "Returns chipset ID as a printable string, e.g. BCM72180", + "params": [], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:info" + ] + } + ], + "result": { + "name": "chipsetId", + "summary": "The device chipset ID", + "schema": { + "type": "string" + } + }, + "examples": [ + { + "name": "Getting the device chipset ID", + "params": [], + "result": { + "name": "Default Result", + "value": "BCM72180" + } + } + ] + }, + { + "name": "Device.hdr", + "summary": "Returns the HDR standards that are supported by the attached TV or the integral display", + "params": [], + "tags": [ + { + "name": "property:readonly" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:info" + ] + } + ], + "result": { + "name": "negotiatedHdrFormats", + "summary": "the negotiated HDR formats", + "schema": { + "$ref": "#/components/schemas/HDRFormatMap" + } + }, + "examples": [ + { + "name": "Getting the negotiated HDR formats", + "params": [], + "result": { + "name": "Default Result", + "value": { + "hdr10": true, + "hdr10Plus": true, + "dolbyVision": true, + "hlg": true + } + } + } + ] + }, + { + "name": "Discovery.watched", + "summary": "Notify the platform that content was partially or completely watched", + "tags": [ + { + "name": "polymorphic-reducer" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:discovery:watched" + ] + } + ], + "params": [ + { + "name": "entityId", + "required": true, + "schema": { + "type": "string" + }, + "summary": "The entity Id of the watched content." + }, + { + "name": "progress", + "summary": "How much of the content has been watched (percentage as (0-0.999) for VOD, number of seconds for live)", + "schema": { + "type": "number", + "minimum": 0 + } + }, + { + "name": "completed", + "summary": "Whether or not this viewing is considered \"complete,\" per the app's definition thereof", + "schema": { + "type": "boolean" + } + }, + { + "name": "watchedOn", + "summary": "Date/Time the content was watched, ISO 8601 Date/Time", + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "name": "agePolicy", + "description": "The age policy associated with the watch event. The age policy describes the age groups to which content may be directed.", + "schema": { + "$ref": "#/x-schemas/Policies/AgePolicy" + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Notify the platform of watched content", + "params": [ + { + "name": "entityId", + "value": "partner.com/entity/123" + }, + { + "name": "progress", + "value": 0.95 + }, + { + "name": "completed", + "value": true + }, + { + "name": "watchedOn", + "value": "2021-04-23T18:25:43.511Z" + } + ], + "result": { + "name": "result", + "value": null + } + }, + { + "name": "Notify the platform that child-directed content was watched", + "params": [ + { + "name": "entityId", + "value": "partner.com/entity/123" + }, + { + "name": "progress", + "value": 0.95 + }, + { + "name": "completed", + "value": true + }, + { + "name": "watchedOn", + "value": "2021-04-23T18:25:43.511Z" + }, + { + "name": "agePolicy", + "value": "app:child" + } + ], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "Display.edid", + "summary": "Returns the EDID (and extensions) of the connected or integral display, as a Base64 encoded string", + "params": [], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:display:info" + ] + } + ], + "result": { + "name": "Base64 EDID", + "summary": "The EDID (and extensions) of the connected or integral display, as a Base64 encoded string", + "schema": { + "type": "string" + } + }, + "examples": [ + { + "name": "Getting the display EDID", + "params": [], + "result": { + "name": "Default Result", + "value": "ZWU2NzIzYjgtN2FiMy00NjJjLThkOTMtZGJmNjEyMjc5OThl" + } + } + ] + }, + { + "name": "Display.size", + "summary": "Returns the physical dimensions of the connected or integral display, in centimeters. Returns 0, 0 on a OTT/STB device when a display is not connected over HDMI", + "params": [], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:display:info" + ] + } + ], + "result": { + "name": "size", + "summary": "The display size in centimeters", + "schema": { + "type": "object", + "properties": { + "width": { + "type": "integer", + "description": "The width of the display in centimeters" + }, + "height": { + "type": "integer", + "description": "The height of the display in centimeters" + } + } + } + }, + "examples": [ + { + "name": "Getting the display size", + "params": [], + "result": { + "name": "Default Result", + "value": { + "width": 48, + "height": 27 + } + } + } + ] + }, + { + "name": "Display.maxResolution", + "summary": "Returns the physical/native resolution of the connected or integral display, in pixels. Returns 0, 0 on a OTT/STB device when a display is not connected over HDMI", + "params": [], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:display:info" + ] + } + ], + "result": { + "name": "maxResolution", + "summary": "The display resolution", + "schema": { + "type": "object", + "properties": { + "width": { + "type": "integer", + "description": "The width of the display in pixels" + }, + "height": { + "type": "integer", + "description": "The height of the display in pixels" + } + } + } + }, + "examples": [ + { + "name": "Getting the display size", + "params": [], + "result": { + "name": "Default Result", + "value": { + "width": 1920, + "height": 1080 + } + } + } + ] + }, + { + "name": "Lifecycle2.close", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:cpp-client-only" + ] + } + ], + "summary": "Request the platform to deactivate the app, and possibly take further action.", + "params": [ + { + "name": "type", + "summary": "The type of the close app is requesting", + "required": true, + "schema": { + "$ref": "#/components/schemas/CloseType" + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Close the app when the user presses back on the app home screen", + "params": [ + { + "name": "type", + "value": "unload" + } + ], + "result": { + "name": "Default Result", + "value": null + } + }, + { + "name": "Close the app when the user selects an exit menu item", + "params": [ + { + "name": "type", + "value": "deactivate" + } + ], + "result": { + "name": "Default Result", + "value": null + } + } + ] + }, + { + "name": "Lifecycle2.state", + "summary": "Get the current lifecycle state of the app.", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:cpp-client-only" + ] + } + ], + "params": [], + "result": { + "name": "state", + "summary": "The current lifecycle state of the app.", + "schema": { + "$ref": "#/components/schemas/LifecycleState" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "Default Result", + "value": "active" + } + } + ] + }, + { + "name": "Localization.country", + "tags": [ + { + "name": "property:readonly" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:localization:country-code" + ] + } + ], + "summary": "Returns the ISO 3166-1 alpha-2 code for the country device is located in.", + "params": [], + "result": { + "name": "code", + "summary": "The device country code.", + "schema": { + "$ref": "#/x-schemas/Localization/CountryCode" + } + }, + "examples": [ + { + "name": "Default example", + "params": [], + "result": { + "name": "Default Result", + "value": "US" + } + }, + { + "name": "Another example", + "params": [], + "result": { + "name": "Default Result", + "value": "GB" + } + } + ] + }, + { + "name": "Localization.preferredAudioLanguages", + "summary": "Returns a list of ISO 639-2/B codes for the preferred audio languages on this device.", + "params": [], + "tags": [ + { + "name": "property:readonly" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:localization:preferred-audio-languages" + ] + } + ], + "result": { + "name": "languages", + "summary": "The preferred audio languages.", + "schema": { + "type": "array", + "items": { + "$ref": "#/x-schemas/Localization/ISO639_2Language" + } + } + }, + "examples": [ + { + "name": "Default example", + "params": [], + "result": { + "name": "Default Result", + "value": [ + "spa", + "eng" + ] + } + } + ] + }, + { + "name": "Localization.presentationLanguage", + "tags": [ + { + "name": "property:readonly" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:localization:locale" + ] + } + ], + "summary": "Get the *full* BCP 47 code, including script, region, variant, etc., for the preferred locale", + "params": [], + "result": { + "name": "locale", + "summary": "The device locale.", + "schema": { + "$ref": "#/x-schemas/Localization/Locale" + } + }, + "examples": [ + { + "name": "Default example", + "params": [], + "result": { + "name": "Default Result", + "value": "en-US" + } + } + ] + }, + { + "name": "Metrics.ready", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:general" + ] + } + ], + "summary": "Inform the platform that your app is minimally usable. This method is called automatically by `Lifecycle.ready()`", + "params": [], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Send ready metric", + "params": [], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "Metrics.signIn", + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:general" + ] + } + ], + "summary": "Log a sign in event, called by Discovery.signIn().", + "params": [], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Send signIn metric", + "params": [], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "Metrics.signOut", + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:general" + ] + } + ], + "summary": "Log a sign out event, called by Discovery.signOut().", + "params": [], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Send signOut metric", + "params": [], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "Metrics.startContent", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:general" + ] + } + ], + "summary": "Inform the platform that your user has started content.", + "params": [ + { + "name": "entityId", + "summary": "Optional entity ID of the content.", + "schema": { + "type": "string" + }, + "required": false + }, + { + "name": "agePolicy", + "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", + "schema": { + "$ref": "#/x-schemas/Policies/AgePolicy" + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Send startContent metric", + "params": [], + "result": { + "name": "result", + "value": null + } + }, + { + "name": "Send startContent metric w/ entity", + "params": [ + { + "name": "entityId", + "value": "abc" + } + ], + "result": { + "name": "result", + "value": null + } + }, + { + "name": "Send startContent metric and notify the platform that the content is child-directed", + "params": [ + { + "name": "entityId", + "value": "abc" + }, + { + "name": "agePolicy", + "value": "app:child" + } + ], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "Metrics.stopContent", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:general" + ] + } + ], + "summary": "Inform the platform that your user has stopped content.", + "params": [ + { + "name": "entityId", + "summary": "Optional entity ID of the content.", + "schema": { + "type": "string" + }, + "required": false + }, + { + "name": "agePolicy", + "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", + "schema": { + "$ref": "#/x-schemas/Policies/AgePolicy" + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Send stopContent metric", + "params": [], + "result": { + "name": "result", + "value": null + } + }, + { + "name": "Send stopContent metric w/ entity", + "params": [ + { + "name": "entityId", + "value": "abc" + } + ], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "Metrics.page", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:general" + ] + } + ], + "summary": "Inform the platform that your user has navigated to a page or view.", + "params": [ + { + "name": "pageId", + "summary": "Page ID of the content.", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "agePolicy", + "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", + "schema": { + "$ref": "#/x-schemas/Policies/AgePolicy" + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Send page metric", + "params": [ + { + "name": "pageId", + "value": "xyz" + } + ], + "result": { + "name": "result", + "value": null + } + }, + { + "name": "Send page metric w/ pageId", + "params": [ + { + "name": "pageId", + "value": "home" + } + ], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "Metrics.error", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:general" + ] + } + ], + "summary": "Inform the platform of an error that has occurred in your app.", + "params": [ + { + "name": "type", + "summary": "The type of error", + "schema": { + "$ref": "#/components/schemas/ErrorType" + }, + "required": true + }, + { + "name": "code", + "summary": "an app-specific error code", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "description", + "summary": "A short description of the error", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "visible", + "summary": "Whether or not this error was visible to the user.", + "schema": { + "type": "boolean" + }, + "required": true + }, + { + "name": "parameters", + "summary": "Optional additional parameters to be logged with the error", + "schema": { + "$ref": "#/x-schemas/Types/FlatMap" + }, + "required": false + }, + { + "name": "agePolicy", + "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", + "schema": { + "$ref": "#/x-schemas/Policies/AgePolicy" + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Send error metric", + "params": [ + { + "name": "type", + "value": "media" + }, + { + "name": "code", + "value": "MEDIA-STALLED" + }, + { + "name": "description", + "value": "playback stalled" + }, + { + "name": "visible", + "value": true + } + ], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "Metrics.mediaLoadStart", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:media" + ] + } + ], + "summary": "Called when setting the URL of a media asset to play, in order to infer load time.", + "params": [ + { + "name": "entityId", + "summary": "The entityId of the media.", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "agePolicy", + "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", + "schema": { + "$ref": "#/x-schemas/Policies/AgePolicy" + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Send loadstart metric.", + "params": [ + { + "name": "entityId", + "value": "345" + } + ], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "Metrics.mediaPlay", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:media" + ] + } + ], + "summary": "Called when media playback should start due to autoplay, user-initiated play, or unpausing.", + "params": [ + { + "name": "entityId", + "summary": "The entityId of the media.", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "agePolicy", + "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", + "schema": { + "$ref": "#/x-schemas/Policies/AgePolicy" + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Send play metric.", + "params": [ + { + "name": "entityId", + "value": "345" + } + ], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "Metrics.mediaPlaying", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:media" + ] + } + ], + "summary": "Called when media playback actually starts due to autoplay, user-initiated play, unpausing, or recovering from a buffering interruption.", + "params": [ + { + "name": "entityId", + "summary": "The entityId of the media.", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "agePolicy", + "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", + "schema": { + "$ref": "#/x-schemas/Policies/AgePolicy" + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Send playing metric.", + "params": [ + { + "name": "entityId", + "value": "345" + } + ], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "Metrics.mediaPause", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:media" + ] + } + ], + "summary": "Called when media playback will pause due to an intentional pause operation.", + "params": [ + { + "name": "entityId", + "summary": "The entityId of the media.", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "agePolicy", + "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", + "schema": { + "$ref": "#/x-schemas/Policies/AgePolicy" + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Send pause metric.", + "params": [ + { + "name": "entityId", + "value": "345" + } + ], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "Metrics.mediaWaiting", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:media" + ] + } + ], + "summary": "Called when media playback will halt due to a network, buffer, or other unintentional constraint.", + "params": [ + { + "name": "entityId", + "summary": "The entityId of the media.", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "agePolicy", + "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", + "schema": { + "$ref": "#/x-schemas/Policies/AgePolicy" + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Send waiting metric.", + "params": [ + { + "name": "entityId", + "value": "345" + } + ], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "Metrics.mediaSeeking", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:media" + ] + } + ], + "summary": "Called when a seek is initiated during media playback.", + "params": [ + { + "name": "entityId", + "summary": "The entityId of the media.", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "target", + "summary": "Target destination of the seek, as a decimal percentage (0-0.999) for content with a known duration, or an integer number of seconds (0-86400) for content with an unknown duration.", + "schema": { + "$ref": "#/components/schemas/MediaPosition" + }, + "required": true + }, + { + "name": "agePolicy", + "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", + "schema": { + "$ref": "#/x-schemas/Policies/AgePolicy" + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Send seeking metric.", + "params": [ + { + "name": "entityId", + "value": "345" + }, + { + "name": "target", + "value": 0.5 + } + ], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "Metrics.mediaSeeked", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:media" + ] + } + ], + "summary": "Called when a seek is completed during media playback.", + "params": [ + { + "name": "entityId", + "summary": "The entityId of the media.", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "position", + "summary": "Resulting position of the seek operation, as a decimal percentage (0-0.999) for content with a known duration, or an integer number of seconds (0-86400) for content with an unknown duration.", + "schema": { + "$ref": "#/components/schemas/MediaPosition" + }, + "required": true + }, + { + "name": "agePolicy", + "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", + "schema": { + "$ref": "#/x-schemas/Policies/AgePolicy" + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Send seeked metric.", + "params": [ + { + "name": "entityId", + "value": "345" + }, + { + "name": "position", + "value": 0.51 + } + ], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "Metrics.mediaRateChanged", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:media" + ] + } + ], + "summary": "Called when the playback rate of media is changed.", + "params": [ + { + "name": "entityId", + "summary": "The entityId of the media.", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "rate", + "summary": "The new playback rate.", + "schema": { + "type": "number" + }, + "required": true + }, + { + "name": "agePolicy", + "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", + "schema": { + "$ref": "#/x-schemas/Policies/AgePolicy" + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Send ratechange metric.", + "params": [ + { + "name": "entityId", + "value": "345" + }, + { + "name": "rate", + "value": 2 + } + ], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "Metrics.mediaRenditionChanged", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:media" + ] + } + ], + "summary": "Called when the playback rendition (e.g. bitrate, dimensions, profile, etc) is changed.", + "params": [ + { + "name": "entityId", + "summary": "The entityId of the media.", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "bitrate", + "summary": "The new bitrate in kbps.", + "schema": { + "type": "number" + }, + "required": true + }, + { + "name": "width", + "summary": "The new resolution width.", + "schema": { + "type": "number" + }, + "required": true + }, + { + "name": "height", + "summary": "The new resolution height.", + "schema": { + "type": "number" + }, + "required": true + }, + { + "name": "profile", + "summary": "A description of the new profile, e.g. 'HDR' etc.", + "schema": { + "type": "string" + }, + "required": false + }, + { + "name": "agePolicy", + "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", + "schema": { + "$ref": "#/x-schemas/Policies/AgePolicy" + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Send renditionchange metric.", + "params": [ + { + "name": "entityId", + "value": "345" + }, + { + "name": "bitrate", + "value": 5000 + }, + { + "name": "width", + "value": 1920 + }, + { + "name": "height", + "value": 1080 + }, + { + "name": "profile", + "value": "HDR+" + } + ], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "Metrics.mediaEnded", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:media" + ] + } + ], + "summary": "Called when playback has stopped because the end of the media was reached.", + "params": [ + { + "name": "entityId", + "summary": "The entityId of the media.", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "agePolicy", + "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", + "schema": { + "$ref": "#/x-schemas/Policies/AgePolicy" + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Send ended metric.", + "params": [ + { + "name": "entityId", + "value": "345" + } + ], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "Metrics.event", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:distributor" + ] + } + ], + "summary": "Inform the platform of 1st party distributor metrics. 'data' parameter is a JSON document", + "params": [ + { + "name": "schema", + "summary": "The schema URI of the metric type", + "schema": { + "type": "string", + "format": "uri" + }, + "required": true + }, + { + "name": "data", + "summary": "A JSON payload", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "agePolicy", + "summary": "The age policy to associate with the metrics event. The age policy describes the age group to which content is directed.", + "schema": { + "$ref": "#/x-schemas/Policies/AgePolicy" + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Send foo event", + "params": [ + { + "name": "schema", + "value": "http://meta.rdkcentral.com/some/schema" + }, + { + "name": "data", + "value": "foo" + } + ], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "Metrics.appInfo", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:general" + ] + } + ], + "summary": "Inform the platform about an app's build info.", + "params": [ + { + "name": "build", + "summary": "The build / version of this app.", + "schema": { + "type": "string" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Send appInfo metric", + "params": [ + { + "name": "build", + "value": "1.2.2" + } + ], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "Network.connected", + "summary": "Returns whether the device currently has a usable network connection.", + "tags": [ + { + "name": "property:readonly" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:network:connected" + ] + } + ], + "params": [], + "result": { + "name": "success", + "summary": "Whether the device currently has a usable network connection.", + "schema": { + "$ref": "#/components/schemas/Connected" + } + }, + "examples": [ + { + "name": "Connected example", + "params": [], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Presentation.focused", + "tags": [ + { + "name": "property:readonly" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:cpp-client-only" + ] + } + ], + "summary": "Whether the app is in focus, i.e. receiving key presses. Provided for those apps/runtimes that cannot use Wayland", + "params": [], + "result": { + "name": "focused", + "summary": "Whether the app is in focus.", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Default example", + "params": [], + "result": { + "name": "Default Result", + "value": true + } + } + ] + }, + { + "name": "Stats.memoryUsage", + "summary": "Returns information about container memory usage, in units of 1024 bytes.", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:cpp-client-only" + ] + } + ], + "params": [], + "result": { + "name": "result", + "schema": { + "$ref": "#/components/schemas/MemoryUsage" + } + }, + "examples": [ + { + "name": "Default example", + "params": [], + "result": { + "name": "value", + "description": "The memory usage information", + "value": { + "userMemoryUsedKiB": 123456, + "userMemoryLimitKiB": 789012, + "gpuMemoryUsedKiB": 345678, + "gpuMemoryLimitKiB": 901234 + } + } + } + ] + }, + { + "name": "TextToSpeech.speak", + "summary": "Speak the utterance immediately. Any ongoing speech is interrupted.", + "description": "Text argument is either plain text or a well-formed SSML document TTS_status, not success attribute, to be used by caller to indicate success of call 0 OK, 1 Fail, 2 not enabled, 3 invalid configuration Raises onSpeechinterrupted if speaking is interrupted", + "params": [ + { + "name": "text", + "summary": "String to be converted to Audio for speech", + "schema": { + "type": "string" + }, + "required": true + } + ], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:text-to-speech:general" + ] + } + ], + "result": { + "name": "speakResult", + "summary": "Result for Speak", + "schema": { + "$ref": "#/components/schemas/SpeechResponse" + } + }, + "examples": [ + { + "name": "Getting the result of speak", + "params": [ + { + "name": "text", + "value": "I am a text waiting for speech." + } + ], + "result": { + "name": "result", + "value": { + "speechid": 1, + "TTS_Status": 0, + "success": true + } + } + } + ] + }, + { + "name": "TextToSpeech.pause", + "summary": "Pauses the speech for given speech id", + "description": "Pauses the utterance. Raises onSpeechpause if ongoing speech is paused. Does nothing if utterance is already paused", + "params": [ + { + "name": "speechid", + "summary": "Identifier for the speech call", + "schema": { + "$ref": "#/components/schemas/SpeechId" + }, + "required": true + } + ], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:text-to-speech:general" + ] + } + ], + "result": { + "name": "pauseResult", + "summary": "Result for Pause", + "schema": { + "$ref": "#/components/schemas/TTSStatusResponse" + } + }, + "examples": [ + { + "name": "Pause a given speech id", + "params": [ + { + "name": "speechid", + "value": 1 + } + ], + "result": { + "name": "TTS_Status", + "value": { + "TTS_Status": 0, + "success": true + } + } + } + ] + }, + { + "name": "TextToSpeech.resume", + "summary": "Resumes the speech for given speech id", + "description": "Continue the paused utterance. Raises onSpeechresume if paused speech is resumed. Does nothing if the utterance is not paused", + "params": [ + { + "name": "speechid", + "summary": "Identifier for the speech call", + "schema": { + "$ref": "#/components/schemas/SpeechId" + }, + "required": true + } + ], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:text-to-speech:general" + ] + } + ], + "result": { + "name": "resumeResult", + "summary": "Result for Resume", + "schema": { + "$ref": "#/components/schemas/TTSStatusResponse" + } + }, + "examples": [ + { + "name": "Resume a given speech id.", + "params": [ + { + "name": "speechid", + "value": 1 + } + ], + "result": { + "name": "TTS_Status", + "value": { + "TTS_Status": 0, + "success": true + } + } + } + ] + }, + { + "name": "TextToSpeech.cancel", + "summary": "Cancels the speech for given speech id", + "description": "Stop speaking if utterance is currently being spoken. Raises onSpeechinterrupted if speaking was interrupted.", + "params": [ + { + "name": "speechid", + "summary": "Identifier for the speech call", + "schema": { + "$ref": "#/components/schemas/SpeechId" + }, + "required": true + } + ], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:text-to-speech:general" + ] + } + ], + "result": { + "name": "cancelResult", + "summary": "Result for cancel", + "schema": { + "$ref": "#/components/schemas/TTSStatusResponse" + } + }, + "examples": [ + { + "name": "Cancel a given speech id.", + "params": [ + { + "name": "speechid", + "value": 1 + } + ], + "result": { + "name": "TTS_Status", + "value": { + "TTS_Status": 0, + "success": true + } + } + } + ] + }, + { + "name": "TextToSpeech.getspeechstate", + "summary": "Returns the state of the utterance.", + "params": [ + { + "name": "speechid", + "summary": "Identifier for the speech call", + "schema": { + "$ref": "#/components/schemas/SpeechId" + }, + "required": true + } + ], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:text-to-speech:general" + ] + } + ], + "result": { + "name": "speechStateResult", + "summary": "Result for speech state", + "schema": { + "$ref": "#/components/schemas/SpeechStateResponse" + } + }, + "examples": [ + { + "name": "State for a given speech id.", + "params": [ + { + "name": "speechid", + "value": 1 + } + ], + "result": { + "name": "speechstate", + "value": { + "speechstate": 1, + "TTS_Status": 0, + "success": true + } + } + } + ] + }, + { + "name": "TextToSpeech.listvoices", + "summary": "Returns the list of available voices as human-readable strings, e.g. 'ava', 'amelie', 'angelica'", + "params": [ + { + "name": "language", + "summary": "Language - string - BCP 47", + "schema": { + "$ref": "#/x-schemas/Localization/Locale" + }, + "required": true + } + ], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:text-to-speech:general" + ] + } + ], + "result": { + "name": "listvoices", + "summary": "The list of voices supported for the language", + "schema": { + "$ref": "#/components/schemas/ListVoicesResponse" + } + }, + "examples": [ + { + "name": "Getting the list of voices", + "params": [ + { + "name": "language", + "value": "en-US" + } + ], + "result": { + "name": "voiceList", + "value": { + "TTS_Status": 0, + "voices": [ + "carol", + "tom" + ] + } + } + } + ] + }, + { + "name": "Lifecycle2.onStateChanged", + "tags": [ + { + "name": "event", + "x-contextual-parameters": 0, + "x-notifier": "Lifecycle2.onStateChanged" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:cpp-client-only" + ] + } + ], + "summary": "Notification of lifecycle state change, raised after the platform has transitioned the app/runtime to the new lifecycle state", + "params": [ + { + "name": "listen", + "schema": { + "type": "boolean" + } + } + ], + "examples": [ + { + "name": "App is active after being initialized", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "result", + "value": null + } + }, + { + "name": "Single transition to paused state", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "result", + "value": null + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + } + }, + { + "name": "TextToSpeech.onWillspeak", + "summary": "Text to speech conversion is about to start.", + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "event", + "x-notifier": "TextToSpeech.onWillspeak" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:text-to-speech:general" + ] + } + ], + "params": [ + { + "name": "listen", + "schema": { + "type": "boolean" + } + } + ], + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "result", + "value": null + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + } + }, + { + "name": "TextToSpeech.onSpeechstart", + "summary": "Utterance is about to be spoken.", + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "event", + "x-notifier": "TextToSpeech.onSpeechstart" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:text-to-speech:general" + ] + } + ], + "params": [ + { + "name": "listen", + "schema": { + "type": "boolean" + } + } + ], + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "result", + "value": null + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + } + }, + { + "name": "TextToSpeech.onSpeechpause", + "summary": "Ongoing speech was paused.", + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "event", + "x-notifier": "TextToSpeech.onSpeechpause" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:text-to-speech:general" + ] + } + ], + "params": [ + { + "name": "listen", + "schema": { + "type": "boolean" + } + } + ], + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "result", + "value": null + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + } + }, + { + "name": "TextToSpeech.onSpeechresume", + "summary": "Paused speech was resumed.", + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "event", + "x-notifier": "TextToSpeech.onSpeechresume" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:text-to-speech:general" + ] + } + ], + "params": [ + { + "name": "listen", + "schema": { + "type": "boolean" + } + } + ], + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "result", + "value": null + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + } + }, + { + "name": "TextToSpeech.onSpeechcomplete", + "summary": "Speech completed successfully.", + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "event", + "x-notifier": "TextToSpeech.onSpeechcomplete" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:text-to-speech:general" + ] + } + ], + "params": [ + { + "name": "listen", + "schema": { + "type": "boolean" + } + } + ], + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "result", + "value": null + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + } + }, + { + "name": "TextToSpeech.onSpeechinterrupted", + "summary": "Speech was stopped, due to another call to speak or cancel.", + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "event", + "x-notifier": "TextToSpeech.onSpeechinterrupted" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:text-to-speech:general" + ] + } + ], + "params": [ + { + "name": "listen", + "schema": { + "type": "boolean" + } + } + ], + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "result", + "value": null + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + } + }, + { + "name": "TextToSpeech.onNetworkerror", + "summary": "Utterance failed due to network error.", + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "event", + "x-notifier": "TextToSpeech.onNetworkerror" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:text-to-speech:general" + ] + } + ], + "params": [ + { + "name": "listen", + "schema": { + "type": "boolean" + } + } + ], + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "result", + "value": null + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + } + }, + { + "name": "TextToSpeech.onPlaybackerror", + "summary": "Utterance failed during playback.", + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "event", + "x-notifier": "TextToSpeech.onPlaybackerror" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:text-to-speech:general" + ] + } + ], + "params": [ + { + "name": "listen", + "schema": { + "type": "boolean" + } + } + ], + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "result", + "value": null + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + } + }, + { + "name": "Accessibility.onAudioDescriptionChanged", + "summary": "Returns the audio description setting of the device", + "params": [ + { + "name": "listen", + "schema": { + "type": "boolean" + } + } + ], + "tags": [ + { + "name": "event", + "x-notifier": "Accessibility.onAudioDescriptionChanged", + "x-subscriber-for": "Accessibility.audioDescription" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:audio-descriptions" + ] + } + ], + "examples": [ + { + "name": "Getting the audio description setting", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "result", + "value": null + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + } + }, + { + "name": "Accessibility.onClosedCaptionsSettingsChanged", + "summary": "Returns captions settings: enabled, and a list of zero or more languages in order of decreasing preference", + "params": [ + { + "name": "listen", + "schema": { + "type": "boolean" + } + } + ], + "tags": [ + { + "name": "event", + "x-notifier-params-flattening": "true", + "x-notifier": "Accessibility.onClosedCaptionsSettingsChanged", + "x-subscriber-for": "Accessibility.closedCaptionsSettings" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closed-captions" + ] + } + ], + "examples": [ + { + "name": "Getting the closed captions settings", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "result", + "value": null + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + } + }, + { + "name": "Accessibility.onHighContrastUIChanged", + "summary": "Returns the high contrast UI device setting", + "params": [ + { + "name": "listen", + "schema": { + "type": "boolean" + } + } + ], + "tags": [ + { + "name": "event", + "x-notifier": "Accessibility.onHighContrastUIChanged", + "x-subscriber-for": "Accessibility.highContrastUI" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:high-contrast-ui" + ] + } + ], + "examples": [ + { + "name": "High-contrast UI mode is enabled", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "result", + "value": null + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + } + }, + { + "name": "Accessibility.onVoiceGuidanceSettingsChanged", + "summary": "Returns voice guidance settings: enabled, rate, and verbosity", + "params": [ + { + "name": "listen", + "schema": { + "type": "boolean" + } + } + ], + "tags": [ + { + "name": "event", + "x-notifier-params-flattening": "true", + "x-notifier": "Accessibility.onVoiceGuidanceSettingsChanged", + "x-subscriber-for": "Accessibility.voiceGuidanceSettings" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:voice-guidance" + ] + } + ], + "examples": [ + { + "name": "Getting the voice guidance settings", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "result", + "value": null + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + } + }, + { + "name": "Device.onHdrChanged", + "summary": "Returns the HDR standards that are supported by the attached TV or the integral display", + "params": [ + { + "name": "listen", + "schema": { + "type": "boolean" + } + } + ], + "tags": [ + { + "name": "event", + "x-notifier": "Device.onHdrChanged", + "x-subscriber-for": "Device.hdr" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:info" + ] + } + ], + "examples": [ + { + "name": "Getting the negotiated HDR formats", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "result", + "value": null + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + } + }, + { + "name": "Localization.onCountryChanged", + "tags": [ + { + "name": "event", + "x-notifier": "Localization.onCountryChanged", + "x-subscriber-for": "Localization.country" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:localization:country-code" + ] + } + ], + "summary": "Returns the ISO 3166-1 alpha-2 code for the country device is located in.", + "params": [ + { + "name": "listen", + "schema": { + "type": "boolean" + } + } + ], + "examples": [ + { + "name": "Default example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "result", + "value": null + } + }, + { + "name": "Another example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "result", + "value": null + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + } + }, + { + "name": "Localization.onPreferredAudioLanguagesChanged", + "summary": "Returns a list of ISO 639-2/B codes for the preferred audio languages on this device.", + "params": [ + { + "name": "listen", + "schema": { + "type": "boolean" + } + } + ], + "tags": [ + { + "name": "event", + "x-notifier": "Localization.onPreferredAudioLanguagesChanged", + "x-subscriber-for": "Localization.preferredAudioLanguages" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:localization:preferred-audio-languages" + ] + } + ], + "examples": [ + { + "name": "Default example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "result", + "value": null + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + } + }, + { + "name": "Localization.onPresentationLanguageChanged", + "tags": [ + { + "name": "event", + "x-notifier": "Localization.onPresentationLanguageChanged", + "x-subscriber-for": "Localization.presentationLanguage" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:localization:locale" + ] + } + ], + "summary": "Get the *full* BCP 47 code, including script, region, variant, etc., for the preferred locale", + "params": [ + { + "name": "listen", + "schema": { + "type": "boolean" + } + } + ], + "examples": [ + { + "name": "Default example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "result", + "value": null + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + } + }, + { + "name": "Network.onConnectedChanged", + "summary": "Returns whether the device currently has a usable network connection.", + "tags": [ + { + "name": "event", + "x-notifier": "Network.onConnectedChanged", + "x-subscriber-for": "Network.connected" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:network:connected" + ] + } + ], + "params": [ + { + "name": "listen", + "schema": { + "type": "boolean" + } + } + ], + "examples": [ + { + "name": "Connected example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "result", + "value": null + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + } + }, + { + "name": "Presentation.onFocusedChanged", + "tags": [ + { + "name": "event", + "x-notifier": "Presentation.onFocusedChanged", + "x-subscriber-for": "Presentation.focused" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:cpp-client-only" + ] + } + ], + "summary": "Whether the app is in focus, i.e. receiving key presses. Provided for those apps/runtimes that cannot use Wayland", + "params": [ + { + "name": "listen", + "schema": { + "type": "boolean" + } + } + ], + "examples": [ + { + "name": "Default example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "result", + "value": null + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + } + } + ], + "components": { + "schemas": { + "AdvertisingIdResult": { + "title": "AdvertisingIdResult", + "type": "object", + "properties": { + "ifa": { + "type": "string", + "description": "UUID conforming to IAB standard" + }, + "ifa_type": { + "type": "string", + "description": "Source of the IFA as defined by IAB" + }, + "lmt": { + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Boolean that if set to 1, user has requested ad tracking and measurement is disabled" + } + }, + "required": [ + "ifa", + "ifa_type", + "lmt" + ] + }, + "HDRFormatMap": { + "title": "HDRFormatMap", + "type": "object", + "properties": { + "hdr10": { + "type": "boolean" + }, + "hdr10Plus": { + "type": "boolean" + }, + "dolbyVision": { + "type": "boolean" + }, + "hlg": { + "type": "boolean" + } + }, + "required": [ + "hdr10", + "hdr10Plus", + "dolbyVision", + "hlg" + ], + "description": "The type of HDR format" + }, + "DeviceClass": { + "title": "DeviceClass", + "type": "string", + "enum": [ + "ott", + "stb", + "tv" + ], + "description": "The type of device" + }, + "CloseType": { + "title": "CloseType", + "description": "The application close type", + "type": "string", + "enum": [ + "deactivate", + "unload", + "killReload", + "killReactivate" + ] + }, + "LifecycleState": { + "title": "LifecycleState", + "description": "The application Lifecycle state", + "type": "string", + "enum": [ + "initializing", + "active", + "paused", + "suspended", + "hibernated", + "terminating" + ] + }, + "StateChange": { + "title": "StateChange", + "type": "object", + "properties": { + "newState": { + "$ref": "#/components/schemas/LifecycleState" + }, + "oldState": { + "$ref": "#/components/schemas/LifecycleState" + } + } + }, + "MediaPosition": { + "title": "MediaPosition", + "description": "Represents a position inside playback content, as a decimal percentage (0-0.999) for content with a known duration, or an integer number of seconds (0-86400) for content with an unknown duration.", + "oneOf": [ + { + "const": 0 + }, + { + "type": "number", + "exclusiveMinimum": 0, + "exclusiveMaximum": 1 + }, + { + "type": "integer", + "minimum": 1, + "maximum": 86400 + } + ] + }, + "ErrorType": { + "title": "ErrorType", + "type": "string", + "enum": [ + "network", + "media", + "restriction", + "entitlement", + "other" + ] + }, + "EventObjectPrimitives": { + "title": "EventObjectPrimitives", + "anyOf": [ + { + "type": "string", + "maxLength": 256 + }, + { + "type": "number" + }, + { + "type": "integer" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + }, + "Connected": { + "type": "boolean", + "description": "Indicates whether the device currently has a usable network connection." + }, + "MemoryUsage": { + "title": "MemoryUsage", + "type": "object", + "description": "Describes current and maximum memory usage of the container.", + "properties": { + "userMemoryUsedKiB": { + "type": "integer", + "description": "User memory currently used in 1024 bytes." + }, + "userMemoryLimitKiB": { + "type": "integer", + "description": "Maximum user memory available in 1024 bytes." + }, + "gpuMemoryUsedKiB": { + "type": "integer", + "description": "GPU memory currently used in 1024 bytes." + }, + "gpuMemoryLimitKiB": { + "type": "integer", + "description": "Maximum GPU memory available in 1024 bytes." + } + }, + "required": [ + "userMemoryUsedKiB", + "userMemoryLimitKiB", + "gpuMemoryUsedKiB", + "gpuMemoryLimitKiB" + ] + }, + "TTSEnabled": { + "title": "TTSEnabled", + "type": "object", + "required": [ + "TTS_Status", + "isenabled" + ], + "properties": { + "TTS_Status": { + "$ref": "#/components/schemas/TTSStatus" + }, + "isenabled": { + "type": "boolean" + } + } + }, + "ListVoicesResponse": { + "title": "ListVoicesResponse", + "type": "object", + "required": [ + "TTS_Status", + "voices" + ], + "properties": { + "TTS_Status": { + "$ref": "#/components/schemas/TTSStatus" + }, + "voices": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "TTSConfiguration": { + "title": "TTSConfiguration", + "type": "object", + "required": [ + "success" + ], + "properties": { + "success": { + "type": "boolean" + }, + "ttsendpoint": { + "type": "string", + "description": "URL for Text to Speech API" + }, + "ttsendpointsecured": { + "type": "string", + "description": "Secure URL for Text to Speech API" + }, + "language": { + "type": "string", + "description": "Language used by Text to speech" + }, + "voice": { + "type": "string", + "description": "Voice used by Text to speech" + }, + "volume": { + "type": "integer", + "description": "Volume for Text to speech", + "minimum": 0, + "maximum": 100 + }, + "primvolduckpercent": { + "type": "integer", + "description": "Prime Volume duck percent for Text to speech", + "minimum": 0, + "maximum": 100 + }, + "rate": { + "type": "integer", + "description": "Speech rate for Text to speech", + "minimum": 0, + "maximum": 100 + }, + "speechrate": { + "description": "Rate for speech", + "$ref": "#/components/schemas/SpeechRate" + }, + "fallbacktext": { + "description": "Fallback text for TTS", + "$ref": "#/components/schemas/FallbackText" + } + }, + "examples": [ + {} + ] + }, + "SpeechRate": { + "title": "SpeechRate", + "type": "string", + "enum": [ + "slow", + "medium", + "fast", + "faster", + "fastest" + ] + }, + "FallbackText": { + "title": "FallbackText", + "type": "object", + "properties": { + "scenario": { + "type": "string", + "description": "Scenario for fallback Text" + }, + "value": { + "type": "string", + "description": "Value for fallback Text" + } + } + }, + "SpeechResponse": { + "title": "SpeechResponse", + "type": "object", + "properties": { + "speechid": { + "$ref": "#/components/schemas/SpeechId" + }, + "TTS_Status": { + "$ref": "#/components/schemas/TTSStatus" + }, + "success": { + "type": "boolean" + } + }, + "required": [ + "speechid", + "TTS_Status", + "success" + ] + }, + "SpeechId": { + "type": "integer" + }, + "SpeechIdEvent": { + "type": "object", + "properties": { + "speechid": { + "$ref": "#/components/schemas/SpeechId" + } + }, + "required": [ + "speechid" + ] + }, + "TTSStatus": { + "title": "TTSStatus", + "type": "integer", + "minimum": 0, + "maximum": 3 + }, + "SpeechState": { + "title": "SpeechState", + "type": "integer", + "enum": [ + 0, + 1, + 2, + 3 + ], + "description": "0 = SPEECH_PENDING, 1 = SPEECH_IN_PROGRESS, 2 = SPEECH_PAUSED, 3 = SPEECH_NOT_FOUND" + }, + "SpeechStateResponse": { + "title": "SpeechStateResponse", + "type": "object", + "properties": { + "speechstate": { + "$ref": "#/components/schemas/SpeechState" + }, + "TTS_Status": { + "$ref": "#/components/schemas/TTSStatus" + }, + "success": { + "type": "boolean" + } + }, + "required": [ + "speechstate", + "TTS_Status", + "success" + ] + }, + "TTSStatusResponse": { + "title": "TTSStatusResponse", + "type": "object", + "properties": { + "TTS_Status": { + "$ref": "#/components/schemas/TTSStatus" + }, + "success": { + "type": "boolean" + } + }, + "required": [ + "TTS_Status", + "success" + ] + }, + "TTSState": { + "title": "TTSState", + "type": "object", + "properties": { + "state": { + "type": "boolean" + } + }, + "required": [ + "state" + ] + }, + "TTSVoice": { + "title": "TTSVoice", + "type": "object", + "properties": { + "voice": { + "type": "string" + } + }, + "required": [ + "voice" + ] + } + } + }, + "x-schemas": { + "Accessibility": { + "uri": "https://meta.comcast.com/firebolt/accessibility", + "ClosedCaptionsSettings": { + "title": "ClosedCaptionsSettings", + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean", + "description": "Whether or not closed-captions should be enabled by default" + }, + "preferredLanguages": { + "type": "array", + "items": { + "$ref": "#/x-schemas/Localization/ISO639_2Language" + } + } + }, + "examples": [ + { + "enabled": true, + "styles": { + "fontFamily": "monospaced_serif", + "fontSize": 1, + "fontColor": "#ffffff", + "fontEdge": "none", + "fontEdgeColor": "#7F7F7F", + "fontOpacity": 100, + "backgroundColor": "#000000", + "backgroundOpacity": 100, + "textAlign": "center", + "textAlignVertical": "middle", + "windowColor": "white", + "windowOpacity": 50 + }, + "preferredLanguages": [ + "eng", + "spa" + ] + } + ] + }, + "VoiceGuidanceSettings": { + "title": "VoiceGuidanceSettings", + "type": "object", + "required": [ + "enabled", + "navigationHints", + "rate" + ], + "properties": { + "enabled": { + "type": "boolean", + "description": "Whether or not voice guidance should be enabled by default" + }, + "rate": { + "$ref": "#/x-schemas/Accessibility/SpeechRate", + "description": "The rate at which voice guidance speech will be read back to the user" + }, + "navigationHints": { + "type": "boolean", + "description": "Whether or not voice guidance should include additional navigation hints" + } + }, + "examples": [ + { + "enabled": true, + "navigationHints": true, + "rate": 0.8 + } + ] + }, + "SpeechRate": { + "title": "SpeechRate", + "type": "number", + "minimum": 0.1, + "maximum": 10 + } + }, + "Localization": { + "uri": "https://meta.comcast.com/firebolt/localization", + "ISO639_2Language": { + "type": "string", + "pattern": "^[a-z]{3}$" + }, + "CountryCode": { + "type": "string", + "pattern": "^[A-Z]{2}$" + }, + "Locale": { + "type": "string", + "pattern": "^[a-zA-Z]+([a-zA-Z0-9\\-]*)$" + } + }, + "Policies": { + "uri": "https://meta.comcast.com/firebolt/policies", + "AgePolicy": { + "title": "AgePolicy", + "description": "The policy that describes various age groups to which content is directed. See distributor documentation for further details.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "app:adult", + "app:child", + "app:teen" + ] + } + ] + } + }, + "Types": { + "uri": "https://meta.comcast.com/firebolt/types", + "FlatMap": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + } + } +} \ No newline at end of file