mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-13 16:15:19 +00:00
remote: split off enums into separate source file
The remoteDriverTransport and remoteDriverMode enums are going to be needed by source files beyond the remote driver client. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
5cd80b04d9
commit
9949d9b28f
@ -1,5 +1,6 @@
|
||||
remote_driver_sources = [
|
||||
'remote_driver.c',
|
||||
'remote_sockets.c',
|
||||
]
|
||||
|
||||
remote_driver_generated = []
|
||||
|
@ -38,6 +38,7 @@
|
||||
#include "virbuffer.h"
|
||||
#include "remote_driver.h"
|
||||
#include "remote_protocol.h"
|
||||
#include "remote_sockets.h"
|
||||
#include "lxc_protocol.h"
|
||||
#include "qemu_protocol.h"
|
||||
#include "viralloc.h"
|
||||
@ -54,46 +55,6 @@
|
||||
|
||||
VIR_LOG_INIT("remote.remote_driver");
|
||||
|
||||
typedef enum {
|
||||
REMOTE_DRIVER_TRANSPORT_TLS,
|
||||
REMOTE_DRIVER_TRANSPORT_UNIX,
|
||||
REMOTE_DRIVER_TRANSPORT_SSH,
|
||||
REMOTE_DRIVER_TRANSPORT_LIBSSH2,
|
||||
REMOTE_DRIVER_TRANSPORT_EXT,
|
||||
REMOTE_DRIVER_TRANSPORT_TCP,
|
||||
REMOTE_DRIVER_TRANSPORT_LIBSSH,
|
||||
|
||||
REMOTE_DRIVER_TRANSPORT_LAST,
|
||||
} remoteDriverTransport;
|
||||
|
||||
VIR_ENUM_DECL(remoteDriverTransport);
|
||||
VIR_ENUM_IMPL(remoteDriverTransport,
|
||||
REMOTE_DRIVER_TRANSPORT_LAST,
|
||||
"tls",
|
||||
"unix",
|
||||
"ssh",
|
||||
"libssh2",
|
||||
"ext",
|
||||
"tcp",
|
||||
"libssh");
|
||||
|
||||
typedef enum {
|
||||
/* Try to figure out the "best" choice magically */
|
||||
REMOTE_DRIVER_MODE_AUTO,
|
||||
/* Always use the legacy libvirtd */
|
||||
REMOTE_DRIVER_MODE_LEGACY,
|
||||
/* Always use the per-driver virt*d daemons */
|
||||
REMOTE_DRIVER_MODE_DIRECT,
|
||||
|
||||
REMOTE_DRIVER_MODE_LAST
|
||||
} remoteDriverMode;
|
||||
|
||||
VIR_ENUM_DECL(remoteDriverMode);
|
||||
VIR_ENUM_IMPL(remoteDriverMode,
|
||||
REMOTE_DRIVER_MODE_LAST,
|
||||
"auto",
|
||||
"legacy",
|
||||
"direct");
|
||||
|
||||
#if SIZEOF_LONG < 8
|
||||
# define HYPER_TO_TYPE(_type, _to, _from) \
|
||||
|
39
src/remote/remote_sockets.c
Normal file
39
src/remote/remote_sockets.c
Normal file
@ -0,0 +1,39 @@
|
||||
/*
|
||||
* remote_sockets.c: helpers for getting remote driver socket paths
|
||||
*
|
||||
* Copyright (C) 2007-2019 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/>.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include "remote_sockets.h"
|
||||
|
||||
VIR_ENUM_IMPL(remoteDriverTransport,
|
||||
REMOTE_DRIVER_TRANSPORT_LAST,
|
||||
"tls",
|
||||
"unix",
|
||||
"ssh",
|
||||
"libssh2",
|
||||
"ext",
|
||||
"tcp",
|
||||
"libssh");
|
||||
|
||||
VIR_ENUM_IMPL(remoteDriverMode,
|
||||
REMOTE_DRIVER_MODE_LAST,
|
||||
"auto",
|
||||
"legacy",
|
||||
"direct");
|
50
src/remote/remote_sockets.h
Normal file
50
src/remote/remote_sockets.h
Normal file
@ -0,0 +1,50 @@
|
||||
/*
|
||||
* remote_sockets.h: helpers for getting remote driver socket paths
|
||||
*
|
||||
* Copyright (C) 2007-2020 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/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "virenum.h"
|
||||
|
||||
typedef enum {
|
||||
REMOTE_DRIVER_TRANSPORT_TLS,
|
||||
REMOTE_DRIVER_TRANSPORT_UNIX,
|
||||
REMOTE_DRIVER_TRANSPORT_SSH,
|
||||
REMOTE_DRIVER_TRANSPORT_LIBSSH2,
|
||||
REMOTE_DRIVER_TRANSPORT_EXT,
|
||||
REMOTE_DRIVER_TRANSPORT_TCP,
|
||||
REMOTE_DRIVER_TRANSPORT_LIBSSH,
|
||||
|
||||
REMOTE_DRIVER_TRANSPORT_LAST,
|
||||
} remoteDriverTransport;
|
||||
|
||||
VIR_ENUM_DECL(remoteDriverTransport);
|
||||
|
||||
typedef enum {
|
||||
/* Try to figure out the "best" choice magically */
|
||||
REMOTE_DRIVER_MODE_AUTO,
|
||||
/* Always use the legacy libvirtd */
|
||||
REMOTE_DRIVER_MODE_LEGACY,
|
||||
/* Always use the per-driver virt*d daemons */
|
||||
REMOTE_DRIVER_MODE_DIRECT,
|
||||
|
||||
REMOTE_DRIVER_MODE_LAST
|
||||
} remoteDriverMode;
|
||||
|
||||
VIR_ENUM_DECL(remoteDriverMode);
|
Loading…
x
Reference in New Issue
Block a user