2 // Open Service Platform
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 * @file FMediaIImageEventListener.h
20 * @brief This is the header file for the %IImageDecodeUrlEventListener interface.
22 * This header file contains the declarations of the %IImageDecodeUrlEventListener interface.
25 #ifndef _FMEDIA_IIMAGE_EVENT_LISTENER_H_
26 #define _FMEDIA_IIMAGE_EVENT_LISTENER_H_
29 #include <FGraphics.h>
30 #include <FMediaImageTypes.h>
32 namespace Tizen { namespace Media
36 * @interface IImageDecodeUrlEventListener
37 * @brief This interface provides a listener that receives events associated with the Image::DecodeUrl() method.
41 * The %IImageDecodeUrlEventListener interface provides a listener that receives events associated with the Image::DecodeUrl() method, including specifying the methods used to get the decoded bitmap data from the remote URL.
42 * The %Image::DecodeUrl() method works asynchronously. Therefore, it is important to implement this listener to ensure that the decoding flows correctly.
43 * When an operation of each method is completed, an event is generated and a method of this interface is called.
45 * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/media/viewing_processing_still_images.htm">Viewing and Processing Still Images</a>.
47 class _OSP_EXPORT_ IImageDecodeUrlEventListener
48 : virtual public Tizen::Base::Runtime::IEventListener
53 * This is the destructor for this class.
57 virtual ~IImageDecodeUrlEventListener(void) {}
60 * Called when a Image::DecodeUrl() operation is completed.
64 * @param[in] reqId The requested ID
65 * @param[in] pBitmap The downloaded bitmap data
66 * @param[in] r The result of the upload
67 * @param[in] errorCode The error code
68 * @param[in] errorMessage The error message
70 * - The Image object must not be deleted in this event listener.
71 * - This method passes an auto-scaled bitmap, @n
72 * so the dimension can be different from the requested dimension if the passed bitmap is locked.
73 * @see Image::DecodeUrl()
75 virtual void OnImageDecodeUrlReceived(RequestId reqId, Tizen::Graphics::Bitmap* pBitmap, result r, const Tizen::Base::String errorCode, const Tizen::Base::String errorMessage) = 0;
79 // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application.
81 // This method is reserved and may change its name at any time without prior notice.
85 virtual void IImageDecodeUrlEventListener_Reserved1(void){}
88 // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application.
90 // This method is reserved and may change its name at any time without prior notice.
94 virtual void IImageDecodeUrlEventListener_Reserved2(void){}
96 }; // class IImageDecodeUrlEventListener