/* * Copyright (c) 2011 by Michael Berlin, Zuse Institute Berlin * * Licensed under the BSD License, see LICENSE file for details. * */ #ifndef CPP_INCLUDE_FUSE_FUSE_ADAPTER_H_ #define CPP_INCLUDE_FUSE_FUSE_ADAPTER_H_ #include #define FUSE_USE_VERSION 26 #include #include #include #include #include "libxtreemfs/system_user_mapping_unix.h" #include "xtfsutil/xtfsutil_server.h" #include "xtreemfs/GlobalTypes.pb.h" namespace xtreemfs { class Client; class FuseOptions; class UserMapping; class Volume; namespace pbrpc { class Stat; class UserCredentials; } // namespace pbrpc /** Uses fuse_interrupted() to check if an operation was cancelled by the user * and stops retrying to execute the request then. * * Always returns 0, if called from a non-Fuse thread. */ int CheckIfOperationInterrupted(); class FuseAdapter { public: /** Creates a new instance of FuseAdapter, but does not create any libxtreemfs * Client yet. * * Use Start() to actually create the client and mount the volume given in * options. May modify options. */ explicit FuseAdapter(FuseOptions* options); ~FuseAdapter(); /** Create client, open volume and start needed threads. * @return Returns a list of additional "-o