| # arts Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Namespaces | Source Files

# kplayobject.h

    00001     /*
    00002
    00003     Copyright (C) 2001 Nikolas Zimmermann <wildfox@kde.org>
    00004
    00005     This library is free software; you can redistribute it and/or
    00006     modify it under the terms of the GNU Library General Public
    00007     License as published by the Free Software Foundation; either
    00008     version 2 of the License, or (at your option) any later version.
    00009
    00010     This library is distributed in the hope that it will be useful,
    00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
    00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00013     Library General Public License for more details.
    00014
    00015     You should have received a copy of the GNU Library General Public License
    00016     along with this library; see the file COPYING.LIB.  If not, write to
    00017     the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    00018     Boston, MA 02111-1307, USA.
    00019
    00020     */
    00021
    00022 #ifndef KPLAYOBJECT_H
    00023 #define KPLAYOBJECT_H
    00024
    00025 #include "kmedia2.h"
    00026 #include "soundserver.h"
    00027 #include <kurl.h>
    00028 #include <qobject.h>
    00029
    00030 class KDE_EXPORT KPlayObject : public QObject
    00031 {
    00032 Q_OBJECT
    00033 public:
    00034     KPlayObject();
    00035     KPlayObject(Arts::PlayObject playobject, bool isStream);
    00036     ~KPlayObject();
    00037
    00042     void setObject(Arts::PlayObject playObject);
    00043
    00047     Arts::PlayObject object();
    00048
    00055     bool isNull();
    00056
    00061         bool stream();
    00062
    00066     void play();
    00067
    00071     void seek(Arts::poTime newTime);
    00072
    00076     void pause();
    00077
    00082     void halt();
    00083
    00087     QString description();
    00088
    00092     Arts::poTime currentTime();
    00093
    00097     Arts::poTime overallTime();
    00098
    00102     Arts::poCapabilities capabilities();
    00103
    00107     QString mediaName();
    00108
    00112     Arts::poState state();
    00113
    00114 private:
    00115     Arts::PlayObject m_playObject;
    00116     bool m_isStream;
    00117 };
    00118
    00119
    00120
    00121 namespace KDE {
    00122
    00123 class PlayObjectFactory;
    00124
    00188 class KDE_EXPORT PlayObject : public QObject
    00189 {
    00190 Q_OBJECT
    00191 public:
    00192     ~PlayObject();
    00193
    00197     Arts::PlayObject object();
    00198
    00205     bool isNull();
    00206
    00210         bool stream();
    00211
    00215     void play();
    00216
    00221     void seek(Arts::poTime newTime);
    00222
    00229     void pause();
    00230
    00237     void halt();
    00238
    00242     QString description();
    00243
    00247     Arts::poTime currentTime();
    00248
    00252     Arts::poTime overallTime();
    00253
    00258     Arts::poCapabilities capabilities();
    00259
    00263     QString mediaName();
    00264
    00272     Arts::poState state();
    00273
    00274 signals:
    00282     void playObjectCreated();
    00283
    00284 private slots:
    00285     void attachPlayObject( Arts::PlayObject );
    00286
    00287 private:
    00288     Arts::PlayObject m_playObject;
    00289     bool m_isStream;
    00290
    00291     struct PrivateData;
    00292     PrivateData* d;
    00293
    00294     /* private constructors, to prevent instantiation and copying */
    00295     PlayObject();
    00296     PlayObject( const PlayObject& ) : QObject() {};
    00297     PlayObject(Arts::PlayObject playobject, bool isStream);
    00298     PlayObject( Arts::SoundServerV2 server, const KURL& url, bool isStream, bool createBUS );
    00299
    00300     friend class KDE::PlayObjectFactory;
    00301
    00302 };
    00303
    00304 }
    00305
    00306 #endif

This file is part of the documentation for arts Library Version 3.4.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat Jun 11 20:27:55 2005 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003