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/log/log.h>
26 #include <dpl/shared_ptr.h>
27 #include "IEventGetDirectories.h"
28 #include "IEventUpdate.h"
29 #include "IEventUpdateBatch.h"
30 #include "IEventFind.h"
31 #include "ContentMedia.h"
32 #include "ContentImage.h"
39 typedef void (*scanCompletedCallback)(std::string errorMessage, std::string directory, void *user_data );
41 class IMediacontentManager :
42 public WrtDeviceApis::Commons::EventRequestReceiver<IEventFindFolder>,
43 public WrtDeviceApis::Commons::EventRequestReceiver<IEventBrowseFolder>,
44 public WrtDeviceApis::Commons::EventRequestReceiver<IEventUpdateMedia>,
45 public WrtDeviceApis::Commons::EventRequestReceiver<IEventUpdateMediaItems>
48 IMediacontentManager();
49 virtual ~IMediacontentManager();
58 virtual void findFolder(IEventFindFolderPtr &ptr);
59 virtual void updateMedia(IEventUpdateMediaPtr &ptr);
60 virtual void browseFolder(IEventBrowseFolderPtr &ptr);
61 virtual void updateMediaItems(IEventUpdateMediaItemsPtr &ptr);
62 virtual bool scanFile(scanCompletedCallback callback, std::string path, void* user_data);
63 virtual bool setListener(void* user_data);
64 virtual bool unsetListener();
65 virtual bool updateMetadata(MediacontentImagePtr &ptr);
67 virtual void OnRequestReceived(const IEventFindFolderPtr &value) = 0;
68 virtual void OnRequestReceived(const IEventUpdateMediaPtr &value) = 0;
69 virtual void OnRequestReceived(const IEventBrowseFolderPtr &value) = 0;
70 virtual void OnRequestReceived(const IEventUpdateMediaItemsPtr &value) = 0;
74 typedef DPL::SharedPtr<IMediacontentManager> IMediacontentManagerPtr;
81 #endif /* _ABSTRACT_LAYER_ICONTENT_MANAGER_H_ */