QXmpp Version:0.3.91
|
00001 /* 00002 * Copyright (C) 2008-2011 The QXmpp developers 00003 * 00004 * Author: 00005 * Manjeet Dahiya 00006 * 00007 * Source: 00008 * http://code.google.com/p/qxmpp 00009 * 00010 * This file is a part of QXmpp library. 00011 * 00012 * This library is free software; you can redistribute it and/or 00013 * modify it under the terms of the GNU Lesser General Public 00014 * License as published by the Free Software Foundation; either 00015 * version 2.1 of the License, or (at your option) any later version. 00016 * 00017 * This library is distributed in the hope that it will be useful, 00018 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00019 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00020 * Lesser General Public License for more details. 00021 * 00022 */ 00023 00024 00025 #ifndef QXMPPVCARDIQ_H 00026 #define QXMPPVCARDIQ_H 00027 00028 #include "QXmppIq.h" 00029 #include <QDate> 00030 #include <QMap> 00031 #include <QDomElement> 00032 00033 class QImage; 00034 00044 00045 class QXmppVCardIq : public QXmppIq 00046 { 00047 public: 00048 QXmppVCardIq(const QString& bareJid = ""); 00049 00050 QDate birthday() const; 00051 void setBirthday(const QDate &birthday); 00052 00053 QString email() const; 00054 void setEmail(const QString&); 00055 00056 QString firstName() const; 00057 void setFirstName(const QString&); 00058 00059 QString fullName() const; 00060 void setFullName(const QString&); 00061 00062 QString lastName() const; 00063 void setLastName(const QString&); 00064 00065 QString middleName() const; 00066 void setMiddleName(const QString&); 00067 00068 QString nickName() const; 00069 void setNickName(const QString&); 00070 00071 QByteArray photo() const; 00072 void setPhoto(const QByteArray&); 00073 00074 QString photoType() const; 00075 void setPhotoType(const QString &type); 00076 00077 QString url() const; 00078 void setUrl(const QString&); 00079 00081 static bool isVCard(const QDomElement &element); 00083 00084 protected: 00086 void parseElementFromChild(const QDomElement&); 00087 void toXmlElementFromChild(QXmlStreamWriter *writer) const; 00089 00090 private: 00091 QDate m_birthday; 00092 QString m_email; 00093 QString m_firstName; 00094 QString m_fullName; 00095 QString m_lastName; 00096 QString m_middleName; 00097 QString m_nickName; 00098 QString m_url; 00099 00100 // not as 64 base 00101 QByteArray m_photo; 00102 QString m_photoType; 00103 }; 00104 00105 #endif // QXMPPVCARDIQ_H