2 // Copyright (c) 2013 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 FSclAccountProvider.cpp
18 * @brief This is the implementation for AccountProvider class.
20 * This file contains definitions of @e AccountProvider class.
24 #include <FBaseColIList.h>
25 #include <FBaseResult.h>
26 #include <FBaseString.h>
27 #include <FBaseSysLog.h>
28 #include <FSclAccountProvider.h>
29 #include "FScl_AccountProviderImpl.h"
31 using namespace Tizen::App;
32 using namespace Tizen::Base;
33 using namespace Tizen::Base::Collection;
35 namespace Tizen { namespace Social
38 AccountProvider::AccountProvider(void)
40 __pAccountProviderImpl = new (std::nothrow) _AccountProviderImpl();
41 SysTryReturnVoidResult(NID_SCL, __pAccountProviderImpl != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
44 AccountProvider::AccountProvider(const AccountProvider& rhs)
46 __pAccountProviderImpl = new (std::nothrow) _AccountProviderImpl();
47 SysTryReturnVoidResult(NID_SCL, __pAccountProviderImpl != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
50 *__pAccountProviderImpl = *rhs.__pAccountProviderImpl;
53 AccountProvider::~AccountProvider(void)
55 delete __pAccountProviderImpl;
59 AccountProvider::operator =(const AccountProvider& rhs)
66 *__pAccountProviderImpl = *rhs.__pAccountProviderImpl;
72 AccountProvider::Equals(const Object& rhs) const
74 const AccountProvider* pAccountProvider = dynamic_cast<const AccountProvider*> (&rhs);
76 if (pAccountProvider == null)
81 return __pAccountProviderImpl->Equals(*pAccountProvider->__pAccountProviderImpl);
85 AccountProvider::GetHashCode(void) const
87 return __pAccountProviderImpl->GetHashCode();
91 AccountProvider::GetAppId(void) const
93 return __pAccountProviderImpl->GetAppId();
97 AccountProvider::GetCapabilitiesN(void) const
99 return __pAccountProviderImpl->GetCapabilitiesN();
103 AccountProvider::GetDisplayName(void) const
105 return __pAccountProviderImpl->GetDisplayName();
109 AccountProvider::GetIconPath(void) const
111 return __pAccountProviderImpl->GetIconPath();
115 AccountProvider::GetSmallIconPath(void) const
117 return __pAccountProviderImpl->GetSmallIconPath();
121 AccountProvider::IsMultipleAccountSupported(void) const
123 return __pAccountProviderImpl->IsMultipleAccountSupported();