2 // Tizen Web Device API
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
19 * @file ContactRef.cpp
20 * @author Kisub Song (kisubs.song@samsung.com)
25 #include "ContactRef.h"
31 ContactRef::ContactRef() :
32 m_addressBookIdIsSet(false),
33 m_contactIdIsSet(false)
37 ContactRef::~ContactRef()
41 std::string ContactRef::getAddressBookId() const
43 return m_addressBookId;
46 void ContactRef::setAddressBookId(const std::string value)
48 m_addressBookId = value;
49 m_addressBookIdIsSet = true;
52 bool ContactRef::getAddressBookIdIsSet() const
54 return m_addressBookIdIsSet;
57 void ContactRef::setAddressBookId(const int value)
59 std::stringstream oss;
61 m_addressBookId = oss.str();
62 m_addressBookIdIsSet = true;
65 std::string ContactRef::getContactId() const
70 void ContactRef::setContactId(const std::string value)
73 m_contactIdIsSet = true;
76 bool ContactRef::getContactIdIsSet() const
78 return m_contactIdIsSet;
81 void ContactRef::setContactId(const int value)
83 std::stringstream oss;
85 m_contactId = oss.str();
86 m_contactIdIsSet = true;
89 void ContactRef::clear()
92 m_addressBookIdIsSet = false;
95 m_contactIdIsSet = false;
98 ContactRefPtr ContactRef::clone()
100 ContactRefPtr result(new ContactRef());
102 result->m_addressBookId = m_addressBookId;
103 result->m_addressBookIdIsSet = m_addressBookIdIsSet;
105 result->m_contactId = m_contactId;
106 result->m_contactIdIsSet = m_contactIdIsSet;