Main Page   Class Hierarchy   Compound List   File List   Compound Members  

Packet.h

00001 /*
00002  * The Apache Software License, Version 1.1
00003  *
00004  *
00005  * Copyright (c) 2002 The Apache Software Foundation.  All rights
00006  * reserved.
00007  *
00008  * Redistribution and use in source and binary forms, with or without
00009  * modification, are permitted provided that the following conditions
00010  * are met:
00011  *
00012  * 1. Redistributions of source code must retain the above copyright
00013  *    notice, this list of conditions and the following disclaimer.
00014  *
00015  * 2. Redistributions in binary form must reproduce the above copyright
00016  *    notice, this list of conditions and the following disclaimer in
00017  *    the documentation and/or other materials provided with the
00018  *    distribution.
00019  *
00020  * 3. The end-user documentation included with the redistribution,
00021  *    if any, must include the following acknowledgment:
00022  *       "This product includes software developed by the
00023  *        Apache Software Foundation (http://www.apache.org/)."
00024  *    Alternately, this acknowledgment may appear in the software itself,
00025  *    if and wherever such third-party acknowledgments normally appear.
00026  *
00027  * 4. The names "SOAP" and "Apache Software Foundation" must
00028  *    not be used to endorse or promote products derived from this
00029  *    software without prior written permission. For written
00030  *    permission, please contact apache@apache.org.
00031  *
00032  * 5. Products derived from this software may not be called "Apache",
00033  *    nor may "Apache" appear in their name, without prior written
00034  *    permission of the Apache Software Foundation.
00035  *
00036  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
00037  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
00038  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00039  * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
00040  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
00041  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
00042  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
00043  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
00044  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00045  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
00046  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00047  * SUCH DAMAGE.
00048  * ====================================================================
00049  *
00050  * This software consists of voluntary contributions made by many
00051  * individuals on behalf of the Apache Software Foundation.  For more
00052  * information on the Apache Software Foundation, please see
00053  * <http://www.apache.org/>.
00054  *
00055  *
00056  *
00057  *
00058  * @author Sanjaya Singharage (sanjayasing@opensource.lk)
00059  * @author Susantha Kumara (susantha@opensource.lk, skumara@virtusa.com)
00060  *
00061  */
00062 #ifdef WIN32
00063 #pragma warning (disable : 4786)
00064 #endif
00065 
00066 #if !defined(__PACKET_H_INCLUDED__)
00067 #define __PACKET_H_INCLUDED__
00068 
00069 #include "GDefine.h"
00070 
00071 #define AXIS_URI_EXTENSION "/axis/"
00072 
00073 typedef struct 
00074 {
00075         const void* ip_stream;
00076         const void* op_stream;
00077 } Ax_iostream;
00078 
00079 typedef enum
00080 {
00081         AXIS_HTTP_GET,
00082         AXIS_HTTP_POST,
00083         AXIS_HTTP_UNSUPPORTED
00084 } AXIS_HTTP_METHOD;
00085 
00086 typedef struct
00087 {
00088         char* headername;
00089         char* headervalue;
00090 } Ax_header;
00091 
00092 typedef struct
00093 {
00094         const char* uri_path;
00095         Ax_header* ip_headers;
00096         int ip_headercount;
00097         Ax_header* op_headers;
00098         int op_headercount;
00099         AXIS_HTTP_METHOD ip_method;
00100         AXIS_HTTP_METHOD op_method;
00101 } Ax_stream_http;
00102 
00103 typedef struct
00104 {
00105         int dummy;  
00106 } Ax_stream_smtp;
00107 
00108 typedef union
00109 {
00110         Ax_stream_http http;
00111         Ax_stream_smtp smtp;
00112 } Ax_soapcontent;
00113 
00117 typedef int (*AXIS_SEND_SEND_BYTES)(const char*, const void*);
00118 typedef int (*AXIS_GET_BYTES)(char*, int, int*, const void*);
00119 typedef int (*AXIS_SEND_TRANSPORT_INFORMATION)(void*); /*Ax_soapstream*/
00120 typedef int (*AXIS_GET_TRANSPORT_INFORMATION)(void*);/*Ax_soapstream*/
00121 
00126 typedef struct
00127 {
00128         AXIS_SEND_SEND_BYTES pSendFunct;
00129         AXIS_GET_BYTES pGetFunct;
00130         AXIS_SEND_TRANSPORT_INFORMATION pSendTrtFunct;
00131         AXIS_GET_TRANSPORT_INFORMATION pGetTrtFunct;
00132 } Ax_transport;
00133 
00134 typedef struct
00135 {
00136         Ax_soapcontent so;
00137         Ax_iostream str;
00138         char* sessionid;
00139         AXIS_PROTOCOL_TYPE trtype;
00140         Ax_transport transport;
00141 } Ax_soapstream;
00142 
00143 int set_header(Ax_soapstream* soap, char * pchkey, char * pchvalue);
00144 const char* get_header(const Ax_soapstream* soap, const char* pchkey);
00145 const char* get_service_from_uri(const Ax_soapstream* soap);
00146 
00147 /*This function is implemented in axis*/
00148 /*int initialize_process();*/
00149 
00150 
00151 /*This function is implemented in axis*/
00152 /*int finalize_process();*/
00153 
00154 #ifdef __cplusplus
00155 extern "C"
00156 {
00157 #endif
00158         /*This function is implemented in axis*/
00159         int uninitialize_module();
00160 
00161         /*This function is implemented in axis*/
00162         int initialize_module(int bServer);
00163 
00164         /*This function is implemented in axis*/
00165         int process_request(Ax_soapstream* str);
00166 
00167         /*This function should be implemented by module authors*/
00168         /*Allows to send pieces of soap response the transport handler*/
00169         /*int send_response_bytes(const char* res, const void* opstream);*/
00170 
00171         /*This function should be implemented by module authors*/
00172         /*Allows axis to get pieces of the request as they come to the transport listener*/
00173         /*int get_request_bytes(char* req, int reqsize, int* retsize, const void* ipstream);*/
00174 
00175         /*This fucntion should be implemented by module authors*/
00176         /*int send_transport_information(Ax_soapstream *str);*/
00177 
00178         /*int receive_transport_information(Ax_soapstream *str);*/
00179 #ifdef __cplusplus
00180 }
00181 #endif
00182 
00183 #endif
00184 
00185 

Generated on Mon Dec 1 15:18:35 2003 for axisc++ by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002