debuggers.hg

view tools/libxen/include/xen/api/xen_event_operation.h @ 0:7d21f7218375

Exact replica of unstable on 051908 + README-this
author Mukesh Rathor
date Mon May 19 15:34:57 2008 -0700 (2008-05-19)
parents
children
line source
1 /*
2 * Copyright (c) 2006-2007, XenSource Inc.
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */
19 #ifndef XEN_EVENT_OPERATION_H
20 #define XEN_EVENT_OPERATION_H
23 #include <xen/api/xen_common.h>
26 enum xen_event_operation
27 {
28 /**
29 * An object has been created
30 */
31 XEN_EVENT_OPERATION_ADD,
33 /**
34 * An object has been deleted
35 */
36 XEN_EVENT_OPERATION_DEL,
38 /**
39 * An object has been modified
40 */
41 XEN_EVENT_OPERATION_MOD
42 };
45 typedef struct xen_event_operation_set
46 {
47 size_t size;
48 enum xen_event_operation contents[];
49 } xen_event_operation_set;
51 /**
52 * Allocate a xen_event_operation_set of the given size.
53 */
54 extern xen_event_operation_set *
55 xen_event_operation_set_alloc(size_t size);
57 /**
58 * Free the given xen_event_operation_set. The given set must have
59 * been allocated by this library.
60 */
61 extern void
62 xen_event_operation_set_free(xen_event_operation_set *set);
65 /**
66 * Return the name corresponding to the given code. This string must
67 * not be modified or freed.
68 */
69 extern const char *
70 xen_event_operation_to_string(enum xen_event_operation val);
73 /**
74 * Return the correct code for the given string, or set the session
75 * object to failure and return an undefined value if the given string does
76 * not match a known code.
77 */
78 extern enum xen_event_operation
79 xen_event_operation_from_string(xen_session *session, const char *str);
82 #endif