Fix : Remove exception handling codes at the sample code 90/14490/1 tizen
authorSeokpil Park <seokpil.park@samsung.com>
Fri, 11 Oct 2013 02:34:31 +0000 (11:34 +0900)
committerSeokpil Park <seokpil.park@samsung.com>
Mon, 6 Jan 2014 04:39:11 +0000 (13:39 +0900)
Change-Id: I27b18c8480a3bd0ed9d82696d3a9cb0939aa42cb
Signed-off-by: Seokpil Park <seokpil.park@samsung.com>
18 files changed:
inc/FCntAudioContentInfo.h
inc/FCntAudioMetadata.h
inc/FCntContentDirectory.h
inc/FCntContentInfo.h
inc/FCntContentManager.h
inc/FCntContentManagerUtil.h
inc/FCntContentSearch.h
inc/FCntContentTransfer.h
inc/FCntDownloadManager.h
inc/FCntDownloadRequest.h
inc/FCntIDownloadListener.h
inc/FCntImageContentInfo.h
inc/FCntImageMetadata.h
inc/FCntOtherContentInfo.h
inc/FCntPlayList.h
inc/FCntPlayListManager.h
inc/FCntVideoContentInfo.h
inc/FCntVideoMetadata.h

index 1b80850..75e7d8b 100644 (file)
@@ -47,25 +47,27 @@ class _AudioContentData;
  * The following example demonstrates how to use the %AudioContentInfo class.
  *
  * @code
+ * #include <FApp.h>
+ * #include <FBase.h>
+ * #include <FContent.h>
+ * #include <FSystem.h>
+ *
+ * using namespace Tizen::Content;
+ *
  * result
  * MyClass::TestAudioContentInfo(void)
  * {
- *             result r = E_SUCCESS;
- *
- *             ContentId contentId;
  *             ContentManager contentManager;
- *             r = contentManager.Construct();
- *             TryReturn(!IsFailed(r), r, "Construct failed.");
+ *             result r = contentManager.Construct();
  *
  *             AudioContentInfo audioContentInfo;
  *             r = audioContentInfo.Construct(null);
- *             TryReturn(!IsFailed(r), r, "Construct failed.");
  *
  *             Tizen::Base::String sourcePath = Tizen::App::App::GetInstance()->GetAppRootPath() + L"data/flower.wma";
  *             Tizen::Base::String destPath = Tizen::System::Environment::GetMediaPath() + L"Sounds/flower.wma";
  *
- *             contentId = contentManager.CreateContent(sourcePath, destPath, false, &audioContentInfo);
- *             TryReturn(Tizen::Base::UuId::GetInvalidUuId() != contentId, GetLastResult(), "CreateContent failed.");
+ *             ContentId contentId = contentManager.CreateContent(sourcePath, destPath, false, &audioContentInfo);
+ *             r = GetLastResult();
  *
  *             return r;
  * }
index f8e1da9..88714e2 100644 (file)
@@ -46,57 +46,35 @@ class _AudioMetadataImpl;
  * The following example demonstrates how to use the %AudioMetadata class.
  *
  * @code
+ * #include <FBase.h>
+ * #include <FContent.h>
+ * #include <FMedia.h>
+ * #include <FSystem.h>
+ *
+ * using namespace Tizen::Content;
+ *
  * result
  * MyClass::TestAudioMetadata(void)
  * {
- *             result r = E_SUCCESS;
- *
  *             Tizen::Base::String contentPath = Tizen::System::Environment::GetMediaPath() + L"Sounds/hot.mp3";
  *             AudioMetadata* pAudioMeta = ContentManagerUtil::GetAudioMetaN(contentPath);
- *             TryReturn(pAudioMeta != null, GetLastResult(), "ContentManagerUtil::GetAudioMetaN failed.");
+ *             result r = GetLastResult();
  *
- *             // Title
  *             pAudioMeta->GetTitle();
- *
- *             // Frequency
  *             pAudioMeta->GetFrequency();
- *
- *             // Artist
  *             pAudioMeta->GetArtist();
- *
- *             // Album name
  *             pAudioMeta->GetAlbumName();
- *
- *             // Duration
  *             pAudioMeta->GetDuration();
- *
- *             // Year
  *             pAudioMeta->GetYear();
  *
- *             // Thumbnail
  *             Tizen::Media::Image image;
  *             r = image.Construct();
- *             if (IsFailed(r))
- *             {
- *                     delete pAudioMeta;
- *                     return r;
- *             }
  *
  *             Tizen::Graphics::Bitmap* pBitmap = pAudioMeta->GetThumbnailN();
- *             if (pBitmap == null)
- *             {
- *                     delete pAudioMeta;
- *                     return GetLastResult();
- *             }
+ *             r = GetLastResult();
  *
  *             Tizen::Base::String thumbnailPath = Tizen::System::Environment::GetMediaPath() + L"Images/audio.bmp";
  *             r = image.EncodeToFile(*pBitmap, Tizen::Media::IMG_FORMAT_BMP, thumbnailPath, false);
- *             if (IsFailed(r))
- *             {
- *                     delete pAudioMeta;
- *                     delete pBitmap;
- *                     return r;
- *             }
  *
  *             delete pAudioMeta;
  *             delete pBitmap;
index 2e246b3..2e25dd1 100644 (file)
@@ -55,39 +55,27 @@ class _ContentDirectoryImpl;
  * 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
index c0bffcc..0fe1fcc 100644 (file)
@@ -59,25 +59,27 @@ class _ContentInfoImpl;
  * 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;
  * }
index aca106f..8aad3f5 100644 (file)
@@ -55,75 +55,48 @@ class IContentUpdateEventListener;
  * The following example demonstrates how to use the %ContentManager class.
  *
  * @code
+ * #include <FApp.h>
+ * #include <FBase.h>
+ * #include <FContent.h>
+ * #include <FSystem.h>
+ *
+ * using namespace Tizen::Content;
+ *
  * result
  * MyClass::TestContentManager(void)
  * {
- *             result r = E_SUCCESS;
- *             ContentId contentId;
  *             ContentManager contentManager;
- *             r = contentManager.Construct();
- *             TryReturn(!IsFailed(r), r, "Construct failed.");
+ *             result r = contentManager.Construct();
  *
- *             // Creates
+ *             // Creates Content
  *             ImageContentInfo imageContentInfo;
  *             r = imageContentInfo.Construct(null);
- *             TryReturn(!IsFailed(r), r, "Construct failed.");
  *
  *             r = imageContentInfo.SetKeyword(L"platform, tizen");
- *             if (IsFailed(r))
- *             {
- *                     return r;
- *             }
- *
  *             r = imageContentInfo.SetLocationTag(L"seoul");
- *             if (IsFailed(r))
- *             {
- *                     return r;
- *             }
  *
  *             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();
  *
- *             // Gets
- *             ImageContentInfo* pImageContentInfo = null;
- *             pImageContentInfo = dynamic_cast<ImageContentInfo*>(contentManager.GetContentInfoN(contentId));
- *             TryReturn(pImageContentInfo != null, GetLastResult(), "GetContentInfoN failed.");
+ *             // Gets Content
+ *             ImageContentInfo* pImageContentInfo = dynamic_cast< ImageContentInfo* >(contentManager.GetContentInfoN(contentId));
+ *             r = GetLastResult();
  *
  *             pImageContentInfo->GetContentPath();
  *
- *             // Updates
+ *             // Updates Content
  *             r = pImageContentInfo->SetKeyword(L"apple, fruit");
- *             if (IsFailed(r))
- *             {
- *                     delete pImageContentInfo;
- *                     return r;
- *             }
  *             r = pImageContentInfo->SetProvider(L"kw1128");
- *             if (IsFailed(r))
- *             {
- *                     delete pImageContentInfo;
- *                     return r;
- *             }
  *             r = contentManager.UpdateContent(*pImageContentInfo);
- *             if (IsFailed(r))
- *             {
- *                     delete pImageContentInfo;
- *                     return r;
- *             }
  *
- *             // Deletes
+ *             // Deletes Content
  *             r = contentManager.DeleteContent(contentId);
- *             if (IsFailed(r))
- *             {
- *                     delete pImageContentInfo;
- *                     return r;
- *             }
  *
  *             delete pImageContentInfo;
- *             return r;
+ *             return r;
  * }
  * @endcode
  */
