asio: Make impl() const
This commit is contained in:
parent
b0c1986a46
commit
f6f908a541
|
@ -54,7 +54,7 @@ const std::string &request::method() const { return impl_->method(); }
|
||||||
|
|
||||||
const header_map &request::header() const { return impl_->header(); }
|
const header_map &request::header() const { return impl_->header(); }
|
||||||
|
|
||||||
request_impl &request::impl() { return *impl_; }
|
request_impl &request::impl() const { return *impl_; }
|
||||||
|
|
||||||
} // namespace client
|
} // namespace client
|
||||||
} // namespace asio_http2
|
} // namespace asio_http2
|
||||||
|
|
|
@ -46,7 +46,7 @@ int64_t response::content_length() const { return impl_->content_length(); }
|
||||||
|
|
||||||
const header_map &response::header() const { return impl_->header(); }
|
const header_map &response::header() const { return impl_->header(); }
|
||||||
|
|
||||||
response_impl &response::impl() { return *impl_; }
|
response_impl &response::impl() const { return *impl_; }
|
||||||
|
|
||||||
} // namespace client
|
} // namespace client
|
||||||
} // namespace asio_http2
|
} // namespace asio_http2
|
||||||
|
|
|
@ -66,7 +66,7 @@ void request::on_data(data_cb cb) const {
|
||||||
|
|
||||||
void request::on_end(void_cb cb) const { return impl_->on_end(std::move(cb)); }
|
void request::on_end(void_cb cb) const { return impl_->on_end(std::move(cb)); }
|
||||||
|
|
||||||
request_impl &request::impl() { return *impl_; }
|
request_impl &request::impl() const { return *impl_; }
|
||||||
|
|
||||||
response::response() : impl_(make_unique<response_impl>()) {}
|
response::response() : impl_(make_unique<response_impl>()) {}
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ unsigned int response::status_code() const { return impl_->status_code(); }
|
||||||
|
|
||||||
bool response::started() const { return impl_->started(); }
|
bool response::started() const { return impl_->started(); }
|
||||||
|
|
||||||
response_impl &response::impl() { return *impl_; }
|
response_impl &response::impl() const { return *impl_; }
|
||||||
|
|
||||||
request_impl::request_impl() : stream_(nullptr), pushed_(false) {}
|
request_impl::request_impl() : stream_(nullptr), pushed_(false) {}
|
||||||
|
|
||||||
|
|
|
@ -149,7 +149,7 @@ public:
|
||||||
bool pushed() const;
|
bool pushed() const;
|
||||||
|
|
||||||
// Application must not call this directly.
|
// Application must not call this directly.
|
||||||
request_impl &impl();
|
request_impl &impl() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::unique_ptr<request_impl> impl_;
|
std::unique_ptr<request_impl> impl_;
|
||||||
|
@ -183,7 +183,7 @@ public:
|
||||||
bool started() const;
|
bool started() const;
|
||||||
|
|
||||||
// Application must not call this directly.
|
// Application must not call this directly.
|
||||||
response_impl &impl();
|
response_impl &impl() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::unique_ptr<response_impl> impl_;
|
std::unique_ptr<response_impl> impl_;
|
||||||
|
|
|
@ -50,7 +50,7 @@ public:
|
||||||
|
|
||||||
const header_map &header() const;
|
const header_map &header() const;
|
||||||
|
|
||||||
response_impl &impl();
|
response_impl &impl() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::unique_ptr<response_impl> impl_;
|
std::unique_ptr<response_impl> impl_;
|
||||||
|
@ -82,7 +82,7 @@ public:
|
||||||
|
|
||||||
const header_map &header() const;
|
const header_map &header() const;
|
||||||
|
|
||||||
request_impl &impl();
|
request_impl &impl() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::unique_ptr<request_impl> impl_;
|
std::unique_ptr<request_impl> impl_;
|
||||||
|
|
Loading…
Reference in New Issue