/[resiprocate]/main/sip/resiprocate/Mime.hxx
ViewVC logotype

Contents of /main/sip/resiprocate/Mime.hxx

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4599 - (show annotations) (download)
Wed May 11 23:10:19 2005 UTC (14 years, 7 months ago) by derek
File size: 3807 byte(s)
set svn:eol-style to LF
1 #if !defined(RESIP_MIME_HXX)
2 #define RESIP_MIME_HXX
3
4 #include <iosfwd>
5 #include "resiprocate/os/Data.hxx"
6 #include "resiprocate/os/HashMap.hxx"
7 #include "resiprocate/ParserCategory.hxx"
8 #include "resiprocate/ParserContainer.hxx"
9
10 namespace resip
11 {
12
13 class HeaderFieldValue;
14
15 //====================
16 // Mime:
17 //====================
18 class Mime : public ParserCategory
19 {
20 public:
21 enum {commaHandling = CommasAllowedOutputCommas};
22
23 Mime();
24 Mime(const Data& type, const Data& subType);
25 Mime(HeaderFieldValue* hfv, Headers::Type type);
26 Mime(const Mime&);
27 Mime& operator=(const Mime&);
28 bool operator<(const Mime& rhs) const;
29 bool operator==(const Mime& rhs) const;
30 bool operator!=(const Mime& rhs) const;
31
32 Data& type() const;
33 Data& subType() const;
34
35 virtual void parse(ParseBuffer& pb);
36 virtual ParserCategory* clone() const;
37 virtual std::ostream& encodeParsed(std::ostream& str) const;
38 private:
39 mutable Data mType;
40 mutable Data mSubType;
41 };
42 typedef ParserContainer<Mime> Mimes;
43
44 }
45
46 #if defined(__INTEL_COMPILER )
47 namespace std
48 {
49 size_t hash_value(const resip::Mime& data);
50 }
51
52 #elif defined(HASH_MAP_NAMESPACE) //#elif ( (__GNUC__ == 3) && (__GNUC_MINOR__ >= 1) )
53 namespace HASH_MAP_NAMESPACE
54 {
55
56 template<>
57 struct hash<resip::Mime>
58 {
59 size_t operator()(const resip::Mime& data) const;
60 };
61
62 }
63 #endif // HASHMAP
64
65 #endif
66
67 /* ====================================================================
68 * The Vovida Software License, Version 1.0
69 *
70 * Copyright (c) 2000 Vovida Networks, Inc. All rights reserved.
71 *
72 * Redistribution and use in source and binary forms, with or without
73 * modification, are permitted provided that the following conditions
74 * are met:
75 *
76 * 1. Redistributions of source code must retain the above copyright
77 * notice, this list of conditions and the following disclaimer.
78 *
79 * 2. Redistributions in binary form must reproduce the above copyright
80 * notice, this list of conditions and the following disclaimer in
81 * the documentation and/or other materials provided with the
82 * distribution.
83 *
84 * 3. The names "VOCAL", "Vovida Open Communication Application Library",
85 * and "Vovida Open Communication Application Library (VOCAL)" must
86 * not be used to endorse or promote products derived from this
87 * software without prior written permission. For written
88 * permission, please contact vocal@vovida.org.
89 *
90 * 4. Products derived from this software may not be called "VOCAL", nor
91 * may "VOCAL" appear in their name, without prior written
92 * permission of Vovida Networks, Inc.
93 *
94 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
95 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
96 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
97 * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA
98 * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
99 * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
100 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
101 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
102 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
103 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
104 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
105 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
106 * DAMAGE.
107 *
108 * ====================================================================
109 *
110 * This software consists of voluntary contributions made by Vovida
111 * Networks, Inc. and many individuals on behalf of Vovida Networks,
112 * Inc. For more information on Vovida Networks, Inc., please see
113 * <http://www.vovida.org/>.
114 *
115 */

Properties

Name Value
svn:eol-style LF

webmaster AT resiprocate DOT org
ViewVC Help
Powered by ViewVC 1.1.27