19 #ifndef PROFILEENGINE_H 20 #define PROFILEENGINE_H 35 void operator() (
Profile *profile)
37 profiles[profile->name()] = profile;
40 TQMap<TQString, Profile*> profiles;
52 void operator() (
Profile *profile)
54 resourceList += profile->resources(m_filter);
57 KURL::List resourceList;
103 TDETrader::OfferList offers(
const TQString &profileName,
OfferType offerType);
105 TDETrader::OfferList allOffers(
OfferType offerType);
111 KURL::List resources(
const TQString &profileName,
const TQString &nameFilter);
119 KURL::List resourcesRecursive(
const TQString &profileName,
const TQString &nameFilter);
125 void addResource(
const TQString &profileName,
const KURL &url);
137 void diffProfiles(
OfferType offerType,
const TQString &profile1,
const TQString &profile2,
138 TQStringList &unload, TDETrader::OfferList &load);
146 Profile *findProfile(
const TQString &profileName);
177 template<
class Operation>
180 TQValueList<Profile*> children = root->children();
181 for (TQValueList<Profile*>::iterator it = children.begin(); it != children.end(); ++it)
184 walkProfiles<Operation>(op, *it);
244 template<
class Operation,
class Result>
247 TQValueList<Profile*> children = root->children();
248 for (TQValueList<Profile*>::iterator it = children.begin(); it != children.end(); ++it)
250 Result *newResult = op(result, *it);
251 walkProfiles<Operation>(op, newResult, *it);
256 void processDir(
const TQString &dir,
const TQString &currPath, TQMap<TQString, Profile*> &passedPaths,
Profile *root);
258 KURL::List resources(
Profile *profile,
const TQString &nameFilter);
266 const TQString &profileName);
Profile resource listing operation.
Profile * rootProfile() const
void walkProfiles(Operation &op, Result *result, Profile *root)
Walks profiles tree and applies operation op to each profile found in the tree below root (root profi...
void walkProfiles(Operation &op, Profile *root)
Walks profiles tree and applies operation op to each profile found in the tree below root (root profi...
Profile listing operation.
OfferType
Type of the plugin offer.