/*
* mount.h - libmount API
*
* Copyright (C) 2008-2009 Karel Zak <kzak@redhat.com>
*
* 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, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _LIBMOUNT_MOUNT_H
#define _LIBMOUNT_MOUNT_H
#ifdef __cplusplus
extern "C" {
#endif
#define LIBMOUNT_VERSION "@LIBMOUNT_VERSION@"
/**
* mnt_cache
*
* Stores canonicalized paths and evaluated tags
*/
typedef struct _mnt_cache mnt_cache;
/* version.c */
extern int mnt_parse_version_string(const char *ver_string);
extern int mnt_get_library_version(const char **ver_string);
/* utils.c */
extern int mnt_fstype_is_netfs(const char *type);
extern int mnt_fstype_is_pseudofs(const char *type);
extern int mnt_open_device(const char *devname, int flags);
/* cache.c */
extern mnt_cache *mnt_new_cache(void);
extern void mnt_free_cache(mnt_cache *cache);
extern const char *mnt_cache_find_path(mnt_cache *cache, const char *path);
extern const char *mnt_cache_find_tag(mnt_cache *cache,
const char *token, const char *value);
extern int mnt_cache_read_tags(mnt_cache *cache, const char *devname);
extern int mnt_cache_device_has_tag(mnt_cache *cache, const char *devname,
const char *token, const char *value);
extern char *mnt_resolve_path(const char *path, mnt_cache *cache);
extern char *mnt_resolve_tag(const char *token, const char *value, mnt_cache *cache);
extern char *mnt_resolve_spec(const char *spec, mnt_cache *cache);
#ifdef __cplusplus
}
#endif
#endif /* _LIBMOUNT_MOUNT_H */