Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members   Examples  

IHeaderBlock.h

00001 /*
00002  *   Copyright 2003-2004 The Apache Software Foundation.
00003  *
00004  *   Licensed under the Apache License, Version 2.0 (the "License");
00005  *   you may not use this file except in compliance with the License.
00006  *   You may obtain a copy of the License at
00007  *
00008  *       http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  *   Unless required by applicable law or agreed to in writing, software
00011  *   distributed under the License is distributed on an "AS IS" BASIS,
00012  *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  *   See the License for the specific language governing permissions and
00014  *   limitations under the License.
00015  */
00016 
00017 #if !defined(_IHEADERBLOCK_H____OF_AXIS_INCLUDED_)
00018 #define _IHEADERBLOCK_H____OF_AXIS_INCLUDED_
00019 
00020 #include "BasicNode.h"
00021 #include "SoapEnvVersions.h"
00022 
00023 #ifdef __cplusplus
00024 class Attribute;
00025 #endif
00026 
00027 enum HEADER_BLOCK_STD_ATTR_TYPE 
00028 {   ROLE_NEXT=1, ROLE_NONE=2, 
00029     ROLE_ULTIMATE_RECEIVER=3, 
00030     ACTOR=4, MUST_UNDERSTAND_TRUE= 5, 
00031     MUST_UNDERSTAND_FALSE=6
00032 };
00033 
00034 
00046 /*
00047  * Revision 1.1  2004/05/26 samisa
00048  * Added copy constructor and clone
00049  */
00050 
00051 /*
00052  * Revision 1.2  2004/06/13 roshan
00053  * Added doxygen comments to help autobuild API docs
00054  */
00055 
00056 /*
00057  * Revision 1.12  2004/06/13 susantha
00058  * Added support for writing C web services and handlers
00059  */
00060 
00061 typedef struct {
00062         const BasicNode* (AXISCALL* getFirstChild)(void* pObj);
00063         /*add all other API functions here*/
00064 } HeaderBlockFunctions;
00065 
00066 #ifdef __cplusplus
00067 
00068 class IHeaderBlock
00069 {
00070 public:
00071     virtual const BasicNode* getFirstChild() =0;
00077     virtual int getNoOfChildren() =0;
00078 
00106     virtual BasicNode* createChild(NODE_TYPE eNODE_TYPE,  
00107         AxisChar *pachLocalName, AxisChar *pachPrefix, AxisChar *pachUri, 
00108         AxisChar* pachValue) = 0;
00109 
00131     virtual BasicNode* createImmediateChild(NODE_TYPE eNODE_TYPE, 
00132         AxisChar *pachLocalName, AxisChar *pachPrefix, AxisChar *pachUri, 
00133         AxisChar* pachValue) = 0;
00134 
00164     virtual Attribute* createStdAttribute(HEADER_BLOCK_STD_ATTR_TYPE 
00165         eStdAttrType, SOAP_VERSION eSOAP_VERSION) =0;
00166 
00177     virtual Attribute* createAttribute(const AxisChar* localname, 
00178         const AxisChar* prefix, 
00179         const AxisChar* uri, const AxisChar* value) = 0;
00180 
00190     virtual Attribute* createAttribute(const AxisChar *localname, 
00191         const AxisChar *prefix, const AxisChar *value) = 0;
00192 
00205     virtual BasicNode* createImmediateChild(NODE_TYPE eNODE_TYPE) = 0;
00206 
00221     virtual BasicNode* createChild(NODE_TYPE eNODE_TYPE)=0;
00222 
00230     virtual const BasicNode* getLastChild() = 0;
00231 
00240     virtual const BasicNode* getChild(int iChildPosition) = 0;
00241 
00248     virtual int addChild(BasicNode* pBasicNode)=0;
00249 
00255     virtual void setLocalName(const AxisChar* localname)=0;
00256 
00262     virtual void setUri(const AxisChar* uri)=0;
00263 
00264     /*
00265       * Sets the prefix of this Header Block.
00266       *
00267       * @param prefix The prefix to set in.
00268       */
00269         /* Commented by Susantha - 21/06/2004
00270          * The prefix should be decided by the Serializer at runtime
00271          *
00272     virtual void setPrefix(const AxisChar* prefix)=0;
00273         */
00274 #ifdef UNIT_TESTING_ON
00275 
00278     virtual int initializeForTesting() = 0;
00279 #endif
00280     
00281     IHeaderBlock(){/*empty body as there are no member variable*/};
00282 
00283     IHeaderBlock(const IHeaderBlock& rCopy){/*empty body as there are no member variable*/};
00284 
00290     virtual IHeaderBlock* clone() = 0;
00291 
00295     virtual ~IHeaderBlock() {};
00296 
00297         static HeaderBlockFunctions ms_VFtable;
00298         static bool bInitialized;
00299 };
00300 
00301 #endif
00302 
00303 typedef struct { 
00304         void* _object; /* this will be C++ Call Object */
00305         HeaderBlockFunctions* _functions; /* this is the static function table */
00306 } HeaderBlock_C;
00307 
00308 #ifndef __cplusplus
00309 typedef HeaderBlock_C HeaderBlock; 
00310 #endif
00311 
00312 #endif 
00313 

Generated on Fri Jul 9 13:18:29 2004 for AxisC++ by doxygen1.2.18