Skip to content

Commit

Permalink
Fix TV app Linux build
Browse files Browse the repository at this point in the history
  • Loading branch information
lazarkov committed Dec 28, 2021
1 parent c96e5b8 commit c2707ba
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
18 changes: 9 additions & 9 deletions examples/tv-app/linux/AppImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,29 +190,29 @@ uint32_t AccountLoginImpl::GetSetupPIN(const char * tempAccountId)
return mSetupPIN;
}

ApplicationLauncherResponse ApplicationLauncherImpl::LaunchApp(Application application, std::string data)
chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::Type
ApplicationLauncherImpl::LaunchApp(Application application, std::string data)
{
std::string appId(application.applicationId.data(), application.applicationId.size());
ChipLogProgress(DeviceLayer,
"ApplicationLauncherResponse: LaunchApp application.catalogVendorId=%d "
"application.applicationId=%s data=%s",
application.catalogVendorId, appId.c_str(), data.c_str());

ApplicationLauncherResponse response;
const char * testData = "data";
response.data = (uint8_t *) testData;
response.status = to_underlying(chip::app::Clusters::ApplicationLauncher::StatusEnum::kSuccess);
chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::Type response;
response.data = chip::CharSpan("data", strlen("data"));
response.status = chip::app::Clusters::ApplicationLauncher::StatusEnum::kSuccess;

return response;
}

LaunchResponse ContentLauncherImpl::LaunchContent(std::list<Parameter> parameterList, bool autoplay, std::string data)
chip::app::Clusters::ContentLauncher::Commands::LaunchResponse::Type
ContentLauncherImpl::LaunchContent(std::list<Parameter> parameterList, bool autoplay, std::string data)
{
ChipLogProgress(DeviceLayer, "ContentLauncherImpl: LaunchContent autoplay=%d data=\"%s\"", autoplay ? 1 : 0, data.c_str());

LaunchResponse response;
response.err = CHIP_NO_ERROR;
response.data = "Example app data";
chip::app::Clusters::ContentLauncher::Commands::LaunchResponse::Type response;
response.data = chip::CharSpan("data", strlen("data"));
response.status = chip::app::Clusters::ContentLauncher::StatusEnum::kSuccess;
return response;
}
Expand Down
6 changes: 4 additions & 2 deletions examples/tv-app/linux/AppImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ class DLL_EXPORT ApplicationLauncherImpl : public ApplicationLauncher
public:
virtual ~ApplicationLauncherImpl() {}

ApplicationLauncherResponse LaunchApp(Application application, std::string data) override;
chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::Type LaunchApp(Application application,
std::string data) override;

protected:
};
Expand All @@ -108,7 +109,8 @@ class DLL_EXPORT ContentLauncherImpl : public ContentLauncher
public:
virtual ~ContentLauncherImpl() {}

LaunchResponse LaunchContent(std::list<Parameter> parameterList, bool autoplay, std::string data) override;
chip::app::Clusters::ContentLauncher::Commands::LaunchResponse::Type LaunchContent(std::list<Parameter> parameterList,
bool autoplay, std::string data) override;

protected:
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@
*/

#include "ContentLauncherManager.h"
#include <app/util/ContentAppPlatform.h>

using namespace std;
using namespace chip::app::Clusters::ContentLauncher;
using namespace chip::AppPlatform;

Commands::LaunchResponse::Type ContentLauncherManager::HandleLaunchContent(chip::EndpointId endpointId,
const std::list<Parameter> & parameterList,
Expand Down

0 comments on commit c2707ba

Please sign in to comment.