Tizen 2.1 base
[external/device-mapper.git] / daemons / dmeventd / plugins / lvm2 / dmeventd_lvm.h
1 /*
2  * Copyright (C) 2010 Red Hat, Inc. All rights reserved.
3  *
4  * This file is part of LVM2.
5  *
6  * This copyrighted material is made available to anyone wishing to use,
7  * modify, copy, or redistribute it subject to the terms and conditions
8  * of the GNU Lesser General Public License v.2.1.
9  *
10  * You should have received a copy of the GNU Lesser General Public License
11  * along with this program; if not, write to the Free Software Foundation,
12  * Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
13  */
14
15 /*
16  * Wrappers around liblvm2cmd functions for dmeventd plug-ins.
17  *
18  * liblvm2cmd is not thread-safe so the locking in this library helps dmeventd
19  * threads to co-operate in sharing a single instance.
20  *
21  * FIXME Either support this properly as a generic liblvm2cmd wrapper or make
22  * liblvm2cmd thread-safe so this can go away.
23  */
24
25 #include "libdevmapper.h"
26
27 #ifndef _DMEVENTD_LVMWRAP_H
28 #define _DMEVENTD_LVMWRAP_H
29
30 int dmeventd_lvm2_init(void);
31 void dmeventd_lvm2_exit(void);
32 int dmeventd_lvm2_run(const char *cmdline);
33
34 void dmeventd_lvm2_lock(void);
35 void dmeventd_lvm2_unlock(void);
36
37 struct dm_pool *dmeventd_lvm2_pool(void);
38
39 #endif /* _DMEVENTD_LVMWRAP_H */