2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 // Licensed under the Flora License, Version 1.1 (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.
18 * @file IvImageProvider.h
19 * @brief This is the header file for ImageProvider class.
22 #ifndef _IV_IMAGE_PROVIDER_H_
23 #define _IV_IMAGE_PROVIDER_H_
28 : public Tizen::Base::Runtime::EventDrivenThread
31 void RequestImage(const Tizen::Base::String& filePath, const ImageEvent* pRequestEvent);
32 Tizen::Graphics::Bitmap* GetImage(const Tizen::Base::String& filePath);
33 void ClearImageRequests(bool isAppTerminating = false);
35 virtual void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList * pArgs);
36 virtual bool OnStart(void);
37 virtual void OnStop(void);
39 static ImageProvider* GetInstance(void);
40 static void Release(void);
44 ImageProvider(ImageProvider& value);
45 ImageProvider& operator=(ImageProvider&);
46 virtual ~ImageProvider(void);
48 result Construct(void);
49 Tizen::Graphics::Bitmap* GetImageByDecodeN(const Tizen::Base::String& filePath) const;
51 static void CreateInstance(void);
52 static void DestroyInstance(void);
55 static ImageProvider* __pImageProviderInstance;
56 static Tizen::Base::Collection::ArrayList* __pImageEventListener;
58 Tizen::Base::Runtime::Mutex* __pMutexCmd;
59 Tizen::Base::Collection::ArrayList* __pCmdQueue;
60 unsigned long __requestId;
61 bool __isAppTerminating;
64 #endif /* _IV_IMAGE_PROVIDER_H_ */