diff options
author | Wolf Bergenheim <ext-wolf.2.bergenheim@nokia.com> | 2010-02-17 11:40:38 +0200 |
---|---|---|
committer | Wolf Bergenheim <ext-wolf.2.bergenheim@nokia.com> | 2010-02-17 11:40:38 +0200 |
commit | 28aaf4eb7d89bba113d27a9a39fc787a03a05e31 (patch) | |
tree | 67f353cda2b44b419d108f5c91e0cf5d1fa27f7a /libresourceqt/src/audio-resource.cpp | |
parent | e288abf93cc33ce7f6d535e1e5d887e8f9628119 (diff) |
Implemented release, update and related callbacks (grant, release, lost
resources). Initial implementation of audio (group only at this stage).
Diffstat (limited to 'libresourceqt/src/audio-resource.cpp')
-rw-r--r-- | libresourceqt/src/audio-resource.cpp | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/libresourceqt/src/audio-resource.cpp b/libresourceqt/src/audio-resource.cpp new file mode 100644 index 0000000..79587ff --- /dev/null +++ b/libresourceqt/src/audio-resource.cpp @@ -0,0 +1,63 @@ +#include <policy/audio-resource.h> + +using namespace ResourcePolicy; + +AudioResource::AudioResource(const QString &audioGroup) + : QObject(), Resource(), group(audioGroup), pid(0), stream(QString()) +{ +} + +AudioResource::AudioResource(const AudioResource &other) + : QObject(), Resource(other), group(other.group), pid(other.pid), stream(other.stream) +{ +} + +Resource * AudioResource::clone() const +{ + return new AudioResource(*this); +} + +AudioResource::~AudioResource() +{ +} + +QString AudioResource::audioGroup() const +{ + return group; +} + +void AudioResource::setAudioGroup(const QString &newGroup) +{ + qDebug("this = %p", this); + group = newGroup; + qDebug() << "Audio group changed! New group is: " << newGroup; + emit audioGroupChanged(group); +} + +quint32 AudioResource::processID() const +{ + return pid; +} + +void AudioResource::setProcessID(quint32 newPID) +{ + pid = newPID; + emit pidChanged(pid); +} + +QString AudioResource::streamTag() const +{ + return stream; +} + +void AudioResource::setStreamTag(const QString & newStreamTag) +{ + stream = newStreamTag; + emit streamTagChanged(stream); +} + +ResourceType AudioResource::type() const +{ + return AudioPlaybackType; +} + |