//
// Copyright (c) 2012 Samsung Electronics Co., Ltd.
//
-// Licensed under the Flora License, Version 1.0 (the License);
+// Licensed under the Flora License, Version 1.1 (the License);
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
#ifndef _IV_VIEWER_PRESENTATION_MODEL_H_
#define _IV_VIEWER_PRESENTATION_MODEL_H_
-#include <FApp.h>
-#include <FAppIAppControlEventListener.h>
-#include <FBase.h>
-#include <FBaseColArrayList.h>
#include <FContent.h>
-#include <FGraphics.h>
-#include <FUi.h>
#include "IvImageProviderEventListener.h"
#include "IvTypes.h"
class ImageProvider;
class IImageViewerEventListener;
class SettingPresentationModel;
+class IFileUpdateEventListener;
class ImageViewerPresentationModel
: public IImageProviderEventListener
+ , public Tizen::Content::IContentUpdateEventListener
{
public:
static ImageViewerPresentationModel* GetInstance();
public:
- result AddListener(IImageViewerEventListener* listener);
+ result AddListener(IImageViewerEventListener* pListener);
result RemoveListener(IImageViewerEventListener& listner);
- void ClearImageRequests(bool appTerminating = false);
+ result AddFileUpdateListener(IFileUpdateEventListener* pListener);
+ result RemoveFileUpdateListener(IFileUpdateEventListener& listner);
+
+ void ClearImageRequests(bool isAppTerminating = false);
void DeleteFilePathAt(const int index);
void UpdateFilePathAt(const int index, const Tizen::Base::String& filePath);
Tizen::Base::String GetFilePathAt(const int index) const;
- Tizen::Base::Collection::ArrayList* GetImageCache() const;
+ Tizen::Base::Collection::ArrayList* GetImageCache(void) const;
ImageInfo* GetImageCacheAt(const int index) const;
+ void AddImageCache(const Tizen::Base::String& filePath);
int GetFileCount(void) const;
Tizen::Base::String GetType(void) const;
int GetStartIndex(void) const;
- Tizen::Base::String GetFileName(const Tizen::Base::String& filePath, bool checkExe = false) const;
- void RequestImage(const Tizen::Base::String& filePath) const;
+ Tizen::Base::String GetFileName(const Tizen::Base::String& filePath, bool isCheckExe = false) const;
+ void RequestImage(const Tizen::Base::String& filePath);
+ Tizen::Graphics::Bitmap* GetImage(const Tizen::Base::String& filePath);
Tizen::Content::ContentId GetFileContentId(const Tizen::Base::String& filePath) const;
- int GetSetterIndex(void) const;
- void SetSetterIndex(const int index);
-
int GetDurationOfSlideShow(void) const;
SlideShowTransitionEffect GetTransitionEffectOfSlideShow(void) const;
- result StartAppControl(const Tizen::Base::String& providerId, const Tizen::Base::String& operationId,
- const Tizen::Base::Collection::HashMap* pDataList,
- Tizen::App::IAppControlResponseListener* pListener);
+ result StartAppControl(const Tizen::Base::String& providerId, const Tizen::Base::String& operationId,
+ const Tizen::Base::String* pUriData, const Tizen::Base::String* pMimeType,
+ const Tizen::Base::Collection::HashMap* pDataList, Tizen::App::IAppControlResponseListener* pListener);
virtual void OnImageReceivedN(Tizen::Base::Runtime::IEventArg& eventArg);
+ virtual void OnContentFileCreated(Tizen::Content::ContentId contentId, Tizen::Content::ContentType contentType, result r);
+ virtual void OnContentFileUpdated(Tizen::Content::ContentId contentId, Tizen::Content::ContentType contentType, result r);
+ virtual void OnContentFileDeleted(Tizen::Content::ContentId contentId, Tizen::Content::ContentType contentType, result r);
+ virtual void OnContentDirectoryScanCompleted(const Tizen::Base::String& directoryPath, result r);
+
private:
ImageViewerPresentationModel(void);
ImageViewerPresentationModel(const ImageViewerPresentationModel&);
static void CreateInstance(void);
static void DestroyInstance(void);
- void LoadSettingValue();
+ void LoadSettingValue(void);
+ int GetImageCacheIndex(const Tizen::Base::String& );
private:
static ImageViewerPresentationModel* __pPresentationModelInstance;
static ImageProvider* __pImageProvider;
static ImageEvent* __pImageEvent;
static Tizen::Base::Collection::ArrayList* __pImageViewerListener;
+ Tizen::Base::Collection::ArrayList* __pFileUpdateListener;
Tizen::Base::Collection::ArrayList* __pImageCaches;
long long __contactId;
int __startIndex;
- int __setterIndex;
Tizen::Base::String __type;
int __durationOfSlideShow;
SlideShowTransitionEffect __transitionEffectOfSlideShow;
+ Tizen::Content::ContentManager* __pCntMgr;
SettingPresentationModel* __pSettingPresentationModel;
+ bool __isIvTriggeredEvent;
+ short __contentFileEventType;
+ Tizen::Content::ContentId __contentId;
+ bool __isIvTriggeredDeleteEvent;
};
#endif /* _IV_VIEWER_PRESENTATION_MODEL_H_ */