--- a/coreapplicationuis/SysAp/Src/sysapremconobserver.cpp Wed Jun 09 09:52:12 2010 +0300
+++ b/coreapplicationuis/SysAp/Src/sysapremconobserver.cpp Mon Jun 21 15:51:07 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -47,12 +47,6 @@
void CSysApRemConObserver::ConstructL()
{
TRACES( RDebug::Print( _L("CSysApRemConObserver::ConstructL") ) );
-
- iInterfaceSelector = CRemConInterfaceSelector::NewL();
-
- iCoreTarget = CRemConCoreApiTarget::NewL( *iInterfaceSelector, *this );
-
- iInterfaceSelector->OpenTargetL();
}
// -----------------------------------------------------------------------------
@@ -81,7 +75,6 @@
CSysApRemConObserver::~CSysApRemConObserver()
{
TRACES( RDebug::Print( _L("CSysApRemConObserver::~CSysApRemConObserver") ) );
- delete iInterfaceSelector; // Internally deletes iCoreTarget
}
// -----------------------------------------------------------------------------
@@ -112,4 +105,31 @@
}
}
+/**
+ * Reserve the volume keys
+ */
+void CSysApRemConObserver::StartRemconInterface()
+ {
+ TRACES( RDebug::Print( _L("CSysApRemConObserver::BlockKeys")));
+ if(!iInterfaceSelector)
+ {
+ iInterfaceSelector = CRemConInterfaceSelector::NewL();
+ iCoreTarget = CRemConCoreApiTarget::NewL( *iInterfaceSelector, *this );
+ iInterfaceSelector->OpenTargetL();
+ }
+ }
+
+/**
+ * Release the volume keys for other application like phone app during call
+ */
+void CSysApRemConObserver::StopRemconInterface()
+ {
+ TRACES( RDebug::Print( _L("CSysApRemConObserver::UnBlockKeys")));
+ if(iInterfaceSelector)
+ {
+ delete iInterfaceSelector;
+ iInterfaceSelector = NULL;
+ }
+ }
+
// End of File