summaryrefslogtreecommitdiff
path: root/libresourceqt/src/resource-set.cpp
diff options
context:
space:
mode:
authorJanos Kovacs <janos.f.kovacs@nokia.com>2010-06-28 14:08:00 +0300
committerJanos Kovacs <janos.f.kovacs@nokia.com>2010-06-28 14:08:00 +0300
commit3f7ebe2f161b0d18f55d547b530f5a999488e03f (patch)
tree012b4edfcee65785ca752f4bc0a8e90f881f8170 /libresourceqt/src/resource-set.cpp
parent5e7214d0fce9b9214a076d01b9e318d097aa41b4 (diff)
downloadlibresourceqt-3f7ebe2f161b0d18f55d547b530f5a999488e03f.tar.gz
merging with the swp.plcy-357-harmattan branch
Diffstat (limited to 'libresourceqt/src/resource-set.cpp')
-rw-r--r--libresourceqt/src/resource-set.cpp31
1 files changed, 19 insertions, 12 deletions
diff --git a/libresourceqt/src/resource-set.cpp b/libresourceqt/src/resource-set.cpp
index 7dfd5d7..8ddb54b 100644
--- a/libresourceqt/src/resource-set.cpp
+++ b/libresourceqt/src/resource-set.cpp
@@ -84,7 +84,7 @@ void ResourceSet::addResourceObject(Resource *resource)
}
else if (audioResource->audioGroupIsSet()) {
qDebug("ResourceSet::%s().... %d registering audio proprerties later", __FUNCTION__, __LINE__);
- pendingAudioProperties = true;
+ pendingAudioProperties = true;
}
}
}
@@ -129,6 +129,9 @@ bool ResourceSet::addResource(ResourceType type)
case LensCoverType:
resource = new LensCoverResource;
break;
+ case HeadsetButtonsType:
+ resource = new HeadsetButtonsResource;
+ break;
default:
return false;
}
@@ -290,14 +293,9 @@ void ResourceSet::registerAudioProperties()
qDebug("%s(): initializing...", __FUNCTION__);
pendingAudioProperties = true;
initialize();
+ return;
}
- if (!resourceEngine->isConnectedToManager() && !resourceEngine->isConnectingToManager()) {
- qDebug("%s(): Connecting to Manager...", __FUNCTION__);
-
- pendingAudioProperties = true;
- resourceEngine->connectToManager();
- }
- else {
+ else if (resourceEngine->isConnectedToManager()) {
qDebug("Registering new audio settings:");
qDebug() << "\taudio group: " << audioResource->audioGroup();
qDebug() << "\tPID: " << audioResource->processID();
@@ -306,12 +304,21 @@ void ResourceSet::registerAudioProperties()
if((audioResource->processID() > 0) && audioResource->streamTagName() != "media.name") {
qWarning() << "streamTagName should be 'media.name' it is '" << audioResource->streamTagName() << "'";
}
- resourceEngine->registerAudioProperties(audioResource->audioGroup(),
- audioResource->processID(),
- audioResource->streamTagName(),
- audioResource->streamTagValue());
+ bool r = resourceEngine->registerAudioProperties(audioResource->audioGroup(),
+ audioResource->processID(),
+ audioResource->streamTagName(),
+ audioResource->streamTagValue());
+ qDebug("resourceEngine->registerAudioProperties returned %s", r?"true":"false");
+
pendingAudioProperties = false;
}
+ else { //if (!resourceEngine->isConnectedToManager() && !resourceEngine->isConnectingToManager()) {
+ qDebug("%s(): Connecting to Manager...", __FUNCTION__);
+
+ pendingAudioProperties = true;
+ resourceEngine->connectToManager();
+ return;
+ }
}
void ResourceSet::handleGranted(quint32 bitmaskOfGrantedResources)