Skip to content

Commit

Permalink
Restyle fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lazarkov committed Feb 9, 2022
1 parent a7b1512 commit 6c208e9
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 19 deletions.
5 changes: 3 additions & 2 deletions examples/tv-app/android/java/ContentLauncherManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ class ContentLauncherManager : public ContentLauncherDelegate
static void NewManager(jint endpoint, jobject manager);
void InitializeWithObjects(jobject managerObject);

void HandleLaunchContent(CommandResponseHelper<LaunchResponseType> & helper, const chip::app::DataModel::DecodableList<ParameterType> & parameterList,
bool autoplay, const CharSpan & data) override;
void HandleLaunchContent(CommandResponseHelper<LaunchResponseType> & helper,
const chip::app::DataModel::DecodableList<ParameterType> & parameterList, bool autoplay,
const CharSpan & data) override;
void HandleLaunchUrl(CommandResponseHelper<LaunchResponseType> & helper, const CharSpan & contentUrl,
const CharSpan & displayString, const BrandingInformationType & brandingInformation) override;
CHIP_ERROR HandleGetAcceptHeaderList(AttributeValueEncoder & aEncoder) override;
Expand Down
2 changes: 1 addition & 1 deletion examples/tv-app/linux/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ chip_build_libshell = true

chip_enable_additional_data_advertising = true

chip_enable_rotating_device_id = true
chip_enable_rotating_device_id = true
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ ContentLauncherManager::ContentLauncherManager(list<std::string> acceptHeaderLis
}

void ContentLauncherManager::HandleLaunchContent(CommandResponseHelper<LaunchResponseType> & helper,
const DecodableList<ParameterType> & parameterList, bool autoplay, const CharSpan & data)
const DecodableList<ParameterType> & parameterList, bool autoplay,
const CharSpan & data)
{
ChipLogProgress(Zcl, "ContentLauncherManager::HandleLaunchContent for endpoint %d", mEndpointId);
string dataString(data.data(), data.size());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ class ContentLauncherManager : public ContentLauncherDelegate
ContentLauncherManager() : ContentLauncherManager({ "example", "example" }, 0){};
ContentLauncherManager(std::list<std::string> acceptHeaderList, uint32_t supportedStreamingProtocols);

void HandleLaunchContent(CommandResponseHelper<LaunchResponseType> & helper, const chip::app::DataModel::DecodableList<ParameterType> & parameterList,
bool autoplay, const CharSpan & data) override;
void HandleLaunchContent(CommandResponseHelper<LaunchResponseType> & helper,
const chip::app::DataModel::DecodableList<ParameterType> & parameterList, bool autoplay,
const CharSpan & data) override;
void HandleLaunchUrl(CommandResponseHelper<LaunchResponseType> & helper, const CharSpan & contentUrl,
const CharSpan & displayString, const BrandingInformationType & brandingInformation) override;
CHIP_ERROR HandleGetAcceptHeaderList(AttributeValueEncoder & aEncoder) override;
Expand Down
13 changes: 6 additions & 7 deletions examples/tv-app/linux/include/wake-on-lan/WakeOnLanManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
*/

#include "WakeOnLanManager.h"
#include <string>
#include <iostream>
#include <fstream>
#include <iostream>
#include <string>

using namespace chip;
using namespace chip::app::Clusters::WakeOnLan;
Expand All @@ -34,10 +34,9 @@ std::string getMacAddress()

CHIP_ERROR WakeOnLanManager::HandleGetMacAddress(chip::app::AttributeValueEncoder & aEncoder)
{
#if CHIP_ENABLE_WAKE_ON_LAN
#if CHIP_ENABLE_WAKE_ON_LAN
return aEncoder.Encode(CharSpan::fromCharString(getMacAddress().c_str()));
#else
#else
return aEncoder.Encode(CharSpan::fromCharString("00:00:00:00:00"));
#endif // CHIP_ENABLE_WAKE_ON_LAN

}
#endif // CHIP_ENABLE_WAKE_ON_LAN
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ class Delegate
{
public:
virtual void HandleLaunchContent(CommandResponseHelper<Commands::LaunchResponse::Type> & helper,
const DataModel::DecodableList<Parameter> & parameterList, bool autoplay, const CharSpan & data) = 0;
const DataModel::DecodableList<Parameter> & parameterList, bool autoplay,
const CharSpan & data) = 0;

virtual void HandleLaunchUrl(CommandResponseHelper<Commands::LaunchResponse::Type> & helper, const CharSpan & contentUrl,
const CharSpan & displayString, const BrandingInformation & brandingInformation) = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,8 @@ bool emberAfContentLauncherClusterLaunchContentRequestCallback(
CHIP_ERROR err = CHIP_NO_ERROR;
EndpointId endpoint = commandPath.mEndpointId;

auto & autoplay = commandData.autoPlay;
auto & data = commandData.data;
auto & autoplay = commandData.autoPlay;
auto & data = commandData.data;
auto & decodableParameterList = commandData.search.parameterList;

app::CommandResponseHelper<Commands::LaunchResponse::Type> responder(commandObj, commandPath);
Expand Down Expand Up @@ -237,7 +237,8 @@ bool emberAfContentLauncherClusterLaunchURLRequestCallback(
VerifyOrExit(isDelegateNull(delegate, endpoint) != true, err = CHIP_ERROR_INCORRECT_STATE);
{
delegate->HandleLaunchUrl(responder, contentUrl, displayString.HasValue() ? displayString.Value() : CharSpan(),
brandingInformation.HasValue() ? brandingInformation.Value() : chip::app::Clusters::ContentLauncher::BrandingInformation());
brandingInformation.HasValue() ? brandingInformation.Value()
: chip::app::Clusters::ContentLauncher::BrandingInformation());
}

exit:
Expand Down
12 changes: 10 additions & 2 deletions src/app/tests/suites/TV_ContentLauncherCluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,17 @@ tests:
- name: "data"
value: "exampleData"
- name: "search"
value:
value:
{
parameterList: [{ type: 1, value: "exampleValue", externalIDList: [{ name: "name", value: "value" }]}]
parameterList:
[
{
type: 1,
value: "exampleValue",
externalIDList:
[{ name: "name", value: "value" }],
},
],
}
response:
values:
Expand Down

0 comments on commit 6c208e9

Please sign in to comment.