23 #include <tqdatastream.h>
25 using namespace TDEABC;
33 : mUrl( url ), mIntern( false )
38 : mData( data ), mIntern( true )
46 bool Sound::operator==(
const Sound &s )
const
48 if ( mIntern != s.mIntern )
return false;
51 if ( mData != s.mData )
61 bool Sound::operator!=(
const Sound &s )
const
63 return !( s == *this );
85 return (!mIntern) && mUrl.isEmpty();
102 return "intern sound";
107 TQDataStream &TDEABC::operator<<( TQDataStream &s,
const Sound &sound )
109 return s << sound.mIntern << sound.mUrl;
113 TQDataStream &TDEABC::operator>>( TQDataStream &s,
Sound &sound )
115 s >> sound.mIntern >> sound.mUrl;
Class that holds a Sound clip for a contact.
TQByteArray data() const
Returns the raw data of this sound.
bool isEmpty() const
Test if this sound file has been set.
void setUrl(const TQString &url)
Sets a URL for the location of the sound file.
void setData(const TQByteArray &data)
Sets the raw data of the sound.
TQString url() const
Returns the location URL of this sound.
bool isIntern() const
Returns whether the sound is described by a URL (extern) or by the raw data (intern).
TQString asString() const
Returns string representation of the sound.