Skip to content

Commit

Permalink
Restyle fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lazarkov committed Dec 28, 2021
1 parent 51aa25a commit c96e5b8
Show file tree
Hide file tree
Showing 68 changed files with 398 additions and 377 deletions.
2 changes: 1 addition & 1 deletion examples/all-clusters-app/linux/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ executable("chip-all-clusters-app") {
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp",
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/ota-requestor-stub.cpp",
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp",
"include/tv-callbacks.h",
"include/tv-callbacks.cpp",
"include/tv-callbacks.h",
"main.cpp",
]

Expand Down
4 changes: 2 additions & 2 deletions examples/all-clusters-app/linux/include/tv-callbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

#include "tv-callbacks.h"

bool LowPowerManager::HandleSleep()
bool LowPowerManager::HandleSleep()
{
return true;
}
}
3 changes: 1 addition & 2 deletions examples/all-clusters-app/linux/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,19 @@
* limitations under the License.
*/

#include "include/tv-callbacks.h"
#include <app/CommandHandler.h>
#include <app/clusters/identify-server/identify-server.h>
#include <app/clusters/network-commissioning/network-commissioning.h>
#include <app/util/af.h>
#include <platform/Linux/NetworkCommissioningDriver.h>
#include "include/tv-callbacks.h"

#include "AppMain.h"

using namespace chip;
using namespace chip::app;
using namespace chip::DeviceLayer;


namespace {
static LowPowerManager lowPowerManager;
} // namespace
Expand Down
4 changes: 2 additions & 2 deletions examples/all-clusters-app/mbed/main/LowPowerManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

#include "LowPowerManager.h"

