sl@0: /*
sl@0: * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0: * All rights reserved.
sl@0: * This component and the accompanying materials are made available
sl@0: * under the terms of "Eclipse Public License v1.0"
sl@0: * which accompanies this distribution, and is available
sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0: *
sl@0: * Initial Contributors:
sl@0: * Nokia Corporation - initial contribution.
sl@0: *
sl@0: * Contributors:
sl@0: *
sl@0: * Description:
sl@0: *
sl@0: */
sl@0: 
sl@0: 
sl@0: #ifndef __TIMERCLIENT_H__
sl@0: #define __TIMERCLIENT_H__
sl@0: 
sl@0: #include <e32std.h> //RSessionBase
sl@0: #include <e32def.h> //Varargs
sl@0: 
sl@0: class RTimerSession : public RSessionBase
sl@0: 	{
sl@0: 	public:
sl@0: 		RTimerSession():iIsConnected(EFalse)
sl@0: 			{iLock.CreateLocal();}
sl@0: 		TInt Connect(RServer2 aServer);
sl@0: 		TInt DeleteTimer(const TInt);
sl@0: 		TInt OnDemandConnect(RServer2 aServer);
sl@0: 		TInt SetTime(const TInt);
sl@0: 		void ResetConnectionFlag()
sl@0: 			{
sl@0: 			iIsConnected = EFalse;
sl@0: 			}
sl@0: 	private:
sl@0: 		void Lock()
sl@0: 			{
sl@0: 			iLock.Wait();
sl@0: 			}
sl@0: 		void UnLock()
sl@0: 			{
sl@0: 			iLock.Signal();
sl@0: 			}
sl@0: 		RFastLock iLock;
sl@0: 		TInt iIsConnected;
sl@0: 	};	
sl@0: 	
sl@0: #endif //__TIMERCLIENT_H__