vboxfs_prov.h revision 87e5ff36ca414b87b7c726ab60a2b0434410d15a
/** @file
* VirtualBox File System for Solaris Guests, provider header.
*/
/*
* Copyright (C) 2009 Sun Microsystems, Inc.
*
* Sun Microsystems, Inc. confidential
* All rights reserved
*/
#ifndef __VBoxFS_prov_Solaris_h
#define __VBoxFS_prov_Solaris_h
#ifdef __cplusplus
extern "C" {
#endif
/*
* These are the provider interfaces used by sffs to access the underlying
* shared file system.
*/
#define SFPROV_VERSION 1
/*
* Initialization and termination.
* sfprov_connect() is called once before any other interfaces and returns
* a handle used in further calls. The argument should be SFPROV_VERSION
* from above. On failure it returns a NULL pointer.
*
* sfprov_disconnect() must only be called after all sf file systems have been
* unmounted.
*/
typedef struct sfp_connection sfp_connection_t;
extern sfp_connection_t *sfprov_connect(int);
extern void sfprov_disconnect(sfp_connection_t *);
/*
* Mount / Unmount a shared folder.
*
* sfprov_mount() takes as input the connection pointer and the name of
* the shared folder. On success, it returns zero and supplies an
* sfp_mount_t handle. On failure it returns any relevant errno value.
*
* sfprov_unmount() unmounts the mounted file system. It returns 0 on
* success and any relevant errno on failure.
*/
typedef struct sfp_mount sfp_mount_t;
extern int sfprov_unmount(sfp_mount_t *);
/*
* query information about a mounted file system
*/
/*
*
* generally means that the host file didn't exist.
*/
typedef struct sfp_file sfp_file_t;
/*
* get information about a file (or directory) using pathname
*/
/*
*/
extern int sfprov_trunc(sfp_mount_t *, char *);
/*
* Read directory entries.
*/
#ifdef __cplusplus
}
#endif
#endif /* __VBoxFS_prov_Solaris_h */