videocollection/videocollectionview/tsrc/testvideooperatorservice_p/stub/inc/coemainstub.h
equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef __COEMAIN_H__ |
|
19 #define __COEMAIN_H__ |
|
20 |
|
21 typedef int RWsSession; |
|
22 |
|
23 #include <e32base.h> |
|
24 |
|
25 class CCoeEnv; |
|
26 |
|
27 extern CCoeEnv *g_Env; |
|
28 |
|
29 class CCoeEnv |
|
30 { |
|
31 public: |
|
32 |
|
33 static CCoeEnv* Static() |
|
34 { |
|
35 if(mStaticReturnsNull) |
|
36 return 0; |
|
37 if(!g_Env) |
|
38 g_Env = new (ELeave) CCoeEnv; |
|
39 return g_Env; |
|
40 } |
|
41 |
|
42 /** |
|
43 * Must be called before test exits if it has called the static method. |
|
44 */ |
|
45 static void Reset() { delete g_Env; g_Env = 0; } |
|
46 |
|
47 RWsSession &WsSession() { return mSession; } |
|
48 |
|
49 // Construction and destruction |
|
50 CCoeEnv() { } |
|
51 ~CCoeEnv() {} |
|
52 |
|
53 static int mCCoeEnvCallCount; |
|
54 static RWsSession mSession; |
|
55 static bool mStaticReturnsNull; |
|
56 }; |
|
57 |
|
58 #endif |
|
59 |
|
60 // End of file. |