Initial RetroNFS95 Win9x VxD prototype
This commit is contained in:
33
include/nfs.hpp
Normal file
33
include/nfs.hpp
Normal file
@@ -0,0 +1,33 @@
|
||||
#ifndef RETRONFS95_NFS_HPP
|
||||
#define RETRONFS95_NFS_HPP
|
||||
|
||||
#include "mount.hpp"
|
||||
|
||||
namespace retronfs {
|
||||
|
||||
struct DirEntry {
|
||||
uint64_t fileid;
|
||||
std::string name;
|
||||
uint64_t cookie;
|
||||
};
|
||||
|
||||
class NfsClient {
|
||||
public:
|
||||
NfsClient(const std::string& host, unsigned short port, const RpcIdentity& identity);
|
||||
|
||||
FileHandle lookup(const FileHandle& dir, const std::string& name);
|
||||
std::vector<DirEntry> readdir(const FileHandle& dir);
|
||||
Bytes read(const FileHandle& file, uint64_t offset, uint32_t count, bool* eof);
|
||||
Bytes read_all(const FileHandle& file);
|
||||
|
||||
private:
|
||||
RpcClient rpc_;
|
||||
RpcIdentity identity_;
|
||||
};
|
||||
|
||||
FileHandle resolve_path(NfsClient& nfs, const FileHandle& root, const std::string& path);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user