| 311 | } |
| 312 | |
| 313 | void device_for_each(void* callback_context, bool(*on_device)(Device* device, void* context)) { |
| 314 | ledger_lock(); |
| 315 | for (auto* device : ledger.devices) { |
| 316 | if (!on_device(device, callback_context)) { |
| 317 | break; |
| 318 | } |
| 319 | } |
| 320 | ledger_unlock(); |
| 321 | } |
| 322 | |
| 323 | void device_for_each_child(Device* device, void* callbackContext, bool(*on_device)(struct Device* device, void* context)) { |
| 324 | for (auto* child_device : device->internal->children) { |
no outgoing calls
no test coverage detected