diff --git a/src/app/OperationalSessionSetup.h b/src/app/OperationalSessionSetup.h index 2eb86c25f6c1f4..825278ab771cab 100644 --- a/src/app/OperationalSessionSetup.h +++ b/src/app/OperationalSessionSetup.h @@ -225,7 +225,7 @@ class DLL_EXPORT OperationalSessionSetup : public SessionDelegate, void OnNodeAddressResolutionFailed(const PeerId & peerId, CHIP_ERROR reason) override; private: - enum class State + enum class State : uint8_t { Uninitialized, // Error state: OperationalSessionSetup is useless NeedsAddress, // No address known, lookup not started yet. @@ -247,10 +247,6 @@ class DLL_EXPORT OperationalSessionSetup : public SessionDelegate, Transport::PeerAddress mDeviceAddress = Transport::PeerAddress::UDP(Inet::IPAddress::Any); - void MoveToState(State aTargetState); - - State mState = State::Uninitialized; - SessionHolderWithDelegate mSecureSession; Callback::CallbackDeque mConnectionSuccess; @@ -261,8 +257,12 @@ class DLL_EXPORT OperationalSessionSetup : public SessionDelegate, /// This is used when a node address is required. chip::AddressResolve::NodeLookupHandle mAddressLookupHandle; + State mState = State::Uninitialized; + bool mPerformingAddressUpdate = false; + void MoveToState(State aTargetState); + CHIP_ERROR EstablishConnection(const ReliableMessageProtocolConfig & config); /*