Class MediaInfoCommand

    Definition

    Namespace:
    Tizen.Content.MediaContent
    Assembly:
    Tizen.Content.MediaContent.dll

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

    public class MediaInfoCommand : MediaCommand
    Inheritance
    object
    MediaCommand
    MediaInfoCommand

    Constructors

    View Source

    MediaInfoCommand(MediaDatabase)

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

    Declaration
    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.

    System.ObjectDisposedException

    database has already been disposed.

    Methods

    View Source

    Add(string)

    Adds the media to the database.

    Declaration
    public MediaInfo Add(string path)
    Parameters
    Type Name Description
    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.

    System.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.

    System.UnauthorizedAccessException

    The caller has no required privilege.

    System.NotSupportedException

    The required feature is not supported.

    View Source

    AddAsync(IEnumerable<string>)

    Adds media files into the media database.

    Declaration
    public Task AddAsync(IEnumerable<string> paths)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T><string> paths

    The paths of the media files to add.

    Returns
    Type Description
    System.Threading.Tasks.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.

    System.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.

    System.UnauthorizedAccessException

    The caller has no required privilege.

    System.NotSupportedException

    The required feature is not supported.

    View Source

    CountBookmark(string, CountArguments)

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

    Declaration
    [Obsolete("Deprecated since API12. Will be removed in API14.")]
    public int CountBookmark(string mediaId, CountArguments arguments)
    Parameters
    Type Name Description
    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
    int

    The number of the bookmarks.

    Exceptions
    Type Condition
    System.InvalidOperationException

    The MediaDatabase is disconnected.

    System.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.

    View Source

    CountBookmark(string)

    Retrieves the number of the bookmarks added to the media.

    Declaration
    [Obsolete("Deprecated since API12. Will be removed in API14.")]
    public int CountBookmark(string mediaId)
    Parameters
    Type Name Description
    string mediaId

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

    Returns
    Type Description
    int

    The number of the bookmarks.

    Exceptions
    Type Condition
    System.InvalidOperationException

    The MediaDatabase is disconnected.

    System.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.

    View Source

    CountFaceInfo(string, CountArguments)

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

    Declaration
    [Obsolete("Deprecated since API11. Will be removed in API13.")]
    public int CountFaceInfo(string mediaId, CountArguments arguments)
    Parameters
    Type Name Description
    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
    int

    The number of the face information.

    Exceptions
    Type Condition
    System.InvalidOperationException

    The MediaDatabase is disconnected.

    System.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.

    View Source

    CountFaceInfo(string)

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

    Declaration
    [Obsolete("Deprecated since API11. Will be removed in API13.")]
    public int CountFaceInfo(string mediaId)
    Parameters
    Type Name Description
    string mediaId

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

    Returns
    Type Description
    int

    The number of the face information.

    Exceptions
    Type Condition
    System.InvalidOperationException

    The MediaDatabase is disconnected.

    System.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.

    View Source

    CountGroupBy(MediaInfoColumnKey, CountArguments)

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

    Declaration
    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
    int

    The number of groups.

    Exceptions
    Type Condition
    System.InvalidOperationException

    The MediaDatabase is disconnected.

    System.ObjectDisposedException

    The MediaDatabase has already been disposed.

    MediaDatabaseException

    An error occurred while executing the command.

    System.ArgumentException

    columnKey is invalid.

    View Source

    CountGroupBy(MediaInfoColumnKey)

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

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

    The column key.

    Returns
    Type Description
    int

    The number of groups.

    Exceptions
    Type Condition
    System.InvalidOperationException

    The MediaDatabase is disconnected.

    System.ObjectDisposedException

    The MediaDatabase has already been disposed.

    MediaDatabaseException

    An error occurred while executing the command.

    System.ArgumentException

    columnKey is invalid.

    View Source

    CountMedia()

    Retrieves the number of the media information.

    Declaration
    public int CountMedia()
    Returns
    Type Description
    int

    The number of the media information.

    Exceptions
    Type Condition
    System.InvalidOperationException

    The MediaDatabase is disconnected.

    System.ObjectDisposedException

    The MediaDatabase has already been disposed.

    MediaDatabaseException

    An error occurred while executing the command.

    View Source

    CountMedia(CountArguments)

    Retrieves the number of the media information with the SelectArguments.

    Declaration
    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
    int

    The number of media information.

    Exceptions
    Type Condition
    System.InvalidOperationException

    The MediaDatabase is disconnected.

    System.ObjectDisposedException

    The MediaDatabase has already been disposed.

    MediaDatabaseException

    An error occurred while executing the command.

    View Source

    CountTag(string, CountArguments)

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

    Declaration
    [Obsolete("Deprecated since API12. Will be removed in API14.")]
    public int CountTag(string mediaId, CountArguments arguments)
    Parameters
    Type Name Description
    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
    int

    The number of tags.

    Exceptions
    Type Condition
    System.InvalidOperationException

    The MediaDatabase is disconnected.

    System.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.

    View Source

    CountTag(string)

    Retrieves the number of tags that the media has.

    Declaration
    [Obsolete("Deprecated since API12. Will be removed in API14.")]
    public int CountTag(string mediaId)
    Parameters
    Type Name Description
    string mediaId

    The media ID to count tags added to the media.

    Returns
    Type Description
    int

    The number of tags.

    Exceptions
    Type Condition
    System.InvalidOperationException

    The MediaDatabase is disconnected.

    System.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.

    View Source

    CreateThumbnail(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
    public string CreateThumbnail(string mediaId)
    Parameters
    Type Name Description
    string mediaId

    The ID of the media for which the thumbnail will be created.

    Returns
    Type Description
    string

    A created thumbnail path.

    Exceptions
    Type Condition
    System.InvalidOperationException

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

    System.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.

    System.UnauthorizedAccessException

    The caller has no required privilege.

    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
    [Obsolete("Deprecated since API10. Will be removed in API12. Please use CreateThumbnail instead.")]
    public Task<string> CreateThumbnailAsync(string mediaId, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    string mediaId

    The media ID to create the thumbnail.

    System.Threading.CancellationToken cancellationToken

    The token to cancel the operation.

    Returns
    Type Description
    System.Threading.Tasks.Task<TResult><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.

    System.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.

    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
    [Obsolete("Deprecated since API10. Will be removed in API12. Please use CreateThumbnail instead.")]
    public Task<string> CreateThumbnailAsync(string mediaId)
    Parameters
    Type Name Description
    string mediaId

    The media ID to create the thumbnail.

    Returns
    Type Description
    System.Threading.Tasks.Task<TResult><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.

    System.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.

    View Source

    Delete(string)

    Deletes the media from the database.

    Declaration
    public bool Delete(string mediaId)
    Parameters
    Type Name Description
    string mediaId

    The media ID to delete.

    Returns
    Type Description
    bool

    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)

    System.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.

    System.UnauthorizedAccessException

    The caller has no required privilege.

    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
    [Obsolete("Deprecated since API11. Will be removed in API13.")]
    public Task<int> DetectFaceAsync(string mediaId, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    string mediaId

    The media ID to create the thumbnail.

    System.Threading.CancellationToken cancellationToken

    The token to cancel the operation.

    Returns
    Type Description
    System.Threading.Tasks.Task<TResult><int>

    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.

    System.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.

    System.NotSupportedException

    The required feature is not supported.

    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
    [Obsolete("Deprecated since API11. Will be removed in API13.")]
    public Task<int> DetectFaceAsync(string mediaId)
    Parameters
    Type Name Description
    string mediaId

    The media ID to create the thumbnail.

    Returns
    Type Description
    System.Threading.Tasks.Task<TResult><int>

    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.

    System.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.

    System.UnauthorizedAccessException

    The caller has no required privilege.

    View Source

    Move(string, string)

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

    Declaration
    public bool Move(string mediaId, string newPath)
    Parameters
    Type Name Description
    string mediaId

    The media ID to move.

    string newPath

    The path that the media has been moved to.

    Returns
    Type Description
    bool

    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.

    System.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.

    System.UnauthorizedAccessException

    The caller has no required privilege.

    View Source

    SelectBookmark(string, SelectArguments)

    Retrieves the bookmarks added to the media with the SelectArguments.

    Declaration
    [Obsolete("Deprecated since API12. Will be removed in API14.")]
    public MediaDataReader<Bookmark> SelectBookmark(string mediaId, SelectArguments filter)
    Parameters
    Type Name Description
    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.

    System.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.

    View Source

    SelectBookmark(string)

    Retrieves the bookmarks added to the media.

    Declaration
    [Obsolete("Deprecated since API12. Will be removed in API14.")]
    public MediaDataReader<Bookmark> SelectBookmark(string mediaId)
    Parameters
    Type Name Description
    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.

    System.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.

    View Source

    SelectEbookPath(string)

    Retrieves all matched ebook paths with given keyword.

    Declaration
    public MediaDataReader<string> SelectEbookPath(string keyword)
    Parameters
    Type Name Description
    string keyword

    The keyword to search.

    Returns
    Type Description
    MediaDataReader<string>

    A list of ebook paths which contain keyword.

    Exceptions
    Type Condition
    System.ArgumentNullException

    keyword is null.

    System.InvalidOperationException

    The MediaDatabase is disconnected.

    System.ObjectDisposedException

    The MediaDatabase has already been disposed.

    MediaDatabaseException

    An error occurred while executing the command.

    System.UnauthorizedAccessException

    The caller has no required privilege.

    View Source

    SelectFaceInfo(string, SelectArguments)

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

    Declaration
    [Obsolete("Deprecated since API11. Will be removed in API13.")]
    public MediaDataReader<FaceInfo> SelectFaceInfo(string mediaId, SelectArguments arguments)
    Parameters
    Type Name Description
    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.

    System.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.

    View Source

    SelectFaceInfo(string)

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

    Declaration
    [Obsolete("Deprecated since API11. Will be removed in API13.")]
    public MediaDataReader<FaceInfo> SelectFaceInfo(string mediaId)
    Parameters
    Type Name Description
    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.

    System.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.

    View Source

    SelectGroupBy(MediaInfoColumnKey, SelectArguments)

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

    Declaration
    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<string>

    The MediaDataReader<TRecord> containing the results.

    Exceptions
    Type Condition
    System.InvalidOperationException

    The MediaDatabase is disconnected.

    System.ObjectDisposedException

    The MediaDatabase has already been disposed.

    MediaDatabaseException

    An error occurred while executing the command.

    System.ArgumentException

    columnKey is invalid.

    View Source

    SelectGroupBy(MediaInfoColumnKey)

    Retrieves the group values of the specified column.

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

    The column key.

    Returns
    Type Description
    MediaDataReader<string>

    The MediaDataReader<TRecord> containing the results.

    Exceptions
    Type Condition
    System.InvalidOperationException

    The MediaDatabase is disconnected.

    System.ObjectDisposedException

    The MediaDatabase has already been disposed.

    MediaDatabaseException

    An error occurred while executing the command.

    System.ArgumentException

    columnKey is invalid.

    View Source

    SelectMedia()

    Retrieves all the media.

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

    The MediaDataReader<TRecord> containing the results.

    Exceptions
    Type Condition
    System.InvalidOperationException

    The MediaDatabase is disconnected.

    System.ObjectDisposedException

    The MediaDatabase has already been disposed.

    MediaDatabaseException

    An error occurred while executing the command.

    View Source

    SelectMedia(string)

    Retrieves the media.

    Declaration
    public MediaInfo SelectMedia(string mediaId)
    Parameters
    Type Name Description
    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.

    System.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.

    View Source

    SelectMedia(SelectArguments)

    Retrieves the media with the SelectArguments.

    Declaration
    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.

    System.ObjectDisposedException

    The MediaDatabase has already been disposed.

    MediaDatabaseException

    An error occurred while executing the command.

    View Source

    SelectTag(string, SelectArguments)

    Retrieves the tags that the media has with the SelectArguments.

    Declaration
    [Obsolete("Deprecated since API12. Will be removed in API14.")]
    public MediaDataReader<Tag> SelectTag(string mediaId, SelectArguments filter)
    Parameters
    Type Name Description
    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.

    System.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.

    View Source

    SelectTag(string)

    Retrieves the tags that the media has.

    Declaration
    [Obsolete("Deprecated since API12. Will be removed in API14.")]
    public MediaDataReader<Tag> SelectTag(string mediaId)
    Parameters
    Type Name Description
    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.

    System.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.

    View Source

    UpdateFavorite(string, bool)

    Updates the media with the favorite value.

    Declaration
    [Obsolete("Deprecated since API12. Will be removed in API14.")]
    public bool UpdateFavorite(string mediaId, bool value)
    Parameters
    Type Name Description
    string mediaId

    The media ID to update.

    bool value

    The value indicating whether the media is favorite.

    Returns
    Type Description
    bool

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

    Exceptions
    Type Condition
    System.InvalidOperationException

    The MediaDatabase is disconnected.

    System.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.

    System.UnauthorizedAccessException

    The caller has no required privilege.

    • View Source
    Back to top Copyright © 2016-2024 Samsung
    Generated by DocFX