index b7e036b..c685ca0 100644 (file)
@@ -46,38 +46,35 @@ class VideoMetadata;
  * The following example demonstrates how to use the %ContentManagerUtil class.
  *
  * @code
+ * #include <FBase.h>
+ * #include <FContent.h>
+ * #include <FSystem.h>
+ *
+ * using namespace Tizen::Content;
+ *
  * result
  * MyClass::TestContentManagerUtil(void)
  * {
  *             // Image
  *             Tizen::Base::String imagePath = Tizen::System::Environment::GetMediaPath() + L"Images/full_meta.jpg";
  *             ImageMetadata* pImageMeta = ContentManagerUtil::GetImageMetaN(imagePath);
- *             TryReturn(pImageMeta != null, GetLastResult(), "GetImageMetaN failed.");
+ *             result r = GetLastResult();
  *
  *             // Audio
  *             Tizen::Base::String audioPath = Tizen::System::Environment::GetMediaPath() + L"Sounds/hot.mp3";
  *             AudioMetadata* pAudioMeta = ContentManagerUtil::GetAudioMetaN(audioPath);
- *             if(pAudioMeta == null)
- *             {
- *                     delete pImageMeta;
- *                     return GetLastResult();
- *             }
+ *             r = GetLastResult();
  *
  *             // Video
  *             Tizen::Base::String videoPath = Tizen::System::Environment::GetMediaPath() + L"Videos/video.mp4";
  *             VideoMetadata* pVideoMeta = ContentManagerUtil::GetVideoMetaN(videoPath);
- *             if(pVideoMeta == null)
- *             {
- *                     delete pImageMeta;
- *                     delete pAudioMeta;
- *                     return GetLastResult();
- *             }
+ *             r = GetLastResult();
  *
  *             delete pImageMeta;
  *             delete pAudioMeta;
  *             delete pVideoMeta;
  *
- *             return E_SUCCESS;
+ *             return r;
  * }
  * @endcode
  */
index a79a874..cd75221 100644 (file)
@@ -50,38 +50,27 @@ class _ContentSearchImpl;
  * The following example demonstrates how to use the %ContentSearch 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 ContentSearch
- *     ContentSearch search;
- *     result r = search.Construct(CONTENT_TYPE_AUDIO);
- *     if (IsFailed(r))
- *     {
- *             // Do something for an error
- *     }
+ *             ContentSearch search;
+ *             result r = search.Construct(CONTENT_TYPE_AUDIO);
  *
- *     // Call SearchN() of ContentSearch as the first page
- *     int pageNo = 1;
- *     int countPerPage = 5;
- *     int totalPage = 0;
- *     int totalCount = 0;
- *     IList* pContentInfoList = search.SearchN(pageNo, countPerPage, totalPage, totalCount,
+ *             int pageNo = 1;
+ *             int countPerPage = 5;
+ *             int totalPage = 0;
+ *             int totalCount = 0;
+ *             Tizen::Base::Collection::IList* pContentInfoList = search.SearchN(pageNo, countPerPage, totalPage, totalCount,
  *                             L"Artist='rain'", L"Title", SORT_ORDER_ASCENDING);
- *     if (IsFailed(GetLastResult()))
- *     {
- *             // Do something for an error
- *     }
+ *             r = GetLastResult();
  *
- *     // Delete resource
- *     pContentInfoList->RemoveAll(true);
- *     delete pContentInfoList;
+ *             pContentInfoList->RemoveAll(true);
+ *             delete pContentInfoList;
  * }
  *
  * @endcode
index e2a3d11..784e37a 100644 (file)
@@ -59,61 +59,51 @@ class IContentTransferListener;
  *
  * The following example demonstrates how to use the %ContentTransfer class.
  *
- *     @code
- *     class  MyClass
- *             :public Tizen::Content::IContentTransferListener
- *     {
- *     public:
- *             MyClass(void);
- *             virtual ~MyClass(void);
+ * @code
+ * #include <FBase.h>
+ * #include <FContent.h>
+ * #include <FSystem.h>
  *
- *     public:
- *             void OnContentTransferInProgress(RequestId requestID, int totalReceivedSize);
- *             void OnContentDownloadCompleted(RequestId requestID, ContentId contentID, result res, const Tizen::Base::String& errorCode, const Tizen::Base::String& errorMessage);
- *             void OnContentDownloadToBufferCompleted(RequestId reqId, Tizen::Base::ByteBuffer* pBuffer, result r, const Tizen::Base::String& errorCode, const Tizen::Base::String& errorMessage);
- *             void OnContentTransferCanceled(RequestId reqId, result res, const Tizen::Base::String& errorCode, const Tizen::Base::String& errorMessage);
- *     };
- *
- *     // Implementation for the listener function and Implementation of other listener function is
- *     void MyClass::OnContentDownloadCompleted(RequestId requestID, ContentId contentID, result res, const Tizen::Base::String& errorCode, const Tizen::Base::String& errorMessage)
- *     {
- *             result r = E_SUCCESS;
- *             ContentManager contentManager;
- *             ContentInfo* pContentInfo = null;
- *
- *             // Error check
- *             TryCatch(!IsFailed(res), r, "Download Error [%s]", GetErrorMessage(res));
+ * using namespace Tizen::Content;
  *
- *             // Do something
- *             r = contentManager.Construct();
- *             TryCatch(!IsFailed(r), r, "Construct failed.");
- *
- *             // Get ContentInfo
- *             pContentInfo = contentManager.GetContentInfoN(contentID);
- *     CATCH:
- *             if (pContentInfo)
- *                     delete pContentInfo;
- *     }
+ * class MyClass
+ *             : public Tizen::Content::IContentTransferListener
+ * {
+ * public:
+ *             result Download(void);
+ *             void OnContentTransferInProgress(RequestId requestID, int totalReceivedSize) {}
+ *             void OnContentDownloadCompleted(RequestId requestID, ContentId contentID, result res, const Tizen::Base::String& errorCode, const Tizen::Base::String& errorMessage);
+ *             void OnContentDownloadToBufferCompleted(RequestId reqId, Tizen::Base::ByteBuffer* pBuffer, result r, const Tizen::Base::String& errorCode, const Tizen::Base::String& errorMessage) {}
+ *             void OnContentTransferCanceled(RequestId reqId, result res, const Tizen::Base::String& errorCode, const Tizen::Base::String& errorMessage) {}
+ * };
  *
