X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2FTizen.Content.MediaContent%2FTizen.Content.MediaContent%2FMediaDatabase.cs;h=b0e69255c3a74b3c3201eca2734ee27906aba0bd;hb=5fa5718a930d8d558a0cc0e0c9637e645926ca73;hp=88e9d90b1944c61ddcc77a02fe481ac33246de07;hpb=392021237cf4919991030e433f41545416d052b5;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git diff --git a/src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/MediaDatabase.cs b/src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/MediaDatabase.cs index 88e9d90..b0e6925 100644 --- a/src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/MediaDatabase.cs +++ b/src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/MediaDatabase.cs @@ -24,11 +24,13 @@ namespace Tizen.Content.MediaContent /// /// Provides the ability to connect to and manage the database. /// + /// 4 public class MediaDatabase : IDisposable { /// /// Initializes a new instance of the class. /// + /// 4 public MediaDatabase() { } @@ -39,8 +41,9 @@ namespace Tizen.Content.MediaContent /// Connects to the database. /// /// The database is already connected. - /// The has already been disposed of. + /// The has already been disposed. /// An error occurred while connecting. + /// 4 public void Connect() { ValidateNotDisposed(); @@ -62,8 +65,9 @@ namespace Tizen.Content.MediaContent /// Disconnects from the media database. /// /// The database is not connected. - /// The has already been disposed of. + /// The has already been disposed. /// An error occurred while connecting. + /// 4 public void Disconnect() { ValidateNotDisposed(); @@ -101,6 +105,7 @@ namespace Tizen.Content.MediaContent /// /// Occurs when there is a change for media in the database. /// + /// 4 public static event EventHandler MediaInfoUpdated { add @@ -154,6 +159,7 @@ namespace Tizen.Content.MediaContent /// /// Occurs when there is a change for the folder in the database. /// + /// 4 public static event EventHandler FolderUpdated { add @@ -201,13 +207,16 @@ namespace Tizen.Content.MediaContent /// the record of the media file will be deleted from the database.
///
/// If you want to access internal storage, you should add privilege http://tizen.org/privilege/mediastorage.
- /// If you want to access external storage, you should add privilege http://tizen.org/privilege/externalstorage. + /// If you want to access external storage, you should add privilege http://tizen.org/privilege/externalstorage.
+ ///
+ /// If http://tizen.org/feature/content.scanning.others feature is not supported and the specified file is other-type, + /// will be thrown. /// /// http://tizen.org/privilege/content.write /// http://tizen.org/privilege/mediastorage /// http://tizen.org/privilege/externalstorage /// The database is not connected. - /// The has already been disposed of. + /// The has already been disposed. /// is null. /// /// is a zero-length string, contains only white space.
@@ -217,6 +226,8 @@ namespace Tizen.Content.MediaContent /// contains a directory containing the ".scan_ignore" file. ///
/// The caller has no required privilege. + /// The required feature is not supported. + /// 4 public void ScanFile(string path) { ValidateState(); @@ -240,7 +251,7 @@ namespace Tizen.Content.MediaContent /// Folders that contains a file named ".scan_ignore" will not be scanned. /// A task that represents the asynchronous scan operation. /// The database is not connected. - /// The has already been disposed of. + /// The has already been disposed. /// The caller has no required privilege. /// is null. /// @@ -250,6 +261,7 @@ namespace Tizen.Content.MediaContent /// -or-
/// contains a directory containing the ".scan_ignore" file. ///
+ /// 4 public Task ScanFolderAsync(string folderPath) { return ScanFolderAsync(folderPath, true); @@ -270,7 +282,7 @@ namespace Tizen.Content.MediaContent /// Folders that contains a file named ".scan_ignore" will not be scanned. /// A task that represents the asynchronous scan operation. /// The database is not connected. - /// The has already been disposed of. + /// The has already been disposed. /// The caller has no required privilege. /// is null. /// @@ -280,6 +292,7 @@ namespace Tizen.Content.MediaContent /// -or-
/// contains a directory containing the ".scan_ignore" file. ///
+ /// 4 public Task ScanFolderAsync(string folderPath, bool recursive) { return ScanFolderAsync(folderPath, recursive, CancellationToken.None); @@ -300,7 +313,7 @@ namespace Tizen.Content.MediaContent /// Folders that contains a file named ".scan_ignore" will not be scanned. /// A task that represents the asynchronous scan operation. /// The database is not connected. - /// The has already been disposed of. + /// The has already been disposed. /// The caller has no required privilege. /// is null. /// @@ -310,6 +323,7 @@ namespace Tizen.Content.MediaContent /// -or-
/// contains a directory containing the ".scan_ignore" file. ///
+ /// 4 public Task ScanFolderAsync(string folderPath, CancellationToken cancellationToken) { return ScanFolderAsync(folderPath, true, cancellationToken); @@ -331,7 +345,7 @@ namespace Tizen.Content.MediaContent /// Folders that contains a file named ".scan_ignore" will not be scanned. /// A task that represents the asynchronous scan operation. /// The database is not connected. - /// The has already been disposed of. + /// The has already been disposed. /// The caller has no required privilege. /// is null. /// @@ -341,6 +355,7 @@ namespace Tizen.Content.MediaContent /// -or-
/// contains a directory containing the ".scan_ignore" file. ///
+ /// 4 public Task ScanFolderAsync(string folderPath, bool recursive, CancellationToken cancellationToken) { ValidateState(); @@ -434,6 +449,7 @@ namespace Tizen.Content.MediaContent /// Disposes of the resources (other than memory) used by the MediaDatabase. /// /// true to release both managed and unmanaged resources; false to release only unmanaged resources. + /// 4 protected virtual void Dispose(bool disposing) { if (!_disposed) @@ -455,15 +471,17 @@ namespace Tizen.Content.MediaContent /// /// Releases all the resources. /// + /// 4 public void Dispose() { Dispose(true); } /// - /// Gets the value indicating whether the database has been disposed of. + /// Gets the value indicating whether the database has been disposed. /// - /// true if the database has been disposed of; otherwise, false. + /// true if the database has been disposed; otherwise, false. + /// 4 public bool IsDisposed => _disposed; #endregion