[PATCH 66/66] vbox: Introducing vboxCommonDriver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



After this patch, we will have only one common domain driver.
So, the rewritten on domain driver is finished in this patch.
---
 src/vbox/README               |    7 +-
 src/vbox/vbox_common.c        |  257 +++++++++++++++++++++++++++--------------
 src/vbox/vbox_driver.c        |   28 ++---
 src/vbox/vbox_tmpl.c          |   80 -------------
 src/vbox/vbox_uniformed_api.h |  103 -----------------
 5 files changed, 186 insertions(+), 289 deletions(-)

diff --git a/src/vbox/README b/src/vbox/README
index 6e88ae6..0551db9 100644
--- a/src/vbox/README
+++ b/src/vbox/README
@@ -37,7 +37,12 @@ The file which has version dependent changes and includes the template
 file for given below for all of its functionality.
 
 vbox_tmpl.c
-The file where all the real driver implementation code exists.
+The file contains all version specified codes. It implements the
+vboxUniformedAPI for each vbox version.
+
+vbox_common.c
+The file implement the common driver, with the uniformed api which
+defined in vbox_uniformed_api.h and implemented in vbox_tmpl.c
 
 Now there would be a vbox_V*.c file (for eg: vbox_V2_2.c for V2.2) for
 each major virtualbox version which would do some preprocessor magic
diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c
index c05fd6a..edd3eef 100644
--- a/src/vbox/vbox_common.c
+++ b/src/vbox/vbox_common.c
@@ -121,6 +121,9 @@ if (!data->vboxObj) {\
 /* global vbox API, used for all common codes. */
 static vboxUniformedAPI gVBoxAPI;
 
+/* update the virDriver according to the vboxUniformedAPI */
+static void updateDriver(void);
+
 int vboxRegisterUniformedAPI(uint32_t uVersion)
 {
     /* Install gVBoxAPI according to the vbox API version.
@@ -149,6 +152,7 @@ int vboxRegisterUniformedAPI(uint32_t uVersion)
     } else {
         return -1;
     }
+    updateDriver();
     return 0;
 }
 
@@ -461,9 +465,10 @@ static void vboxUninitialize(vboxGlobalData *data)
     VIR_FREE(data);
 }
 
-virDrvOpenStatus vboxConnectOpen(virConnectPtr conn,
-                                 virConnectAuthPtr auth ATTRIBUTE_UNUSED,
-                                 unsigned int flags)
+static virDrvOpenStatus
+vboxConnectOpen(virConnectPtr conn,
+                virConnectAuthPtr auth ATTRIBUTE_UNUSED,
+                unsigned int flags)
 {
     vboxGlobalData *data = NULL;
     uid_t uid = geteuid();
@@ -532,7 +537,7 @@ virDrvOpenStatus vboxConnectOpen(virConnectPtr conn,
     return VIR_DRV_OPEN_SUCCESS;
 }
 
-int vboxConnectClose(virConnectPtr conn)
+static int vboxConnectClose(virConnectPtr conn)
 {
     vboxGlobalData *data = conn->privateData;
     VIR_DEBUG("%s: in vboxClose", conn->driver->name);
@@ -543,7 +548,7 @@ int vboxConnectClose(virConnectPtr conn)
     return 0;
 }
 
-int
+static int
 vboxDomainSave(virDomainPtr dom, const char *path ATTRIBUTE_UNUSED)
 {
     VBOX_OBJECT_CHECK(dom->conn, int, -1);
@@ -604,7 +609,7 @@ static void vboxDriverUnlock(vboxGlobalData *data)
     virMutexUnlock(&data->lock);
 }
 
-int vboxConnectGetVersion(virConnectPtr conn, unsigned long *version)
+static int vboxConnectGetVersion(virConnectPtr conn, unsigned long *version)
 {
     vboxGlobalData *data = conn->privateData;
     VIR_DEBUG("%s: in vboxGetVersion", conn->driver->name);
@@ -616,29 +621,29 @@ int vboxConnectGetVersion(virConnectPtr conn, unsigned long *version)
     return 0;
 }
 
-char *vboxConnectGetHostname(virConnectPtr conn ATTRIBUTE_UNUSED)
+static char *vboxConnectGetHostname(virConnectPtr conn ATTRIBUTE_UNUSED)
 {
     return virGetHostname();
 }
 
-int vboxConnectIsSecure(virConnectPtr conn ATTRIBUTE_UNUSED)
+static int vboxConnectIsSecure(virConnectPtr conn ATTRIBUTE_UNUSED)
 {
     /* Driver is using local, non-network based transport */
     return 1;
 }
 
-int vboxConnectIsEncrypted(virConnectPtr conn ATTRIBUTE_UNUSED)
+static int vboxConnectIsEncrypted(virConnectPtr conn ATTRIBUTE_UNUSED)
 {
     /* No encryption is needed, or used on the local transport*/
     return 0;
 }
 
-int vboxConnectIsAlive(virConnectPtr conn ATTRIBUTE_UNUSED)
+static int vboxConnectIsAlive(virConnectPtr conn ATTRIBUTE_UNUSED)
 {
     return 1;
 }
 
-int
+static int
 vboxConnectGetMaxVcpus(virConnectPtr conn, const char *type ATTRIBUTE_UNUSED)
 {
     VBOX_OBJECT_CHECK(conn, int, -1);
@@ -662,7 +667,7 @@ vboxConnectGetMaxVcpus(virConnectPtr conn, const char *type ATTRIBUTE_UNUSED)
     return ret;
 }
 
-char *vboxConnectGetCapabilities(virConnectPtr conn)
+static char *vboxConnectGetCapabilities(virConnectPtr conn)
 {
     VBOX_OBJECT_CHECK(conn, char *, NULL);
 
@@ -673,7 +678,7 @@ char *vboxConnectGetCapabilities(virConnectPtr conn)
     return ret;
 }
 
-int vboxConnectListDomains(virConnectPtr conn, int *ids, int nids)
+static int vboxConnectListDomains(virConnectPtr conn, int *ids, int nids)
 {
     VBOX_OBJECT_CHECK(conn, int, -1);
     vboxArray machines = VBOX_ARRAY_INITIALIZER;
@@ -711,7 +716,7 @@ int vboxConnectListDomains(virConnectPtr conn, int *ids, int nids)
     return ret;
 }
 
-int vboxConnectNumOfDomains(virConnectPtr conn)
+static int vboxConnectNumOfDomains(virConnectPtr conn)
 {
     VBOX_OBJECT_CHECK(conn, int, -1);
     vboxArray machines = VBOX_ARRAY_INITIALIZER;
@@ -746,7 +751,7 @@ int vboxConnectNumOfDomains(virConnectPtr conn)
     return ret;
 }
 
-virDomainPtr vboxDomainLookupByID(virConnectPtr conn, int id)
+static virDomainPtr vboxDomainLookupByID(virConnectPtr conn, int id)
 {
     VBOX_OBJECT_CHECK(conn, virDomainPtr, NULL);
     vboxArray machines = VBOX_ARRAY_INITIALIZER;
@@ -892,7 +897,7 @@ virDomainPtr vboxDomainLookupByUUID(virConnectPtr conn,
     return ret;
 }
 
-virDomainPtr
+static virDomainPtr
 vboxDomainLookupByName(virConnectPtr conn, const char *name)
 {
     VBOX_OBJECT_CHECK(conn, virDomainPtr, NULL);
@@ -1873,7 +1878,7 @@ vboxAttachSharedFolder(virDomainDefPtr def, vboxGlobalData *data, IMachine *mach
     }
 }
 
-virDomainPtr vboxDomainDefineXML(virConnectPtr conn, const char *xml)
+static virDomainPtr vboxDomainDefineXML(virConnectPtr conn, const char *xml)
 {
     VBOX_OBJECT_CHECK(conn, virDomainPtr, NULL);
     IMachine       *machine     = NULL;
@@ -2042,7 +2047,7 @@ detachDevices_common(vboxGlobalData *data, vboxIIDUnion *iidu)
     VBOX_UTF16_FREE(hddcnameUtf16);
 }
 
-int vboxDomainUndefineFlags(virDomainPtr dom, unsigned int flags)
+static int vboxDomainUndefineFlags(virDomainPtr dom, unsigned int flags)
 {
     VBOX_OBJECT_CHECK(dom->conn, int, -1);
     IMachine *machine    = NULL;
@@ -2075,7 +2080,7 @@ int vboxDomainUndefineFlags(virDomainPtr dom, unsigned int flags)
     return ret;
 }
 
-int vboxDomainUndefine(virDomainPtr dom)
+static int vboxDomainUndefine(virDomainPtr dom)
 {
     return vboxDomainUndefineFlags(dom, 0);
 }
@@ -2231,7 +2236,7 @@ vboxStartMachine(virDomainPtr dom, int maxDomID, IMachine *machine, vboxIIDUnion
     return ret;
 }
 
-int vboxDomainCreateWithFlags(virDomainPtr dom, unsigned int flags)
+static int vboxDomainCreateWithFlags(virDomainPtr dom, unsigned int flags)
 {
     VBOX_OBJECT_CHECK(dom->conn, int, -1);
     vboxArray machines = VBOX_ARRAY_INITIALIZER;
@@ -2299,13 +2304,13 @@ int vboxDomainCreateWithFlags(virDomainPtr dom, unsigned int flags)
     return ret;
 }
 
-int vboxDomainCreate(virDomainPtr dom)
+static int vboxDomainCreate(virDomainPtr dom)
 {
     return vboxDomainCreateWithFlags(dom, 0);
 }
 
-virDomainPtr vboxDomainCreateXML(virConnectPtr conn, const char *xml,
-                                 unsigned int flags)
+static virDomainPtr vboxDomainCreateXML(virConnectPtr conn, const char *xml,
+                                        unsigned int flags)
 {
     /* VirtualBox currently doesn't have support for running
      * virtual machines without actually defining them and thus
@@ -2332,7 +2337,7 @@ virDomainPtr vboxDomainCreateXML(virConnectPtr conn, const char *xml,
     return dom;
 }
 
-int vboxDomainIsActive(virDomainPtr dom)
+static int vboxDomainIsActive(virDomainPtr dom)
 {
     VBOX_OBJECT_CHECK(dom->conn, int, -1);
     vboxArray machines = VBOX_ARRAY_INITIALIZER;
@@ -2398,7 +2403,7 @@ int vboxDomainIsActive(virDomainPtr dom)
     return ret;
 }
 
-int vboxDomainIsPersistent(virDomainPtr dom)
+static int vboxDomainIsPersistent(virDomainPtr dom)
 {
     /* All domains are persistent.  However, we do want to check for
      * existence. */
@@ -2417,7 +2422,7 @@ int vboxDomainIsPersistent(virDomainPtr dom)
     return ret;
 }
 
-int vboxDomainIsUpdated(virDomainPtr dom)
+static int vboxDomainIsUpdated(virDomainPtr dom)
 {
     /* VBox domains never have a persistent state that differs from
      * current state.  However, we do want to check for existence.  */
@@ -2436,7 +2441,7 @@ int vboxDomainIsUpdated(virDomainPtr dom)
     return ret;
 }
 
-int vboxDomainSuspend(virDomainPtr dom)
+static int vboxDomainSuspend(virDomainPtr dom)
 {
     VBOX_OBJECT_CHECK(dom->conn, int, -1);
     IMachine *machine    = NULL;
@@ -2483,7 +2488,7 @@ int vboxDomainSuspend(virDomainPtr dom)
     return ret;
 }
 
-int vboxDomainResume(virDomainPtr dom)
+static int vboxDomainResume(virDomainPtr dom)
 {
     VBOX_OBJECT_CHECK(dom->conn, int, -1);
     IMachine *machine    = NULL;
@@ -2530,7 +2535,7 @@ int vboxDomainResume(virDomainPtr dom)
     return ret;
 }
 
-int vboxDomainShutdownFlags(virDomainPtr dom, unsigned int flags)
+static int vboxDomainShutdownFlags(virDomainPtr dom, unsigned int flags)
 {
     VBOX_OBJECT_CHECK(dom->conn, int, -1);
     IMachine *machine    = NULL;
@@ -2578,12 +2583,12 @@ int vboxDomainShutdownFlags(virDomainPtr dom, unsigned int flags)
     return ret;
 }
 
-int vboxDomainShutdown(virDomainPtr dom)
+static int vboxDomainShutdown(virDomainPtr dom)
 {
     return vboxDomainShutdownFlags(dom, 0);
 }
 
-int vboxDomainReboot(virDomainPtr dom, unsigned int flags)
+static int vboxDomainReboot(virDomainPtr dom, unsigned int flags)
 {
     VBOX_OBJECT_CHECK(dom->conn, int, -1);
     IMachine *machine    = NULL;
@@ -2627,7 +2632,7 @@ int vboxDomainReboot(virDomainPtr dom, unsigned int flags)
     return ret;
 }
 
-int vboxDomainDestroyFlags(virDomainPtr dom, unsigned int flags)
+static int vboxDomainDestroyFlags(virDomainPtr dom, unsigned int flags)
 {
     VBOX_OBJECT_CHECK(dom->conn, int, -1);
     IMachine *machine    = NULL;
@@ -2672,12 +2677,12 @@ int vboxDomainDestroyFlags(virDomainPtr dom, unsigned int flags)
     return ret;
 }
 
-int vboxDomainDestroy(virDomainPtr dom)
+static int vboxDomainDestroy(virDomainPtr dom)
 {
     return vboxDomainDestroyFlags(dom, 0);
 }
 
-char *vboxDomainGetOSType(virDomainPtr dom ATTRIBUTE_UNUSED) {
+static char *vboxDomainGetOSType(virDomainPtr dom ATTRIBUTE_UNUSED) {
     /* Returning "hvm" always as suggested on list, cause
      * this functions seems to be badly named and it
      * is supposed to pass the ABI name and not the domain
@@ -2689,7 +2694,7 @@ char *vboxDomainGetOSType(virDomainPtr dom ATTRIBUTE_UNUSED) {
     return osType;
 }
 
-int vboxDomainSetMemory(virDomainPtr dom, unsigned long memory)
+static int vboxDomainSetMemory(virDomainPtr dom, unsigned long memory)
 {
     VBOX_OBJECT_CHECK(dom->conn, int, -1);
     IMachine *machine    = NULL;
@@ -2743,7 +2748,7 @@ int vboxDomainSetMemory(virDomainPtr dom, unsigned long memory)
     return ret;
 }
 
-int vboxDomainGetInfo(virDomainPtr dom, virDomainInfoPtr info)
+static int vboxDomainGetInfo(virDomainPtr dom, virDomainInfoPtr info)
 {
     VBOX_OBJECT_CHECK(dom->conn, int, -1);
     vboxArray machines = VBOX_ARRAY_INITIALIZER;
@@ -2822,8 +2827,8 @@ int vboxDomainGetInfo(virDomainPtr dom, virDomainInfoPtr info)
     return ret;
 }
 
-int vboxDomainGetState(virDomainPtr dom, int *state,
-                       int *reason, unsigned int flags)
+static int vboxDomainGetState(virDomainPtr dom, int *state,
+                              int *reason, unsigned int flags)
 {
     VBOX_OBJECT_CHECK(dom->conn, int, -1);
     vboxIIDUnion domiid;
@@ -2849,8 +2854,8 @@ int vboxDomainGetState(virDomainPtr dom, int *state,
     return ret;
 }
 
-int vboxDomainSetVcpusFlags(virDomainPtr dom, unsigned int nvcpus,
-                            unsigned int flags)
+static int vboxDomainSetVcpusFlags(virDomainPtr dom, unsigned int nvcpus,
+                                   unsigned int flags)
 {
     VBOX_OBJECT_CHECK(dom->conn, int, -1);
     IMachine *machine    = NULL;
@@ -2895,12 +2900,12 @@ int vboxDomainSetVcpusFlags(virDomainPtr dom, unsigned int nvcpus,
     return ret;
 }
 
-int vboxDomainSetVcpus(virDomainPtr dom, unsigned int nvcpus)
+static int vboxDomainSetVcpus(virDomainPtr dom, unsigned int nvcpus)
 {
     return vboxDomainSetVcpusFlags(dom, nvcpus, VIR_DOMAIN_AFFECT_LIVE);
 }
 
-int vboxDomainGetVcpusFlags(virDomainPtr dom, unsigned int flags)
+static int vboxDomainGetVcpusFlags(virDomainPtr dom, unsigned int flags)
 {
     VBOX_OBJECT_CHECK(dom->conn, int, -1);
     ISystemProperties *systemProperties = NULL;
@@ -2928,7 +2933,7 @@ int vboxDomainGetVcpusFlags(virDomainPtr dom, unsigned int flags)
     return ret;
 }
 
-int vboxDomainGetMaxVcpus(virDomainPtr dom)
+static int vboxDomainGetMaxVcpus(virDomainPtr dom)
 {
     return vboxDomainGetVcpusFlags(dom, (VIR_DOMAIN_AFFECT_LIVE |
                                          VIR_DOMAIN_VCPU_MAXIMUM));
@@ -3791,7 +3796,7 @@ vboxDumpParallel(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine, P
     }
 }
 
-char *vboxDomainGetXMLDesc(virDomainPtr dom, unsigned int flags)
+static char *vboxDomainGetXMLDesc(virDomainPtr dom, unsigned int flags)
 {
     VBOX_OBJECT_CHECK(dom->conn, char *, NULL);
     virDomainDefPtr def  = NULL;
@@ -3949,8 +3954,8 @@ char *vboxDomainGetXMLDesc(virDomainPtr dom, unsigned int flags)
     return ret;
 }
 
-int vboxConnectListDefinedDomains(virConnectPtr conn,
-                                  char ** const names, int maxnames)
+static int vboxConnectListDefinedDomains(virConnectPtr conn,
+                                         char ** const names, int maxnames)
 {
     VBOX_OBJECT_CHECK(conn, int, -1);
     vboxArray machines = VBOX_ARRAY_INITIALIZER;
@@ -4008,7 +4013,7 @@ int vboxConnectListDefinedDomains(virConnectPtr conn,
     return ret;
 }
 
-int vboxConnectNumOfDefinedDomains(virConnectPtr conn)
+static int vboxConnectNumOfDefinedDomains(virConnectPtr conn)
 {
     VBOX_OBJECT_CHECK(conn, int, -1);
     vboxArray machines = VBOX_ARRAY_INITIALIZER;
@@ -4160,13 +4165,13 @@ static int vboxDomainAttachDeviceImpl(virDomainPtr dom,
     return ret;
 }
 
-int vboxDomainAttachDevice(virDomainPtr dom, const char *xml)
+static int vboxDomainAttachDevice(virDomainPtr dom, const char *xml)
 {
     return vboxDomainAttachDeviceImpl(dom, xml, 0);
 }
 
-int vboxDomainAttachDeviceFlags(virDomainPtr dom, const char *xml,
-                                unsigned int flags)
+static int vboxDomainAttachDeviceFlags(virDomainPtr dom, const char *xml,
+                                       unsigned int flags)
 {
     virCheckFlags(VIR_DOMAIN_AFFECT_LIVE | VIR_DOMAIN_AFFECT_CONFIG, -1);
 
@@ -4179,8 +4184,8 @@ int vboxDomainAttachDeviceFlags(virDomainPtr dom, const char *xml,
     return vboxDomainAttachDeviceImpl(dom, xml, 0);
 }
 
-int vboxDomainUpdateDeviceFlags(virDomainPtr dom, const char *xml,
-                                unsigned int flags)
+static int vboxDomainUpdateDeviceFlags(virDomainPtr dom, const char *xml,
+                                       unsigned int flags)
 {
     virCheckFlags(VIR_DOMAIN_AFFECT_CURRENT |
                   VIR_DOMAIN_AFFECT_LIVE |
@@ -4195,7 +4200,7 @@ int vboxDomainUpdateDeviceFlags(virDomainPtr dom, const char *xml,
     return vboxDomainAttachDeviceImpl(dom, xml, 1);
 }
 
-int vboxDomainDetachDevice(virDomainPtr dom, const char *xml)
+static int vboxDomainDetachDevice(virDomainPtr dom, const char *xml)
 {
     VBOX_OBJECT_CHECK(dom->conn, int, -1);
     IMachine *machine    = NULL;
@@ -4296,8 +4301,8 @@ int vboxDomainDetachDevice(virDomainPtr dom, const char *xml)
     return ret;
 }
 
-int vboxDomainDetachDeviceFlags(virDomainPtr dom, const char *xml,
-                                unsigned int flags)
+static int vboxDomainDetachDeviceFlags(virDomainPtr dom, const char *xml,
+                                       unsigned int flags)
 {
     virCheckFlags(VIR_DOMAIN_AFFECT_LIVE | VIR_DOMAIN_AFFECT_CONFIG, -1);
 
@@ -5258,7 +5263,7 @@ vboxSnapshotRedefine(virDomainPtr dom,
     return ret;
 }
 
-virDomainSnapshotPtr
+static virDomainSnapshotPtr
 vboxDomainSnapshotCreateXML(virDomainPtr dom,
                             const char *xmlDesc,
                             unsigned int flags)
@@ -5512,9 +5517,8 @@ vboxDomainSnapshotGet(vboxGlobalData *data,
     return snapshot;
 }
 
-static
-int vboxSnapshotGetReadWriteDisks(virDomainSnapshotDefPtr def,
-                                    virDomainSnapshotPtr snapshot)
+static int vboxSnapshotGetReadWriteDisks(virDomainSnapshotDefPtr def,
+                                         virDomainSnapshotPtr snapshot)
 {
     virDomainPtr dom = snapshot->domain;
     VBOX_OBJECT_CHECK(dom->conn, int, -1);
@@ -5732,7 +5736,7 @@ int vboxSnapshotGetReadWriteDisks(virDomainSnapshotDefPtr def,
 
 static
 int vboxSnapshotGetReadOnlyDisks(virDomainSnapshotPtr snapshot,
-                                    virDomainSnapshotDefPtr def)
+                                 virDomainSnapshotDefPtr def)
 {
     virDomainPtr dom = snapshot->domain;
     VBOX_OBJECT_CHECK(dom->conn, int, -1);
@@ -5946,8 +5950,8 @@ int vboxSnapshotGetReadOnlyDisks(virDomainSnapshotPtr snapshot,
     return ret;
 }
 
-char *vboxDomainSnapshotGetXMLDesc(virDomainSnapshotPtr snapshot,
-                                   unsigned int flags)
+static char *vboxDomainSnapshotGetXMLDesc(virDomainSnapshotPtr snapshot,
+                                          unsigned int flags)
 {
     virDomainPtr dom = snapshot->domain;
     VBOX_OBJECT_CHECK(dom->conn, char *, NULL);
@@ -6085,7 +6089,7 @@ char *vboxDomainSnapshotGetXMLDesc(virDomainSnapshotPtr snapshot,
     return ret;
 }
 
-int vboxDomainSnapshotNum(virDomainPtr dom, unsigned int flags)
+static int vboxDomainSnapshotNum(virDomainPtr dom, unsigned int flags)
 {
     VBOX_OBJECT_CHECK(dom->conn, int, -1);
     vboxIIDUnion iid;
@@ -6125,8 +6129,8 @@ int vboxDomainSnapshotNum(virDomainPtr dom, unsigned int flags)
     return ret;
 }
 
-int vboxDomainSnapshotListNames(virDomainPtr dom, char **names,
-                                int nameslen, unsigned int flags)
+static int vboxDomainSnapshotListNames(virDomainPtr dom, char **names,
+                                       int nameslen, unsigned int flags)
 {
     VBOX_OBJECT_CHECK(dom->conn, int, -1);
     vboxIIDUnion iid;
@@ -6204,7 +6208,7 @@ int vboxDomainSnapshotListNames(virDomainPtr dom, char **names,
     return ret;
 }
 
-virDomainSnapshotPtr
+static virDomainSnapshotPtr
 vboxDomainSnapshotLookupByName(virDomainPtr dom, const char *name,
                                unsigned int flags)
 {
@@ -6230,8 +6234,8 @@ vboxDomainSnapshotLookupByName(virDomainPtr dom, const char *name,
     return ret;
 }
 
-int vboxDomainHasCurrentSnapshot(virDomainPtr dom,
-                                 unsigned int flags)
+static int vboxDomainHasCurrentSnapshot(virDomainPtr dom,
+                                        unsigned int flags)
 {
     VBOX_OBJECT_CHECK(dom->conn, int, -1);
     vboxIIDUnion iid;
@@ -6262,7 +6266,7 @@ int vboxDomainHasCurrentSnapshot(virDomainPtr dom,
     return ret;
 }
 
-virDomainSnapshotPtr
+static virDomainSnapshotPtr
 vboxDomainSnapshotGetParent(virDomainSnapshotPtr snapshot,
                             unsigned int flags)
 {
@@ -6323,7 +6327,7 @@ vboxDomainSnapshotGetParent(virDomainSnapshotPtr snapshot,
     return ret;
 }
 
-virDomainSnapshotPtr
+static virDomainSnapshotPtr
 vboxDomainSnapshotCurrent(virDomainPtr dom, unsigned int flags)
 {
     VBOX_OBJECT_CHECK(dom->conn, virDomainSnapshotPtr, NULL);
@@ -6376,8 +6380,8 @@ vboxDomainSnapshotCurrent(virDomainPtr dom, unsigned int flags)
     return ret;
 }
 
-int vboxDomainSnapshotIsCurrent(virDomainSnapshotPtr snapshot,
-                                unsigned int flags)
+static int vboxDomainSnapshotIsCurrent(virDomainSnapshotPtr snapshot,
+                                       unsigned int flags)
 {
     virDomainPtr dom = snapshot->domain;
     VBOX_OBJECT_CHECK(dom->conn, int, -1);
@@ -6433,8 +6437,8 @@ int vboxDomainSnapshotIsCurrent(virDomainSnapshotPtr snapshot,
     return ret;
 }
 
-int vboxDomainSnapshotHasMetadata(virDomainSnapshotPtr snapshot,
-                                  unsigned int flags)
+static int vboxDomainSnapshotHasMetadata(virDomainSnapshotPtr snapshot,
+                                         unsigned int flags)
 {
     virDomainPtr dom = snapshot->domain;
     VBOX_OBJECT_CHECK(dom->conn, int, -1);
@@ -6460,8 +6464,8 @@ int vboxDomainSnapshotHasMetadata(virDomainSnapshotPtr snapshot,
     return ret;
 }
 
-int vboxDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
-                               unsigned int flags)
+static int vboxDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
+                                      unsigned int flags)
 {
     virDomainPtr dom = snapshot->domain;
     VBOX_OBJECT_CHECK(dom->conn, int, -1);
@@ -7056,8 +7060,8 @@ vboxDomainSnapshotDeleteMetadataOnly(virDomainSnapshotPtr snapshot)
     return ret;
 }
 
-int vboxDomainSnapshotDelete(virDomainSnapshotPtr snapshot,
-                             unsigned int flags)
+static int vboxDomainSnapshotDelete(virDomainSnapshotPtr snapshot,
+                                    unsigned int flags)
 {
     virDomainPtr dom = snapshot->domain;
     VBOX_OBJECT_CHECK(dom->conn, int, -1);
@@ -7137,7 +7141,7 @@ int vboxDomainSnapshotDelete(virDomainSnapshotPtr snapshot,
     return ret;
 }
 
-char *
+static char *
 vboxDomainScreenshot(virDomainPtr dom,
                      virStreamPtr st,
                      unsigned int screen,
@@ -7265,7 +7269,7 @@ vboxDomainScreenshot(virDomainPtr dom,
 }
 
 #define MATCH(FLAG) (flags & (FLAG))
-int
+static int
 vboxConnectListAllDomains(virConnectPtr conn,
                           virDomainPtr **domains,
                           unsigned int flags)
@@ -7421,14 +7425,14 @@ vboxConnectListAllDomains(virConnectPtr conn,
 }
 #undef MATCH
 
-int
+static int
 vboxNodeGetInfo(virConnectPtr conn ATTRIBUTE_UNUSED,
                 virNodeInfoPtr nodeinfo)
 {
     return nodeGetInfo(nodeinfo);
 }
 
-int
+static int
 vboxNodeGetCellsFreeMemory(virConnectPtr conn ATTRIBUTE_UNUSED,
                            unsigned long long *freeMems,
                            int startCell,
@@ -7437,7 +7441,7 @@ vboxNodeGetCellsFreeMemory(virConnectPtr conn ATTRIBUTE_UNUSED,
     return nodeGetCellsFreeMemory(freeMems, startCell, maxCells);
 }
 
-unsigned long long
+static unsigned long long
 vboxNodeGetFreeMemory(virConnectPtr conn ATTRIBUTE_UNUSED)
 {
     unsigned long long freeMem;
@@ -7446,7 +7450,7 @@ vboxNodeGetFreeMemory(virConnectPtr conn ATTRIBUTE_UNUSED)
     return freeMem;
 }
 
-int
+static int
 vboxNodeGetFreePages(virConnectPtr conn ATTRIBUTE_UNUSED,
                      unsigned int npages,
                      unsigned int *pages,
@@ -7459,3 +7463,88 @@ vboxNodeGetFreePages(virConnectPtr conn ATTRIBUTE_UNUSED,
 
     return nodeGetFreePages(npages, pages, startCell, cellCount, counts);
 }
+
+/**
+ * Function Tables
+ */
+
+virDriver vboxCommonDriver = {
+    .no = VIR_DRV_VBOX,
+    .name = "VBOX",
+    .connectOpen = vboxConnectOpen, /* 0.6.3 */
+    .connectClose = vboxConnectClose, /* 0.6.3 */
+    .connectGetVersion = vboxConnectGetVersion, /* 0.6.3 */
+    .connectGetHostname = vboxConnectGetHostname, /* 0.6.3 */
+    .connectGetMaxVcpus = vboxConnectGetMaxVcpus, /* 0.6.3 */
+    .nodeGetInfo = vboxNodeGetInfo, /* 0.6.3 */
+    .connectGetCapabilities = vboxConnectGetCapabilities, /* 0.6.3 */
+    .connectListDomains = vboxConnectListDomains, /* 0.6.3 */
+    .connectNumOfDomains = vboxConnectNumOfDomains, /* 0.6.3 */
+    .connectListAllDomains = vboxConnectListAllDomains, /* 0.9.13 */
+    .domainCreateXML = vboxDomainCreateXML, /* 0.6.3 */
+    .domainLookupByID = vboxDomainLookupByID, /* 0.6.3 */
+    .domainLookupByUUID = vboxDomainLookupByUUID, /* 0.6.3 */
+    .domainLookupByName = vboxDomainLookupByName, /* 0.6.3 */
+    .domainSuspend = vboxDomainSuspend, /* 0.6.3 */
+    .domainResume = vboxDomainResume, /* 0.6.3 */
+    .domainShutdown = vboxDomainShutdown, /* 0.6.3 */
+    .domainShutdownFlags = vboxDomainShutdownFlags, /* 0.9.10 */
+    .domainReboot = vboxDomainReboot, /* 0.6.3 */
+    .domainDestroy = vboxDomainDestroy, /* 0.6.3 */
+    .domainDestroyFlags = vboxDomainDestroyFlags, /* 0.9.4 */
+    .domainGetOSType = vboxDomainGetOSType, /* 0.6.3 */
+    .domainSetMemory = vboxDomainSetMemory, /* 0.6.3 */
+    .domainGetInfo = vboxDomainGetInfo, /* 0.6.3 */
+    .domainGetState = vboxDomainGetState, /* 0.9.2 */
+    .domainSave = vboxDomainSave, /* 0.6.3 */
+    .domainSetVcpus = vboxDomainSetVcpus, /* 0.7.1 */
+    .domainSetVcpusFlags = vboxDomainSetVcpusFlags, /* 0.8.5 */
+    .domainGetVcpusFlags = vboxDomainGetVcpusFlags, /* 0.8.5 */
+    .domainGetMaxVcpus = vboxDomainGetMaxVcpus, /* 0.7.1 */
+    .domainGetXMLDesc = vboxDomainGetXMLDesc, /* 0.6.3 */
+    .connectListDefinedDomains = vboxConnectListDefinedDomains, /* 0.6.3 */
+    .connectNumOfDefinedDomains = vboxConnectNumOfDefinedDomains, /* 0.6.3 */
+    .domainCreate = vboxDomainCreate, /* 0.6.3 */
+    .domainCreateWithFlags = vboxDomainCreateWithFlags, /* 0.8.2 */
+    .domainDefineXML = vboxDomainDefineXML, /* 0.6.3 */
+    .domainUndefine = vboxDomainUndefine, /* 0.6.3 */
+    .domainUndefineFlags = vboxDomainUndefineFlags, /* 0.9.5 */
+    .domainAttachDevice = vboxDomainAttachDevice, /* 0.6.3 */
+    .domainAttachDeviceFlags = vboxDomainAttachDeviceFlags, /* 0.7.7 */
+    .domainDetachDevice = vboxDomainDetachDevice, /* 0.6.3 */
+    .domainDetachDeviceFlags = vboxDomainDetachDeviceFlags, /* 0.7.7 */
+    .domainUpdateDeviceFlags = vboxDomainUpdateDeviceFlags, /* 0.8.0 */
+    .nodeGetCellsFreeMemory = vboxNodeGetCellsFreeMemory, /* 0.6.5 */
+    .nodeGetFreeMemory = vboxNodeGetFreeMemory, /* 0.6.5 */
+    .connectIsEncrypted = vboxConnectIsEncrypted, /* 0.7.3 */
+    .connectIsSecure = vboxConnectIsSecure, /* 0.7.3 */
+    .domainIsActive = vboxDomainIsActive, /* 0.7.3 */
+    .domainIsPersistent = vboxDomainIsPersistent, /* 0.7.3 */
+    .domainIsUpdated = vboxDomainIsUpdated, /* 0.8.6 */
+    .domainSnapshotCreateXML = vboxDomainSnapshotCreateXML, /* 0.8.0 */
+    .domainSnapshotGetXMLDesc = vboxDomainSnapshotGetXMLDesc, /* 0.8.0 */
+    .domainSnapshotNum = vboxDomainSnapshotNum, /* 0.8.0 */
+    .domainSnapshotListNames = vboxDomainSnapshotListNames, /* 0.8.0 */
+    .domainSnapshotLookupByName = vboxDomainSnapshotLookupByName, /* 0.8.0 */
+    .domainHasCurrentSnapshot = vboxDomainHasCurrentSnapshot, /* 0.8.0 */
+    .domainSnapshotGetParent = vboxDomainSnapshotGetParent, /* 0.9.7 */
+    .domainSnapshotCurrent = vboxDomainSnapshotCurrent, /* 0.8.0 */
+    .domainSnapshotIsCurrent = vboxDomainSnapshotIsCurrent, /* 0.9.13 */
+    .domainSnapshotHasMetadata = vboxDomainSnapshotHasMetadata, /* 0.9.13 */
+    .domainRevertToSnapshot = vboxDomainRevertToSnapshot, /* 0.8.0 */
+    .domainSnapshotDelete = vboxDomainSnapshotDelete, /* 0.8.0 */
+    .connectIsAlive = vboxConnectIsAlive, /* 0.9.8 */
+    .nodeGetFreePages = vboxNodeGetFreePages, /* 1.2.6 */
+};
+
+static void updateDriver(void)
+{
+    /* Update the vboxDriver according to the vboxUniformedAPI.
+     * We need to make sure the vboxUniformedAPI is initialized
+     * before calling this function. */
+    gVBoxAPI.registerDomainEvent(&vboxCommonDriver);
+    if (gVBoxAPI.supportScreenshot)
+        vboxCommonDriver.domainScreenshot = vboxDomainScreenshot;
+    else
+        vboxCommonDriver.domainScreenshot = NULL;
+}
diff --git a/src/vbox/vbox_driver.c b/src/vbox/vbox_driver.c
index 37b772c..f0c05fe 100644
--- a/src/vbox/vbox_driver.c
+++ b/src/vbox/vbox_driver.c
@@ -48,37 +48,29 @@
 
 VIR_LOG_INIT("vbox.vbox_driver");
 
-extern virDriver vbox22Driver;
 extern virNetworkDriver vbox22NetworkDriver;
 extern virStorageDriver vbox22StorageDriver;
-extern virDriver vbox30Driver;
 extern virNetworkDriver vbox30NetworkDriver;
 extern virStorageDriver vbox30StorageDriver;
-extern virDriver vbox31Driver;
 extern virNetworkDriver vbox31NetworkDriver;
 extern virStorageDriver vbox31StorageDriver;
-extern virDriver vbox32Driver;
 extern virNetworkDriver vbox32NetworkDriver;
 extern virStorageDriver vbox32StorageDriver;
-extern virDriver vbox40Driver;
 extern virNetworkDriver vbox40NetworkDriver;
 extern virStorageDriver vbox40StorageDriver;
-extern virDriver vbox41Driver;
 extern virNetworkDriver vbox41NetworkDriver;
 extern virStorageDriver vbox41StorageDriver;
-extern virDriver vbox42Driver;
 extern virNetworkDriver vbox42NetworkDriver;
 extern virStorageDriver vbox42StorageDriver;
-extern virDriver vbox42_20Driver;
 extern virNetworkDriver vbox42_20NetworkDriver;
 extern virStorageDriver vbox42_20StorageDriver;
-extern virDriver vbox43Driver;
 extern virNetworkDriver vbox43NetworkDriver;
 extern virStorageDriver vbox43StorageDriver;
-extern virDriver vbox43_4Driver;
 extern virNetworkDriver vbox43_4NetworkDriver;
 extern virStorageDriver vbox43_4StorageDriver;
 
+extern virDriver vboxCommonDriver;
+
 static virDriver vboxDriverDummy;
 
 #define VIR_FROM_THIS VIR_FROM_VBOX
@@ -114,59 +106,53 @@ int vboxRegister(void)
          */
         if (uVersion >= 2001052 && uVersion < 2002051) {
             VIR_DEBUG("VirtualBox API version: 2.2");
-            driver        = &vbox22Driver;
             networkDriver = &vbox22NetworkDriver;
             storageDriver = &vbox22StorageDriver;
         } else if (uVersion >= 2002051 && uVersion < 3000051) {
             VIR_DEBUG("VirtualBox API version: 3.0");
-            driver        = &vbox30Driver;
             networkDriver = &vbox30NetworkDriver;
             storageDriver = &vbox30StorageDriver;
         } else if (uVersion >= 3000051 && uVersion < 3001051) {
             VIR_DEBUG("VirtualBox API version: 3.1");
-            driver        = &vbox31Driver;
             networkDriver = &vbox31NetworkDriver;
             storageDriver = &vbox31StorageDriver;
         } else if (uVersion >= 3001051 && uVersion < 3002051) {
             VIR_DEBUG("VirtualBox API version: 3.2");
-            driver        = &vbox32Driver;
             networkDriver = &vbox32NetworkDriver;
             storageDriver = &vbox32StorageDriver;
         } else if (uVersion >= 3002051 && uVersion < 4000051) {
             VIR_DEBUG("VirtualBox API version: 4.0");
-            driver        = &vbox40Driver;
             networkDriver = &vbox40NetworkDriver;
             storageDriver = &vbox40StorageDriver;
         } else if (uVersion >= 4000051 && uVersion < 4001051) {
             VIR_DEBUG("VirtualBox API version: 4.1");
-            driver        = &vbox41Driver;
             networkDriver = &vbox41NetworkDriver;
             storageDriver = &vbox41StorageDriver;
         } else if (uVersion >= 4001051 && uVersion < 4002020) {
             VIR_DEBUG("VirtualBox API version: 4.2");
-            driver        = &vbox42Driver;
             networkDriver = &vbox42NetworkDriver;
             storageDriver = &vbox42StorageDriver;
         } else if (uVersion >= 4002020 && uVersion < 4002051) {
            VIR_DEBUG("VirtualBox API version: 4.2.20 or higher");
-           driver         = &vbox42_20Driver;
            networkDriver  = &vbox42_20NetworkDriver;
            storageDriver  = &vbox42_20StorageDriver;
         } else if (uVersion >= 4002051 && uVersion < 4003004) {
             VIR_DEBUG("VirtualBox API version: 4.3");
-            driver        = &vbox43Driver;
             networkDriver = &vbox43NetworkDriver;
             storageDriver = &vbox43StorageDriver;
         } else if (uVersion >= 4003004 && uVersion < 4003051) {
             VIR_DEBUG("VirtualBox API version: 4.3.4 or higher");
-            driver        = &vbox43_4Driver;
             networkDriver = &vbox43_4NetworkDriver;
             storageDriver = &vbox43_4StorageDriver;
         } else {
             VIR_DEBUG("Unsupported VirtualBox API version: %u", uVersion);
         }
         /* Register vboxUniformedAPI. */
-        vboxRegisterUniformedAPI(uVersion);
+        if (vboxRegisterUniformedAPI(uVersion) == 0)
+            /* Only if successfully register the uniformed api,
+             * can we use the vboxCommonDriver. Or use the
+             * vboxDriverDummy in case of failure. */
+            driver = &vboxCommonDriver;
     } else {
         VIR_DEBUG("VBoxCGlueInit failed, using dummy driver");
     }
diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c
index fbd0d08..de833dc 100644
--- a/src/vbox/vbox_tmpl.c
+++ b/src/vbox/vbox_tmpl.c
@@ -6477,86 +6477,6 @@ void NAME(InstallUniformedAPI)(vboxUniformedAPI *pVBoxAPI)
  * Function Tables
  */
 
-virDriver NAME(Driver) = {
-    .no = VIR_DRV_VBOX,
-    .name = "VBOX",
-    .connectOpen = vboxConnectOpen, /* 0.6.3 */
-    .connectClose = vboxConnectClose, /* 0.6.3 */
-    .connectGetVersion = vboxConnectGetVersion, /* 0.6.3 */
-    .connectGetHostname = vboxConnectGetHostname, /* 0.6.3 */
-    .connectGetMaxVcpus = vboxConnectGetMaxVcpus, /* 0.6.3 */
-    .nodeGetInfo = vboxNodeGetInfo, /* 0.6.3 */
-    .connectGetCapabilities = vboxConnectGetCapabilities, /* 0.6.3 */
-    .connectListDomains = vboxConnectListDomains, /* 0.6.3 */
-    .connectNumOfDomains = vboxConnectNumOfDomains, /* 0.6.3 */
-    .connectListAllDomains = vboxConnectListAllDomains, /* 0.9.13 */
-    .domainCreateXML = vboxDomainCreateXML, /* 0.6.3 */
-    .domainLookupByID = vboxDomainLookupByID, /* 0.6.3 */
-    .domainLookupByUUID = vboxDomainLookupByUUID, /* 0.6.3 */
-    .domainLookupByName = vboxDomainLookupByName, /* 0.6.3 */
-    .domainSuspend = vboxDomainSuspend, /* 0.6.3 */
-    .domainResume = vboxDomainResume, /* 0.6.3 */
-    .domainShutdown = vboxDomainShutdown, /* 0.6.3 */
-    .domainShutdownFlags = vboxDomainShutdownFlags, /* 0.9.10 */
-    .domainReboot = vboxDomainReboot, /* 0.6.3 */
-    .domainDestroy = vboxDomainDestroy, /* 0.6.3 */
-    .domainDestroyFlags = vboxDomainDestroyFlags, /* 0.9.4 */
-    .domainGetOSType = vboxDomainGetOSType, /* 0.6.3 */
-    .domainSetMemory = vboxDomainSetMemory, /* 0.6.3 */
-    .domainGetInfo = vboxDomainGetInfo, /* 0.6.3 */
-    .domainGetState = vboxDomainGetState, /* 0.9.2 */
-    .domainSave = vboxDomainSave, /* 0.6.3 */
-    .domainSetVcpus = vboxDomainSetVcpus, /* 0.7.1 */
-    .domainSetVcpusFlags = vboxDomainSetVcpusFlags, /* 0.8.5 */
-    .domainGetVcpusFlags = vboxDomainGetVcpusFlags, /* 0.8.5 */
-    .domainGetMaxVcpus = vboxDomainGetMaxVcpus, /* 0.7.1 */
-    .domainGetXMLDesc = vboxDomainGetXMLDesc, /* 0.6.3 */
-    .connectListDefinedDomains = vboxConnectListDefinedDomains, /* 0.6.3 */
-    .connectNumOfDefinedDomains = vboxConnectNumOfDefinedDomains, /* 0.6.3 */
-    .domainCreate = vboxDomainCreate, /* 0.6.3 */
-    .domainCreateWithFlags = vboxDomainCreateWithFlags, /* 0.8.2 */
-    .domainDefineXML = vboxDomainDefineXML, /* 0.6.3 */
-    .domainUndefine = vboxDomainUndefine, /* 0.6.3 */
-    .domainUndefineFlags = vboxDomainUndefineFlags, /* 0.9.5 */
-    .domainAttachDevice = vboxDomainAttachDevice, /* 0.6.3 */
-    .domainAttachDeviceFlags = vboxDomainAttachDeviceFlags, /* 0.7.7 */
-    .domainDetachDevice = vboxDomainDetachDevice, /* 0.6.3 */
-    .domainDetachDeviceFlags = vboxDomainDetachDeviceFlags, /* 0.7.7 */
-    .domainUpdateDeviceFlags = vboxDomainUpdateDeviceFlags, /* 0.8.0 */
-    .nodeGetCellsFreeMemory = vboxNodeGetCellsFreeMemory, /* 0.6.5 */
-    .nodeGetFreeMemory = vboxNodeGetFreeMemory, /* 0.6.5 */
-#if VBOX_API_VERSION >= 4000000
-    .domainScreenshot = vboxDomainScreenshot, /* 0.9.2 */
-#endif
-#if VBOX_API_VERSION > 2002000 && VBOX_API_VERSION < 4000000
-    .connectDomainEventRegister = vboxConnectDomainEventRegister, /* 0.7.0 */
-    .connectDomainEventDeregister = vboxConnectDomainEventDeregister, /* 0.7.0 */
-#endif
-    .connectIsEncrypted = vboxConnectIsEncrypted, /* 0.7.3 */
-    .connectIsSecure = vboxConnectIsSecure, /* 0.7.3 */
-    .domainIsActive = vboxDomainIsActive, /* 0.7.3 */
-    .domainIsPersistent = vboxDomainIsPersistent, /* 0.7.3 */
-    .domainIsUpdated = vboxDomainIsUpdated, /* 0.8.6 */
-#if VBOX_API_VERSION > 2002000 && VBOX_API_VERSION < 4000000
-    .connectDomainEventRegisterAny = vboxConnectDomainEventRegisterAny, /* 0.8.0 */
-    .connectDomainEventDeregisterAny = vboxConnectDomainEventDeregisterAny, /* 0.8.0 */
-#endif
-    .domainSnapshotCreateXML = vboxDomainSnapshotCreateXML, /* 0.8.0 */
-    .domainSnapshotGetXMLDesc = vboxDomainSnapshotGetXMLDesc, /* 0.8.0 */
-    .domainSnapshotNum = vboxDomainSnapshotNum, /* 0.8.0 */
-    .domainSnapshotListNames = vboxDomainSnapshotListNames, /* 0.8.0 */
-    .domainSnapshotLookupByName = vboxDomainSnapshotLookupByName, /* 0.8.0 */
-    .domainHasCurrentSnapshot = vboxDomainHasCurrentSnapshot, /* 0.8.0 */
-    .domainSnapshotGetParent = vboxDomainSnapshotGetParent, /* 0.9.7 */
-    .domainSnapshotCurrent = vboxDomainSnapshotCurrent, /* 0.8.0 */
-    .domainSnapshotIsCurrent = vboxDomainSnapshotIsCurrent, /* 0.9.13 */
-    .domainSnapshotHasMetadata = vboxDomainSnapshotHasMetadata, /* 0.9.13 */
-    .domainRevertToSnapshot = vboxDomainRevertToSnapshot, /* 0.8.0 */
-    .domainSnapshotDelete = vboxDomainSnapshotDelete, /* 0.8.0 */
-    .connectIsAlive = vboxConnectIsAlive, /* 0.9.8 */
-    .nodeGetFreePages = vboxNodeGetFreePages, /* 1.2.6 */
-};
-
 virNetworkDriver NAME(NetworkDriver) = {
     "VBOX",
     .networkOpen = vboxNetworkOpen, /* 0.6.4 */
diff --git a/src/vbox/vbox_uniformed_api.h b/src/vbox/vbox_uniformed_api.h
index c0586c0..41ce40f 100644
--- a/src/vbox/vbox_uniformed_api.h
+++ b/src/vbox/vbox_uniformed_api.h
@@ -532,111 +532,8 @@ typedef struct {
     bool supportScreenshot;
 } vboxUniformedAPI;
 
-/* libvirt API
- * These API would be removed after we generate the
- * vboxDriver in common code.
- */
-virDrvOpenStatus vboxConnectOpen(virConnectPtr conn,
-                                 virConnectAuthPtr auth,
-                                 unsigned int flags);
-int vboxConnectClose(virConnectPtr conn);
-int vboxDomainSave(virDomainPtr dom, const char *path);
-int vboxConnectGetVersion(virConnectPtr conn, unsigned long *version);
-char *vboxConnectGetHostname(virConnectPtr conn);
-int vboxConnectIsSecure(virConnectPtr conn);
-int vboxConnectIsEncrypted(virConnectPtr conn);
-int vboxConnectIsAlive(virConnectPtr conn);
-int vboxConnectGetMaxVcpus(virConnectPtr conn, const char *type);
-char *vboxConnectGetCapabilities(virConnectPtr conn);
-int vboxConnectListDomains(virConnectPtr conn, int *ids, int nids);
-int vboxConnectNumOfDomains(virConnectPtr conn);
-virDomainPtr vboxDomainLookupByID(virConnectPtr conn, int id);
 virDomainPtr vboxDomainLookupByUUID(virConnectPtr conn,
                                     const unsigned char *uuid);
-virDomainPtr
-vboxDomainLookupByName(virConnectPtr conn, const char *name);
-virDomainPtr vboxDomainDefineXML(virConnectPtr conn, const char *xml);
-int vboxDomainUndefineFlags(virDomainPtr dom, unsigned int flags);
-int vboxDomainUndefine(virDomainPtr dom);
-int vboxDomainCreateWithFlags(virDomainPtr dom, unsigned int flags);
-int vboxDomainCreate(virDomainPtr dom);
-virDomainPtr vboxDomainCreateXML(virConnectPtr conn, const char *xml,
-                                 unsigned int flags);
-int vboxDomainIsActive(virDomainPtr dom);
-int vboxDomainIsPersistent(virDomainPtr dom);
-int vboxDomainIsUpdated(virDomainPtr dom);
-int vboxDomainSuspend(virDomainPtr dom);
-int vboxDomainResume(virDomainPtr dom);
-int vboxDomainShutdownFlags(virDomainPtr dom, unsigned int flags);
-int vboxDomainShutdown(virDomainPtr dom);
-int vboxDomainReboot(virDomainPtr dom, unsigned int flags);
-int vboxDomainDestroyFlags(virDomainPtr dom, unsigned int flags);
-int vboxDomainDestroy(virDomainPtr dom);
-char *vboxDomainGetOSType(virDomainPtr dom);
-int vboxDomainSetMemory(virDomainPtr dom, unsigned long memory);
-int vboxDomainGetInfo(virDomainPtr dom, virDomainInfoPtr info);
-int vboxDomainGetState(virDomainPtr dom, int *state,
-                       int *reason, unsigned int flags);
-int vboxDomainSetVcpusFlags(virDomainPtr dom, unsigned int nvcpus,
-                            unsigned int flags);
-int vboxDomainSetVcpus(virDomainPtr dom, unsigned int nvcpus);
-int vboxDomainGetVcpusFlags(virDomainPtr dom, unsigned int flags);
-int vboxDomainGetMaxVcpus(virDomainPtr dom);
-char *vboxDomainGetXMLDesc(virDomainPtr dom, unsigned int flags);
-int vboxConnectListDefinedDomains(virConnectPtr conn,
-                                  char ** const names, int maxnames);
-int vboxConnectNumOfDefinedDomains(virConnectPtr conn);
-int vboxDomainAttachDevice(virDomainPtr dom, const char *xml);
-int vboxDomainAttachDeviceFlags(virDomainPtr dom, const char *xml,
-                                unsigned int flags);
-int vboxDomainUpdateDeviceFlags(virDomainPtr dom, const char *xml,
-                                unsigned int flags);
-int vboxDomainDetachDevice(virDomainPtr dom, const char *xml);
-int vboxDomainDetachDeviceFlags(virDomainPtr dom, const char *xml,
-                                unsigned int flags);
-virDomainSnapshotPtr
-vboxDomainSnapshotCreateXML(virDomainPtr dom,
-                            const char *xmlDesc,
-                            unsigned int flags);
-char *vboxDomainSnapshotGetXMLDesc(virDomainSnapshotPtr snapshot,
-                                   unsigned int flags);
-int vboxDomainSnapshotNum(virDomainPtr dom, unsigned int flags);
-int vboxDomainSnapshotListNames(virDomainPtr dom, char **names,
-                                int nameslen, unsigned int flags);
-virDomainSnapshotPtr
-vboxDomainSnapshotLookupByName(virDomainPtr dom, const char *name,
-                               unsigned int flags);
-int vboxDomainHasCurrentSnapshot(virDomainPtr dom, unsigned int flags);
-virDomainSnapshotPtr
-vboxDomainSnapshotGetParent(virDomainSnapshotPtr snapshot,
-                            unsigned int flags);
-virDomainSnapshotPtr
-vboxDomainSnapshotCurrent(virDomainPtr dom, unsigned int flags);
-int vboxDomainSnapshotIsCurrent(virDomainSnapshotPtr snapshot,
-                                unsigned int flags);
-int vboxDomainSnapshotHasMetadata(virDomainSnapshotPtr snapshot,
-                                unsigned int flags);
-int vboxDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
-                               unsigned int flags);
-int vboxDomainSnapshotDelete(virDomainSnapshotPtr snapshot,
-                             unsigned int flags);
-char *vboxDomainScreenshot(virDomainPtr dom, virStreamPtr st,
-                           unsigned int screen, unsigned int flags);
-int vboxConnectListAllDomains(virConnectPtr conn, virDomainPtr **domains,
-                              unsigned int flags);
-int vboxNodeGetInfo(virConnectPtr conn, virNodeInfoPtr nodeinfo);
-int vboxNodeGetCellsFreeMemory(virConnectPtr conn,
-                               unsigned long long *freeMems,
-                               int startCell,
-                               int maxCells);
-unsigned long long vboxNodeGetFreeMemory(virConnectPtr);
-int vboxNodeGetFreePages(virConnectPtr conn,
-                         unsigned int npages,
-                         unsigned int *pages,
-                         int startCell,
-                         unsigned int cellCount,
-                         unsigned long long *counts,
-                         unsigned int flags);
 
 /* Version specified functions for installing uniformed API */
 void vbox22InstallUniformedAPI(vboxUniformedAPI *pVBoxAPI);
-- 
1.7.9.5

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]