summaryrefslogtreecommitdiff
path: root/src/repo.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2019-07-20 10:53:14 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2019-07-20 10:53:14 +0100
commit4c25da8a7ba7437657c3e2da592145113d3532f4 (patch)
tree40f0468135089ff4f9e967bf8ee74b020bee67f7 /src/repo.h
downloadnetfs-gitfs-4c25da8a7ba7437657c3e2da592145113d3532f4.tar.bz2
netfs-gitfs-4c25da8a7ba7437657c3e2da592145113d3532f4.tar.xz
netfs-gitfs-4c25da8a7ba7437657c3e2da592145113d3532f4.zip
Initial commit
Not a lot of stuff, hard coded paths, tests against /usr/portage
Diffstat (limited to 'src/repo.h')
-rw-r--r--src/repo.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/repo.h b/src/repo.h
new file mode 100644
index 0000000..e6f7d94
--- /dev/null
+++ b/src/repo.h
@@ -0,0 +1,42 @@
+#ifndef GITFS_REPO_H
+#define GITFS_REPO_H
+
+#include <volume.h>
+#include "git.h"
+
+namespace GitFS {
+ using namespace NetFS;
+ class Repo : public Volume {
+ public:
+ Repo();
+
+ void disconnect(const ::Ice::Current& current) override;
+ DirectoryPrxPtr opendir(ReqEnv env, ::std::string path, const ::Ice::Current& current) override;
+ VFS statfs(ReqEnv env, ::std::string path, const ::Ice::Current& current) override;
+ int access(ReqEnv env, ::std::string path, int mode, const ::Ice::Current& current) override;
+ Attr getattr(ReqEnv env, ::std::string path, const ::Ice::Current& current) override;
+ ::std::string readlink(ReqEnv env, ::std::string path, const ::Ice::Current& current) override;
+ FilePrxPtr open(ReqEnv env, ::std::string path, int flags, const ::Ice::Current& current) override;
+ FilePrxPtr create(ReqEnv env, ::std::string path, int flags, int mode, const ::Ice::Current& current) override;
+ void truncate(ReqEnv env, ::std::string path, long long int size, const ::Ice::Current& current) override;
+ void unlink(ReqEnv env, ::std::string path, const ::Ice::Current& current) override;
+ void mkdir(ReqEnv env, ::std::string path, int mode, const ::Ice::Current& current) override;
+ void rmdir(ReqEnv env, ::std::string path, const ::Ice::Current& current) override;
+ void mknod(ReqEnv env, ::std::string path, int mode, int dev, const ::Ice::Current& current) override;
+ void symlink(ReqEnv env, ::std::string path1, ::std::string path2, const ::Ice::Current& current) override;
+ void link(ReqEnv env, ::std::string path1, ::std::string path2, const ::Ice::Current& current) override;
+ void rename(ReqEnv env, ::std::string from, ::std::string to, const ::Ice::Current& current) override;
+ void chmod(ReqEnv env, ::std::string path, int mode, const ::Ice::Current& current) override;
+ void chown(ReqEnv env, ::std::string path, int uid, int gid, const ::Ice::Current& current) override;
+ void utimens(ReqEnv env, ::std::string path, long long int atime, long long int atimens, long long int mtime, long long int mtimens, const ::Ice::Current& current) override;
+
+ private:
+ Git::RepositoryPtr repo;
+ Git::CommitPtr commit;
+ Git::TreePtr tree;
+ };
+}
+
+#endif
+
+