MeeGo 1.2 Harmattan Developer Documentation Develop for the Nokia N9
   Home · All Classes · All Namespaces · Modules · Functions · Files

avatar.h

00001 
00023 #ifndef _TelepathyQt4_avatar_h_HEADER_GUARD_
00024 #define _TelepathyQt4_avatar_h_HEADER_GUARD_
00025 
00026 #ifndef IN_TELEPATHY_QT4_HEADER
00027 #error IN_TELEPATHY_QT4_HEADER
00028 #endif
00029 
00030 #include <TelepathyQt4/Global>
00031 
00032 #include <QSharedDataPointer>
00033 #include <QString>
00034 #include <QStringList>
00035 #include <QMetaType>
00036 
00037 namespace Tp
00038 {
00039 
00040 struct TELEPATHY_QT4_EXPORT AvatarData
00041 {
00042 public:
00043     inline AvatarData(const QString &fileName, const QString &mimeType)
00044         : fileName(fileName), mimeType(mimeType) {}
00045     inline AvatarData() {}
00046 
00047     QString fileName;
00048     QString mimeType;
00049 };
00050 
00051 class TELEPATHY_QT4_EXPORT AvatarSpec
00052 {
00053 public:
00054     AvatarSpec();
00055     AvatarSpec(const QStringList &supportedMimeTypes,
00056             uint minHeight, uint maxHeight, uint recommendedHeight,
00057             uint minWidth, uint maxWidth, uint recommendedWidth,
00058             uint maxBytes);
00059     AvatarSpec(const AvatarSpec &other);
00060     ~AvatarSpec();
00061 
00062     bool isValid() const { return mPriv.constData() != 0; }
00063 
00064     AvatarSpec &operator=(const AvatarSpec &other);
00065 
00066     QStringList supportedMimeTypes() const;
00067     uint minimumHeight() const;
00068     uint maximumHeight() const;
00069     uint recommendedHeight() const;
00070     uint minimumWidth() const;
00071     uint maximumWidth() const;
00072     uint recommendedWidth() const;
00073     uint maximumBytes() const;
00074 
00075 private:
00076     struct Private;
00077     friend struct Private;
00078     QSharedDataPointer<Private> mPriv;
00079 };
00080 
00081 } // Tp
00082 
00083 Q_DECLARE_METATYPE(Tp::AvatarData);
00084 Q_DECLARE_METATYPE(Tp::AvatarSpec);
00085 
00086 #endif

Copyright © 2008-2011 Collabora Ltd. and Nokia Corporation
Telepathy-Qt4 0.6.5