1 /** 2 * Licensed to the Apache Software Foundation (ASF) under one 3 * or more contributor license agreements. See the NOTICE file 4 * distributed with this work for additional information 5 * regarding copyright ownership. The ASF licenses this file 6 * to you under the Apache License, Version 2.0 (the 7 * "License"); you may not use this file except in compliance 8 * with the License. You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, 13 * software distributed under the License is distributed on an 14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 * KIND, either express or implied. See the License for the 16 * specific language governing permissions and limitations 17 * under the License. 18 */ 19 20 /* 21 * XSEC 22 * 23 * XKMSReissueResult := Interface for RegisterResult Messages 24 * 25 * $Id$ 26 * 27 */ 28 29 #ifndef XKMSREISSUERESULT_INCLUDE 30 #define XKMSREISSUERESULT_INCLUDE 31 32 // XSEC Includes 33 34 #include <xsec/framework/XSECDefs.hpp> 35 36 #ifdef XSEC_XKMS_ENABLED 37 38 #include <xsec/xkms/XKMSResultType.hpp> 39 #include <xsec/xkms/XKMSStatus.hpp> 40 41 class XKMSKeyBinding; 42 43 /** 44 * @ingroup xkms 45 */ 46 47 /** 48 * @brief Interface definition for the ReissueResult elements 49 * 50 * The \<ReissueResult\> is used by the X-KRSS service to response to 51 * a user request to reissue a key from the service - e.g. for a new 52 * cert 53 * 54 * The schema definition for ReissueResult is as follows : 55 * 56 * \verbatim 57 <!-- ReissueResult --> 58 <element name="ReissueResult" type="xkms:ReissueResultType"/> 59 <complexType name="ReissueResultType"> 60 <complexContent> 61 <extension base="xkms:ResultType"> 62 <sequence> 63 <element ref="xkms:KeyBinding" minOccurs="0" 64 maxOccurs="unbounded"/> 65 </sequence> 66 </extension> 67 </complexContent> 68 </complexType> 69 <!-- /ReissueResult --> 70 \endverbatim 71 */ 72 73 class XSEC_EXPORT XKMSReissueResult : public XKMSResultType { 74 75 /** @name Constructors and Destructors */ 76 //@{ 77 78 protected: 79 80 XKMSReissueResult() {}; 81 82 public: 83 84 virtual ~XKMSReissueResult() {}; 85 86 /** @name Getter Interface Methods */ 87 //@{ 88 89 /** 90 * \brief Return the element at the base of the message 91 */ 92 93 virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMElement * getElement(void) const = 0; 94 95 //@} 96 97 /** @name KeyBinding handling */ 98 //@{ 99 100 /** 101 * \brief Find number of KeyBinding elements 102 * 103 * @returns the number of KeyBinding items within the ReissueResult 104 */ 105 106 virtual int getKeyBindingSize(void) const = 0; 107 108 /* 109 * \brief Obtain an KeyBinding item 110 * 111 * @param item Index of the item to return (0 = first element) 112 * @returns the KeyBinding referenced by "item" 113 */ 114 115 virtual XKMSKeyBinding * getKeyBindingItem(int item) const = 0; 116 117 /* 118 * \brief Append a new KeyBinding element 119 * 120 * Allows callers to append a new KeyBinding item. 121 * The item is initially empty of KeyInfo elements - these must be added 122 * by the caller. 123 * 124 * @param status The status (Valid, Invalid or Indeterminate) of this 125 * key 126 * @returns the newly created KeyBinding object (already inserted 127 * in the ReissueResult 128 */ 129 130 virtual XKMSKeyBinding * appendKeyBindingItem(XKMSStatus::StatusValue status) = 0; 131 132 //@} 133 134 private: 135 136 // Unimplemented 137 XKMSReissueResult(const XKMSReissueResult &); 138 XKMSReissueResult & operator = (const XKMSReissueResult &); 139 140 }; 141 142 #endif /* XSEC_XKMS_ENABLED */ 143 144 #endif /* XKMSREISSUERESULT_INCLUDE */ 145