axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sam...@apache.org
Subject svn commit: r356458 - /webservices/axis2/trunk/c/include/
Date Tue, 13 Dec 2005 03:10:55 GMT
Author: samisa
Date: Mon Dec 12 19:10:42 2005
New Revision: 356458

URL: http://svn.apache.org/viewcvs?rev=356458&view=rev
Log:
Added: HTTP transport module: utility functions

Added:
    webservices/axis2/trunk/c/include/axis2_http_header.h
    webservices/axis2/trunk/c/include/axis2_http_request_line.h
    webservices/axis2/trunk/c/include/axis2_http_response_writer.h
    webservices/axis2/trunk/c/include/axis2_http_simple_request.h
    webservices/axis2/trunk/c/include/axis2_http_simple_response.h
    webservices/axis2/trunk/c/include/axis2_http_status_line.h
    webservices/axis2/trunk/c/include/axis2_http_transport.h
    webservices/axis2/trunk/c/include/axis2_http_transport_utils.h
    webservices/axis2/trunk/c/include/axis2_http_worker.h
    webservices/axis2/trunk/c/include/axis2_simple_http_svr_conn.h

Added: webservices/axis2/trunk/c/include/axis2_http_header.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_http_header.h?rev=356458&view=auto
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_http_header.h (added)
+++ webservices/axis2/trunk/c/include/axis2_http_header.h Mon Dec 12 19:10:42 2005
@@ -0,0 +1,95 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AXIS2_HTTP_HEADER_H
+#define AXIS2_HTTP_HEADER_H
+
+
+/**
+  * @file axis2_http_header.h
+  * @brief axis2 HTTP Header name:value pair implementation
+  */
+  
+#include <axis2.h>
+#include <axis2_defines.h>
+#include <axis2_env.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/**
+ * @ingroup axis2_core_transport_http
+ * @{
+ */
+
+    typedef struct axis2_http_header_ops axis2_http_header_ops_t;
+    typedef struct axis2_http_header axis2_http_header_t;
+
+    
+/** 
+ * @brief HTTP Response Writer operations struct
+ * Encapsulator struct for operations of axis2_http_header
+ */  
+AXIS2_DECLARE_DATA struct axis2_http_header_ops
+{
+    axis2_char_t* (AXIS2_CALL *to_external_form) (axis2_http_header_t *header, 
+                    axis2_env_t **env);
+    
+    axis2_char_t* (AXIS2_CALL *get_name) (axis2_http_header_t *header, 
+                    axis2_env_t **env);
+    
+    axis2_char_t* (AXIS2_CALL *get_value) (axis2_http_header_t *header, 
+                    axis2_env_t **env);
+    
+    axis2_status_t (AXIS2_CALL *free) (axis2_http_header_t *header, 
+                    axis2_env_t **env);
+};
+
+/** 
+ * @brief HTTP Header struct
+ *    Axis2 HTTP Header
+ */
+AXIS2_DECLARE_DATA struct axis2_http_header
+{
+    axis2_http_header_ops_t *ops;    
+};
+
+
+AXIS2_DECLARE(axis2_http_header_t *) AXIS2_CALL
+axis2_http_header_create (axis2_env_t **env, axis2_char_t *name, 
+                            axis2_char_t *value);
+
+/************************** Start of function macros **************************/
+
+#define AXIS2_HTTP_HEADER_TO_EXTERNAL_FORM(header, env) \
+                                ((header)->ops->to_external_form(header, env))
+#define AXIS2_HTTP_HEADER_GET_NAME(header, env) \
+                                ((header)->ops->get_name(header, env))
+#define AXIS2_HTTP_HEADER_GET_VALUE(header, env) \
+                                ((header)->ops->get_value(header, env))
+#define AXIS2_HTTP_HEADER_FREE(header, env) \
+                                ((header)->ops->free(header, env))
+
+/************************** End of function macros ****************************/    
+
+/** @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif                          /* AXIS2_HTTP_HEADER_H */

Added: webservices/axis2/trunk/c/include/axis2_http_request_line.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_http_request_line.h?rev=356458&view=auto
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_http_request_line.h (added)
+++ webservices/axis2/trunk/c/include/axis2_http_request_line.h Mon Dec 12 19:10:42 2005
@@ -0,0 +1,104 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+#ifndef AXIS2_HTTP_REQUEST_LINE_H
+#define AXIS2_HTTP_REQUEST_LINE_H
+
+/**
+ * @file axis2_http_request_line.h
+ * @brief axis2 HTTP Request Line
+ */
+
+#include <axis2.h>
+#include <axis2_defines.h>
+#include <axis2_env.h>
+
+
+#ifdef __cplusplus
+extern "C" 
+{
+#endif
+/** 
+  * @ingroup axis2_core_transport_http
+  * @{
+  */
+
+typedef struct axis2_http_request_line_ops axis2_http_request_line_ops_t;
+typedef struct axis2_http_request_line axis2_http_request_line_t;
+    
+    
+/** 
+ * @brief HTTP Request Line operations struct
+ * Encapsulator struct for operations of axis2_http_request_line
+ */
+AXIS2_DECLARE_DATA struct axis2_http_request_line_ops
+{
+	axis2_char_t* (AXIS2_CALL *get_method) 
+                                (axis2_http_request_line_t *request_line, 
+                                axis2_env_t **env);
+	
+	axis2_char_t* (AXIS2_CALL *get_http_version) 
+                                (axis2_http_request_line_t *request_line, 
+                                axis2_env_t **env);
+    
+	axis2_char_t* (AXIS2_CALL *get_uri) 
+                                (axis2_http_request_line_t *request_line, 
+                                axis2_env_t **env);
+    
+	axis2_char_t* (AXIS2_CALL *to_string)
+                                (axis2_http_request_line_t *request_line, 
+                                axis2_env_t **env);
+	
+	axis2_status_t (AXIS2_CALL *free) 
+                                (axis2_http_request_line_t *request_line, 
+                                axis2_env_t **env);
+};
+
+/**
+ * @brief HTTP Reqest Line struct
+ * Axis2 HTTP Request Line
+ */
+AXIS2_DECLARE_DATA struct axis2_http_request_line
+{
+	axis2_http_request_line_ops_t *ops;
+};
+
+
+axis2_http_request_line_t * AXIS2_CALL 
+axis2_http_request_line_create(axis2_env_t **env, axis2_char_t *method, 
+                                axis2_char_t *uri, axis2_char_t *http_version);
+
+/********************* Start of function macros	***************************/
+
+#define AXIS2_HTTP_REQUEST_LINE_GET_METHOD(request_line, env) \
+                        ((request_line)->ops->get_method (request_line, env))
+#define AXIS2_HTTP_REQUEST_LINE_GET_HTTP_VERSION(request_line, env) \
+                        ((request_line)->ops->get_http_version \
+                        (request_line, env))
+#define AXIS2_HTTP_REQUEST_LINE_GET_URI(request_line, env) \
+                        ((request_line)->ops->get_uri (request_line, env))
+#define AXIS2_HTTP_REQUEST_LINE_TO_STRING(request_line, env) \
+                        ((request_line)->ops->to_string (request_line, env))
+#define AXIS2_HTTP_REQUEST_LINE_FREE(request_line, env) \
+                        ((request_line)->ops->free(request_line, env))
+
+/************************* End of function macros *****************************/
+
+/** @} */
+#ifdef __cplusplus
+}
+#endif
+#endif /* AXIS2_HTTP_REQUEST_LINE_H */

Added: webservices/axis2/trunk/c/include/axis2_http_response_writer.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_http_response_writer.h?rev=356458&view=auto
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_http_response_writer.h (added)
+++ webservices/axis2/trunk/c/include/axis2_http_response_writer.h Mon Dec 12 19:10:42 2005
@@ -0,0 +1,142 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AXIS2_HTTP_RESPONSE_WRITER_H
+#define AXIS2_HTTP_RESPONSE_WRITER_H
+
+
+/**
+  * @file axis2_http_response_writer.h
+  * @brief axis2 Response Writer
+  */
+  
+#include <axis2.h>
+#include <axis2_defines.h>
+#include <axis2_env.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/**
+ * @ingroup axis2_core_transport_http
+ * @{
+ */
+
+    typedef struct axis2_http_response_writer_ops 
+                                        axis2_http_response_writer_ops_t;
+    typedef struct axis2_http_response_writer axis2_http_response_writer_t;
+
+    
+/** 
+ * @brief HTTP Response Writer operations struct
+ * Encapsulator struct for operations of axis2_http_response_writer
+ */  
+AXIS2_DECLARE_DATA struct axis2_http_response_writer_ops
+{
+    axis2_char_t* (AXIS2_CALL *get_encoding) 
+                    (axis2_http_response_writer_t *response_writer, 
+                    axis2_env_t **env);
+    
+    axis2_status_t (AXIS2_CALL *close) 
+                    (axis2_http_response_writer_t *response_writer, 
+                    axis2_env_t **env);
+    
+    axis2_status_t (AXIS2_CALL *flush) 
+                    (axis2_http_response_writer_t *response_writer, 
+                    axis2_env_t **env);
+    
+    axis2_status_t (AXIS2_CALL *write_char) 
+                    (axis2_http_response_writer_t *response_writer, 
+                    axis2_env_t **env, char c);
+    
+    axis2_status_t (AXIS2_CALL *write_buf) 
+                    (axis2_http_response_writer_t *response_writer, 
+                    axis2_env_t **env, char *buf, int offset, 
+                    axis2_ssize_t len);
+
+    axis2_status_t (AXIS2_CALL *print_str) 
+                    (axis2_http_response_writer_t *response_writer, 
+                    axis2_env_t **env, char *str);
+    
+    axis2_status_t (AXIS2_CALL *print_int) 
+                    (axis2_http_response_writer_t *response_writer, 
+                    axis2_env_t **env, int i);
+    
+    axis2_status_t (AXIS2_CALL *println_str) 
+                    (axis2_http_response_writer_t *response_writer, 
+                    axis2_env_t **env, char *str);
+    
+    axis2_status_t (AXIS2_CALL *println) 
+                    (axis2_http_response_writer_t *response_writer, 
+                    axis2_env_t **env);
+    
+    axis2_status_t (AXIS2_CALL *free) 
+                    (axis2_http_response_writer_t *response_writer, 
+                    axis2_env_t **env);
+};
+
+/** 
+ * @brief HTTP Response Writer struct
+ *    Axis2 HTTP Response Writer
+ */
+AXIS2_DECLARE_DATA struct axis2_http_response_writer
+{
+    axis2_http_response_writer_ops_t *ops;    
+};
+
+
+AXIS2_DECLARE(axis2_http_response_writer_t *) AXIS2_CALL
+axis2_http_response_writer_create (axis2_env_t **env, axis2_stream_t *stream);
+
+AXIS2_DECLARE(axis2_http_response_writer_t *) AXIS2_CALL
+axis2_http_response_writer_create_with_encoding(axis2_env_t **env,
+                    axis2_stream_t *stream, const axis2_char_t *encoding);
+    
+/************************** Start of function macros **************************/
+
+#define AXIS2_HTTP_RESPONSE_WRITER_GET_ENCODING(response_writer, env) \
+                    ((response_writer)->ops->get_encoding(response_writer, env))
+#define AXIS2_HTTP_RESPONSE_WRITER_CLOSE(response_writer, env) \
+                    ((response_writer)->ops->close(response_writer, env))
+#define AXIS2_HTTP_RESPONSE_WRITER_FLUSH(response_writer, env) \
+                    ((response_writer)->ops->flush(response_writer, env))
+#define AXIS2_HTTP_RESPONSE_WRITER_WRITE_CHAR(response_writer, env, c) \
+                    ((response_writer)->ops->write_char(response_writer, env, c))
+#define AXIS2_HTTP_RESPONSE_WRITER_WRITE_BUF(response_writer, env, buf, offset,\
+                    len) ((response_writer)->ops->write_buf(response_writer, \
+                    env, buf, offset, len))
+#define AXIS2_HTTP_RESPONSE_WRITER_PRINT_STR(response_writer, env, str) \
+                    ((response_writer)->ops->print_str(response_writer, env, str))
+#define AXIS2_HTTP_RESPONSE_WRITER_PRINT_INT(response_writer, env, i)\
+                    ((response_writer)->ops->print_int(response_writer, env))
+#define AXIS2_HTTP_RESPONSE_WRITER_PRINTLN_STR(response_writer, env, str) \
+                    ((response_writer)->ops->println_str(response_writer, env,\
+                    str))
+#define AXIS2_HTTP_RESPONSE_WRITER_PRINTLN(response_writer, env) \
+                    ((response_writer)->ops->println(response_writer, env))
+#define AXIS2_HTTP_RESPONSE_WRITER_FREE(response_writer, env)\
+                    ((response_writer)->ops->free(response_writer, env))
+
+/************************** End of function macros ****************************/    
+
+/** @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif                          /* AXIS2_HTTP_RESPONSE_WRITER_H */

Added: webservices/axis2/trunk/c/include/axis2_http_simple_request.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_http_simple_request.h?rev=356458&view=auto
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_http_simple_request.h (added)
+++ webservices/axis2/trunk/c/include/axis2_http_simple_request.h Mon Dec 12 19:10:42 2005
@@ -0,0 +1,175 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AXIS2_HTTP_SIMPLE_REQUEST_H
+#define AXIS2_HTTP_SIMPLE_REQUEST_H
+
+
+/**
+  * @file axis2_http_simple_request.h
+  * @brief axis2 HTTP Simple Request
+  */
+
+#include <axis2.h>
+#include <axis2_defines.h>
+#include <axis2_env.h>
+#include <axis2_http_request_line.h>
+#include <axis2_http_header.h>
+#include <axis2_stream.h>
+#include <axis2_array_list.h>
+
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/**
+ * @ingroup axis2_core_transport_http
+ * @{
+ */
+    typedef struct axis2_http_simple_request_ops 
+            axis2_http_simple_request_ops_t;
+    typedef struct axis2_http_simple_request axis2_http_simple_request_t; 
+    
+/** 
+ * @brief HTTP Simple Request operations struct
+ * Encapsulator struct for operations of axis2_http_simple_request
+ */  
+AXIS2_DECLARE_DATA struct axis2_http_simple_request_ops
+{
+    axis2_http_request_line_t* (AXIS2_CALL *get_request_line)
+                            (axis2_http_simple_request_t *simple_request, 
+                            axis2_env_t **env);
+    
+    axis2_status_t (AXIS2_CALL *set_request_line)
+                            (axis2_http_simple_request_t *simple_request, 
+                            axis2_env_t **env, 
+                            axis2_http_request_line_t *request_line);
+    
+    axis2_bool_t (AXIS2_CALL *contains_header)
+                            (axis2_http_simple_request_t *simple_request, 
+                            axis2_env_t **env, axis2_char_t *name);
+
+    axis2_array_list_t* (AXIS2_CALL *get_headers)
+                            (axis2_http_simple_request_t *simple_request, 
+                            axis2_env_t **env);
+
+    axis2_http_header_t* (AXIS2_CALL *get_first_header)
+                            (axis2_http_simple_request_t *simple_request, 
+                            axis2_env_t **env, const axis2_char_t *str);
+
+    axis2_status_t (AXIS2_CALL *remove_headers)
+                            (axis2_http_simple_request_t *simple_request, 
+                            axis2_env_t **env, const axis2_char_t *str);
+
+    axis2_status_t (AXIS2_CALL *add_header)
+                            (axis2_http_simple_request_t *simple_request, 
+                            axis2_env_t **env, axis2_http_header_t *header);
+
+    axis2_char_t* (AXIS2_CALL *get_content_type)
+                            (axis2_http_simple_request_t *simple_request, 
+                            axis2_env_t **env);
+
+    axis2_char_t* (AXIS2_CALL *get_charset)
+                            (axis2_http_simple_request_t *simple_request, 
+                            axis2_env_t **env);
+
+    axis2_ssize_t (AXIS2_CALL *get_content_length)
+                            (axis2_http_simple_request_t *simple_request, 
+                            axis2_env_t **env);
+
+    axis2_stream_t* (AXIS2_CALL *get_body)
+                            (axis2_http_simple_request_t *simple_request, 
+                            axis2_env_t **env);
+
+    axis2_ssize_t (AXIS2_CALL *get_body_bytes)
+                            (axis2_http_simple_request_t *simple_request, 
+                            axis2_env_t **env, axis2_char_t *buf);
+
+    axis2_status_t (AXIS2_CALL *free)
+                            (axis2_http_simple_request_t *simple_request, 
+                            axis2_env_t **env);
+    
+};
+
+/** 
+ * @brief HTTP Simple Request struct
+  *    Axis2 HTTP Simple Request
+ */
+AXIS2_DECLARE_DATA struct axis2_http_simple_request
+{
+    axis2_http_simple_request_ops_t *ops;    
+};
+
+
+AXIS2_DECLARE(axis2_http_simple_request_t *) AXIS2_CALL
+axis2_http_simple_request_create (axis2_env_t **env,
+                        axis2_http_request_line_t *request_line,
+                        axis2_http_header_t **http_headers,
+                        axis2_ssize_t http_hdr_count,
+                        axis2_stream_t *content);
+    
+/************************** Start of function macros **************************/
+
+
+#define AXIS2_HTTP_SIMPLE_REQUEST_GET_REQUEST_LINE(simple_request, env) \
+                            ((simple_request)->ops->get_request_line\
+                            (simple_request, env))
+#define AXIS2_HTTP_SIMPLE_REQUEST_SET_REQUEST_LINE\
+                            (simple_request, env, request_line) \
+                            ((simple_request)->ops->set_request_line\
+                            (simple_request, env, request_line))
+#define AXIS2_HTTP_SIMPLE_REQUEST_CONTAINS_HEADER(simple_request, env, name)\
+                            ((simple_request)->ops->contains_header\
+                            (simple_request, env, name))
+#define AXIS2_HTTP_SIMPLE_REQUEST_GET_HEADERS(simple_request, env, headers)\
+                            ((simple_request)->ops->get_headers(simple_request, env, headers))
+#define AXIS2_HTTP_SIMPLE_REQUEST_GET_FIRST_HEADER(simple_request, env, str) \
+                            ((simple_request)->ops->get_first_header\
+                            (simple_request, env, str))
+#define AXIS2_HTTP_SIMPLE_REQUEST_REMOVE_HEADERS(simple_request, env, str) \
+                            ((simple_request)->ops->remove_headers\
+                            (simple_request, env, str))
+#define AXIS2_HTTP_SIMPLE_REQUEST_ADD_HEADER(simple_request, env, header) \
+                            ((simple_request)->ops->add_header\
+                            (simple_request, env, header))
+#define AXIS2_HTTP_SIMPLE_REQUEST_GET_CONTENT_TYPE(simple_request, env)\
+                            ((simple_request)->ops->get_content_type\
+                            (simple_request, env))
+#define AXIS2_HTTP_SIMPLE_REQUEST_GET_CHARSET(simple_request, env) \
+                            ((simple_request)->ops->get_charset\
+                            (simple_request, env))
+#define AXIS2_HTTP_SIMPLE_REQUEST_GET_CONTENT_LENGTH(simple_request, env)\
+                            ((simple_request)->ops->get_content_length\
+                            (simple_request, env))
+#define AXIS2_HTTP_SIMPLE_REQUEST_GET_BODY(simple_request, env)\
+                            ((simple_request)->ops->get_body\
+                            (simple_request, env))
+#define AXIS2_HTTP_SIMPLE_REQUEST_GET_BODY_BYTES(simple_request, env, buf)\
+                            ((simple_request)->ops->get_body_bytes\
+                            (simple_request, env, buf))
+#define AXIS2_HTTP_SIMPLE_REQUEST_FREE(simple_request, env) \
+                            ((simple_request)->ops->free(simple_request, env))
+
+/************************** End of function macros ****************************/    
+
+/** @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif                          /* AXIS2_HTTP_SIMPLE_REQUEST_H */

Added: webservices/axis2/trunk/c/include/axis2_http_simple_response.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_http_simple_response.h?rev=356458&view=auto
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_http_simple_response.h (added)
+++ webservices/axis2/trunk/c/include/axis2_http_simple_response.h Mon Dec 12 19:10:42 2005
@@ -0,0 +1,220 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AXIS2_HTTP_SIMPLE_RESPONSE_H
+#define AXIS2_HTTP_SIMPLE_RESPONSE_H
+
+
+/**
+  * @file axis2_simple_http_response.h
+  * @brief axis2 HTTP Simple Response
+  */
+
+#include <axis2.h>
+#include <axis2_defines.h>
+#include <axis2_env.h>
+#include <axis2_array_list.h>
+#include <axis2_http_status_line.h>
+#include <axis2_http_header.h>
+
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/**
+ * @ingroup axis2_core_transport_http
+ * @{
+ */
+    typedef struct axis2_http_simple_response_ops 
+            axis2_http_simple_response_ops_t;
+    typedef struct axis2_http_simple_response axis2_http_simple_response_t; 
+    
+/** 
+ * @brief HTTP Simple Response operations struct
+ * Encapsulator struct for operations of axis2_http_simple_response
+ */  
+AXIS2_DECLARE_DATA struct axis2_http_simple_response_ops
+{
+    axis2_status_t (AXIS2_CALL *set_status_line)
+                    (struct axis2_http_simple_response *simple_response, 
+                    axis2_env_t **env, const axis2_char_t *http_ver, 
+                    const int status_code, const axis2_char_t *phrase);
+    
+    axis2_char_t* (AXIS2_CALL *get_phrase)
+                    (axis2_http_simple_response_t *simple_response, 
+                    axis2_env_t **env);
+    
+    int (AXIS2_CALL *get_status_code)
+                    (axis2_http_simple_response_t *simple_response, 
+                    axis2_env_t **env);
+
+    axis2_char_t* (AXIS2_CALL *get_http_version)
+                    (axis2_http_simple_response_t *simple_response, 
+                    axis2_env_t **env);
+
+    axis2_char_t* (AXIS2_CALL *get_status_line)
+                    (axis2_http_simple_response_t *simple_response, 
+                    axis2_env_t **env);
+
+    axis2_bool_t (AXIS2_CALL *contains_header)
+                    (axis2_http_simple_response_t *simple_response, 
+                    axis2_env_t **env, axis2_char_t *name);
+
+    axis2_array_list_t* (AXIS2_CALL *get_headers)
+                    (axis2_http_simple_response_t *simple_response, 
+                    axis2_env_t **env);
+    
+    axis2_http_header_t* (AXIS2_CALL *get_first_header)
+                    (axis2_http_simple_response_t *simple_response, 
+                    axis2_env_t **env, axis2_char_t *str);
+    
+    axis2_status_t (AXIS2_CALL *remove_headers)
+                    (axis2_http_simple_response_t *simple_response, 
+                    axis2_env_t **env, const axis2_char_t *str);
+    
+    axis2_status_t (AXIS2_CALL *set_header)
+                    (axis2_http_simple_response_t *simple_response, 
+                    axis2_env_t **env, axis2_http_header_t* header);
+
+    axis2_status_t (AXIS2_CALL *set_headers)
+                    (axis2_http_simple_response_t *simple_response, 
+                    axis2_env_t **env, axis2_http_header_t** headers, 
+                    axis2_ssize_t array_size);
+    
+    axis2_char_t* (AXIS2_CALL *get_charset)
+                    (axis2_http_simple_response_t *simple_response, 
+                    axis2_env_t **env);
+    
+    axis2_ssize_t (AXIS2_CALL *get_content_length)
+                    (axis2_http_simple_response_t *simple_response, 
+                    axis2_env_t **env);
+    
+    axis2_char_t* (AXIS2_CALL *get_content_type)
+                    (axis2_http_simple_response_t *simple_response, 
+                    axis2_env_t **env);
+
+    axis2_status_t (AXIS2_CALL *set_body_string)
+                    (axis2_http_simple_response_t *simple_response, 
+                    axis2_env_t **env, axis2_char_t *str);
+    
+    axis2_status_t (AXIS2_CALL *set_body_stream)
+                    (axis2_http_simple_response_t *simple_response, 
+                    axis2_env_t **env, axis2_stream_t *stream);    
+
+    axis2_stream_t* (AXIS2_CALL *get_body)
+                    (axis2_http_simple_response_t *simple_response, 
+                    axis2_env_t **env);
+
+    axis2_ssize_t (AXIS2_CALL *get_body_bytes)
+                    (axis2_http_simple_response_t *simple_response, 
+                    axis2_env_t **env, axis2_char_t *buf);
+
+    axis2_status_t (AXIS2_CALL *free)
+                    (axis2_http_simple_response_t *simple_response, 
+                    axis2_env_t **env);
+    
+};
+
+/** 
+  * @brief HTTP Simple Response struct
+  *    Axis2 HTTP Simple Response
+  */
+AXIS2_DECLARE_DATA struct axis2_http_simple_response
+{
+    axis2_http_simple_response_ops_t *ops;    
+};
+
+
+AXIS2_DECLARE(axis2_http_simple_response_t *) AXIS2_CALL
+axis2_http_simple_response_create (axis2_env_t **env,
+                        axis2_http_status_line_t *status_line,
+                        const axis2_http_header_t **http_headers,
+                        const axis2_ssize_t http_hdr_count,
+                        axis2_stream_t *content);
+
+AXIS2_DECLARE(axis2_http_simple_response_t *) AXIS2_CALL
+axis2_http_simple_response_create_default(axis2_env_t **env);
+    
+/************************** Start of function macros **************************/
+
+
+#define AXIS2_HTTP_SIMPLE_RESPONSE_SET_STAUTUS_LINE\
+                    (simple_response, env, status_line)\
+                    ((simple_response)->ops->get_status_line_line\
+                    (simple_response, env, status_line))
+#define AXIS2_HTTP_SIMPLE_RESPONSE_GET_PHRASE\
+                    (simple_response, env) ((simple_response)->ops->get_phrase\
+                    (simple_response, env))
+#define AXIS2_HTTP_SIMPLE_RESPONSE_GET_HTTP_VERSION(simple_response, env)\
+                    ((simple_response)->ops->get_http_version\
+                    (simple_response, env))
+#define AXIS2_HTTP_SIMPLE_RESPONSE_GET_STATUS_CODE(simple_response, env)\
+                    ((simple_response)->ops->get_status_code\
+                    (simple_response, env))
+#define AXIS2_HTTP_SIMPLE_RESPONSE_GET_STAUTUS_LINE(simple_response, env) \
+                    ((simple_response)->ops->get_status_line\
+                    (simple_response, env))
+#define AXIS2_HTTP_SIMPLE_RESPONSE_CONTAINS_HEADER(simple_response, env, name)\
+                    ((simple_response)->ops->contains_header\
+                    (simple_response, env, name))
+#define AXIS2_HTTP_SIMPLE_RESPONSE_GET_HEADERS(simple_response, env, headers) \
+                    ((simple_response)->ops->get_headers\
+                    (simple_response, env, headers))
+#define AXIS2_HTTP_SIMPLE_RESPONSE_GET_FIRST_HEADER(simple_request, env) \
+                    ((simple_request)->ops->get_first_header\
+                    (simple_request, env))
+#define AXIS2_HTTP_SIMPLE_RESPONSE_REMOVE_HEADERS(simple_request, env, str)\
+                    ((simple_request)->ops->remove_headers\
+                    (simple_request, env, str))
+#define AXIS2_HTTP_SIMPLE_RESPONSE_SET_HEADER(simple_response, env, header) \
+                    ((simple_response)->ops->set_header\
+                    (simple_response, env, header))
+#define AXIS2_HTTP_SIMPLE_RESPONSE_SET_HEADERS(simple_response, env, headers) \
+                    ((simple_response)->ops->set_headers\
+                    (simple_response, env, headers))
+#define AXIS2_HTTP_SIMPLE_RESPONSE_GET_CHARSET(simple_request, env) \
+                    ((simple_request)->ops->get_charset(simple_request, env))
+#define AXIS2_HTTP_SIMPLE_RESPONSE_GET_CONTENT_LENGTH(simple_request, env) \
+                    ((simple_request)->ops->get_content_length\
+                    (simple_request, env))
+#define AXIS2_HTTP_SIMPLE_RESPONSE_GET_CONTENT_TYPE(simple_request, env) \
+                    ((simple_request)->ops->get_content_type\
+                    (simple_request, env))
+#define AXIS2_HTTP_SIMPLE_RESPONSE_SET_BODY_STRING(simple_request, env, str)\
+                    ((simple_request)->ops->set_body_string\
+                    (simple_request, env, str))
+#define AXIS2_HTTP_SIMPLE_RESPONSE_SET_BODY_STREAM(simple_request, env, stream)\
+                    ((simple_request)->ops->set_body_stream\
+                    (simple_request, env, stream))
+#define AXIS2_HTTP_SIMPLE_RESPONSE_GET_BODY(simple_request, env)\
+                    ((simple_request)->ops->get_body\
+                    (simple_request, env))
+#define AXIS2_HTTP_SIMPLE_RESPONSE_GET_BODY_BYTES(simple_request, env, buf)\
+                    ((simple_request)->ops->get_body_bytes\
+                    (simple_request, env, buf))
+#define AXIS2_HTTP_SIMPLE_RESPONSE_FREE(simple_request, env)\
+                    ((simple_request)->ops->free(simple_request, env))
+
+/************************** End of function macros ****************************/    
+
+/** @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif                          /* AXIS2_HTTP_SIMPLE_RESPONSE_H */

Added: webservices/axis2/trunk/c/include/axis2_http_status_line.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_http_status_line.h?rev=356458&view=auto
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_http_status_line.h (added)
+++ webservices/axis2/trunk/c/include/axis2_http_status_line.h Mon Dec 12 19:10:42 2005
@@ -0,0 +1,102 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+#ifndef AXIS2_HTTP_STATUS_LINE_H
+#define AXIS2_HTTP_STATUS_LINE_H
+
+/**
+ * @file axis2_http_status_line.h
+ * @brief axis2 HTTP Status Line
+ */
+
+#include <axis2.h>
+#include <axis2_defines.h>
+#include <axis2_env.h>
+
+
+#ifdef __cplusplus
+extern "C" 
+{
+#endif
+/** 
+  * @ingroup axis2_core_transport_http
+  * @{
+  */
+
+typedef struct axis2_http_status_line_ops axis2_http_status_line_ops_t;
+typedef struct axis2_http_status_line axis2_http_status_line_t;
+    
+    
+/** 
+ * @brief HTTP Status Line operations struct
+ * Encapsulator struct for operations of axis2_http_status_line
+ */
+AXIS2_DECLARE_DATA struct axis2_http_status_line_ops
+{
+    int (AXIS2_CALL *get_status_code) (axis2_http_status_line_t *status_line, 
+                                        axis2_env_t **env);
+    
+    axis2_char_t* (AXIS2_CALL *get_http_version) 
+                    (axis2_http_status_line_t *status_line, axis2_env_t **env);
+    
+    axis2_char_t* (AXIS2_CALL *get_reason_phrase) 
+                    (axis2_http_status_line_t *status_line, axis2_env_t **env);
+    
+    axis2_bool_t (AXIS2_CALL *starts_with_http)
+                    (axis2_http_status_line_t *status_line, axis2_env_t **env);
+    
+    axis2_char_t* (AXIS2_CALL *to_string)
+                    (axis2_http_status_line_t *status_line, axis2_env_t **env);
+    
+    axis2_status_t (AXIS2_CALL *free) (axis2_http_status_line_t *status_line, 
+                                        axis2_env_t **env);
+};
+
+/**
+ * @brief HTTP Status Line struct
+ * Axis2 HTTP Status Line
+ */
+AXIS2_DECLARE_DATA struct axis2_http_status_line
+{
+    axis2_http_status_line_ops_t *ops;
+};
+
+
+axis2_http_status_line_t * AXIS2_CALL 
+axis2_http_status_line_create(axis2_env_t **env, axis2_char_t *str);
+
+/************************* Start of function macros    ***************************/
+
+#define AXIS2_HTTP_STATUS_LINE_GET_STATUS_CODE(status_line, env)\
+                    ((status_line)->ops->get_status_code (status_line, env))
+#define AXIS2_HTTP_STATUS_LINE_GET_HTTP_VERSION(status_line, env)\
+                    ((status_line)->ops->get_http_version (status_line, env))
+#define AXIS2_HTTP_STATUS_LINE_GET_REASON_PHRASE(status_line, env)\
+                    ((status_line)->ops->get_reason_phrase (status_line, env))
+#define AXIS2_HTTP_STATUS_LINE_STARTS_WITH_HTTP(status_line, env)\
+                    ((status_line)->ops->starts_with_http (status_line, env))
+#define AXIS2_HTTP_STATUS_LINE_TO_STRING(status_line, env)\
+                    ((status_line)->ops->to_string (status_line, env))
+#define AXIS2_HTTP_STATUS_LINE_FREE(status_line, env)\
+                    ((status_line)->ops->free(status_line, env))
+
+/************************* End of function macros *****************************/
+
+/** @} */
+#ifdef __cplusplus
+}
+#endif
+#endif /* AXIS2_HTTP_STATUS_LINE_H */

Added: webservices/axis2/trunk/c/include/axis2_http_transport.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_http_transport.h?rev=356458&view=auto
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_http_transport.h (added)
+++ webservices/axis2/trunk/c/include/axis2_http_transport.h Mon Dec 12 19:10:42 2005
@@ -0,0 +1,341 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain count copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AXIS2_HTTP_TRANSPORT_H
+#define AXIS2_HTTP_TRANSPORT_H
+
+#include <axis2.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/**
+ * @defgroup axis2_core_transport_http Core HTTP Transport
+ * @ingroup axis2_core_transport_http
+ * @{
+ */
+
+    /** 
+    * \brief HTTP protocol and message context constants.
+    *
+    */
+    
+    /**
+     * CARRIAGE RETURN AND LINE FEED
+     */
+    #define AXIS2_HTTP_CRLF "\r\n"
+    /**
+     * PROTOCOL_VERSION
+     */
+    #define AXIS2_HTTP_PROTOCOL_VERSION "PROTOCOL"
+    
+    /**
+     * REQUEST_URI
+     */
+    #define AXIS2_HTTP_REQUEST_URI "REQUEST_URI"
+    
+    /**
+     * RESPONSE_CODE
+     */
+    #define AXIS2_HTTP_RESPONSE_CODE "RESPONSE_CODE"
+    
+    /**
+     * RESPONSE_WORD
+     */
+    #define AXIS2_HTTP_RESPONSE_WORD "RESPONSE_WORD"
+    
+    /**
+     * RESPONSE_ACK_CODE_VAL
+     */
+    #define AXIS2_HTTP_RESPONSE_ACK_CODE_VAL "202"
+    
+    /**
+     * SOCKET
+     */
+    #define AXIS2_SOCKET "SOCKET"
+    
+    /**
+     * HEADER_PROTOCOL_10
+     */
+    #define AXIS2_HTTP_HEADER_PROTOCOL_10 "HTTP/1.0"
+    
+    /**
+     * HEADER_PROTOCOL_11
+     */
+    #define AXIS2_HTTP_HEADER_PROTOCOL_11 "HTTP/1.1"
+    
+    /**
+     * CHAR_SET_ENCODING
+     */
+    #define AXIS2_HTTP_CHAR_SET_ENCODING "charset"
+    
+    /**
+     * HEADER_POST
+     */
+    #define AXIS2_HTTP_HEADER_POST  "POST"
+    
+    /**
+     * HEADER_GET
+     */
+    #define AXIS2_HTTP_HEADER_GET "GET"
+    
+    /**
+     * HEADER_HOST
+     */
+    #define AXIS2_HTTP_HEADER_HOST "Host"
+    
+    /**
+     * HEADER_CONTENT_DESCRIPTION
+     */
+    #define AXIS2_HTP_HEADER_CONTENT_DESCRIPTION "Content-Description"
+    
+    /**
+     * HEADER_CONTENT_TYPE
+     */
+    #define AXIS2_HTTP_HEADER_CONTENT_TYPE "Content-Type"
+    
+    /**
+     * HEADER_CONTENT_TRANSFER_ENCODING
+     */
+    #define AXIS2_HTTP_HEADER_CONTENT_TRANSFER_ENCODING \
+                                    "Content-Transfer-Encoding"
+    
+    /**
+     * HEADER_CONTENT_LENGTH
+     */
+    #define AXIS2_HTTP_HEADER_CONTENT_LENGTH "Content-Length"
+    
+    /**
+     * HEADER_CONTENT_LOCATION
+     */
+    #define AXIS2_HTTP_HEADER_CONTENT_LOCATION "Content-Location"
+    
+    /**
+     * HEADER_CONTENT_ID
+     */
+    #define AXIS2_HTTP_HEADER_CONTENT_ID "Content-Id"
+    
+    /**
+     * HEADER_SOAP_ACTION
+     */
+    #define AXIS2_HTTP_HEADER_SOAP_ACTION "SOAPAction"
+    
+    /**
+     * HEADER_AUTHORIZATION
+     */
+    #define AXIS2_HTTP_HEADER_AUTHORIZATION "Authorization"
+    
+    /**
+     * HEADER_PROXY_AUTHORIZATION
+     */
+    #define AXIS2_HTTP_HEADER_PROXY_AUTHORIZATION "Proxy-Authorization"
+    
+    /**
+     * HEADER_EXPECT
+     */
+    #define AXIS2_HTTP_HEADER_EXPECT "Expect"
+    
+    /**
+     * HEADER_EXPECT_100_Continue
+     */
+    #define AXIS2_HTTP_HEADER_EXPECT_100_CONTINUE "100-continue"
+    
+    /**
+     * HEADER_USER_AGENT
+     */
+    #define AXIS2_HTTP_HEADER_USER_AGENT "User-Agent"
+    
+    /**
+     * HEADER_CACHE_CONTROL
+     */
+    #define AXIS2_HTTP_HEADER_CACHE_CONTROL "Cache-Control"
+    
+    /**
+     * HEADER_CACHE_CONTROL_NOCACHE
+     */
+    #define AXIS2_HTTP_HEADER_CACHE_CONTROL_NOCACHE "no-cache"
+    
+    /**
+     * HEADER_PRAGMA
+     */
+    #define AXIS2_HTTP_HEADER_PRAGMA "Pragma"
+    
+    /**
+     * HEADER_LOCATION
+     */
+    #define AXIS2_HTTP_HEADER_LOCATION "Location"
+    
+    /**
+     * REQUEST_HEADERS
+     */
+    #define AXIS2_HTTP_REQUEST_HEADERS "HTTP-Request-Headers"
+    
+    /**
+     * RESPONSE_HEADERS
+     */
+    #define AXIS2_HTTP_RESPONSE_HEADERS "HTTP-Response-Headers"
+    
+    /* http 1.1 */
+    
+    /**
+     * HEADER_TRANSFER_ENCODING
+     */
+    #define AXIS2_HTTP_HEADER_TRANSFER_ENCODING "Transfer-Encoding"
+    
+    /**
+     * HEADER_TRANSFER_ENCODING_CHUNKED
+     */
+    #define AXIS2_HTTP_HEADER_TRANSFER_ENCODING_CHUNKED "chunked"
+    
+    /**
+     * HEADER_CONNECTION
+     */
+    #define AXIS2_HTTP_HEADER_CONNECTION "Connection"
+    
+    /**
+     * HEADER_CONNECTION_CLOSE
+     */
+    #define AXIS2_HTTP_HEADER_CONNECTION_CLOSE "close"
+    
+    /**
+     * HEADER_CONNECTION_KEEPALIVE
+     */
+    #define AXIS2_HTTP_HEADER_CONNECTION_KEEPALIVE "Keep-Alive"
+    
+    /**
+     * HEADER_ACCEPT
+     */
+    #define AXIS2_HTTP_HEADER_ACCEPT "Accept"
+    
+    /**
+     * HEADER_ACCEPT_TEXT_ALL
+     */
+    #define AXIS2_HTTP_HEADER_ACCEPT_TEXT_ALL "text/*"
+    
+    /**
+     * HEADER_ACCEPT_TEXT_ALL
+     */
+    #define AXIS2_HTTP_HEADER_ACCEPT_TEXT_PLAIN "text/plain"
+    
+    /**
+     * HEADER_ACCEPT_APPL_SOAP
+     */
+    #define AXIS2_HTTP_HEADER_ACCEPT_APPL_SOAP "application/soap+xml"
+    
+    /**
+     * HEADER_ACCEPT_MULTIPART_RELATED
+     */
+    #define AXIS2_HTTP_HEADER_ACCEPT_MULTIPART_RELATED "multipart/related"
+    
+    /**
+     * HEADER_ACCEPT_APPLICATION_DIME
+     */
+    #define AXIS2_HTTP_HEADER_ACCEPT_APPLICATION_DIME "application/dime"
+    
+    /**
+     * Cookie headers
+    */
+    #define AXIS2_HTTP_HEADER_COOKIE "Cookie"
+    
+    /**
+    * HEADER_COOKIE2
+    */
+    #define AXIS2_HTTP_HEADER_COOKIE2 "Cookie2"
+    
+    /**
+    * HEADER_SET_COOKIE
+    */
+    #define AXIS2_HTTP_HEADER_SET_COOKIE "Set-Cookie"
+    
+    /**
+    * HEADER_SET_COOKIE2
+     */
+    #define AXIS2_HTTP_HEADER_SET_COOKIE2 "Set-Cookie2"
+    
+    /**
+     * HTTP header field values
+     */
+    #define AXIS2_HTTP_HEADER_DEFAULT_CHAR_ENCODING "iso-8859-1"
+    
+    /**
+     * REPONSE_HTTP_OK
+     */
+    #define AXIS2_HTTP_RESPONSE_OK "200 OK"
+    
+    /**
+     * RESPONSE_HTTP_NOCONTENT
+     */
+    #define AXIS2_HTTP_RESPONSE_NOCONTENT "202 OK";
+    
+    /**
+     * RESPONSE_HTTP_UNAUTHORIZED
+     */
+    #define AXIS2_HTTP_RESPONSE_HTTP_UNAUTHORIZED "401 Unauthorized"
+    
+    /**
+     * RESPONSE_BAD_REQUEST
+     */
+    #define AXIS2_HTTP_RESPONSE_BAD_REQUEST "400 Bad Request"
+    
+    /**
+     * RESPONSE_HTTP_INTERNAL_SERVER_ERROR
+     */
+    #define AXIS2_HTTP_RESPONSE_INTERNAL_SERVER_ERROR "500 Internal server error"
+    
+    /**
+     * HTTP_REQ_TYPE
+     */
+    #define AXIS2_HTTP_REQ_TYPE "HTTP_REQ_TYPE"
+    
+    /**
+     * SO_TIMEOUT
+     */
+    #define AXIS2_HTTP_SO_TIMEOUT "SO_TIMEOUT"
+    
+    /**
+     * CONNECTION_TIMEOUT
+     */
+    #define AXIS2_HTTP_CONNECTION_TIMEOUT "CONNECTION_TIMEOUT"
+    
+    /**
+     * DEFAULT_SO_TIMEOUT
+     */
+    #define AXIS2_HTTP_DEFAULT_SO_TIMEOUT 60000
+    
+    /**
+     * DEFAULT_CONNECTION_TIMEOUT
+     */
+    #define AXIS2_HTTP_DEFAULT_CONNECTION_TIMEOUT 60000
+    
+    #define AXIS2_HTTP_PROXY "PROXY"
+    
+    /**
+     * ISO-8859-1 encoding
+     */
+    #define AXIS2_HTTP_ISO_8859_1 "ISO-8859-1"
+    /** 
+     * Default charset in content
+     */
+    #define AXIS2_HTTP_DEFAULT_CONTENT_CHARSET "ISO-8859-1"
+    
+/** @} */
+    
+#ifdef __cplusplus
+}
+#endif  
+#endif                          /* AXIS2_HTTP_TRANSPORT_H */

Added: webservices/axis2/trunk/c/include/axis2_http_transport_utils.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_http_transport_utils.h?rev=356458&view=auto
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_http_transport_utils.h (added)
+++ webservices/axis2/trunk/c/include/axis2_http_transport_utils.h Mon Dec 12 19:10:42 2005
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AXIS2_HTTP_TRANSPORT_UTILS_H
+#define AXIS2_HTTP_TRANSPORT_UTILS_H
+
+
+/**
+  * @file axis2_http_transport_utils.h
+  * @brief axis2 HTTP Transport Utility class
+  */
+
+#include <axis2.h>
+#include <axis2_defines.h>
+#include <axis2_env.h>
+#include <axis2_om_stax_builder.h>
+#include <axis2_msg_ctx.h>
+#include <axis2_conf_ctx.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/**
+ * @ingroup axis2_core_transport_http
+ * @{
+ */
+  
+
+
+/** @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif                          /* AXIS2_HTTP_TRANSPORT_UTILS_H */

Added: webservices/axis2/trunk/c/include/axis2_http_worker.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_http_worker.h?rev=356458&view=auto
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_http_worker.h (added)
+++ webservices/axis2/trunk/c/include/axis2_http_worker.h Mon Dec 12 19:10:42 2005
@@ -0,0 +1,118 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AXIS2_HTTP_WORKER_H
+#define AXIS2_HTTP_WORKER_H
+
+
+/**
+  * @file axis2_http_worker.h
+  * @brief axis2 HTTP Worker
+  */
+
+#include <axis2.h>
+#include <axis2_defines.h>
+#include <axis2_env.h>
+#include <axis2_simple_http_svr_conn.h>
+#include <axis2_http_simple_response.h>
+#include <axis2_http_simple_request.h>
+#include <axis2_conf_ctx.h>
+
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/**
+ * @ingroup axis2_core_transport_http
+ * @{
+ */
+
+    typedef struct axis2_http_worker_ops axis2_http_worker_ops_t;
+    typedef struct axis2_http_worker axis2_http_worker_t; 
+    
+/** 
+ * @brief HTTP Worker operations struct
+ * Encapsulator struct for operations of axis2_http_worker
+ */  
+AXIS2_DECLARE_DATA struct axis2_http_worker_ops
+{
+    axis2_bool_t (AXIS2_CALL *process_request)
+                    (axis2_http_worker_t *http_worker, 
+                    axis2_env_t **env, 
+                    axis2_simple_http_svr_conn_t *svr_conn, 
+                    axis2_http_simple_request_t *simple_request);
+    
+    axis2_status_t (AXIS2_CALL *set_response_headers)
+                    (axis2_http_worker_t *http_worker, 
+                    axis2_env_t **env, 
+                    axis2_simple_http_svr_conn_t *svr_conn, 
+                    axis2_http_simple_request_t *simple_request,
+                    axis2_http_simple_response_t *simple_response,    
+                    axis2_ssize_t content_length);
+
+    axis2_status_t (AXIS2_CALL *set_trasnport_out_config)
+                    (axis2_http_worker_t *http_worker, 
+                    axis2_env_t **env, 
+                    axis2_conf_ctx_t *conf_ctx, 
+                    axis2_http_simple_response_t *simple_response);
+    
+    axis2_status_t (AXIS2_CALL *free)
+                    (axis2_http_worker_t *http_worker, 
+                    axis2_env_t **env);
+};
+
+/** 
+ * @brief HTTP Worker struct
+  *    Axis2 HTTP Worker
+ */
+AXIS2_DECLARE_DATA struct axis2_http_worker
+{
+    axis2_http_worker_ops_t *ops;    
+};
+
+
+AXIS2_DECLARE(axis2_http_worker_t *) AXIS2_CALL
+axis2_http_worker_create (axis2_env_t **env, axis2_conf_ctx_t *conf_ctx);
+    
+/************************** Start of function macros **************************/
+
+
+#define AXIS2_HTTP_WORKER_PROCESS_REQUEST\
+                (http_worker, env, svr_conn, simple_request) \
+                ((http_worker)->ops->process_request(http_worker, env, svr_conn\
+                ,simple_request))
+#define AXIS2_HTTP_WORKER_SET_RESPONSE_HEADERS\
+                (http_worker, env, svr_conn, simple_request, content_length)\
+                ((http_worker)->ops->set_response_headers(http_worker, env, \
+                svr_conn, simple_request, content_length))
+#define AXIS2_HTTP_WORKER_SET_TRANSPORT_OUT_CONFIG\
+                (http_worker, env, conf_ctx, simple_response)\
+                ((http_worker)->ops->set_trasnport_out_config(http_worker, env,\
+                conf_ctx, simple_response)))
+#define AXIS2_HTTP_WORKER_FREE\
+                (http_worker, env) \
+                ((http_worker)->ops->free(http_worker, env))
+
+/************************** End of function macros ****************************/    
+
+/** @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif                          /* AXIS2_HTTP_WORKER_H */

Added: webservices/axis2/trunk/c/include/axis2_simple_http_svr_conn.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_simple_http_svr_conn.h?rev=356458&view=auto
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_simple_http_svr_conn.h (added)
+++ webservices/axis2/trunk/c/include/axis2_simple_http_svr_conn.h Mon Dec 12 19:10:42 2005
@@ -0,0 +1,142 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AXIS2_SIMPLE_HTTP_SVR_CONN_H
+#define AXIS2_SIMPLE_HTTP_SVR_CONN_H
+
+/**
+ * @file axis2_simple_http_svr_conn.h
+ * @brief Axis2 simple http server connection
+ */
+
+#include <axis2.h>
+#include <axis2_defines.h>
+#include <axis2_env.h>
+#include <axis2_http_simple_request.h>
+#include <axis2_http_simple_response.h>
+#include <axis2_http_response_writer.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+    typedef struct axis2_simple_http_svr_conn_ops 
+                    axis2_simple_http_svr_conn_ops_t;
+    typedef struct axis2_simple_http_svr_conn axis2_simple_http_svr_conn_t;
+    
+/**
+ * @ingroup axis2_core_transport_http
+ * @{
+ */
+
+/**
+ *   \brief Simple HTTP Server Connection operations struct
+ */
+AXIS2_DECLARE_DATA struct axis2_simple_http_svr_conn_ops
+{        
+        axis2_status_t (AXIS2_CALL *close) 
+                        (axis2_simple_http_svr_conn_t *svr_conn, 
+                        axis2_env_t **env);
+        axis2_bool_t (AXIS2_CALL *is_open) 
+                        (axis2_simple_http_svr_conn_t *svr_conn, 
+                        axis2_env_t **env);
+        axis2_status_t (AXIS2_CALL *set_keep_alive) 
+                        (axis2_simple_http_svr_conn_t *svr_conn, 
+                        axis2_env_t **env, axis2_bool_t keep_alive);
+        axis2_bool_t (AXIS2_CALL *is_keep_alive)
+                        (axis2_simple_http_svr_conn_t *svr_conn, 
+                        axis2_env_t **env);
+        axis2_stream_t* (AXIS2_CALL *get_stream) 
+                        (axis2_simple_http_svr_conn_t *svr_conn, 
+                        axis2_env_t **env);
+        axis2_http_response_writer_t* (AXIS2_CALL *get_writer)
+                        (axis2_simple_http_svr_conn_t *svr_conn, 
+                        axis2_env_t **env);
+        axis2_http_simple_request_t* (AXIS2_CALL *read_request)
+                        (axis2_simple_http_svr_conn_t *svr_conn, 
+                        axis2_env_t **env);
+        axis2_status_t (AXIS2_CALL *write_response)
+                        (axis2_simple_http_svr_conn_t *svr_conn, 
+                        axis2_env_t **env, 
+                        const axis2_http_simple_response_t *response);
+        int (AXIS2_CALL *get_snd_timeout) 
+                        (axis2_simple_http_svr_conn_t *svr_conn, 
+                        axis2_env_t **env);
+        int (AXIS2_CALL *get_rcv_timeout) 
+                        (axis2_simple_http_svr_conn_t *svr_conn, 
+                        axis2_env_t **env);
+        axis2_status_t (AXIS2_CALL *set_rcv_timeout)
+                        (axis2_simple_http_svr_conn_t *svr_conn, 
+                        axis2_env_t **env, int timeout);
+        axis2_status_t (AXIS2_CALL *set_snd_timeout) 
+                        (axis2_simple_http_svr_conn_t *svr_conn, 
+                        axis2_env_t **env, int timeout);
+        axis2_status_t (AXIS2_CALL *free) 
+                        (axis2_simple_http_svr_conn_t *svr_conn, 
+                        axis2_env_t **env);
+ };
+    
+/** 
+* \brief Simple HTTP Server Connection struct
+*/
+AXIS2_DECLARE_DATA struct axis2_simple_http_svr_conn
+{
+    /** Simple HTTP Server Connection related operations */
+    axis2_simple_http_svr_conn_ops_t *ops;
+};
+
+
+/**
+ * creates axis2_simple_http_svr_conn struct
+ */
+AXIS2_DECLARE(axis2_simple_http_svr_conn_t*) AXIS2_CALL
+axis2_simple_http_svr_conn_create(axis2_env_t **env, int sockfd);
+  
+#define AXIS2_SIMPLE_HTTP_SVR_CONN_CLOSE(svr_conn, env) \
+                    ((svr_conn)->ops->close(svr_conn, env))
+#define AXIS2_SIMPLE_HTTP_SVR_CONN_IS_OPEN(svr_conn, env) \
+                    ((svr_conn)->ops->is_open(svr_conn, env))
+#define AXIS2_SIMPLE_HTTP_SVR_CONN_SET_KEEP_ALIVE(svr_conn, env, keep_alive)\
+                    ((svr_conn)->ops->set_keep_alive(svr_conn, env, keep_alive))
+#define AXIS2_SIMPLE_HTTP_SVR_CONN_IS_KEEP_ALIVE(svr_conn, env) \
+                    ((svr_conn)->ops->is_keep_alive(svr_conn, env))
+#define AXIS2_SIMPLE_HTTP_SVR_CONN_GET_STREAM(svr_conn, env) \
+                    ((svr_conn)->ops->get_stream(svr_conn, env))
+#define AXIS2_SIMPLE_HTTP_SVR_CONN_SET_WRITER(svr_conn, env, writer) \
+                    ((svr_conn)->ops->set_writer(svr_conn, env, writer))
+#define AXIS2_SIMPLE_HTTP_SVR_CONN_READ_REQUEST(svr_conn, env) \
+                    ((svr_conn)->ops->is_open(svr_conn, env))
+#define AXIS2_SIMPLE_HTTP_SVR_CONN_WRITE_RESPONSE(svr_conn, env, response) \
+                    ((svr_conn)->ops->write_response(svr_conn, env, response))
+#define AXIS2_SIMPLE_HTTP_SVR_CONN_GET_SND_TIMEOUT(svr_conn, env)\
+                    ((svr_conn)->ops->get_snd_timeout(svr_conn, env))
+#define AXIS2_SIMPLE_HTTP_SVR_CONN_GET_RCV_TIMEOUT(svr_conn, env) \
+                    ((svr_conn)->ops->get_rcv_timeout(svr_conn, env))
+#define AXIS2_SIMPLE_HTTP_SVR_CONN_SET_SND_TIMEOUT(svr_conn, env, timeout) \
+                    ((svr_conn)->ops->set_snd_timeout(svr_conn, env, timeout))
+#define AXIS2_SIMPLE_HTTP_SVR_CONN_SET_RCV_TIMEOUT(svr_conn, env, timeout) \
+                    ((svr_conn)->ops->set_rcv_timeout(svr_conn, env, timeout))
+#define AXIS2_SIMPLE_HTTP_SVR_CONN_FREE(svr_conn, env) \
+                    ((svr_conn)->ops->is_open(svr_conn, env))
+    
+/** @} */
+    
+#ifdef __cplusplus
+}
+#endif
+
+#endif    /* AXIS2_SIMPLE_HTTP_SVR_CONN_H */



Mime
View raw message