Changeset View
Changeset View
Standalone View
Standalone View
src/services/kservicefactory_p.h
Show All 19 Lines | |||||
20 | 20 | | |||
21 | #ifndef KSERVICEFACTORY_P_H | 21 | #ifndef KSERVICEFACTORY_P_H | ||
22 | #define KSERVICEFACTORY_P_H | 22 | #define KSERVICEFACTORY_P_H | ||
23 | 23 | | |||
24 | #include <QStringList> | 24 | #include <QStringList> | ||
25 | 25 | | |||
26 | #include "kserviceoffer.h" | 26 | #include "kserviceoffer.h" | ||
27 | #include "ksycocafactory_p.h" | 27 | #include "ksycocafactory_p.h" | ||
28 | #include "kservicetype.h" | ||||
28 | #include <assert.h> | 29 | #include <assert.h> | ||
29 | 30 | | |||
30 | class KSycoca; | 31 | class KSycoca; | ||
31 | class KSycocaDict; | 32 | class KSycocaDict; | ||
32 | 33 | | |||
33 | /** | 34 | /** | ||
34 | * @internal | 35 | * @internal | ||
35 | * A sycoca factory for services (e.g. applications) | 36 | * A sycoca factory for services (e.g. applications) | ||
▲ Show 20 Lines • Show All 50 Lines • ▼ Show 20 Line(s) | 45 | public: | |||
86 | */ | 87 | */ | ||
87 | KServiceOfferList offers(int serviceTypeOffset, int serviceOffersOffset); | 88 | KServiceOfferList offers(int serviceTypeOffset, int serviceOffersOffset); | ||
88 | 89 | | |||
89 | /** | 90 | /** | ||
90 | * @return the services supporting the given service type; without information about initialPreference | 91 | * @return the services supporting the given service type; without information about initialPreference | ||
91 | * The @p serviceOffersOffset allows to jump to the right entries directly. | 92 | * The @p serviceOffersOffset allows to jump to the right entries directly. | ||
92 | */ | 93 | */ | ||
93 | KService::List serviceOffers(int serviceTypeOffset, int serviceOffersOffset); | 94 | KService::List serviceOffers(int serviceTypeOffset, int serviceOffersOffset); | ||
95 | KService::List serviceOffers(const KServiceType::Ptr &serviceType); | ||||
94 | 96 | | |||
95 | /** | 97 | /** | ||
96 | * Test if a specific service is associated with a specific servicetype | 98 | * Test if a specific service is associated with a specific servicetype | ||
97 | * @param serviceTypeOffset the offset of the service type being tested | 99 | * @param serviceTypeOffset the offset of the service type being tested | ||
98 | * @param serviceOffersOffset allows to jump to the right entries for the service type directly. | 100 | * @param serviceOffersOffset allows to jump to the right entries for the service type directly. | ||
99 | * @param testedServiceOffset the offset of the service being tested | 101 | * @param testedServiceOffset the offset of the service being tested | ||
100 | */ | 102 | */ | ||
101 | bool hasOffer(int serviceTypeOffset, int serviceOffersOffset, int testedServiceOffset); | 103 | bool hasOffer(int serviceTypeOffset, int serviceOffersOffset, int testedServiceOffset); | ||
104 | bool hasOffer(const KServiceType::Ptr &serviceType, const KService::Ptr &testedService); | ||||
102 | 105 | | |||
103 | /** | 106 | /** | ||
104 | * @return all services. Very memory consuming, avoid using. | 107 | * @return all services. Very memory consuming, avoid using. | ||
105 | */ | 108 | */ | ||
106 | KService::List allServices(); | 109 | KService::List allServices(); | ||
107 | 110 | | |||
108 | /** | 111 | /** | ||
109 | * Returns the directories to watch for this factory. | 112 | * Returns the directories to watch for this factory. | ||
Show All 27 Lines |