2 * Copyright (c) 2018 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.
18 using System.Collections.Generic;
19 using Tizen.Applications;
20 using NativeClient = Interop.MediaControllerClient;
21 using NativeServer = Interop.MediaControllerServer;
22 using NativePlaylist = Interop.MediaControllerPlaylist;
24 namespace Tizen.Multimedia.Remoting
27 /// Represents the search conditions.
29 /// <since_tizen> 5 </since_tizen>
30 public class MediaControlSearchCondition
33 /// Initializes a new instance of the <see cref="MediaControlSearchCondition"/> class.
36 /// The <see cref="MediaControlSearchCategory"/> will be set internally by <see cref="MediaControlSearchCategory.All"/>.
38 /// <param name="type" > The search type.</param>
39 /// <param name="keyword">The search keyword.</param>
40 /// <exception cref="ArgumentException"><paramref name="type"/> is not valid.</exception>
41 /// <exception cref="ArgumentNullException"><paramref name="keyword"/> is null.</exception>
42 /// <since_tizen> 6 </since_tizen>
43 public MediaControlSearchCondition(MediaControlContentType type, string keyword)
44 : this(type, MediaControlSearchCategory.All, keyword, null)
49 /// Initializes a new instance of the <see cref="MediaControlSearchCondition"/> class.
51 /// <param name="type">The search type.</param>
52 /// <param name="category">The search category.</param>
53 /// <param name="keyword">The search keyword.</param>
54 /// <exception cref="ArgumentException">
55 /// <paramref name="type"/> or <paramref name="category"/> is not valid.
57 /// <exception cref="ArgumentNullException"><paramref name="keyword"/> is null.</exception>
58 /// <since_tizen> 6 </since_tizen>
59 public MediaControlSearchCondition(MediaControlContentType type, MediaControlSearchCategory category, string keyword)
60 : this (type, category, keyword, null)
65 /// Initializes a new instance of the <see cref="MediaControlSearchCondition"/> class.
68 /// The <see cref="MediaControlSearchCategory"/> will be set internally by <see cref="MediaControlSearchCategory.All"/>.
70 /// <param name="type" > The search type.</param>
71 /// <param name="keyword">The search keyword.</param>
72 /// <param name="bundle">The extra data.</param>
73 /// <exception cref="ArgumentException"><paramref name="type"/> is not valid.</exception>
74 /// <exception cref="ArgumentNullException"><paramref name="keyword"/> is null.</exception>
75 /// <since_tizen> 5 </since_tizen>
76 public MediaControlSearchCondition(MediaControlContentType type, string keyword, Bundle bundle)
77 : this(type, MediaControlSearchCategory.All, keyword, bundle)
82 /// Initializes a new instance of the <see cref="MediaControlSearchCondition"/> class.
84 /// <param name="type">The search type.</param>
85 /// <param name="category">The search category.</param>
86 /// <param name="keyword">The search keyword.</param>
87 /// <param name="bundle">The extra data.</param>
88 /// <exception cref="ArgumentException">
89 /// <paramref name="type"/> or <paramref name="category"/> is not valid.
91 /// <exception cref="ArgumentNullException"><paramref name="keyword"/> is null.</exception>
92 /// <since_tizen> 5 </since_tizen>
93 public MediaControlSearchCondition(MediaControlContentType type, MediaControlSearchCategory category,
94 string keyword, Bundle bundle)
96 ValidationUtil.ValidateEnum(typeof(MediaControlSearchCategory), category, nameof(category));
97 ValidationUtil.ValidateEnum(typeof(MediaControlContentType), type, nameof(type));
101 Keyword = keyword ?? throw new ArgumentNullException(nameof(keyword));
106 /// Gets the search content type.
108 /// <since_tizen> 5 </since_tizen>
109 public MediaControlContentType ContentType { get; }
112 /// Gets the search category.
114 /// <since_tizen> 5 </since_tizen>
115 public MediaControlSearchCategory Category { get; }
118 /// Gets the search keyword.
120 /// <since_tizen> 5 </since_tizen>
121 public string Keyword { get; }
124 /// Gets the extra data.
126 /// <since_tizen> 5 </since_tizen>
127 public Bundle Bundle { get; }