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/config.hpp"
25 
26 
27 #if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_MAILDIR
28 
29 
30 #include "vmime/net/maildir/maildirFolderStatus.hpp"
31 
32 
33 namespace vmime {
34 namespace net {
35 namespace maildir {
36 
37 
maildirFolderStatus()38 maildirFolderStatus::maildirFolderStatus()
39 	: m_count(0),
40 	  m_unseen(0)
41 {
42 }
43 
44 
maildirFolderStatus(const maildirFolderStatus & other)45 maildirFolderStatus::maildirFolderStatus(const maildirFolderStatus& other)
46 	: folderStatus(),
47 	  m_count(other.m_count),
48 	  m_unseen(other.m_unseen)
49 {
50 }
51 
52 
getMessageCount() const53 size_t maildirFolderStatus::getMessageCount() const
54 {
55 	return m_count;
56 }
57 
58 
getUnseenCount() const59 size_t maildirFolderStatus::getUnseenCount() const
60 {
61 	return m_unseen;
62 }
63 
64 
setMessageCount(const size_t count)65 void maildirFolderStatus::setMessageCount(const size_t count)
66 {
67 	m_count = count;
68 }
69 
70 
setUnseenCount(const size_t unseen)71 void maildirFolderStatus::setUnseenCount(const size_t unseen)
72 {
73 	m_unseen = unseen;
74 }
75 
76 
clone() const77 shared_ptr <folderStatus> maildirFolderStatus::clone() const
78 {
79 	return make_shared <maildirFolderStatus>(*this);
80 }
81 
82 
83 } // maildir
84 } // net
85 } // vmime
86 
87 
88 #endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_MAILDIR
89