@@ -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,26 @@ 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 the callback when the check-in 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 Unset the callback when the check-in completes.
64
64
*
65
- * The unregisteration will be processed inside CHIP main loop .
65
+ * This method does not consider the race condition that the callback is changed during OnCheckInComplete .
66
66
*
67
67
* @param[in] handler - A pointer to CheckInCompleteCallback to unregister.
68
68
*/
69
- void UnregisterOnCheckInCompleteCallback (CheckInCompleteCallback * handler );
69
+ void UnsetOnCheckInCompleteCallback ( );
70
70
71
71
private:
72
72
chip::app::ICDClientStorage * mpStorage = nullptr ;
73
73
chip::app::InteractionModelEngine * mpImEngine = nullptr ;
74
74
75
- std::set< CheckInCompleteCallback *> mCheckInCompleteCallbacks ;
75
+ CheckInCompleteCallback * mpCheckInCompleteCallbacks ;
76
76
};
0 commit comments