Class MediaInfoCommand

Definition

Namespace:
Tizen.Content.MediaContent
Assembly:
Tizen.Content.MediaContent.dll
API Level:
4

Provides commands to manage the media information and query related items in the database.

C#
Copy
public class MediaInfoCommand : MediaCommand
Inheritance
System.Object
MediaInfoCommand

Constructors

View Source

MediaInfoCommand(MediaDatabase)

Initializes a new instance of the FolderCommand class with the specified MediaDatabase.

Declaration
C#
Copy
public MediaInfoCommand(MediaDatabase database)
Parameters
Type Name Description
MediaDatabase database

The MediaDatabase that the commands run on.

Exceptions
Type Condition
System.ArgumentNullException

database is null.

ObjectDisposedException

database has already been disposed.

API Level: 4

Methods

View Source

Add(String)

Adds the media to the database.

Declaration
C#
Copy
public MediaInfo Add(string path)
Parameters
Type Name Description
System.String path

The file path to add.

Returns
Type Description
MediaInfo

The MediaInfo instance that contains the record information in the database.

Remarks

If the media already exists in the database, it returns the existing information.

The ScanFile(String) or the ScanFolderAsync(String) can be used instead.

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 http://tizen.org/feature/content.scanning.others feature is not supported and the specified file is other-type, System.NotSupportedException will be thrown.

Exceptions
Type Condition
System.InvalidOperationException

The MediaDatabase is disconnected.

ObjectDisposedException

The MediaDatabase has already been disposed.

MediaDatabaseException

An error occurred while executing the command.

System.ArgumentNullException

path is null.

System.ArgumentException

path is a zero-length string, contains only white space.
-or-
path contains a hidden path that starts with '.'.
-or-
path contains a directory containing the ".scan_ignore" file.

System.IO.FileNotFoundException

path does not exists.

UnauthorizedAccessException

The caller has no required privilege.

System.NotSupportedException

The required feature is not supported.

API Level: 4
Privilege Level: public
Privilege: http://tizen.org/privilege/content.writehttp://tizen.org/privilege/mediastoragehttp://tizen.org/privilege/externalstorage
View Source

AddAsync(IEnumerable<String>)

Adds media files into the media database.

Declaration
C#
Copy
public Task AddAsync(IEnumerable<string> paths)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<System.String> paths

The paths of the media files to add.

Returns
Type Description
Task

A task that represents the asynchronous add operation.

Remarks

The paths that already exist in the database will be ignored.
At most 300 items can be added at once.

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 http://tizen.org/feature/content.scanning.others feature is not supported and the specified file is other-type, System.NotSupportedException will be thrown.

Exceptions
Type Condition
System.InvalidOperationException

The MediaDatabase is disconnected.

ObjectDisposedException

The MediaDatabase has already been disposed.

MediaDatabaseException

An error occurred while executing the command.

System.ArgumentNullException

paths is null.

System.ArgumentException

paths contains null.
-or-
paths contains the invalid path.
-or-
The number of paths is 300 or more items.

System.IO.FileNotFoundException

paths contains a path that does not exist.

UnauthorizedAccessException

The caller has no required privilege.

System.NotSupportedException

The required feature is not supported.

API Level: 4
Privilege Level: public
Privilege: http://tizen.org/privilege/content.writehttp://tizen.org/privilege/mediastoragehttp://tizen.org/privilege/externalstorage
View Source

CountBookmark(String)

Retrieves the number of the bookmarks added to the media.

Declaration
C#
Copy
public int CountBookmark(string mediaId)
Parameters
Type Name Description
System.String mediaId

The media ID to count the bookmarks added to the media.

Returns
Type Description
System.Int32

The number of the bookmarks.

Exceptions
Type Condition
System.InvalidOperationException

The MediaDatabase is disconnected.

ObjectDisposedException

The MediaDatabase has already been disposed.

MediaDatabaseException

An error occurred while executing the command.

System.ArgumentNullException

mediaId is null.

System.ArgumentException

mediaId is a zero-length string, contains only white space.

API Level: 4
View Source

CountBookmark(String, CountArguments)

Retrieves the number of the bookmarks added to the media with the CountArguments.

Declaration
C#
Copy
public int CountBookmark(string mediaId, CountArguments arguments)
Parameters
Type Name Description
System.String mediaId

The media ID to count the bookmarks added to the media.

CountArguments arguments

The criteria to use to filter. This value can be null.

Returns
Type Description
System.Int32

