-
Notifications
You must be signed in to change notification settings - Fork 0
/
client.h
45 lines (31 loc) · 868 Bytes
/
client.h
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
37
38
/****************/
/* Your Name */
/* Date */
/* CS 244B */
/* Spring 2013 */
/****************/
/* ------------------------------------------------------------------ */
#ifdef ASSERT_DEBUG
#define ASSERT(ASSERTION) \
{ assert(ASSERTION); }
#else
#define ASSERT(ASSERTION) \
{ }
#endif
/* ------------------------------------------------------------------ */
/********************/
/* Client Functions */
/********************/
#ifdef __cplusplus
extern "C" {
#endif
extern int InitReplFs(unsigned short portNum, int packetLoss, int numServers);
extern int OpenFile(char * strFileName);
extern int WriteBlock(int fd, char * strData, int byteOffset, int blockSize);
extern int Commit(int fd);
extern int Abort(int fd);
extern int CloseFile(int fd);
#ifdef __cplusplus
}
#endif
/* ------------------------------------------------------------------ */