Skip to content

Commit

Permalink
Rename several IM IB in MessageDef (#12516)
Browse files Browse the repository at this point in the history
--Rename AttributeStatuses to AttributeStatusIBs
--Rename EventFilters to EventFilterIBs
--Rename EventPaths to EventPathIBs
--Rename EventReports to EventReportIBs
--Rename InvokeResponse to InvokeResponseIBs
  • Loading branch information
yunhanw-google authored and pull[bot] committed Nov 22, 2023
1 parent c8fce81 commit 1305954
Show file tree
Hide file tree
Showing 37 changed files with 213 additions and 233 deletions.
16 changes: 8 additions & 8 deletions src/app/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ static_library("app") {
"MessageDef/AttributeReportIBs.h",
"MessageDef/AttributeStatusIB.cpp",
"MessageDef/AttributeStatusIB.h",
"MessageDef/AttributeStatuses.cpp",
"MessageDef/AttributeStatuses.h",
"MessageDef/AttributeStatusIBs.cpp",
"MessageDef/AttributeStatusIBs.h",
"MessageDef/Builder.cpp",
"MessageDef/Builder.h",
"MessageDef/CommandDataIB.cpp",
Expand All @@ -78,22 +78,22 @@ static_library("app") {
"MessageDef/EventDataIB.cpp",
"MessageDef/EventDataIB.h",
"MessageDef/EventFilterIB.cpp",
"MessageDef/EventFilters.cpp",
"MessageDef/EventFilterIBs.cpp",
"MessageDef/EventPathIB.cpp",
"MessageDef/EventPathIB.h",
"MessageDef/EventPaths.cpp",
"MessageDef/EventPaths.h",
"MessageDef/EventPathIBs.cpp",
"MessageDef/EventPathIBs.h",
"MessageDef/EventReportIB.cpp",
"MessageDef/EventReportIB.h",
"MessageDef/EventReports.cpp",
"MessageDef/EventReports.h",
"MessageDef/EventReportIBs.cpp",
"MessageDef/EventReportIBs.h",
"MessageDef/EventStatusIB.cpp",
"MessageDef/EventStatusIB.h",
"MessageDef/InvokeRequestMessage.cpp",
"MessageDef/InvokeRequests.cpp",
"MessageDef/InvokeResponseIB.cpp",
"MessageDef/InvokeResponseIBs.cpp",
"MessageDef/InvokeResponseMessage.cpp",
"MessageDef/InvokeResponses.cpp",
"MessageDef/ListBuilder.cpp",
"MessageDef/ListParser.cpp",
"MessageDef/MessageDefHelper.cpp",
Expand Down
2 changes: 1 addition & 1 deletion src/app/CommandSender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ CHIP_ERROR CommandSender::ProcessInvokeResponse(System::PacketBufferHandle && pa
System::PacketBufferTLVReader reader;
TLV::TLVReader invokeResponsesReader;
InvokeResponseMessage::Parser invokeResponseMessage;
InvokeResponses::Parser invokeResponses;
InvokeResponseIBs::Parser invokeResponses;
bool suppressResponse = false;

reader.Init(std::move(payload));
Expand Down
2 changes: 1 addition & 1 deletion src/app/MessageDef/AttributePathIBs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ CHIP_ERROR AttributePathIBs::Parser::CheckSchemaValidity() const
}
#endif // CHIP_CONFIG_IM_ENABLE_SCHEMA_CHECK

AttributePathIB::Builder & AttributePathIBs::Builder::CreateAttributePath()
AttributePathIB::Builder & AttributePathIBs::Builder::CreatePath()
{
if (mError == CHIP_NO_ERROR)
{
Expand Down
2 changes: 1 addition & 1 deletion src/app/MessageDef/AttributePathIBs.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class Builder : public ArrayBuilder
*
* @return A reference to AttributePathIB::Builder
*/
AttributePathIB::Builder & CreateAttributePath();
AttributePathIB::Builder & CreatePath();

/**
* @brief Mark the end of this AttributePathIB
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* limitations under the License.
*/

#include "AttributeStatuses.h"
#include "AttributeStatusIBs.h"
#include "AttributeStatusIB.h"

#include "MessageDefHelper.h"
Expand All @@ -29,7 +29,7 @@

namespace chip {
namespace app {
AttributeStatusIB::Builder & AttributeStatuses::Builder::CreateAttributeStatus()
AttributeStatusIB::Builder & AttributeStatusIBs::Builder::CreateAttributeStatus()
{
if (mError == CHIP_NO_ERROR)
{
Expand All @@ -38,23 +38,23 @@ AttributeStatusIB::Builder & AttributeStatuses::Builder::CreateAttributeStatus()
return mAttributeStatus;
}

AttributeStatuses::Builder & AttributeStatuses::Builder::EndOfAttributeStatuses()
AttributeStatusIBs::Builder & AttributeStatusIBs::Builder::EndOfAttributeStatuses()
{
EndOfContainer();
return *this;
}

#if CHIP_CONFIG_IM_ENABLE_SCHEMA_CHECK
CHIP_ERROR AttributeStatuses::Parser::CheckSchemaValidity() const
CHIP_ERROR AttributeStatusIBs::Parser::CheckSchemaValidity() const
{
CHIP_ERROR err = CHIP_NO_ERROR;
size_t NumAttributeStatus = 0;
TLV::TLVReader reader;

PRETTY_PRINT("AttributeStatuses =");
PRETTY_PRINT("AttributeStatusIBs =");
PRETTY_PRINT("[");

// make a copy of the EventReports reader
// make a copy of the AttributeStatusIBs reader
reader.Init(mReader);

while (CHIP_NO_ERROR == (err = reader.Next()))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

namespace chip {
namespace app {
namespace AttributeStatuses {
namespace AttributeStatusIBs {
class Builder : public ArrayBuilder
{
public:
Expand All @@ -43,11 +43,11 @@ class Builder : public ArrayBuilder
AttributeStatusIB::Builder & CreateAttributeStatus();

/**
* @brief Mark the end of this AttributeStatuses
* @brief Mark the end of this AttributeStatusIBs
*
* @return A reference to *this
*/
AttributeStatuses::Builder & EndOfAttributeStatuses();
AttributeStatusIBs::Builder & EndOfAttributeStatuses();

private:
AttributeStatusIB::Builder mAttributeStatus;
Expand All @@ -73,6 +73,6 @@ class Parser : public ArrayParser
CHIP_ERROR CheckSchemaValidity() const;
#endif
};
} // namespace AttributeStatuses
} // namespace AttributeStatusIBs
} // namespace app
} // namespace chip
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* This file defines EventFilters parser and builder in CHIP interaction model
*
*/

#include "EventFilters.h"
#include "EventFilterIBs.h"

#include "MessageDefHelper.h"

Expand All @@ -32,13 +27,13 @@
namespace chip {
namespace app {
#if CHIP_CONFIG_IM_ENABLE_SCHEMA_CHECK
CHIP_ERROR EventFilters::Parser::CheckSchemaValidity() const
CHIP_ERROR EventFilterIBs::Parser::CheckSchemaValidity() const
{
CHIP_ERROR err = CHIP_NO_ERROR;
size_t numEventFilters = 0;
TLV::TLVReader reader;

PRETTY_PRINT("EventFilters =");
PRETTY_PRINT("EventFilterIBs =");
PRETTY_PRINT("[");

// make a copy of the reader
Expand Down Expand Up @@ -76,13 +71,13 @@ CHIP_ERROR EventFilters::Parser::CheckSchemaValidity() const
}
#endif // CHIP_CONFIG_IM_ENABLE_SCHEMA_CHECK

EventFilterIB::Builder & EventFilters::Builder::CreateEventFilter()
EventFilterIB::Builder & EventFilterIBs::Builder::CreateEventFilter()
{
mError = mEventFilter.Init(mpWriter);
return mEventFilter;
}

EventFilters::Builder & EventFilters::Builder::EndOfEventFilters()
EventFilterIBs::Builder & EventFilterIBs::Builder::EndOfEventFilters()
{
EndOfContainer();
return *this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* This file defines EventFilters parser and builder in CHIP interaction model
*
*/

#pragma once

Expand All @@ -35,7 +30,7 @@

namespace chip {
namespace app {
namespace EventFilters {
namespace EventFilterIBs {
class Parser : public ArrayParser
{
public:
Expand Down Expand Up @@ -73,15 +68,15 @@ class Builder : public ArrayBuilder
EventFilterIB::Builder & GetEventFilter() { return mEventFilter; };

/**
* @brief Mark the end of this EventFilters
* @brief Mark the end of this EventFilterIBs
*
* @return A reference to *this
*/
EventFilters::Builder & EndOfEventFilters();
EventFilterIBs::Builder & EndOfEventFilters();

private:
EventFilterIB::Builder mEventFilter;
};
}; // namespace EventFilters
}; // namespace EventFilterIBs
}; // namespace app
}; // namespace chip
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* This file defines EventPaths parser and builder in CHIP interaction model
*
*/

#include "EventPaths.h"
#include "EventPathIBs.h"

#include "MessageDefHelper.h"

Expand All @@ -34,16 +29,16 @@
namespace chip {
namespace app {
#if CHIP_CONFIG_IM_ENABLE_SCHEMA_CHECK
CHIP_ERROR EventPaths::Parser::CheckSchemaValidity() const
CHIP_ERROR EventPathIBs::Parser::CheckSchemaValidity() const
{
CHIP_ERROR err = CHIP_NO_ERROR;
size_t NumPath = 0;
TLV::TLVReader reader;

PRETTY_PRINT("EventPaths =");
PRETTY_PRINT("EventPathIBs =");
PRETTY_PRINT("[");

// make a copy of the EventPaths reader
// make a copy of the EventPathIBs reader
reader.Init(mReader);

while (CHIP_NO_ERROR == (err = reader.Next()))
Expand Down Expand Up @@ -77,7 +72,7 @@ CHIP_ERROR EventPaths::Parser::CheckSchemaValidity() const
}
#endif // CHIP_CONFIG_IM_ENABLE_SCHEMA_CHECK

EventPathIB::Builder & EventPaths::Builder::CreatePath()
EventPathIB::Builder & EventPathIBs::Builder::CreatePath()
{
if (mError == CHIP_NO_ERROR)
{
Expand All @@ -86,7 +81,7 @@ EventPathIB::Builder & EventPaths::Builder::CreatePath()
return mEventPath;
}

EventPaths::Builder & EventPaths::Builder::EndOfEventPaths()
EventPathIBs::Builder & EventPathIBs::Builder::EndOfEventPaths()
{
EndOfContainer();
return *this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* This file defines EventPaths parser and builder in CHIP interaction model
*
*/

#pragma once

#include "ArrayBuilder.h"
#include "ArrayParser.h"
#include "EventPathIB.h"
#include "EventPaths.h"
#include "EventPathIBs.h"

#include <app/AppBuildConfig.h>
#include <app/util/basic-types.h>
Expand All @@ -37,7 +32,7 @@

namespace chip {
namespace app {
namespace EventPaths {
namespace EventPathIBs {
class Parser : public ArrayParser
{
public:
Expand Down Expand Up @@ -70,15 +65,15 @@ class Builder : public ArrayBuilder
EventPathIB::Builder & CreatePath();

/**
* @brief Mark the end of this EventPaths
* @brief Mark the end of this EventPathIBs
*
* @return A reference to *this
*/
EventPaths::Builder & EndOfEventPaths();
EventPathIBs::Builder & EndOfEventPaths();

private:
EventPathIB::Builder mEventPath;
};
} // namespace EventPaths
} // namespace EventPathIBs
} // namespace app
} // namespace chip
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
*/
/**
* @file
* This file defines EventReports parser and builder in CHIP interaction model
* This file defines EventReportIBs parser and builder in CHIP interaction model
*
*/

#include "EventReports.h"
#include "EventReportIBs.h"
#include "MessageDefHelper.h"

#include <inttypes.h>
Expand All @@ -33,13 +33,13 @@
namespace chip {
namespace app {
#if CHIP_CONFIG_IM_ENABLE_SCHEMA_CHECK
CHIP_ERROR EventReports::Parser::CheckSchemaValidity() const
CHIP_ERROR EventReportIBs::Parser::CheckSchemaValidity() const
{
CHIP_ERROR err = CHIP_NO_ERROR;
size_t numEventReports = 0;
TLV::TLVReader reader;

PRETTY_PRINT("EventReports =");
PRETTY_PRINT("EventReportIBs =");
PRETTY_PRINT("[");

// make a copy of the reader
Expand Down Expand Up @@ -82,7 +82,7 @@ CHIP_ERROR EventReports::Parser::CheckSchemaValidity() const
}
#endif // CHIP_CONFIG_IM_ENABLE_SCHEMA_CHECK

EventReportIB::Builder & EventReports::Builder::CreateEventReport()
EventReportIB::Builder & EventReportIBs::Builder::CreateEventReport()
{
if (mError == CHIP_NO_ERROR)
{
Expand All @@ -91,7 +91,7 @@ EventReportIB::Builder & EventReports::Builder::CreateEventReport()
return mEventReport;
}

EventReports::Builder & EventReports::Builder::EndOfEventReports()
EventReportIBs::Builder & EventReportIBs::Builder::EndOfEventReports()
{
EndOfContainer();
return *this;
Expand Down
Loading

0 comments on commit 1305954

Please sign in to comment.