Skip to content

Commit

Permalink
Address review comment.
Browse files Browse the repository at this point in the history
  • Loading branch information
bzbarsky-apple committed Sep 2, 2022
1 parent 65f28f0 commit 8bf1fec
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/darwin/Framework/CHIP/MTRBaseSubscriptionCallback.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ class MTRBaseSubscriptionCallback : public chip::app::ClusterStateCache::Callbac
, mAttributeReportCallback(attributeReportCallback)
, mEventReportCallback(eventReportCallback)
, mErrorCallback(errorCallback)
, mSubscriptionEstablishedHandler(subscriptionEstablishedHandler)
, mResubscriptionCallback(resubscriptionCallback)
, mSubscriptionEstablishedHandler(subscriptionEstablishedHandler)
, mBufferedReadAdapter(*this)
, mOnDoneHandler(onDoneHandler)
{
Expand Down Expand Up @@ -123,8 +123,8 @@ class MTRBaseSubscriptionCallback : public chip::app::ClusterStateCache::Callbac
// We set mErrorCallback to nil when queueing error reports, so we
// make sure to only report one error.
ErrorCallback _Nullable mErrorCallback = nil;
SubscriptionEstablishedHandler _Nullable mSubscriptionEstablishedHandler = nil;
MTRDeviceResubscriptionScheduledHandler _Nullable mResubscriptionCallback = nil;
SubscriptionEstablishedHandler _Nullable mSubscriptionEstablishedHandler = nil;
chip::app::BufferedReadCallback mBufferedReadAdapter;

// Our lifetime management is a little complicated. On errors that don't
Expand Down
12 changes: 6 additions & 6 deletions src/darwin/Framework/CHIP/MTRDevice.mm
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ - (id)strongObject
class SubscriptionCallback final : public MTRBaseSubscriptionCallback {
public:
SubscriptionCallback(dispatch_queue_t queue, DataReportCallback attributeReportCallback, DataReportCallback eventReportCallback,
ErrorCallback errorCallback, SubscriptionEstablishedHandler subscriptionEstablishedHandler,
MTRDeviceResubscriptionScheduledHandler resubscriptionCallback, OnDoneHandler onDoneHandler)
ErrorCallback errorCallback, MTRDeviceResubscriptionScheduledHandler resubscriptionCallback,
SubscriptionEstablishedHandler subscriptionEstablishedHandler, OnDoneHandler onDoneHandler)
: MTRBaseSubscriptionCallback(queue, attributeReportCallback, eventReportCallback, errorCallback, resubscriptionCallback,
subscriptionEstablishedHandler, onDoneHandler)
{
Expand Down Expand Up @@ -327,14 +327,14 @@ - (void)subscribeWithMinInterval:(uint16_t)minInterval maxInterval:(uint16_t)max
// OnError
[self _handleSubscriptionError:error];
},
^(void) {
// OnSubscriptionEstablished
[self _handleSubscriptionEstablished];
},
^(NSError * error, NSNumber * resubscriptionDelay) {
// OnResubscriptionNeeded
[self _handleResubscriptionNeeded];
},
^(void) {
// OnSubscriptionEstablished
[self _handleSubscriptionEstablished];
},
^(void) {
// OnDone
[self _handleSubscriptionReset];
Expand Down

0 comments on commit 8bf1fec

Please sign in to comment.