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.
18 * @file ContactRef.cpp
19 * @author Kisub Song (kisubs.song@samsung.com)
24 #include "ContactRef.h"
30 ContactRef::ContactRef() :
31 m_addressBookIdIsSet(false),
32 m_contactIdIsSet(false)
36 ContactRef::~ContactRef()
40 std::string ContactRef::getAddressBookId() const
42 return m_addressBookId;
45 void ContactRef::setAddressBookId(const std::string value)
47 m_addressBookId = value;
48 m_addressBookIdIsSet = true;
51 bool ContactRef::getAddressBookIdIsSet() const
53 return m_addressBookIdIsSet;
56 void ContactRef::setAddressBookId(const int value)
58 std::stringstream oss;
60 m_addressBookId = oss.str();
61 m_addressBookIdIsSet = true;
64 std::string ContactRef::getContactId() const
69 void ContactRef::setContactId(const std::string value)
72 m_contactIdIsSet = true;
75 bool ContactRef::getContactIdIsSet() const
77 return m_contactIdIsSet;
80 void ContactRef::setContactId(const int value)
82 std::stringstream oss;
84 m_contactId = oss.str();
85 m_contactIdIsSet = true;
88 void ContactRef::clear()
91 m_addressBookIdIsSet = false;
94 m_contactIdIsSet = false;
97 ContactRefPtr ContactRef::clone()
99 ContactRefPtr result(new ContactRef());
101 result->m_addressBookId = m_addressBookId;
102 result->m_addressBookIdIsSet = m_addressBookIdIsSet;
104 result->m_contactId = m_contactId;
105 result->m_contactIdIsSet = m_contactIdIsSet;