| 41 | } |
| 42 | |
| 43 | void StartSample::list_samples(bool one_per_line) const |
| 44 | { |
| 45 | auto samples = apps::get_samples(); |
| 46 | |
| 47 | LOGI(""); |
| 48 | LOGI("Available Samples"); |
| 49 | LOGI(""); |
| 50 | |
| 51 | for (auto *app : samples) |
| 52 | { |
| 53 | auto sample = reinterpret_cast<apps::SampleInfo *>(app); |
| 54 | if (one_per_line) |
| 55 | { |
| 56 | LOGI("{}", sample->id.c_str()); |
| 57 | } |
| 58 | else |
| 59 | { |
| 60 | LOGI("{}", sample->name.c_str()); |
| 61 | LOGI("\tid: {}", sample->id.c_str()); |
| 62 | LOGI("\tdescription: {}", sample->description.c_str()); |
| 63 | LOGI(""); |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | platform->close(); |
| 68 | } |
| 69 | |
| 70 | bool StartSample::handle_command(std::deque<std::string> &arguments) const |
| 71 | { |