diff -r 826cea16efd9 -r 13a33d82ad98 videoscheduler/SchedulerServer/src/CCseSemaphoreController.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/videoscheduler/SchedulerServer/src/CCseSemaphoreController.cpp Wed Sep 01 12:20:37 2010 +0100 @@ -0,0 +1,173 @@ +/* +* 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 the License "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: Observer for plugin thread if shutdown is signalled.* +*/ + + + +// INCLUDE FILES +#include "CCseSemaphoreController.h" +#include "MCseSemaphoreSignalObserver.h" +#include "CseDebug.h" // Debug macros + + + +// EXTERNAL DATA STRUCTURES +// None + +// EXTERNAL FUNCTION PROTOTYPES +// None + +// CONSTANTS +// None + +// MACROS +// None + +// LOCAL CONSTANTS AND MACROS +static TUint KCSeSemaphorePollingInterval = 5000; + +// MODULE DATA STRUCTURES +// None + +// LOCAL FUNCTION PROTOTYPES +// None + +// FORWARD DECLARATIONS +// None + + +// ============================ MEMBER FUNCTIONS =============================== +// --------------------------------------------------------------------------- +// CCseSchedulerTimer::CCseSemaphoreController() +// +// --------------------------------------------------------------------------- +CCseSemaphoreController::CCseSemaphoreController( RSemaphore& aSemaphore, + MCseSemaphoreSignalObserver& aObserver ) + : CTimer( EPriorityNormal ), + iSemaphore( aSemaphore ), + iObserver( aObserver ), + iInterval( KCSeSemaphorePollingInterval ) + + + { + CSELOGSTRING_HIGH_LEVEL(">>>CCseSemaphoreController::CCseSemaphoreController"); + + CSELOGSTRING_HIGH_LEVEL("<<>>CCseSemaphoreController::~CCseSemaphoreController"); + + Cancel(); + + CSELOGSTRING_HIGH_LEVEL("<<>>CCseSemaphoreController::NewL"); + + // Symbian C++ constructor + CCseSemaphoreController* self = new ( ELeave ) CCseSemaphoreController( aSemaphore, + aObserver ); + CleanupStack::PushL( self ); + self->ConstructL(); + CleanupStack::Pop( self ); + + CSELOGSTRING_HIGH_LEVEL("<<>>CCseSemaphoreController::ConstructL"); + + CTimer::ConstructL(); + CActiveScheduler::Add( this ); + + CSELOGSTRING_HIGH_LEVEL("<<