...
 
Commits (8)
......@@ -1738,22 +1738,22 @@ type NodeCPUStats struct {
// See also https://libvirt.org/html/libvirt-libvirt-host.html#virNodeGetCPUStats
func (c *Connect) GetCPUStats(cpuNum int, flags uint32) (*NodeCPUStats, error) {
var nparams C.int
var cnparams C.int
var err C.virError
ret := C.virNodeGetCPUStatsWrapper(c.ptr, C.int(cpuNum), nil, &nparams, C.uint(0), &err)
ret := C.virNodeGetCPUStatsWrapper(c.ptr, C.int(cpuNum), nil, &cnparams, C.uint(0), &err)
if ret == -1 {
return nil, makeError(&err)
}
params := make([]C.virNodeCPUStats, nparams)
ret = C.virNodeGetCPUStatsWrapper(c.ptr, C.int(cpuNum), (*C.virNodeCPUStats)(unsafe.Pointer(&params[0])), &nparams, C.uint(flags), &err)
params := make([]C.virNodeCPUStats, cnparams)
ret = C.virNodeGetCPUStatsWrapper(c.ptr, C.int(cpuNum), (*C.virNodeCPUStats)(unsafe.Pointer(&params[0])), &cnparams, C.uint(flags), &err)
if ret == -1 {
return nil, makeError(&err)
}
stats := &NodeCPUStats{}
for i := 0; i < int(nparams); i++ {
for i := 0; i < int(cnparams); i++ {
param := params[i]
field := C.GoString((*C.char)(unsafe.Pointer(&param.field)))
switch field {
......@@ -1897,23 +1897,22 @@ func (c *Connect) GetMemoryParameters(flags uint32) (*NodeMemoryParameters, erro
params := &NodeMemoryParameters{}
info := getMemoryParameterFieldInfo(params)
var nparams C.int
var cnparams C.int
var err C.virError
ret := C.virNodeGetMemoryParametersWrapper(c.ptr, nil, &nparams, C.uint(0), &err)
ret := C.virNodeGetMemoryParametersWrapper(c.ptr, nil, &cnparams, C.uint(0), &err)
if ret == -1 {
return nil, makeError(&err)
}
cparams := make([]C.virTypedParameter, nparams)
ret = C.virNodeGetMemoryParametersWrapper(c.ptr, (*C.virTypedParameter)(unsafe.Pointer(&cparams[0])), &nparams, C.uint(flags), &err)
cparams := typedParamsNew(cnparams)
defer C.virTypedParamsFree(cparams, cnparams)
ret = C.virNodeGetMemoryParametersWrapper(c.ptr, cparams, &cnparams, C.uint(flags), &err)
if ret == -1 {
return nil, makeError(&err)
}
defer C.virTypedParamsClear((*C.virTypedParameter)(unsafe.Pointer(&cparams[0])), nparams)
_, gerr := typedParamsUnpack(cparams, info)
_, gerr := typedParamsUnpack(cparams, cnparams, info)
if gerr != nil {
return nil, gerr
}
......@@ -1934,22 +1933,22 @@ type NodeMemoryStats struct {
// See also https://libvirt.org/html/libvirt-libvirt-host.html#virNodeGetMemoryStats
func (c *Connect) GetMemoryStats(cellNum int, flags uint32) (*NodeMemoryStats, error) {
var nparams C.int
var cnparams C.int
var err C.virError
ret := C.virNodeGetMemoryStatsWrapper(c.ptr, C.int(cellNum), nil, &nparams, 0, &err)
ret := C.virNodeGetMemoryStatsWrapper(c.ptr, C.int(cellNum), nil, &cnparams, 0, &err)
if ret == -1 {
return nil, makeError(&err)
}
params := make([]C.virNodeMemoryStats, nparams)
ret = C.virNodeGetMemoryStatsWrapper(c.ptr, C.int(cellNum), (*C.virNodeMemoryStats)(unsafe.Pointer(&params[0])), &nparams, C.uint(flags), &err)
params := make([]C.virNodeMemoryStats, cnparams)
ret = C.virNodeGetMemoryStatsWrapper(c.ptr, C.int(cellNum), (*C.virNodeMemoryStats)(unsafe.Pointer(&params[0])), &cnparams, C.uint(flags), &err)
if ret == -1 {
return nil, makeError(&err)
}
stats := &NodeMemoryStats{}
for i := 0; i < int(nparams); i++ {
for i := 0; i < int(cnparams); i++ {
param := params[i]
field := C.GoString((*C.char)(unsafe.Pointer(&param.field)))
switch field {
......@@ -1995,29 +1994,19 @@ func (c *Connect) GetSecurityModel() (*NodeSecurityModel, error) {
func (c *Connect) SetMemoryParameters(params *NodeMemoryParameters, flags uint32) error {
info := getMemoryParameterFieldInfo(params)
var nparams C.int
var err C.virError
ret := C.virNodeGetMemoryParametersWrapper(c.ptr, nil, &nparams, 0, &err)
if ret == -1 {
return makeError(&err)
cparams, cnparams, gerr := typedParamsPackNew(info)
if gerr != nil {
return gerr
}
cparams := make([]C.virTypedParameter, nparams)
ret = C.virNodeGetMemoryParametersWrapper(c.ptr, (*C.virTypedParameter)(unsafe.Pointer(&cparams[0])), &nparams, 0, &err)
defer C.virTypedParamsFree(cparams, cnparams)
var err C.virError
ret := C.virNodeSetMemoryParametersWrapper(c.ptr, cparams, cnparams, C.uint(flags), &err)
if ret == -1 {
return makeError(&err)
}
defer C.virTypedParamsClear((*C.virTypedParameter)(unsafe.Pointer(&cparams[0])), nparams)
gerr := typedParamsPack(cparams, info)
if gerr != nil {
return gerr
}
ret = C.virNodeSetMemoryParametersWrapper(c.ptr, (*C.virTypedParameter)(unsafe.Pointer(&cparams[0])), nparams, C.uint(flags), &err)
return nil
}
......@@ -2808,7 +2797,7 @@ func (c *Connect) GetAllDomainStats(doms []*Domain, statsTypes DomainStatsTypes,
state := &DomainStatsState{}
stateInfo := getDomainStatsStateFieldInfo(state)
count, gerr := typedParamsUnpackLen(cdomstats.params, int(cdomstats.nparams), stateInfo)
count, gerr := typedParamsUnpack(cdomstats.params, cdomstats.nparams, stateInfo)
if gerr != nil {
return []DomainStats{}, gerr
}
......@@ -2819,7 +2808,7 @@ func (c *Connect) GetAllDomainStats(doms []*Domain, statsTypes DomainStatsTypes,
cpu := &DomainStatsCPU{}
cpuInfo := getDomainStatsCPUFieldInfo(cpu)
count, gerr = typedParamsUnpackLen(cdomstats.params, int(cdomstats.nparams), cpuInfo)
count, gerr = typedParamsUnpack(cdomstats.params, cdomstats.nparams, cpuInfo)
if gerr != nil {
return []DomainStats{}, gerr
}
......@@ -2830,7 +2819,7 @@ func (c *Connect) GetAllDomainStats(doms []*Domain, statsTypes DomainStatsTypes,
balloon := &DomainStatsBalloon{}
balloonInfo := getDomainStatsBalloonFieldInfo(balloon)
count, gerr = typedParamsUnpackLen(cdomstats.params, int(cdomstats.nparams), balloonInfo)
count, gerr = typedParamsUnpack(cdomstats.params, cdomstats.nparams, balloonInfo)
if gerr != nil {
return []DomainStats{}, gerr
}
......@@ -2841,7 +2830,7 @@ func (c *Connect) GetAllDomainStats(doms []*Domain, statsTypes DomainStatsTypes,
perf := &DomainStatsPerf{}
perfInfo := getDomainStatsPerfFieldInfo(perf)
count, gerr = typedParamsUnpackLen(cdomstats.params, int(cdomstats.nparams), perfInfo)
count, gerr = typedParamsUnpack(cdomstats.params, cdomstats.nparams, perfInfo)
if gerr != nil {
return []DomainStats{}, gerr
}
......@@ -2852,7 +2841,7 @@ func (c *Connect) GetAllDomainStats(doms []*Domain, statsTypes DomainStatsTypes,
lengths := domainStatsLengths{}
lengthsInfo := getDomainStatsLengthsFieldInfo(&lengths)
count, gerr = typedParamsUnpackLen(cdomstats.params, int(cdomstats.nparams), lengthsInfo)
count, gerr = typedParamsUnpack(cdomstats.params, cdomstats.nparams, lengthsInfo)
if gerr != nil {
return []DomainStats{}, gerr
}
......@@ -2868,7 +2857,7 @@ func (c *Connect) GetAllDomainStats(doms []*Domain, statsTypes DomainStatsTypes,
vcpu := DomainStatsVcpu{}
vcpuInfo := getDomainStatsVcpuFieldInfo(j, &vcpu)
count, gerr = typedParamsUnpackLen(cdomstats.params, int(cdomstats.nparams), vcpuInfo)
count, gerr = typedParamsUnpack(cdomstats.params, cdomstats.nparams, vcpuInfo)
if gerr != nil {
return []DomainStats{}, gerr
}
......@@ -2886,7 +2875,7 @@ func (c *Connect) GetAllDomainStats(doms []*Domain, statsTypes DomainStatsTypes,
block := DomainStatsBlock{}
blockInfo := getDomainStatsBlockFieldInfo(j, &block)
count, gerr = typedParamsUnpackLen(cdomstats.params, int(cdomstats.nparams), blockInfo)
count, gerr = typedParamsUnpack(cdomstats.params, cdomstats.nparams, blockInfo)
if gerr != nil {
return []DomainStats{}, gerr
}
......@@ -2902,7 +2891,7 @@ func (c *Connect) GetAllDomainStats(doms []*Domain, statsTypes DomainStatsTypes,
net := DomainStatsNet{}
netInfo := getDomainStatsNetFieldInfo(j, &net)
count, gerr = typedParamsUnpackLen(cdomstats.params, int(cdomstats.nparams), netInfo)
count, gerr = typedParamsUnpack(cdomstats.params, cdomstats.nparams, netInfo)
if gerr != nil {
return []DomainStats{}, gerr
}
......@@ -2964,17 +2953,17 @@ func (c *Connect) GetSEVInfo(flags uint32) (*NodeSEVParameters, error) {
info := getNodeSEVFieldInfo(params)
var cparams *C.virTypedParameter
var nparams C.int
var cnparams C.int
var err C.virError
ret := C.virNodeGetSEVInfoWrapper(c.ptr, (*C.virTypedParameterPtr)(unsafe.Pointer(&cparams)), &nparams, C.uint(flags), &err)
ret := C.virNodeGetSEVInfoWrapper(c.ptr, (*C.virTypedParameterPtr)(unsafe.Pointer(&cparams)), &cnparams, C.uint(flags), &err)
if ret == -1 {
return nil, makeError(&err)
}
defer C.virTypedParamsFree(cparams, nparams)
defer C.virTypedParamsFree(cparams, cnparams)
_, gerr := typedParamsUnpackLen(cparams, int(nparams), info)
_, gerr := typedParamsUnpack(cparams, cnparams, info)
if gerr != nil {
return nil, gerr
}
......
This diff is collapsed.
......@@ -758,12 +758,12 @@ func countPinInfo(cparams C.virTypedParameterPtr, nparams C.int) (int, int) {
return maxvcpus + 1, maxiothreads + 1
}
func domainEventTunableGetPin(params C.virTypedParameterPtr, nparams C.int) *DomainEventTunableCpuPin {
func domainEventTunableGetPin(params C.virTypedParameterPtr, cnparams C.int) *DomainEventTunableCpuPin {
var pin domainEventTunablePinTemp
numvcpus, numiothreads := countPinInfo(params, nparams)
numvcpus, numiothreads := countPinInfo(params, cnparams)
pinInfo := getDomainPinTempFieldInfo(numvcpus, numiothreads, &pin)
num, err := typedParamsUnpackLen(params, int(nparams), pinInfo)
num, err := typedParamsUnpack(params, cnparams, pinInfo)
if num == 0 || err != nil {
return nil
}
......@@ -806,13 +806,13 @@ func domainEventTunableGetPin(params C.virTypedParameterPtr, nparams C.int) *Dom
}
//export domainEventTunableCallback
func domainEventTunableCallback(c C.virConnectPtr, d C.virDomainPtr, params C.virTypedParameterPtr, nparams C.int, goCallbackId int) {
func domainEventTunableCallback(c C.virConnectPtr, d C.virDomainPtr, params C.virTypedParameterPtr, cnparams C.int, goCallbackId int) {
domain := &Domain{ptr: d}
connection := &Connect{ptr: c}
eventDetails := &DomainEventTunable{}
pin := domainEventTunableGetPin(params, nparams)
pin := domainEventTunableGetPin(params, cnparams)
if pin != nil {
eventDetails.CpuPin = pin
}
......@@ -820,7 +820,7 @@ func domainEventTunableCallback(c C.virConnectPtr, d C.virDomainPtr, params C.vi
var sched DomainSchedulerParameters
schedInfo := getDomainTuneSchedulerParametersFieldInfo(&sched)
num, _ := typedParamsUnpackLen(params, int(nparams), schedInfo)
num, _ := typedParamsUnpack(params, cnparams, schedInfo)
if num > 0 {
eventDetails.CpuSched = &sched
}
......@@ -831,12 +831,12 @@ func domainEventTunableCallback(c C.virConnectPtr, d C.virDomainPtr, params C.vi
s: &eventDetails.BlkdevDisk,
},
}
typedParamsUnpackLen(params, int(nparams), blknameInfo)
typedParamsUnpack(params, cnparams, blknameInfo)
var blktune DomainBlockIoTuneParameters
blktuneInfo := getTuneBlockIoTuneParametersFieldInfo(&blktune)
num, _ = typedParamsUnpackLen(params, int(nparams), blktuneInfo)
num, _ = typedParamsUnpack(params, cnparams, blktuneInfo)
if num > 0 {
eventDetails.BlkdevTune = &blktune
}
......@@ -903,14 +903,14 @@ func domainEventMigrationIterationCallback(c C.virConnectPtr, d C.virDomainPtr,
}
//export domainEventJobCompletedCallback
func domainEventJobCompletedCallback(c C.virConnectPtr, d C.virDomainPtr, params C.virTypedParameterPtr, nparams C.int, goCallbackId int) {
func domainEventJobCompletedCallback(c C.virConnectPtr, d C.virDomainPtr, params C.virTypedParameterPtr, cnparams C.int, goCallbackId int) {
domain := &Domain{ptr: d}
connection := &Connect{ptr: c}
eventDetails := &DomainEventJobCompleted{}
info := getDomainJobInfoFieldInfo(&eventDetails.Info)
typedParamsUnpackLen(params, int(nparams), info)
typedParamsUnpack(params, cnparams, info)
callbackFunc := getCallbackId(goCallbackId)
callback, ok := callbackFunc.(DomainEventJobCompletedCallback)
......
This diff is collapsed.
......@@ -77,12 +77,16 @@ func TestPackUnpack(t *testing.T) {
sl: &got3,
}
params, err := typedParamsPackNew(infoin)
params, nparams, err := typedParamsPackNew(infoin)
if err != nil {
lverr, ok := err.(Error)
if ok && lverr.Code == ERR_NO_SUPPORT {
return
}
t.Fatal(err)
}
nout, err := typedParamsUnpack(*params, infoout)
nout, err := typedParamsUnpack(params, nparams, infoout)
if err != nil {
t.Fatal(err)
}
......
/*
* This file is part of the libvirt-go project
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
* Copyright (C) 2019 Red Hat, Inc.
*
*/
package libvirt
/*
#cgo pkg-config: libvirt
#include <assert.h>
#include "typedparams_wrapper.h"
int
virTypedParamsAddIntWrapper(virTypedParameterPtr *params,
int *nparams,
int *maxparams,
const char *name,
int value,
virErrorPtr err)
{
int ret = virTypedParamsAddInt(params, nparams, maxparams, name, value);
if (ret < 0) {
virCopyLastError(err);
}
return ret;
}
int
virTypedParamsAddUIntWrapper(virTypedParameterPtr *params,
int *nparams,
int *maxparams,
const char *name,
unsigned int value,
virErrorPtr err)
{
int ret = virTypedParamsAddUInt(params, nparams, maxparams, name, value);
if (ret < 0) {
virCopyLastError(err);
}
return ret;
}
int
virTypedParamsAddLLongWrapper(virTypedParameterPtr *params,
int *nparams,
int *maxparams,
const char *name,
long long value,
virErrorPtr err)
{
int ret = virTypedParamsAddLLong(params, nparams, maxparams, name, value);
if (ret < 0) {
virCopyLastError(err);
}
return ret;
}
int
virTypedParamsAddULLongWrapper(virTypedParameterPtr *params,
int *nparams,
int *maxparams,
const char *name,
unsigned long long value,
virErrorPtr err)
{
int ret = virTypedParamsAddULLong(params, nparams, maxparams, name, value);
if (ret < 0) {
virCopyLastError(err);
}
return ret;
}
int
virTypedParamsAddDoubleWrapper(virTypedParameterPtr *params,
int *nparams,
int *maxparams,
const char *name,
double value,
virErrorPtr err)
{
int ret = virTypedParamsAddDouble(params, nparams, maxparams, name, value);
if (ret < 0) {
virCopyLastError(err);
}
return ret;
}
int
virTypedParamsAddBooleanWrapper(virTypedParameterPtr *params,
int *nparams,
int *maxparams,
const char *name,
int value,
virErrorPtr err)
{
int ret = virTypedParamsAddBoolean(params, nparams, maxparams, name, value);
if (ret < 0) {
virCopyLastError(err);
}
return ret;
}
int
virTypedParamsAddStringWrapper(virTypedParameterPtr *params,
int *nparams,
int *maxparams,
const char *name,
const char *value,
virErrorPtr err)
{
int ret = virTypedParamsAddString(params, nparams, maxparams, name, value);
if (ret < 0) {
virCopyLastError(err);
}
return ret;
}
int
virTypedParamsGetIntWrapper(virTypedParameterPtr params,
int nparams,
const char *name,
int *value,
virErrorPtr err)
{
int ret = virTypedParamsGetInt(params, nparams, name, value);
if (ret < 0) {
virCopyLastError(err);
}
return ret;
}
int
virTypedParamsGetUIntWrapper(virTypedParameterPtr params,
int nparams,
const char *name,
unsigned int *value,
virErrorPtr err)
{
int ret = virTypedParamsGetUInt(params, nparams, name, value);
if (ret < 0) {
virCopyLastError(err);
}
return ret;
}
int
virTypedParamsGetLLongWrapper(virTypedParameterPtr params,
int nparams,
const char *name,
long long *value,
virErrorPtr err)
{
int ret = virTypedParamsGetLLong(params, nparams, name, value);
if (ret < 0) {
virCopyLastError(err);
}
return ret;
}
int
virTypedParamsGetULLongWrapper(virTypedParameterPtr params,
int nparams,
const char *name,
unsigned long long *value,
virErrorPtr err)
{
int ret = virTypedParamsGetULLong(params, nparams, name, value);
if (ret < 0) {
virCopyLastError(err);
}
return ret;
}
int
virTypedParamsGetDoubleWrapper(virTypedParameterPtr params,
int nparams,
const char *name,
double *value,
virErrorPtr err)
{
int ret = virTypedParamsGetDouble(params, nparams, name, value);
if (ret < 0) {
virCopyLastError(err);
}
return ret;
}
int
virTypedParamsGetBooleanWrapper(virTypedParameterPtr params,
int nparams,
const char *name,
int *value,
virErrorPtr err)
{
int ret = virTypedParamsGetBoolean(params, nparams, name, value);
if (ret < 0) {
virCopyLastError(err);
}
return ret;
}
int
virTypedParamsGetStringWrapper(virTypedParameterPtr params,
int nparams,
const char *name,
const char **value,
virErrorPtr err)
{
int ret = virTypedParamsGetString(params, nparams, name, value);
if (ret < 0) {
virCopyLastError(err);
}
return ret;
}
*/
import "C"
/*
* This file is part of the libvirt-go project
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
* Copyright (C) 2019 Red Hat, Inc.
*
*/
#ifndef LIBVIRT_GO_TYPEDPARAMS_WRAPPER_H__
#define LIBVIRT_GO_TYPEDPARAMS_WRAPPER_H__
#include <libvirt/libvirt.h>
#include <libvirt/virterror.h>
int
virTypedParamsAddIntWrapper(virTypedParameterPtr *params,
int *nparams,
int *maxparams,
const char *name,
int value,
virErrorPtr err);
int
virTypedParamsAddUIntWrapper(virTypedParameterPtr *params,
int *nparams,
int *maxparams,
const char *name,
unsigned int value,
virErrorPtr err);
int
virTypedParamsAddLLongWrapper(virTypedParameterPtr *params,
int *nparams,
int *maxparams,
const char *name,
long long value,
virErrorPtr err);
int
virTypedParamsAddULLongWrapper(virTypedParameterPtr *params,
int *nparams,
int *maxparams,
const char *name,
unsigned long long value,
virErrorPtr err);
int
virTypedParamsAddDoubleWrapper(virTypedParameterPtr *params,
int *nparams,
int *maxparams,
const char *name,
double value,
virErrorPtr err);
int
virTypedParamsAddBooleanWrapper(virTypedParameterPtr *params,
int *nparams,
int *maxparams,
const char *name,
int value,
virErrorPtr err);
int
virTypedParamsAddStringWrapper(virTypedParameterPtr *params,
int *nparams,
int *maxparams,
const char *name,
const char *value,
virErrorPtr err);
int
virTypedParamsGetIntWrapper(virTypedParameterPtr params,
int nparams,
const char *name,
int *value,
virErrorPtr err);
int
virTypedParamsGetUIntWrapper(virTypedParameterPtr params,
int nparams,
const char *name,
unsigned int *value,
virErrorPtr err);
int
virTypedParamsGetLLongWrapper(virTypedParameterPtr params,
int nparams,
const char *name,
long long *value,
virErrorPtr err);
int
virTypedParamsGetULLongWrapper(virTypedParameterPtr params,
int nparams,
const char *name,
unsigned long long *value,
virErrorPtr err);
int
virTypedParamsGetDoubleWrapper(virTypedParameterPtr params,
int nparams,
const char *name,
double *value,
virErrorPtr err);
int
virTypedParamsGetBooleanWrapper(virTypedParameterPtr params,
int nparams,
const char *name,
int *value,
virErrorPtr err);
int
virTypedParamsGetStringWrapper(virTypedParameterPtr params,
int nparams,
const char *name,
const char **value,
virErrorPtr err);
#endif /* LIBVIRT_GO_TYPEDPARAMS_WRAPPER_H__ */