qemuxmlconftest: Add test case for virtiofs on s390 using 'ccw' addresses
[libvirt.git] / src / rpc / virnetdaemon.h
blob31a355adb4114c1eb453efe121d5f955470e1a27
1 /*
2 * virnetdaemon.h
4 * Copyright (C) 2015 Red Hat, Inc.
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library. If not, see
18 * <http://www.gnu.org/licenses/>.
21 #pragma once
23 #include <signal.h>
25 #include "virjson.h"
26 #include "virnetserverprogram.h"
27 #include "virnetserverclient.h"
28 #include "virnetserver.h"
30 virNetDaemon *virNetDaemonNew(void);
32 int virNetDaemonAddServer(virNetDaemon *dmn,
33 virNetServer *srv);
35 typedef virNetServer *(*virNetDaemonNewServerPostExecRestart)(virNetDaemon *dmn,
36 const char *name,
37 virJSONValue *object,
38 void *opaque);
39 virNetDaemon *virNetDaemonNewPostExecRestart(virJSONValue *object,
40 size_t nDefServerNames,
41 const char **defServerNames,
42 virNetDaemonNewServerPostExecRestart cb,
43 void *opaque);
45 virJSONValue *virNetDaemonPreExecRestart(virNetDaemon *dmn);
47 bool virNetDaemonIsPrivileged(virNetDaemon *dmn);
49 int virNetDaemonAutoShutdown(virNetDaemon *dmn,
50 unsigned int timeout) G_GNUC_WARN_UNUSED_RESULT;
52 void virNetDaemonAddShutdownInhibition(virNetDaemon *dmn);
53 void virNetDaemonRemoveShutdownInhibition(virNetDaemon *dmn);
55 #ifdef WIN32
56 # define siginfo_t void
57 #endif
59 typedef void (*virNetDaemonSignalFunc)(virNetDaemon *dmn, siginfo_t *info, void *opaque);
61 int virNetDaemonAddSignalHandler(virNetDaemon *dmn,
62 int signum,
63 virNetDaemonSignalFunc func,
64 void *opaque);
66 void virNetDaemonUpdateServices(virNetDaemon *dmn,
67 bool enabled);
69 void virNetDaemonSetStateStopWorkerThread(virNetDaemon *dmn,
70 virThread **thr);
72 void virNetDaemonRun(virNetDaemon *dmn);
74 void virNetDaemonQuit(virNetDaemon *dmn);
75 void virNetDaemonQuitExecRestart(virNetDaemon *dmn);
77 bool virNetDaemonHasClients(virNetDaemon *dmn);
79 virNetServer *virNetDaemonGetServer(virNetDaemon *dmn,
80 const char *serverName);
81 ssize_t virNetDaemonGetServers(virNetDaemon *dmn, virNetServer ***servers);
82 bool virNetDaemonHasServer(virNetDaemon *dmn,
83 const char *serverName);
85 typedef int (*virNetDaemonShutdownCallback)(void);
87 void virNetDaemonSetShutdownCallbacks(virNetDaemon *dmn,
88 virNetDaemonShutdownCallback prepareCb,
89 virNetDaemonShutdownCallback waitCb);