}
-int RGWStreamIOBase::print(const char *format, ...)
+int RGWStreamIOEngine::print(const char *format, ...)
{
#define LARGE_ENOUGH 128
int size = LARGE_ENOUGH;
/* not reachable */
}
-int RGWStreamIOBase::write(const char *buf, int len)
+int RGWStreamIOEngine::write(const char *buf, int len)
{
if (len == 0) {
return 0;
}
}
-int RGWStreamIOBase::read(char *buf, int max, int *actual)
+int RGWStreamIOEngine::read(char *buf, int max, int *actual)
{
int ret = read_data(buf, max);
if (ret < 0) {
int RGWStreamIO::write(const char* const buf, const int len)
{
- const auto ret = RGWStreamIOBase::write(buf, len);
+ const auto ret = RGWStreamIOEngine::write(buf, len);
if (ret >= 0 && account()) {
bytes_sent += ret;
int RGWStreamIO::read(char *buf, int max, int *actual)
{
- const auto ret = RGWStreamIOBase::read(buf, max, actual);
+ const auto ret = RGWStreamIOEngine::read(buf, max, actual);
if (ret >= 0) {
bytes_received += *actual;
}
}; /* RGWClient IO */
-class RGWStreamIOBase : public RGWClientIO {
+class RGWStreamIOEngine : public RGWClientIO {
virtual int read_data(char *buf, int max) = 0;
virtual int write_data(const char *buf, int len) = 0;
public:
};
/* HTTP IO: compatibility layer */
-class RGWStreamIO : public RGWStreamIOBase {
+class RGWStreamIO : public RGWStreamIOEngine {
bool _account;
size_t bytes_sent;
size_t bytes_received;