- *     result
- *     MyClass::RequestDownload(void)
- *     {
+ * result
+ * MyClass::Download(void)
+ * {
  *             ContentTransfer contentTransfer;
- *             RequestId requestId;
+ *             result r = contentTransfer.Construct(*this);
+ *
  *             Tizen::Base::Utility::Uri contentUri;
- *             int contentSize;
- *             Tizen::Base::String downloadPath;
+ *             contentUri.SetUri(L"https://www.tizen.org");
+ *             Tizen::Base::String downloadPath(Tizen::System::Environment::GetMediaPath() + L"test");
+ *             RequestId requestId;
+ *             r = contentTransfer.Download(contentUri, downloadPath, requestId, false);
  *
- *             result r = contentTransfer.Construct(*this);
- *             TryReturn(!IsFailed(r), r, ("Construct is failed.\n"));
+ *             result r;
+ * }
  *
- *             // TODO: set uri and download path
+ * void
+ * MyClass::OnContentDownloadCompleted(RequestId requestID, ContentId contentID, result res, const Tizen::Base::String& errorCode, const Tizen::Base::String& errorMessage)
+ * {
+ *             ContentManager contentManager;
+ *             result r = contentManager.Construct();
  *
- *             r = contentTransfer.Download(contentUri, downloadPath, requestId, false);
- *             TryReturn(!IsFailed(r), r, ("Download Request is failed.\n"));
- *     }
- *     @endcode
- *     @endif
+ *             ContentInfo* pContentInfo = contentManager.GetContentInfoN(contentID);
+ *             r = GetLastResult();
+ * }
+ *
+ * @endcode
+ * @endif
  */
 class _OSP_EXPORT_ ContentTransfer
        : virtual public Tizen::Base::Object
