Skip to content

Commit

Permalink
Fix TV app
Browse files Browse the repository at this point in the history
  • Loading branch information
jadhavrohit924 committed Sep 24, 2024
1 parent e1fa3be commit 8245330
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ void AccountLoginManager::HandleGetSetupPin(CommandResponseHelper<GetSetupPINRes
std::string tempAccountIdentifierString(tempAccountIdentifier.data(), tempAccountIdentifier.size());

GetSetupPINResponse response;
ChipLogProgress(Zcl, "temporary account id: %s returning pin: %s", tempAccountIdentifierString.std::c_str(), mSetupPin);
ChipLogProgress(Zcl, "temporary account id: %s returning pin: %s", tempAccountIdentifierString.c_str(), mSetupPin);

response.setupPIN = CharSpan::fromCharString(mSetupPin);
helper.Success(response);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ using namespace chip::app::Clusters::ContentLauncher;
using ContentAppAttributeDelegate = chip::AppPlatform::ContentAppAttributeDelegate;

AppContentLauncherManager::AppContentLauncherManager(ContentAppAttributeDelegate * attributeDelegate,
std::list<std::string> acceptHeaderList, uint32_t supportedStreamingProtocols) :
std::list<std::string> acceptHeaderList,
uint32_t supportedStreamingProtocols) :
mAttributeDelegate(attributeDelegate)
{
mAcceptHeaderList = acceptHeaderList;
Expand Down Expand Up @@ -91,7 +92,7 @@ CHIP_ERROR AppContentLauncherManager::HandleGetAcceptHeaderList(AttributeValueEn
chip::app::ConcreteReadAttributePath aPath(mEndpointId, chip::app::Clusters::ContentLauncher::Id,
chip::app::Clusters::ContentLauncher::Attributes::AcceptHeader::Id);
std::string resStr = mAttributeDelegate->Read(aPath);
ChipLogProgress(Zcl, "AppContentLauncherManager::HandleGetAcceptHeaderList response %s", resStr.std::c_str());
ChipLogProgress(Zcl, "AppContentLauncherManager::HandleGetAcceptHeaderList response %s", resStr.c_str());

if (resStr.length() != 0)
{
Expand All @@ -101,7 +102,7 @@ CHIP_ERROR AppContentLauncherManager::HandleGetAcceptHeaderList(AttributeValueEn
{
std::string attrId = std::to_string(chip::app::Clusters::ContentLauncher::Attributes::AcceptHeader::Id);
ChipLogProgress(Zcl, "AppContentLauncherManager::HandleGetAcceptHeaderList response parsing done. reading attr %s",
attrId.std::c_str());
attrId.c_str());
if (value[attrId].isArray())
{
mAcceptHeaderList.clear();
Expand Down Expand Up @@ -132,7 +133,7 @@ uint32_t AppContentLauncherManager::HandleGetSupportedStreamingProtocols()
chip::app::ConcreteReadAttributePath aPath(mEndpointId, chip::app::Clusters::ContentLauncher::Id,
chip::app::Clusters::ContentLauncher::Attributes::SupportedStreamingProtocols::Id);
std::string resStr = mAttributeDelegate->Read(aPath);
ChipLogProgress(Zcl, "AppContentLauncherManager::HandleGetSupportedStreamingProtocols response %s", resStr.std::c_str());
ChipLogProgress(Zcl, "AppContentLauncherManager::HandleGetSupportedStreamingProtocols response %s", resStr.c_str());

if (resStr.length() == 0)
{
Expand All @@ -147,7 +148,7 @@ uint32_t AppContentLauncherManager::HandleGetSupportedStreamingProtocols()
}
std::string attrId = std::to_string(chip::app::Clusters::ContentLauncher::Attributes::SupportedStreamingProtocols::Id);
ChipLogProgress(Zcl, "AppContentLauncherManager::HandleGetSupportedStreamingProtocols response parsing done. reading attr %s",
attrId.std::c_str());
attrId.c_str());
if (!value[attrId].empty() && value[attrId].isInt())
{
uint32_t supportedStreamingProtocols = static_cast<uint32_t>(value[attrId].asInt());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ uint64_t AppMediaPlaybackManager::HandleMediaRequestGetAttribute(chip::Attribute
ChipLogProgress(Zcl, "Received AppMediaPlaybackManager::HandleMediaRequestGetAttribute:%d", attributeId);
chip::app::ConcreteReadAttributePath aPath(mEndpointId, chip::app::Clusters::MediaPlayback::Id, attributeId);
std::string resStr = mAttributeDelegate->Read(aPath);
ChipLogProgress(Zcl, "AppMediaPlaybackManager::HandleMediaRequestGetAttribute response %s", resStr.std::c_str());
ChipLogProgress(Zcl, "AppMediaPlaybackManager::HandleMediaRequestGetAttribute response %s", resStr.c_str());

uint64_t ret = std::numeric_limits<uint64_t>::max();
if (resStr.length() != 0)
Expand All @@ -205,7 +205,7 @@ uint64_t AppMediaPlaybackManager::HandleMediaRequestGetAttribute(chip::Attribute
{
std::string attrId = std::to_string(attributeId);
ChipLogProgress(Zcl, "AppMediaPlaybackManager::HandleMediaRequestGetAttribute response parsing done. reading attr %s",
attrId.std::c_str());
attrId.c_str());
if (!value[attrId].empty() && value[attrId].isUInt())
{
ret = static_cast<uint64_t>(value[attrId].asUInt());
Expand Down Expand Up @@ -241,7 +241,7 @@ CHIP_ERROR AppMediaPlaybackManager::HandleGetSampledPosition(AttributeValueEncod
chip::app::ConcreteReadAttributePath aPath(mEndpointId, chip::app::Clusters::MediaPlayback::Id,
chip::app::Clusters::MediaPlayback::Attributes::SampledPosition::Id);
std::string resStr = mAttributeDelegate->Read(aPath);
ChipLogProgress(Zcl, "AppMediaPlaybackManager::HandleGetSampledPosition response %s", resStr.std::c_str());
ChipLogProgress(Zcl, "AppMediaPlaybackManager::HandleGetSampledPosition response %s", resStr.c_str());

if (resStr.length() != 0)
{
Expand All @@ -251,7 +251,7 @@ CHIP_ERROR AppMediaPlaybackManager::HandleGetSampledPosition(AttributeValueEncod
{
std::string attrId = std::to_string(chip::app::Clusters::MediaPlayback::Attributes::SampledPosition::Id);
ChipLogProgress(Zcl, "AppContentLauncherManager::HandleGetSampledPosition response parsing done. reading attr %s",
attrId.std::c_str());
attrId.c_str());
if (!value[attrId].empty() && value[attrId].isObject())
{
std::string updatedAt = std::to_string(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ CHIP_ERROR TargetNavigatorManager::HandleGetTargetList(AttributeValueEncoder & a
{
std::string attrId = std::to_string(chip::app::Clusters::TargetNavigator::Attributes::TargetList::Id);
ChipLogProgress(Zcl, "TargetNavigatorManager::HandleNavigateTarget response parsing done. reading attr %s",
attrId.std::c_str());
attrId.c_str());
if (value[attrId].isArray())
{
return aEncoder.EncodeList([&](const auto & encoder) -> CHIP_ERROR {
Expand Down Expand Up @@ -109,7 +109,7 @@ uint8_t TargetNavigatorManager::HandleGetCurrentTarget()
chip::app::ConcreteReadAttributePath aPath(mEndpointId, chip::app::Clusters::TargetNavigator::Id,
chip::app::Clusters::TargetNavigator::Attributes::TargetList::Id);
std::string resStr = mAttributeDelegate->Read(aPath);
ChipLogProgress(Zcl, "TargetNavigatorManager::HandleGetCurrentTarget response %s", resStr.std::c_str());
ChipLogProgress(Zcl, "TargetNavigatorManager::HandleGetCurrentTarget response %s", resStr.c_str());

if (resStr.length() != 0)
{
Expand All @@ -119,7 +119,7 @@ uint8_t TargetNavigatorManager::HandleGetCurrentTarget()
{
std::string attrId = std::to_string(chip::app::Clusters::TargetNavigator::Attributes::CurrentTarget::Id);
ChipLogProgress(Zcl, "TargetNavigatorManager::HandleGetCurrentTarget response parsing done. reading attr %s",
attrId.std::c_str());
attrId.c_str());
if (value[attrId].isUInt() && value[attrId].asUInt() < 256)
{
return static_cast<uint8_t>(value[attrId].asUInt());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ bool MediaInputManager::HandleShowInputStatus()
std::string desc(inputInfo.description.data(), inputInfo.description.size());
ChipLogProgress(Zcl, " [%d] type=%d selected=%d name=%s desc=%s", inputInfo.index,
static_cast<uint16_t>(inputInfo.inputType), (mCurrentInput == inputInfo.index ? 1 : 0), name.c_str(),
desc.std::c_str());
desc.c_str());
}
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ CHIP_ERROR MessagesManager::HandlePresentMessagesRequest(
const DataModel::Nullable<uint32_t> & startTime, const DataModel::Nullable<uint64_t> & duration, const CharSpan & messageText,
const Optional<DataModel::DecodableList<MessageResponseOption>> & responses)
{
ChipLogProgress(Zcl, "HandlePresentMessagesRequest message:%s", std::string(messageText.data(), messageText.size()).std::c_str());
ChipLogProgress(Zcl, "HandlePresentMessagesRequest message:%s", std::string(messageText.data(), messageText.size()).c_str());

auto cachedMessage = CachedMessage(messageId, priority, messageControl, startTime, duration,
std::string(messageText.data(), messageText.size()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ void ContentAppObserverManager::HandleContentAppMessage(chip::app::CommandRespon
std::string encodingHintString(encodingHint.data(), encodingHint.size());

ChipLogProgress(Zcl, "ContentAppObserverManager::HandleContentAppMessage TEST CASE hint=%s data=%s ",
encodingHintString.std::c_str(), dataString.std::c_str());
encodingHintString.c_str(), dataString.c_str());

ContentAppMessageResponse response;
// TODO: Insert code here
Expand Down

0 comments on commit 8245330

Please sign in to comment.