2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Flora License, Version 1.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://floralicense.org/license/
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 FUiEffectsEffectManager.cpp
19 * @brief This is the source file for the EffectManager class
24 #include <FBaseSysLog.h>
25 #include <FBaseErrors.h>
26 #include <FUiEffectsEffectManager.h>
27 #include <FUiEffects_EffectErrorMessages.h>
28 #include <FUiEffects_EffectManagerImpl.h>
30 namespace Tizen { namespace Ui { namespace Effects
34 EffectManager::GetInstance(void)
36 return _EffectManagerImpl::GetInstance().first;
40 EffectManager::DestroyInstance(void)
42 _EffectManagerImpl::DestroyInstance();
47 EffectManager::CreateEffect(const Tizen::Base::String& filePath)
49 //Get and store current locale:
50 char* pCurrentLocale = setlocale(LC_ALL, null);
51 char* pCurrentLocaleDuplicated = null;
52 if (pCurrentLocale != null)
54 pCurrentLocaleDuplicated = strdup(pCurrentLocale);
55 //Set minimal "C" locale:
56 setlocale(LC_ALL,"C");
59 Effect* pEffect = _EffectManagerImpl::GetInstance().second->CreateEffect(filePath);
61 if (pCurrentLocaleDuplicated != null)
63 //Restore previously saved locale:
64 setlocale(LC_ALL, pCurrentLocaleDuplicated);
65 free(pCurrentLocaleDuplicated);
72 EffectManager::DestroyEffect(Effect& effect)
74 _EffectManagerImpl::GetInstance().second->DestroyEffect(effect);
77 // This default constructor is intentionally declared as private to implement the Singleton semantic.
78 EffectManager::EffectManager(void)
79 : __pEffectManagerImpl(null)
84 // This destructor is intentionally declared as private to implement the Singleton semantic.
85 EffectManager::~EffectManager(void)
90 }}} // Tizen::Ui::Effects