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.cpp
20 * @brief This file contains the implementation of _ImageUriDataEvent class,
21 * required internally by Image::DecodeUrl.
26 #include <unique_ptr.h>
27 #include "FMedia_ImageUriDataEventArg.h"
29 using namespace Tizen::Base;
30 using namespace Tizen::Graphics;
32 namespace Tizen{ namespace Media{
34 _ImageUriDataEventTypeArg::_ImageUriDataEventTypeArg(void)
35 : __ImageUriDataEventType(IMAGE_URI_DATA_EVENT_NONE)
41 _ImageUriDataEventTypeArg::~_ImageUriDataEventTypeArg(void)
47 _ImageUriDataEventTypeArg::SetEventType(_ImageUriDataEventType eType)
49 __ImageUriDataEventType = eType;
52 _ImageUriDataEventType
53 _ImageUriDataEventTypeArg::GetEventType(void) const
55 return __ImageUriDataEventType;
59 _ImageUriDataEventTypeArg::GetRequestId(void) const
65 _ImageUriDataEventTypeArg::SetRequestId(RequestId reqId)
70 _ImageUriDataEventArg::_ImageUriDataEventArg(void)
71 : __imageFormat(IMG_FORMAT_NONE)
72 , __colorFormat(BITMAP_PIXEL_FORMAT_RGB565)
78 _ImageUriDataEventArg::~_ImageUriDataEventArg(void)
83 _ImageUriDataEventArg::SetData( ByteBuffer* data)
85 __pImageData.reset(data);
89 _ImageUriDataEventArg::GetData(void) const
91 return __pImageData.get();
95 _ImageUriDataEventArg::SetDestDimension( Dimension dimension)
97 __dimension = dimension;
101 _ImageUriDataEventArg::GetDestDimension(void) const
107 _ImageUriDataEventArg::SetImageFormat( ImageFormat imageFormat )
109 __imageFormat = imageFormat;
113 _ImageUriDataEventArg::GetImageFormat(void) const
115 return __imageFormat;
119 _ImageUriDataEventArg::SetColorFormat( BitmapPixelFormat colorFormat)
121 __colorFormat = colorFormat;
125 _ImageUriDataEventArg::GetColorFormat(void) const
127 return __colorFormat;
131 _ImageUriDataEventArg::SetResult(result r)
137 _ImageUriDataEventArg::GetResult(void) const
142 _ImageUriDataErrorArg::_ImageUriDataErrorArg(void)
145 __errorCode = String(L"");
146 __errorMessage = String(L"");
149 _ImageUriDataErrorArg::~_ImageUriDataErrorArg(void)
155 _ImageUriDataErrorArg::GetError(void) const
161 _ImageUriDataErrorArg::SetError(result r)
167 _ImageUriDataErrorArg::GetErrorCode(void) const
173 _ImageUriDataErrorArg::SetErrorCode( const String& errorCode)
175 __errorCode = errorCode;
179 _ImageUriDataErrorArg::GetErrorMessage(void) const
181 return __errorMessage;
185 _ImageUriDataErrorArg::SetErrorMessage( const String& errorMessage)
187 __errorMessage = errorMessage;
191 _ImageUriDataDestroyArg::_ImageUriDataDestroyArg(void)
196 _ImageUriDataDestroyArg::~_ImageUriDataDestroyArg(void)