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 FMedia_ImageUriDataEventArg.h
20 * @brief This file contains the declaration of _ImageUriDataEventArg class,
21 * required internally by Image::DecodeUrl.
24 #ifndef FMEDIA_INTERNAL_IMAGEURIDATAEVENTARG_H_
25 #define FMEDIA_INTERNAL_IMAGEURIDATAEVENTARG_H_
28 #include <unique_ptr.h>
30 #include <FGraphics.h>
31 #include <FBaseRtIEventArg.h>
32 #include <FMediaImageTypes.h>
34 namespace Tizen{ namespace Media{
36 // @enum _ImageUriDataEventType
37 // @brief This represents ImageUriData event type.
39 enum _ImageUriDataEventType
41 IMAGE_URI_DATA_EVENT_NONE, // Event_None
42 IMAGE_URI_DATA_EVENT_SUCCESS, // Success Event
43 IMAGE_URI_DATA_EVENT_CANCEL, // Cancel Event
44 IMAGE_URI_DATA_EVENT_ERROR, // Error event
45 IMAGE_URI_DATA_EVENT_DESTROY, // Destroy event
50 * @class _ImageUriDataEventTypeArg
51 * @brief This class contains the base information about the ImageUriData event.
54 class _ImageUriDataEventTypeArg
55 : public Tizen::Base::Runtime::IEventArg
56 , public Tizen::Base::Object
60 _ImageUriDataEventTypeArg(void);
62 virtual ~_ImageUriDataEventTypeArg(void);
64 _ImageUriDataEventType GetEventType(void) const;
66 void SetEventType(_ImageUriDataEventType eType);
68 RequestId GetRequestId(void) const;
70 void SetRequestId(RequestId reqId);
73 _ImageUriDataEventTypeArg(const _ImageUriDataEventTypeArg& rhs);
74 _ImageUriDataEventTypeArg& operator =(const _ImageUriDataEventTypeArg& rhs);
76 _ImageUriDataEventType __ImageUriDataEventType;
81 * @class _ImageUriDataEventArg
82 * @brief This class contains the information about the ImageUriData event.
87 class _ImageUriDataEventArg
88 : public _ImageUriDataEventTypeArg
92 _ImageUriDataEventArg(void);
94 virtual ~_ImageUriDataEventArg(void);
96 Tizen::Base::ByteBuffer* GetData(void) const;
98 Tizen::Graphics::Dimension GetDestDimension(void) const;
100 ImageFormat GetImageFormat(void) const;
102 Tizen::Graphics::BitmapPixelFormat GetColorFormat(void) const;
104 result GetResult(void) const;
106 void SetData(Tizen::Base::ByteBuffer* data);
108 void SetDestDimension(Tizen::Graphics::Dimension dimension);
110 void SetImageFormat(ImageFormat imageFormat);
112 void SetColorFormat(Tizen::Graphics::BitmapPixelFormat colorFormat);
114 void SetResult(result r);
117 std::unique_ptr<Tizen::Base::ByteBuffer> __pImageData;
118 Tizen::Graphics::Dimension __dimension;
119 ImageFormat __imageFormat;
120 Tizen::Graphics::BitmapPixelFormat __colorFormat;
125 * @class _ImageUriDataErrorArg
126 * @brief This class contains the error about the ImageUriData.
131 class _ImageUriDataErrorArg
132 : public _ImageUriDataEventTypeArg
135 _ImageUriDataErrorArg(void);
137 virtual ~_ImageUriDataErrorArg(void);
139 result GetError(void) const;
141 Tizen::Base::String GetErrorCode(void) const;
143 Tizen::Base::String GetErrorMessage(void) const;
145 void SetError(result r);
147 void SetErrorCode(const Tizen::Base::String& errorCode);
149 void SetErrorMessage(const Tizen::Base::String& errorMessage);
153 Tizen::Base::String __errorCode;
154 Tizen::Base::String __errorMessage;
159 * @class _ImageUriDataDestroyArg
160 * @brief This class if for life-cycle of ImageUriData.
165 class _ImageUriDataDestroyArg
166 : public _ImageUriDataEventTypeArg
169 _ImageUriDataDestroyArg(void);
171 virtual ~_ImageUriDataDestroyArg(void);
176 #endif // FMEDIA_INTERNAL_IMAGEURIDATAEVENTARG_H_