@@ -32,7 +32,7 @@ class CheckInCompleteCallback
32
32
/* *
33
33
* @brief Callback used to let the application know that a check-in message was received and validated.
34
34
*
35
- * The callback will be executed in CHIP main loop. Implementations avoid blocking in this callback.
35
+ * The callback will be executed in CHIP main loop. Implementations should avoid blocking operations in this callback.
36
36
*
37
37
* @param[in] clientInfo - ICDClientInfo object representing the state associated with the
38
38
* node that sent the check-in message.
@@ -51,26 +51,24 @@ class ChipToolCheckInDelegate : public chip::app::CheckInDelegate
51
51
void OnKeyRefreshDone (chip::app::RefreshKeySender * refreshKeySender, CHIP_ERROR error) override ;
52
52
53
53
/* *
54
- * @brief Reigsters a callback when the check-in completes.
54
+ * @brief Sets a callback for when the Check-In processing completes.
55
55
*
56
- * The registeration will be processed inside CHIP main loop .
56
+ * This method does not consider the race condition that the callback is changed during OnCheckInComplete .
57
57
*
58
58
* @param[in] handler - A pointer to CheckInCompleteCallback to register.
59
59
*/
60
- void RegisterOnCheckInCompleteCallback (CheckInCompleteCallback * handler);
60
+ void SetOnCheckInCompleteCallback (CheckInCompleteCallback * handler);
61
61
62
62
/* *
63
- * @brief Unreigsters a callback when the check-in completes.
63
+ * @brief Unsets the callback for when the Check-In processing completes.
64
64
*
65
- * The unregisteration will be processed inside CHIP main loop.
66
- *
67
- * @param[in] handler - A pointer to CheckInCompleteCallback to unregister.
65
+ * This method does not consider the race condition that the callback is changed during OnCheckInComplete.
68
66
*/
69
- void UnregisterOnCheckInCompleteCallback (CheckInCompleteCallback * handler );
67
+ void UnsetOnCheckInCompleteCallback ( );
70
68
71
69
private:
72
70
chip::app::ICDClientStorage * mpStorage = nullptr ;
73
71
chip::app::InteractionModelEngine * mpImEngine = nullptr ;
74
72
75
- std::set< CheckInCompleteCallback *> mCheckInCompleteCallbacks ;
73
+ CheckInCompleteCallback * mpCheckInCompleteCallbacks ;
76
74
};
0 commit comments