23#include <QtCore/QDataStream>
24#include <QtCore/QSharedData>
28class Sound::Private :
public QSharedData
36 Private(
const Private &other )
37 : QSharedData( other )
41 mIntern = other.mIntern;
79 if (
this != &other ) {
88 if ( d->mIntern != other.d->mIntern ) {
93 if ( d->mData != other.d->mData ) {
97 if ( d->mUrl != other.d->mUrl ) {
107 return !( other == *this );
130 ( ( d->mIntern && d->mData.isEmpty() ) || ( !d->mIntern && d->mUrl.isEmpty() ) );
147 str += QLatin1String(
"Sound {\n" );
148 str += QString::fromLatin1(
" IsIntern: %1\n" ).
149 arg( d->mIntern ? QLatin1String(
"true" ) : QLatin1String(
"false" ) );
151 str += QString::fromLatin1(
" Data: %1\n" ).
152 arg( QString::fromLatin1( d->mData.toBase64() ) );
154 str += QString::fromLatin1(
" Url: %1\n" ).arg( d->mUrl );
156 str += QLatin1String(
"}\n" );
163 return s << sound.d->mIntern << sound.d->mUrl << sound.d->mData;
168 s >> sound.d->mIntern >> sound.d->mUrl >> sound.d->mData;
Class that holds a Sound clip for a contact.
~Sound()
Destroys the sound object.
QByteArray data() const
Returns the raw data of this sound.
void setData(const QByteArray &data)
Sets the raw data of the sound.
bool operator!=(const Sound &other) const
Not-Equal operator.
Sound()
Creates an empty sound object.
QString url() const
Returns the location URL of this sound.
QString toString() const
Returns string representation of the sound.
void setUrl(const QString &url)
Sets a URL for the location of the sound file.
bool isIntern() const
Returns whether the sound is described by a URL (extern) or by the raw data (intern).
Sound & operator=(const Sound &other)
Assignment operator.
bool operator==(const Sound &other) const
Equality operator.
bool isEmpty() const
Returns true, if the sound object is empty.
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.