QXmpp Version:0.3.0
|
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 00080 QString orgName() const; 00081 void setOrgName(const QString&); 00082 00083 QString orgUnit() const; 00084 void setOrgUnit(const QString&); 00085 00086 QString title() const; 00087 void setTitle(const QString&); 00088 00089 QString role() const; 00090 void setRole(const QString&); 00091 00093 static bool isVCard(const QDomElement &element); 00095 00096 protected: 00098 void parseElementFromChild(const QDomElement&); 00099 void toXmlElementFromChild(QXmlStreamWriter *writer) const; 00101 00102 private: 00103 QDate m_birthday; 00104 QString m_email; 00105 QString m_firstName; 00106 QString m_fullName; 00107 QString m_lastName; 00108 QString m_middleName; 00109 QString m_nickName; 00110 QString m_url; 00111 QString m_orgName; 00112 QString m_orgUnit; 00113 QString m_title; 00114 QString m_role; 00115 00116 // not as 64 base 00117 QByteArray m_photo; 00118 QString m_photoType; 00119 }; 00120 00121 #endif // QXMPPVCARDIQ_H