/src/resiprocate/resip/stack/ContentsFactory.hxx
Line | Count | Source |
1 | | #ifndef RESIP_ContentsFactory |
2 | | #define RESIP_ContentsFactory |
3 | | |
4 | | #include "resip/stack/ContentsFactoryBase.hxx" |
5 | | |
6 | | namespace resip |
7 | | { |
8 | | |
9 | | class Contents; |
10 | | |
11 | | /** |
12 | | @internal |
13 | | */ |
14 | | template<class T> |
15 | | class ContentsFactory : public ContentsFactoryBase |
16 | | { |
17 | | public: |
18 | | ContentsFactory() |
19 | 36 | : ContentsFactoryBase(T::getStaticType()) |
20 | 36 | {}resip::ContentsFactory<resip::DtmfPayloadContents>::ContentsFactory() Line | Count | Source | 19 | 2 | : ContentsFactoryBase(T::getStaticType()) | 20 | 2 | {} |
resip::ContentsFactory<resip::CpimContents>::ContentsFactory() Line | Count | Source | 19 | 2 | : ContentsFactoryBase(T::getStaticType()) | 20 | 2 | {} |
resip::ContentsFactory<resip::DialogInfoContents>::ContentsFactory() Line | Count | Source | 19 | 2 | : ContentsFactoryBase(T::getStaticType()) | 20 | 2 | {} |
resip::ContentsFactory<resip::GenericPidfContents>::ContentsFactory() Line | Count | Source | 19 | 2 | : ContentsFactoryBase(T::getStaticType()) | 20 | 2 | {} |
resip::ContentsFactory<resip::MessageWaitingContents>::ContentsFactory() Line | Count | Source | 19 | 2 | : ContentsFactoryBase(T::getStaticType()) | 20 | 2 | {} |
resip::ContentsFactory<resip::MultipartMixedContents>::ContentsFactory() Line | Count | Source | 19 | 2 | : ContentsFactoryBase(T::getStaticType()) | 20 | 2 | {} |
resip::ContentsFactory<resip::OctetContents>::ContentsFactory() Line | Count | Source | 19 | 2 | : ContentsFactoryBase(T::getStaticType()) | 20 | 2 | {} |
resip::ContentsFactory<resip::Pkcs7Contents>::ContentsFactory() Line | Count | Source | 19 | 2 | : ContentsFactoryBase(T::getStaticType()) | 20 | 2 | {} |
resip::ContentsFactory<resip::Pkcs7SignedContents>::ContentsFactory() Line | Count | Source | 19 | 2 | : ContentsFactoryBase(T::getStaticType()) | 20 | 2 | {} |
resip::ContentsFactory<resip::Pkcs8Contents>::ContentsFactory() Line | Count | Source | 19 | 2 | : ContentsFactoryBase(T::getStaticType()) | 20 | 2 | {} |
resip::ContentsFactory<resip::PlainContents>::ContentsFactory() Line | Count | Source | 19 | 2 | : ContentsFactoryBase(T::getStaticType()) | 20 | 2 | {} |
resip::ContentsFactory<resip::Rlmi>::ContentsFactory() Line | Count | Source | 19 | 2 | : ContentsFactoryBase(T::getStaticType()) | 20 | 2 | {} |
resip::ContentsFactory<resip::SdpContents>::ContentsFactory() Line | Count | Source | 19 | 2 | : ContentsFactoryBase(T::getStaticType()) | 20 | 2 | {} |
resip::ContentsFactory<resip::SipFrag>::ContentsFactory() Line | Count | Source | 19 | 2 | : ContentsFactoryBase(T::getStaticType()) | 20 | 2 | {} |
resip::ContentsFactory<resip::TrickleIceContents>::ContentsFactory() Line | Count | Source | 19 | 2 | : ContentsFactoryBase(T::getStaticType()) | 20 | 2 | {} |
resip::ContentsFactory<resip::X509Contents>::ContentsFactory() Line | Count | Source | 19 | 2 | : ContentsFactoryBase(T::getStaticType()) | 20 | 2 | {} |
resip::ContentsFactory<resip::MultipartAlternativeContents>::ContentsFactory() Line | Count | Source | 19 | 2 | : ContentsFactoryBase(T::getStaticType()) | 20 | 2 | {} |
resip::ContentsFactory<resip::MultipartSignedContents>::ContentsFactory() Line | Count | Source | 19 | 2 | : ContentsFactoryBase(T::getStaticType()) | 20 | 2 | {} |
|
21 | | |
22 | | explicit ContentsFactory(const Mime& nonStandardType) |
23 | | : ContentsFactoryBase(nonStandardType) |
24 | | {} |
25 | | |
26 | | // pass Mime instance for parameters |
27 | | virtual Contents* create(const HeaderFieldValue& hfv, const Mime& contentType) const |
28 | 0 | { |
29 | 0 | return new T(hfv, contentType); |
30 | 0 | } Unexecuted instantiation: resip::ContentsFactory<resip::DtmfPayloadContents>::create(resip::HeaderFieldValue const&, resip::Mime const&) const Unexecuted instantiation: resip::ContentsFactory<resip::CpimContents>::create(resip::HeaderFieldValue const&, resip::Mime const&) const Unexecuted instantiation: resip::ContentsFactory<resip::DialogInfoContents>::create(resip::HeaderFieldValue const&, resip::Mime const&) const Unexecuted instantiation: resip::ContentsFactory<resip::GenericPidfContents>::create(resip::HeaderFieldValue const&, resip::Mime const&) const Unexecuted instantiation: resip::ContentsFactory<resip::MessageWaitingContents>::create(resip::HeaderFieldValue const&, resip::Mime const&) const Unexecuted instantiation: resip::ContentsFactory<resip::MultipartMixedContents>::create(resip::HeaderFieldValue const&, resip::Mime const&) const Unexecuted instantiation: resip::ContentsFactory<resip::OctetContents>::create(resip::HeaderFieldValue const&, resip::Mime const&) const Unexecuted instantiation: resip::ContentsFactory<resip::Pkcs7Contents>::create(resip::HeaderFieldValue const&, resip::Mime const&) const Unexecuted instantiation: resip::ContentsFactory<resip::Pkcs7SignedContents>::create(resip::HeaderFieldValue const&, resip::Mime const&) const Unexecuted instantiation: resip::ContentsFactory<resip::Pkcs8Contents>::create(resip::HeaderFieldValue const&, resip::Mime const&) const Unexecuted instantiation: resip::ContentsFactory<resip::PlainContents>::create(resip::HeaderFieldValue const&, resip::Mime const&) const Unexecuted instantiation: resip::ContentsFactory<resip::Rlmi>::create(resip::HeaderFieldValue const&, resip::Mime const&) const Unexecuted instantiation: resip::ContentsFactory<resip::SdpContents>::create(resip::HeaderFieldValue const&, resip::Mime const&) const Unexecuted instantiation: resip::ContentsFactory<resip::SipFrag>::create(resip::HeaderFieldValue const&, resip::Mime const&) const Unexecuted instantiation: resip::ContentsFactory<resip::TrickleIceContents>::create(resip::HeaderFieldValue const&, resip::Mime const&) const Unexecuted instantiation: resip::ContentsFactory<resip::X509Contents>::create(resip::HeaderFieldValue const&, resip::Mime const&) const Unexecuted instantiation: resip::ContentsFactory<resip::MultipartAlternativeContents>::create(resip::HeaderFieldValue const&, resip::Mime const&) const Unexecuted instantiation: resip::ContentsFactory<resip::MultipartSignedContents>::create(resip::HeaderFieldValue const&, resip::Mime const&) const |
31 | | |
32 | | virtual Contents* convert(Contents* c) const |
33 | 0 | { |
34 | 0 | return dynamic_cast<T*>(c); |
35 | 0 | } Unexecuted instantiation: resip::ContentsFactory<resip::DtmfPayloadContents>::convert(resip::Contents*) const Unexecuted instantiation: resip::ContentsFactory<resip::CpimContents>::convert(resip::Contents*) const Unexecuted instantiation: resip::ContentsFactory<resip::DialogInfoContents>::convert(resip::Contents*) const Unexecuted instantiation: resip::ContentsFactory<resip::GenericPidfContents>::convert(resip::Contents*) const Unexecuted instantiation: resip::ContentsFactory<resip::MessageWaitingContents>::convert(resip::Contents*) const Unexecuted instantiation: resip::ContentsFactory<resip::MultipartMixedContents>::convert(resip::Contents*) const Unexecuted instantiation: resip::ContentsFactory<resip::OctetContents>::convert(resip::Contents*) const Unexecuted instantiation: resip::ContentsFactory<resip::Pkcs7Contents>::convert(resip::Contents*) const Unexecuted instantiation: resip::ContentsFactory<resip::Pkcs7SignedContents>::convert(resip::Contents*) const Unexecuted instantiation: resip::ContentsFactory<resip::Pkcs8Contents>::convert(resip::Contents*) const Unexecuted instantiation: resip::ContentsFactory<resip::PlainContents>::convert(resip::Contents*) const Unexecuted instantiation: resip::ContentsFactory<resip::Rlmi>::convert(resip::Contents*) const Unexecuted instantiation: resip::ContentsFactory<resip::SdpContents>::convert(resip::Contents*) const Unexecuted instantiation: resip::ContentsFactory<resip::SipFrag>::convert(resip::Contents*) const Unexecuted instantiation: resip::ContentsFactory<resip::TrickleIceContents>::convert(resip::Contents*) const Unexecuted instantiation: resip::ContentsFactory<resip::X509Contents>::convert(resip::Contents*) const Unexecuted instantiation: resip::ContentsFactory<resip::MultipartAlternativeContents>::convert(resip::Contents*) const Unexecuted instantiation: resip::ContentsFactory<resip::MultipartSignedContents>::convert(resip::Contents*) const |
36 | | }; |
37 | | |
38 | | } |
39 | | |
40 | | #endif |
41 | | |
42 | | /* ==================================================================== |
43 | | * The Vovida Software License, Version 1.0 |
44 | | * |
45 | | * Copyright (c) 2000-2005 |
46 | | * |
47 | | * Redistribution and use in source and binary forms, with or without |
48 | | * modification, are permitted provided that the following conditions |
49 | | * are met: |
50 | | * |
51 | | * 1. Redistributions of source code must retain the above copyright |
52 | | * notice, this list of conditions and the following disclaimer. |
53 | | * |
54 | | * 2. Redistributions in binary form must reproduce the above copyright |
55 | | * notice, this list of conditions and the following disclaimer in |
56 | | * the documentation and/or other materials provided with the |
57 | | * distribution. |
58 | | * |
59 | | * 3. The names "VOCAL", "Vovida Open Communication Application Library", |
60 | | * and "Vovida Open Communication Application Library (VOCAL)" must |
61 | | * not be used to endorse or promote products derived from this |
62 | | * software without prior written permission. For written |
63 | | * permission, please contact vocal@vovida.org. |
64 | | * |
65 | | * 4. Products derived from this software may not be called "VOCAL", nor |
66 | | * may "VOCAL" appear in their name, without prior written |
67 | | * permission of Vovida Networks, Inc. |
68 | | * |
69 | | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED |
70 | | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
71 | | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND |
72 | | * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA |
73 | | * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES |
74 | | * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL, |
75 | | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
76 | | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
77 | | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY |
78 | | * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
79 | | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE |
80 | | * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH |
81 | | * DAMAGE. |
82 | | * |
83 | | * ==================================================================== |
84 | | * |
85 | | * This software consists of voluntary contributions made by Vovida |
86 | | * Networks, Inc. and many individuals on behalf of Vovida Networks, |
87 | | * Inc. For more information on Vovida Networks, Inc., please see |
88 | | * <http://www.vovida.org/>. |
89 | | * |
90 | | */ |