2 * Copyright (c) 2013 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Flora License, Version 1.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://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 AppBoxObserver.h
18 * @author Yunchan Cho (yunchan.cho@samsung.com)
20 #ifndef APP_BOX_OBSERVER_H
21 #define APP_BOX_OBSERVER_H
26 class AppBoxRenderView;
27 class AppBoxRenderBuffer;
29 class AppBoxObserver {
31 static AppBoxObserver* Instance();
34 void registerRenderView(std::string instanceId, AppBoxRenderView* view);
35 void unregisterRenderView(std::string instanceId);
36 void registerRenderBuffer(std::string instanceId, AppBoxRenderBuffer* view);
37 void unregisterRenderBuffer(std::string instanceId);
38 AppBoxRenderView* getRenderView(std::string instanceId);
39 AppBoxRenderBuffer* getRenderBuffer(std::string instanceId);
45 typedef std::map<std::string, AppBoxRenderView*> RenderViewMap;
46 typedef std::pair<std::string, AppBoxRenderView*> RenderViewMapPair;
47 typedef std::map<std::string, AppBoxRenderBuffer*> RenderBufferMap;
48 typedef std::pair<std::string, AppBoxRenderBuffer*> RenderBufferMapPair;
51 RenderViewMap m_renderViewMap;
52 RenderBufferMap m_renderBufferMap;
53 static AppBoxObserver* s_instance;
56 #endif //APP_BOX_OBSERVER_H