installationservices/swi/source/sisregistry/server_legacy/sisregistryservershutdown.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 31 Aug 2010 15:21:33 +0300
branchRCL_3
changeset 65 7333d7932ef7
parent 0 ba25891c3a9e
permissions -rw-r--r--
Revision: 201033 Kit: 201035

/*
* Copyright (c) 2004-2009 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: 
* CSisRegistryShutdown class definition a wrapper around a timer which is set with a delay
* when there are no more sessions (clients connected to the server)   
*
*/


/**
 @file 
 @released
 @internalComponent
*/
#ifndef __SISREGISTRYSERVERSHUTDOWN_H__
#define __SISREGISTRYSERVERSHUTDOWN_H__

#include <e32base.h>
const TInt KSisRegistryShutdownDelay= 0x200000;// approx 2s
namespace Swi
{

class CShutdown : public CTimer
	{
public:
	CShutdown();
	void ConstructL();
	void Start();
	
private:
	void RunL();
	};

inline CShutdown::CShutdown()
	:CTimer(EPriorityStandard)
	{
	CActiveScheduler::Add(this);
	}
	
inline void CShutdown::ConstructL()
	{
	CTimer::ConstructL();
	}
	
inline void CShutdown::Start()
	{
	After(KSisRegistryShutdownDelay);
	}
	
} //namespace

#endif // __SISREGISTRYSERVERSHUTDOWN_H__