TDE personal information management applications
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

protocol.h 2.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*
  2. * Copyright (C) 2005, Mart Kelder (mart.kde@hccnet.nl)
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation; either version 2 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program; if not, write to the Free Software
  16. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  17. */
  18. #ifndef PROTOCOL_H
  19. #define PROTOCOL_H
  20. class AccountInput;
  21. class TDEConfigGroup;
  22. class TDEIO_Protocol;
  23. class KMailDrop;
  24. class TQGroupBox;
  25. class TQObject;
  26. class TQStringList;
  27. class TQWidget;
  28. template< class T> class TQPtrList;
  29. template< class T> class TQPtrVector;
  30. template< class T, class S> class TQMap;
  31. #include <tqstring.h>
  32. class Protocol
  33. {
  34. public:
  35. Protocol() {}
  36. virtual ~Protocol() {}
  37. virtual const Protocol* getProtocol( TDEConfigGroup* ) const = 0;
  38. virtual KMailDrop* createMaildrop( TDEConfigGroup* ) const = 0;
  39. virtual TQMap< TQString, TQString > * createConfig( TDEConfigGroup* config, const TQString& password ) const = 0;
  40. virtual TQString configName() const { return "not specified"; }
  41. virtual void configFillGroupBoxes( TQStringList* ) const = 0;
  42. virtual void configFields( TQPtrVector< TQWidget >* vector, const TQObject*, TQPtrList< AccountInput >* ) const = 0;
  43. virtual void readEntries( TQMap< TQString, TQString >* ) const = 0;
  44. virtual void writeEntries( TQMap< TQString, TQString >* ) const = 0;
  45. virtual unsigned short defaultPort( bool ) const { return 0; }
  46. //Functions that return a derived class.
  47. //This way, no explicit cast is needed
  48. virtual const TDEIO_Protocol* getKIOProtocol() const { return 0; }
  49. };
  50. #endif //PROTOCOL_H