| 485 | } |
| 486 | |
| 487 | std::vector<std::shared_ptr<BundlePrivate>> |
| 488 | BundleRegistry::GetActiveBundles() const |
| 489 | { |
| 490 | CheckIllegalState(); |
| 491 | std::vector<std::shared_ptr<BundlePrivate>> result; |
| 492 | |
| 493 | auto l = bundles.Lock(); |
| 494 | US_UNUSED(l); |
| 495 | for (auto& b : bundles.v) |
| 496 | { |
| 497 | auto s = b.second->state.load(); |
| 498 | if (s == Bundle::STATE_ACTIVE || s == Bundle::STATE_STARTING) |
| 499 | { |
| 500 | result.push_back(b.second); |
| 501 | } |
| 502 | } |
| 503 | return result; |
| 504 | } |
| 505 | |
| 506 | void |
| 507 | BundleRegistry::Load() |