| 202 | } |
| 203 | |
| 204 | std::optional<RemoteSessionFile> |
| 205 | RemoteSessionManager::find(const std::string &session_name) const { |
| 206 | for (const auto &i : sessions_) { |
| 207 | if (i.session_name() == session_name) |
| 208 | return i; |
| 209 | } |
| 210 | |
| 211 | return {}; |
| 212 | } |
| 213 | |
| 214 | void RemoteSessionManager::add_session_file(const RemoteSessionFile rsm) { |
| 215 | sessions_.emplace_front(rsm); |