Class BookmarkCommand
Definition
- Namespace:
- Tizen.Content.MediaContent
- Assembly:
- Tizen.Content.MediaContent.dll
- API Level:
- 4
Provides commands to manage bookmarks in the database.
public class BookmarkCommand : MediaCommand
- Inheritance
Constructors
View SourceBookmarkCommand(MediaDatabase)
Initializes a new instance of the BookmarkCommand class with the specified MediaDatabase.
Declaration
public BookmarkCommand(MediaDatabase database)
Parameters
Type | Name | Description |
---|---|---|
MediaDatabase | database | The MediaDatabase that the commands run on. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
ObjectDisposedException |
|
API Level: 4
Methods
View SourceCount()
Retrieves the number of bookmarks.
Declaration
public int Count()
Returns
Type | Description |
---|---|
Int32 | The number of bookmarks. |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | The MediaDatabase is disconnected. |
ObjectDisposedException | The MediaDatabase has already been disposed. |
MediaDatabaseException | An error occurred while executing the command. |
API Level: 4
View SourceCount(CountArguments)
Retrieves the number of bookmarks with CountArguments.
Declaration
public int Count(CountArguments arguments)
Parameters
Type | Name | Description |
---|---|---|
CountArguments | arguments | The criteria to use to filter. This value can be null. |
Returns
Type | Description |
---|---|
Int32 | The number of bookmarks. |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | The MediaDatabase is disconnected. |
ObjectDisposedException | The MediaDatabase has already been disposed. |
MediaDatabaseException | An error occurred while executing the command. |
API Level: 4
View SourceDelete(Int32)
Deletes a bookmark from the database.
Declaration
public bool Delete(int bookmarkId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | bookmarkId | The bookmark ID to delete. |
Returns
Type | Description |
---|---|
Boolean | true if the matched record was found and deleted, otherwise false. |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | The MediaDatabase is disconnected. |
ObjectDisposedException | The MediaDatabase has already been disposed. |
MediaDatabaseException | An error occurred while executing the command. |
ArgumentOutOfRangeException |
|
UnauthorizedAccessException | The caller has no required privilege. |
API Level: 4
Privilege Level: public
Privilege: http://tizen.org/privilege/content.write
View SourceInsert(String, Int32)
Inserts a new bookmark into the database with the specified media and offset.
Declaration
public Bookmark Insert(string mediaId, int offset)
Parameters
Type | Name | Description |
---|---|---|
String | mediaId | The media ID to be associated with. |
Int32 | offset | The time offset in milliseconds. |
Returns
Type | Description |
---|---|
Bookmark | The Bookmark instance that contains the record information inserted. |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | The MediaDatabase is disconnected. |
ObjectDisposedException | The MediaDatabase has already been disposed. |
MediaDatabaseException | An error occurred while executing the command. |
ArgumentNullException |
|
ArgumentException |
|
UnauthorizedAccessException | The caller has no required privilege. |
API Level: 4
Privilege Level: public
Privilege: http://tizen.org/privilege/content.write
View SourceInsert(String, Int32, String)
Inserts a new bookmark into the database with the specified media ID, offset, and name.
Declaration
public Bookmark Insert(string mediaId, int offset, string name)
Parameters
Type | Name | Description |
---|---|---|
String | mediaId | The media ID to be associated with. |
Int32 | offset | The time offset in milliseconds. |
String | name | The name of the bookmark. This value can be null. |
Returns
Type | Description |
---|---|
Bookmark | The Bookmark instance that contains the record information inserted. |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | The MediaDatabase is disconnected. |
ObjectDisposedException | The MediaDatabase has already been disposed. |
MediaDatabaseException | An error occurred while executing the command. |
ArgumentNullException |
|
ArgumentException |
|
UnauthorizedAccessException | The caller has no required privilege. |
API Level: 4
Privilege Level: public
Privilege: http://tizen.org/privilege/content.write
View SourceInsert(String, Int32, String, String)
Inserts a new bookmark into the database with the specified media ID, offset, name, and thumbnail path.
Declaration
public Bookmark Insert(string mediaId, int offset, string name, string thumbnailPath)
Parameters
Type | Name | Description |
---|---|---|
String | mediaId | The media ID to be associated with. |
Int32 | offset | The time offset in milliseconds. |
String | name | The name of the bookmark. This value can be null. |
String | thumbnailPath | The thumbnail path of the bookmark. This value can be null. |
Returns
Type | Description |
---|---|
Bookmark | The Bookmark instance that contains the record information inserted. |
Remarks
The thumbnail may be useful only when the media is video.
Exceptions
Type | Condition |
---|---|
InvalidOperationException | The MediaDatabase is disconnected. |
ObjectDisposedException | The MediaDatabase has already been disposed. |
MediaDatabaseException | An error occurred while executing the command. |
ArgumentNullException |
|
ArgumentException |
|
UnauthorizedAccessException | The caller has no required privilege. |
API Level: 4
Privilege Level: public
Privilege: http://tizen.org/privilege/content.write
View SourceSelect()
Retrieves the bookmarks.
Declaration
public MediaDataReader<Bookmark> Select()
Returns
Type | Description |
---|---|
MediaDataReader<Bookmark> | The MediaDataReader<TRecord> containing the results. |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | The MediaDatabase is disconnected. |
ObjectDisposedException | The MediaDatabase has already been disposed. |
MediaDatabaseException | An error occurred while executing the command. |
API Level: 4
View SourceSelect(SelectArguments)
Retrieves the bookmarks with SelectArguments.
Declaration
public MediaDataReader<Bookmark> Select(SelectArguments filter)
Parameters
Type | Name | Description |
---|---|---|
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 |
---|---|
InvalidOperationException | The MediaDatabase is disconnected. |
ObjectDisposedException | The MediaDatabase has already been disposed. |
MediaDatabaseException | An error occurred while executing the command. |