Main Page   Class Hierarchy   Compound List   File List   Compound 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 #include "Attribute.h"
00023 
00024 enum HEADER_BLOCK_STD_ATTR_TYPE 
00025 {   ROLE_NEXT=1, ROLE_NONE=2, 
00026     ROLE_ULTIMATE_RECEIVER=3, 
00027     ACTOR=4, MUST_UNDERSTAND_TRUE= 5, 
00028     MUST_UNDERSTAND_FALSE=6
00029 };
00030 
00031 
00043 /*
00044  * Revision 1.1  2004/05/26 samisa
00045  * Added copy constructor and clone
00046  */
00047 
00048 /*
00049  * Revision 1.2  2004/06/13 roshan
00050  * Added doxygen comments to help autobuild API docs
00051  */
00052 
00053 /*
00054  * Revision 1.12  2004/06/13 susantha
00055  * Added support for writing C web services and handlers
00056  */
00057 
00058 typedef struct {
00059         const BasicNode* (AXISCALL* getFirstChild)(void* pObj);
00060         /*add all other API functions here*/
00061 } HeaderBlockFunctions;
00062 
00063 #ifdef __cplusplus
00064 
00065 class IHeaderBlock
00066 {
00067 public:
00068     virtual const BasicNode* getFirstChild() =0;
00074     virtual int getNoOfChildren() =0;
00075 
00103     virtual BasicNode* createChild(NODE_TYPE eNODE_TYPE,  
00104         AxisChar *pachLocalName, AxisChar *pachPrefix, AxisChar *pachUri, 
00105         AxisChar* pachValue) = 0;
00106 
00128     virtual BasicNode* createImmediateChild(NODE_TYPE eNODE_TYPE, 
00129         AxisChar *pachLocalName, AxisChar *pachPrefix, AxisChar *pachUri, 
00130         AxisChar* pachValue) = 0;
00131 
00161     virtual Attribute* createStdAttribute(HEADER_BLOCK_STD_ATTR_TYPE 
00162         eStdAttrType, SOAP_VERSION eSOAP_VERSION) =0;
00163 
00174     virtual Attribute* createAttribute(const AxisChar* localname, 
00175         const AxisChar* prefix, 
00176         const AxisChar* uri, const AxisChar* value) = 0;
00177 
00187     virtual Attribute* createAttribute(const AxisChar *localname, 
00188         const AxisChar *prefix, const AxisChar *value) = 0;
00189 
00202     virtual BasicNode* createImmediateChild(NODE_TYPE eNODE_TYPE) = 0;
00203 
00218     virtual BasicNode* createChild(NODE_TYPE eNODE_TYPE)=0;
00219 
00227     virtual const BasicNode* getLastChild() = 0;
00228 
00237     virtual const BasicNode* getChild(int iChildPosition) = 0;
00238 
00245     virtual int addChild(BasicNode* pBasicNode)=0;
00246 
00252     virtual void setLocalName(const AxisChar* localname)=0;
00253 
00259     virtual void setUri(const AxisChar* uri)=0;
00260 
00266     virtual void setPrefix(const AxisChar* prefix)=0;
00267 #ifdef UNIT_TESTING_ON
00268 
00271     virtual int initializeForTesting() = 0;
00272 #endif
00273     
00274     IHeaderBlock(){/*empty body as there are no member variable*/};
00275 
00276     IHeaderBlock(const IHeaderBlock& rCopy){/*empty body as there are no member variable*/};
00277 
00283     virtual IHeaderBlock* clone() = 0;
00284 
00288     virtual ~IHeaderBlock() {};
00289 
00290         static HeaderBlockFunctions ms_VFtable;
00291         static bool bInitialized;
00292 };
00293 
00294 #endif
00295 
00296 typedef struct { 
00297         void* _object; /* this will be C++ Call Object */
00298         HeaderBlockFunctions* _functions; /* this is the static function table */
00299 } HeaderBlock_C;
00300 
00301 #ifndef __cplusplus
00302 typedef HeaderBlock_C HeaderBlock; 
00303 #endif
00304 
00305 #endif 
00306 

Generated on Tue Jun 15 19:13:23 2004 for axiscpp by doxygen1.2.18