Store a copy of the last known name and address to use for lost devices.

This commit is contained in:
Vibhav Pant
2023-08-29 20:27:23 +05:30
parent 366c57fe12
commit 429e60cdd5
2 changed files with 38 additions and 4 deletions
@@ -53,6 +53,10 @@ private:
absl::Mutex pair_callback_lock_;
absl::AnyInvocable<void(const sdbus::Error *)> on_pair_reply_cb_ =
DefaultCallback<const sdbus::Error *>();
mutable absl::Mutex properties_mutex_;
mutable std::string last_known_name_ ABSL_GUARDED_BY(properties_mutex_);
mutable std::string last_known_address_ ABSL_GUARDED_BY(properties_mutex_);
};
class MonitoredBluetoothDevice