Skip to content

Commit

Permalink
Update some more TargetInfo structures after #24498 (#24558)
Browse files Browse the repository at this point in the history
* Update some more TargetInfo structures after #24498

* Fix class reference: manual java class name was not updated
  • Loading branch information
andy31415 authored and pull[bot] committed Jul 26, 2023
1 parent 3574411 commit 1057338
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ CHIP_ERROR TargetNavigatorManager::HandleGetTargetList(AttributeValueEncoder & a
if (value[attrId].isArray())
{
return aEncoder.EncodeList([&](const auto & encoder) -> CHIP_ERROR {
int i = 0;
std::string targetId = to_string(
static_cast<uint32_t>(chip::app::Clusters::TargetNavigator::Structs::TargetInfo::Fields::kIdentifier));
int i = 0;
std::string targetId = to_string(static_cast<uint32_t>(
chip::app::Clusters::TargetNavigator::Structs::TargetInfoStruct::Fields::kIdentifier));
std::string targetName = to_string(
static_cast<uint32_t>(chip::app::Clusters::TargetNavigator::Structs::TargetInfo::Fields::kName));
static_cast<uint32_t>(chip::app::Clusters::TargetNavigator::Structs::TargetInfoStruct::Fields::kName));
for (Json::Value & entry : value[attrId])
{
if (!entry[targetId].isUInt() || !entry[targetName].isString() || entry[targetId].asUInt() > 255)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ jobject TargetListSuccessHandlerJNI::ConvertToJObject(
auto iter = responseData.begin();
while (iter.Next())
{
const chip::app::Clusters::TargetNavigator::Structs::TargetInfo::DecodableType & targetInfo = iter.GetValue();
const chip::app::Clusters::TargetNavigator::Structs::TargetInfoStruct::DecodableType & targetInfo = iter.GetValue();

jclass responseTypeClass = nullptr;
CHIP_ERROR err =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1637,12 +1637,12 @@ - (void)targetNavigator_subscribeTargetList:(ContentApp * _Nonnull)contentApp
objCTargetList = [NSMutableArray arrayWithCapacity:targetInfoCount];
auto iter = targetList.begin();
while (iter.Next()) {
const chip::app::Clusters::TargetNavigator::Structs::TargetInfo::DecodableType & targetInfo
const chip::app::Clusters::TargetNavigator::Structs::TargetInfoStruct::DecodableType & targetInfo
= iter.GetValue();
TargetNavigator_TargetInfo * objCTargetInfo = [[TargetNavigator_TargetInfo alloc]
TargetNavigator_TargetInfoStruct * objCTargetInfo = [[TargetNavigator_TargetInfoStruct alloc]
initWithIdentifier:@(targetInfo.identifier)
name:[NSString stringWithUTF8String:targetInfo.name.data()]];
[objCTargetList addObject:objCTargetInfo];
[objCTargetList addObject:objCTargetInfoStruct];
}
}
callback(objCTargetList);
Expand Down

0 comments on commit 1057338

Please sign in to comment.