Skip to content

Commit

Permalink
Restyled by clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
restyled-commits authored and lazarkov committed Feb 2, 2024
1 parent c6a3aab commit 7b75564
Show file tree
Hide file tree
Showing 17 changed files with 16 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
*/

#include "AccountLoginManager.h"
#include <app-common/zap-generated/attributes/Accessors.h>
#include <app/CommandHandler.h>
#include <app/util/af.h>
#include <app-common/zap-generated/attributes/Accessors.h>
#include <json/json.h>
#include <lib/core/DataModelTypes.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class AppMediaPlaybackManager : public MediaPlaybackDelegate

// TODO: set this based upon meta data from app
uint32_t mDynamicEndpointFeatureMap = 3;
uint16_t mDynamicClusterRevision = 2;
uint16_t mDynamicClusterRevision = 2;

ContentAppAttributeDelegate * mAttributeDelegate;
};
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
* limitations under the License.
*/

#include <app-common/zap-generated/attributes/Accessors.h>
#include "TargetNavigatorManager.h"
#include <app-common/zap-generated/attributes/Accessors.h>
#include <json/json.h>

using namespace std;
Expand Down
2 changes: 1 addition & 1 deletion examples/tv-app/android/java/ChannelManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,5 @@ class ChannelManager : public ChannelDelegate

// TODO: set this based upon meta data from app
uint32_t mDynamicEndpointFeatureMap = 3;
uint16_t mDynamicClusterRevision = 2;
uint16_t mDynamicClusterRevision = 2;
};
2 changes: 1 addition & 1 deletion examples/tv-app/android/java/MediaPlaybackManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,5 +122,5 @@ class MediaPlaybackManager : public MediaPlaybackDelegate

// TODO: set this based upon meta data from app
uint32_t mDynamicEndpointFeatureMap = 3;
uint16_t mDynamicClusterRevision = 2;
uint16_t mDynamicClusterRevision = 2;
};
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
*/

#include "AccountLoginManager.h"
#include <app/CommandHandler.h>
#include <app-common/zap-generated/attributes/Accessors.h>
#include <app/CommandHandler.h>
#include <app/util/af.h>

using namespace std;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,5 @@ class ChannelManager : public ChannelDelegate
private:
// TODO: set this based upon meta data from app
uint32_t mDynamicEndpointFeatureMap = 3;
uint16_t mDynamicClusterRevision = 2;
uint16_t mDynamicClusterRevision = 2;
};
Original file line number Diff line number Diff line change
Expand Up @@ -114,5 +114,5 @@ class MediaPlaybackManager : public MediaPlaybackDelegate
private:
// TODO: set this based upon meta data from app
uint32_t mDynamicEndpointFeatureMap = 3;
uint16_t mDynamicClusterRevision = 2;
uint16_t mDynamicClusterRevision = 2;
};
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ void TargetNavigatorManager::HandleNavigateTarget(CommandResponseHelper<Navigate
helper.Success(response);
}


uint16_t TargetNavigatorManager::GetClusterRevision(chip::EndpointId endpoint)
{
if (endpoint >= EMBER_AF_CONTENT_LAUNCHER_CLUSTER_SERVER_ENDPOINT_COUNT)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class TargetNavigatorManager : public TargetNavigatorDelegate
static const uint8_t kNoCurrentTarget = 0;
std::list<std::string> mTargets;
uint8_t mCurrentTarget;

private:
// TODO: set this based upon meta data from app
uint16_t mDynamicClusterRevision = 2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
#include <app/clusters/account-login-server/account-login-delegate.h>
#include <app/clusters/account-login-server/account-login-server.h>

#include <app/AttributeAccessInterface.h>
#include <app-common/zap-generated/cluster-objects.h>
#include <app/AttributeAccessInterface.h>
#include <app/CommandHandler.h>
#include <app/ConcreteCommandPath.h>
#include <app/EventLogging.h>
Expand Down Expand Up @@ -162,7 +162,6 @@ CHIP_ERROR AccountLoginAttrAccess::ReadRevisionAttribute(EndpointId endpoint, ap

} // anonymous namespace


// -----------------------------------------------------------------------------
// Matter Framework Callbacks Implementation

Expand Down
2 changes: 1 addition & 1 deletion src/app/clusters/channel-server/channel-delegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class Delegate
const chip::ByteSpan & data) = 0;

bool HasFeature(chip::EndpointId endpoint, Feature feature);
virtual uint32_t GetFeatureMap(chip::EndpointId endpoint) = 0;
virtual uint32_t GetFeatureMap(chip::EndpointId endpoint) = 0;
virtual uint16_t GetClusterRevision(chip::EndpointId endpoint) = 0;

virtual ~Delegate() = default;
Expand Down
4 changes: 1 addition & 3 deletions src/app/clusters/channel-server/channel-server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,7 @@ CHIP_ERROR ChannelAttrAccess::ReadCurrentChannelAttribute(app::AttributeValueEnc
return delegate->HandleGetCurrentChannel(aEncoder);
}


CHIP_ERROR ChannelAttrAccess::ReadRevisionAttribute(EndpointId endpoint, app::AttributeValueEncoder & aEncoder,
Delegate * delegate)
CHIP_ERROR ChannelAttrAccess::ReadRevisionAttribute(EndpointId endpoint, app::AttributeValueEncoder & aEncoder, Delegate * delegate)
{
uint16_t clusterRevision = delegate->GetClusterRevision(endpoint);
return aEncoder.Encode(clusterRevision);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class Delegate
virtual bool HandleActivateTextTrack(const chip::CharSpan & trackId) = 0;
virtual bool HandleDeactivateTextTrack() = 0;

virtual uint32_t GetFeatureMap(chip::EndpointId endpoint) = 0;
virtual uint32_t GetFeatureMap(chip::EndpointId endpoint) = 0;
virtual uint16_t GetClusterRevision(chip::EndpointId endpoint) = 0;

virtual ~Delegate() = default;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ CHIP_ERROR MediaPlaybackAttrAccess::ReadFeatureFlagAttribute(EndpointId endpoint
}

CHIP_ERROR MediaPlaybackAttrAccess::ReadRevisionAttribute(EndpointId endpoint, app::AttributeValueEncoder & aEncoder,
Delegate * delegate)
Delegate * delegate)
{
uint16_t clusterRevision = delegate->GetClusterRevision(endpoint);
return aEncoder.Encode(clusterRevision);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class Delegate
virtual uint8_t HandleGetCurrentTarget() = 0;
virtual void HandleNavigateTarget(CommandResponseHelper<Commands::NavigateTargetResponse::Type> & helper,
const uint64_t & target, const CharSpan & data) = 0;
virtual uint16_t GetClusterRevision(chip::EndpointId endpoint) = 0;
virtual uint16_t GetClusterRevision(chip::EndpointId endpoint) = 0;

virtual ~Delegate() = default;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ CHIP_ERROR TargetNavigatorAttrAccess::ReadCurrentTargetAttribute(app::AttributeV
}

CHIP_ERROR TargetNavigatorAttrAccess::ReadRevisionAttribute(EndpointId endpoint, app::AttributeValueEncoder & aEncoder,
Delegate * delegate)
Delegate * delegate)
{
uint16_t clusterRevision = delegate->GetClusterRevision(endpoint);
return aEncoder.Encode(clusterRevision);
Expand Down

0 comments on commit 7b75564

Please sign in to comment.