TDE personal information management applications
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.

58 lines
2.0KB

  1. /*
  2. This file is part of KAddressbook.
  3. Copyright (c) 2003 Tobias Koenig <tokoe@kde.org>
  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. This program 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
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  15. As a special exception, permission is given to link this program
  16. with any edition of TQt, and distribute the resulting executable,
  17. without including the source code for TQt in the source distribution.
  18. */
  19. #ifndef VCARD_XXPORT_H
  20. #define VCARD_XXPORT_H
  21. #include <xxport.h>
  22. #include <kabc/vcardparser.h> // for KABC_VCARD_ENCODING_FIX define
  23. class VCardXXPort : public KAB::XXPort
  24. {
  25. Q_OBJECT
  26. TQ_OBJECT
  27. public:
  28. VCardXXPort( KABC::AddressBook *ab, TQWidget *parent, const char *name = 0 );
  29. TQString identifier() const { return "vcard"; }
  30. public slots:
  31. bool exportContacts( const KABC::AddresseeList &list, const TQString &data );
  32. KABC::AddresseeList importContacts( const TQString &data ) const;
  33. private:
  34. #if defined(KABC_VCARD_ENCODING_FIX)
  35. KABC::AddresseeList parseVCard( const TQByteArray &data ) const;
  36. bool doExport( const KURL &url, const TQByteArray &data );
  37. #else
  38. KABC::AddresseeList parseVCard( const TQString &data ) const;
  39. bool doExport( const KURL &url, const TQString &data );
  40. #endif
  41. void addKey( KABC::Addressee &addr, KABC::Key::Types type );
  42. KABC::AddresseeList filterContacts( const KABC::AddresseeList& );
  43. };
  44. #endif