home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / ktnef / ktnefpropertyset.h < prev    next >
Encoding:
C/C++ Source or Header  |  2005-09-10  |  1.8 KB  |  55 lines

  1. /*
  2.     ktnefpropertyset.h
  3.  
  4.     Copyright (C) 2002 Michael Goffioul <kdeprint@swing.be>
  5.  
  6.     This file is part of KTNEF, the KDE TNEF support library/program.
  7.  
  8.     This program is free software; you can redistribute it and/or modify
  9.     it under the terms of the GNU General Public License as published by
  10.     the Free Software Foundation; either version 2 of the License, or
  11.     (at your option) any later version.
  12.  
  13.     You should have received a copy of the GNU General Public License
  14.     along with this program; if not, write to the Free Software Foundation,
  15.     Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
  16.  */
  17.  
  18. #ifndef KTNEFPROPERTYSET_H
  19. #define KTNEFPROPERTYSET_H
  20.  
  21. #include <qmap.h>
  22. #include <qvariant.h>
  23. #include <kdepimmacros.h>
  24.  
  25. class KTNEFProperty;
  26.  
  27. class KDE_EXPORT KTNEFPropertySet
  28. {
  29. public:
  30.     KTNEFPropertySet();
  31.     ~KTNEFPropertySet();
  32.  
  33.     /* MAPI properties interface */
  34.     void addProperty( int key, int type, const QVariant& value, const QVariant& name = QVariant(), bool overwrite = false );
  35.     QString findProp(     int key,             const QString& fallback=QString::null, bool convertToUpper=false);
  36.     QString findNamedProp(const QString& name, const QString& fallback=QString::null, bool convertToUpper=false);
  37.     QMap<int,KTNEFProperty*>& properties();
  38.     const QMap<int,KTNEFProperty*>& properties() const;
  39.     QVariant property( int key ) const;
  40.  
  41.     /* TNEF attributes interface */
  42.     void addAttribute( int key, int type, const QVariant& value, bool overwrite = false );
  43.     QMap<int,KTNEFProperty*>& attributes();
  44.     const QMap<int,KTNEFProperty*>& attributes() const;
  45.     QVariant attribute( int key ) const;
  46.  
  47.     void clear( bool deleteAll = false );
  48.  
  49. private:
  50.     QMap<int,KTNEFProperty*> properties_;  /* used to store MAPI properties */
  51.     QMap<int,KTNEFProperty*> attributes_;  /* used to store TNEF attributes */
  52. };
  53.  
  54. #endif /* KTNEFPROPERTYSET_H */
  55.