The number of the bookmarks.

Exceptions
Type Condition
System.InvalidOperationException

The MediaDatabase is disconnected.

ObjectDisposedException

The MediaDatabase has already been disposed.

MediaDatabaseException

An error occurred while executing the command.

System.ArgumentNullException

mediaId is null.

System.ArgumentException

mediaId is a zero-length string, contains only white space.

API Level: 4
View Source

CountFaceInfo(String)

Retrieves the number of the face information added to or detected from the media.

Declaration
C#
Copy
public int CountFaceInfo(string mediaId)
Parameters
Type Name Description
System.String mediaId

The media ID to count face information added to the media.

Returns
Type Description
System.Int32

The number of the face information.

Exceptions
Type Condition
System.InvalidOperationException

The MediaDatabase is disconnected.

ObjectDisposedException

The MediaDatabase has already been disposed.

MediaDatabaseException

An error occurred while executing the command.

System.ArgumentNullException

mediaId is null.

System.ArgumentException

mediaId is a zero-length string, contains only white space.

API Level: 4
View Source

CountFaceInfo(String, CountArguments)

Retrieves the number of the face information added to or detected from the media with filter.

Declaration
C#
Copy
public int CountFaceInfo(string mediaId, CountArguments arguments)
Parameters
Type Name Description
System.String mediaId

The media ID to count the face information added to the media.

CountArguments arguments

The criteria to use to filter. This value can be null.

Returns
Type Description
System.Int32

The number of the face information.

Exceptions
Type Condition
System.InvalidOperationException

The MediaDatabase is disconnected.

ObjectDisposedException

The MediaDatabase has already been disposed.

MediaDatabaseException

An error occurred while executing the command.

System.ArgumentNullException

mediaId is null.

System.ArgumentException

mediaId is a zero-length string, contains only white space.

API Level: 4
View Source

CountGroupBy(MediaInfoColumnKey)

Retrieves the number of values grouped by the specified column with the SelectArguments.

Declaration
C#
Copy
public int CountGroupBy(MediaInfoColumnKey columnKey)
Parameters
Type Name Description
MediaInfoColumnKey columnKey

The column key.

Returns
Type Description
System.Int32

The number of groups.

Exceptions
Type Condition
System.InvalidOperationException

The MediaDatabase is disconnected.

ObjectDisposedException

The MediaDatabase has already been disposed.

MediaDatabaseException

An error occurred while executing the command.

System.ArgumentException

columnKey is invalid.

API Level: 4
View Source

CountGroupBy(MediaInfoColumnKey, CountArguments)

Retrieves the number of values grouped by the specified column with the SelectArguments.

Declaration
C#
Copy
public int CountGroupBy(MediaInfoColumnKey columnKey, CountArguments arguments)
Parameters
Type Name Description
MediaInfoColumnKey columnKey

The column key.

CountArguments arguments

The criteria to use to filter. This value can be null.

Returns
Type Description
System.Int32

The number of groups.

Exceptions
Type Condition
System.InvalidOperationException

The MediaDatabase is disconnected.

ObjectDisposedException

The MediaDatabase has already been disposed.

MediaDatabaseException

An error occurred while executing the command.

System.ArgumentException

columnKey is invalid.

API Level: 4
View Source

CountMedia()

Retrieves the number of the media information.

Declaration
C#
Copy
public int CountMedia()
Returns
Type Description
System.Int32

The number of the media information.

Exceptions
Type Condition
System.InvalidOperationException

The MediaDatabase is disconnected.

ObjectDisposedException

The MediaDatabase has already been disposed.

MediaDatabaseException

An error occurred while executing the command.

API Level: 4
View Source

CountMedia(CountArguments)

Retrieves the number of the media information with the SelectArguments.

Declaration
C#
Copy
public int CountMedia(CountArguments arguments)
Parameters
Type Name Description
CountArguments arguments

The criteria to use to filter. This value can be null.

Returns
Type Description
System.Int32

The number of media information.

Exceptions
Type Condition
System.InvalidOperationException

The MediaDatabase is disconnected.

ObjectDisposedException

The MediaDatabase has already been disposed.

MediaDatabaseException

An error occurred while executing the command.

API Level: 4
View Source

CountTag(String)

Retrieves the number of tags that the media has.

Declaration
C#
Copy
public int CountTag(string mediaId)
Parameters
Type Name Description
System.String mediaId

The media ID to count tags added to the media.

Returns
Type Description
System.Int32

The number of tags.

