diff options
author | randomdan <randomdan@localhost> | 2010-10-06 14:51:06 +0000 |
---|---|---|
committer | randomdan <randomdan@localhost> | 2010-10-06 14:51:06 +0000 |
commit | 22d5aeea56b472d947e10a14acd0891455849e27 (patch) | |
tree | b075948c0549c7d353ee3b6968772dd3199913a4 /netfs/fuse.h | |
parent | Jam (diff) | |
download | netfs-22d5aeea56b472d947e10a14acd0891455849e27.tar.bz2 netfs-22d5aeea56b472d947e10a14acd0891455849e27.tar.xz netfs-22d5aeea56b472d947e10a14acd0891455849e27.zip |
Commit work-to-date of port to using Ice for comms and Boost for paths
Diffstat (limited to 'netfs/fuse.h')
-rw-r--r-- | netfs/fuse.h | 80 |
1 files changed, 38 insertions, 42 deletions
diff --git a/netfs/fuse.h b/netfs/fuse.h index f587da4..74374d5 100644 --- a/netfs/fuse.h +++ b/netfs/fuse.h @@ -1,55 +1,51 @@ #ifndef FUSE_H #define FUSE_H +#include <Ice/Ice.h> +#include "netfsComms.h" #include "fuseapp.h" -#include "comms.h" -#include "threads.h" class NetFS : public FuseAppBase { - // misc - int access(const char * p, int a); - int getattr(const char * p, struct stat * s); - int fgetattr(const char *, struct stat *, struct fuse_file_info *); - int chmod(const char *, mode_t); - int chown(const char *, uid_t, gid_t); - int link(const char *, const char *); - int readlink(const char *, char *, size_t); - int rename(const char *, const char *); - int symlink(const char *, const char *); - int unlink(const char *); - // dirs - int opendir(const char * p, struct fuse_file_info * fi); - int releasedir(const char *, struct fuse_file_info * fi); - int readdir(const char *, void * buf, fuse_fill_dir_t filler, off_t, struct fuse_file_info * fi); - int mkdir(const char *, mode_t); - int rmdir(const char *); - // files - int open(const char * p, struct fuse_file_info * fi); - int create(const char *, mode_t, struct fuse_file_info *); - int release(const char *, struct fuse_file_info * fi); - int read(const char *, char * buf, size_t s, off_t o, struct fuse_file_info * fi); - int write(const char *, const char * buf, size_t s, off_t o, struct fuse_file_info * fi); - int truncate(const char *, off_t); - int ftruncate(const char *, off_t, struct fuse_file_info *); - // fs - int statfs(const char *, struct statvfs *); - // stuff public: - NetFS(); + NetFS(int & argc, char ** argv); ~NetFS(); - DataPayloadPtr exchange(DataPayloadPtr dp); private: - FILE * f; - void connect(); - Mutex comms; + // misc + int access(const char * p, int a); + int getattr(const char * p, struct stat * s); + int fgetattr(const char *, struct stat *, struct fuse_file_info *); + int chmod(const char *, mode_t); + int chown(const char *, uid_t, gid_t); + int link(const char *, const char *); + int readlink(const char *, char *, size_t); + int rename(const char *, const char *); + int symlink(const char *, const char *); + int unlink(const char *); + // dirs + int opendir(const char * p, struct fuse_file_info * fi); + int releasedir(const char *, struct fuse_file_info * fi); + int readdir(const char *, void * buf, fuse_fill_dir_t filler, off_t, struct fuse_file_info * fi); + int mkdir(const char *, mode_t); + int rmdir(const char *); + // files + int open(const char * p, struct fuse_file_info * fi); + int create(const char *, mode_t, struct fuse_file_info *); + int release(const char *, struct fuse_file_info * fi); + int read(const char *, char * buf, size_t s, off_t o, struct fuse_file_info * fi); + int write(const char *, const char * buf, size_t s, off_t o, struct fuse_file_info * fi); + int truncate(const char *, off_t); + int ftruncate(const char *, off_t, struct fuse_file_info *); + // fs + int statfs(const char *, struct statvfs *); + // stuff + + Ice::CommunicatorPtr ic; + + NetFSComms::FilesPrx files; + NetFSComms::DirsPrx dirs; + NetFSComms::MiscPrx misc; + NetFSComms::SystemPrx system; }; -// this needs to go here to avoid circular includes regarding the net->exchange call -template<class X> -SmartPointer<TypedPayload<typename X::Reply> > TypedPayloadReq<X>::exchange(NetFS * net) -{ - DataPayloadPtr p = net->exchange(this); - return p.as<TypedPayload<typename X::Reply> >(); -} #endif |