[MediaContent] Fix grammatical error in description (#943)
[platform/core/csapi/tizenfx.git] / src / Tizen.Content.MediaContent / Tizen.Content.MediaContent / MediaDatabase.cs
index 72031a5..b0e6925 100644 (file)
@@ -24,11 +24,13 @@ namespace Tizen.Content.MediaContent
     /// <summary>
     /// Provides the ability to connect to and manage the database.
     /// </summary>
+    /// <since_tizen> 4 </since_tizen>
     public class MediaDatabase : IDisposable
     {
         /// <summary>
         /// Initializes a new instance of the <see cref="MediaDatabase"/> class.
         /// </summary>
+        /// <since_tizen> 4 </since_tizen>
         public MediaDatabase()
         {
         }
@@ -39,8 +41,9 @@ namespace Tizen.Content.MediaContent
         /// Connects to the database.
         /// </summary>
         /// <exception cref="InvalidOperationException">The database is already connected.</exception>
-        /// <exception cref="ObjectDisposedException">The <see cref="MediaDatabase"/> has already been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The <see cref="MediaDatabase"/> has already been disposed.</exception>
         /// <exception cref="MediaDatabaseException">An error occurred while connecting.</exception>
+        /// <since_tizen> 4 </since_tizen>
         public void Connect()
         {
             ValidateNotDisposed();
@@ -62,8 +65,9 @@ namespace Tizen.Content.MediaContent
         /// Disconnects from the media database.
         /// </summary>
         /// <exception cref="InvalidOperationException">The database is not connected.</exception>
-        /// <exception cref="ObjectDisposedException">The <see cref="MediaDatabase"/> has already been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The <see cref="MediaDatabase"/> has already been disposed.</exception>
         /// <exception cref="MediaDatabaseException">An error occurred while connecting.</exception>
+        /// <since_tizen> 4 </since_tizen>
         public void Disconnect()
         {
             ValidateNotDisposed();
@@ -101,6 +105,7 @@ namespace Tizen.Content.MediaContent
         /// <summary>
         /// Occurs when there is a change for media in the database.
         /// </summary>
+        /// <since_tizen> 4 </since_tizen>
         public static event EventHandler<MediaInfoUpdatedEventArgs> MediaInfoUpdated
         {
             add
@@ -135,7 +140,6 @@ namespace Tizen.Content.MediaContent
             }
         }
 
-
         private static readonly Interop.Content.MediaContentDBUpdatedCallback _folderUpdatedCb = (
             MediaContentError error, int pid, ItemType updateItem, OperationType updateType,
             MediaType mediaType, string uuid, string filePath, string mimeType, IntPtr _) =>
@@ -155,6 +159,7 @@ namespace Tizen.Content.MediaContent
         /// <summary>
         /// Occurs when there is a change for the folder in the database.
         /// </summary>
+        /// <since_tizen> 4 </since_tizen>
         public static event EventHandler<FolderUpdatedEventArgs> FolderUpdated
         {
             add
@@ -194,30 +199,35 @@ namespace Tizen.Content.MediaContent
         /// </summary>
         /// <param name="path">The path of the media to be scanned.</param>
         /// <remarks>
-        /// It requests to scan a media file to the media server.\n
+        /// It requests to scan a media file to the media server.<br/>
         /// If the specified file is not registered to the database yet,
-        /// the media file information will be added to the database.\n
-        /// If it is already registered to the database, the media information is refreshed.\n
+        /// the media file information will be added to the database.<br/>
+        /// If it is already registered to the database, the media information is refreshed.<br/>
         /// If the specified file does not exist,
-        /// the record of the media file will be deleted from the database.\n
-        /// \n
-        /// If you want to access internal storage, you should add privilege http://tizen.org/privilege/mediastorage.\n
-        /// If you want to access external storage, you should add privilege http://tizen.org/privilege/externalstorage.
+        /// the record of the media file will be deleted from the database.<br/>
+        /// <br/>
+        /// If you want to access internal storage, you should add privilege http://tizen.org/privilege/mediastorage.<br/>
+        /// If you want to access external storage, you should add privilege http://tizen.org/privilege/externalstorage.<br/>
+        /// <br/>
+        /// If http://tizen.org/feature/content.scanning.others feature is not supported and the specified file is other-type,
+        /// <see cref="NotSupportedException"/> will be thrown.
         /// </remarks>
         /// <privilege>http://tizen.org/privilege/content.write</privilege>
         /// <privilege>http://tizen.org/privilege/mediastorage</privilege>
         /// <privilege>http://tizen.org/privilege/externalstorage</privilege>
         /// <exception cref="InvalidOperationException">The database is not connected.</exception>
-        /// <exception cref="ObjectDisposedException">The <see cref="MediaDatabase"/> has already been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The <see cref="MediaDatabase"/> has already been disposed.</exception>
         /// <exception cref="ArgumentNullException"><paramref name="path"/> is null.</exception>
         /// <exception cref="ArgumentException">
-        ///     <paramref name="path"/> is a zero-length string, contains only white space.\n
-        ///     -or-\n
-        ///     <paramref name="path"/> contains a hidden path that starts with '.'.\n
-        ///     -or-\n
+        ///     <paramref name="path"/> is a zero-length string, contains only white space.<br/>
+        ///     -or-<br/>
+        ///     <paramref name="path"/> contains a hidden path that starts with '.'.<br/>
+        ///     -or-<br/>
         ///     <paramref name="path"/> contains a directory containing the ".scan_ignore" file.
         /// </exception>
         /// <exception cref="UnauthorizedAccessException">The caller has no required privilege.</exception>
+        /// <exception cref="NotSupportedException">The required feature is not supported.</exception>
+        /// <since_tizen> 4 </since_tizen>
         public void ScanFile(string path)
         {
             ValidateState();
@@ -231,7 +241,7 @@ namespace Tizen.Content.MediaContent
         /// Requests to scan a folder recursively.
         /// </summary>
         /// <remarks>
-        ///     If you want to access internal storage, you should add privilege http://tizen.org/privilege/mediastorage.\n
+        ///     If you want to access internal storage, you should add privilege http://tizen.org/privilege/mediastorage.<br/>
         ///     If you want to access external storage, you should add privilege http://tizen.org/privilege/externalstorage.
         /// </remarks>
         /// <privilege>http://tizen.org/privilege/content.write</privilege>
@@ -241,16 +251,17 @@ namespace Tizen.Content.MediaContent
         /// <remarks>Folders that contains a file named ".scan_ignore" will not be scanned.</remarks>
         /// <returns>A task that represents the asynchronous scan operation.</returns>
         /// <exception cref="InvalidOperationException">The database is not connected.</exception>
-        /// <exception cref="ObjectDisposedException">The <see cref="MediaDatabase"/> has already been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The <see cref="MediaDatabase"/> has already been disposed.</exception>
         /// <exception cref="UnauthorizedAccessException">The caller has no required privilege.</exception>
         /// <exception cref="ArgumentNullException"><paramref name="folderPath"/> is null.</exception>
         /// <exception cref="ArgumentException">
-        ///     <paramref name="folderPath"/> is a zero-length string, contains only white space.\n
-        ///     -or-\n
-        ///     <paramref name="folderPath"/> contains a hidden path that starts with '.'.\n
-        ///     -or-\n
+        ///     <paramref name="folderPath"/> is a zero-length string, contains only white space.<br/>
+        ///     -or-<br/>
+        ///     <paramref name="folderPath"/> contains a hidden path that starts with '.'.<br/>
+        ///     -or-<br/>
         ///     <paramref name="folderPath"/> contains a directory containing the ".scan_ignore" file.
         /// </exception>
+        /// <since_tizen> 4 </since_tizen>
         public Task ScanFolderAsync(string folderPath)
         {
             return ScanFolderAsync(folderPath, true);
@@ -260,7 +271,7 @@ namespace Tizen.Content.MediaContent
         /// Requests to scan a folder.
         /// </summary>
         /// <remarks>
-        ///     If you want to access internal storage, you should add privilege http://tizen.org/privilege/mediastorage.\n
+        ///     If you want to access internal storage, you should add privilege http://tizen.org/privilege/mediastorage.<br/>
         ///     If you want to access external storage, you should add privilege http://tizen.org/privilege/externalstorage.
         /// </remarks>
         /// <privilege>http://tizen.org/privilege/content.write</privilege>
@@ -271,16 +282,17 @@ namespace Tizen.Content.MediaContent
         /// <remarks>Folders that contains a file named ".scan_ignore" will not be scanned.</remarks>
         /// <returns>A task that represents the asynchronous scan operation.</returns>
         /// <exception cref="InvalidOperationException">The database is not connected.</exception>
-        /// <exception cref="ObjectDisposedException">The <see cref="MediaDatabase"/> has already been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The <see cref="MediaDatabase"/> has already been disposed.</exception>
         /// <exception cref="UnauthorizedAccessException">The caller has no required privilege.</exception>
         /// <exception cref="ArgumentNullException"><paramref name="folderPath"/> is null.</exception>
         /// <exception cref="ArgumentException">
-        ///     <paramref name="folderPath"/> is a zero-length string, contains only white space.\n
-        ///     -or-\n
-        ///     <paramref name="folderPath"/> contains a hidden path that starts with '.'.\n
-        ///     -or-\n
+        ///     <paramref name="folderPath"/> is a zero-length string, contains only white space.<br/>
+        ///     -or-<br/>
+        ///     <paramref name="folderPath"/> contains a hidden path that starts with '.'.<br/>
+        ///     -or-<br/>
         ///     <paramref name="folderPath"/> contains a directory containing the ".scan_ignore" file.
         /// </exception>
+        /// <since_tizen> 4 </since_tizen>
         public Task ScanFolderAsync(string folderPath, bool recursive)
         {
             return ScanFolderAsync(folderPath, recursive, CancellationToken.None);
@@ -290,7 +302,7 @@ namespace Tizen.Content.MediaContent
         /// Requests to scan a folder recursively.
         /// </summary>
         /// <remarks>
-        ///     If you want to access internal storage, you should add privilege http://tizen.org/privilege/mediastorage.\n
+        ///     If you want to access internal storage, you should add privilege http://tizen.org/privilege/mediastorage.<br/>
         ///     If you want to access external storage, you should add privilege http://tizen.org/privilege/externalstorage.
         /// </remarks>
         /// <privilege>http://tizen.org/privilege/content.write</privilege>
@@ -301,26 +313,27 @@ namespace Tizen.Content.MediaContent
         /// <remarks>Folders that contains a file named ".scan_ignore" will not be scanned.</remarks>
         /// <returns>A task that represents the asynchronous scan operation.</returns>
         /// <exception cref="InvalidOperationException">The database is not connected.</exception>
-        /// <exception cref="ObjectDisposedException">The <see cref="MediaDatabase"/> has already been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The <see cref="MediaDatabase"/> has already been disposed.</exception>
         /// <exception cref="UnauthorizedAccessException">The caller has no required privilege.</exception>
         /// <exception cref="ArgumentNullException"><paramref name="folderPath"/> is null.</exception>
         /// <exception cref="ArgumentException">
-        ///     <paramref name="folderPath"/> is a zero-length string, contains only white space.\n
-        ///     -or-\n
-        ///     <paramref name="folderPath"/> contains a hidden path that starts with '.'.\n
-        ///     -or-\n
+        ///     <paramref name="folderPath"/> is a zero-length string, contains only white space.<br/>
+        ///     -or-<br/>
+        ///     <paramref name="folderPath"/> contains a hidden path that starts with '.'.<br/>
+        ///     -or-<br/>
         ///     <paramref name="folderPath"/> contains a directory containing the ".scan_ignore" file.
         /// </exception>
+        /// <since_tizen> 4 </since_tizen>
         public Task ScanFolderAsync(string folderPath, CancellationToken cancellationToken)
         {
             return ScanFolderAsync(folderPath, true, cancellationToken);
         }
 
         /// <summary>
-        /// Requests to scan a folder recursively.
+        /// Requests to scan a folder.
         /// </summary>
         /// <remarks>
-        ///     If you want to access internal storage, you should add privilege http://tizen.org/privilege/mediastorage.\n
+        ///     If you want to access internal storage, you should add privilege http://tizen.org/privilege/mediastorage.<br/>
         ///     If you want to access external storage, you should add privilege http://tizen.org/privilege/externalstorage.
         /// </remarks>
         /// <privilege>http://tizen.org/privilege/content.write</privilege>
@@ -332,16 +345,17 @@ namespace Tizen.Content.MediaContent
         /// <remarks>Folders that contains a file named ".scan_ignore" will not be scanned.</remarks>
         /// <returns>A task that represents the asynchronous scan operation.</returns>
         /// <exception cref="InvalidOperationException">The database is not connected.</exception>
-        /// <exception cref="ObjectDisposedException">The <see cref="MediaDatabase"/> has already been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The <see cref="MediaDatabase"/> has already been disposed.</exception>
         /// <exception cref="UnauthorizedAccessException">The caller has no required privilege.</exception>
         /// <exception cref="ArgumentNullException"><paramref name="folderPath"/> is null.</exception>
         /// <exception cref="ArgumentException">
-        ///     <paramref name="folderPath"/> is a zero-length string, contains only white space.\n
-        ///     -or-\n
-        ///     <paramref name="folderPath"/> contains a hidden path that starts with '.'.\n
-        ///     -or-\n
+        ///     <paramref name="folderPath"/> is a zero-length string, contains only white space.<br/>
+        ///     -or-<br/>
+        ///     <paramref name="folderPath"/> contains a hidden path that starts with '.'.<br/>
+        ///     -or-<br/>
         ///     <paramref name="folderPath"/> contains a directory containing the ".scan_ignore" file.
         /// </exception>
+        /// <since_tizen> 4 </since_tizen>
         public Task ScanFolderAsync(string folderPath, bool recursive, CancellationToken cancellationToken)
         {
             ValidateState();
@@ -354,7 +368,7 @@ namespace Tizen.Content.MediaContent
 
         private async Task ScanFolderAsyncCore(string folderPath, bool recursive, CancellationToken cancellationToken)
         {
-            var tcs = new TaskCompletionSource<bool>(TaskContinuationOptions.RunContinuationsAsynchronously);
+            var tcs = new TaskCompletionSource<bool>(TaskCreationOptions.RunContinuationsAsynchronously);
 
             using (var cbKeeper = ObjectKeeper.Get(GetScanCompletedCallback(tcs, cancellationToken)))
             using (RegisterCancellationAction(tcs, folderPath, cancellationToken))
@@ -435,6 +449,7 @@ namespace Tizen.Content.MediaContent
         /// Disposes of the resources (other than memory) used by the MediaDatabase.
         /// </summary>
         /// <param name="disposing">true to release both managed and unmanaged resources; false to release only unmanaged resources.</param>
+        /// <since_tizen> 4 </since_tizen>
         protected virtual void Dispose(bool disposing)
         {
             if (!_disposed)
@@ -456,15 +471,17 @@ namespace Tizen.Content.MediaContent
         /// <summary>
         /// Releases all the resources.
         /// </summary>
+        /// <since_tizen> 4 </since_tizen>
         public void Dispose()
         {
             Dispose(true);
         }
 
         /// <summary>
-        /// Gets the value indicating whether the database has been disposed of.
+        /// Gets the value indicating whether the database has been disposed.
         /// </summary>
-        /// <value>true if the database has been disposed of; otherwise, false.</value>
+        /// <value>true if the database has been disposed; otherwise, false.</value>
+        /// <since_tizen> 4 </since_tizen>
         public bool IsDisposed => _disposed;
         #endregion