2020-02-17 20:53:42 +00:00
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
2020-06-28 13:51:34 +00:00
|
|
|
/// \file webfuse/mountpoint.h
|
2020-02-17 20:53:42 +00:00
|
|
|
/// \brief Mointpoint.
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2020-06-28 13:51:34 +00:00
|
|
|
#ifndef WF_MOUNTPOINT_H
|
|
|
|
#define WF_MOUNTPOINT_H
|
2020-02-13 20:48:42 +00:00
|
|
|
|
2020-06-28 13:51:34 +00:00
|
|
|
#include <webfuse/api.h>
|
2020-02-17 20:53:42 +00:00
|
|
|
|
2020-02-13 20:48:42 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C"
|
|
|
|
{
|
|
|
|
#endif
|
|
|
|
|
2020-02-17 20:53:42 +00:00
|
|
|
//------------------------------------------------------------------------------
|
|
|
|
/// \struct wf_mountpoint
|
|
|
|
/// \brief Mointpoint.
|
|
|
|
//------------------------------------------------------------------------------
|
2020-02-13 20:48:42 +00:00
|
|
|
struct wf_mountpoint;
|
|
|
|
|
2020-02-17 20:53:42 +00:00
|
|
|
//------------------------------------------------------------------------------
|
|
|
|
/// \brief Disposes the user defined context of a mountpoint.
|
|
|
|
///
|
|
|
|
/// \param user_data user defined context of the mointpoint.
|
|
|
|
///
|
|
|
|
/// \see wf_mountpoint_set_userdata
|
|
|
|
//------------------------------------------------------------------------------
|
2020-02-15 14:50:32 +00:00
|
|
|
typedef void
|
2020-02-16 03:02:23 +00:00
|
|
|
wf_mountpoint_userdata_dispose_fn(
|
|
|
|
void * user_data);
|
2020-02-15 14:50:32 +00:00
|
|
|
|
2020-02-17 20:53:42 +00:00
|
|
|
//------------------------------------------------------------------------------
|
|
|
|
/// \brief Creates a mountpoint.
|
|
|
|
///
|
|
|
|
/// \param path local path of the mounpoint
|
|
|
|
/// \return Newly created mountpoint.
|
|
|
|
//------------------------------------------------------------------------------
|
|
|
|
extern WF_API struct wf_mountpoint *
|
2020-02-13 20:48:42 +00:00
|
|
|
wf_mountpoint_create(
|
|
|
|
char const * path);
|
|
|
|
|
2020-02-17 20:53:42 +00:00
|
|
|
//------------------------------------------------------------------------------
|
|
|
|
/// \brief Disposes a mountpoint.
|
|
|
|
///
|
|
|
|
/// \param mountpoint pointer to the mountpoint
|
|
|
|
//------------------------------------------------------------------------------
|
|
|
|
extern WF_API void
|
2020-02-15 14:11:35 +00:00
|
|
|
wf_mountpoint_dispose(
|
2020-02-13 20:48:42 +00:00
|
|
|
struct wf_mountpoint * mountpoint);
|
|
|
|
|
2020-02-17 20:53:42 +00:00
|
|
|
//------------------------------------------------------------------------------
|
|
|
|
/// \brief Returns the local path of the mountpoint.
|
|
|
|
///
|
|
|
|
/// \param mountpoint pointer to the mountpoint
|
|
|
|
/// \return local path of the mountpoint
|
|
|
|
//------------------------------------------------------------------------------
|
|
|
|
extern WF_API char const *
|
2020-02-13 20:48:42 +00:00
|
|
|
wf_mountpoint_get_path(
|
|
|
|
struct wf_mountpoint const * mountpoint);
|
|
|
|
|
2020-02-17 20:53:42 +00:00
|
|
|
//------------------------------------------------------------------------------
|
|
|
|
/// \brief Sets user data of the mointpoint.
|
|
|
|
///
|
|
|
|
/// \note This function is intended for custom mountpoint factories to
|
|
|
|
/// annotate mountpoints with a user specified context.
|
|
|
|
///
|
|
|
|
/// \param mounpoint pointer to the mountpoint
|
|
|
|
/// \param user_data user data
|
|
|
|
/// \param dispose pointer to dipose function of user data or NULL,
|
|
|
|
/// if there is no need to dispose user data
|
|
|
|
//------------------------------------------------------------------------------
|
|
|
|
extern WF_API void
|
2020-02-16 03:02:23 +00:00
|
|
|
wf_mountpoint_set_userdata(
|
|
|
|
struct wf_mountpoint * mointpoint,
|
|
|
|
void * user_data,
|
|
|
|
wf_mountpoint_userdata_dispose_fn * dispose);
|
2020-02-15 14:50:32 +00:00
|
|
|
|
2020-02-13 20:48:42 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|