| 680 | } |
| 681 | |
| 682 | void |
| 683 | Singleton::syncBookmarks(void) |
| 684 | { |
| 685 | ConfigContext ctx("bookmarks"); |
| 686 | Object list = ctx.listObject(); |
| 687 | |
| 688 | // Sync all modified configurations |
| 689 | for (auto p : this->bookmarks.keys()) { |
| 690 | if (this->bookmarks[p].entry == -1) { |
| 691 | try { |
| 692 | Object obj(SUSCAN_OBJECT_TYPE_OBJECT); |
| 693 | |
| 694 | obj.set("name", this->bookmarks[p].info.name.toStdString()); |
| 695 | obj.set("frequency", static_cast<double>(this->bookmarks[p].info.frequency)); |
| 696 | obj.set("color", this->bookmarks[p].info.color.name().toStdString()); |
| 697 | obj.set("low_freq_cut", this->bookmarks[p].info.lowFreqCut); |
| 698 | obj.set("high_freq_cut", this->bookmarks[p].info.highFreqCut); |
| 699 | obj.set("modulation", this->bookmarks[p].info.modulation.toStdString()); |
| 700 | |
| 701 | list.append(std::move(obj)); |
| 702 | } catch (Suscan::Exception const &) { |
| 703 | } |
| 704 | } |
| 705 | } |
| 706 | } |
| 707 | |
| 708 | void |
| 709 | Singleton::killBackgroundTaskController(void) |
no test coverage detected