summaryrefslogtreecommitdiff
path: root/netfs/ice/typeConverter.h
diff options
context:
space:
mode:
Diffstat (limited to 'netfs/ice/typeConverter.h')
-rw-r--r--netfs/ice/typeConverter.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/netfs/ice/typeConverter.h b/netfs/ice/typeConverter.h
new file mode 100644
index 0000000..d4b1617
--- /dev/null
+++ b/netfs/ice/typeConverter.h
@@ -0,0 +1,28 @@
+#ifndef NETFS_TYPECONVERT_H
+#define NETFS_TYPECONVERT_H
+
+#include <types.h>
+#include <sys/stat.h>
+#include <sys/statvfs.h>
+#include <visibility.h>
+#include "entryResolver.h"
+
+class DLL_PUBLIC TypeConverter {
+ public:
+ TypeConverter(const EntryResolver<uid_t> &, const EntryResolver<gid_t> &);
+
+ // Attributes
+ struct stat convert(const NetFS::Attr &) const;
+ NetFS::Attr convert(const struct stat &) const;
+
+ // VFS
+ struct statvfs convert(const NetFS::VFS &) const;
+ NetFS::VFS convert(const struct statvfs &) const;
+
+ protected:
+ const EntryResolver<uid_t> & userLookup;
+ const EntryResolver<gid_t> & groupLookup;
+};
+
+#endif
+