2 * Copyright (c) 2013 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Flora License, Version 1.1 (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://floralicense.org/license/
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.
17 * @file AppBoxManager.h
18 * @author Yunchan Cho (yunchan.cho@samsung.com)
20 #ifndef APP_BOX_MANAGER_H
21 #define APP_BOX_MANAGER_H
23 #include <Core/IBox.h>
24 #include <Core/IBoxManager.h>
25 #include <Core/BoxManager.h>
26 #include <Core/BoxData.h>
27 #include <Plugin/IBoxPluginFactory.h>
29 class AppBoxManager: public BoxManager {
31 static IBoxManagerPtr create(IBoxPluginFactoryPtr factory)
33 return IBoxManagerPtr(new AppBoxManager(factory));
38 // BoxManager implementation
39 bool requestAddBox(BoxInfoPtr boxInfo, EwkContextPtr ewkContext);
40 bool requestRemoveBox(std::string& instanceId);
42 EwkContextPtr getAvailableEwkContext();
43 void insertContextMap(EwkContextPtr context, std::string& instanceId);
44 void eraseContextMap(std::string& instanceId);
45 explicit AppBoxManager(IBoxPluginFactoryPtr factory);
48 typedef std::map<EwkContextPtr, IBoxPtr> EwkContextMap;
49 EwkContextMap m_contextMap;
50 EwkContextPtr m_defaultEwkContext;
54 #endif // APP_BOX_MANAGER_H