Exceptions
Type Condition
System.InvalidOperationException

The MediaDatabase is disconnected.

ObjectDisposedException

The MediaDatabase has already been disposed.

MediaDatabaseException

An error occurred while executing the command.

System.ArgumentNullException

mediaId is null.

System.ArgumentException

mediaId is a zero-length string, contains only white space.

API Level: 4
View Source

CountTag(String, CountArguments)

Retrieves the number of tags that the media has with the CountArguments.

Declaration
C#
Copy
public int CountTag(string mediaId, CountArguments arguments)
Parameters
Type Name Description
System.String mediaId

The media ID to count tags added to the media.

CountArguments arguments

The criteria to use to filter. This value can be null.

Returns
Type Description
System.Int32

The number of tags.

Exceptions
Type Condition
System.InvalidOperationException

The MediaDatabase is disconnected.

ObjectDisposedException

The MediaDatabase has already been disposed.

MediaDatabaseException

An error occurred while executing the command.

System.ArgumentNullException

mediaId is null.

System.ArgumentException

mediaId is a zero-length string, contains only white space.

API Level: 4
View Source

CreateThumbnailAsync(String)

Creates the thumbnail image for the given media. If the thumbnail already exists for the given media, the existing path will be returned.

Declaration
C#
Copy
public Task<string> CreateThumbnailAsync(string mediaId)
Parameters
Type Name Description
System.String mediaId

The media ID to create the thumbnail.

Returns
Type Description
System.Threading.Tasks.Task<System.String>

A task that represents the asynchronous operation. The task result contains the thumbnail path.

Exceptions
Type Condition
System.InvalidOperationException

The MediaDatabase is disconnected.
-or-
An internal error occurred while executing.

ObjectDisposedException

The MediaDatabase has already been disposed.

MediaDatabaseException

An error occurred while executing the command.

System.ArgumentNullException

mediaId is null.

RecordNotFoundException

mediaId does not exist in the database.

System.ArgumentException

mediaId is a zero-length string, contains only white space.

System.IO.FileNotFoundException

The file of the media does not exists; moved or deleted.

UnsupportedContentException

The thumbnail is not available for the given media.
-or-
The media is in the external USB storage (StorageType is ExternalUsb).

API Level: 4
Privilege Level: public
Privilege: http://tizen.org/privilege/content.write
View Source

CreateThumbnailAsync(String, CancellationToken)

Creates the thumbnail image for the given media. If the thumbnail already exists for the given media, the existing path will be returned.

Declaration
C#
Copy
public Task<string> CreateThumbnailAsync(string mediaId, CancellationToken cancellationToken)
Parameters
Type Name Description
System.String mediaId

The media ID to create the thumbnail.

CancellationToken cancellationToken

The token to cancel the operation.

Returns
Type Description
System.Threading.Tasks.Task<System.String>

A task that represents the asynchronous operation. The task result contains the thumbnail path.

Exceptions
Type Condition
System.InvalidOperationException

The MediaDatabase is disconnected.
-or-
An internal error occurred while executing.

ObjectDisposedException

The MediaDatabase has already been disposed.

MediaDatabaseException

An error occurred while executing the command.

System.ArgumentNullException

mediaId is null.

RecordNotFoundException

mediaId does not exist in the database.

System.ArgumentException

mediaId is a zero-length string, contains only white space.

System.IO.FileNotFoundException

The file of the media does not exists; moved or deleted.

UnsupportedContentException

The thumbnail is not available for the given media.
-or-
The media is in the external USB storage (StorageType is ExternalUsb).

API Level: 4
Privilege Level: public
Privilege: http://tizen.org/privilege/content.write
View Source

Delete(String)

Deletes the media from the database.

Declaration
C#
Copy
public bool Delete(string mediaId)
Parameters
Type Name Description
System.String mediaId

The media ID to delete.

Returns
Type Description
System.Boolean

true if the matched record was found and deleted, otherwise false.

Remarks

The ScanFile(String) or the ScanFolderAsync(String) can be used instead.
Since API level 6, if the file related with the mediaId in DB still exists in file system before calling this method, System.InvalidOperationException will be thrown to keep consistency in DB.

Exceptions
Type Condition
System.InvalidOperationException

The MediaDatabase is disconnected.
-or-
The file related with the mediaId in DB still exists in file system. (Since API level 6)

ObjectDisposedException

The MediaDatabase has already been disposed.

MediaDatabaseException

An error occurred while executing the command.

System.ArgumentNullException

