diff -r 8ce15fced3a6 -r cad71a31b7fc srsf/vcexecutorapp/src/appcontrollerpropertyhandler.cpp --- a/srsf/vcexecutorapp/src/appcontrollerpropertyhandler.cpp Thu Aug 19 09:56:14 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,117 +0,0 @@ -/* -* Copyright (c) 2006 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" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Active object for subscribing to Publish & Suscribe properties -* -*/ - - -// INCLUDE FILES -#include -#include "appcontrollerpropertyhandler.h" -#include "appcontroller.h" - -// --------------------------------------------------------- -// CAppControllerPropertyHandler::NewL -// Symbian OS two-phased constructor -// --------------------------------------------------------- -// -CAppControllerPropertyHandler* CAppControllerPropertyHandler::NewL( - TUid aCategory, TUint aKey, CVCApplicationControllerImpl* aController) - { - CAppControllerPropertyHandler* self = new ( ELeave ) CAppControllerPropertyHandler( aController ); - CleanupStack::PushL( self ); - self->ConstructL( aCategory, aKey ); - CleanupStack::Pop( self ); - return self; - } - - -// --------------------------------------------------------- -// CAppControllerPropertyHandler::CAppControllerPropertyHandler -// C++ constructor -// --------------------------------------------------------- -// -CAppControllerPropertyHandler::CAppControllerPropertyHandler( CVCApplicationControllerImpl* aController ) - : CActive( EPriorityStandard ), - iController( aController ) - { - } - -// --------------------------------------------------------- -// CAppControllerPropertyHandler::ConstructL -// Symbian OS 2nd phase constructor -// --------------------------------------------------------- -// -void CAppControllerPropertyHandler::ConstructL(TUid aCategory, TUint aKey ) - { - User::LeaveIfError( iProperty.Attach( aCategory, aKey ) ); - - CActiveScheduler::Add(this); - // Initial subscription and process current property value - RunL(); - - iRequestIssued = ETrue; - } - -// Destructor -CAppControllerPropertyHandler::~CAppControllerPropertyHandler() - { - Cancel(); - iProperty.Close(); - } - - -// --------------------------------------------------------- -// CAppControllerPropertyHandler::DoCancel -// Cancel the request to receive events -// --------------------------------------------------------- -// -void CAppControllerPropertyHandler::DoCancel() - { - iProperty.Cancel(); - } - - -// --------------------------------------------------------- -// CAppControllerPropertyHandler::RunL -// Handle a change event. -// --------------------------------------------------------- -// -void CAppControllerPropertyHandler::RunL() - { - // Resubscribe before processing new value to prevent missing updates - iProperty.Subscribe( iStatus ); - SetActive(); - - if ( iRequestIssued ) - { - iController->HandleCurrentCallStatusChange(); - } - } - - -// --------------------------------------------------------- -// CAppControllerPropertyHandler::Value -// Get current property value -// --------------------------------------------------------- -// -TInt CAppControllerPropertyHandler::Value() - { - TInt value = 0; - iProperty.Get( value ); - return value; - } - - -// End of File