File indexing completed on 2023-09-24 04:11:10
0001 /* 0002 This file is part of the KDE project 0003 SPDX-FileCopyrightText: 1998, 1999 Torben Weis <weis@kde.org> 0004 SPDX-FileCopyrightText: 2007 David Faure <faure@kde.org> 0005 0006 SPDX-License-Identifier: LGPL-2.0-or-later 0007 */ 0008 0009 #ifndef __kservicetypeprofile_h__ 0010 #define __kservicetypeprofile_h__ 0011 0012 #include <QString> 0013 0014 #include <kservicetypetrader.h> 0015 0016 #if KSERVICE_ENABLE_DEPRECATED_SINCE(5, 66) 0017 /** 0018 * KServiceTypeProfile represents the user's preferences for services 0019 * of a service type. 0020 * It consists of a list of services (service offers) for the service type 0021 * that is sorted by the user's preference. 0022 * KServiceTypeTrader uses KServiceTypeProfile to 0023 * get results sorted according to the user's preference. 0024 * 0025 * @see KService 0026 * @see KServiceType 0027 * @see KServiceTypeTrader 0028 * @short Represents the user's preferences for services of a service type 0029 */ 0030 namespace KServiceTypeProfile 0031 { 0032 /** 0033 * Write the complete profile for a given servicetype. 0034 * Do not use this for MIME types. 0035 * @param serviceType The name of the servicetype. 0036 * @param services Ordered list of services, from the preferred one to the least preferred one. 0037 * @param disabledServices List of services which are normally associated with this serviceType, 0038 * but which should be disabled, i.e. trader queries will not return them. 0039 * @deprecated since 5.66, unused. 0040 */ 0041 KSERVICE_EXPORT 0042 KSERVICE_DEPRECATED_VERSION(5, 66, "Unused") 0043 void writeServiceTypeProfile(const QString &serviceType, const KService::List &services, const KService::List &disabledServices = KService::List()); 0044 0045 /** 0046 * Delete the complete profile for a given servicetype, reverting to the default 0047 * preference order (the one specified by InitialPreference in the .desktop files). 0048 * 0049 * Do not use this for MIME types. 0050 * @param serviceType The name of the servicetype. 0051 */ 0052 KSERVICE_EXPORT 0053 KSERVICE_DEPRECATED_VERSION(5, 66, "Unused") 0054 void deleteServiceTypeProfile(const QString &serviceType); 0055 } 0056 #endif 0057 0058 namespace KServiceTypeProfile 0059 { 0060 /** 0061 * @internal, for KServiceTypeTrader & unit test 0062 */ 0063 KSERVICE_EXPORT bool hasProfile(const QString &serviceType); 0064 0065 /** 0066 * Clear all cached information 0067 * @internal, for KServiceTypeFactory 0068 */ 0069 void clearCache(); 0070 0071 } 0072 0073 #endif