67 #define SERVER_CHANNEL "QPE/MediaServer" 89 #endif // MEDIA_SERVER 102 int id()
const {
return id_; }
151 setBucket( s, bucket );
158 buckets.insert( bucket->
id(), bucket );
164 buckets.remove( bucket->id() );
171 #if defined(QT_NO_QWS_SOUNDSERVER) 172 server->playFile( bucket( s )->
id(), filepath );
173 #elif defined(MEDIA_SERVER) 176 client->play( bucket( s )->
id(), filepath );
182 #if defined(QT_NO_QWS_SOUNDSERVER) 183 server->stopFile( bucket( s )->
id() );
184 #elif defined(MEDIA_SERVER) 187 client->stop( bucket( s )->
id() );
201 if( decLoop( sound ) ) {
217 if( decLoop( sound ) ) {
235 if( it != buckets.end() ) {
244 #ifdef QT_NO_QWS_SOUNDSERVER 250 #endif // MEDIA_SERVER 259 #ifdef QT_NO_QWS_SOUNDSERVER 260 server =
new QWSSoundServer(
this );
265 client =
new QWSSoundClient(
this );
271 #endif // MEDIA_SERVER 275 :
QObject( parent ), sound_( sound ), server_( server )
294 message << m_id << filepath;
303 void QAuBucketQWS::play()
311 void QAuBucketQWS::stop()
316 #endif // MEDIA_SERVER 346 #include "qsound_qws.moc" 348 #endif // QT_NO_SOUND
void insert(QAuBucketQWS *bucket)
QAuServerQWS(QObject *parent)
QAuBucket * bucket(QSound *)
Returns the internal bucket record of sound s.
#define QT_END_NAMESPACE
This macro expands to.
#define it(className, varName)
void init(QSound *s)
Initializes the sound.
static QUuid createUuid()
On any platform other than Windows, this function returns a new UUID with variant QUuid::DCE and vers...
The QByteArray class provides an array of bytes.
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
static bool send(const QString &channel, const QString &msg)
This is an overloaded member function, provided for convenience. It differs from the above function o...
T & value() const
Returns a modifiable reference to the current item's value.
The QBuffer class provides a QIODevice interface for a QByteArray.
The QString class provides a Unicode character string.
virtual void play(const QString &filename)
The QHash class is a template class that provides a hash-table-based dictionary.
QHash< int, QAuBucketQWS * > buckets
The QObject class is the base class of all Qt objects.
QAuBucketQWS * find(int id)
void setObjectName(const QString &name)
void complete(QAuBucketQWS *bucket)
#define QT_BEGIN_NAMESPACE
This macro expands to.
QAuBucketQWS * bucket(QSound *s)
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
void processMessage(const QString &msg, const QByteArray &data)
static const char * data(const QByteArray &arr)
static QAuServer & server()
void done(QAuBucketQWS *)
QIODevice * device() const
Returns the I/O device currently set, or 0 if no device is currently set.
QObject * parent() const
Returns a pointer to the parent object.
The QHash::iterator class provides an STL-style non-const iterator for QHash and QMultiHash.
virtual void stop(QSound *)=0
QAuBucketQWS(QAuServerQWS *, QSound *, QObject *parent=0)
virtual bool open(OpenMode mode)
Opens the device and sets its OpenMode to mode.
The QCopChannel class provides communication capabilities between clients in Qt for Embedded Linux...
The QDataStream class provides serialization of binary data to a QIODevice.
QString fileName() const
Returns the filename associated with this QSound object.
QAuServer * qt_new_audio_server()
void remove(QAuBucketQWS *bucket)
The QSound class provides access to the platform audio facilities.
The QFileInfo class provides system-independent file information.
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
The QUuid class stores a Universally Unique Identifier (UUID).