summaryrefslogtreecommitdiffhomepage
path: root/mixlib/mix_vm.c
diff options
context:
space:
mode:
Diffstat (limited to 'mixlib/mix_vm.c')
-rw-r--r--mixlib/mix_vm.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/mixlib/mix_vm.c b/mixlib/mix_vm.c
index 4446bcf..9816cb5 100644
--- a/mixlib/mix_vm.c
+++ b/mixlib/mix_vm.c
@@ -124,6 +124,15 @@ mix_vm_connect_device (mix_vm_t *vm, mix_device_t *device)
return old;
}
+/* get device */
+mix_device_t *
+mix_vm_get_device (const mix_vm_t *vm, mix_device_type_t dev)
+{
+ g_return_val_if_fail (vm != NULL, NULL);
+ g_return_val_if_fail (dev < mix_dev_INVALID, NULL);
+ return vm->devices[dev];
+}
+
/* install a device factory for automatic connection */
void
mix_vm_set_device_factory (mix_vm_t *vm, mix_device_factory_t factory)