2 // Copyright (c) 2012 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.
18 * @file FAppAppControlProviderManager.cpp
19 * @brief This is the implementation for the %AppControlProviderManager class.
24 #include <FBaseDataType.h>
25 #include <FBaseString.h>
26 #include <FAppAppControlProviderManager.h>
27 #include <FAppIAppControlProviderEventListener.h>
29 #include <FBaseSysLog.h>
31 #include "FApp_AppControlProviderManagerImpl.h"
34 using namespace Tizen::Base;
35 using namespace Tizen::Base::Collection;
37 namespace Tizen { namespace App
40 AppControlProviderManager::AppControlProviderManager(void)
41 : __pAppControlProviderManagerImpl(null)
43 __pAppControlProviderManagerImpl = new (std::nothrow) _AppControlProviderManagerImpl;
44 SysTryReturnVoidResult(NID_APP, __pAppControlProviderManagerImpl, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory was insufficient.");
47 AppControlProviderManager::~AppControlProviderManager(void)
49 delete __pAppControlProviderManagerImpl;
52 AppControlProviderManager*
53 AppControlProviderManager::GetInstance(void)
55 // scott meyers's singleton
56 static AppControlProviderManager mgr;
62 AppControlProviderManager::SetAppControlProviderEventListener(IAppControlProviderEventListener* pListener)
64 SysTryReturnResult(NID_APP, __pAppControlProviderManagerImpl, E_INVALID_STATE, "This instance has not been properly constructed.");
65 return __pAppControlProviderManagerImpl->SetAppControlProviderEventListener(pListener);
69 AppControlProviderManager::SendAppControlResult(RequestId reqId, AppCtrlResult appControlResult, const IMap* pResultMap)
71 SysTryReturnResult(NID_APP, __pAppControlProviderManagerImpl, E_INVALID_STATE, "This instance has not been properly constructed.");
72 return __pAppControlProviderManagerImpl->SendAppControlResult(reqId, appControlResult, pResultMap);
76 AppControlProviderManager::GetClientAppId(RequestId reqId) const
78 SysTryReturn(NID_APP, __pAppControlProviderManagerImpl, L"", E_INVALID_STATE, "[E_INVALID_STATE] This instance has not been properly constructed.");
79 return __pAppControlProviderManagerImpl->GetClientAppId(reqId);