2 // Open Service Platform
3 // Copyright (c) 2012 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.
19 * @file FApp_ConditionManagerService.h
20 * @brief This is the header file of the _ConditionManagerService class.
22 * This header file contains the declarations of the _ConditionManagerService class.
25 #ifndef _FAPP_INTERNAL_CONDITION_MANAGER_SERVICE_H_
26 #define _FAPP_INTERNAL_CONDITION_MANAGER_SERVICE_H_
29 #include <FBaseObject.h>
30 #include <FBaseString.h>
31 #include <FAppTypes.h>
33 #include "FApp_ConditionHandler.h"
35 namespace Tizen { namespace Base { namespace Collection { class IList; }}}
36 namespace Tizen { namespace App {
39 class _ConditionHandler;
42 * @class _ConditionManagerService
43 * @brief This class contains implementaion of conditional app launch feature.
45 * @see AppManager, _ConditionManagerProxy
47 class _ConditionManagerService
48 : public Tizen::Base::Object
50 typedef Tizen::Base::Collection::ArrayListT<_ConditionHandler*> _ConditionHandlers;
51 typedef Tizen::Base::Collection::HashMapT<Tizen::Base::String, _ConditionHandler*> _ConditionHandlerMap;
55 _ConditionManagerService(void);
56 virtual ~_ConditionManagerService(void);
57 result Construct(void);
59 result RegisterAppLaunch(const Tizen::Base::String& packageId, const Tizen::Base::String& executableName, const Tizen::Base::String& condition, const Tizen::Base::Collection::IList* pArguments, AppManager::LaunchOption option = AppManager::LAUNCH_OPTION_DEFAULT, const Tizen::Base::String* pSectionName = null);
60 result UnregisterAppLaunch(const Tizen::Base::String& packageId, const Tizen::Base::String& executableName, const Tizen::Base::String* pCondition);
61 result UnregisterAppLaunch(const Tizen::Base::String& packageId, const Tizen::Base::String* pExecutableName); // internal
62 bool IsAppLaunchRegistered(const Tizen::Base::String& packageId, const Tizen::Base::String& executableName, const Tizen::Base::String* pCondition = null);
66 result InitializePlugins(void);
67 result InitializePluginEntry(Tizen::Base::Collection::IMap& map);
68 result InitializeConditionalOperations(void);
69 result InitializeConditionalOperationEntry(const Tizen::Base::String& sectionName, const Tizen::Base::Collection::IMap& map);
70 _ConditionHandler* GetLaunchConditionHandler(const Tizen::Base::String& pluginName);
71 _ConditionHandler* GetHandlerByCondition(const Tizen::Base::String& condition);
73 result ValidateArguments(const Tizen::Base::Collection::IList* pArguments) const;
75 static void DumpArguments(const Tizen::Base::Collection::IList* pArguments);
76 void Dump(void) const;
79 _ConditionHandlers __handlers;
80 _ConditionHandlerMap __handlerLookupTable;
82 _StringComparerT __strComparer;
83 _StringHashMapProviderT __strHashMapProvider;
85 friend class UTs_ConditionManagerServiceP;
86 }; //_ConditionManagerService
89 #endif // _FAPP_INTERNAL_CONDITION_MANAGER_SERVICE_H_