提交 72c23d65 编写于 作者: T Taowei 提交者: Michal Privoznik

vbox: Rewrite vboxDomainSnapshotGetXMLDesc

上级 677ecdc0
此差异已折叠。
此差异已折叠。
...@@ -166,17 +166,22 @@ typedef struct { ...@@ -166,17 +166,22 @@ typedef struct {
/* Functions for vboxArray */ /* Functions for vboxArray */
typedef struct { typedef struct {
nsresult (*vboxArrayGet)(vboxArray *array, void *self, void *getter); nsresult (*vboxArrayGet)(vboxArray *array, void *self, void *getter);
nsresult (*vboxArrayGetWithIIDArg)(vboxArray *array, void *self, void *getter, vboxIIDUnion *iidu);
void (*vboxArrayRelease)(vboxArray *array); void (*vboxArrayRelease)(vboxArray *array);
/* Generate function pointers for vboxArrayGet */ /* Generate function pointers for vboxArrayGet */
void* (*handleGetMachines)(IVirtualBox *vboxObj); void* (*handleGetMachines)(IVirtualBox *vboxObj);
void* (*handleUSBGetDeviceFilters)(IUSBCommon *USBCommon); void* (*handleUSBGetDeviceFilters)(IUSBCommon *USBCommon);
void* (*handleMachineGetMediumAttachments)(IMachine *machine); void* (*handleMachineGetMediumAttachments)(IMachine *machine);
void* (*handleMachineGetSharedFolders)(IMachine *machine); void* (*handleMachineGetSharedFolders)(IMachine *machine);
void* (*handleSnapshotGetChildren)(ISnapshot *snapshot);
void* (*handleMediumGetChildren)(IMedium *medium);
void* (*handleMediumGetSnapshotIds)(IMedium *medium);
} vboxUniformedArray; } vboxUniformedArray;
/* Functions for nsISupports */ /* Functions for nsISupports */
typedef struct { typedef struct {
nsresult (*Release)(nsISupports *nsi); nsresult (*Release)(nsISupports *nsi);
nsresult (*AddRef)(nsISupports *nsi);
} vboxUniformednsISupports; } vboxUniformednsISupports;
/* Functions for IVirtualBox */ /* Functions for IVirtualBox */
...@@ -211,6 +216,7 @@ typedef struct { ...@@ -211,6 +216,7 @@ typedef struct {
IProgress **progress); IProgress **progress);
nsresult (*Unregister)(IMachine *machine, PRUint32 cleanupMode, nsresult (*Unregister)(IMachine *machine, PRUint32 cleanupMode,
PRUint32 *aMediaSize, IMedium ***aMedia); PRUint32 *aMediaSize, IMedium ***aMedia);
nsresult (*FindSnapshot)(IMachine *machine, vboxIIDUnion *iidu, ISnapshot **snapshot);
nsresult (*GetAccessible)(IMachine *machine, PRBool *isAccessible); nsresult (*GetAccessible)(IMachine *machine, PRBool *isAccessible);
nsresult (*GetState)(IMachine *machine, PRUint32 *state); nsresult (*GetState)(IMachine *machine, PRUint32 *state);
nsresult (*GetName)(IMachine *machine, PRUnichar **name); nsresult (*GetName)(IMachine *machine, PRUnichar **name);
...@@ -243,6 +249,7 @@ typedef struct { ...@@ -243,6 +249,7 @@ typedef struct {
nsresult (*SetAccelerate2DVideoEnabled)(IMachine *machine, PRBool accelerate2DVideoEnabled); nsresult (*SetAccelerate2DVideoEnabled)(IMachine *machine, PRBool accelerate2DVideoEnabled);
nsresult (*GetExtraData)(IMachine *machine, PRUnichar *key, PRUnichar **value); nsresult (*GetExtraData)(IMachine *machine, PRUnichar *key, PRUnichar **value);
nsresult (*SetExtraData)(IMachine *machine, PRUnichar *key, PRUnichar *value); nsresult (*SetExtraData)(IMachine *machine, PRUnichar *key, PRUnichar *value);
nsresult (*GetSnapshotCount)(IMachine *machine, PRUint32 *snapshotCount);
nsresult (*SaveSettings)(IMachine *machine); nsresult (*SaveSettings)(IMachine *machine);
} vboxUniformedIMachine; } vboxUniformedIMachine;
...@@ -427,6 +434,17 @@ typedef struct { ...@@ -427,6 +434,17 @@ typedef struct {
nsresult (*GetWritable)(ISharedFolder *sharedFolder, PRBool *writable); nsresult (*GetWritable)(ISharedFolder *sharedFolder, PRBool *writable);
} vboxUniformedISharedFolder; } vboxUniformedISharedFolder;
/* Functions for ISnapshot */
typedef struct {
nsresult (*GetName)(ISnapshot *snapshot, PRUnichar **name);
nsresult (*GetId)(ISnapshot *snapshot, vboxIIDUnion *iidu);
nsresult (*GetMachine)(ISnapshot *snapshot, IMachine **machine);
nsresult (*GetDescription)(ISnapshot *snapshot, PRUnichar **description);
nsresult (*GetTimeStamp)(ISnapshot *snapshot, PRInt64 *timeStamp);
nsresult (*GetParent)(ISnapshot *snapshot, ISnapshot **parent);
nsresult (*GetOnline)(ISnapshot *snapshot, PRBool *online);
} vboxUniformedISnapshot;
typedef struct { typedef struct {
bool (*Online)(PRUint32 state); bool (*Online)(PRUint32 state);
bool (*Inactive)(PRUint32 state); bool (*Inactive)(PRUint32 state);
...@@ -477,6 +495,7 @@ typedef struct { ...@@ -477,6 +495,7 @@ typedef struct {
vboxUniformedIMediumAttachment UIMediumAttachment; vboxUniformedIMediumAttachment UIMediumAttachment;
vboxUniformedIStorageController UIStorageController; vboxUniformedIStorageController UIStorageController;
vboxUniformedISharedFolder UISharedFolder; vboxUniformedISharedFolder UISharedFolder;
vboxUniformedISnapshot UISnapshot;
uniformedMachineStateChecker machineStateChecker; uniformedMachineStateChecker machineStateChecker;
/* vbox API features */ /* vbox API features */
bool domainEventCallbacks; bool domainEventCallbacks;
...@@ -556,7 +575,8 @@ virDomainSnapshotPtr ...@@ -556,7 +575,8 @@ virDomainSnapshotPtr
vboxDomainSnapshotCreateXML(virDomainPtr dom, vboxDomainSnapshotCreateXML(virDomainPtr dom,
const char *xmlDesc, const char *xmlDesc,
unsigned int flags); unsigned int flags);
char *vboxDomainSnapshotGetXMLDesc(virDomainSnapshotPtr snapshot,
unsigned int flags);
/* Version specified functions for installing uniformed API */ /* Version specified functions for installing uniformed API */
void vbox22InstallUniformedAPI(vboxUniformedAPI *pVBoxAPI); void vbox22InstallUniformedAPI(vboxUniformedAPI *pVBoxAPI);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册