|
1 /* |
|
2 * Copyright (c) 2006 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: remconinterfaceselector stub for testing keycapture |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include <e32debug.h> |
|
20 |
|
21 #include "stub/remconinterfaceselector.h" |
|
22 #include "stub/remconcallhandlingtarget.h" |
|
23 #include "stub/remconcoreapitarget.h" |
|
24 |
|
25 int gCRemConInterfaceSelectorCount = 0; |
|
26 bool gCRemConInterfaceSelectorNewLLeave = false; |
|
27 bool gCRemConInterfaceSelectorOpenTargetLLeave = false; |
|
28 |
|
29 |
|
30 //static functions start |
|
31 |
|
32 int CRemConInterfaceSelector::getCount() |
|
33 { |
|
34 return gCRemConInterfaceSelectorCount; |
|
35 } |
|
36 |
|
37 void CRemConInterfaceSelector::setNewLLeave() |
|
38 { |
|
39 gCRemConInterfaceSelectorNewLLeave = true; |
|
40 } |
|
41 |
|
42 void CRemConInterfaceSelector::NewLLeaveIfDesiredL() |
|
43 { |
|
44 if (gCRemConInterfaceSelectorNewLLeave) |
|
45 { |
|
46 RDebug::Print(_L("CRemConInterfaceSelector::NewLLeaveIfDesiredL Leave")); |
|
47 gCRemConInterfaceSelectorNewLLeave = false; |
|
48 User::Leave(KErrGeneral); |
|
49 } |
|
50 } |
|
51 |
|
52 void CRemConInterfaceSelector::setOpenTargetLLeave() |
|
53 { |
|
54 gCRemConInterfaceSelectorOpenTargetLLeave = true; |
|
55 } |
|
56 |
|
57 void CRemConInterfaceSelector::OpenTargetLLeaveIfDesiredL() |
|
58 { |
|
59 if (gCRemConInterfaceSelectorOpenTargetLLeave) |
|
60 { |
|
61 RDebug::Print(_L("CRemConInterfaceSelector::NewLLeaveIfDesiredL Leave")); |
|
62 gCRemConInterfaceSelectorOpenTargetLLeave = false; |
|
63 User::Leave(KErrGeneral); |
|
64 } |
|
65 } |
|
66 |
|
67 //static functions end |
|
68 |
|
69 CRemConInterfaceSelector::CRemConInterfaceSelector() |
|
70 { |
|
71 gCRemConInterfaceSelectorCount++; |
|
72 } |
|
73 |
|
74 CRemConInterfaceSelector::~CRemConInterfaceSelector() |
|
75 { |
|
76 gCRemConInterfaceSelectorCount--; |
|
77 iCoreApiArray.ResetAndDestroy(); |
|
78 iCallHandlingArray.ResetAndDestroy(); |
|
79 } |
|
80 |
|
81 CRemConInterfaceSelector* CRemConInterfaceSelector::NewL() |
|
82 { |
|
83 RDebug::Print(_L("stub CRemConInterfaceSelector::NewL")); |
|
84 CRemConInterfaceSelector::NewLLeaveIfDesiredL(); |
|
85 CRemConInterfaceSelector* self = new(ELeave) CRemConInterfaceSelector(); |
|
86 return self; |
|
87 } |
|
88 |
|
89 void CRemConInterfaceSelector::RegisterCallHandlingL(CRemConCallHandlingTarget* aCallHandling) |
|
90 { |
|
91 iCallHandlingArray.AppendL(aCallHandling); |
|
92 } |
|
93 |
|
94 void CRemConInterfaceSelector::RegisterCoreApiL(CRemConCoreApiTarget* aCoreApi) |
|
95 { |
|
96 iCoreApiArray.AppendL(aCoreApi); |
|
97 } |
|
98 |
|
99 void CRemConInterfaceSelector::OpenTargetL() |
|
100 { |
|
101 CRemConInterfaceSelector::OpenTargetLLeaveIfDesiredL(); |
|
102 } |
|
103 |
|
104 //end of file |