// // Copyright (c) 2013 Samsung Electronics Co., Ltd. // // Licensed under the Apache License, Version 2.0 (the License); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // /** * @file FSclAccountProvider.cpp * @brief This is the implementation for AccountProvider class. * * This file contains definitions of @e AccountProvider class. */ #include #include #include #include #include #include #include "FScl_AccountProviderImpl.h" using namespace Tizen::App; using namespace Tizen::Base; using namespace Tizen::Base::Collection; namespace Tizen { namespace Social { AccountProvider::AccountProvider(void) { __pAccountProviderImpl = new (std::nothrow) _AccountProviderImpl(); SysTryReturnVoidResult(NID_SCL, __pAccountProviderImpl != null, E_OUT_OF_MEMORY, "Memory allocation failed."); } AccountProvider::AccountProvider(const AccountProvider& rhs) { __pAccountProviderImpl = new (std::nothrow) _AccountProviderImpl(); SysTryReturnVoidResult(NID_SCL, __pAccountProviderImpl != null, E_OUT_OF_MEMORY, "Memory allocation failed."); *__pAccountProviderImpl = *rhs.__pAccountProviderImpl; } AccountProvider::~AccountProvider(void) { delete __pAccountProviderImpl; } AccountProvider& AccountProvider::operator =(const AccountProvider& rhs) { if (this == &rhs) { return *this; } *__pAccountProviderImpl = *rhs.__pAccountProviderImpl; return *this; } bool AccountProvider::Equals(const Object& rhs) const { const AccountProvider* pAccountProvider = dynamic_cast (&rhs); if (pAccountProvider == null) { return false; } return __pAccountProviderImpl->Equals(*pAccountProvider->__pAccountProviderImpl); } int AccountProvider::GetHashCode(void) const { return __pAccountProviderImpl->GetHashCode(); } AppId AccountProvider::GetAppId(void) const { return __pAccountProviderImpl->GetAppId(); } IList* AccountProvider::GetCapabilitiesN(void) const { return __pAccountProviderImpl->GetCapabilitiesN(); } String AccountProvider::GetDisplayName(void) const { return __pAccountProviderImpl->GetDisplayName(); } String AccountProvider::GetIconPath(void) const { return __pAccountProviderImpl->GetIconPath(); } String AccountProvider::GetSmallIconPath(void) const { return __pAccountProviderImpl->GetSmallIconPath(); } bool AccountProvider::IsMultipleAccountSupported(void) const { return __pAccountProviderImpl->IsMultipleAccountSupported(); } }} //Tizen::Social