diff options
author | Yehuda Sadeh <yehuda@inktank.com> | 2012-11-16 10:20:20 -0800 |
---|---|---|
committer | Yehuda Sadeh <yehuda@inktank.com> | 2012-11-16 11:09:34 -0800 |
commit | a460b3ec34ec7d4048b911fe6ce66ed685542db7 (patch) | |
tree | 43db351165c25dc31bbd3e857148fa3caf170ea5 /src/rgw/rgw_client_io.h | |
parent | 131d15a772254881e64e948eb603bf59687a5b4d (diff) | |
download | ceph-wip-mongoose.tar.gz |
rgw: mongoose prototypewip-mongoose
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Diffstat (limited to 'src/rgw/rgw_client_io.h')
-rw-r--r-- | src/rgw/rgw_client_io.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/rgw/rgw_client_io.h b/src/rgw/rgw_client_io.h index d4842e97e6e..c5d07fb95d3 100644 --- a/src/rgw/rgw_client_io.h +++ b/src/rgw/rgw_client_io.h @@ -3,6 +3,8 @@ #include <stdlib.h> +#include "rgw_common.h" + class RGWClientIO { bool account; @@ -10,19 +12,32 @@ class RGWClientIO { size_t bytes_received; protected: + RGWEnv env; + + virtual void init_env(CephContext *cct) = 0; + 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) {} + RGWClientIO() : account(false), bytes_sent(0), bytes_received(0) { + } + + void init(CephContext *cct) { + init_env(cct); + } 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; + virtual int send_status(const char *status, const char *status_name) = 0; + virtual int send_100_continue() = 0; + virtual int complete_header() = 0; + + RGWEnv& get_env() { return env; } void set_account(bool _account) { account = _account; |