/* * Copyright (c) 2018 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an AS IS BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ using System; using System.Collections.Generic; using Tizen.Applications; using NativeClient = Interop.MediaControllerClient; using NativeServer = Interop.MediaControllerServer; using NativePlaylist = Interop.MediaControllerPlaylist; namespace Tizen.Multimedia.Remoting { /// /// Represents the search conditions. /// /// 5 public class MediaControlSearchCondition { /// /// Initializes a new instance of the class. /// /// /// The will be set internally by . /// /// The search type. /// The search keyword. /// is not valid. /// is null. /// 6 public MediaControlSearchCondition(MediaControlContentType type, string keyword) : this(type, MediaControlSearchCategory.All, keyword, null) { } /// /// Initializes a new instance of the class. /// /// The search type. /// The search category. /// The search keyword. /// /// or is not valid. /// /// is null. /// 6 public MediaControlSearchCondition(MediaControlContentType type, MediaControlSearchCategory category, string keyword) : this (type, category, keyword, null) { } /// /// Initializes a new instance of the class. /// /// /// The will be set internally by . /// /// The search type. /// The search keyword. /// The extra data. /// is not valid. /// is null. /// 5 public MediaControlSearchCondition(MediaControlContentType type, string keyword, Bundle bundle) : this(type, MediaControlSearchCategory.All, keyword, bundle) { } /// /// Initializes a new instance of the class. /// /// The search type. /// The search category. /// The search keyword. /// The extra data. /// /// or is not valid. /// /// is null. /// 5 public MediaControlSearchCondition(MediaControlContentType type, MediaControlSearchCategory category, string keyword, Bundle bundle) { ValidationUtil.ValidateEnum(typeof(MediaControlSearchCategory), category, nameof(category)); ValidationUtil.ValidateEnum(typeof(MediaControlContentType), type, nameof(type)); Category = category; ContentType = type; Keyword = keyword ?? throw new ArgumentNullException(nameof(keyword)); Bundle = bundle; } /// /// Gets the search content type. /// /// 5 public MediaControlContentType ContentType { get; } /// /// Gets the search category. /// /// 5 public MediaControlSearchCategory Category { get; } /// /// Gets the search keyword. /// /// 5 public string Keyword { get; } /// /// Gets the extra data. /// /// 5 public Bundle Bundle { get; } } }