1
0
mirror of https://github.com/falk-werner/webfuse synced 2024-10-27 20:34:10 +00:00
falk-werner_webfuse/include/webfuse/adapter/mountpoint.h

85 lines
2.8 KiB
C
Raw Normal View History

2020-02-17 20:53:42 +00:00
////////////////////////////////////////////////////////////////////////////////
/// \file adapter/mountpoint.h
/// \brief Mointpoint.
////////////////////////////////////////////////////////////////////////////////
2020-02-13 20:48:42 +00:00
#ifndef WF_ADAPTER_MOUNTPOINT_H
#define WF_ADAPTER_MOUNTPOINT_H
2020-02-17 20:53:42 +00:00
#include <webfuse/adapter/api.h>
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
//------------------------------------------------------------------------------
typedef void
2020-02-16 03:02:23 +00:00
wf_mountpoint_userdata_dispose_fn(
void * user_data);
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-13 20:48:42 +00:00
#ifdef __cplusplus
}
#endif
#endif