-rw-r--r-- | kabc/sound.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kabc/sound.h b/kabc/sound.h index 0ec5ec8..9777054 100644 --- a/kabc/sound.h +++ b/kabc/sound.h | |||
@@ -1,123 +1,123 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of libkabc. | 2 | This file is part of libkabc. |
3 | Copyright (c) 2002 Tobias Koenig <tokoe@kde.org> | 3 | Copyright (c) 2002 Tobias Koenig <tokoe@kde.org> |
4 | 4 | ||
5 | This library is free software; you can redistribute it and/or | 5 | This library is free software; you can redistribute it and/or |
6 | modify it under the terms of the GNU Library General Public | 6 | modify it under the terms of the GNU Library General Public |
7 | License as published by the Free Software Foundation; either | 7 | License as published by the Free Software Foundation; either |
8 | version 2 of the License, or (at your option) any later version. | 8 | version 2 of the License, or (at your option) any later version. |
9 | 9 | ||
10 | This library is distributed in the hope that it will be useful, | 10 | This library is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Library General Public License for more details. | 13 | Library General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Library General Public License | 15 | You should have received a copy of the GNU Library General Public License |
16 | along with this library; see the file COPYING.LIB. If not, write to | 16 | along with this library; see the file COPYING.LIB. If not, write to |
17 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 17 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
18 | Boston, MA 02111-1307, USA. | 18 | Boston, MA 02111-1307, USA. |
19 | */ | 19 | */ |
20 | 20 | ||
21 | /* | 21 | /* |
22 | Enhanced Version of the file for platform independent KDE tools. | 22 | Enhanced Version of the file for platform independent KDE tools. |
23 | Copyright (c) 2004 Ulf Schenk | 23 | Copyright (c) 2004 Ulf Schenk |
24 | 24 | ||
25 | $Id$ | 25 | $Id$ |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #ifndef KABC_SOUND_H | 28 | #ifndef KABC_SOUND_H |
29 | #define KABC_SOUND_H | 29 | #define KABC_SOUND_H |
30 | 30 | ||
31 | #include <qcstring.h> | 31 | #include <q3cstring.h> |
32 | #include <qstring.h> | 32 | #include <qstring.h> |
33 | 33 | ||
34 | namespace KABC { | 34 | namespace KABC { |
35 | 35 | ||
36 | class Sound | 36 | class Sound |
37 | { | 37 | { |
38 | friend QDataStream &operator<<( QDataStream &, const Sound & ); | 38 | friend QDataStream &operator<<( QDataStream &, const Sound & ); |
39 | friend QDataStream &operator>>( QDataStream &, Sound & ); | 39 | friend QDataStream &operator>>( QDataStream &, Sound & ); |
40 | 40 | ||
41 | public: | 41 | public: |
42 | 42 | ||
43 | /** | 43 | /** |
44 | * Consturctor. Creates an empty object. | 44 | * Consturctor. Creates an empty object. |
45 | */ | 45 | */ |
46 | Sound(); | 46 | Sound(); |
47 | 47 | ||
48 | /** | 48 | /** |
49 | * Consturctor. | 49 | * Consturctor. |
50 | * | 50 | * |
51 | * @param url A URL that describes the position of the sound file. | 51 | * @param url A URL that describes the position of the sound file. |
52 | */ | 52 | */ |
53 | Sound( const QString &url ); | 53 | Sound( const QString &url ); |
54 | 54 | ||
55 | /** | 55 | /** |
56 | * Consturctor. | 56 | * Consturctor. |
57 | * | 57 | * |
58 | * @param data The raw data of the sound. | 58 | * @param data The raw data of the sound. |
59 | */ | 59 | */ |
60 | Sound( const QByteArray &data ); | 60 | Sound( const QByteArray &data ); |
61 | 61 | ||
62 | /** | 62 | /** |
63 | * Destructor. | 63 | * Destructor. |
64 | */ | 64 | */ |
65 | ~Sound(); | 65 | ~Sound(); |
66 | 66 | ||
67 | 67 | ||
68 | bool operator==( const Sound & ) const; | 68 | bool operator==( const Sound & ) const; |
69 | bool operator!=( const Sound & ) const; | 69 | bool operator!=( const Sound & ) const; |
70 | 70 | ||
71 | /** | 71 | /** |
72 | * Sets a URL for the location of the sound file. When using this | 72 | * Sets a URL for the location of the sound file. When using this |
73 | * function, @ref isIntern() will return 'false' until you use | 73 | * function, @ref isIntern() will return 'false' until you use |
74 | * @ref setData(). | 74 | * @ref setData(). |
75 | * | 75 | * |
76 | * @param url The location URL of the sound file. | 76 | * @param url The location URL of the sound file. |
77 | */ | 77 | */ |
78 | void setUrl( const QString &url ); | 78 | void setUrl( const QString &url ); |
79 | 79 | ||
80 | /** | 80 | /** |
81 | * Sets the raw data of the sound. When using this function, | 81 | * Sets the raw data of the sound. When using this function, |
82 | * @ref isIntern() will return 'true' until you use @ref setUrl(). | 82 | * @ref isIntern() will return 'true' until you use @ref setUrl(). |
83 | * | 83 | * |
84 | * @param data The raw data of the sound. | 84 | * @param data The raw data of the sound. |
85 | */ | 85 | */ |
86 | void setData( const QByteArray &data ); | 86 | void setData( const QByteArray &data ); |
87 | 87 | ||
88 | /** | 88 | /** |
89 | * Returns whether the sound is described by a URL (extern) or | 89 | * Returns whether the sound is described by a URL (extern) or |
90 | * by the raw data (intern). | 90 | * by the raw data (intern). |
91 | * When this method returns 'true' you can use @ref data() to | 91 | * When this method returns 'true' you can use @ref data() to |
92 | * get the raw data. Otherwise you can request the URL of this | 92 | * get the raw data. Otherwise you can request the URL of this |
93 | * sound by @ref url() and load the raw data from that location. | 93 | * sound by @ref url() and load the raw data from that location. |
94 | */ | 94 | */ |
95 | bool isIntern() const; | 95 | bool isIntern() const; |
96 | 96 | ||
97 | /** | 97 | /** |
98 | * Returns the location URL of this sound. | 98 | * Returns the location URL of this sound. |
99 | */ | 99 | */ |
100 | QString url() const; | 100 | QString url() const; |
101 | 101 | ||
102 | /** | 102 | /** |
103 | * Returns the raw data of this sound. | 103 | * Returns the raw data of this sound. |
104 | */ | 104 | */ |
105 | QByteArray data() const; | 105 | QByteArray data() const; |
106 | 106 | ||
107 | /** | 107 | /** |
108 | * Returns string representation of the sound. | 108 | * Returns string representation of the sound. |
109 | */ | 109 | */ |
110 | QString asString() const; | 110 | QString asString() const; |
111 | 111 | ||
112 | private: | 112 | private: |
113 | QString mUrl; | 113 | QString mUrl; |
114 | QByteArray mData; | 114 | QByteArray mData; |
115 | 115 | ||
116 | int mIntern; | 116 | int mIntern; |
117 | }; | 117 | }; |
118 | 118 | ||
119 | QDataStream &operator<<( QDataStream &, const Sound & ); | 119 | QDataStream &operator<<( QDataStream &, const Sound & ); |
120 | QDataStream &operator>>( QDataStream &, Sound & ); | 120 | QDataStream &operator>>( QDataStream &, Sound & ); |
121 | 121 | ||
122 | } | 122 | } |
123 | #endif | 123 | #endif |