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.
19 * @file FShell_LiveboxProviderImpl.cpp
20 * @brief This is the implementation for the _LiveboxProviderImpl class.
24 #include <FShellLiveboxFrame.h>
26 #include "FShell_LiveboxProviderImpl.h"
27 #include "FShell_LiveboxFrameImpl.h"
29 namespace Tizen { namespace Shell
32 using namespace Tizen::Base;
34 _LiveboxProviderImpl::_LiveboxProviderImpl(const String& instanceId)
35 :__instanceId(instanceId)
36 ,__pLiveboxFrame(null)
41 _LiveboxProviderImpl::~_LiveboxProviderImpl()
47 _LiveboxProviderImpl::GetInstanceId() const
53 _LiveboxProviderImpl::SetLiveboxFrame(LiveboxFrame* pLiveboxFrame)
55 SysTryReturnResult(NID_APP, (pLiveboxFrame != null && __pLiveboxFrame == pLiveboxFrame), E_OBJ_ALREADY_EXIST, "");
57 __pLiveboxFrame = pLiveboxFrame;
59 if( pLiveboxFrame == null)
64 _LiveboxFrameImpl* pLiveboxFrameImpl = _LiveboxFrameImpl::GetInstance(*pLiveboxFrame);
65 // SysAssertf(pLiveboxFrameImpl != null, "Not-yet constructed! Construct() should be called before use.");
66 SysTryReturnResult(NID_APP, pLiveboxFrameImpl, E_INVALID_OPERATION, "Not-yet constructed! LiveboxFrame::Construct() should be called before use.");
68 pLiveboxFrameImpl->SetProviderId(GetInstanceId());
74 _LiveboxProviderImpl::GetLiveboxFrame() const
76 return __pLiveboxFrame;