//
-// Open Service Platform
// Copyright (c) 2012 Samsung Electronics Co., Ltd.
//
// Licensed under the Apache License, Version 2.0 (the License);
#include <FCntTypes.h>
#include <FLocCoordinates.h>
-namespace Tizen { namespace Locations
-{
-class Coordinates;
-}}
-
namespace Tizen { namespace Graphics
{
class Bitmap;
*
* When a user creates content, its content information is created as a new pair. @n
* When a user deletes content, its content information is deleted from the content database. @n
- * This class provides methods to get or to set the specific content information. @n
+ * This class provides methods to get or set specific content information. @n
* The physical file is not updated even if the set methods are called.
*
* For more information on the different types of content information, see <a href="../org.tizen.native.appprogramming/html/guide/content/device_content_mgmt.htm">Device Content Management</a>.
* The following example demonstrates how to use the %ContentInfo class.
*
* @code
+ * #include <FApp.h>
+ * #include <FBase.h>
+ * #include <FContent.h>
+ * #include <FSystem.h>
+ *
+ * using namespace Tizen::Content;
+ *
* result
* MyClass::TestContentInfo(void)
* {
- * result r = E_SUCCESS;
- *
- * ContentId contentId;
* ContentManager contentManager;
- * r = contentManager.Construct();
- * TryReturn(!IsFailed(r), r, "Construct failed.");
+ * result r = contentManager.Construct();
*
* ImageContentInfo imageContentInfo;
* r = imageContentInfo.Construct(null);
- * TryReturn(!IsFailed(r), r, "Construct failed.");
*
* Tizen::Base::String sourcePath = Tizen::App::App::GetInstance()->GetAppRootPath() + L"data/flower.jpg";
* Tizen::Base::String destPath = Tizen::System::Environment::GetMediaPath() + L"Images/flower.jpg";
*
- * contentId = contentManager.CreateContent(sourcePath, destPath, false, &imageContentInfo);
- * TryReturn(Tizen::Base::UuId::GetInvalidUuId() != contentId, GetLastResult(), "CreateContent failed.");
+ * ContentId contentId = contentManager.CreateContent(sourcePath, destPath, false, &imageContentInfo);
+ * r = GetLastResult();
*
* return r;
* }
* @if OSPDEPREC
* Initializes this instance of %ContentInfo with the specified parameters.
*
- * @brief <i> [Deprecated] </i>
+ * @brief <i> [Deprecated] </i>
* @deprecated This method is deprecated as there is a problem in managing the user-defined thumbnail and device coordinates.
* @since 2.0
*
- * @return An error code
- * @param[in] contentPath The content path
+ * @return An error code
+ * @param[in] contentPath The content path
* @param[in] thumbnailPath The thumbnail path
- * @param[in] setGps Set to @c true to save the device's last known coordinates in the %ContentInfo instance, @n
- * else @c false
+ * @param[in] setGps Set to @c true to save the device's last known coordinates of the %ContentInfo instance, @n
+ * else @c false
* @endif
*/
virtual result Construct(const Tizen::Base::String& contentPath, const Tizen::Base::String& thumbnailPath = L"", bool setGps = false) = 0;
ContentType GetContentType(void) const;
/**
- * Gets the mime type.
+ * Gets the MIME type.
*
* @since 2.0
*
- * @return The mime type
+ * @return The MIME type
*/
Tizen::Base::String GetMimeType(void) const;
/**
- * Gets the date and time of the created content.
+ * Gets the date and time of the added content.
*
* @since 2.0
*
- * @return The content's creation time (GMT)
+ * @return The added time to database (GMT)
*/
Tizen::Base::DateTime GetDateTime(void) const;
* @since 2.0
*
* @return The content name
+ * @remarks The content name is not a file name.
*/
Tizen::Base::String GetContentName(void) const;
*
* @since 2.0
*
- * @return A reference to the coordinates
+ * @return A reference to the Tizen::Locations::Coordinates instance
*/
const Tizen::Locations::Coordinates& GetCoordinates(void) const;
*
* @since 2.0
*
- * @return An error code
+ * @return An error code
* @param[in] coordinates The user-defined coordinates
* @exception E_SUCCESS The method is successful.
*/
*
* @since 2.0
*
- * @return An error code
+ * @return An error code
* @param[in] locationTag The new location tag
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The length of the input data exceeds the maximum limit of 45 characters.
- * @exception E_OUT_OF_MEMORY The memory is insufficient.
*/
result SetLocationTag(const Tizen::Base::String& locationTag);
*
* @since 2.0
*
- * @return An error code
+ * @return An error code
* @param[in] rating The new rating
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The length of the input data exceeds the maximum limit of 45 characters.
- * @exception E_OUT_OF_MEMORY The memory is insufficient.
*/
result SetRating(const Tizen::Base::String& rating);
*
* @since 2.0
*
- * @return An error code
- * @param[in] category The new category
+ * @return An error code
+ * @param[in] category The new category
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The length of the input data exceeds the maximum limit of 45 characters.
- * @exception E_OUT_OF_MEMORY The memory is insufficient.
*/
result SetCategory(const Tizen::Base::String& category);
*
* @since 2.0
*
- * @return An error code
- * @param[in] description The new description
+ * @return An error code
+ * @param[in] description The new description
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The length of the input data exceeds the maximum limit of 140 characters.
- * @exception E_OUT_OF_MEMORY The memory is insufficient.
*/
result SetDescription(const Tizen::Base::String& description);
* @since 2.0
* @if OSPCOMPAT
* @compatibility This method has compatibility issues with OSP compatible applications. @n
- * For more information, see @ref CompContentInfoGetThumbnailNPage "here".
+ * For more information, see @ref CompContentInfoGetThumbnailNPage "here".
* @endif
*
- * @return A pointer to the thumbnail image
- * @exception E_SUCCESS The method is successful.
+ * @return A pointer to the thumbnail image
+ * @exception E_SUCCESS The method is successful.
* @exception E_DATA_NOT_FOUND The thumbnail image does not exist.
- * @exception E_OUT_OF_MEMORY The memory is insufficient.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
Tizen::Graphics::Bitmap* GetThumbnailN(void) const;
/**
* @if OSPCOMPAT
- * @page CompContentInfoGetThumbnailNPage Compatibility for GetThumbnailN().
+ * @page CompContentInfoGetThumbnailNPage Compatibility for GetThumbnailN().
* @section CompContentInfoGetThumbnailNPageIssueSection Issue
- * The thumbnail size of this method in OSP compatible applications has the following issues: @n
- * <DIV> The size is changed from 80x60 pixels to the size of image which is returned from the platform since %Tizen API 2.1.</DIV>
+ * The thumbnail size of this method in OSP compatible applications has the following issues: @n
+ * <DIV> The size is changed from 80x60 pixels to the size of the image which is returned from the platform since %Tizen API 2.1.</DIV>
*
* @endif
*/
* @since 2.0
*
* @return @c true if this content has DRM, @n
- * else @c false
+ * else @c false
*/
bool IsDrmProtected(void) const;
*
* @since 2.0
*
- * @return An error code
+ * @return An error code
* @param[in] contentName The new content name
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The length of the input data exceeds the maximum limit of 45 characters.
- * @exception E_OUT_OF_MEMORY The memory is insufficient.
*/
result SetContentName(const Tizen::Base::String& contentName);
/**
* Sets the keyword.
*
- * @since 2.0
+ * @since 2.0
*
- * @return An error code
- * @param[in] keyword The new keyword
+ * @return An error code
+ * @param[in] keyword The new keyword
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The length of the input data exceeds the maximum limit of 45 characters.
- * @exception E_OUT_OF_MEMORY The memory is insufficient.
*/
result SetKeyword(const Tizen::Base::String& keyword);
*
* @since 2.0
*
- * @return An error code
- * @param[in] author The new author
+ * @return An error code
+ * @param[in] author The new author
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The length of the input data exceeds the maximum limit of 45 characters.
- * @exception E_OUT_OF_MEMORY The memory is insufficient.
*/
result SetAuthor(const Tizen::Base::String& author);
*
* @since 2.0
*
- * @return An error code
- * @param[in] provider The new content provider
+ * @return An error code
+ * @param[in] provider The new content provider
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The length of the input data exceeds the maximum limit of 45 characters.
- * @exception E_OUT_OF_MEMORY The memory is insufficient.
*/
result SetProvider(const Tizen::Base::String& provider);
Tizen::Base::String GetMediaFormat(void) const;
protected:
+
//
// This class is for internal use only.
// Using this class can cause behavioral, security-related, and consistency-related issues in the application.
};
/**
- * The object is not fully constructed after this constructor is called. For full construction, the Construct() method must be called right after calling this constructor.
+ * This is the default constructor for this class.
*
* @since 2.0
*/
result SetContentData(const _ContentData* pContentData);
private:
+
/**
* The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
*/
*/
ContentInfo& operator =(const ContentInfo& rhs);
- _ContentData* GetContentData(void);
-
private:
- _ContentData* __pContentData;
- mutable Tizen::Locations::Coordinates coordinates;
-
- friend class _ContentManagerImpl;
- friend class _ContentSearchImpl;
- friend class _ContentDirectoryImpl;
- friend class _ContentUtility;
- friend class _PlayListManagerImpl;
- friend class _PlayListImpl;
+ _ContentInfoImpl* __pContentInfoImpl;
+ mutable Tizen::Locations::Coordinates __coordinates;
friend class _ContentInfoImpl;
- _ContentInfoImpl* __pImpl;
+ friend class _ContentInfoHelper;
-}; // class ContentInfo
+}; // ContentInfo
}} // Tizen::Content