mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 17:34:18 +03:00
Move virNWFilter related APIs out of libvirt.h.in
Create a new libvirt-nwfilter.h file to hold the public API definitions for the virNWFilter type. This header file is not self-contained, so applications will not directly include it. They will continue to #include <libvirt/libvirt.h>
This commit is contained in:
parent
fc964bfc27
commit
40741984fc
@ -25,6 +25,7 @@ included_files = {
|
||||
"libvirt-domain-snapshot.h": "header with general libvirt API definitions",
|
||||
"libvirt-interface.h": "header with general libvirt API definitions",
|
||||
"libvirt-network.h": "header with general libvirt API definitions",
|
||||
"libvirt-nwfilter.h": "header with general libvirt API definitions",
|
||||
"virterror.h": "header with error specific API definitions",
|
||||
"libvirt.c": "Main interfaces for the libvirt library",
|
||||
"libvirt-domain.c": "Domain interfaces for the libvirt library",
|
||||
|
@ -22,6 +22,7 @@ virinc_HEADERS = libvirt.h \
|
||||
libvirt-domain-snapshot.h \
|
||||
libvirt-interface.h \
|
||||
libvirt-network.h \
|
||||
libvirt-nwfilter.h \
|
||||
libvirt-lxc.h \
|
||||
libvirt-qemu.h \
|
||||
virterror.h
|
||||
|
95
include/libvirt/libvirt-nwfilter.h
Normal file
95
include/libvirt/libvirt-nwfilter.h
Normal file
@ -0,0 +1,95 @@
|
||||
/*
|
||||
* libvirt-nwfilter.h
|
||||
* Summary: APIs for management of nwfilters
|
||||
* Description: Provides APIs for the management of nwfilters
|
||||
* Author: Daniel Veillard <veillard@redhat.com>
|
||||
*
|
||||
* Copyright (C) 2006-2014 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __VIR_LIBVIRT_NWFILTER_H__
|
||||
# define __VIR_LIBVIRT_NWFILTER_H__
|
||||
|
||||
# ifndef __VIR_LIBVIRT_H_INCLUDES__
|
||||
# error "Don't include this file directly, only use libvirt/libvirt.h"
|
||||
# endif
|
||||
|
||||
/**
|
||||
* virNWFilter:
|
||||
*
|
||||
* a virNWFilter is a private structure representing a network filter
|
||||
*/
|
||||
typedef struct _virNWFilter virNWFilter;
|
||||
|
||||
/**
|
||||
* virNWFilterPtr:
|
||||
*
|
||||
* a virNWFilterPtr is pointer to a virNWFilter private structure,
|
||||
* this is the type used to reference a network filter in the API.
|
||||
*/
|
||||
typedef virNWFilter *virNWFilterPtr;
|
||||
|
||||
|
||||
/*
|
||||
* List NWFilters
|
||||
*/
|
||||
int virConnectNumOfNWFilters (virConnectPtr conn);
|
||||
int virConnectListNWFilters (virConnectPtr conn,
|
||||
char **const names,
|
||||
int maxnames);
|
||||
int virConnectListAllNWFilters(virConnectPtr conn,
|
||||
virNWFilterPtr **filters,
|
||||
unsigned int flags);
|
||||
/*
|
||||
* Lookup nwfilter by name or uuid
|
||||
*/
|
||||
virNWFilterPtr virNWFilterLookupByName (virConnectPtr conn,
|
||||
const char *name);
|
||||
virNWFilterPtr virNWFilterLookupByUUID (virConnectPtr conn,
|
||||
const unsigned char *uuid);
|
||||
virNWFilterPtr virNWFilterLookupByUUIDString (virConnectPtr conn,
|
||||
const char *uuid);
|
||||
|
||||
/*
|
||||
* Define persistent nwfilter
|
||||
*/
|
||||
virNWFilterPtr virNWFilterDefineXML (virConnectPtr conn,
|
||||
const char *xmlDesc);
|
||||
|
||||
/*
|
||||
* Delete persistent nwfilter
|
||||
*/
|
||||
int virNWFilterUndefine (virNWFilterPtr nwfilter);
|
||||
|
||||
/*
|
||||
* NWFilter destroy/free
|
||||
*/
|
||||
int virNWFilterRef (virNWFilterPtr nwfilter);
|
||||
int virNWFilterFree (virNWFilterPtr nwfilter);
|
||||
|
||||
/*
|
||||
* NWFilter information
|
||||
*/
|
||||
const char* virNWFilterGetName (virNWFilterPtr nwfilter);
|
||||
int virNWFilterGetUUID (virNWFilterPtr nwfilter,
|
||||
unsigned char *uuid);
|
||||
int virNWFilterGetUUIDString (virNWFilterPtr nwfilter,
|
||||
char *buf);
|
||||
char * virNWFilterGetXMLDesc (virNWFilterPtr nwfilter,
|
||||
unsigned int flags);
|
||||
|
||||
#endif /* __VIR_LIBVIRT_NWFILTER_H__ */
|
@ -4961,69 +4961,6 @@ int virConnectDomainEventDeregisterAny(virConnectPtr conn,
|
||||
int callbackID);
|
||||
|
||||
|
||||
/**
|
||||
* virNWFilter:
|
||||
*
|
||||
* a virNWFilter is a private structure representing a network filter
|
||||
*/
|
||||
typedef struct _virNWFilter virNWFilter;
|
||||
|
||||
/**
|
||||
* virNWFilterPtr:
|
||||
*
|
||||
* a virNWFilterPtr is pointer to a virNWFilter private structure,
|
||||
* this is the type used to reference a network filter in the API.
|
||||
*/
|
||||
typedef virNWFilter *virNWFilterPtr;
|
||||
|
||||
|
||||
/*
|
||||
* List NWFilters
|
||||
*/
|
||||
int virConnectNumOfNWFilters (virConnectPtr conn);
|
||||
int virConnectListNWFilters (virConnectPtr conn,
|
||||
char **const names,
|
||||
int maxnames);
|
||||
int virConnectListAllNWFilters(virConnectPtr conn,
|
||||
virNWFilterPtr **filters,
|
||||
unsigned int flags);
|
||||
/*
|
||||
* Lookup nwfilter by name or uuid
|
||||
*/
|
||||
virNWFilterPtr virNWFilterLookupByName (virConnectPtr conn,
|
||||
const char *name);
|
||||
virNWFilterPtr virNWFilterLookupByUUID (virConnectPtr conn,
|
||||
const unsigned char *uuid);
|
||||
virNWFilterPtr virNWFilterLookupByUUIDString (virConnectPtr conn,
|
||||
const char *uuid);
|
||||
|
||||
/*
|
||||
* Define persistent nwfilter
|
||||
*/
|
||||
virNWFilterPtr virNWFilterDefineXML (virConnectPtr conn,
|
||||
const char *xmlDesc);
|
||||
|
||||
/*
|
||||
* Delete persistent nwfilter
|
||||
*/
|
||||
int virNWFilterUndefine (virNWFilterPtr nwfilter);
|
||||
|
||||
/*
|
||||
* NWFilter destroy/free
|
||||
*/
|
||||
int virNWFilterRef (virNWFilterPtr nwfilter);
|
||||
int virNWFilterFree (virNWFilterPtr nwfilter);
|
||||
|
||||
/*
|
||||
* NWFilter information
|
||||
*/
|
||||
const char* virNWFilterGetName (virNWFilterPtr nwfilter);
|
||||
int virNWFilterGetUUID (virNWFilterPtr nwfilter,
|
||||
unsigned char *uuid);
|
||||
int virNWFilterGetUUIDString (virNWFilterPtr nwfilter,
|
||||
char *buf);
|
||||
char * virNWFilterGetXMLDesc (virNWFilterPtr nwfilter,
|
||||
unsigned int flags);
|
||||
/**
|
||||
* virDomainConsoleFlags
|
||||
*
|
||||
@ -5265,6 +5202,7 @@ typedef virMemoryParameter *virMemoryParameterPtr;
|
||||
#include <libvirt/libvirt-domain-snapshot.h>
|
||||
#include <libvirt/libvirt-interface.h>
|
||||
#include <libvirt/libvirt-network.h>
|
||||
#include <libvirt/libvirt-nwfilter.h>
|
||||
#undef __VIR_LIBVIRT_H_INCLUDES__
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -2254,6 +2254,7 @@ exit 0
|
||||
%{_includedir}/libvirt/libvirt-domain-snapshot.h
|
||||
%{_includedir}/libvirt/libvirt-interface.h
|
||||
%{_includedir}/libvirt/libvirt-network.h
|
||||
%{_includedir}/libvirt/libvirt-nwfilter.h
|
||||
%{_includedir}/libvirt/libvirt-qemu.h
|
||||
%{_includedir}/libvirt/libvirt-lxc.h
|
||||
%{_libdir}/pkgconfig/libvirt.pc
|
||||
|
@ -232,6 +232,7 @@ rm -rf $RPM_BUILD_ROOT%{mingw64_libexecdir}/libvirt-guests.sh
|
||||
%{mingw32_includedir}/libvirt/libvirt-domain-snapshot.h
|
||||
%{mingw32_includedir}/libvirt/libvirt-interface.h
|
||||
%{mingw32_includedir}/libvirt/libvirt-network.h
|
||||
%{mingw32_includedir}/libvirt/libvirt-nwfilter.h
|
||||
%{mingw32_includedir}/libvirt/virterror.h
|
||||
%{mingw32_includedir}/libvirt/libvirt-lxc.h
|
||||
%{mingw32_includedir}/libvirt/libvirt-qemu.h
|
||||
@ -298,6 +299,7 @@ rm -rf $RPM_BUILD_ROOT%{mingw64_libexecdir}/libvirt-guests.sh
|
||||
%{mingw64_includedir}/libvirt/libvirt-domain-snapshot.h
|
||||
%{mingw64_includedir}/libvirt/libvirt-interface.h
|
||||
%{mingw64_includedir}/libvirt/libvirt-network.h
|
||||
%{mingw64_includedir}/libvirt/libvirt-nwfilter.h
|
||||
%{mingw64_includedir}/libvirt/virterror.h
|
||||
%{mingw64_includedir}/libvirt/libvirt-lxc.h
|
||||
%{mingw64_includedir}/libvirt/libvirt-qemu.h
|
||||
|
Loading…
Reference in New Issue
Block a user