2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
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 FSclPhoneNumberContact.cpp
18 * @brief This is the implementation for PhoneNumberContact class.
20 * This file contains definitions of @e PhoneNumberContact class.
24 #include <FBaseSysLog.h>
25 #include <FSclPhoneNumberContact.h>
26 #include "FScl_PhoneNumberContactImpl.h"
28 using namespace Tizen::Base;
30 namespace Tizen { namespace Social
33 PhoneNumberContact::PhoneNumberContact(void)
35 __pPhoneNumberContactImpl = new (std::nothrow) _PhoneNumberContactImpl();
36 SysTryReturnVoidResult(NID_SCL, __pPhoneNumberContactImpl != null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
39 PhoneNumberContact::PhoneNumberContact(const PhoneNumberContact& rhs)
41 __pPhoneNumberContactImpl = new (std::nothrow) _PhoneNumberContactImpl(*rhs.__pPhoneNumberContactImpl);
42 SysTryReturnVoidResult(NID_SCL, __pPhoneNumberContactImpl != null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
45 PhoneNumberContact::~PhoneNumberContact(void)
47 delete __pPhoneNumberContactImpl;
51 PhoneNumberContact::operator =(const PhoneNumberContact& rhs)
58 *__pPhoneNumberContactImpl = *rhs.__pPhoneNumberContactImpl;
64 PhoneNumberContact::Equals(const Object& obj) const
66 const PhoneNumberContact* pPhoneNumberContact = dynamic_cast<const PhoneNumberContact*>(&obj);
68 if (pPhoneNumberContact == null)
73 return *__pPhoneNumberContactImpl == *pPhoneNumberContact->__pPhoneNumberContactImpl;
77 PhoneNumberContact::GetHashCode(void) const
79 return __pPhoneNumberContactImpl->GetHashCode();
83 PhoneNumberContact::GetPersonId(void) const
85 return __pPhoneNumberContactImpl->GetPersonId();
89 PhoneNumberContact::GetAddressbookId(void) const
91 return __pPhoneNumberContactImpl->GetAddressbookId();
95 PhoneNumberContact::GetContactId(void) const
97 return __pPhoneNumberContactImpl->GetContactId();
101 PhoneNumberContact::GetDisplayName(void) const
103 return __pPhoneNumberContactImpl->GetDisplayName();
107 PhoneNumberContact::GetRingtonePath(void) const
109 return __pPhoneNumberContactImpl->GetRingtonePath();
113 PhoneNumberContact::GetThumbnailPath(void) const
115 return __pPhoneNumberContactImpl->GetThumbnailPath();
119 PhoneNumberContact::GetPhoneNumber(void) const
121 return __pPhoneNumberContactImpl->GetPhoneNumber();