--- /dev/null
+/** @file vbox_V6_0.c
+ * C file to include support for multiple versions of VirtualBox
+ * at runtime.
+ */
+
+#include <config.h>
+
+/** The API Version */
+#define VBOX_API_VERSION 6000000
+/** Version specific prefix. */
+#define NAME(name) vbox60##name
+
+#include "vbox_tmpl.c"
result = 0; \
if (uVersion >= 5001051 && uVersion < 5002051) { \
vbox52InstallUniformedAPI(&gVBoxAPI); \
+ } else if (uVersion >= 6000000 && uVersion < 6000051) { \
+ vbox60InstallUniformedAPI(&gVBoxAPI); \
} else { \
result = -1; \
} \
*/
if (uVersion >= 5001051 && uVersion < 5002051) {
vbox52InstallUniformedAPI(&gVBoxAPI);
+ } else if (uVersion >= 6000000 && uVersion < 6000051) {
+ vbox60InstallUniformedAPI(&gVBoxAPI);
} else {
return NULL;
}
/* This one changes from version to version. */
#if VBOX_API_VERSION == 5002000
# include "vbox_CAPI_v5_2.h"
+#elif VBOX_API_VERSION == 6000000
+# include "vbox_CAPI_v6_0.h"
#else
-# error "Unsupport VBOX_API_VERSION"
+# error "Unsupported VBOX_API_VERSION"
#endif
/* Include this *last* or we'll get the wrong vbox_CAPI_*.h. */
PRUnichar *hostPath, PRBool writable,
PRBool automount G_GNUC_UNUSED)
{
+#if VBOX_API_VERSION >= 6000000
+ return machine->vtbl->CreateSharedFolder(machine, name, hostPath,
+ writable, automount, NULL);
+#else
return machine->vtbl->CreateSharedFolder(machine, name, hostPath,
writable, automount);
+#endif
}
static nsresult