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()
78 static Tizen::Content::ImageMetadata* GetImageMetaN(const Tizen::Base::String& contentPath, bool internal = false);
81 * @see @ref Tizen::Content::ContentManagerUtil::GetAudioMetaN()
83 static Tizen::Content::AudioMetadata* GetAudioMetaN(const Tizen::Base::String& contentPath);
86 * @see @ref Tizen::Content::ContentManagerUtil::GetVideoMetaN()
88 static Tizen::Content::VideoMetadata* GetVideoMetaN(const Tizen::Base::String& contentPath);
91 * @see @ref Tizen::Content::ContentManagerUtil::CheckContentType()
93 static Tizen::Content::ContentType CheckContentType(const Tizen::Base::String& contentPath, bool internal = false);
96 * @see @ref Tizen::Content::ContentManagerUtil::CopyToMediaDirectory()
98 static result CopyToMediaDirectory(const Tizen::Base::String& srcContentPath, const Tizen::Base::String& destContentPath);
101 * @see @ref Tizen::Content::ContentManagerUtil::MoveToMediaDirectory()
103 static result MoveToMediaDirectory(const Tizen::Base::String& srcContentPath, const Tizen::Base::String& destContentPath);
106 _ContentManagerUtilImpl(void);
107 _ContentManagerUtilImpl(const _ContentManagerUtilImpl& rhs);
108 virtual ~_ContentManagerUtilImpl(void);
109 static void ParseBuffer(char* pBuffer, int& count);
110 static bool VerifyFilePathCompatibility(const Tizen::Base::String& contentPath);
111 _ContentManagerUtilImpl& operator =(const _ContentManagerUtilImpl& rhs);
112 static result ErrorMapToRetVal(int retVal);
113 static ContentType GetDrmFileType(const Tizen::Base::String& fileExt);
115 }; // class _ContentManagerUtilImpl
119 #endif // _FCNT_INTERNAL_CONTENT_MANAGER_UTIL_IMPL_H_