Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

XKMSMessageAbstractType.hpp

Go to the documentation of this file.
00001 /*
00002  * Copyright 2004-2005 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 /*
00018  * XSEC
00019  *
00020  * XKMSMessageAbstractType := Interface for base schema of XKMS messages
00021  *
00022  * $Id: XKMSMessageAbstractType.hpp,v 1.11 2005/06/04 11:30:26 blautenb Exp $
00023  *
00024  */
00025 
00026 #ifndef XKMSMESSAGEABSTRACTTYPE_INCLUDE
00027 #define XKMSMESSAGEABSTRACTTYPE_INCLUDE
00028 
00029 // XSEC Includes
00030 
00031 #include <xsec/framework/XSECDefs.hpp>
00032 #include <xsec/dsig/DSIGConstants.hpp>
00033 
00034 class DSIGSignature;
00035 
00036 XSEC_DECLARE_XERCES_CLASS(DOMElement);
00037 
00084 class XKMSMessageAbstractType {
00085 
00088 
00089 protected:
00090 
00091     XKMSMessageAbstractType() {};
00092 
00093 public:
00094 
00095     enum messageType {
00096 
00097         None,                   
00099         /* X-KISS messages */
00100 
00101         CompoundRequest,        
00102         CompoundResult,         
00103         LocateRequest,          
00104         LocateResult,           
00105         ValidateRequest,        
00106         ValidateResult,         
00107         PendingRequest,         
00108         StatusRequest,          
00109         StatusResult,           
00110         Result,                 
00112         /* X-KRSS messages */
00113 
00114         RegisterRequest,        
00115         RegisterResult          
00117     };
00118 
00119     virtual ~XKMSMessageAbstractType() {};
00120 
00123 
00124     virtual messageType getMessageType(void) = 0;
00125 
00128 
00135     virtual bool isSigned(void) const = 0;
00136 
00147     virtual DSIGSignature * getSignature(void) const = 0;
00148 
00149     /*
00150      * \brief Obtain the base Element for this structure
00151      *
00152      * @returns the Element node at the head of the DOM structure
00153      */
00154 
00155     virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMElement * getElement(void) const = 0;
00156 
00167     virtual const XMLCh * getId(void) const = 0;
00168 
00180     virtual const XMLCh * getService(void) const = 0;
00181 
00192     virtual const XMLCh * getNonce(void) const = 0;
00193 
00195 
00198 
00212     virtual void setId(const XMLCh * id) = 0;
00213 
00224     virtual void setService(const XMLCh * service) = 0;
00225 
00237     virtual void setNonce(const XMLCh * uri) = 0;
00238 
00247     virtual DSIGSignature * addSignature(
00248         canonicalizationMethod cm = CANON_C14N_NOC,
00249         signatureMethod sm = SIGNATURE_DSA,
00250         hashMethod hm = HASH_SHA1) = 0;
00251 
00253 
00256 
00267     virtual int getOpaqueClientDataSize(void) = 0;
00268 
00269     /*
00270      * \brief Get the nth item in the OpaqueClientData list
00271      *
00272      * @param item The item to return
00273      * @returns the string of the nth item in the OpaqueClientData list.
00274      *
00275      */
00276 
00277     virtual const XMLCh * getOpaqueClientDataItemStr(int item) = 0;
00278 
00279     /*
00280      * \brief Append an item to the OpaqueClientData list
00281      *
00282      * @param item Base64 string to append to the list.  Will be
00283      * wrapped in a OpaqueData element.
00284      */
00285 
00286     virtual void appendOpaqueClientDataItem(const XMLCh * item) = 0;
00287 
00289 
00290 private:
00291 
00292     // Unimplemented
00293     XKMSMessageAbstractType(const XKMSMessageAbstractType &);
00294     XKMSMessageAbstractType & operator = (const XKMSMessageAbstractType &);
00295 
00296 };
00297 
00298 #endif /* XKMSMESSAGEABSTRACTTYPE_INCLUDE */

Generated on Sun Jul 3 17:37:27 2005 for XML-Security-C by  doxygen 1.4.2