2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 * @file ContactEmail.cpp
18 * @author Lukasz Marek (l.marek@samsung.com)
22 #include "ContactEmail.h"
24 namespace WrtDeviceApis {
28 ContactEmail::ContactEmail()
32 ContactEmail::~ContactEmail()
36 std::string ContactEmail::getEmail() const
41 void ContactEmail::setEmail(const std::string &value)
46 std::vector<ContactEmail::ContactEmailType> ContactEmail::getTypes() const
51 void ContactEmail::addType(ContactEmailType value)
53 m_types.push_back(value);
56 void ContactEmail::setTypes(const std::vector<ContactEmailType> value)
61 bool ContactEmail::isTypeOf(ContactEmailType value) const
63 return std::find(m_types.begin(), m_types.end(), value) != m_types.end();
66 ContactEmail::ContactEmailType ContactEmail::getTypeFilter() const
68 return m_types.size() == 0 ? CONTACT_EMAIL_TYPE_PREF : m_types[0];
71 void ContactEmail::setTypeFilter(ContactEmailType value)
74 m_types.push_back(value);
77 ContactEmailPtr ContactEmail::clone() const
79 return ContactEmailPtr(new ContactEmail(*this));