2 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 namespace Tizen.Content.MediaContent
22 /// Represents the media bookmark that allows you to mark an interesting moment
23 /// in media (video and audio) to enable fast searching.
27 internal Bookmark(IntPtr handle)
29 Id = InteropHelper.GetValue<int>(handle, Interop.Bookmark.GetId);
30 ThumbnailPath = InteropHelper.GetString(handle, Interop.Bookmark.GetThumbnailPath);
31 Offset = InteropHelper.GetValue<int>(handle, Interop.Bookmark.GetMarkedTime);
32 Name = InteropHelper.GetString(handle, Interop.Bookmark.GetName);
36 /// Gets the ID of the bookmark.
38 /// <value>The ID of the bookmark.</value>
39 public int Id { get; }
42 /// Gets the thumbnail path of the bookmark.
44 /// <value>The thumbnail path of the bookmark.</value>
45 public string ThumbnailPath { get; }
48 /// Gets the offset in milliseconds.
50 /// <value>The offset of the bookmark in media in milliseconds.</value>
51 public int Offset { get; }
54 /// Gets the name of the bookmark.
56 /// <value>The name of the bookmark.</value>
57 public string Name { get; }
59 internal static Bookmark FromHandle(IntPtr handle) => new Bookmark(handle);
62 /// Returns a string representation of the bookmark.
64 /// <returns>A string representation of the current bookmark.</returns>
65 public override string ToString() =>
66 $"Id={Id}, Name={Name}, ThumbnailPath={ThumbnailPath}, Offset={Offset}";