1 //
2 // VMime library (http://www.vmime.org)
3 // Copyright (C) 2002-2013 Vincent Richard <vincent@vmime.org>
4 //
5 // This program is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU General Public License as
7 // published by the Free Software Foundation; either version 3 of
8 // the License, or (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 // General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License along
16 // with this program; if not, write to the Free Software Foundation, Inc.,
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 //
19 // Linking this library statically or dynamically with other modules is making
20 // a combined work based on this library.  Thus, the terms and conditions of
21 // the GNU General Public License cover the whole combination.
22 //
23 
24 #include "vmime/context.hpp"
25 
26 
27 namespace vmime
28 {
29 
30 
context()31 context::context()
32 	: m_internationalizedEmail(false)
33 {
34 }
35 
36 
context(const context & ctx)37 context::context(const context& ctx)
38 	: object(),
39 	  m_internationalizedEmail(ctx.m_internationalizedEmail)
40 {
41 }
42 
43 
~context()44 context::~context()
45 {
46 }
47 
48 
getInternationalizedEmailSupport() const49 bool context::getInternationalizedEmailSupport() const
50 {
51 	return m_internationalizedEmail;
52 }
53 
54 
setInternationalizedEmailSupport(const bool support)55 void context::setInternationalizedEmailSupport(const bool support)
56 {
57 	m_internationalizedEmail = support;
58 }
59 
60 
getCharsetConversionOptions() const61 const charsetConverterOptions& context::getCharsetConversionOptions() const
62 {
63 	return m_charsetConvOptions;
64 }
65 
66 
setCharsetConversionOptions(const charsetConverterOptions & opts)67 void context::setCharsetConversionOptions(const charsetConverterOptions& opts)
68 {
69 	m_charsetConvOptions = opts;
70 }
71 
72 
operator =(const context & ctx)73 context& context::operator=(const context& ctx)
74 {
75 	copyFrom(ctx);
76 	return *this;
77 }
78 
79 
copyFrom(const context & ctx)80 void context::copyFrom(const context& ctx)
81 {
82 	m_internationalizedEmail = ctx.m_internationalizedEmail;
83 	m_charsetConvOptions = ctx.m_charsetConvOptions;
84 }
85 
86 
87 } // vmime
88