|
reSIProcate/stack
9694
|
00001 #if !defined(RESIP_PKCS7CONTENTS_HXX) 00002 #define RESIP_PKCS7CONTENTS_HXX 00003 00004 #include "resip/stack/Contents.hxx" 00005 #include "rutil/Data.hxx" 00006 00007 namespace resip 00008 { 00009 00014 class Pkcs7Contents : public Contents 00015 { 00016 public: 00017 static const Pkcs7Contents Empty; 00018 00019 Pkcs7Contents(); 00020 Pkcs7Contents(const Data& text); 00021 Pkcs7Contents(const HeaderFieldValue& hfv, const Mime& contentType); 00022 Pkcs7Contents(const Data& data, const Mime& contentType); 00023 Pkcs7Contents(const Pkcs7Contents& rhs); 00024 virtual ~Pkcs7Contents(); 00025 Pkcs7Contents& operator=(const Pkcs7Contents& rhs); 00026 00030 virtual Contents* clone() const; 00031 00032 static const Mime& getStaticType() ; 00033 00034 virtual EncodeStream& encodeParsed(EncodeStream& str) const; 00035 virtual void parse(ParseBuffer& pb); 00036 00037 //Data& text() {checkParsed(); return mText;} 00038 00039 static bool init(); 00040 00041 private: 00042 Data mText; 00043 }; 00044 00045 static bool invokePkcs7ContentsInit = Pkcs7Contents::init(); 00046 00051 class Pkcs7SignedContents : public Pkcs7Contents 00052 { 00053 public: 00054 static const Pkcs7SignedContents Empty; 00055 00056 Pkcs7SignedContents(); 00057 Pkcs7SignedContents(const Data& text); 00058 Pkcs7SignedContents(const HeaderFieldValue& hfv, const Mime& contentType); 00059 Pkcs7SignedContents(const Data& data, const Mime& contentType); 00060 Pkcs7SignedContents(const Pkcs7SignedContents& rhs); 00061 00062 virtual ~Pkcs7SignedContents(); 00063 00064 Pkcs7SignedContents& operator=(const Pkcs7SignedContents& rhs); 00065 00066 static const Mime& getStaticType() ; 00067 00071 virtual Contents* clone() const; 00072 00073 static bool init(); 00074 }; 00075 00076 static bool invokePkcs7SignedContentsInit = Pkcs7SignedContents::init(); 00077 00078 } 00079 00080 #endif 00081 00082 /* ==================================================================== 00083 * The Vovida Software License, Version 1.0 00084 * 00085 * Copyright (c) 2000 Vovida Networks, Inc. All rights reserved. 00086 * 00087 * Redistribution and use in source and binary forms, with or without 00088 * modification, are permitted provided that the following conditions 00089 * are met: 00090 * 00091 * 1. Redistributions of source code must retain the above copyright 00092 * notice, this list of conditions and the following disclaimer. 00093 * 00094 * 2. Redistributions in binary form must reproduce the above copyright 00095 * notice, this list of conditions and the following disclaimer in 00096 * the documentation and/or other materials provided with the 00097 * distribution. 00098 * 00099 * 3. The names "VOCAL", "Vovida Open Communication Application Library", 00100 * and "Vovida Open Communication Application Library (VOCAL)" must 00101 * not be used to endorse or promote products derived from this 00102 * software without prior written permission. For written 00103 * permission, please contact vocal@vovida.org. 00104 * 00105 * 4. Products derived from this software may not be called "VOCAL", nor 00106 * may "VOCAL" appear in their name, without prior written 00107 * permission of Vovida Networks, Inc. 00108 * 00109 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED 00110 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 00111 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND 00112 * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA 00113 * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES 00114 * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL, 00115 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 00116 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 00117 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 00118 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00119 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 00120 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 00121 * DAMAGE. 00122 * 00123 * ==================================================================== 00124 * 00125 * This software consists of voluntary contributions made by Vovida 00126 * Networks, Inc. and many individuals on behalf of Vovida Networks, 00127 * Inc. For more information on Vovida Networks, Inc., please see 00128 * <http://www.vovida.org/>. 00129 * 00130 */
1.7.5.1