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.

kbuildprotocolinfofactory.cpp 1.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /* This file is part of the KDE libraries
  2. * Copyright (C) 2000 Waldo Bastian <bastian@kde.org>
  3. *
  4. * This library is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU Library General Public
  6. * License version 2 as published by the Free Software Foundation.
  7. *
  8. * This library is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. * Library General Public License for more details.
  12. *
  13. * You should have received a copy of the GNU Library General Public License
  14. * along with this library; see the file COPYING.LIB. If not, write to
  15. * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  16. * Boston, MA 02110-1301, USA.
  17. **/
  18. #include "kbuildprotocolinfofactory.h"
  19. #include "tdesycoca.h"
  20. #include "tdesycocadict.h"
  21. #include "kresourcelist.h"
  22. #include <tdeglobal.h>
  23. #include <kstandarddirs.h>
  24. #include <kmessageboxwrapper.h>
  25. #include <kdebug.h>
  26. #include <tdelocale.h>
  27. #include <assert.h>
  28. KBuildProtocolInfoFactory::KBuildProtocolInfoFactory() :
  29. KProtocolInfoFactory()
  30. {
  31. m_resourceList = new KSycocaResourceList();
  32. m_resourceList->add( "services", "*.protocol" );
  33. }
  34. // return all service types for this factory
  35. // i.e. first arguments to m_resourceList->add() above
  36. TQStringList KBuildProtocolInfoFactory::resourceTypes()
  37. {
  38. return TQStringList() << "services";
  39. }
  40. KBuildProtocolInfoFactory::~KBuildProtocolInfoFactory()
  41. {
  42. delete m_resourceList;
  43. }
  44. KProtocolInfo *
  45. KBuildProtocolInfoFactory::createEntry( const TQString& file, const char * )
  46. {
  47. return new KProtocolInfo(file);
  48. }
  49. void
  50. KBuildProtocolInfoFactory::addEntry( KSycocaEntry *newEntry, const char *resource)
  51. {
  52. KSycocaFactory::addEntry(newEntry, resource);
  53. }