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.
18 * @file FCnt_ContentUtility.h
19 * @brief This is the header file for the %_ContentUtility class.
21 * This header file contains the declarations of the %_ContentUtility class.
24 #ifndef _FCNT_INTERNAL_CONTENT_UTILITY_H_
25 #define _FCNT_INTERNAL_CONTENT_UTILITY_H_
28 #include <media_content.h>
29 #include <FCntContentInfo.h>
30 #include <FCntImageContentInfo.h>
31 #include <FCntAudioContentInfo.h>
32 #include <FCntVideoContentInfo.h>
33 #include <FCntOtherContentInfo.h>
35 namespace Tizen { namespace Content
38 struct UtilCharDeleter
40 void operator()(char* pChar)
46 struct ImageMetaHandleDeleter
48 void operator()(image_meta_h* pImageHandle)
50 image_meta_destroy(*pImageHandle);
54 struct AudioMetaHandleDeleter
56 void operator()(audio_meta_h* pAudioHandle)
58 audio_meta_destroy(*pAudioHandle);
62 struct VideoMetaHandleDeleter
64 void operator()(video_meta_h* pVideoHandle)
66 video_meta_destroy(*pVideoHandle);
72 : public Tizen::Base::Object
77 * This is the default constructor for this class.
81 _ContentUtility(void);
84 * This is the destructor for this class.
88 virtual ~_ContentUtility(void);
90 static void DoSafeFree(char* pSrc);
92 static void DoSafeDelete(Tizen::Base::String* pSrc);
94 static result FillContentData(media_info_h mediaHandle, ContentInfo::_ContentData* pContentData);
96 static result FillImageContentData(media_info_h media_handle, ImageContentInfo::_ImageContentData* pImageContentData);
98 static result FillAudioContentData(media_info_h media_handle, AudioContentInfo::_AudioContentData* pAudioContentData);
100 static result FillVideoContentData(media_info_h media_handle, VideoContentInfo::_VideoContentData* pVideoContentData);
102 static result MapCoreErrorToNativeResult(int reason);
105 _ContentUtility(const _ContentUtility& rhs);
106 _ContentUtility& operator =(const _ContentUtility& rhs);
108 }; // class ContentUtility
112 #endif // _FCNT_INTERNAL_CONTENT_UTILITY_H_