2 * This file is part of the libvirt-go project
4 * Permission is hereby granted, free of charge, to any person obtaining a copy
5 * of this software and associated documentation files (the "Software"), to deal
6 * in the Software without restriction, including without limitation the rights
7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 * copies of the Software, and to permit persons to whom the Software is
9 * furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 * Copyright (C) 2018 Red Hat, Inc.
29 #cgo pkg-config: libvirt
31 #include "interface_wrapper.h"
35 virInterfaceCreateWrapper(virInterfacePtr iface,
39 int ret = virInterfaceCreate(iface, flags);
41 virCopyLastError(err);
48 virInterfaceDestroyWrapper(virInterfacePtr iface,
52 int ret = virInterfaceDestroy(iface, flags);
54 virCopyLastError(err);
61 virInterfaceFreeWrapper(virInterfacePtr iface,
64 int ret = virInterfaceFree(iface);
66 virCopyLastError(err);
73 virInterfaceGetConnectWrapper(virInterfacePtr iface,
76 virConnectPtr ret = virInterfaceGetConnect(iface);
78 virCopyLastError(err);
85 virInterfaceGetMACStringWrapper(virInterfacePtr iface,
88 const char * ret = virInterfaceGetMACString(iface);
90 virCopyLastError(err);
97 virInterfaceGetNameWrapper(virInterfacePtr iface,
100 const char * ret = virInterfaceGetName(iface);
102 virCopyLastError(err);
109 virInterfaceGetXMLDescWrapper(virInterfacePtr iface,
113 char * ret = virInterfaceGetXMLDesc(iface, flags);
115 virCopyLastError(err);
122 virInterfaceIsActiveWrapper(virInterfacePtr iface,
125 int ret = virInterfaceIsActive(iface);
127 virCopyLastError(err);
134 virInterfaceRefWrapper(virInterfacePtr iface,
137 int ret = virInterfaceRef(iface);
139 virCopyLastError(err);
146 virInterfaceUndefineWrapper(virInterfacePtr iface,
149 int ret = virInterfaceUndefine(iface);
151 virCopyLastError(err);