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 394807 2006-04-17 23:15:38Z blautenb $
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,         
00116         RevokeRequest,          
00117         RevokeResult,           
00118         RecoverRequest,         
00119         RecoverResult,          
00120         ReissueRequest,         
00121         ReissueResult           
00123     };
00124 
00125     virtual ~XKMSMessageAbstractType() {};
00126 
00129 
00130     virtual messageType getMessageType(void) = 0;
00131 
00134 
00141     virtual bool isSigned(void) const = 0;
00142 
00153     virtual DSIGSignature * getSignature(void) const = 0;
00154 
00155     /*
00156      * \brief Obtain the base Element for this structure
00157      *
00158      * @returns the Element node at the head of the DOM structure
00159      */
00160 
00161     virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMElement * getElement(void) const = 0;
00162 
00173     virtual const XMLCh * getId(void) const = 0;
00174 
00186     virtual const XMLCh * getService(void) const = 0;
00187 
00198     virtual const XMLCh * getNonce(void) const = 0;
00199 
00201 
00204 
00218     virtual void setId(const XMLCh * id) = 0;
00219 
00230     virtual void setService(const XMLCh * service) = 0;
00231 
00243     virtual void setNonce(const XMLCh * uri) = 0;
00244 
00253     virtual DSIGSignature * addSignature(
00254         canonicalizationMethod cm = CANON_C14N_NOC,
00255         signatureMethod sm = SIGNATURE_DSA,
00256         hashMethod hm = HASH_SHA1) = 0;
00257 
00259 
00262 
00273     virtual int getOpaqueClientDataSize(void) = 0;
00274 
00275     /*
00276      * \brief Get the nth item in the OpaqueClientData list
00277      *
00278      * @param item The item to return
00279      * @returns the string of the nth item in the OpaqueClientData list.
00280      *
00281      */
00282 
00283     virtual const XMLCh * getOpaqueClientDataItemStr(int item) = 0;
00284 
00285     /*
00286      * \brief Append an item to the OpaqueClientData list
00287      *
00288      * @param item Base64 string to append to the list.  Will be
00289      * wrapped in a OpaqueData element.
00290      */
00291 
00292     virtual void appendOpaqueClientDataItem(const XMLCh * item) = 0;
00293 
00295 
00296 private:
00297 
00298     // Unimplemented
00299     XKMSMessageAbstractType(const XKMSMessageAbstractType &);
00300     XKMSMessageAbstractType & operator = (const XKMSMessageAbstractType &);
00301 
00302 };
00303 
00304 #endif /* XKMSMESSAGEABSTRACTTYPE_INCLUDE */

Generated on Sun Jan 28 19:37:23 2007 for XML-Security-C by  doxygen 1.4.2