Skip to content

Commit

Permalink
Update/Rename attributePath/AttributePaths/AttributeStatus/WriteRespo…
Browse files Browse the repository at this point in the history
…nse with latest encoding spec (#11409)
  • Loading branch information
yunhanw-google authored and pull[bot] committed Jan 2, 2024
1 parent 04a71b8 commit 5312553
Show file tree
Hide file tree
Showing 32 changed files with 990 additions and 1,215 deletions.
12 changes: 6 additions & 6 deletions src/app/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ static_library("app") {
"MessageDef/AttributeDataList.h",
"MessageDef/AttributeDataVersionList.cpp",
"MessageDef/AttributeDataVersionList.h",
"MessageDef/AttributePath.cpp",
"MessageDef/AttributePath.h",
"MessageDef/AttributePathList.cpp",
"MessageDef/AttributePathList.h",
"MessageDef/AttributePathIB.cpp",
"MessageDef/AttributePathIB.h",
"MessageDef/AttributePaths.cpp",
"MessageDef/AttributePaths.h",
"MessageDef/AttributeStatusIB.cpp",
"MessageDef/AttributeStatusIB.h",
"MessageDef/AttributeStatusList.cpp",
"MessageDef/AttributeStatusList.h",
"MessageDef/AttributeStatuses.cpp",
"MessageDef/AttributeStatuses.h",
"MessageDef/Builder.cpp",
"MessageDef/Builder.h",
"MessageDef/CommandDataIB.cpp",
Expand Down
8 changes: 4 additions & 4 deletions src/app/MessageDef/AttributeDataElement.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
*
* Copyright (c) 2020 Project CHIP Authors
* Copyright (c) 2020-2021 Project CHIP Authors
* Copyright (c) 2018 Google LLC.
* Copyright (c) 2016-2017 Nest Labs, Inc.
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -243,7 +243,7 @@ CHIP_ERROR AttributeDataElement::Parser::CheckSchemaValidity() const
VerifyOrExit(chip::TLV::kTLVType_List == reader.GetType(), err = CHIP_ERROR_WRONG_TLV_TYPE);

{
AttributePath::Parser path;
AttributePathIB::Parser path;
err = path.Init(reader);
SuccessOrExit(err);

Expand Down Expand Up @@ -348,7 +348,7 @@ CHIP_ERROR AttributeDataElement::Parser::CheckSchemaValidity() const
}
#endif // CHIP_CONFIG_IM_ENABLE_SCHEMA_CHECK

CHIP_ERROR AttributeDataElement::Parser::GetAttributePath(AttributePath::Parser * const apAttributePath) const
CHIP_ERROR AttributeDataElement::Parser::GetAttributePath(AttributePathIB::Parser * const apAttributePath) const
{
CHIP_ERROR err = CHIP_NO_ERROR;
chip::TLV::TLVReader reader;
Expand Down Expand Up @@ -403,7 +403,7 @@ CHIP_ERROR AttributeDataElement::Builder::Init(chip::TLV::TLVWriter * const apWr
return InitAnonymousStructure(apWriter);
}

AttributePath::Builder & AttributeDataElement::Builder::CreateAttributePathBuilder()
AttributePathIB::Builder & AttributeDataElement::Builder::CreateAttributePath()
{
// skip if error has already been set
VerifyOrExit(CHIP_NO_ERROR == mError, mAttributePathBuilder.ResetError(mError));
Expand Down
16 changes: 8 additions & 8 deletions src/app/MessageDef/AttributeDataElement.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
*
* Copyright (c) 2020 Project CHIP Authors
* Copyright (c) 2020-2021 Project CHIP Authors
* Copyright (c) 2016-2017 Nest Labs, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -23,7 +23,7 @@

#pragma once

#include "AttributePath.h"
#include "AttributePathIB.h"
#include "Builder.h"
#include "Parser.h"

Expand Down Expand Up @@ -76,15 +76,15 @@ class Parser : public chip::app::Parser
#endif

/**
* @brief Get a TLVReader for the AttributePath. Next() must be called before accessing them.
* @brief Get a TLVReader for the AttributePathIB. Next() must be called before accessing them.
*
* @param [in] apAttributePath A pointer to apAttributePath
*
* @return #CHIP_NO_ERROR on success
* #CHIP_ERROR_WRONG_TLV_TYPE if there is such element but it's not a Path
* #CHIP_END_OF_TLV if there is no such element
*/
CHIP_ERROR GetAttributePath(AttributePath::Parser * const apAttributePath) const;
CHIP_ERROR GetAttributePath(AttributePathIB::Parser * const apAttributePath) const;

/**
* @brief Get a TLVReader for the DataVersion. Next() must be called before accessing them.
Expand Down Expand Up @@ -145,11 +145,11 @@ class Builder : public chip::app::Builder
CHIP_ERROR Init(chip::TLV::TLVWriter * const apWriter);

/**
* @brief Initialize a AttributePath::Builder for writing into the TLV stream
* @brief Initialize a AttributePathIB::Builder for writing into the TLV stream
*
* @return A reference to AttributePath::Builder
* @return A reference to AttributePathIB::Builder
*/
AttributePath::Builder & CreateAttributePathBuilder();
AttributePathIB::Builder & CreateAttributePath();

/**
* @brief Inject DataVersion into the TLV stream to indicate the numerical data version associated with
Expand Down Expand Up @@ -180,7 +180,7 @@ class Builder : public chip::app::Builder
AttributeDataElement::Builder & EndOfAttributeDataElement();

private:
AttributePath::Builder mAttributePathBuilder;
AttributePathIB::Builder mAttributePathBuilder;
};
}; // namespace AttributeDataElement

Expand Down
272 changes: 0 additions & 272 deletions src/app/MessageDef/AttributePath.cpp

This file was deleted.

0 comments on commit 5312553

Please sign in to comment.