blob: d4842e97e6e6f82462b19ca1a0af6be6af164fd6 (
plain)
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
|
#ifndef CEPH_RGW_CLIENT_IO_H
#define CEPH_RGW_CLIENT_IO_H
#include <stdlib.h>
class RGWClientIO {
bool account;
size_t bytes_sent;
size_t bytes_received;
protected:
virtual int write_data(const char *buf, int len) = 0;
virtual int read_data(char *buf, int max) = 0;
public:
virtual ~RGWClientIO() {}
RGWClientIO() : account(false), bytes_sent(0), bytes_received(0) {}
int print(const char *format, ...);
int write(const char *buf, int len);
virtual void flush() = 0;
int read(char *buf, int max, int *actual);
virtual const char **envp() = 0;
void set_account(bool _account) {
account = _account;
}
};
#endif
|