24#include <qstringlist.h>
28class Impp::Private :
public QSharedData
35 Private(
const Private &other )
36 : QSharedData( other )
38 address = other.address;
39 imType = other.imType;
40 parameters = other.parameters;
42 QMap<QString, QStringList> parameters;
53Impp::Impp(
const Impp &other)
58Impp::Impp(
const QString &address)
69bool Impp::isValid()
const
71 return !d->address.isEmpty() && !d->imType.isEmpty();
74void Impp::setIMType(
const QString &type)
79QString Impp::imType()
const
84void Impp::setAddress(
const QString &address)
89QString Impp::address()
const
94void Impp::setParameters(
const QMap<QString, QStringList> ¶ms)
96 d->parameters = params;
99QMap<QString, QStringList> Impp::parameters()
const
101 return d->parameters;
104bool Impp::operator==(
const Impp &other)
const
106 return (d->parameters == other.parameters()) && (d->address == other.address()) && (d->imType == other.imType());
109bool Impp::operator!=(
const Impp &other)
const
111 return !( other == *this );
114Impp &Impp::operator=(
const Impp &other)
116 if (
this != &other ) {
123QString Impp::toString()
const
126 str += QString::fromLatin1(
"Impp {\n" );
127 str += QString::fromLatin1(
" address: %1\n" ).arg( d->address );
128 str += QString::fromLatin1(
" type: %1\n" ).arg( d->imType );
129 if (!d->parameters.isEmpty()) {
130 QMapIterator<QString, QStringList> i(d->parameters);
132 while (i.hasNext()) {
134 param += QString::fromLatin1(
"%1 %2").arg(i.key()).arg(i.value().join(QLatin1String(
",")));
136 str += QString::fromLatin1(
" parameters: %1\n" ).arg( param );
138 str += QString::fromLatin1(
"}\n" );
145 return s << impp.d->parameters << impp.d->address << impp.d->imType;
150 s >> impp.d->parameters >> impp.d->address >> impp.d->imType;
Class that holds a Calendar Url (FBURL/CALADRURI/CALURI)
QDataStream & operator<<(QDataStream &stream, const Address &address)
Serializes the address object into the stream.
QDataStream & operator>>(QDataStream &stream, Address &address)
Initializes the address object from the stream.