TDE core libraries
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

kbuildservicetypefactory.h 2.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /* This file is part of the KDE project
  2. Copyright (C) 1999 David Faure <faure@kde.org>
  3. This library is free software; you can redistribute it and/or
  4. modify it under the terms of the GNU Library General Public
  5. License as published by the Free Software Foundation; either
  6. version 2 of the License, or (at your option) any later version.
  7. This library is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  10. Library General Public License for more details.
  11. You should have received a copy of the GNU Library General Public License
  12. along with this library; see the file COPYING.LIB. If not, write to
  13. the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  14. Boston, MA 02110-1301, USA.
  15. */
  16. #ifndef __k_build_service_type_factory_h__
  17. #define __k_build_service_type_factory_h__
  18. #include <kservicetypefactory.h>
  19. #include <tqstringlist.h>
  20. /**
  21. * Service-type factory for building tdesycoca
  22. * @internal
  23. */
  24. class KBuildServiceTypeFactory : public KServiceTypeFactory
  25. {
  26. public:
  27. /**
  28. * Create factory
  29. */
  30. KBuildServiceTypeFactory();
  31. virtual ~KBuildServiceTypeFactory();
  32. /**
  33. * Find a service type in the database file
  34. * @return a pointer to the servicetype in the memory dict (don't free!)
  35. */
  36. virtual KServiceType * findServiceTypeByName(const TQString &_name);
  37. /**
  38. * Construct a KServiceType from a config file.
  39. */
  40. virtual KSycocaEntry * createEntry(const TQString &file, const char *resource);
  41. virtual KServiceType * createEntry( int ) { assert(0); return 0L; }
  42. /**
  43. * Add entry
  44. */
  45. virtual void addEntry(KSycocaEntry *newEntry, const char *resource);
  46. /**
  47. * Write out service type specific index files.
  48. */
  49. virtual void save(TQDataStream &str);
  50. /**
  51. * Write out header information
  52. *
  53. * Don't forget to call the parent first when you override
  54. * this function.
  55. */
  56. virtual void saveHeader(TQDataStream &str);
  57. /**
  58. * Returns all resource types for this service factory
  59. */
  60. static TQStringList resourceTypes();
  61. private:
  62. void savePatternLists(TQDataStream &str);
  63. };
  64. #endif