//
-// Open Service Platform
// Copyright (c) 2012 Samsung Electronics Co., Ltd.
//
// Licensed under the Apache License, Version 2.0 (the License);
* @final This class is not intended for extension.
*
* The %ContentDirectory class provides methods to access a list of content directories
- * and information of the content (specified content type) in the content directories.
+ * and the information of the content (specified content type) in the content directories.
*
* For more information on the database columns and their corresponding content types,
* see <a href="../org.tizen.native.appprogramming/html/guide/content/content_search_device.htm">Content Search on the Device</a>.
* The following example demonstrates how to use the %ContentDirectory class.
*
* @code
+ * #include <FBase.h>
* #include <FContent.h>
*
- * using namespace Tizen::Base;
- * using namespace Tizen::Base::Collection;
* using namespace Tizen::Content;
*
* void
* MyClass::Test(void)
* {
- * // Call Construct() of ContentDirectory
- * ContentDirectory directory;
- * const Tizen::Base::String contentDirectoryPath = L"";
- * result r = directory.Construct(CONTENT_TYPE_AUDIO);
- * if (IsFailed(r))
- * {
- * // Do something for an error
- * }
+ * ContentDirectory contentDirectory;
+ * const Tizen::Base::String contentDirectoryPath = L"";
+ * result r = contentDirectory.Construct(CONTENT_TYPE_AUDIO);
*
- * // Call GetContentDirectoryItemListN() of ContentDirectory as the first page
- * int pageNo = 1;
- * int countPerPage = 5;
- * int totalPage = 0;
- * int totalCount = 0;
- * IList* pContentInfoList = directory.GetContentDirectoryItemListN(contentDirectoryPath, pageNo, countPerPage, L"Title", SORT_ORDER_ASCENDING);
- *
- * if (IsFailed(GetLastResult()))
- * {
- * // Do something for an error
- * }
+ * int pageNo = 1;
+ * int countPerPage = 5;
+ * int totalPage = 0;
+ * int totalCount = 0;
+ * Tizen::Base::Collection::IList* pContentInfoList = contentDirectory.GetContentDirectoryItemListN(contentDirectoryPath, pageNo, countPerPage, L"Title", SORT_ORDER_ASCENDING);
+ * r = GetLastResult();
*
- * // Delete resource
- * pContentInfoList->RemoveAll(true);
- * delete pContentInfoList;
+ * pContentInfoList->RemoveAll(true);
+ * delete pContentInfoList;
* }
*
* @endcode
* @since 2.0
*
* @return An error code
- * @param contentType The content type
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified input parameter is invalid.
- * @exception E_OUT_OF_MEMORY The memory is insufficient.
- * @exception E_SYSTEM The method cannot connect to the database.
- * @remarks This method is used to access only one type of content. @n
- * If you want to access more than one type of content, use Construct(const Tizen::Base::Collection::IListT<ContentType>&). @n
- * The allowed types are @c CONTENT_TYPE_OTHER, @c CONTENT_TYPE_IMAGE, @c CONTENT_TYPE_AUDIO, and @c CONTENT_TYPE_VIDEO.
+ * @param contentType The content type @n
+ * This method is used to access only one type of content @n
+ * The allowed types are @c CONTENT_TYPE_OTHER, @c CONTENT_TYPE_IMAGE, @c CONTENT_TYPE_AUDIO,
+ * and @c CONTENT_TYPE_VIDEO @n
+ * If you want to access more than one type of content, use Construct(const Tizen::Base::Collection::IListT<ContentType>&)
+ * instead of this method.
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG The specified input parameter is invalid.
+ * @exception E_OUT_OF_MEMORY The memory is insufficient.
+ * @exception E_SYSTEM The method cannot connect to the database.
*/
result Construct(ContentType contentType);
* @since 2.0
*
* @return An error code
- * @param contentTypeList The list of content types
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified input parameter is invalid.
- * @exception E_OUT_OF_MEMORY The memory is insufficient.
- * @exception E_SYSTEM The method cannot connect to the database.
- * @remarks This method is used to access more than one type of content. @n
- * If you want to access only one type of content, use Construct(ContentType). @n
- * Total count of @c contentTypeList should not be greater than @c 4. @n
- * Any combination with @c CONTENT_TYPE_ALL is a invalid argument. @n
- * The allowed types are @c CONTENT_TYPE_OTHER, @c CONTENT_TYPE_IMAGE, @c CONTENT_TYPE_AUDIO, and @c CONTENT_TYPE_VIDEO.
+ * @param contentTypeList The list of content types @n
+ * This method is used to access more than one type of content, but the total count should not be greater than @c 4 @n
+ * The allowed types are @c CONTENT_TYPE_OTHER, @c CONTENT_TYPE_IMAGE, @c CONTENT_TYPE_AUDIO,
+ * and @c CONTENT_TYPE_VIDEO @n
+ * Any combination with @c CONTENT_TYPE_ALL is a invalid argument @n
+ * If you want to access only one type of content, use Construct(ContentType) instead of this method.
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG The specified input parameter is invalid.
+ * @exception E_OUT_OF_MEMORY The memory is insufficient.
+ * @exception E_SYSTEM The method cannot connect to the database.
*/
result Construct(const Tizen::Base::Collection::IListT<ContentType>& contentTypeList);
/**
- * Gets the count of content directories that contains the content type that is passed as a parameter in Construct().
+ * Gets the count of the content directories that contain the content type that is passed as a parameter to Construct().
*
* @since 2.0
*
- * @return The count of content directories
+ * @return The count of the content directories
* @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_MEMORY The memory is insufficient.
- * @exception E_SERVICE_BUSY The database is busy.
- * @exception E_SYSTEM The method cannot access the database.
+ * @exception E_OUT_OF_MEMORY The memory is insufficient.
+ * @exception E_SERVICE_BUSY The database is busy.
+ * @exception E_SYSTEM The method cannot access the database.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
int GetContentDirectoryCount(void) const;
/**
- * Gets the list of content directory path that contains the content type that is passed as a parameter in Construct().
+ * Gets the list of content directory paths that contain the content type that is passed as a parameter to Construct().
*
* @since 2.0
*
- * @return A list of Tizen::Base::String values that contains content directory path
+ * @return The list of Tizen::Base::String values that contain the content directory paths
* @param sortOrder The sort order
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified input parameter is invalid.
- * @exception E_OUT_OF_MEMORY The memory is insufficient.
- * @exception E_SERVICE_BUSY The database is busy.
- * @exception E_SYSTEM The method cannot access the database.
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG The specified input parameter is invalid.
+ * @exception E_OUT_OF_MEMORY The memory is insufficient.
+ * @exception E_SERVICE_BUSY The database is busy.
+ * @exception E_SYSTEM The method cannot access the database.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
Tizen::Base::Collection::IList* GetContentDirectoryPathListN(Tizen::Base::SortOrder sortOrder) const;
/**
- * Gets the count of files in a directory.
+ * Gets the file count in the directory.
*
* @since 2.0
*
- * @return The count of files
+ * @return The file count
* @param contentDirectoryPath The content directory path @n
- * The allowed directory path can be obtained by using
- * Tizen::System::Environment::GetMediaPath() and Tizen::System::Environment::GetExternalStoragePath().
+ * The allowed directory path can be obtained by using
+ * Tizen::System::Environment::GetMediaPath() and Tizen::System::Environment::GetExternalStoragePath().
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
int GetContentDirectoryItemCount(const Tizen::Base::String& contentDirectoryPath) const;
/**
- * Gets the list of content information in a directory.
+ * Gets the list of content information in the directory.
*
* @since 2.0
*
- * @return A list of ContentInfo classes that contains content information
- * @param contentDirectoryPath The content directory path @n
- * The allowed directory path can be obtained by using
- * Tizen::System::Environment::GetMediaPath() and Tizen::System::Environment::GetExternalStoragePath().
- * @param pageNo The page number @n
- * It must be equal to or greater than @c 1.
- * @param countPerPage The count of the search results per page @n
- * It must be equal to or greater than @c 1.
- * @param column The sort column name
- * @param sortOrder The sort order
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid.
- * @exception E_OUT_OF_MEMORY The memory is insufficient.
- * @exception E_SERVICE_BUSY The database is busy.
- * @exception E_SYSTEM The method cannot access the database.
+ * @return The list of ContentInfo classes that contain the content information
+ * @param contentDirectoryPath The content directory path @n
+ * The allowed directory path can be obtained by using
+ * Tizen::System::Environment::GetMediaPath() and Tizen::System::Environment::GetExternalStoragePath().
+ * @param pageNo The page number @n
+ * It must be either greater than or equal to @c 1.
+ * @param countPerPage The count of the search results per page @n
+ * It must be either greater than or equal to @c 1.
+ * @param column The sort column name
+ * @param sortOrder The sort order
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG A specified input parameter is invalid.
+ * @exception E_OUT_OF_MEMORY The memory is insufficient.
+ * @exception E_SERVICE_BUSY The database is busy.
+ * @exception E_SYSTEM The method cannot access the database.
* @remarks The specific error code can be accessed using the GetLastResult() method.
* @see GetContentDirectoryPathListN()
*/