/// <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()
{
}
/// 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();
/// 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();
/// <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
/// <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
/// 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.
+ /// 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.<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();
/// <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">
/// -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);
/// <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">
/// -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);
/// <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">
/// -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);
/// <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">
/// -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();
/// 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)
/// <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