mediaId is null.

System.ArgumentException

mediaId is a zero-length string, contains only white space.

UnauthorizedAccessException

The caller has no required privilege.

API Level: 4
Privilege Level: public
Privilege: http://tizen.org/privilege/content.write
View Source

DetectFaceAsync(String)

Detects faces from the given media. If the thumbnail already exists for the given media, the existing path will be returned.

Declaration
C#
Copy
public Task<int> DetectFaceAsync(string mediaId)
Parameters
Type Name Description
System.String mediaId

The media ID to create the thumbnail.

Returns
Type Description
System.Threading.Tasks.Task<System.Int32>

A task that represents the asynchronous add operation. The task result contains the number of faces detected.

Exceptions
Type Condition
System.InvalidOperationException

The MediaDatabase is disconnected.
-or-
An internal error occurred while executing.

ObjectDisposedException

The MediaDatabase has already been disposed.

MediaDatabaseException

An error occurred while executing the command.

System.ArgumentNullException

mediaId is null.

RecordNotFoundException

mediaId does not exist in the database.

System.ArgumentException

mediaId is a zero-length string, contains only white space.

System.IO.FileNotFoundException

The file of the media does not exists; moved or deleted.

UnsupportedContentException

Face detection is not available for the given media.

System.NotSupportedException

The required feature is not supported.

UnauthorizedAccessException

The caller has no required privilege.

API Level: 4
Privilege Level: public
Privilege: http://tizen.org/privilege/content.write
Feature: http://tizen.org/feature/vision.face_recognition
View Source

DetectFaceAsync(String, CancellationToken)

Creates the thumbnail image for the given media. If the thumbnail already exists for the given media, the existing path will be returned.

Declaration
C#
Copy
public Task<int> DetectFaceAsync(string mediaId, CancellationToken cancellationToken)
Parameters
Type Name Description
System.String mediaId

The media ID to create the thumbnail.

CancellationToken cancellationToken

The token to cancel the operation.

Returns
Type Description
System.Threading.Tasks.Task<System.Int32>

A task that represents the asynchronous operation. The task result contains the number of faces detected.

Remarks

Media in the external storage is not supported, with the exception of MMC. Only JPEG, PNG, BMP images are supported.

Exceptions
Type Condition
System.InvalidOperationException

The MediaDatabase is disconnected.
-or-
An internal error occurred while executing.

ObjectDisposedException

The MediaDatabase has already been disposed.

MediaDatabaseException

An error occurred while executing the command.

System.ArgumentNullException

mediaId is null.

RecordNotFoundException

mediaId does not exist in the database.

System.ArgumentException

mediaId is a zero-length string, contains only white space.

System.IO.FileNotFoundException

The file of the media does not exists; moved or deleted.

UnsupportedContentException

Face detection is not available for the given media.
-or-
The media is in the external USB storage (StorageType is ExternalUsb).

System.NotSupportedException

The required feature is not supported.

API Level: 4
Privilege Level: public
Privilege: http://tizen.org/privilege/content.write
Feature: http://tizen.org/feature/vision.face_recognition
View Source

Move(String, String)

Updates the path of the media to the specified destination path in the database.

Declaration
C#
Copy
public bool Move(string mediaId, string newPath)
Parameters
Type Name Description
System.String mediaId

The media ID to move.

System.String newPath

The path that the media has been moved to.

Returns
Type Description
System.Boolean

true if the matched record was found and updated, otherwise false.

Remarks

Usually, it is used after the media file is moved to the another path.

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.

Exceptions
Type Condition
System.InvalidOperationException

The MediaDatabase is disconnected.

ObjectDisposedException

The MediaDatabase has already been disposed.

MediaDatabaseException

An error occurred while executing the command.

System.ArgumentNullException

mediaId is null.
-or-
newPath is null.

System.ArgumentException

mediaId is a zero-length string, contains only white space.
-or-
newPath is a zero-length string, contains only white space.
-or-
newPath contains a hidden directory that starts with '.'.
-or-
newPath contains a directory containing the ".scan_ignore" file.

System.IO.FileNotFoundException

newPath does not exists.

UnauthorizedAccessException

The caller has no required privilege.

API Level: 4
Privilege Level: public
Privilege: http://tizen.org/privilege/content.writehttp://tizen.org/privilege/mediastoragehttp://tizen.org/privilege/externalstorage
View Source

SelectBookmark(String)

Retrieves the bookmarks added to the media.

