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_ContentManagerUtilImpl.h
19 * @brief This is the header file for the %_ContentManagerUtilImpl class.
21 * This header file contains the declarations of the %_ContentManagerUtilImpl class.
24 #ifndef _FCNT_INTERNAL_CONTENT_MANAGER_UTIL_IMPL_H_
25 #define _FCNT_INTERNAL_CONTENT_MANAGER_UTIL_IMPL_H_
27 #include <unique_ptr.h>
28 #include <libexif/exif-data.h>
29 #include <metadata_extractor.h>
31 namespace Tizen { namespace Content
38 struct ExifDataDeleter
40 void operator()(ExifData* pExifData)
42 exif_data_unref(pExifData);
46 struct ExtractorDeleter
48 void operator()(metadata_extractor_h* pMetadataExtractor)
50 metadata_extractor_destroy(*pMetadataExtractor);
56 void operator()(char* pChar)
65 void operator()(void* pVoid)
72 class _ContentManagerUtilImpl
76 * @see @ref Tizen::Content::ContentManagerUtil::GetImageMetaN(const Tizen::Base::String&)
78 static Tizen::Content::ImageMetadata* GetImageMetaN(const Tizen::Base::String& contentPath, bool internal = false);
81 * @see @ref Tizen::Content::ContentManagerUtil::GetImageMetaN(const Tizen::Base::ByteBuffer&)
83 static Tizen::Content::ImageMetadata* GetImageMetaN(const Tizen::Base::ByteBuffer& byteBuffer);
86 * @see @ref Tizen::Content::ContentManagerUtil::GetAudioMetaN(const Tizen::Base::String&)
88 static Tizen::Content::AudioMetadata* GetAudioMetaN(const Tizen::Base::String& contentPath);
91 * @see @ref Tizen::Content::ContentManagerUtil::GetAudioMetaN(const Tizen::Base::ByteBuffer&)
93 static Tizen::Content::AudioMetadata* GetAudioMetaN(const Tizen::Base::ByteBuffer& byteBuffer);
96 * @see @ref Tizen::Content::ContentManagerUtil::GetVideoMetaN(const Tizen::Base::String&)
98 static Tizen::Content::VideoMetadata* GetVideoMetaN(const Tizen::Base::String& contentPath);
101 * @see @ref Tizen::Content::ContentManagerUtil::GetVideoMetaN(const Tizen::Base::ByteBuffer&)
103 static Tizen::Content::VideoMetadata* GetVideoMetaN(const Tizen::Base::ByteBuffer& byteBuffer);
106 * @see @ref Tizen::Content::ContentManagerUtil::CheckContentType(const Tizen::Base::String&)
108 static Tizen::Content::ContentType CheckContentType(const Tizen::Base::String& contentPath, bool internal = false);
111 * @see @ref Tizen::Content::ContentManagerUtil::CopyToMediaDirectory()
113 static result CopyToMediaDirectory(const Tizen::Base::String& srcContentPath, const Tizen::Base::String& destContentPath);
116 * @see @ref Tizen::Content::ContentManagerUtil::MoveToMediaDirectory()
118 static result MoveToMediaDirectory(const Tizen::Base::String& srcContentPath, const Tizen::Base::String& destContentPath);
121 _ContentManagerUtilImpl(void);
122 _ContentManagerUtilImpl(const _ContentManagerUtilImpl& rhs);
123 virtual ~_ContentManagerUtilImpl(void);
124 static void ParseBuffer(char* pBuffer, int& count);
125 static bool VerifyFilePathCompatibility(const Tizen::Base::String& contentPath);
126 _ContentManagerUtilImpl& operator =(const _ContentManagerUtilImpl& rhs);
127 static result ErrorMapToRetVal(int retVal);
128 static ContentType CheckStream(const Tizen::Base::String& contentPath);
130 }; // class _ContentManagerUtilImpl
134 #endif // _FCNT_INTERNAL_CONTENT_MANAGER_UTIL_IMPL_H_