phonon/streaminterface.h Source File

streaminterface.h
Go to the documentation of this file.
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_STREAMINTERFACE_H
24 #define PHONON_STREAMINTERFACE_H
25 
26 #include "phonon_export.h"
27 #include <QtCore/QObject>
28 
31 
32 #ifndef QT_NO_PHONON_ABSTRACTMEDIASTREAM
33 
34 namespace Phonon
35 {
36 class StreamInterfacePrivate;
37 class MediaSource;
38 
45 {
46  friend class StreamInterfacePrivate;
47  friend class AbstractMediaStreamPrivate;
48  public:
49  virtual ~StreamInterface();
56  virtual void writeData(const QByteArray &data) = 0;
60  virtual void endOfData() = 0;
66  virtual void setStreamSize(qint64 newSize) = 0;
70  virtual void setStreamSeekable(bool s) = 0;
71 
78  void connectToSource(const MediaSource &mediaSource);
79 
89  void needData();
90 
95  void enoughData();
96 
101  void seekStream(qint64 seekTo);
102 
107  void reset();
108 
109  protected:
110  StreamInterface();
111 
112  StreamInterfacePrivate *const d;
113 };
114 } // namespace Phonon
115 
116 Q_DECLARE_INTERFACE(Phonon::StreamInterface, "StreamInterface1.phonon.kde.org")
117 
118 #endif //QT_NO_PHONON_ABSTRACTMEDIASTREAM
119 
122 
123 #endif // PHONON_STREAMINTERFACE_H
#define QT_END_NAMESPACE
Definition: qglobal.h:128
#define QT_BEGIN_HEADER
Definition: qglobal.h:141
Backend interface to handle media streams (AbstractMediaStream).
long long qint64
Definition: qglobal.h:947
Note that all constructors of this class are implicit, so that you can simply write.
Definition: mediasource.h:61
#define QT_BEGIN_NAMESPACE
Definition: qglobal.h:127
StreamInterfacePrivate *const d
GLsizei GLsizei GLenum GLenum const GLvoid * data
Definition: GLee.h:880
QT_BEGIN_NAMESPACE Q_DECLARE_INTERFACE(QWebKitPlatformPlugin,"com.nokia.Qt.WebKit.PlatformPlugin/1.7")
The KDE Multimedia classes.
GLboolean reset
Definition: GLee.h:895
#define PHONON_EXPORT
Definition: phonon_export.h:38
GLdouble s
Definition: GLee.h:1173
#define QT_END_HEADER
Definition: qglobal.h:142