21 #include <tqeventloop.h>
24 #include "tdebuildsycoca.h"
25 #include "kresourcelist.h"
26 #include "vfolder_menu.h"
29 #include <kmimetype.h>
30 #include <kbuildservicetypefactory.h>
31 #include <kbuildservicefactory.h>
32 #include <kbuildservicegroupfactory.h>
33 #include <kbuildimageiofactory.h>
34 #include <kbuildprotocolinfofactory.h>
35 #include <kctimefactory.h>
36 #include <kdatastream.h>
38 #include <tqdatastream.h>
43 #include <tdeapplication.h>
44 #include <dcopclient.h>
45 #include <tdeglobal.h>
47 #include <kdirwatch.h>
48 #include <kstandarddirs.h>
49 #include <ksavefile.h>
50 #include <tdelocale.h>
51 #include <tdeaboutdata.h>
52 #include <tdecmdlineargs.h>
55 #ifdef KBUILDSYCOCA_GUI
58 # include <tdemessagebox.h>
68 typedef TQDict<KSycocaEntry> KBSEntryDict;
69 typedef TQValueList<KSycocaEntry::List> KSycocaEntryListList;
71 static TQ_UINT32 newTimestamp = 0;
75 static KSycocaFactory *g_factory = 0;
77 static TQDict<TQ_UINT32> *g_ctimeDict = 0;
78 static const char *g_resource = 0;
79 static KBSEntryDict *g_entryDict = 0;
80 static KBSEntryDict *g_serviceGroupEntryDict = 0;
81 static KSycocaEntryListList *g_allEntries = 0;
82 static TQStringList *g_changeList = 0;
83 static TQStringList *g_allResourceDirs = 0;
84 static bool g_changed =
false;
85 static KSycocaEntry::List g_tempStorage;
86 static VFolderMenu *g_vfolder = 0;
88 static const char *cSycocaPath = 0;
90 static bool bGlobalDatabase =
false;
91 static bool bMenuTest =
false;
93 void crashHandler(
int)
101 static TQString sycocaPath()
107 path = TDEGlobal::dirs()->saveLocation(
"services")+
"tdesycoca";
111 TQCString tdesycoca_env = getenv(
"TDESYCOCA");
112 if (tdesycoca_env.isEmpty())
113 path = TDEGlobal::dirs()->saveLocation(
"cache")+
"tdesycoca";
115 path = TQFile::decodeName(tdesycoca_env);
121 static TQString oldSycocaPath()
123 TQCString tdesycoca_env = getenv(
"TDESYCOCA");
124 if (tdesycoca_env.isEmpty())
125 return TDEGlobal::dirs()->saveLocation(
"tmp")+
"tdesycoca";
127 return TQString::null;
130 KBuildSycoca::KBuildSycoca()
135 KBuildSycoca::~KBuildSycoca()
140 void KBuildSycoca::processGnomeVfs()
142 TQString file = locate(
"app-reg",
"gnome-vfs.applications");
153 FILE *f = fopen(TQFile::encodeName(file),
"r");
156 if (!fgets(line,
sizeof(line)-1, f))
163 app = TQString::fromLatin1(line);
164 app.truncate(app.length()-1);
166 else if (strncmp(line+1,
"mime_types=", 11) == 0)
168 TQString mimetypes = TQString::fromLatin1(line+12);
169 mimetypes.truncate(mimetypes.length()-1);
170 mimetypes.replace(TQRegExp(
"\\*"),
"all");
171 KService *s = g_bsf->findServiceByName(app);
175 TQStringList &serviceTypes = s->accessServiceTypes();
176 if (serviceTypes.count() <= 1)
178 serviceTypes += TQStringList::split(
',', mimetypes);
187 KSycocaEntry *KBuildSycoca::createEntry(
const TQString &file,
bool addToFactory)
189 TQ_UINT32 timeStamp = g_ctimeInfo->ctime(file);
192 timeStamp = TDEGlobal::dirs()->calcResourceHash( g_resource, file,
true);
194 KSycocaEntry* entry = 0;
198 TQ_UINT32 *timeP = (*g_ctimeDict)[file];
199 TQ_UINT32 oldTimestamp = timeP ? *timeP : 0;
201 if (timeStamp && (timeStamp == oldTimestamp))
204 if (g_factory == g_bsgf)
206 entry = g_entryDict->find(file.left(file.length()-10));
208 else if (g_factory == g_bsf)
210 entry = g_entryDict->find(file);
214 entry = g_entryDict->find(file);
219 g_ctimeDict->remove( file );
221 else if (oldTimestamp)
224 kdDebug(7021) <<
"modified: " << file << endl;
229 kdDebug(7021) <<
"new: " << file << endl;
232 g_ctimeInfo->addCTime(file, timeStamp );
236 entry = g_factory->createEntry( file, g_resource );
238 if ( entry && entry->isValid() )
241 g_factory->addEntry( entry, g_resource );
243 g_tempStorage.append(entry);
249 void KBuildSycoca::slotCreateEntry(
const TQString &file, KService **service)
251 KSycocaEntry *entry = createEntry(file,
false);
252 *service =
dynamic_cast<KService *
>(entry);
256 bool KBuildSycoca::build()
258 typedef TQPtrList<KBSEntryDict> KBSEntryDictList;
259 KBSEntryDictList *entryDictList = 0;
260 KBSEntryDict *serviceEntryDict = 0;
262 entryDictList =
new KBSEntryDictList();
266 for (KSycocaFactory *factory = m_lstFactories->first();
268 factory = m_lstFactories->next() )
270 KBSEntryDict *entryDict =
new KBSEntryDict();
273 KSycocaEntry::List list = (*g_allEntries)[i++];
274 for( KSycocaEntry::List::Iterator it = list.begin();
278 entryDict->insert( (*it)->entryPath(),
static_cast<KSycocaEntry *
>(*it));
281 if (factory == g_bsf)
282 serviceEntryDict = entryDict;
283 else if (factory == g_bsgf)
284 g_serviceGroupEntryDict = entryDict;
285 entryDictList->append(entryDict);
288 TQStringList allResources;
290 for (KSycocaFactory *factory = m_lstFactories->first();
292 factory = m_lstFactories->next() )
295 const KSycocaResourceList *list = factory->resourceList();
298 for( KSycocaResourceList::ConstIterator it1 = list->begin();
302 KSycocaResource res = (*it1);
303 if (!allResources.contains(res.resource))
304 allResources.append(res.resource);
309 bool uptodate =
true;
311 for( TQStringList::ConstIterator it1 = allResources.begin();
312 it1 != allResources.end();
316 g_resource = (*it1).ascii();
318 TQStringList relFiles;
320 (void) TDEGlobal::dirs()->findAllResources( g_resource,
329 g_entryDict = entryDictList->first();
330 for (g_factory = m_lstFactories->first();
332 g_factory = m_lstFactories->next(),
333 g_entryDict = entryDictList->next() )
336 const KSycocaResourceList *list = g_factory->resourceList();
339 for( KSycocaResourceList::ConstIterator it2 = list->begin();
343 KSycocaResource res = (*it2);
344 if (res.resource != (*it1))
continue;
347 for( TQStringList::ConstIterator it3 = relFiles.begin();
348 it3 != relFiles.end();
352 if ((*it3).endsWith(res.extension))
353 createEntry(*it3,
true);
356 if ((g_factory == g_bsf) && (strcmp(g_resource,
"services") == 0))
359 if (g_changed || !g_allEntries)
362 g_changeList->append(g_resource);
366 bool result = !uptodate || !g_ctimeDict->isEmpty();
368 if (result || bMenuTest)
372 g_entryDict = serviceEntryDict;
375 g_vfolder =
new VFolderMenu;
376 if (!m_trackId.isEmpty())
377 g_vfolder->setTrackId(m_trackId);
379 connect(g_vfolder, TQ_SIGNAL(newService(
const TQString &, KService **)),
380 this, TQ_SLOT(slotCreateEntry(
const TQString &, KService **)));
382 VFolderMenu::SubMenu *kdeMenu = g_vfolder->parseMenu(
"tde-applications.menu",
true);
384 KServiceGroup *entry = g_bsgf->
addNew(
"/", kdeMenu->directoryFile, 0,
false);
385 entry->setLayoutInfo(kdeMenu->layoutList);
386 createMenu(TQString::null, TQString::null, kdeMenu);
388 KServiceGroup::Ptr g(entry);
390 (void) existingResourceDirs();
391 *g_allResourceDirs += g_vfolder->allDirectories();
393 disconnect(g_vfolder, TQ_SIGNAL(newService(
const TQString &, KService **)),
394 this, TQ_SLOT(slotCreateEntry(
const TQString &, KService **)));
396 if (g_changed || !g_allEntries)
399 g_changeList->append(g_resource);
408 void KBuildSycoca::createMenu(TQString caption, TQString name, VFolderMenu::SubMenu *menu)
410 for(VFolderMenu::SubMenu *subMenu = menu->subMenus.first(); subMenu; subMenu = menu->subMenus.next())
412 TQString subName = name+subMenu->name+
"/";
414 TQString directoryFile = subMenu->directoryFile;
415 if (directoryFile.isEmpty())
416 directoryFile = subName+
".directory";
417 TQ_UINT32 timeStamp = g_ctimeInfo->ctime(directoryFile);
420 timeStamp = TDEGlobal::dirs()->calcResourceHash( g_resource, directoryFile,
true);
423 KServiceGroup* entry = 0;
426 TQ_UINT32 *timeP = (*g_ctimeDict)[directoryFile];
427 TQ_UINT32 oldTimestamp = timeP ? *timeP : 0;
429 if (timeStamp && (timeStamp == oldTimestamp))
431 entry =
dynamic_cast<KServiceGroup *
> (g_serviceGroupEntryDict->find(subName));
432 if (entry && (entry->directoryEntryPath() != directoryFile))
436 g_ctimeInfo->addCTime(directoryFile, timeStamp);
438 entry = g_bsgf->
addNew(subName, subMenu->directoryFile, entry, subMenu->isDeleted);
439 entry->setLayoutInfo(subMenu->layoutList);
440 if (! (bMenuTest && entry->noDisplay()) )
441 createMenu(caption + entry->caption() +
"/", subName, subMenu);
443 if (caption.isEmpty())
447 for(TQDictIterator<KService> it(menu->items); it.current(); ++it)
451 if (!menu->isDeleted && !it.current()->noDisplay())
452 printf(
"%s\t%s\t%s\n", caption.local8Bit().data(), it.current()->menuId().local8Bit().data(), locate(
"apps", it.current()->desktopEntryPath()).local8Bit().data());
456 g_bsf->
addEntry( it.current(), g_resource );
462 bool KBuildSycoca::recreate()
464 TQString path(sycocaPath());
466 printf(
"tdebuildsycoca: path='%s'\n", (
const char*)path);
471 std::unique_ptr<KSaveFile> database(
new KSaveFile(path) );
472 if (database->status() == EACCES && TQFile::exists(path))
474 TQFile::remove( path );
475 database.reset(
new KSaveFile(path) );
477 if (database->status() != 0)
479 fprintf(stderr,
"[tdebuildsycoca] ERROR creating database '%s'! %s\n", path.local8Bit().data(),strerror(database->status()));
480 #ifdef KBUILDSYCOCA_GUI
483 KMessageBox::error(0, i18n(
"Error creating database '%1'.\nCheck that the permissions are correct on the directory and the disk is not full.\n").arg(path.local8Bit().data()), i18n(
"KBuildSycoca"));
488 m_str = database->dataStream();
490 kdDebug(7021) <<
"Recreating tdesycoca file (" << path <<
", version " << KSycoca::version() <<
")" << endl;
503 if (m_str->device()->status())
506 if (!database->close())
508 fprintf(stderr,
"[tdebuildsycoca] ERROR writing database '%s'!\n", database->name().local8Bit().data());
509 fprintf(stderr,
"[tdebuildsycoca] Disk full?\n");
510 #ifdef KBUILDSYCOCA_GUI
512 KMessageBox::error(0, i18n(
"[tdebuildsycoca] Error writing database '%1'.\nCheck that the permissions are correct on the directory and the disk is not full.\n").arg(path.local8Bit().data()), i18n(
"KBuildSycoca"));
523 kdDebug(7021) <<
"Database is up to date" << endl;
526 if (!bGlobalDatabase)
529 TQString stamppath = path +
"stamp";
530 TQFile tdesycocastamp(stamppath);
531 tdesycocastamp.open( IO_WriteOnly );
532 TQDataStream str( &tdesycocastamp );
534 str << existingResourceDirs();
536 str << g_vfolder->allDirectories();
541 void KBuildSycoca::save()
544 m_str->device()->at(0);
546 (*m_str) << (TQ_INT32) KSycoca::version();
547 KSycocaFactory * servicetypeFactory = 0L;
548 KSycocaFactory * serviceFactory = 0L;
549 for(KSycocaFactory *factory = m_lstFactories->first();
551 factory = m_lstFactories->next())
555 aId = factory->factoryId();
556 if ( aId == KST_KServiceTypeFactory )
557 servicetypeFactory = factory;
558 else if ( aId == KST_KServiceFactory )
559 serviceFactory = factory;
560 aOffset = factory->offset();
564 (*m_str) << (TQ_INT32) 0;
566 (*m_str) << TDEGlobal::dirs()->kfsstnd_prefixes();
567 (*m_str) << newTimestamp;
568 (*m_str) << TDEGlobal::locale()->language();
569 (*m_str) << TDEGlobal::dirs()->calcResourceHash(
"services",
"update_tdesycoca",
true);
570 (*m_str) << (*g_allResourceDirs);
573 for(KSycocaFactory *factory = m_lstFactories->first();
575 factory = m_lstFactories->next())
577 factory->save(*m_str);
578 if (m_str->device()->status())
582 int endOfData = m_str->device()->at();
585 m_str->device()->at(0);
587 (*m_str) << (TQ_INT32) KSycoca::version();
588 for(KSycocaFactory *factory = m_lstFactories->first();
590 factory = m_lstFactories->next())
594 aId = factory->factoryId();
595 aOffset = factory->offset();
599 (*m_str) << (TQ_INT32) 0;
602 m_str->device()->at(endOfData);
605 bool KBuildSycoca::checkDirTimestamps(
const TQString& dirname,
const TQDateTime& stamp,
bool top )
609 TQFileInfo inf( dirname );
610 if( inf.lastModified() > stamp )
612 kdDebug( 7021 ) <<
"timestamp changed:" << dirname << endl;
616 TQDir dir( dirname );
617 const TQFileInfoList *list = dir.entryInfoList( TQDir::DefaultFilter, TQDir::Unsorted );
621 for( TQFileInfoListIterator it( *list );
622 it.current() != NULL;
625 TQFileInfo* fi = it.current();
626 if( fi->fileName() ==
"." || fi->fileName() ==
".." )
628 if( fi->lastModified() > stamp )
630 kdDebug( 7201 ) <<
"timestamp changed:" << fi->filePath() << endl;
633 if( fi->isDir() && !checkDirTimestamps( fi->filePath(), stamp,
false ))
643 bool KBuildSycoca::checkTimestamps( TQ_UINT32 timestamp,
const TQStringList &dirs )
645 kdDebug( 7021 ) <<
"checking file timestamps" << endl;
647 stamp.setTime_t( timestamp );
648 for( TQStringList::ConstIterator it = dirs.begin();
652 if( !checkDirTimestamps( *it, stamp,
true ))
655 kdDebug( 7021 ) <<
"timestamps check ok" << endl;
659 TQStringList KBuildSycoca::existingResourceDirs()
661 static TQStringList* dirs = NULL;
664 dirs =
new TQStringList;
665 g_allResourceDirs =
new TQStringList;
667 TQStringList resources;
673 while( !resources.empty())
675 TQString res = resources.front();
676 *dirs += TDEGlobal::dirs()->resourceDirs( res.latin1());
677 resources.remove( res );
680 *g_allResourceDirs = *dirs;
682 for( TQStringList::Iterator it = dirs->begin();
685 TQFileInfo inf( *it );
686 if( !inf.exists() || !inf.isReadable() )
687 it = dirs->remove( it );
694 static TDECmdLineOptions options[] = {
695 {
"nosignal", I18N_NOOP(
"Do not signal applications to update"), 0 },
696 {
"noincremental", I18N_NOOP(
"Disable incremental update, re-read everything"), 0 },
697 {
"checkstamps", I18N_NOOP(
"Check file timestamps"), 0 },
698 {
"nocheckfiles", I18N_NOOP(
"Disable checking files (dangerous)"), 0 },
699 {
"global", I18N_NOOP(
"Create global database"), 0 },
700 {
"menutest", I18N_NOOP(
"Perform menu generation test run only"), 0 },
701 {
"track <menu-id>", I18N_NOOP(
"Track menu id for debug purposes"), 0 },
702 #ifdef KBUILDSYCOCA_GUI
703 {
"silent", I18N_NOOP(
"Silent - work without windows and stderr"), 0 },
704 {
"showprogress", I18N_NOOP(
"Show progress information (even if 'silent' mode is on)"), 0 },
709 static const char appName[] =
"tdebuildsycoca";
710 static const char appVersion[] =
"1.1";
712 class WaitForSignal :
public TQObject
715 ~WaitForSignal() { kapp->eventLoop()->exitLoop(); }
718 extern "C" TDE_EXPORT
int kdemain(
int argc,
char **argv)
720 TDELocale::setMainCatalogue(
"tdelibs");
721 TDEAboutData d(appName, I18N_NOOP(
"KBuildSycoca"), appVersion,
722 I18N_NOOP(
"Rebuilds the system configuration cache."),
723 TDEAboutData::License_GPL,
"(c) 1999-2002 KDE Developers");
724 d.addAuthor(
"David Faure", I18N_NOOP(
"Author"),
"faure@kde.org");
725 d.addAuthor(
"Waldo Bastian", I18N_NOOP(
"Author"),
"bastian@kde.org");
727 TDECmdLineArgs::init(argc, argv, &d);
728 TDECmdLineArgs::addCmdLineOptions(options);
729 TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
730 bGlobalDatabase = args->isSet(
"global");
731 bMenuTest = args->isSet(
"menutest");
735 setenv(
"TDEHOME",
"-", 1);
736 setenv(
"TDEROOTHOME",
"-", 1);
739 TDEApplication::disableAutoDcopRegistration();
740 #ifdef KBUILDSYCOCA_GUI
743 TDEApplication k(
false,
false);
745 k.disableSessionManagement();
747 #ifdef KBUILDSYCOCA_GUI
748 silent = args->isSet(
"silent");
749 showprogress = args->isSet(
"showprogress");
750 TQLabel progress( TQString(
"<p><br><nobr> %1 </nobr><br>").arg( i18n(
"Reloading TDE configuration, please wait...") ), 0,
"", TQt::WType_Dialog | TQt::WStyle_DialogBorder | TQt::WStyle_Customize| TQt::WStyle_Title );
751 TQString capt = i18n(
"TDE Configuration Manager");
753 if (KMessageBox::No == KMessageBox::questionYesNo(0, i18n(
"Do you want to reload TDE configuration?"), capt, i18n(
"Reload"), i18n(
"Do Not Reload")))
756 if (!silent || showprogress) {
757 progress.setCaption( capt );
762 TDECrash::setCrashHandler(TDECrash::defaultCrashHandler);
763 TDECrash::setEmergencySaveFunction(crashHandler);
764 TDECrash::setApplicationName(TQString(appName));
767 TDELocale::setMainCatalogue(
"tdelibs");
771 TDEGlobal::dirs()->addResourceType(
"app-reg",
"share/application-registry" );
773 DCOPClient *dcopClient =
new DCOPClient();
777 TQCString registeredName = dcopClient->registerAs(appName,
false);
778 if (registeredName.isEmpty())
780 fprintf(stderr,
"[tdebuildsycoca] Warning: %s is unable to register with DCOP.\n", appName);
783 else if (registeredName == appName)
787 fprintf(stderr,
"[tdebuildsycoca] Waiting for already running %s to finish.\n", appName);
789 dcopClient->setNotifications(
true );
790 while (dcopClient->isApplicationRegistered(appName))
792 WaitForSignal *obj =
new WaitForSignal;
793 obj->connect(dcopClient, TQ_SIGNAL(applicationRemoved(
const TQCString &)),
794 TQ_SLOT(deleteLater()));
795 kapp->eventLoop()->enterLoop();
797 dcopClient->setNotifications(
false );
799 fprintf(stderr,
"[tdebuildsycoca] %s running...\n", appName);
801 bool checkfiles = bGlobalDatabase || args->isSet(
"checkfiles");
803 bool incremental = !bGlobalDatabase && args->isSet(
"incremental") && checkfiles;
804 if (incremental || !checkfiles)
806 KSycoca::self()->disableAutoRebuild();
807 TQString current_language = TDEGlobal::locale()->language();
808 TQString tdesycoca_language = KSycoca::self()->language();
809 TQ_UINT32 current_update_sig = TDEGlobal::dirs()->calcResourceHash(
"services",
"update_tdesycoca",
true);
810 TQ_UINT32 tdesycoca_update_sig = KSycoca::self()->updateSignature();
812 if ((current_update_sig != tdesycoca_update_sig) ||
813 (current_language != tdesycoca_language) ||
814 (KSycoca::self()->timeStamp() == 0))
818 delete KSycoca::self();
822 g_changeList =
new TQStringList;
824 bool checkstamps = incremental && args->isSet(
"checkstamps") && checkfiles;
825 TQ_UINT32 filestamp = 0;
826 TQStringList oldresourcedirs;
827 if( checkstamps && incremental )
829 TQString path = sycocaPath()+
"stamp";
830 TQCString qPath = TQFile::encodeName(path);
831 cSycocaPath = qPath.data();
832 TQFile tdesycocastamp(path);
833 if( tdesycocastamp.open( IO_ReadOnly ))
835 TQDataStream str( &tdesycocastamp );
840 str >> oldresourcedirs;
841 if( oldresourcedirs != KBuildSycoca::existingResourceDirs())
850 TQStringList extraResourceDirs;
851 str >> extraResourceDirs;
852 oldresourcedirs += extraResourceDirs;
862 newTimestamp = (TQ_UINT32) time(0);
864 if( checkfiles && ( !checkstamps || !KBuildSycoca::checkTimestamps( filestamp, oldresourcedirs )))
866 TQCString qSycocaPath = TQFile::encodeName(sycocaPath());
867 cSycocaPath = qSycocaPath.data();
873 tqWarning(
"[tdebuildsycoca] Reusing existing tdesycoca.");
874 KSycoca *oldSycoca = KSycoca::self();
875 KSycocaFactoryList *factories =
new KSycocaFactoryList;
876 g_allEntries =
new KSycocaEntryListList;
877 g_ctimeDict =
new TQDict<TQ_UINT32>(523);
880 factories->append(
new KServiceTypeFactory );
881 factories->append(
new KServiceGroupFactory );
882 factories->append(
new KServiceFactory );
883 factories->append(
new KImageIOFactory );
884 factories->append(
new KProtocolInfoFactory );
887 for (KSycocaFactory *factory = factories->first();
889 factory = factories->next() )
891 KSycocaEntry::List list;
892 list = factory->allEntries();
893 g_allEntries->append( list );
895 delete factories; factories = 0;
897 ctimeInfo->fillCTimeDict(*g_ctimeDict);
902 KBuildSycoca *sycoca=
new KBuildSycoca;
903 if (args->isSet(
"track"))
904 sycoca->setTrackId(TQString::fromLocal8Bit(args->getOption(
"track")));
905 if (!sycoca->recreate()) {
906 #ifdef KBUILDSYCOCA_GUI
907 if (!silent || showprogress)
917 TQString applnkDir = TDEGlobal::dirs()->saveLocation(
"apps", TQString::null,
false);
918 ::rmdir(TQFile::encodeName(applnkDir));
919 TQString servicetypesDir = TDEGlobal::dirs()->saveLocation(
"servicetypes", TQString::null,
false);
920 ::rmdir(TQFile::encodeName(servicetypesDir));
924 if (!bGlobalDatabase)
927 TQString oldPath = oldSycocaPath();
928 if (!oldPath.isEmpty())
931 if (tmp.status() == 0)
933 TQString tmpFile = tmp.name();
935 symlink(TQFile::encodeName(sycocaPath()), TQFile::encodeName(tmpFile));
936 rename(TQFile::encodeName(tmpFile), TQFile::encodeName(oldPath));
941 if (args->isSet(
"signal"))
945 TQDataStream stream(data, IO_WriteOnly);
946 stream << *g_changeList;
947 dcopClient->send(
"*",
"tdesycoca",
"notifyDatabaseChanged(TQStringList)", data );
950 #ifdef KBUILDSYCOCA_GUI
953 KMessageBox::information(0, i18n(
"[tdebuildsycoca] Configuration information reloaded successfully."), capt);
959 #include "tdebuildsycoca.moc"
Service group factory for building tdesycoca.
static TQStringList resourceTypes()
Returns all resource types for this service factory.
Protocol Info factory for building tdesycoca.
static TQStringList resourceTypes()
Returns all resource types for this service factory.
Service factory for building tdesycoca.
static TQStringList resourceTypes()
Returns all resource types for this service factory.
void addEntry(KSycocaEntry *newEntry, const char *resource)
Add a new entry.
Service group factory for building tdesycoca.
static TQStringList resourceTypes()
Returns all resource types for this service factory.
KServiceGroup * addNew(const TQString &menuName, const TQString &file, KServiceGroup *entry, bool isDeleted)
Add new menu menuName defined by file When entry is non-null it is re-used, otherwise a new group is ...
void addNewEntryTo(const TQString &menuName, KService *newEntry)
Adds the entry newEntry to the menu menuName.
Service-type factory for building tdesycoca.
static TQStringList resourceTypes()
Returns all resource types for this service factory.
Service group factory for building tdesycoca.