| 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) { |
| 325 | if (!on_device(child_device, callbackContext)) { |
| 326 | break; |
| 327 | } |
| 328 | } |
| 329 | } |
| 330 | |
| 331 | size_t device_get_child_count(Device* device) { |
| 332 | return device->internal->children.size(); |