@@ -105,6 +105,7 @@ void InteractionModelEngine::Shutdown()
105
105
106
106
mReadHandlers .ReleaseAll ();
107
107
108
+ #if CHIP_CONFIG_ENABLE_READ_CLIENT
108
109
// Shut down any subscription clients that are still around. They won't be
109
110
// able to work after this point anyway, since we're about to drop our refs
110
111
// to them.
@@ -131,6 +132,7 @@ void InteractionModelEngine::Shutdown()
131
132
// After that, we just null out our tracker.
132
133
//
133
134
mpActiveReadClientList = nullptr ;
135
+ #endif // CHIP_CONFIG_ENABLE_READ_CLIENT
134
136
135
137
for (auto & writeHandler : mWriteHandlers )
136
138
{
@@ -251,6 +253,7 @@ uint32_t InteractionModelEngine::GetNumActiveWriteHandlers() const
251
253
return numActive;
252
254
}
253
255
256
+ #if CHIP_CONFIG_ENABLE_READ_CLIENT
254
257
CHIP_ERROR InteractionModelEngine::ShutdownSubscription (const ScopedNodeId & aPeerNodeId, SubscriptionId aSubscriptionId)
255
258
{
256
259
assertChipStackLockedByCurrentThread ();
@@ -308,6 +311,7 @@ void InteractionModelEngine::ShutdownMatchingSubscriptions(const Optional<Fabric
308
311
readClient = nextClient;
309
312
}
310
313
}
314
+ #endif // CHIP_CONFIG_ENABLE_READ_CLIENT
311
315
312
316
void InteractionModelEngine::OnDone (CommandHandler & apCommandObj)
313
317
{
@@ -780,6 +784,7 @@ CHIP_ERROR InteractionModelEngine::OnTimedRequest(Messaging::ExchangeContext * a
780
784
return handler->OnMessageReceived (apExchangeContext, aPayloadHeader, std::move (aPayload));
781
785
}
782
786
787
+ #if CHIP_CONFIG_ENABLE_READ_CLIENT
783
788
Status InteractionModelEngine::OnUnsolicitedReportData (Messaging::ExchangeContext * apExchangeContext,
784
789
const PayloadHeader & aPayloadHeader, System::PacketBufferHandle && aPayload)
785
790
{
@@ -835,6 +840,7 @@ Status InteractionModelEngine::OnUnsolicitedReportData(Messaging::ExchangeContex
835
840
836
841
return Status::InvalidSubscription;
837
842
}
843
+ #endif // CHIP_CONFIG_ENABLE_READ_CLIENT
838
844
839
845
CHIP_ERROR InteractionModelEngine::OnUnsolicitedMessageReceived (const PayloadHeader & payloadHeader,
840
846
ExchangeDelegate *& newDelegate)
@@ -878,10 +884,12 @@ CHIP_ERROR InteractionModelEngine::OnMessageReceived(Messaging::ExchangeContext
878
884
status =
879
885
OnReadInitialRequest (apExchangeContext, aPayloadHeader, std::move (aPayload), ReadHandler::InteractionType::Subscribe);
880
886
}
887
+ #if CHIP_CONFIG_ENABLE_READ_CLIENT
881
888
else if (aPayloadHeader.HasMessageType (Protocols::InteractionModel::MsgType::ReportData))
882
889
{
883
890
status = OnUnsolicitedReportData (apExchangeContext, aPayloadHeader, std::move (aPayload));
884
891
}
892
+ #endif // CHIP_CONFIG_ENABLE_READ_CLIENT
885
893
else if (aPayloadHeader.HasMessageType (MsgType::TimedRequest))
886
894
{
887
895
OnTimedRequest (apExchangeContext, aPayloadHeader, std::move (aPayload), status);
@@ -906,11 +914,13 @@ void InteractionModelEngine::OnResponseTimeout(Messaging::ExchangeContext * ec)
906
914
ChipLogValueExchange (ec));
907
915
}
908
916
917
+ #if CHIP_CONFIG_ENABLE_READ_CLIENT
909
918
void InteractionModelEngine::AddReadClient (ReadClient * apReadClient)
910
919
{
911
920
apReadClient->SetNextClient (mpActiveReadClientList);
912
921
mpActiveReadClientList = apReadClient;
913
922
}
923
+ #endif // CHIP_CONFIG_ENABLE_READ_CLIENT
914
924
915
925
bool InteractionModelEngine::TrimFabricForSubscriptions (FabricIndex aFabricIndex, bool aForceEvict)
916
926
{
@@ -1308,6 +1318,7 @@ Protocols::InteractionModel::Status InteractionModelEngine::EnsureResourceForRea
1308
1318
return Status::Success;
1309
1319
}
1310
1320
1321
+ #if CHIP_CONFIG_ENABLE_READ_CLIENT
1311
1322
void InteractionModelEngine::RemoveReadClient (ReadClient * apReadClient)
1312
1323
{
1313
1324
ReadClient * pPrevListItem = nullptr ;
@@ -1366,6 +1377,7 @@ bool InteractionModelEngine::InActiveReadClientList(ReadClient * apReadClient)
1366
1377
1367
1378
return false ;
1368
1379
}
1380
+ #endif // CHIP_CONFIG_ENABLE_READ_CLIENT
1369
1381
1370
1382
bool InteractionModelEngine::HasConflictWriteRequests (const WriteHandler * apWriteHandler, const ConcreteAttributePath & aPath)
1371
1383
{
@@ -1724,6 +1736,7 @@ void InteractionModelEngine::OnFabricRemoved(const FabricTable & fabricTable, Fa
1724
1736
return Loop::Continue;
1725
1737
});
1726
1738
1739
+ #if CHIP_CONFIG_ENABLE_READ_CLIENT
1727
1740
for (auto * readClient = mpActiveReadClientList; readClient != nullptr ; readClient = readClient->GetNextClient ())
1728
1741
{
1729
1742
if (readClient->GetFabricIndex () == fabricIndex)
@@ -1732,6 +1745,7 @@ void InteractionModelEngine::OnFabricRemoved(const FabricTable & fabricTable, Fa
1732
1745
readClient->Close (CHIP_ERROR_IM_FABRIC_DELETED, false );
1733
1746
}
1734
1747
}
1748
+ #endif // CHIP_CONFIG_ENABLE_READ_CLIENT
1735
1749
1736
1750
for (auto & handler : mWriteHandlers )
1737
1751
{
0 commit comments