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.
17 using System.Collections.Generic;
19 namespace Tizen.Applications
22 /// This class is a parameter of PackageManager::GetPackages method.
24 public class PackageFilter
26 private IDictionary<string, bool> _filter;
29 /// Default constructor with empty filter list. All installed applications will satisfy this filter unless updated with more specific filters.
31 public PackageFilter()
33 _filter = new Dictionary<string, bool>();
37 /// Constructor with specific filters. Using this will filter out installed packages which do not meet the criteria of the filters.
39 public PackageFilter(IDictionary<string, bool> filter)
45 /// Filters to be used in the GetPackages method.
47 public IDictionary<string, bool> Filters
56 /// This class contains possible keys for filter to be used in the GetPackages method.
58 public static class Keys
61 /// Key of the boolean property for filtering whether the package is removable
63 public const string Removable = "PMINFO_PKGINFO_PROP_PACKAGE_REMOVABLE";
65 /// Key of the boolean property for filtering whether the package is readonly.
67 public const string ReadOnly = "PMINFO_PKGINFO_PROP_PACKAGE_READONLY";
69 /// Key of the boolean property for filtering whether the package supports disabling.
71 public const string SupportsDisable = "PMINFO_PKGINFO_PROP_PACKAGE_SUPPORT_DISABLE";
73 /// Key of the boolean property for filtering whether the package is disabled.
75 public const string Disable = "PMINFO_PKGINFO_PROP_PACKAGE_DISABLE";
77 /// Key of the boolean property for filtering whether the package is preloaded.
79 public const string Preload = "PMINFO_PKGINFO_PROP_PACKAGE_PRELOAD";