5 #include <kstandarddirs.h>
6 #include <kservicegroup.h>
8 #include <kuserprofile.h>
9 #include <kprotocolinfo.h>
11 #include <tdeapplication.h>
15 int main(
int argc,
char *argv[])
17 TDEApplication k(argc,argv,
"blurb",
false);
19 KMimeType::List mtl = KMimeType::allMimeTypes( );
20 assert( mtl.count() );
21 tqDebug(
"Found %d mime types.", mtl.count() );
22 TQValueListIterator<KMimeType::Ptr> it(mtl.begin());
23 KServiceTypeProfile::OfferList ol;
25 for (; it != mtl.end(); ++it)
29 printf(
"APP:%s:", (*it)->name().latin1() );
30 ol = KServiceTypeProfile::offers((*it)->name(),
"Application");
31 TQValueListIterator<KServiceOffer> it2(ol.begin());
32 for (; it2 != ol.end(); ++it2) {
33 if ((*it2).allowAsDefault())
34 printf(
" %s", (*it2).service()->desktopEntryPath().ascii() );
42 printf(
"PART:%s:", (*it)->name().latin1() );
43 ol = KServiceTypeProfile::offers((*it)->name(),
"KParts/ReadOnlyPart");
44 TQValueListIterator<KServiceOffer> it2(ol.begin());
45 for (; it2 != ol.end(); ++it2) {
46 if ((*it2).allowAsDefault())
47 printf(
" %s", (*it2).service()->desktopEntryPath().ascii() );