Declaration
C#
Copy
public MediaDataReader<Bookmark> SelectBookmark(string mediaId)
Parameters
Type Name Description
System.String mediaId

The media ID to select the bookmarks added to the media.

Returns
Type Description
MediaDataReader<Bookmark>

The MediaDataReader<TRecord> containing the results.

Exceptions
Type Condition
System.InvalidOperationException

The MediaDatabase is disconnected.

ObjectDisposedException

The MediaDatabase has already been disposed.

MediaDatabaseException

An error occurred while executing the command.

System.ArgumentNullException

mediaId is null.

System.ArgumentException

mediaId is a zero-length string, contains only white space.

API Level: 4
View Source

SelectBookmark(String, SelectArguments)

Retrieves the bookmarks added to the media with the SelectArguments.

Declaration
C#
Copy
public MediaDataReader<Bookmark> SelectBookmark(string mediaId, SelectArguments filter)
Parameters
Type Name Description
System.String mediaId

The media ID to select the bookmarks added to the media.

SelectArguments filter

The criteria to use to filter. This value can be null.

Returns
Type Description
MediaDataReader<Bookmark>

The MediaDataReader<TRecord> containing the results.

Exceptions
Type Condition
System.InvalidOperationException

The MediaDatabase is disconnected.

ObjectDisposedException

The MediaDatabase has already been disposed.

MediaDatabaseException

An error occurred while executing the command.

System.ArgumentNullException

mediaId is null.

System.ArgumentException

mediaId is a zero-length string, contains only white space.

API Level: 4
View Source

SelectFaceInfo(String)

Retrieves the face information added to or detected from the media.

Declaration
C#
Copy
public MediaDataReader<FaceInfo> SelectFaceInfo(string mediaId)
Parameters
Type Name Description
System.String mediaId

The media ID to select face information added to the media.

Returns
Type Description
MediaDataReader<FaceInfo>

The MediaDataReader<TRecord> containing the results.

Exceptions
Type Condition
System.InvalidOperationException

The MediaDatabase is disconnected.

ObjectDisposedException

The MediaDatabase has already been disposed.

MediaDatabaseException

An error occurred while executing the command.

System.ArgumentNullException

mediaId is null.

System.ArgumentException

mediaId is a zero-length string, contains only white space.

API Level: 4
View Source

SelectFaceInfo(String, SelectArguments)

Retrieves the face information added to or detected from the media with the SelectArguments.

Declaration
C#
Copy
public MediaDataReader<FaceInfo> SelectFaceInfo(string mediaId, SelectArguments arguments)
Parameters
Type Name Description
System.String mediaId

The media ID to select the face information added to the media.

SelectArguments arguments

The criteria to use to filter. This value can be null.

Returns
Type Description
MediaDataReader<FaceInfo>

The MediaDataReader<TRecord> containing the results.

Exceptions
Type Condition
System.InvalidOperationException

The MediaDatabase is disconnected.

ObjectDisposedException

The MediaDatabase has already been disposed.

MediaDatabaseException

An error occurred while executing the command.

System.ArgumentNullException

mediaId is null.

System.ArgumentException

mediaId is a zero-length string, contains only white space.

API Level: 4
View Source

SelectGroupBy(MediaInfoColumnKey)

Retrieves the group values of the specified column.

Declaration
C#
Copy
public MediaDataReader<string> SelectGroupBy(MediaInfoColumnKey columnKey)
Parameters
Type Name Description
MediaInfoColumnKey columnKey

The column key.

Returns
Type Description
MediaDataReader<System.String>

The MediaDataReader<TRecord> containing the results.

Exceptions
Type Condition
System.InvalidOperationException

The MediaDatabase is disconnected.

ObjectDisposedException

The MediaDatabase has already been disposed.

MediaDatabaseException

An error occurred while executing the command.

System.ArgumentException

columnKey is invalid.

API Level: 4
View Source

SelectGroupBy(MediaInfoColumnKey, SelectArguments)

Retrieves the group values of the specified column with the SelectArguments.

Declaration
C#
Copy
public MediaDataReader<string> SelectGroupBy(MediaInfoColumnKey columnKey, SelectArguments arguments)
Parameters
Type Name Description
MediaInfoColumnKey columnKey

The column key.

SelectArguments arguments

The criteria to use to filter. This value can be null.

Returns
Type Description
MediaDataReader<System.String>

The MediaDataReader<TRecord> containing the results.

Exceptions
Type Condition
System.InvalidOperationException