bool LowPowerManager::HandleSleep()
bool LowPowerManager::HandleSleep()
{
// TODO: Insert code here
return true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

#include "LowPowerManager.h"

bool LowPowerManager::HandleSleep()
bool LowPowerManager::HandleSleep()
{
// TODO: Insert code here
return true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ bool AccountLoginManager::HandleLogin(const chip::CharSpan & tempAccountIdentifi
return true;
}


bool AccountLoginManager::HandleLogout()
{
// TODO: Insert your code here to send logout request
Expand All @@ -47,6 +46,6 @@ Commands::GetSetupPINResponse::Type AccountLoginManager::HandleGetSetupPin(const
ChipLogProgress(Zcl, "temporary account id: %s", tempAccountIdentifierString.c_str());
// TODO: Insert your code here to handle get setup pin
Commands::GetSetupPINResponse::Type response;
response.setupPIN = chip::CharSpan("tempPin123", strlen("tempPin123"));
response.setupPIN = chip::CharSpan("tempPin123", strlen("tempPin123"));
return response;
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
class AccountLoginManager : public chip::app::Clusters::AccountLogin::Delegate
{
public:
bool HandleLogin(const chip::CharSpan & tempAccountIdentifierString, const chip::CharSpan & setupPinString) override;
bool HandleLogin(const chip::CharSpan & tempAccountIdentifierString, const chip::CharSpan & setupPinString) override;
bool HandleLogout() override;
chip::app::Clusters::AccountLogin::Commands::GetSetupPINResponse::Type HandleGetSetupPin(const chip::CharSpan & tempAccountIdentifierString) override;
chip::app::Clusters::AccountLogin::Commands::GetSetupPINResponse::Type
HandleGetSetupPin(const chip::CharSpan & tempAccountIdentifierString) override;
};
Original file line number Diff line number Diff line change
Expand Up @@ -21,37 +21,45 @@
using namespace std;
using namespace chip::app::Clusters::ApplicationBasic;

chip::CharSpan ApplicationBasicManager::HandleGetVendorName() {
chip::CharSpan ApplicationBasicManager::HandleGetVendorName()
{
return chip::CharSpan("exampleVendorName1", strlen("exampleVendorName1"));
}

uint16_t ApplicationBasicManager::HandleGetVendorId() {
uint16_t ApplicationBasicManager::HandleGetVendorId()
{
return 1;
}

chip::CharSpan ApplicationBasicManager::HandleGetApplicationName() {
chip::CharSpan ApplicationBasicManager::HandleGetApplicationName()
{
return chip::CharSpan("exampleName1", strlen("exampleName1"));
}

uint16_t ApplicationBasicManager::HandleGetProductId() {
uint16_t ApplicationBasicManager::HandleGetProductId()
{
return 1;
}

chip::app::Clusters::ApplicationBasic::Structs::Application::Type ApplicationBasicManager::HandleGetApplication() {
chip::app::Clusters::ApplicationBasic::Structs::Application::Type ApplicationBasicManager::HandleGetApplication()
{
chip::app::Clusters::ApplicationBasic::Structs::Application::Type application;
application.catalogVendorId = 123;
application.applicationId = chip::CharSpan("applicationId", strlen("applicationId"));
application.applicationId = chip::CharSpan("applicationId", strlen("applicationId"));
return application;
}

ApplicationStatusEnum ApplicationBasicManager::HandleGetStatus() {
ApplicationStatusEnum ApplicationBasicManager::HandleGetStatus()
{
return ApplicationStatusEnum::kStopped;
}

chip::CharSpan ApplicationBasicManager::HandleGetApplicationVersion() {
chip::CharSpan ApplicationBasicManager::HandleGetApplicationVersion()
{
return chip::CharSpan("exampleVersion", strlen("exampleVersion"));
}

std::list<uint16_t> ApplicationBasicManager::HandleGetAllowedVendorList() {
std::list<uint16_t> ApplicationBasicManager::HandleGetAllowedVendorList()
{
return { 123, 456 };
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,44 +21,46 @@
using namespace std;
using namespace chip::app::Clusters::ApplicationLauncher;

Structs::ApplicationEP::Type ApplicationLauncherManager::HandleGetCurrentApp()
Structs::ApplicationEP::Type ApplicationLauncherManager::HandleGetCurrentApp()
{
Structs::ApplicationEP::Type currentApp;
currentApp.application.catalogVendorId = 123;
currentApp.application.applicationId = chip::CharSpan("applicationId", strlen("applicationId"));
currentApp.endpoint = chip::CharSpan("endpointId", strlen("endpointId"));
currentApp.application.applicationId = chip::CharSpan("applicationId", strlen("applicationId"));
currentApp.endpoint = chip::CharSpan("endpointId", strlen("endpointId"));
return currentApp;
}

std::list<uint16_t> ApplicationLauncherManager::HandleGetCatalogList()
std::list<uint16_t> ApplicationLauncherManager::HandleGetCatalogList()
{
return { 123, 456 };
}

Commands::LauncherResponse::Type ApplicationLauncherManager::HandleLaunchApp(const chip::CharSpan & data,
const chip::app::Clusters::ApplicationLauncher::Structs::Application::Type & application)
Commands::LauncherResponse::Type ApplicationLauncherManager::HandleLaunchApp(
const chip::CharSpan & data, const chip::app::Clusters::ApplicationLauncher::Structs::Application::Type & application)
{
// TODO: Insert code here
Commands::LauncherResponse::Type response;
response.data = chip::CharSpan("data", strlen("data"));
response.data = chip::CharSpan("data", strlen("data"));
response.status = StatusEnum::kSuccess;
return response;
}

Commands::LauncherResponse::Type ApplicationLauncherManager::HandleStopApp(const chip::app::Clusters::ApplicationLauncher::Structs::Application::Type & application)
Commands::LauncherResponse::Type
ApplicationLauncherManager::HandleStopApp(const chip::app::Clusters::ApplicationLauncher::Structs::Application::Type & application)
{
// TODO: Insert code here
Commands::LauncherResponse::Type response;
response.data = chip::CharSpan("data", strlen("data"));
response.data = chip::CharSpan("data", strlen("data"));
response.status = StatusEnum::kSuccess;
return response;
}

Commands::LauncherResponse::Type ApplicationLauncherManager::HandleHideApp(const chip::app::Clusters::ApplicationLauncher::Structs::Application::Type & application)
Commands::LauncherResponse::Type
ApplicationLauncherManager::HandleHideApp(const chip::app::Clusters::ApplicationLauncher::Structs::Application::Type & application)
{
// TODO: Insert code here
Commands::LauncherResponse::Type response;
response.data = chip::CharSpan("data", strlen("data"));
response.data = chip::CharSpan("data", strlen("data"));
response.status = StatusEnum::kSuccess;
return response;
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@ class ApplicationLauncherManager : public chip::app::Clusters::ApplicationLaunch
chip::app::Clusters::ApplicationLauncher::Structs::ApplicationEP::Type HandleGetCurrentApp() override;
std::list<uint16_t> HandleGetCatalogList() override;

chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::Type HandleLaunchApp(const chip::CharSpan & data,
const chip::app::Clusters::ApplicationLauncher::Structs::Application::Type & application) override;
chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::Type HandleStopApp(const chip::app::Clusters::ApplicationLauncher::Structs::Application::Type & application) override;
chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::Type HandleHideApp(const chip::app::Clusters::ApplicationLauncher::Structs::Application::Type & application) override;
chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::Type
HandleLaunchApp(const chip::CharSpan & data,
const chip::app::Clusters::ApplicationLauncher::Structs::Application::Type & application) override;
chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::Type
HandleStopApp(const chip::app::Clusters::ApplicationLauncher::Structs::Application::Type & application) override;
chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::Type
HandleHideApp(const chip::app::Clusters::ApplicationLauncher::Structs::Application::Type & application) override;
};
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@
using namespace std;
using namespace chip::app::Clusters::AudioOutput;

uint8_t AudioOutputManager::HandleGetCurrentOutput() {
uint8_t AudioOutputManager::HandleGetCurrentOutput()
{
return 0;
}

std::list<Structs::OutputInfo::Type> AudioOutputManager::HandleGetOutputList() {
std::list<Structs::OutputInfo::Type> AudioOutputManager::HandleGetOutputList()
{
std::list<Structs::OutputInfo::Type> list;
// TODO: Insert code here
int maximumVectorSize = 3;
Expand All @@ -41,12 +43,14 @@ std::list<Structs::OutputInfo::Type> AudioOutputManager::HandleGetOutputList() {
return list;
}

bool AudioOutputManager::HandleRenameOutput(const uint8_t & index, const chip::CharSpan & name) {
bool AudioOutputManager::HandleRenameOutput(const uint8_t & index, const chip::CharSpan & name)
{
// TODO: Insert code here
return true;
}

bool AudioOutputManager::HandleSelectOutput(const uint8_t & index) {
bool AudioOutputManager::HandleSelectOutput(const uint8_t & index)
{
// TODO: Insert code here
return true;
}
}
4 changes: 0 additions & 4 deletions examples/tv-app/android/include/cluster-init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ static AudioOutputManager audioOutputManager;
static TargetNavigatorManager targetNavigatorManager;
} // namespace


/** @brief Application Basic Cluster Init
*
* This function is called when a specific cluster is initialized. It gives the
Expand All @@ -54,7 +53,6 @@ void emberAfApplicationBasicClusterInitCallback(chip::EndpointId endpoint)
chip::app::Clusters::ApplicationBasic::SetDefaultDelegate(endpoint, &applicationBasicManager);
}


/** @brief Application Launcher Cluster Init
*
* This function is called when a specific cluster is initialized. It gives the
Expand All @@ -70,7 +68,6 @@ void emberAfApplicationLauncherClusterInitCallback(EndpointId endpoint)
chip::app::Clusters::ApplicationLauncher::SetDefaultDelegate(endpoint, &applicationLauncherManager);
}


/** @brief Audio Output Cluster Init
*
* This function is called when a specific cluster is initialized. It gives the
Expand All @@ -86,7 +83,6 @@ void emberAfAudioOutputClusterInitCallback(EndpointId endpoint)
chip::app::Clusters::AudioOutput::SetDefaultDelegate(endpoint, &audioOutputManager);
}


/** @brief Target Navigator Cluster Init
*
* This function is called when a specific cluster is initialized. It gives the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ std::list<Structs::TargetInfo::Type> TargetNavigatorManager::HandleGetTargetList
for (int i = 0; i < maximumVectorSize; ++i)
{
Structs::TargetInfo::Type outputInfo;
outputInfo.identifier = static_cast<uint8_t>(i+1);
outputInfo.identifier = static_cast<uint8_t>(i + 1);
outputInfo.name = chip::CharSpan("exampleName", strlen("exampleName"));
list.push_back(outputInfo);
}
Expand All @@ -41,7 +41,8 @@ uint8_t TargetNavigatorManager::HandleGetCurrentTarget()
return 0;
}

Commands::NavigateTargetResponse::Type TargetNavigatorManager::HandleNavigateTarget(const uint64_t & target, const chip::CharSpan & data)
Commands::NavigateTargetResponse::Type TargetNavigatorManager::HandleNavigateTarget(const uint64_t & target,
const chip::CharSpan & data)
{
// TODO: Insert code here
Commands::NavigateTargetResponse::Type response;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@ class TargetNavigatorManager : public chip::app::Clusters::TargetNavigator::Dele
public:
std::list<chip::app::Clusters::TargetNavigator::Structs::TargetInfo::Type> HandleGetTargetList() override;
uint8_t HandleGetCurrentTarget() override;
chip::app::Clusters::TargetNavigator::Commands::NavigateTargetResponse::Type HandleNavigateTarget(const uint64_t & target, const chip::CharSpan & data) override;
chip::app::Clusters::TargetNavigator::Commands::NavigateTargetResponse::Type
HandleNavigateTarget(const uint64_t & target, const chip::CharSpan & data) override;
};
Loading

0 comments on commit c96e5b8

Please sign in to comment.