summaryrefslogtreecommitdiff
path: root/resourceqt-client/client.cpp
diff options
context:
space:
mode:
authorWolf Bergenheim <ext-wolf.2.bergenheim@nokia.com>2010-12-01 16:26:59 +0200
committerWolf Bergenheim <ext-wolf.2.bergenheim@nokia.com>2010-12-01 16:26:59 +0200
commitc8917f1cbbf96a1c5c655d9adbd45a46833e70db (patch)
tree4e363a2b10e8b6476c68af6ce08d1c1a9a828771 /resourceqt-client/client.cpp
parenta551ffd289ccb0ffc46a097da3874f955aa95920 (diff)
downloadlibresourceqt-c8917f1cbbf96a1c5c655d9adbd45a46833e70db.tar.gz
Added support for RESMSG_RELEASE message from manager
Diffstat (limited to 'resourceqt-client/client.cpp')
-rw-r--r--resourceqt-client/client.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/resourceqt-client/client.cpp b/resourceqt-client/client.cpp
index 7fdb2f6..4cd372a 100644
--- a/resourceqt-client/client.cpp
+++ b/resourceqt-client/client.cpp
@@ -130,6 +130,10 @@ bool Client::initialize(const CommandLineParser &parser)
this, SLOT(resourcesBecameAvailableHandler(const QList<ResourcePolicy::ResourceType> &)))) {
return false;
}
+ if (!connect(resourceSet, SIGNAL(resourcesReleasedByManager()),
+ this, SLOT(resourceReleasedByManagerHandler()))) {
+ return false;
+ }
if (!connect(&stdInNotifier, SIGNAL(activated(int)), this, SLOT(readLine(int)))) {
return false;
}
@@ -250,6 +254,15 @@ void Client::resourceReleasedHandler()
showPrompt();
}
+void Client::resourceReleasedByManagerHandler()
+{
+ stopTimer();
+
+ QList<Resource*> allResources = resourceSet->resources();
+ outputln << "mgr-released:"<< allResources << endl;
+ showPrompt();
+}
+
void Client::resourcesBecameAvailableHandler(const QList<ResourcePolicy::ResourceType> &availableResources)
{
if (pendingAddAudio) {