2 * @file HTTP_IOStream.h
4 * @author Martin Corino <mcorino@remedy.nl>
7 #ifndef ACE_HTTP_IOSTREAM_H
8 #define ACE_HTTP_IOSTREAM_H
10 #include /**/ "ace/pre.h"
12 #include /**/ "ace/config-all.h"
14 #if !defined (ACE_LACKS_PRAGMA_ONCE)
16 #endif /* ACE_LACKS_PRAGMA_ONCE */
18 #include "ace/INet/INet_Export.h"
19 #include "ace/INet/BufferedStreamBuffer.h"
20 #include "ace/INet/HTTP_StreamPolicyBase.h"
24 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
31 * @class ACE_HTTP_StreamBuffer
36 class ACE_INET_Export StreamBuffer
37 : public ACE::IOS::BufferedStreamBuffer
40 typedef StreamPolicyBase
<StreamBuffer
> policy_type
;
42 StreamBuffer (std::iostream
& stream
, policy_type
* policy
= 0);
43 virtual ~StreamBuffer ();
48 friend class StreamPolicyBase
<StreamBuffer
>;
55 virtual int read_from_stream (char* buffer
, std::streamsize length
);
57 virtual int write_to_stream (const char* buffer
, std::streamsize length
);
59 virtual int read_from_stream_i (char* buffer
, std::streamsize length
);
61 virtual int write_to_stream_i (const char* buffer
, std::streamsize length
);
64 std::iostream
& stream_
;
65 policy_type
* policy_
;
75 class ACE_INET_Export IOS
76 : public virtual std::ios
79 IOS (std::iostream
& stream
, StreamBuffer::policy_type
* policy
= 0);
82 StreamBuffer
* rdbuf ();
85 StreamBuffer streambuf_
;
89 * @class ACE_HTTP_OStream
94 class ACE_INET_Export OStream
95 : public IOS
, public std::ostream
98 explicit OStream(std::iostream
& stream
, StreamBuffer::policy_type
* policy
= 0);
101 void set_interceptor (StreamBuffer::interceptor_type
& interceptor
);
105 * @class ACE_HTTP_IStream
110 class ACE_INET_Export IStream
111 : public IOS
, public std::istream
114 explicit IStream(std::iostream
& stream
, StreamBuffer::policy_type
* policy
= 0);
117 void set_interceptor (StreamBuffer::interceptor_type
& interceptor
);
122 ACE_END_VERSIONED_NAMESPACE_DECL
124 #if defined (__ACE_INLINE__)
125 #include "ace/INet/HTTP_IOStream.inl"
128 #include /**/ "ace/post.h"
129 #endif /* ACE_HTTP_IOSTREAM_H */