.TH "KDE::PlayObjectFactory" kde3 "11 Jun 2005" "Version Version 3.4.1" "arts Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KDE::PlayObjectFactory \- This class implements a factory to create KDE::PlayObjects for a given URL and mimetype.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kplayobjectfactory.h>\fP
.PP
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBPlayObjectFactory\fP (Arts::SoundServerV2 server)"
.br
.ti -1c
.RI "\fBPlayObjectFactory\fP (\fBKArtsServer\fP *server)"
.br
.ti -1c
.RI "void \fBsetAudioManagerPlay\fP (\fBKAudioManagerPlay\fP *amanplay)"
.br
.ti -1c
.RI "\fBKDE::PlayObject\fP * \fBcreatePlayObject\fP (const \fBKURL\fP &url, bool createBUS)"
.br
.ti -1c
.RI "\fBKDE::PlayObject\fP * \fBcreatePlayObject\fP (const \fBKURL\fP &url, const \fBQString\fP &mimetype, bool createBUS)"
.br
.ti -1c
.RI "void \fBsetAllowStreaming\fP (bool s)"
.br
.ti -1c
.RI "bool \fBallowStreaming\fP ()"
.br
.in -1c
.SS "Static Public Member Functions"

.in +1c
.ti -1c
.RI "static \fBQStringList\fP \fBmimeTypes\fP (void)"
.br
.in -1c
.SH "Detailed Description"
.PP 
This class implements a factory to create KDE::PlayObjects for a given URL and mimetype. 

A detailed description about how to use the \fBKDE\fP multimedia framework can be found in the documentation for \fBKDE::PlayObject\fP.
.PP
Definition at line 79 of file kplayobjectfactory.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KDE::PlayObjectFactory::PlayObjectFactory (Arts::SoundServerV2 server)"
.PP
Creates a KDE::PlayObjectFactory. 
.PP
\fCserver\fP is an Arts::SoundServerV2
.PP
Definition at line 88 of file kplayobjectfactory.cc.
.SS "KDE::PlayObjectFactory::PlayObjectFactory (\fBKArtsServer\fP * server)"
.PP
Convenience constructor to pass a \fBKArtsServer\fP instead of an Arts::SoundServerV2. 
.PP
This equivalent to calling KDE::PlayObjectFactory( server.server() ).
.PP
\fBSince:\fP
.RS 4
3.2
.RE
.PP

.PP
Definition at line 98 of file kplayobjectfactory.cc.
.SH "Member Function Documentation"
.PP 
.SS "void KDE::PlayObjectFactory::setAudioManagerPlay (\fBKAudioManagerPlay\fP * amanplay)"
.PP
If this is set the \fBPlayObject\fP doesn't create a Synth_BUS_UPLINK at all but always uses the Synth_AMAN_PLAY that you passed. 
.PP

.PP
Definition at line 114 of file kplayobjectfactory.cc.
.SS "\fBKDE::PlayObject\fP * KDE::PlayObjectFactory::createPlayObject (const \fBKURL\fP & url, bool createBUS)"
.PP
Creates a \fBKDE::PlayObject\fP to play back the file or stream \fCurl\fP points to. 
.PP
Set \fCcreateBUS\fP to 'true', if you want the \fBPlayObject\fP to be connected to a SYNTH_BUS_UPLINK on creation. This is usually the case. You only need to set this to 'false' if you want to attach your own sound effects to the \fBPlayObject\fP.
.PP
You don't need to know the mimetype of the file or stream, it will be detected automatically.
.PP
Definition at line 121 of file kplayobjectfactory.cc.
.PP
References KMimeType::findByURL().
.SS "\fBKDE::PlayObject\fP * KDE::PlayObjectFactory::createPlayObject (const \fBKURL\fP & url, const \fBQString\fP & mimetype, bool createBUS)"
.PP
This method also creates a \fBKDE::PlayObject\fP, but does no automatic mimetype detection. 
.PP
Use this method with care.
.PP
Definition at line 127 of file kplayobjectfactory.cc.
.PP
References QObject::connect(), endl(), kdWarning(), and mimeTypes().
.SS "void KDE::PlayObjectFactory::setAllowStreaming (bool s)\fC [inline]\fP"
.PP
setAllowStreaming( true ) allows the factory to create a streaming \fBPlayObject\fP for a non-local URL. 
.PP
This is also the default. Usually, you should not need to set this to false.
.PP
Definition at line 126 of file kplayobjectfactory.h.
.SS "bool KDE::PlayObjectFactory::allowStreaming ()\fC [inline]\fP"
.PP
returns 'true' if the factory is allowed to create streaming PlayObjects. 
.PP

.PP
Definition at line 132 of file kplayobjectfactory.h.
.SS "\fBQStringList\fP KDE::PlayObjectFactory::mimeTypes (void)\fC [static]\fP"
.PP
Return the mimetypes that are playable. 
.PP
Definition at line 174 of file kplayobjectfactory.cc.
.PP
References QString::fromLocal8Bit(), KMimeType::mimeType(), QStringList::sort(), and QString::stripWhiteSpace().
.PP
Referenced by createPlayObject().

.SH "Author"
.PP 
Generated automatically by Doxygen for arts Library from the source code.
