diff -r adb51f74b890 -r 72c709219fcd videocollection/tsrc/stubs/inc/coemainstub.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/videocollection/tsrc/stubs/inc/coemainstub.h Fri Oct 15 16:29:10 2010 +0300 @@ -0,0 +1,60 @@ +/* +* Copyright (c) 2009 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: +* +*/ + +#ifndef __COEMAIN_H__ +#define __COEMAIN_H__ + +typedef int RWsSession; + +#include + +class CCoeEnv; + +extern CCoeEnv *g_Env; + +class CCoeEnv +{ +public: + + static CCoeEnv* Static() + { + if(mStaticReturnsNull) + return 0; + if(!g_Env) + g_Env = new (ELeave) CCoeEnv; + return g_Env; + } + + /** + * Must be called before test exits if it has called the static method. + */ + static void Reset() { delete g_Env; g_Env = 0; } + + RWsSession &WsSession() { return mSession; } + + // Construction and destruction + CCoeEnv() { } + ~CCoeEnv() {} + + static int mCCoeEnvCallCount; + static RWsSession mSession; + static bool mStaticReturnsNull; +}; + +#endif + +// End of file.