The MediaDatabase is disconnected.

ObjectDisposedException

The MediaDatabase has already been disposed.

MediaDatabaseException

An error occurred while executing the command.

System.ArgumentException

columnKey is invalid.

API Level: 4
View Source

SelectMedia()

Retrieves all the media.

Declaration
C#
Copy
public MediaDataReader<MediaInfo> SelectMedia()
Returns
Type Description
MediaDataReader<MediaInfo>

The MediaDataReader<TRecord> containing the results.

Exceptions
Type Condition
System.InvalidOperationException

The MediaDatabase is disconnected.

ObjectDisposedException

The MediaDatabase has already been disposed.

MediaDatabaseException

An error occurred while executing the command.

API Level: 4
View Source

SelectMedia(String)

Retrieves the media.

Declaration
C#
Copy
public MediaInfo SelectMedia(string mediaId)
Parameters
Type Name Description
System.String mediaId

The media ID to retrieve.

Returns
Type Description
MediaInfo

The MediaInfo instance if the matched record was found in the database, otherwise null.

Exceptions
Type Condition
System.InvalidOperationException

The MediaDatabase is disconnected.

ObjectDisposedException

The MediaDatabase has already been disposed.

MediaDatabaseException

An error occurred while executing the command.

System.ArgumentNullException

mediaId is null.

System.ArgumentException

mediaId is a zero-length string, contains only white space.

API Level: 4
View Source

SelectMedia(SelectArguments)

Retrieves the media with the SelectArguments.

Declaration
C#
Copy
public MediaDataReader<MediaInfo> SelectMedia(SelectArguments arguments)
Parameters
Type Name Description
SelectArguments arguments

The criteria to use to filter. This value can be null.

Returns
Type Description
MediaDataReader<MediaInfo>

The MediaDataReader<TRecord> containing the results.

Exceptions
Type Condition
System.InvalidOperationException

The MediaDatabase is disconnected.

ObjectDisposedException

The MediaDatabase has already been disposed.

MediaDatabaseException

An error occurred while executing the command.

API Level: 4
View Source

SelectTag(String)

Retrieves the tags that the media has.

Declaration
C#
Copy
public MediaDataReader<Tag> SelectTag(string mediaId)
Parameters
Type Name Description
System.String mediaId

The media ID to select tags added to the media.

Returns
Type Description
MediaDataReader<Tag>

The MediaDataReader<TRecord> containing the results.

Exceptions
Type Condition
System.InvalidOperationException

The MediaDatabase is disconnected.

ObjectDisposedException

The MediaDatabase has already been disposed.

MediaDatabaseException

An error occurred while executing the command.

System.ArgumentNullException

mediaId is null.

System.ArgumentException

mediaId is a zero-length string, contains only white space.

API Level: 4
View Source

SelectTag(String, SelectArguments)

Retrieves the tags that the media has with the SelectArguments.

Declaration
C#
Copy
public MediaDataReader<Tag> SelectTag(string mediaId, SelectArguments filter)
Parameters
Type Name Description
System.String mediaId

The media ID to select tags added to the media.

SelectArguments filter

The criteria to use to filter. This value can be null.

Returns
Type Description
MediaDataReader<Tag>

The MediaDataReader<TRecord> containing the results.

Exceptions
Type Condition
System.InvalidOperationException

The MediaDatabase is disconnected.

ObjectDisposedException

The MediaDatabase has already been disposed.

MediaDatabaseException

An error occurred while executing the command.

System.ArgumentNullException

mediaId is null.

System.ArgumentException

mediaId is a zero-length string, contains only white space.

API Level: 4
View Source

UpdateFavorite(String, Boolean)

Updates the media with the favorite value.

Declaration
C#
Copy
public bool UpdateFavorite(string mediaId, bool value)
Parameters
Type Name Description
System.String mediaId

The media ID to update.

System.Boolean value

The value indicating whether the media is favorite.

Returns
Type Description
System.Boolean

true if the matched record was found and updated, otherwise false.

Exceptions
Type Condition
System.InvalidOperationException

The MediaDatabase is disconnected.

ObjectDisposedException

The MediaDatabase has already been disposed.

MediaDatabaseException

An error occurred while executing the command.

System.ArgumentNullException

mediaId is null.

System.ArgumentException

mediaId is a zero-length string, contains only white space.

UnauthorizedAccessException

The caller has no required privilege.

API Level: 4
Privilege Level: public
Privilege: http://tizen.org/privilege/content.write