summaryrefslogtreecommitdiffhomepage
path: root/mixlib
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2001-05-30 22:15:15 +0000
committerJose Antonio Ortega Ruiz <jao@gnu.org>2001-05-30 22:15:15 +0000
commit1d578c635f759a426e86944e351779ac581f3fda (patch)
tree04b786aee9c1bfc29d7f7b6a7db60c407d2a6fd8 /mixlib
parentb5f7d4a0d39ee53414adf6893a836f12f20ba362 (diff)
downloadmdk-1d578c635f759a426e86944e351779ac581f3fda.tar.gz
mdk-1d578c635f759a426e86944e351779ac581f3fda.tar.bz2
binary devices output formats added
Diffstat (limited to 'mixlib')
-rw-r--r--mixlib/mix_vm.c9
-rw-r--r--mixlib/mix_vm.h5
2 files changed, 14 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)
diff --git a/mixlib/mix_vm.h b/mixlib/mix_vm.h
index c4663bc..a8b826e 100644
--- a/mixlib/mix_vm.h
+++ b/mixlib/mix_vm.h
@@ -51,6 +51,11 @@ mix_vm_delete(mix_vm_t * vm);
extern mix_device_t * /* previously connected device */
mix_vm_connect_device (mix_vm_t *vm, mix_device_t *device);
+/* get device */
+extern mix_device_t *
+mix_vm_get_device (const mix_vm_t *vm, mix_device_type_t dev);
+
+
/* install a device factory for automatic connection */
typedef mix_device_t * (* mix_device_factory_t) (mix_device_type_t device);
extern void