summaryrefslogtreecommitdiff
path: root/libresourceqt/src/audio-resource.cpp
diff options
context:
space:
mode:
authorWolf Bergenheim <ext-wolf.2.bergenheim@nokia.com>2010-02-18 12:52:29 +0200
committerWolf Bergenheim <ext-wolf.2.bergenheim@nokia.com>2010-02-18 12:52:29 +0200
commita36aef2b7c5128785a60213a6607191a8bfb1ecf (patch)
treeadd37ed9e8b7172dd5df4fab24a4333a0dd7116c /libresourceqt/src/audio-resource.cpp
parentfdb67c341fcb9ea0ae29a7889227ded6ac66a362 (diff)
astyled the code
Diffstat (limited to 'libresourceqt/src/audio-resource.cpp')
-rw-r--r--libresourceqt/src/audio-resource.cpp39
1 files changed, 32 insertions, 7 deletions
diff --git a/libresourceqt/src/audio-resource.cpp b/libresourceqt/src/audio-resource.cpp
index 79587ff..b8c049f 100644
--- a/libresourceqt/src/audio-resource.cpp
+++ b/libresourceqt/src/audio-resource.cpp
@@ -3,12 +3,14 @@
using namespace ResourcePolicy;
AudioResource::AudioResource(const QString &audioGroup)
- : QObject(), Resource(), group(audioGroup), pid(0), stream(QString())
+ : QObject(), Resource(), group(audioGroup), pid(0),
+ streamName(QString()), streamValue(QString())
{
}
AudioResource::AudioResource(const AudioResource &other)
- : QObject(), Resource(other), group(other.group), pid(other.pid), stream(other.stream)
+ : QObject(), Resource(other), group(other.group), pid(other.pid),
+ streamName(other.streamName), streamValue(other.streamValue)
{
}
@@ -26,6 +28,14 @@ QString AudioResource::audioGroup() const
return group;
}
+bool AudioResource::audioGroupIsSet() const
+{
+ if (group.isEmpty() || group.isNull()) {
+ return false;
+ }
+ return true;
+}
+
void AudioResource::setAudioGroup(const QString &newGroup)
{
qDebug("this = %p", this);
@@ -45,15 +55,30 @@ void AudioResource::setProcessID(quint32 newPID)
emit pidChanged(pid);
}
-QString AudioResource::streamTag() const
+QString AudioResource::streamTagName() const
+{
+ return streamName;
+}
+
+QString AudioResource::streamTagValue() const
+{
+ return streamValue;
+}
+
+bool AudioResource::streamTagIsSet() const
{
- return stream;
+ if (streamName.isEmpty() || streamName.isNull() ||
+ streamValue.isEmpty() || streamValue.isNull()) {
+ return false;
+ }
+ return true;
}
-void AudioResource::setStreamTag(const QString & newStreamTag)
+void AudioResource::setStreamTag(const QString &name, const QString &value)
{
- stream = newStreamTag;
- emit streamTagChanged(stream);
+ streamName = name;
+ streamValue = value;
+ emit streamTagChanged(name, value);
}
ResourceType AudioResource::type() const