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 FApp_AppControlRegistry.h
19 * @brief This is the header file of the _AppControlRegistry class.
22 #ifndef _FAPP_INTERNAL_APP_CONTROL_REGISTRY_H_
23 #define _FAPP_INTERNAL_APP_CONTROL_REGISTRY_H_
27 #include <FBaseObject.h>
28 #include <FBaseColArrayListT.h>
29 #include <FBaseColHashMapT.h>
30 #include <FBaseColMultiHashMapT.h>
31 #include <FAppTypes.h>
33 namespace Tizen { namespace Base { namespace Collection
38 namespace Tizen { namespace App
45 void operator()(bundle* pBundle)
55 * @class _AppControlRegistry
56 * @brief load & store AppControl information
59 class _AppControlRegistry
62 class _AppControlAliasEntry
65 _AppControlAliasEntry(const Tizen::Base::String& aId1,
66 const Tizen::Base::String& oId1,
67 const Tizen::Base::String& aId2,
68 const Tizen::Base::String& oId2)
76 const Tizen::Base::String provider;
77 const Tizen::Base::String operation;
78 const Tizen::Base::String provider2;
79 const Tizen::Base::String operation2;
82 typedef Tizen::Base::Collection::MultiHashMapT<Tizen::Base::String, _AppControlAliasEntry*> AppControlAliasList;
83 typedef Tizen::Base::Collection::HashMapT<Tizen::Base::String, Tizen::Base::String> AliasMapType;
85 _AppControlRegistry(void);
87 ~_AppControlRegistry(void);
89 static _AppControlRegistry* GetInstance(void);
91 AppControl* GetTizenAppControlN(const Tizen::Base::String& aId, const Tizen::Base::String& oId) const;
93 Tizen::Base::Collection::ArrayList* FindAppControlListN(const Tizen::Base::String* pOid, const Tizen::Base::String* pUri, const Tizen::Base::String* pMimeType, const Tizen::Base::String* pCategory) const;
95 const _AppControlAliasEntry* GetAppControlAliasEntry(const Tizen::Base::String& aId, const Tizen::Base::String& oId) const;
97 AppId GetAliasAppId(const AppId& appId) const;
100 _AppControlRegistry(const _AppControlRegistry& rhs);
102 _AppControlRegistry& operator =(const _AppControlRegistry& rhs);
104 result LoadTizenAppControlRegistry(void);
106 result LoadLegacyList(void);
108 Tizen::Base::String GetTizenAppControlProvider(const Tizen::Base::String& appId, const Tizen::Base::String& opId) const;
111 AliasMapType __tizenList;
113 AppControlAliasList __aliasList;
115 static _AppControlRegistry* __pSelf;
116 }; // _AppControlRegistry
120 #endif // _FAPP_INTERNAL_APP_CONTROL_REGISTRY_H_