-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNDisk.h
More file actions
36 lines (31 loc) · 787 Bytes
/
NDisk.h
File metadata and controls
36 lines (31 loc) · 787 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/** @file NDisk.h
*
* Network Disk structure derived from Disk. Uses RPC to communicate to
* the server.
*
* @author Copyright Robert van Engelen, April 2006
**/
#ifndef NDISK_H
#define NDISK_H
#include "includes.h"
#include "Disk.h"
#include "RPC.h"
/** The NDisk class is derived from Disk. It is an interface (proxy) for
* a remote VDisk on a server.
*/
class NDisk : public Disk
{
private:
/// The NDisk RPC proxy.
RPC proxy;
public:
NDisk();
NDisk(const char *host, int port);
virtual ~NDisk();
virtual int num_blocks() const;
virtual int block_size() const;
virtual int format(int num_blocks);
virtual int read(int block_num, char *buf) const;
virtual int write(int block_num, const char *buf);
};
#endif