summaryrefslogtreecommitdiff
path: root/ACE/protocols/ace/INet/HTTP_StreamPolicyBase.h
diff options
context:
space:
mode:
Diffstat (limited to 'ACE/protocols/ace/INet/HTTP_StreamPolicyBase.h')
-rw-r--r--ACE/protocols/ace/INet/HTTP_StreamPolicyBase.h66
1 files changed, 66 insertions, 0 deletions
diff --git a/ACE/protocols/ace/INet/HTTP_StreamPolicyBase.h b/ACE/protocols/ace/INet/HTTP_StreamPolicyBase.h
new file mode 100644
index 00000000000..814377b7050
--- /dev/null
+++ b/ACE/protocols/ace/INet/HTTP_StreamPolicyBase.h
@@ -0,0 +1,66 @@
+// $Id$
+
+/**
+ * @file HTTP_StreamPolicyBase.h
+ *
+ * @author Martin Corino <mcorino@remedy.nl>
+ */
+
+#ifndef ACE_HTTP_STREAM_POLICY_BASE_H
+#define ACE_HTTP_STREAM_POLICY_BASE_H
+
+#include /**/ "ace/pre.h"
+
+#include "ace/INet/INet_Export.h"
+#include "ace/INet/BufferedStreamBuffer.h"
+
+ACE_BEGIN_VERSIONED_NAMESPACE_DECL
+
+namespace ACE
+ {
+ namespace HTTP
+ {
+ /**
+ * @class ACE_IOS_StreamPolicyBase
+ *
+ * @brief
+ *
+ */
+ template <class STREAM_BUFFER>
+ class StreamPolicyBase
+ {
+ public:
+ StreamPolicyBase ();
+ virtual ~StreamPolicyBase ();
+
+ typedef typename STREAM_BUFFER::char_type char_type;
+
+ virtual int read_from_stream (char_type* buffer, std::streamsize length) = 0;
+
+ virtual int write_to_stream (const char_type* buffer, std::streamsize length) = 0;
+
+ void set_stream_buffer (STREAM_BUFFER* streambuf);
+
+ protected:
+ int read_from_stream_i (char_type* buffer, std::streamsize length);
+
+ int write_to_stream_i (const char_type* buffer, std::streamsize length);
+
+ private:
+ STREAM_BUFFER* streambuf_;
+ };
+ }
+ }
+
+ACE_END_VERSIONED_NAMESPACE_DECL
+
+#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
+#include "ace/INet/HTTP_StreamPolicyBase.cpp"
+#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
+
+#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
+#pragma implementation ("HTTP_StreamPolicyBase.cpp")
+#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
+
+#include /**/ "ace/post.h"
+#endif /* ACE_HTTP_STREAM_POLICY_BASE_H */