2 * @file HTTP_StreamPolicyBase.h
4 * @author Martin Corino <mcorino@remedy.nl>
7 #ifndef ACE_HTTP_STREAM_POLICY_BASE_H
8 #define ACE_HTTP_STREAM_POLICY_BASE_H
10 #include /**/ "ace/pre.h"
12 #include "ace/INet/INet_Export.h"
13 #include "ace/INet/BufferedStreamBuffer.h"
15 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
22 * @class ACE_IOS_StreamPolicyBase
24 * @brief Abstract base for HTTP stream policies.
27 template <class STREAM_BUFFER
>
28 class StreamPolicyBase
32 virtual ~StreamPolicyBase ();
34 typedef typename
STREAM_BUFFER::char_type char_type
;
36 virtual int read_from_stream (char_type
* buffer
, std::streamsize length
) = 0;
38 virtual int write_to_stream (const char_type
* buffer
, std::streamsize length
) = 0;
40 void set_stream_buffer (STREAM_BUFFER
* streambuf
);
43 int read_from_stream_i (char_type
* buffer
, std::streamsize length
);
45 int write_to_stream_i (const char_type
* buffer
, std::streamsize length
);
48 STREAM_BUFFER
* streambuf_
;
53 ACE_END_VERSIONED_NAMESPACE_DECL
55 #include "ace/INet/HTTP_StreamPolicyBase.cpp"
57 #include /**/ "ace/post.h"
58 #endif /* ACE_HTTP_STREAM_POLICY_BASE_H */