2 // Tizen Web Device API
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0
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 #ifndef _ABSTRACT_LAYER_ICONTENT_MANAGER_H_
20 #define _ABSTRACT_LAYER_ICONTENT_MANAGER_H_
22 #include <media_content.h>
23 #include <dpl/shared_ptr.h>
25 #include <dpl/shared_ptr.h>
26 #include "IEventGetDirectories.h"
27 #include "IEventUpdate.h"
28 #include "IEventUpdateBatch.h"
29 #include "IEventFind.h"
30 #include "ContentMedia.h"
31 #include "ContentImage.h"
36 typedef void (*scanCompletedCallback)(std::string errorMessage, std::string directory, void *user_data );
38 class IMediacontentManager :
39 public WrtDeviceApis::Commons::EventRequestReceiver<IEventFindFolder>,
40 public WrtDeviceApis::Commons::EventRequestReceiver<IEventBrowseFolder>,
41 public WrtDeviceApis::Commons::EventRequestReceiver<IEventUpdateMedia>,
42 public WrtDeviceApis::Commons::EventRequestReceiver<IEventUpdateMediaItems>
45 IMediacontentManager();
46 virtual ~IMediacontentManager();
55 virtual void findFolder(IEventFindFolderPtr &ptr);
56 virtual void updateMedia(IEventUpdateMediaPtr &ptr);
57 virtual void browseFolder(IEventBrowseFolderPtr &ptr);
58 virtual void updateMediaItems(IEventUpdateMediaItemsPtr &ptr);
59 virtual bool scanFile(scanCompletedCallback callback, std::string path, void* user_data);
60 virtual bool setListener(void* user_data);
61 virtual bool unsetListener();
63 virtual void OnRequestReceived(const IEventFindFolderPtr &value) = 0;
64 virtual void OnRequestReceived(const IEventUpdateMediaPtr &value) = 0;
65 virtual void OnRequestReceived(const IEventBrowseFolderPtr &value) = 0;
66 virtual void OnRequestReceived(const IEventUpdateMediaItemsPtr &value) = 0;
70 typedef DPL::SharedPtr<IMediacontentManager> IMediacontentManagerPtr;
77 #endif /* _ABSTRACT_LAYER_ICONTENT_MANAGER_H_ */