| 140 | } |
| 141 | |
| 142 | Expected<std::vector<PathedEntry>> listAllEntries( const std::vector<std::string>& rootPath ) |
| 143 | { |
| 144 | auto groupEx = findGroup( rootPath ); |
| 145 | if ( !groupEx ) |
| 146 | return unexpected( groupEx.error() ); |
| 147 | const auto& group = **groupEx; |
| 148 | |
| 149 | std::vector<PathedEntry> ret; |
| 150 | std::vector<std::string> pathStack = rootPath; |
| 151 | for ( const auto& [childName, childEntry] : group.elems ) |
| 152 | { |
| 153 | pathStack.push_back( childName ); |
| 154 | walkAll( pathStack, childEntry, ret ); |
| 155 | pathStack.pop_back(); |
| 156 | } |
| 157 | return ret; |
| 158 | } |
| 159 | |
| 160 | Expected<std::string> pressButton( const std::vector<std::string>& path ) |
| 161 | { |