2 // Open Service Platform
3 // Copyright (c) 2013 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 FSclAccountProvider.cpp
19 * @brief This is the implementation for AccountProvider class.
21 * This file contains definitions of @e AccountProvider class.
25 #include <FBaseColIList.h>
26 #include <FBaseResult.h>
27 #include <FBaseString.h>
28 #include <FBaseSysLog.h>
29 #include <FSclAccountProvider.h>
30 #include "FScl_AccountProviderImpl.h"
32 using namespace Tizen::App;
33 using namespace Tizen::Base;
34 using namespace Tizen::Base::Collection;
36 namespace Tizen { namespace Social
39 AccountProvider::AccountProvider(void)
41 __pAccountProviderImpl = new (std::nothrow) _AccountProviderImpl();
42 SysTryReturnVoidResult(NID_SCL, __pAccountProviderImpl != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
45 AccountProvider::AccountProvider(const AccountProvider& rhs)
47 __pAccountProviderImpl = new (std::nothrow) _AccountProviderImpl();
48 SysTryReturnVoidResult(NID_SCL, __pAccountProviderImpl != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
51 *__pAccountProviderImpl = *rhs.__pAccountProviderImpl;
54 AccountProvider::~AccountProvider(void)
56 delete __pAccountProviderImpl;
60 AccountProvider::operator =(const AccountProvider& rhs)
67 *__pAccountProviderImpl = *rhs.__pAccountProviderImpl;
73 AccountProvider::Equals(const Object& rhs) const
75 const AccountProvider* pAccountProvider = dynamic_cast<const AccountProvider*> (&rhs);
77 if (pAccountProvider == null)
82 return __pAccountProviderImpl->Equals(*pAccountProvider->__pAccountProviderImpl);
86 AccountProvider::GetHashCode(void) const
88 return __pAccountProviderImpl->GetHashCode();
92 AccountProvider::GetAppId(void) const
94 return __pAccountProviderImpl->GetAppId();
98 AccountProvider::GetCapabilitiesN(void) const
100 return __pAccountProviderImpl->GetCapabilitiesN();
104 AccountProvider::GetDisplayName(void) const
106 return __pAccountProviderImpl->GetDisplayName();
110 AccountProvider::GetIconPath(void) const
112 return __pAccountProviderImpl->GetIconPath();
116 AccountProvider::GetSmallIconPath(void) const
118 return __pAccountProviderImpl->GetSmallIconPath();
122 AccountProvider::IsMultipleAccountSupported(void) const
124 return __pAccountProviderImpl->IsMultipleAccountSupported();