00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef KABC_SOUND_H
00022 #define KABC_SOUND_H
00023
00024 #include "kabc_export.h"
00025 #include <QtCore/QString>
00026 #include <QtCore/QSharedDataPointer>
00027
00028 namespace KABC {
00029
00058 class KABC_EXPORT Sound
00059 {
00060 friend KABC_EXPORT QDataStream &operator<<( QDataStream &, const Sound & );
00061 friend KABC_EXPORT QDataStream &operator>>( QDataStream &, Sound & );
00062
00063 public:
00064
00068 Sound();
00069
00075 Sound( const QString &url );
00076
00082 Sound( const QByteArray &data );
00083
00087 Sound( const Sound &other );
00088
00092 ~Sound();
00093
00099 Sound &operator=( const Sound &other );
00100
00108 bool operator==( const Sound &other ) const;
00109
00117 bool operator!=( const Sound &other ) const;
00118
00126 void setUrl( const QString &url );
00127
00131 bool isEmpty() const;
00132
00139 void setData( const QByteArray &data );
00140
00148 bool isIntern() const;
00149
00153 QString url() const;
00154
00158 QByteArray data() const;
00159
00163 QString toString() const;
00164
00165 private:
00166 class Private;
00167 QSharedDataPointer<Private> d;
00168 };
00169
00173 KABC_EXPORT QDataStream &operator<<( QDataStream &stream, const Sound &sound );
00174
00178 KABC_EXPORT QDataStream &operator>>( QDataStream &stream, Sound &sound );
00179
00180 }
00181
00182 #endif