| 67 | } |
| 68 | |
| 69 | bool DataStorageService::SetActiveDataStorage(const std::string& label) |
| 70 | { |
| 71 | std::lock_guard<std::mutex> lock(m_Mutex); |
| 72 | |
| 73 | if (label.empty() || label == DEFAULT_LABEL) |
| 74 | { |
| 75 | m_ActiveLabel.clear(); |
| 76 | return true; |
| 77 | } |
| 78 | |
| 79 | // Check that the label exists |
| 80 | if (this->FindStorageByLabel(label).IsValid()) |
| 81 | { |
| 82 | m_ActiveLabel = label; |
| 83 | return true; |
| 84 | } |
| 85 | |
| 86 | return false; |
| 87 | } |
| 88 | |
| 89 | bool DataStorageService::AddDataStorage(const std::string& label, DataStorage::Pointer storage) |
| 90 | { |