2
* Copyright (C) 2010-2012 Red Hat, Inc.
4
* lxc_monitor.h: client for LXC controller monitor
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
#ifndef __LXC_MONITOR_H__
22
# define __LXC_MONITOR_H__
24
# include "virobject.h"
25
# include "domain_conf.h"
26
# include "lxc_protocol.h"
28
typedef struct _virLXCMonitor virLXCMonitor;
29
typedef virLXCMonitor *virLXCMonitorPtr;
31
typedef struct _virLXCMonitorCallbacks virLXCMonitorCallbacks;
32
typedef virLXCMonitorCallbacks *virLXCMonitorCallbacksPtr;
34
typedef void (*virLXCMonitorCallbackDestroy)(virLXCMonitorPtr mon,
36
typedef void (*virLXCMonitorCallbackEOFNotify)(virLXCMonitorPtr mon,
39
typedef void (*virLXCMonitorCallbackExitNotify)(virLXCMonitorPtr mon,
40
virLXCProtocolExitStatus status,
43
struct _virLXCMonitorCallbacks {
44
virLXCMonitorCallbackDestroy destroy;
45
virLXCMonitorCallbackEOFNotify eofNotify;
46
virLXCMonitorCallbackExitNotify exitNotify;
49
virLXCMonitorPtr virLXCMonitorNew(virDomainObjPtr vm,
50
const char *socketdir,
51
virLXCMonitorCallbacksPtr cb);
53
void virLXCMonitorClose(virLXCMonitorPtr mon);
55
void virLXCMonitorLock(virLXCMonitorPtr mon);
56
void virLXCMonitorUnlock(virLXCMonitorPtr mon);
58
#endif /* __LXC_MONITOR_H__ */