[MediaController] Add new APIs for event, capabilities and search. (#468)
[platform/core/csapi/tizenfx.git] / src / Tizen.Multimedia.Remoting / MediaController / MediaControlSearchCondition.cs
1 /*
2  * Copyright (c) 2018 Samsung Electronics Co., Ltd All Rights Reserved
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16
17 using System;
18 using System.Collections.Generic;
19 using Tizen.Applications;
20 using NativeClient = Interop.MediaControllerClient;
21 using NativeServer = Interop.MediaControllerServer;
22 using NativePlaylist = Interop.MediaControllerPlaylist;
23
24 namespace Tizen.Multimedia.Remoting
25 {
26     /// <summary>
27     /// Represents the search conditions.
28     /// </summary>
29     /// <since_tizen> 5 </since_tizen>
30     public class MediaControlSearchCondition
31     {
32         /// <summary>
33         /// Initializes a new instance of the <see cref="MediaControlSearchCondition"/> class.
34         /// </summary>
35         /// <since_tizen> 5 </since_tizen>
36         public MediaControlSearchCondition(MediaControlContentType type, MediaControlSearchCategory category,
37             string keyword, Bundle bundle)
38             : this (type, keyword, bundle)
39         {
40             ValidationUtil.ValidateEnum(typeof(MediaControlSearchCategory), category, nameof(category));
41
42             Category = category;
43         }
44
45         /// <summary>
46         /// Initializes a new instance of the <see cref="MediaControlSearchCondition"/> class.
47         /// </summary>
48         /// <remarks>The <see cref="MediaControlSearchCategory"/> will be set internally by <see cref="MediaControlSearchCategory.All"/>.</remarks>
49         /// <since_tizen> 5 </since_tizen>
50         public MediaControlSearchCondition(MediaControlContentType type, string keyword, Bundle bundle)
51         {
52             ValidationUtil.ValidateEnum(typeof(MediaControlContentType), type, nameof(type));
53
54             Category = MediaControlSearchCategory.All;
55             ContentType = type;
56             Keyword = keyword ?? throw new ArgumentNullException(nameof(keyword));
57             Bundle = bundle;
58         }
59
60         /// <summary>
61         /// Gets the search content type.
62         /// </summary>
63         /// <since_tizen> 5 </since_tizen>
64         public MediaControlContentType ContentType { get; }
65
66         /// <summary>
67         /// Gets the search category.
68         /// </summary>
69         /// <since_tizen> 5 </since_tizen>
70         public MediaControlSearchCategory Category { get; }
71
72         /// <summary>
73         /// Gets the search keyword.
74         /// </summary>
75         /// <since_tizen> 5 </since_tizen>
76         public string Keyword { get; }
77
78         /// <summary>
79         /// Gets the extra data.
80         /// </summary>
81         /// <since_tizen> 5 </since_tizen>
82         public Bundle Bundle { get; }
83     }
84 }