-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsvdrpc.h
63 lines (55 loc) · 1.78 KB
/
svdrpc.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/***************************************************************************
svdrpc.h - description
-------------------
begin : Sat Aug 5 13:32:09 MEST 2000
copyright : (C) 2000 by Guido
email : [email protected]
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef __SVDRPC_H
#define __SVDRPC_H
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#define MAXCMDBUFFER 10000
class cSocket {
private:
int port;
int sock;
int queue;
public:
~cSocket();
bool Open(int Port);
int Connect(char const *Host);
void Close(void);
};
class cSVDRPC {
public:
~cSVDRPC();
bool Connected();
bool CmdQuit();
char name[22];
void Open(char const *Host, int Port);
void Close(void);
bool Send(const char *s, int length = -1);
bool ReadReply();
bool ReadCompleteReply();
private:
cSocket socket;
int filedes;
int outstandingReply;
char buf[MAXCMDBUFFER];
};
extern int SVDRPPort;
extern char const *SVDRPHost;
void VDRMessage(const char *s);
void noadStartMessage( const char *s );
void noadEndMessage( const char *s );
#endif //__SVDRP_H