forked from glynos/cpp-netlib
-
Notifications
You must be signed in to change notification settings - Fork 424
Expand file tree
/
Copy pathbasic_message.hpp
More file actions
52 lines (41 loc) · 1.75 KB
/
basic_message.hpp
File metadata and controls
52 lines (41 loc) · 1.75 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// Copyright 2011 Dean Michael Berris <dberris@google.com>.
// Copyright 2011 Google, Inc.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef NETWORK_MESSAGE_BASIC_MESSAGE_HPP_20110911
#define NETWORK_MESSAGE_BASIC_MESSAGE_HPP_20110911
#include <network/message_base.hpp>
#include <boost/scoped_ptr.hpp>
namespace network {
struct basic_storage_pimpl;
struct basic_storage_base : message_base {
basic_storage_base();
basic_storage_base(basic_storage_base const&);
basic_storage_base(basic_storage_base && );
virtual void set_destination(std::string const& destination);
virtual void set_source(std::string const& source);
virtual void append_header(std::string const& name, std::string const& value);
virtual void remove_headers(std::string const& name);
virtual void remove_headers();
virtual void set_body(std::string const& body);
virtual void append_body(std::string const& data);
virtual void get_destination(std::string& destination);
virtual void get_source(std::string& source);
virtual void get_headers(
function<void(std::string const&, std::string const&)> inserter);
virtual void get_headers(
std::string const& name,
function<void(std::string const&, std::string const&)> inserter);
virtual void get_body(std::string& body);
virtual void get_body(
function<void(iterator_range<char const*>)> chunk_reader,
size_t size);
virtual void swap(basic_storage_base& other);
virtual ~basic_storage_base();
protected:
scoped_ptr<basic_storage_pimpl> pimpl;
};
void swap(basic_storage_base& l, basic_storage_base& r);
} // namespace network
#endif /* NETWORK_MESSAGE_BASIC_MESSAGE_HPP_20110911 */