84bb2c38cd07ccbafed83e7fd1e67098e9942bde
[framework/web/wrt-plugins-common.git] / src / modules / API / Messaging / CcRecipient.cpp
1 /*
2  * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  *    Licensed under the Apache License, Version 2.0 (the "License");
5  *    you may not use this file except in compliance with the License.
6  *    You may obtain a copy of the License at
7  *
8  *        http://www.apache.org/licenses/LICENSE-2.0
9  *
10  *    Unless required by applicable law or agreed to in writing, software
11  *    distributed under the License is distributed on an "AS IS" BASIS,
12  *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  *    See the License for the specific language governing permissions and
14  *    limitations under the License.
15  */
16 /**
17  *
18  *
19  * @file       CcRecipient.cpp
20  * @author     Pawel Misiak (p.misiak@samsung.com)
21  * @version    0.1
22  * @brief
23  */
24 #include "CcRecipient.h"
25
26 using namespace std;
27
28 namespace WrtDeviceApis {
29 namespace Messaging{
30 namespace Api {
31 CcRecipient::CcRecipient() :
32     m_ccRecipients(new Recipients())
33 {
34 }
35
36 CcRecipient::~CcRecipient()
37 {
38 }
39
40 void CcRecipient::setCcValidity(bool state)
41 {
42     m_ccRecipients->setValid(state);
43 }
44
45 bool CcRecipient::getCcValidity(void) const
46 {
47     return m_ccRecipients->isValid();
48 }
49
50 Recipients CcRecipient::getCcRecipients() const
51 {
52     return *m_ccRecipients;
53 }
54
55 RecipientsPtr CcRecipient::getCcRecipientsPtr() const
56 {
57     return m_ccRecipients;
58 }
59
60 void CcRecipient::appendCcRecipients(const std::string & value)
61 {
62     m_ccRecipients->appendRecipient(value);
63 }
64
65 void CcRecipient::appendCcRecipients(const Recipients& value)
66 {
67     *m_ccRecipients += value;
68 }
69
70 void CcRecipient::removeCcRecipients(const Recipients& value)
71 {
72     *m_ccRecipients -= value;
73 }
74
75 void CcRecipient::setCcRecipients(const Recipients& value)
76 {
77     *m_ccRecipients = value;
78 }
79
80 }
81 }
82 }