diff options
author | Wolf Bergenheim <ext-wolf.2.bergenheim@nokia.com> | 2010-12-01 16:26:59 +0200 |
---|---|---|
committer | Wolf Bergenheim <ext-wolf.2.bergenheim@nokia.com> | 2010-12-01 16:26:59 +0200 |
commit | c8917f1cbbf96a1c5c655d9adbd45a46833e70db (patch) | |
tree | 4e363a2b10e8b6476c68af6ce08d1c1a9a828771 /resourceqt-client | |
parent | a551ffd289ccb0ffc46a097da3874f955aa95920 (diff) |
Added support for RESMSG_RELEASE message from manager
Diffstat (limited to 'resourceqt-client')
-rw-r--r-- | resourceqt-client/client.cpp | 13 | ||||
-rw-r--r-- | resourceqt-client/client.h | 1 |
2 files changed, 14 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) { diff --git a/resourceqt-client/client.h b/resourceqt-client/client.h index 3967fee..e73c50c 100644 --- a/resourceqt-client/client.h +++ b/resourceqt-client/client.h @@ -59,6 +59,7 @@ private slots: void resourceDeniedHandler(); void resourceLostHandler(); void resourceReleasedHandler(); + void resourceReleasedByManagerHandler(); void resourcesBecameAvailableHandler(const QList<ResourcePolicy::ResourceType> &availableResources); void readLine(int); void doExit(); |