index ad19dd0..8c0d652 100644 (file)
@@ -34,236 +34,233 @@ class DownloadRequest;
 class IDownloadListener;
 
 /**
-* @class    DownloadManager
-* @brief    This class provides methods to handle HTTP downloads.
-*
-* @since 2.0
-*
-* @final       This class is not intended for extension.
-*
-* The %DownloadManager class provides methods to handle HTTP downloads. A download request consists of a URL and a destination path; of which the URL is mandatory for downloading the content. If the destination path is not specified, the content is downloaded to a default download storage that can be obtained with the System::Environment::GetDefaultDownloadPath() method.
-* This class conducts the download in the background and calls the Start() method that takes care of the HTTP connections. @n
-* The download operation can be:
-* - Paused by calling the Pause() method
-* - Resumed by calling the Resume() method
-* - Cancelled by calling the Cancel() method
-* Depending on how the download operation is terminated the following methods are called:
-* - IDownloadListener::OnDownloadCanceled() when the download is cancelled
-* - IDownloadListener::OnDownloadCompleted() when the download is completed without any errors
-* - IDownloadListener::OnDownloadFailed() when the download is stopped because of an error
-*
-* The following example demonstrates how to use the %DownloadManager class.
-*
-* @code
-*
-* #include <FBase.h>
-* #include <FContent.h>
-*
-* using namespace Tizen::Base;
-* using namespace Tizen::Content;
-* using namespace Tizen::App;
-*
-* class MyAppClass
-*      : public Tizen::Content::IDownloadListener
-* {
-* public:
-*      result Download(const String& url);
-*      virtual void OnDownloadCanceled(RequestId reqId) {}
-*      virtual void OnDownloadCompleted(RequestId reqId, const Tizen::Base::String& path);
-*      virtual void OnDownloadFailed(RequestId reqId, result r, const Tizen::Base::String& errorCode);
-*      virtual void OnDownloadPaused(RequestId reqId) {}
-*      virtual void OnDownloadInProgress(RequestId reqId, unsigned long long receivedSize, unsigned long long totalSize) {}
-*
-* };
-*
-* result
-* MyAppClass::Download(const String& url)
-* {
-*      result r = E_SUCCESS;
-*      RequestId reqId = 0;
-*
-*      DownloadRequest request(url);
-*      DownloadManager* pManager = DownloadManager::GetInstance();
-*
-*      pManager->SetDownloadListener(this);
-*      pManager->Start(request, reqId);
-*
-*      return r;
-* }
-*
-* void
-* MyAppClass::void OnDownloadCompleted(RequestId reqId, const Tizen::Base::String& path)
-* {
-*      AppLog("Download is completed.");
-* }
-*
-* void
-* MyAppClass::OnDownloadFailed(RequestId reqId, result r, const Tizen::Base::String& errorCode)
-* {
-*      AppLog("Download failed.");
-* }
-*
-* @endcode
-*/
+ * @class    DownloadManager
+ * @brief    This class provides methods to handle HTTP downloads.
+ *
+ * @since 2.0
+ *
+ * @final      This class is not intended for extension.
+ *
+ * The %DownloadManager class provides methods to handle HTTP downloads. A download request consists of a URL and a destination path; of which the URL is mandatory for downloading the content. If the destination path is not specified, the content is downloaded to a default download storage that can be obtained with the System::Environment::GetDefaultDownloadPath() method.
+ * This class conducts the download in the background and calls the Start() method that takes care of the HTTP connections. @n
+ * The download operation can be:
+ * - Paused by calling the Pause() method
+ * - Resumed by calling the Resume() method
+ * - Cancelled by calling the Cancel() method
+ * Depending on how the download operation is terminated the following methods are called:
+ * - IDownloadListener::OnDownloadCanceled() when the download is cancelled
+ * - IDownloadListener::OnDownloadCompleted() when the download is completed without any errors
+ * - IDownloadListener::OnDownloadFailed() when the download is stopped because of an error
+ *
+ * The following example demonstrates how to use the %DownloadManager class.
+ *
+ * @code
+ * #include <FApp.h>
+ * #include <FBase.h>
+ * #include <FContent.h>
+ *
+ * using namespace Tizen::App;
+ * using namespace Tizen::Base;
+ * using namespace Tizen::Content;
+ *
+ * class MyAppClass
+ *     : public Tizen::Content::IDownloadListener
+ * {
+ * public:
+ *             result Download(const String& url);
+ *             virtual void OnDownloadCanceled(RequestId reqId) {}
+ *             virtual void OnDownloadCompleted(RequestId reqId, const Tizen::Base::String& path);
+ *             virtual void OnDownloadFailed(RequestId reqId, result r, const Tizen::Base::String& errorCode);
+ *             virtual void OnDownloadPaused(RequestId reqId) {}
+ *             virtual void OnDownloadInProgress(RequestId reqId, unsigned long long receivedSize, unsigned long long totalSize) {}
+ *
+ * };
+ *
+ * result
+ * MyAppClass::Download(const String& url)
+ * {
+ *             DownloadRequest request(url);
+ *             DownloadManager* pManager = DownloadManager::GetInstance();
+ *
+ *             RequestId reqId = 0;
+ *             pManager->SetDownloadListener(this);
+ *             result r = pManager->Start(request, reqId);
+ *
+ *             return r;
+ * }
+ *
+ * void
+ * MyAppClass::void OnDownloadCompleted(RequestId reqId, const Tizen::Base::String& path)
+ * {
+ *             AppLog("Download is completed.");
+ * }
+ *
+ * void
+ * MyAppClass::OnDownloadFailed(RequestId reqId, result r, const Tizen::Base::String& errorCode)
+ * {
+ *             AppLog("Download failed.");
+ * }
+ * @endcode
+ */
 
 class _OSP_EXPORT_ DownloadManager
        : public Tizen::Base::Object
 {
 public:
        /**
-       * Gets the download manager instance of the application.
-       *
-       * @since 2.0
-       *
-       * @return                A pointer to the %DownloadManager instance, @n
-                                      else @c null if it fails
-       * @exception     E_SUCCESS           The method is successful.
-       * @exception     E_SYSTEM            The method cannot proceed due to a severe system error.
-       * @remarks       The specific error code can be accessed using the GetLastResult() method.
-       */
+        * Gets the download manager instance of the application.
+        *
+        * @since 2.0
+        *
+        * @return               A pointer to the %DownloadManager instance, @n
+        *                               else @c null if it fails
+        * @exception     E_SUCCESS           The method is successful.
+        * @exception     E_SYSTEM            The method cannot proceed due to a severe system error.
+        * @remarks       The specific error code can be accessed using the GetLastResult() method.
+        */
        static DownloadManager* GetInstance(void);
 
        /**
-       * Starts the download operation. @n
-       * If this operation succeeds, the IDownloadListener::OnDownloadInProgress() method is called. @n
-       *
-       * @since 2.0
-       * @privlevel    public
-       * @privilege    %http://tizen.org/privilege/download
-       *
-       * @return       An error code
-       * @param[in]    request              The download request
-       * @param[out]   reqId                The request ID
-       * @exception    E_SUCCESS            The method is successful.
-       * @exception    E_INVALID_ARG            The information of the download request is invalid.
-       * @exception    E_ILLEGAL_ACCESS         The access to the path of the download request is denied due to insufficient permission.
-       * @exception    E_PRIVILEGE_DENIED       The application does not have the privilege to call this method.
-       * @exception    E_USER_NOT_CONSENTED The user has blocked the application from calling this method.
-       * @exception    E_SYSTEM             The method cannot proceed due to a severe system error.
-       */
+        * Starts the download operation. @n
+        * If this operation succeeds, the IDownloadListener::OnDownloadInProgress() method is called. @n
+        *
+        * @since 2.0
+        * @privlevel   public
+        * @privilege   %http://tizen.org/privilege/download
+        *
+        * @return       An error code
+        * @param[in]    request              The download request
+        * @param[out]   reqId                The request ID
+        * @exception    E_SUCCESS            The method is successful.
+        * @exception   E_INVALID_ARG            The information of the download request is invalid.
+        * @exception   E_ILLEGAL_ACCESS         The access to the path of the download request is denied due to insufficient permission.
+        * @exception   E_PRIVILEGE_DENIED       The application does not have the privilege to call this method.
+        * @exception   E_USER_NOT_CONSENTED The user has blocked the application from calling this method.
+        * @exception    E_SYSTEM             The method cannot proceed due to a severe system error.
+        */
        result Start(const DownloadRequest& request, RequestId& reqId);
 
        /**
-       * Pauses the download operation of the specified request ID. @n
-       * If this operation succeeds, the IDownloadListener::OnDownloadPaused() method is called.
-       *
-       * @since 2.0
-       *
-       * @return       An error code
-       * @param[in]    reqId               The request ID returned by Start()
-       * @exception    E_SUCCESS           The method is successful.
-       * @exception    E_INVALID_ARG           There is no download request for the specified @c reqId.
-       * @exception    E_INVALID_OPERATION     Either of the following conditions has occurred:
-                                                                     - The current download state prohibits the execution of this operation.
-                                                                     - The download state of the request ID is not downloading.
-       * @exception    E_SYSTEM            The method cannot proceed due to a severe system error.
-       */
+        * Pauses the download operation of the specified request ID. @n
+        * If this operation succeeds, the IDownloadListener::OnDownloadPaused() method is called.
+        *
+        * @since 2.0
+        *
+        * @return       An error code
+        * @param[in]    reqId               The request ID returned by Start()
+        * @exception    E_SUCCESS           The method is successful.
+        * @exception   E_INVALID_ARG           There is no download request for the specified @c reqId.
+        * @exception   E_INVALID_OPERATION     Either of the following conditions has occurred:
+        *                                                              - The current download state prohibits the execution of this operation.
+        *                                                              - The download state of the request ID is not downloading.
+        * @exception    E_SYSTEM            The method cannot proceed due to a severe system error.
+        */
        result Pause(RequestId reqId);
 
        /**
-       * Resumes the download operation of the specified request ID. @n
-       * If this operation succeeds, the IDownloadListener::OnDownloadInProgress() method is called.
-       *
-       * @since 2.0
-       *
-       * @return       An error code
-       * @param[in]    reqId               The request ID returned by Start()
-       * @exception    E_SUCCESS           The method is successful.
-       * @exception    E_INVALID_ARG           There is no download request for the specified @c reqId.
-       * @exception    E_INVALID_OPERATION     Either of the following conditions has occurred:
-                                                                     - The current download state prohibits the execution of this operation.
-                                                                     - The download state for the specified request ID is either not paused or has failed.
-       * @exception    E_SYSTEM            The method cannot proceed due to a severe system error.
-       */
+        * Resumes the download operation of the specified request ID. @n
+        * If this operation succeeds, the IDownloadListener::OnDownloadInProgress() method is called.
+        *
+        * @since 2.0
+        *
+        * @return       An error code
+        * @param[in]    reqId               The request ID returned by Start()
+        * @exception    E_SUCCESS           The method is successful.
+        * @exception   E_INVALID_ARG           There is no download request for the specified @c reqId.
+        * @exception   E_INVALID_OPERATION     Either of the following conditions has occurred:
+        *                                                              - The current download state prohibits the execution of this operation.
+        *                                                              - The download state for the specified request ID is either not paused or has failed.
+        * @exception    E_SYSTEM            The method cannot proceed due to a severe system error.
+        */
        result Resume(RequestId reqId);
 
        /**
-       * Cancels the download operation of the specified request ID.
-       *
-       * @since 2.0
-       *
-       * @return       An error code
-       * @param[in]    reqId               The request ID returned by Start()
-       * @exception    E_SUCCESS           The method is successful.
-       * @exception    E_INVALID_ARG           There is no download request for the specified @c reqId.
-       * @exception    E_SYSTEM            The method cannot proceed due to a severe system error.
-       */
+        * Cancels the download operation of the specified request ID.
+        *
+        * @since 2.0
+        *
+        * @return       An error code
+        * @param[in]    reqId               The request ID returned by Start()
+        * @exception    E_SUCCESS           The method is successful.
+        * @exception   E_INVALID_ARG           There is no download request for the specified @c reqId.
+        * @exception    E_SYSTEM            The method cannot proceed due to a severe system error.
+        */
        result Cancel(RequestId reqId);
 
        /**
-       * Gets the download request information of the specified request ID.
-       *
-       * @since 2.0
-       *
-       * @return       The download request @n
-                                 The download request information is available for at least the next 24 hours after IDownloadListener::OnDownloadCompleted() is called.
-       * @param[in]    reqId               The request ID returned by Start()
-       * @exception    E_SUCCESS           The method is successful.
-       * @exception    E_INVALID_ARG           There is no download request for the specified @c reqId.
-       * @remarks              The specific error code can be accessed using the GetLastResult() method.
-       */
+        * Gets the download request information of the specified request ID.
+        *
+        * @since 2.0
+        *
+        * @return       The download request @n
+        *                          The download request information is available for at least the next 24 hours after IDownloadListener::OnDownloadCompleted() is called.
+        * @param[in]    reqId               The request ID returned by Start()
+        * @exception    E_SUCCESS           The method is successful.
+        * @exception   E_INVALID_ARG           There is no download request for the specified @c reqId.
+        * @remarks             The specific error code can be accessed using the GetLastResult() method.
+        */
        DownloadRequest* GetDownloadRequestN(RequestId reqId) const;
 
        /**
-       * Gets the download state of the given request ID. @n
-       * If there is no download request for the request ID, @c DOWNLOAD_STATE_NONE is returned.
-       *
-       * @since 2.0
-       *
-       * @return       The download state @n
-                                     The download state information is available for at least the next 24 hours after IDownloadListener::OnDownloadCompleted() is called.
-       * @param[in]    reqId               The request ID returned by Start()
-       */
+        * Gets the download state of the given request ID. @n
+        * If there is no download request for the request ID, @c DOWNLOAD_STATE_NONE is returned.
+        *
+        * @since 2.0
+        *
+        * @return       The download state @n
+        *                              The download state information is available for at least the next 24 hours after IDownloadListener::OnDownloadCompleted() is called.
+        * @param[in]    reqId               The request ID returned by Start()
+        */
        DownloadState GetState(RequestId reqId) const;
 
        /**
-       * Gets the MIME type of a download request.
-       *
-       * @since 2.0
-       *
-       * @return       An error code
-       * @param[in]    reqId               The request ID returned by Start()
-       * @param[out]   mimeType            The MIME type @n
-                                                                             The MIME type information is available for at least the next 24 hours after IDownloadListener::OnDownloadCompleted()
-                                                                             is called.
-       * @exception    E_SUCCESS           The method is successful.
-       * @exception    E_INVALID_ARG           There is no download request for the specified @c reqId.
-       * @exception    E_INVALID_OPERATION     Either of the following conditions has occurred:
-                                                                     - The current download state prohibits the execution of this operation.
-                                                                     - The download operation has not yet started.
-       * @exception    E_SYSTEM            The method cannot proceed due to a severe system error.
-       */
+        * Gets the MIME type of a download request.
+        *
+        * @since 2.0
+        *
+        * @return       An error code
+        * @param[in]    reqId               The request ID returned by Start()
+        * @param[out]   mimeType            The MIME type @n
+        *                                                                      The MIME type information is available for at least the next 24 hours after IDownloadListener::OnDownloadCompleted()
+        *                                                                      is called.
+        * @exception    E_SUCCESS           The method is successful.
+        * @exception   E_INVALID_ARG           There is no download request for the specified @c reqId.
+        * @exception   E_INVALID_OPERATION     Either of the following conditions has occurred:
+        *                                                              - The current download state prohibits the execution of this operation.
+        *                                                              - The download operation has not yet started.
+        * @exception    E_SYSTEM            The method cannot proceed due to a severe system error.
+        */
        result GetMimeType(RequestId reqId, Tizen::Base::String& mimeType) const;
 
        /**
-       * Sets the download listener.
-       *
-       * @since 2.0
-       *
-       * @param[in]    pListener           The download listener @n
-                                                                             If this is @c null, it unsets the download listener
-       */
+        * Sets the download listener.
+        *
+        * @since 2.0
+        *
+        * @param[in]   pListener           The download listener @n
+        *                                                                      If this is @c null, it unsets the download listener
+        */
        void SetDownloadListener(IDownloadListener* pListener);
 
 private:
-       /**
-       * This default constructor is intentionally declared as private to implement the Singleton semantic.
-       */
+       //
+       // This default constructor is intentionally declared as private to implement the Singleton semantic.
+       //
        DownloadManager(void);
 
-       /**
-       * This destructor is intentionally declared as private to implement the Singleton semantic.
-       */
+       //
+       // This destructor is intentionally declared as private to implement the Singleton semantic.
+       //
        virtual ~DownloadManager(void);
 
-       /**
-       * The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
-       */
+       //
+       // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
+       //
        DownloadManager(const DownloadManager& downloadManager);
 
-       /**
-       * The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
-       */
+       //
+       // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
+       //
        DownloadManager& operator =(const DownloadManager& downloadManager);
 
        friend class _DownloadManagerImpl;
index 4dab754..958b68b 100644 (file)
@@ -31,64 +31,64 @@ namespace Tizen { namespace Content
 {
 
 /**
-* @class    DownloadRequest
-* @brief    This class provides information of a download request.
-*
-* @since 2.0
-*
-* @final       This class is not intended for extension.
-*
-* The %DownloadRequest class provides information of a download request. It provides the URL of a download request, which is the mandatory information. It also provides the destination directory path and the file name. The destination directory path and file name can be set by the SetDirectoryPath() and SetFileName() methods. @n
-* If the download path is not specified, the data is downloaded to the default download directory returned by Tizen::System::Environment::GetDefaultDownloadPath().
-*
-*/
+ * @class    DownloadRequest
+ * @brief    This class provides information of a download request.
+ *
+ * @since 2.0
+ *
+ * @final      This class is not intended for extension.
+ *
+ * The %DownloadRequest class provides information of a download request. It provides the URL of a download request, which is the mandatory information. It also provides the destination directory path and the file name. The destination directory path and file name can be set by the SetDirectoryPath() and SetFileName() methods. @n
+ * If the download path is not specified, the data is downloaded to the default download directory returned by Tizen::System::Environment::GetDefaultDownloadPath().
+ *
+ */
 
 class _OSP_EXPORT_ DownloadRequest
        : public Tizen::Base::Object
 {
 public:
        /**
-       * Initializes this instance of %DownloadRequest with the specified URL. @n
-       * The downloaded path is set to a default download directory returned by Tizen::System::Environment::GetDefaultDownloadPath().
-       *
-       * @since 2.0
-       *
-       * @param[in]  url               The URL of the download request
-       */
+        * Initializes this instance of %DownloadRequest with the specified URL. @n
+        * The downloaded path is set to a default download directory returned by Tizen::System::Environment::GetDefaultDownloadPath().
+        *
+        * @since 2.0
+        *
+        * @param[in]  url              The URL of the download request
+        */
        DownloadRequest(const Tizen::Base::String& url);
 
        /**
-       * Initializes this instance of %DownloadRequest with the specified URL and directory path.
-       *
-       * @since 2.0
-       *
-       * @param[in]  url               The URL of the download request
-       * @param[in]  dirPath   The directory path of the data that is downloaded
-       */
+        * Initializes this instance of %DownloadRequest with the specified URL and directory path.
+        *
+        * @since 2.0
+        *
+        * @param[in]  url              The URL of the download request
+        * @param[in]  dirPath  The directory path of the data that is downloaded
+        */
        DownloadRequest(const Tizen::Base::String& url, const Tizen::Base::String& dirPath);
 
        /**
-       * Copying of objects using this copy constructor is allowed.
-       *
-       * @since 2.0
-       *
-       * @param[in]  rhs               An instance of %DownloadRequest to copy
-       */
+        * Copying of objects using this copy constructor is allowed.
+        *
+        * @since 2.0
+        *
+        * @param[in]  rhs              An instance of %DownloadRequest to copy
+        */
        DownloadRequest(const DownloadRequest& rhs);
 
        /**
-       * This destructor overrides Tizen::Base::Object::~Object().
-       *
-       * @since 2.0
-       */
+        * This destructor overrides Tizen::Base::Object::~Object().
+        *
+        * @since 2.0
+        */
        virtual ~DownloadRequest(void);
 
        /**
-       * Copying of objects using this copy assignment operator is allowed.
-       *
-       * @return               A reference to this instance
-       * @param[in]    rhs             An instance of %DownloadRequest to copy
-       */
+        * Copying of objects using this copy assignment operator is allowed.
+        *
+        * @return              A reference to this instance
+        * @param[in]   rhs             An instance of %DownloadRequest to copy
+        */
        DownloadRequest& operator =(const DownloadRequest& rhs);
 
        /**
@@ -112,170 +112,170 @@ public:
        virtual int GetHashCode(void) const;
 
        /**
-       * Sets the directory path of the data that is downloaded.
-       *
-       * @since 2.0
-       *
-       * @param[in]  dirPath   The directory path
-       */
+        * Sets the directory path of the data that is downloaded.
+        *
+        * @since 2.0
+        *
+        * @param[in]  dirPath  The directory path
+        */
        void SetDirectoryPath(const Tizen::Base::String& dirPath); 
 
        /**
-       * Sets the file name of the data that is downloaded.
-       *
-       * @since 2.0
-       *
-       * @param[in]  fileName  The file name
-       */
+        * Sets the file name of the data that is downloaded.
+        *
+        * @since 2.0
+        *
+        * @param[in]  fileName The file name
+        */
        void SetFileName(const Tizen::Base::String& fileName); 
 
        /**
-       * Gets the URL of the download request.
-       *
-       * @since 2.0
-       *
-       * @return               The URL of this download request
-       */
+        * Gets the URL of the download request.
+        *
+        * @since 2.0
+        *
+        * @return              The URL of this download request
+        */
        Tizen::Base::String GetUrl(void) const;
 
        /**
-       * Gets the directory path of the data that is downloaded.
-       *
-       * @since 2.0
-       *
-       * @return               The directory path
-       */
+        * Gets the directory path of the data that is downloaded.
+        *
+        * @since 2.0
+        *
+        * @return              The directory path
+        */
        Tizen::Base::String GetDirectoryPath(void) const;
 
        /**
-       * Gets the file name of the data that is downloaded.
-       *
-       * @since 2.0
-       *
-       * @return               The file name
-       */
+        * Gets the file name of the data that is downloaded.
+        *
+        * @since 2.0
+        *
+        * @return              The file name
+        */
        Tizen::Base::String GetFileName(void) const;
 
        /**
-       * Determines whether the system should show the download notification or not. @n
-       * If @c true, the system posts notifications about this download request through the Tizen::Shell::NotificationManager. @n
-       * By default, this value is set to @c true.
-       *
-       * @since 2.1
-       *
-       * @param[in] enable Set to @c true if the system shows a notification for this download request, @n
-                                             else @c false
-       */
+        * Determines whether the system should show the download notification or not. @n
+        * If @c true, the system posts notifications about this download request through the Tizen::Shell::NotificationManager. @n
+        * By default, this value is set to @c true.
+        *
+        * @since 2.1
+        *
+        * @param[in] enable Set to @c true if the system shows a notification for this download request, @n
+        *                                      else @c false
+        */
        void SetNotification(bool enable);
 
        /**
-       * Sets extra data that is delivered to the application when the notification message is selected. @n
-       * The extra data is passed to the application through the
-       * Tizen::App::IAppControlProviderEventListener::OnAppControlRequestReceived() method.
-       *
-       * @since 2.1
-       *
-       * @return        An error code
-       * @param[in] pExtraData    A pointer to the argument map of the Tizen::Base::String key and the %Tizen::Base::String value pair
-       * @exception E_SUCCESS     The method is successful.
-       * @exception E_INVALID_ARG Either of the following conditions has occurred:
-                                                     - The argument is @c null.
-                                                     - The argument is not a map of the Tizen::Base::String key and the %Tizen::Base::String value pair.
-       * @see Tizen::Shell::NotificationManager
-       */
+        * Sets extra data that is delivered to the application when the notification message is selected. @n
+        * The extra data is passed to the application through the
+        * Tizen::App::IAppControlProviderEventListener::OnAppControlRequestReceived() method.
+        *
+        * @since 2.1
+        *
+        * @return       An error code
+        * @param[in] pExtraData    A pointer to the argument map of the Tizen::Base::String key and the %Tizen::Base::String value pair
+        * @exception E_SUCCESS     The method is successful.
+        * @exception E_INVALID_ARG Either of the following conditions has occurred:
+        *                                              - The argument is @c null.
+        *                                              - The argument is not a map of the Tizen::Base::String key and the %Tizen::Base::String value pair.
+        * @see Tizen::Shell::NotificationManager
+        */
        result SetNotificationExtraData(const Tizen::Base::Collection::IMap *pExtraData);
 
        /**
-       * Sets the allowed network type. @n
-       * By default, all network types are allowed.
-       *
-       * @since 2.1
-       *
-       * @param[in] type The download network type
-       */
+        * Sets the allowed network type. @n
+        * By default, all network types are allowed.
+        *
+        * @since 2.1
+        *
+        * @param[in] type The download network type
+        */
        void SetNetworkType(DownloadNetworkType type);
 
        /**
-       * Checks whether the system should show a notification for this download request.
-       *
-       * @since 2.1
-       *
-       * @return @c true if the system should show a notification for this download request, @n
-                       else @c false
-       */
+        * Checks whether the system should show a notification for this download request.
+        *
+        * @since 2.1
+        *
+        * @return @c true if the system should show a notification for this download request, @n
+        *                else @c false
+        */
        bool IsNotificationEnabled(void) const;
 
        /**
-       * Gets the extra data that is delivered to the application when the notification message is selected.
-       *
-       * @since 2.1
-       *
-       * @return The extra data map that consists of the Tizen::Base::String key and the %Tizen::Base::String value pair
-       */
+        * Gets the extra data that is delivered to the application when the notification message is selected.
+        *
+        * @since 2.1
+        *
+        * @return The extra data map that consists of the Tizen::Base::String key and the %Tizen::Base::String value pair
+        */
        const Tizen::Base::Collection::IMap* GetNotificationExtraData(void) const;
 
        /**
-       * Gets the allowed network type.
-       *
-       * @since 2.1
-       *
-       * @return The network type
-       */
+        * Gets the allowed network type.
+        *
+        * @since 2.1
+        *
+        * @return The network type
+        */
        DownloadNetworkType GetNetworkType(void) const;
 
        /**
-       * Adds the HTTP header field.
-       *
-       * @since 2.1
-       *
-       * @return        An error code
-       * @param[in] field                      The HTTP header field
-       * @param[in] value                      The value of the header field
-       * @exception E_SUCCESS          The method is successful.
-       * @exception E_INVALID_ARG      Either the field is empty or it already exists.
-       */
+        * Adds the HTTP header field.
+        *
+        * @since 2.1
+        *
+        * @return       An error code
+        * @param[in] field                     The HTTP header field
+        * @param[in] value                     The value of the header field
+        * @exception E_SUCCESS                 The method is successful.
+        * @exception E_INVALID_ARG     Either the field is empty or it already exists.
+        */
        result AddRequestHeader(const Tizen::Base::String& field, const Tizen::Base::String& value);
 
        /**
-       * Sets the HTTP header field.
-       *
-       * @since 2.1
-       *
-       * @return        An error code
-       * @param[in] field                      The HTTP header field
-       * @param[in] value                      The value of the header field
-       * @exception E_SUCCESS      The method is successful.
-       * @exception E_INVALID_ARG  Either the field is empty or it does not exist.
-       */
+        * Sets the HTTP header field.
+        *
+        * @since 2.1
+        *
+        * @return       An error code
+        * @param[in] field                     The HTTP header field
+        * @param[in] value                     The value of the header field
+        * @exception E_SUCCESS             The method is successful.
+        * @exception E_INVALID_ARG  Either the field is empty or it does not exist.
+        */
        result SetRequestHeader(const Tizen::Base::String& field, const Tizen::Base::String& value);
 
        /**
-       * Removes the HTTP header field.
-       *
-       * @since 2.1
-       *
-       * @return        An error code
-       * @param[in] field                      The HTTP header field
-       * @exception E_SUCCESS          The method is successful.
-       * @exception E_INVALID_ARG  Either the field is empty or it does not exist.
-       */
+        * Removes the HTTP header field.
+        *
+        * @since 2.1
+        *
+        * @return       An error code
+        * @param[in] field                     The HTTP header field
+        * @exception E_SUCCESS                 The method is successful.
+        * @exception E_INVALID_ARG  Either the field is empty or it does not exist.
+        */
        result RemoveRequestHeader(const Tizen::Base::String& field);
 
        /**
-       * Gets the value of the HTTP header field.
-       *
-       * @since 2.1
-       *
-       * @return        The value of the HTTP header field if successful, @n
-                              else @c null if there is no HTTP header field
-       * @param[in] field              The HTTP header field
-       */
+        * Gets the value of the HTTP header field.
+        *
+        * @since 2.1
+        *
+        * @return       The value of the HTTP header field if successful, @n
+        *                       else @c null if there is no HTTP header field
+        * @param[in] field             The HTTP header field
+        */
        Tizen::Base::String* GetRequestHeaderN(const Tizen::Base::String& field);
 
 private:
-       /**
-       * This default constructor is intentionally declared as private so that only the platform can create an instance.
-       */
+       //
+       // This default constructor is intentionally declared as private so that only the platform can create an instance.
+       //
        DownloadRequest(void);
 
        friend class _DownloadRequestImpl;
index cd76c4d..2dbb008 100644 (file)
@@ -30,13 +30,13 @@ namespace Tizen { namespace Content
 {
 
 /**
-* @interface IDownloadListener
-* @brief    This interface is used for receiving the download operation events.
-*
-* @since 2.0
-*
-* The %IDownloadListener interface is used for receiving the download operation events.
-*/
+ * @interface IDownloadListener
+ * @brief    This interface is used for receiving the download operation events.
+ *
+ * @since 2.0
+ *
+ * The %IDownloadListener interface is used for receiving the download operation events.
+ */
 class _OSP_EXPORT_ IDownloadListener
        : virtual public Tizen::Base::Runtime::IEventListener
 {
@@ -138,6 +138,7 @@ protected:
        // @since 2.0
        //
        virtual void IDownloadListener_Reserved3(void) {}
+
 }; // IDownloadListener
 
 } } // Tizen::Content
index fc02e6e..daec097 100644 (file)
@@ -47,25 +47,27 @@ class _ImageContentData;
  * The following example demonstrates how to use the %ImageContentInfo class.
  *
  * @code
+ * #include <FApp.h>
+ * #include <FBase.h>
+ * #include <FContent.h>
+ * #include <FSystem.h>
+ *
+ * using namespace Tizen::Content;
+ *
  * result
  * MyClass::TestImageContentInfo(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;
  * }
index e6c1974..384737b 100644 (file)
@@ -47,57 +47,35 @@ class _ImageMetadataImpl;
  * The following example demonstrates how to use the %ImageMetadata class.
  *
  * @code
+ * #include <FBase.h>
+ * #include <FContent.h>
+ * #include <FMedia.h>
+ * #include <FSystem.h>
+ *
+ * using namespace Tizen::Content;
+ *
  * result
  * MyClass::TestImageMetadata(void)
  * {
- *             result r = E_SUCCESS;
- *
  *             Tizen::Base::String contentPath = Tizen::System::Environment::GetMediaPath() + L"Images/full_meta.jpg";
  *             ImageMetadata* pImgMeta = ContentManagerUtil::GetImageMetaN(contentPath);
- *             TryReturn(pImgMeta != null, GetLastResult(), "ContentManagerUtil::GetImageMetaN failed.");
+ *             result r = GetLastResult();
  *
- *             // Width
  *             pImgMeta->GetWidth();
- *
- *             // Height
  *             pImgMeta->GetHeight();
- *
- *             // Camera
  *             pImgMeta->GetCameraManufacturer();
- *
- *             // Model
  *             pImgMeta->GetCameraModel();
- *
- *             // Software
  *             pImgMeta->GetSoftware();
- *
- *             // Date time
  *             pImgMeta->GetDateTime();
  *
- *             // Thumbnail
  *             Tizen::Media::Image image;
  *             r = image.Construct();
- *             if (IsFailed(r))
- *             {
- *                     delete pImgMeta;
- *                     return r;
- *             }
  *
  *             Tizen::Graphics::Bitmap* pBitmap = pImgMeta->GetThumbnailN();
- *             if (pBitmap == null)
- *             {
- *                     delete pImgMeta;
- *                     return GetLastResult();
- *             }
+ *             r = GetLastResult();
  *
  *             Tizen::Base::String thumbnailPath = Tizen::System::Environment::GetMediaPath() + L"Images/image.bmp";
  *             r = image.EncodeToFile(*pBitmap, Tizen::Media::IMG_FORMAT_BMP, thumbnailPath, false);
- *             if (IsFailed(r))
- *             {
- *                     delete pImgMeta;
- *                     delete pBitmap;
- *                     return r;
- *             }
  *
  *             delete pImgMeta;
  *             delete pBitmap;
index 5c65a6b..9e71d87 100644 (file)
@@ -47,25 +47,26 @@ class _OtherContentInfoImpl;
  * The following example demonstrates how to use the %OtherContentInfo class.
  *
  * @code
+ * #include <FBase.h>
+ * #include <FContent.h>
+ * #include <FSystem.h>
+ *
+ * using namespace Tizen::Content;
+ *
  * result
  * MyClass::TestOtherContentInfo(void)
  * {
- *             result r = E_SUCCESS;
- *
- *             ContentId contentId;
  *             ContentManager contentManager;
- *             r = contentManager.Construct();
- *             TryReturn(!IsFailed(r), r, "Construct failed.");
+ *             result r = contentManager.Construct();
  *
  *             OtherContentInfo otherContentInfo;
  *             r = otherContentInfo.Construct(null);
- *             TryReturn(!IsFailed(r), r, "Construct failed.");
  *
  *             Tizen::Base::String sourcePath = Tizen::App::App::GetInstance()->GetAppRootPath() + L"data/flower.doc";
  *             Tizen::Base::String destPath = Tizen::System::Environment::GetMediaPath() + L"Others/flower.doc";
  *
- *             contentId = contentManager.CreateContent(sourcePath, destPath, false, &otherContentInfo);
- *             TryReturn(Tizen::Base::UuId::GetInvalidUuId() != contentId, GetLastResult(), "CreateContent failed.");
+ *             ContentId contentId = contentManager.CreateContent(sourcePath, destPath, false, &otherContentInfo);
+ *             r = GetLastResult();
  *
  *             return r;
  * }
index cbc4c27..65a5527 100644 (file)
@@ -37,48 +37,38 @@ namespace Tizen { namespace Content
 class _PlayListImpl;
 
 /**
- *     @class          PlayList
- *     @brief          This class provides methods to access the playlist information.
+ * @class          PlayList
+ * @brief          This class provides methods to access the playlist information.
  *
- *     @since          2.0
+ * @since          2.0
  *
- *     @final          This class is not intended for extension.
+ * @final          This class is not intended for extension.
  *
- *     The %PlayList class provides methods to access the playlist information.
- *     The methods of this class help to immediately access the database and update it.
+ * The %PlayList class provides methods to access the playlist information.
+ * The methods of this class help to immediately access the database and update it.
  *
- *     The following example demonstrates how to use the %PlayList class.
+ * The following example demonstrates how to use the %PlayList class.
  *
- *     @code
- *     #include <FContent.h>
+ * @code
+ * #include <FBase.h>
+ * #include <FContent.h>
  *
- *     using namespace Tizen::Base;
- *     using namespace Tizen::Base::Collection;
- *     using namespace Tizen::Content;
+ * using namespace Tizen::Content;
  *
- *     void
- *     MyClass::Test(void)
- *     {
- *             // Get an instance of PlayList
- *             PlayList playList;
- *             result r = playList.Construct("my_playlist_1");
- *             if (IsFailed(r))
- *             {
+ * void
+ * MyClass::Test(void)
+ * {
+ *             PlayList playList;
+ *             result r = playList.Construct("my_playlist_1");
  *
- *             }
+ *             Tizen::Base::Collection::IList* pList = playList.GetContentInfoListN();
+ *             r = GetLastResult();
  *
- *             IList* pList = playList.GetContentInfoListN();
- *             if (IsFailed(r))
- *             {
+ *             pList->RemoveAll(true);
+ *             delete pList;
+ * }
  *
- *             }
- *
- *             // Delete resource
- *             pList->RemoveAll(true);
- *             delete pList;
- *     }
- *
- *     @endcode
+ * @endcode
  *
  */
 class _OSP_EXPORT_ PlayList
index cb6dfca..0b6ba22 100644 (file)
@@ -38,47 +38,36 @@ class PlayList;
 class _PlayListManagerImpl;
 
 /**
- *     @class          PlayListManager
- *     @brief          This class provides methods to manage the playlist.
+ * @class              PlayListManager
+ * @brief              This class provides methods to manage the playlist.
  *
- *     @since          2.0
+ * @since              2.0
  *
- *     @final          This class is not intended for extension.
+ * @final              This class is not intended for extension.
  *
- *     The %PlayListManager class provides methods to manage the playlist.
- *     The methods of this class help to immediately access the database and update it.
+ * The %PlayListManager class provides methods to manage the playlist.
+ * The methods of this class help to immediately access the database and update it.
  *
- *     The following example demonstrates how to use the %PlayListManager class.
+ * The following example demonstrates how to use the %PlayListManager class.
  *
- *     @code
- *     #include <FContent.h>
+ * @code
+ * #include <FBase.h>
+ * #include <FContent.h>
  *
- *     using namespace Tizen::Base;
- *     using namespace Tizen::Base::Collection;
- *     using namespace Tizen::Content;
+ * using namespace Tizen::Content;
  *
- *     void
- *     MyClass::Test(void)
- *     {
- *             // Call an instance of PlayListManager
- *             PlayListManager* pManager = PlayListManager::GetInstance();
- *             if (IsFailed(GetLastResult()))
- *             {
+ * void
+ * MyClass::Test(void)
+ * {
+ *             PlayListManager* pManager = PlayListManager::GetInstance();
  *
- *             }
+ *             Tizen::Base::Collection::IList* pList = pManager->GetAllPlayListNameN();
+ *             result r = GetLastResult();
  *
- *             IList* pList = pManager->GetAllPlayListNameN();
- *             if (IsFailed(GetLastResult()))
- *             {
- *
- *             }
- *
- *             // Delete resource
- *             pList->RemoveAll(true);
- *             delete pList;
- *     }
- *
- *     @endcode
+ *             pList->RemoveAll(true);
+ *             delete pList;
+ * }
+ * @endcode
  */
 class _OSP_EXPORT_ PlayListManager
        : public Tizen::Base::Object
index 588c61a..f6fbc0f 100644 (file)
@@ -50,25 +50,27 @@ class _VideoContentData;
  * The following example demonstrates how to use the %VideoContentInfo class.
  *
  * @code
+ * #include <FApp.h>
+ * #include <FBase.h>
+ * #include <FContent.h>
+ * #include <FSystem.h>
+ *
+ * using namespace Tizen::Content;
+ *
  * result
  * MyClass::TestVideoContentInfo(void)
  * {
- *             result r = E_SUCCESS;
- *
- *             ContentId contentId;
  *             ContentManager contentManager;
- *             r = contentManager.Construct();
- *             TryReturn(!IsFailed(r), r, "Construct failed.");
+ *             result r = contentManager.Construct();
  *
  *             VideoContentInfo videoContentInfo;
  *             r = videoContentInfo.Construct(null);
- *             TryReturn(!IsFailed(r), r, "Construct failed.");
  *
  *             Tizen::Base::String sourcePath = Tizen::App::App::GetInstance()->GetAppRootPath() + L"data/flower.wmv";
  *             Tizen::Base::String destPath = Tizen::System::Environment::GetMediaPath() + L"Videos/flower.wmv";
  *
- *             contentId = contentManager.CreateContent(sourcePath, destPath, false, &videoContentInfo);
- *             TryReturn(Tizen::Base::UuId::GetInvalidUuId() != contentId, GetLastResult(), "CreateContent failed.");
+ *             ContentId contentId = contentManager.CreateContent(sourcePath, destPath, false, &videoContentInfo);
+ *             r = GetLastResult();
  *
  *             return r;
  * }
index 2123d78..f475a59 100644 (file)
@@ -47,25 +47,26 @@ class _VideoMetadataImpl;
  * The following example demonstrates how to use the %VideoMetadata class.
  *
  * @code
+ * #include <FBase.h>
+ * #include <FContent.h>
+ * #include <FSystem.h>
+ *
+ * using namespace Tizen::Content;
+ *
  * result
  * MyClass::TestVideoMetadata(void)
  * {
  *             Tizen::Base::String contentPath = Tizen::System::Environment::GetMediaPath() + L"Videos/video.mp4";
  *             VideoMetadata* pVideoMeta = ContentManagerUtil::GetVideoMetaN(contentPath);
- *             TryReturn(pVideoMeta != null, GetLastResult(), "ContentManagerUtil::GetVideoMetaN failed.");
+ *             result r = GetLastResult();
  *
- *             // Width
  *             pVideoMeta->GetWidth();
- *
- *             // Height
  *             pVideoMeta->GetHeight();
- *
- *             // Duration
  *             pVideoMeta->GetDuration();
  *
  *             delete pVideoMeta;
  *
- *             return E_SUCCESS;
+ *             return r;
  * }
  * @endcode
  */