2 // Open Service Platform
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.
18 * @file FSclPhoneNumberContact.cpp
19 * @brief This is the implementation for PhoneNumberContact class.
21 * This file contains definitions of @e PhoneNumberContact class.
25 #include <FBaseSysLog.h>
26 #include <FSclPhoneNumberContact.h>
27 #include "FScl_PhoneNumberContactImpl.h"
29 using namespace Tizen::Base;
31 namespace Tizen { namespace Social
34 PhoneNumberContact::PhoneNumberContact(void)
36 __pPhoneNumberContactImpl = new (std::nothrow) _PhoneNumberContactImpl();
37 SysTryReturnVoidResult(NID_SCL, __pPhoneNumberContactImpl != null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
40 PhoneNumberContact::PhoneNumberContact(const PhoneNumberContact& rhs)
42 __pPhoneNumberContactImpl = new (std::nothrow) _PhoneNumberContactImpl(*rhs.__pPhoneNumberContactImpl);
43 SysTryReturnVoidResult(NID_SCL, __pPhoneNumberContactImpl != null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
46 PhoneNumberContact::~PhoneNumberContact(void)
48 delete __pPhoneNumberContactImpl;
52 PhoneNumberContact::operator =(const PhoneNumberContact& rhs)
59 *__pPhoneNumberContactImpl = *rhs.__pPhoneNumberContactImpl;
65 PhoneNumberContact::Equals(const Object& obj) const
67 const PhoneNumberContact* pPhoneNumberContact = dynamic_cast<const PhoneNumberContact*>(&obj);
69 if (pPhoneNumberContact == null)
74 return *__pPhoneNumberContactImpl == *pPhoneNumberContact->__pPhoneNumberContactImpl;
78 PhoneNumberContact::GetHashCode(void) const
80 return __pPhoneNumberContactImpl->GetHashCode();
84 PhoneNumberContact::GetPersonId(void) const
86 return __pPhoneNumberContactImpl->GetPersonId();
90 PhoneNumberContact::GetAddressbookId(void) const
92 return __pPhoneNumberContactImpl->GetAddressbookId();
96 PhoneNumberContact::GetContactId(void) const
98 return __pPhoneNumberContactImpl->GetContactId();
102 PhoneNumberContact::GetDisplayName(void) const
104 return __pPhoneNumberContactImpl->GetDisplayName();
108 PhoneNumberContact::GetRingtonePath(void) const
110 return __pPhoneNumberContactImpl->GetRingtonePath();
114 PhoneNumberContact::GetThumbnailPath(void) const
116 return __pPhoneNumberContactImpl->GetThumbnailPath();
120 PhoneNumberContact::GetPhoneNumber(void) const
122 return __pPhoneNumberContactImpl->GetPhoneNumber();