Phonon  4.7.0
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Pages
path.h
1 /* This file is part of the KDE project
2  Copyright (C) 2007 Matthias Kretz <kretz@kde.org>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Lesser General Public
6  License as published by the Free Software Foundation; either
7  version 2.1 of the License, or (at your option) version 3, or any
8  later version accepted by the membership of KDE e.V. (or its
9  successor approved by the membership of KDE e.V.), Nokia Corporation
10  (or its successors, if any) and the KDE Free Qt Foundation, which shall
11  act as a proxy defined in Section 6 of version 3 of the license.
12 
13  This library is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  Lesser General Public License for more details.
17 
18  You should have received a copy of the GNU Lesser General Public
19  License along with this library. If not, see <http://www.gnu.org/licenses/>.
20 
21 */
22 
23 #ifndef PHONON_PATH_H
24 #define PHONON_PATH_H
25 
26 #include "phonon_export.h"
27 #include "objectdescription.h"
28 
29 #include <QtCore/QExplicitlySharedDataPointer>
30 
31 
32 template<class T> class QList;
33 
34 namespace Phonon
35 {
36 
37 class PathPrivate;
38 class Effect;
39 class MediaNode;
40 
61 class PHONON_EXPORT Path
62 {
63  friend class FactoryPrivate;
64  public:
71  ~Path();
72 
82  Path();
83 
89  Path(const Path &);
90 
97  bool isValid() const;
98  //MediaStreamTypes mediaStreamTypes() const;
99 
100 #ifndef QT_NO_PHONON_EFFECT
101 
122  Effect *insertEffect(const EffectDescription &desc, Effect *insertBefore = 0);
123 
145  bool insertEffect(Effect *newEffect, Effect *insertBefore = 0);
146 
162  bool removeEffect(Effect *effect);
163 
174  QList<Effect *> effects() const;
175 #endif //QT_NO_PHONON_EFFECT
176 
182  bool reconnect(MediaNode *source, MediaNode *sink);
183 
188  bool disconnect();
189 
195  Path &operator=(const Path &p);
196 
200  bool operator==(const Path &p) const;
201 
205  bool operator!=(const Path &p) const;
206 
210  MediaNode *source() const;
211 
215  MediaNode *sink() const;
216 
217 
218  protected:
219  friend class PathPrivate;
220  QExplicitlySharedDataPointer<PathPrivate> d;
221 };
222 
234 PHONON_EXPORT Path createPath(MediaNode *source, MediaNode *sink);
235 
236 } // namespace Phonon
237 
238 
239 #endif // PHONON_PATH_H