15 #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_OBJECT_WRITE_STREAM_H
16 #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_OBJECT_WRITE_STREAM_H
18 #include "google/cloud/storage/headers_map.h"
19 #include "google/cloud/storage/internal/object_write_streambuf.h"
20 #include "google/cloud/storage/version.h"
121 std::unique_ptr<internal::ObjectWriteStreambuf> buf);
132 basic_ostream<
char>::swap(rhs);
133 std::swap(buf_, rhs.buf_);
134 rhs.set_rdbuf(rhs.buf_.get());
135 set_rdbuf(buf_.get());
136 std::swap(metadata_, rhs.metadata_);
137 std::swap(headers_, rhs.headers_);
138 std::swap(payload_, rhs.payload_);
164 bool IsOpen()
const {
return buf_ !=
nullptr && buf_->IsOpen(); }
242 HeadersMap
const&
headers()
const {
return headers_; }
245 std::string
const&
payload()
const {
return payload_; }
256 return buf_->resumable_session_id();
267 return buf_->next_expected_byte();
300 std::unique_ptr<internal::ObjectWriteStreambuf> buf_;
302 std::multimap<std::string, std::string> headers_;
303 std::string payload_;