tizen beta release
[framework/web/wrt-plugins-common.git] / src / modules / API / DEPRACATED / Gallery / IGalleryRequestManager.cpp
1 /*
2  * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
3  *
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
7  *
8  *        http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16 /**
17  * @file        IGalleryRequestManager.cpp
18  * @author      Wojciech Bielawski (w.bielawski@samsung.com)
19  * @version     0.1
20  */
21
22 #include <Gallery/GalleryRequestManager.h>
23 #include "IGalleryRequestManager.h"
24
25 using namespace WrtPlugins::Platform;
26
27 namespace WrtPlugins {
28 namespace Api {
29 namespace Gallery {
30 void IGalleryRequestManager::getGalleries(const IEventGetGalleriesPtr &event)
31 {
32     EventRequestReceiver< IEventGetGalleries >::PostRequest(event);
33 }
34
35 void IGalleryRequestManager::open(const IEventOpenPtr &event)
36 {
37     EventRequestReceiver< IEventOpen >::PostRequest(event);
38 }
39
40 void IGalleryRequestManager::refresh(const IEventRefreshPtr &event)
41 {
42     EventRequestReceiver< IEventRefresh >::PostRequest(event);
43 }
44
45 void IGalleryRequestManager::close(const IEventClosePtr &event)
46 {
47     EventRequestReceiver< IEventClose >::PostRequest(event);
48 }
49
50 void IGalleryRequestManager::changeView(const IEventChangeViewPtr &event)
51 {
52     EventRequestReceiver< IEventChangeView >::PostRequest(event);
53 }
54
55 void IGalleryRequestManager::getMediaItems(const IEventGetMediaItemsPtr &event)
56 {
57     EventRequestReceiver< IEventGetMediaItems >::PostRequest(event);
58 }
59
60 void IGalleryRequestManager::getMediaItemById(
61         const IEventGetMediaItemByIdPtr &event)
62 {
63     EventRequestReceiver< IEventGetMediaItemById >::PostRequest(event);
64 }
65 //======== GalleryFactory
66
67 IGalleryRequestManagerPtr GalleryFactory::getGalleryManager()
68 {
69     static IGalleryRequestManagerPtr result(
70         new WrtPlugins::Platform::GalleryRequestManager());
71     return result;
72 }
73
74 GalleryFactory& GalleryFactory::getInstance()
75 {
76     static GalleryFactory theInstance;
77     return theInstance;
78 }
79 }
80 }
81 }