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

IHeaderBlock.hpp

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.hpp"
00021 #include "SoapEnvVersions.hpp"
00022 #include <axis/IAttribute.hpp>
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 AXIS_CPP_NAMESPACE_START
00058 
00059 class IHeaderBlock
00060 {
00061 public:
00069     virtual int addNamespaceDecl(IAttribute *pAttribute)=0;
00070 
00079     virtual IAttribute* createNamespaceDecl(const AxisChar *prefix, 
00080             const AxisChar *uri)=0; 
00081 
00082     virtual const BasicNode* getFirstChild() =0;
00088     virtual int getNoOfChildren() =0;
00089 
00117     virtual BasicNode* createChild(NODE_TYPE eNODE_TYPE,  
00118         AxisChar *pachLocalName, AxisChar *pachPrefix, AxisChar *pachUri, 
00119         AxisChar* pachValue) = 0;
00120 
00142     virtual BasicNode* createImmediateChild(NODE_TYPE eNODE_TYPE, 
00143         AxisChar *pachLocalName, AxisChar *pachPrefix, AxisChar *pachUri, 
00144         AxisChar* pachValue) = 0;
00145 
00175     virtual IAttribute* createStdAttribute(HEADER_BLOCK_STD_ATTR_TYPE 
00176         eStdAttrType, SOAP_VERSION eSOAP_VERSION) =0;
00177 
00188     virtual IAttribute* createAttribute(const AxisChar* localname, 
00189         const AxisChar* prefix, 
00190         const AxisChar* uri, const AxisChar* value) = 0;
00191 
00201     virtual IAttribute* createAttribute(const AxisChar *localname, 
00202         const AxisChar *prefix, const AxisChar *value) = 0;
00211      virtual const AxisChar* getAttributeValue(const AxisChar* localname,
00212          const AxisChar* prefix) = 0;
00213  
00214 
00227     virtual BasicNode* createImmediateChild(NODE_TYPE eNODE_TYPE) = 0;
00228 
00243     virtual BasicNode* createChild(NODE_TYPE eNODE_TYPE)=0;
00244 
00252     virtual const BasicNode* getLastChild() = 0;
00253 
00262     virtual const BasicNode* getChild(int iChildPosition) = 0;
00263 
00270     virtual int addChild(BasicNode* pBasicNode)=0;
00271 
00277     virtual void setLocalName(const AxisChar* localname)=0;
00278     
00283     virtual const AxisChar * getLocalName()=0;
00284 
00291     virtual void setUri(const AxisChar* uri)=0;
00292 
00293         /* 
00294          * Commented by Susantha - 21/06/2004
00295          * The prefix should be decided by the Serializer at runtime
00296          * 
00297          * Uncommented by Mark Whitlock - 24/8/04 after discussion 
00298          * on the mailing list agreed to add back in this method.
00299          * Jira issue AXISCPP-135
00300          */
00306     virtual void setPrefix(const AxisChar* prefix)=0;
00307 
00308 #ifdef UNIT_TESTING_ON
00309 
00312     virtual int initializeForTesting() = 0;
00313 #endif
00314     
00315     IHeaderBlock(){/*empty body as there are no member variable*/};
00316 
00317     IHeaderBlock(const IHeaderBlock& rCopy){/*empty body as there are no member variable*/};
00318 
00324     virtual IHeaderBlock* clone() = 0;
00325 
00329     virtual ~IHeaderBlock() {};
00330 };
00331 
00332 AXIS_CPP_NAMESPACE_END
00333 
00334 #endif 
00335 

Generated on Fri Dec 3 18:43:42 2004 for AxisC++ by doxygen1.2.18