Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
80095678
L
libvirt
项目概览
openeuler
/
libvirt
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
libvirt
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
80095678
编写于
8月 11, 2014
作者:
T
Taowei
提交者:
Michal Privoznik
8月 15, 2014
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
vbox: Add API for vboxDomainGetXMLDesc
上级
696ad279
变更
3
展开全部
隐藏空白更改
内联
并排
Showing
3 changed file
with
793 addition
and
0 deletion
+793
-0
src/vbox/vbox_common.h
src/vbox/vbox_common.h
+2
-0
src/vbox/vbox_tmpl.c
src/vbox/vbox_tmpl.c
+718
-0
src/vbox/vbox_uniformed_api.h
src/vbox/vbox_uniformed_api.h
+73
-0
未找到文件。
src/vbox/vbox_common.h
浏览文件 @
80095678
...
...
@@ -257,6 +257,8 @@ typedef nsISupports IVRDxServer;
typedef
nsISupports
IUSBCommon
;
typedef
nsISupports
IUSBDeviceFilter
;
typedef
nsISupports
IMedium
;
typedef
nsISupports
IMediumAttachment
;
typedef
nsISupports
IStorageController
;
typedef
nsISupports
ISharedFolder
;
#endif
/* VBOX_COMMON_H */
src/vbox/vbox_tmpl.c
浏览文件 @
80095678
此差异已折叠。
点击以展开。
src/vbox/vbox_uniformed_api.h
浏览文件 @
80095678
...
...
@@ -168,6 +168,9 @@ typedef struct {
void
(
*
vboxArrayRelease
)(
vboxArray
*
array
);
/* Generate function pointers for vboxArrayGet */
void
*
(
*
handleGetMachines
)(
IVirtualBox
*
vboxObj
);
void
*
(
*
handleUSBGetDeviceFilters
)(
IUSBCommon
*
USBCommon
);
void
*
(
*
handleMachineGetMediumAttachments
)(
IMachine
*
machine
);
void
*
(
*
handleMachineGetSharedFolders
)(
IMachine
*
machine
);
}
vboxUniformedArray
;
/* Functions for nsISupports */
...
...
@@ -190,6 +193,8 @@ typedef struct {
typedef
struct
{
nsresult
(
*
AddStorageController
)(
IMachine
*
machine
,
PRUnichar
*
name
,
PRUint32
connectionType
,
IStorageController
**
controller
);
nsresult
(
*
GetStorageControllerByName
)(
IMachine
*
machine
,
PRUnichar
*
name
,
IStorageController
**
storageController
);
nsresult
(
*
AttachDevice
)(
IMachine
*
machine
,
PRUnichar
*
name
,
PRInt32
controllerPort
,
PRInt32
device
,
PRUint32
type
,
IMedium
*
medium
);
...
...
@@ -216,11 +221,17 @@ typedef struct {
nsresult
(
*
SetCPUCount
)(
IMachine
*
machine
,
PRUint32
CPUCount
);
nsresult
(
*
GetMemorySize
)(
IMachine
*
machine
,
PRUint32
*
memorySize
);
nsresult
(
*
SetMemorySize
)(
IMachine
*
machine
,
PRUint32
memorySize
);
nsresult
(
*
GetCPUProperty
)(
IMachine
*
machine
,
PRUint32
property
,
PRBool
*
value
);
nsresult
(
*
SetCPUProperty
)(
IMachine
*
machine
,
PRUint32
property
,
PRBool
value
);
nsresult
(
*
GetBootOrder
)(
IMachine
*
machine
,
PRUint32
position
,
PRUint32
*
device
);
nsresult
(
*
SetBootOrder
)(
IMachine
*
machine
,
PRUint32
position
,
PRUint32
device
);
nsresult
(
*
GetVRAMSize
)(
IMachine
*
machine
,
PRUint32
*
VRAMSize
);
nsresult
(
*
SetVRAMSize
)(
IMachine
*
machine
,
PRUint32
VRAMSize
);
nsresult
(
*
GetMonitorCount
)(
IMachine
*
machine
,
PRUint32
*
monitorCount
);
nsresult
(
*
SetMonitorCount
)(
IMachine
*
machine
,
PRUint32
monitorCount
);
nsresult
(
*
GetAccelerate3DEnabled
)(
IMachine
*
machine
,
PRBool
*
accelerate3DEnabled
);
nsresult
(
*
SetAccelerate3DEnabled
)(
IMachine
*
machine
,
PRBool
accelerate3DEnabled
);
nsresult
(
*
GetAccelerate2DVideoEnabled
)(
IMachine
*
machine
,
PRBool
*
accelerate2DVideoEnabled
);
nsresult
(
*
SetAccelerate2DVideoEnabled
)(
IMachine
*
machine
,
PRBool
accelerate2DVideoEnabled
);
nsresult
(
*
GetExtraData
)(
IMachine
*
machine
,
PRUnichar
*
key
,
PRUnichar
**
value
);
nsresult
(
*
SetExtraData
)(
IMachine
*
machine
,
PRUnichar
*
key
,
PRUnichar
*
value
);
...
...
@@ -270,23 +281,34 @@ typedef struct {
/* Functions for IBIOSSettings */
typedef
struct
{
nsresult
(
*
GetACPIEnabled
)(
IBIOSSettings
*
bios
,
PRBool
*
ACPIEnabled
);
nsresult
(
*
SetACPIEnabled
)(
IBIOSSettings
*
bios
,
PRBool
ACPIEnabled
);
nsresult
(
*
GetIOAPICEnabled
)(
IBIOSSettings
*
bios
,
PRBool
*
IOAPICEnabled
);
nsresult
(
*
SetIOAPICEnabled
)(
IBIOSSettings
*
bios
,
PRBool
IOAPICEnabled
);
}
vboxUniformedIBIOSSettings
;
/* Functions for IAudioAdapter */
typedef
struct
{
nsresult
(
*
GetEnabled
)(
IAudioAdapter
*
audioAdapter
,
PRBool
*
enabled
);
nsresult
(
*
SetEnabled
)(
IAudioAdapter
*
audioAdapter
,
PRBool
enabled
);
nsresult
(
*
GetAudioController
)(
IAudioAdapter
*
audioAdapter
,
PRUint32
*
audioController
);
nsresult
(
*
SetAudioController
)(
IAudioAdapter
*
audioAdapter
,
PRUint32
audioController
);
}
vboxUniformedIAudioAdapter
;
/* Functions for INetworkAdapter */
typedef
struct
{
nsresult
(
*
GetAttachmentType
)(
INetworkAdapter
*
adapter
,
PRUint32
*
attachmentType
);
nsresult
(
*
GetEnabled
)(
INetworkAdapter
*
adapter
,
PRBool
*
enabled
);
nsresult
(
*
SetEnabled
)(
INetworkAdapter
*
adapter
,
PRBool
enabled
);
nsresult
(
*
GetAdapterType
)(
INetworkAdapter
*
adapter
,
PRUint32
*
adapterType
);
nsresult
(
*
SetAdapterType
)(
INetworkAdapter
*
adapter
,
PRUint32
adapterType
);
nsresult
(
*
GetBridgedInterface
)(
INetworkAdapter
*
adapter
,
PRUnichar
**
bridgedInterface
);
nsresult
(
*
SetBridgedInterface
)(
INetworkAdapter
*
adapter
,
PRUnichar
*
bridgedInterface
);
nsresult
(
*
GetInternalNetwork
)(
INetworkAdapter
*
adapter
,
PRUnichar
**
internalNetwork
);
nsresult
(
*
SetInternalNetwork
)(
INetworkAdapter
*
adapter
,
PRUnichar
*
internalNetwork
);
nsresult
(
*
GetHostOnlyInterface
)(
INetworkAdapter
*
adapter
,
PRUnichar
**
hostOnlyInterface
);
nsresult
(
*
SetHostOnlyInterface
)(
INetworkAdapter
*
adapter
,
PRUnichar
*
hostOnlyInterface
);
nsresult
(
*
GetMACAddress
)(
INetworkAdapter
*
adapter
,
PRUnichar
**
MACAddress
);
nsresult
(
*
SetMACAddress
)(
INetworkAdapter
*
adapter
,
PRUnichar
*
MACAddress
);
nsresult
(
*
AttachToBridgedInterface
)(
INetworkAdapter
*
adapter
);
nsresult
(
*
AttachToInternalNetwork
)(
INetworkAdapter
*
adapter
);
...
...
@@ -296,28 +318,44 @@ typedef struct {
/* Functions for ISerialPort */
typedef
struct
{
nsresult
(
*
GetEnabled
)(
ISerialPort
*
port
,
PRBool
*
enabled
);
nsresult
(
*
SetEnabled
)(
ISerialPort
*
port
,
PRBool
enabled
);
nsresult
(
*
GetPath
)(
ISerialPort
*
port
,
PRUnichar
**
path
);
nsresult
(
*
SetPath
)(
ISerialPort
*
port
,
PRUnichar
*
path
);
nsresult
(
*
GetIRQ
)(
ISerialPort
*
port
,
PRUint32
*
IRQ
);
nsresult
(
*
SetIRQ
)(
ISerialPort
*
port
,
PRUint32
IRQ
);
nsresult
(
*
GetIOBase
)(
ISerialPort
*
port
,
PRUint32
*
IOBase
);
nsresult
(
*
SetIOBase
)(
ISerialPort
*
port
,
PRUint32
IOBase
);
nsresult
(
*
GetHostMode
)(
ISerialPort
*
port
,
PRUint32
*
hostMode
);
nsresult
(
*
SetHostMode
)(
ISerialPort
*
port
,
PRUint32
hostMode
);
}
vboxUniformedISerialPort
;
/* Functions for IParallelPort */
typedef
struct
{
nsresult
(
*
GetEnabled
)(
IParallelPort
*
port
,
PRBool
*
enabled
);
nsresult
(
*
SetEnabled
)(
IParallelPort
*
port
,
PRBool
enabled
);
nsresult
(
*
GetPath
)(
IParallelPort
*
port
,
PRUnichar
**
path
);
nsresult
(
*
SetPath
)(
IParallelPort
*
port
,
PRUnichar
*
path
);
nsresult
(
*
GetIRQ
)(
IParallelPort
*
port
,
PRUint32
*
IRQ
);
nsresult
(
*
SetIRQ
)(
IParallelPort
*
port
,
PRUint32
IRQ
);
nsresult
(
*
GetIOBase
)(
IParallelPort
*
port
,
PRUint32
*
IOBase
);
nsresult
(
*
SetIOBase
)(
IParallelPort
*
port
,
PRUint32
IOBase
);
}
vboxUniformedIParallelPort
;
/* Functions for IVRDPServer and IVRDEServer */
typedef
struct
{
nsresult
(
*
GetEnabled
)(
IVRDxServer
*
VRDxServer
,
PRBool
*
enabled
);
nsresult
(
*
SetEnabled
)(
IVRDxServer
*
VRDxServer
,
PRBool
enabled
);
nsresult
(
*
GetPorts
)(
vboxGlobalData
*
data
,
IVRDxServer
*
VRDxServer
,
virDomainGraphicsDefPtr
graphics
);
nsresult
(
*
SetPorts
)(
vboxGlobalData
*
data
,
IVRDxServer
*
VRDxServer
,
virDomainGraphicsDefPtr
graphics
);
nsresult
(
*
GetReuseSingleConnection
)(
IVRDxServer
*
VRDxServer
,
PRBool
*
enabled
);
nsresult
(
*
SetReuseSingleConnection
)(
IVRDxServer
*
VRDxServer
,
PRBool
enabled
);
nsresult
(
*
GetAllowMultiConnection
)(
IVRDxServer
*
VRDxServer
,
PRBool
*
enabled
);
nsresult
(
*
SetAllowMultiConnection
)(
IVRDxServer
*
VRDxServer
,
PRBool
enabled
);
nsresult
(
*
GetNetAddress
)(
vboxGlobalData
*
data
,
IVRDxServer
*
VRDxServer
,
PRUnichar
**
netAddress
);
nsresult
(
*
SetNetAddress
)(
vboxGlobalData
*
data
,
IVRDxServer
*
VRDxServer
,
PRUnichar
*
netAddress
);
}
vboxUniformedIVRDxServer
;
...
...
@@ -325,6 +363,7 @@ typedef struct {
/* Common Functions for IUSBController and IUSBDeviceFilters */
typedef
struct
{
nsresult
(
*
Enable
)(
IUSBCommon
*
USBCommon
);
nsresult
(
*
GetEnabled
)(
IUSBCommon
*
USBCommon
,
PRBool
*
enabled
);
nsresult
(
*
CreateDeviceFilter
)(
IUSBCommon
*
USBCommon
,
PRUnichar
*
name
,
IUSBDeviceFilter
**
filter
);
nsresult
(
*
InsertDeviceFilter
)(
IUSBCommon
*
USBCommon
,
PRUint32
position
,
...
...
@@ -332,18 +371,45 @@ typedef struct {
}
vboxUniformedIUSBCommon
;
typedef
struct
{
nsresult
(
*
GetProductId
)(
IUSBDeviceFilter
*
USBDeviceFilter
,
PRUnichar
**
productId
);
nsresult
(
*
SetProductId
)(
IUSBDeviceFilter
*
USBDeviceFilter
,
PRUnichar
*
productId
);
nsresult
(
*
GetActive
)(
IUSBDeviceFilter
*
USBDeviceFilter
,
PRBool
*
active
);
nsresult
(
*
SetActive
)(
IUSBDeviceFilter
*
USBDeviceFilter
,
PRBool
active
);
nsresult
(
*
GetVendorId
)(
IUSBDeviceFilter
*
USBDeviceFilter
,
PRUnichar
**
vendorId
);
nsresult
(
*
SetVendorId
)(
IUSBDeviceFilter
*
USBDeviceFilter
,
PRUnichar
*
vendorId
);
}
vboxUniformedIUSBDeviceFilter
;
/* Functions for IMedium */
typedef
struct
{
nsresult
(
*
GetId
)(
IMedium
*
medium
,
vboxIIDUnion
*
iidu
);
nsresult
(
*
GetLocation
)(
IMedium
*
medium
,
PRUnichar
**
location
);
nsresult
(
*
GetReadOnly
)(
IMedium
*
medium
,
PRBool
*
readOnly
);
nsresult
(
*
Release
)(
IMedium
*
medium
);
nsresult
(
*
SetType
)(
IMedium
*
medium
,
PRUint32
type
);
}
vboxUniformedIMedium
;
/* Functions for IMediumAttachment */
typedef
struct
{
nsresult
(
*
GetMedium
)(
IMediumAttachment
*
mediumAttachment
,
IMedium
**
medium
);
nsresult
(
*
GetController
)(
IMediumAttachment
*
mediumAttachment
,
PRUnichar
**
controller
);
nsresult
(
*
GetType
)(
IMediumAttachment
*
mediumAttachment
,
PRUint32
*
type
);
nsresult
(
*
GetPort
)(
IMediumAttachment
*
mediumAttachment
,
PRInt32
*
port
);
nsresult
(
*
GetDevice
)(
IMediumAttachment
*
mediumAttachment
,
PRInt32
*
device
);
}
vboxUniformedIMediumAttachment
;
/* Functions for IStorageController */
typedef
struct
{
nsresult
(
*
GetBus
)(
IStorageController
*
storageController
,
PRUint32
*
bus
);
}
vboxUniformedIStorageController
;
/* Functions for ISharedFolder */
typedef
struct
{
nsresult
(
*
GetHostPath
)(
ISharedFolder
*
sharedFolder
,
PRUnichar
**
hostPath
);
nsresult
(
*
GetName
)(
ISharedFolder
*
sharedFolder
,
PRUnichar
**
name
);
nsresult
(
*
GetWritable
)(
ISharedFolder
*
sharedFolder
,
PRBool
*
writable
);
}
vboxUniformedISharedFolder
;
typedef
struct
{
bool
(
*
Online
)(
PRUint32
state
);
bool
(
*
NotStart
)(
PRUint32
state
);
...
...
@@ -364,6 +430,9 @@ typedef struct {
void
(
*
deleteConfig
)(
IMachine
*
machine
);
void
(
*
vboxAttachDrivesOld
)(
virDomainDefPtr
def
,
vboxGlobalData
*
data
,
IMachine
*
machine
);
virDomainState
(
*
vboxConvertState
)(
PRUint32
state
);
void
(
*
dumpIDEHDDsOld
)(
virDomainDefPtr
def
,
vboxGlobalData
*
data
,
IMachine
*
machine
);
void
(
*
dumpDVD
)(
virDomainDefPtr
def
,
vboxGlobalData
*
data
,
IMachine
*
machine
);
void
(
*
dumpFloppy
)(
virDomainDefPtr
def
,
vboxGlobalData
*
data
,
IMachine
*
machine
);
vboxUniformedPFN
UPFN
;
vboxUniformedIID
UIID
;
vboxUniformedArray
UArray
;
...
...
@@ -383,6 +452,9 @@ typedef struct {
vboxUniformedIUSBCommon
UIUSBCommon
;
vboxUniformedIUSBDeviceFilter
UIUSBDeviceFilter
;
vboxUniformedIMedium
UIMedium
;
vboxUniformedIMediumAttachment
UIMediumAttachment
;
vboxUniformedIStorageController
UIStorageController
;
vboxUniformedISharedFolder
UISharedFolder
;
uniformedMachineStateChecker
machineStateChecker
;
/* vbox API features */
bool
domainEventCallbacks
;
...
...
@@ -392,6 +464,7 @@ typedef struct {
bool
chipsetType
;
bool
accelerate2DVideo
;
bool
vboxAttachDrivesUseOld
;
bool
oldMediumInterface
;
}
vboxUniformedAPI
;
/* libvirt API
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录