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: Implements the ECom plugin for HTI STIF Test Framework control |
|
15 * service. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 // INCLUDE FILES |
|
22 #include <e32std.h> |
|
23 #include <HtiDispatcherInterface.h> |
|
24 #include <HtiLogging.h> |
|
25 |
|
26 #include "HtiStifTfServicePlugin.h" |
|
27 #include "HtiStifTfIf.h" |
|
28 |
|
29 // EXTERNAL DATA STRUCTURES |
|
30 |
|
31 // EXTERNAL FUNCTION PROTOTYPES |
|
32 |
|
33 // CONSTANTS |
|
34 |
|
35 // MACROS |
|
36 |
|
37 // LOCAL CONSTANTS AND MACROS |
|
38 |
|
39 // MODULE DATA STRUCTURES |
|
40 |
|
41 // LOCAL FUNCTION PROTOTYPES |
|
42 |
|
43 // FORWARD DECLARATIONS |
|
44 |
|
45 // ============================= LOCAL FUNCTIONS =============================== |
|
46 |
|
47 // ============================ MEMBER FUNCTIONS =============================== |
|
48 |
|
49 // ----------------------------------------------------------------------------- |
|
50 // CHtiStifTfServicePlugin::CHtiStifTfServicePlugin |
|
51 // C++ default constructor can NOT contain any code, that might leave. |
|
52 // ----------------------------------------------------------------------------- |
|
53 // |
|
54 CHtiStifTfServicePlugin::CHtiStifTfServicePlugin() |
|
55 { |
|
56 } |
|
57 |
|
58 |
|
59 // ----------------------------------------------------------------------------- |
|
60 // CHtiStifTfServicePlugin::ConstructL |
|
61 // Symbian 2nd phase constructor can leave. |
|
62 // ----------------------------------------------------------------------------- |
|
63 // |
|
64 void CHtiStifTfServicePlugin::ConstructL() |
|
65 { |
|
66 iStifTfInterface = CHtiStifTfIf::NewL( this ); |
|
67 } |
|
68 |
|
69 |
|
70 // ----------------------------------------------------------------------------- |
|
71 // CHtiStifTfServicePlugin::NewL |
|
72 // Two-phased constructor. |
|
73 // ----------------------------------------------------------------------------- |
|
74 // |
|
75 CHtiStifTfServicePlugin* CHtiStifTfServicePlugin::NewL() |
|
76 { |
|
77 CHtiStifTfServicePlugin* self = new (ELeave) CHtiStifTfServicePlugin; |
|
78 CleanupStack::PushL( self ); |
|
79 self->ConstructL(); |
|
80 CleanupStack::Pop(); |
|
81 return self; |
|
82 } |
|
83 |
|
84 |
|
85 // Destructor |
|
86 CHtiStifTfServicePlugin::~CHtiStifTfServicePlugin() |
|
87 { |
|
88 delete iStifTfInterface; |
|
89 } |
|
90 |
|
91 |
|
92 // ----------------------------------------------------------------------------- |
|
93 // CHtiStifTfServicePlugin::ProcessMessageL |
|
94 // Sends the message to be processed by the class implementing the STIF TF |
|
95 // interface. |
|
96 // ----------------------------------------------------------------------------- |
|
97 // |
|
98 void CHtiStifTfServicePlugin::ProcessMessageL( const TDesC8& aMessage, |
|
99 THtiMessagePriority aPriority) |
|
100 { |
|
101 HTI_LOG_FUNC_IN( "CHtiStifTfServicePlugin::ProcessMessageL" ); |
|
102 iStifTfInterface->SetDispatcher( iDispatcher ); |
|
103 iStifTfInterface->ProcessMessageL( aMessage, aPriority ); |
|
104 HTI_LOG_FUNC_OUT( "CHtiStifTfServicePlugin::ProcessMessageL" ); |
|
105 } |
|
106 |
|
107 |
|
108 // ----------------------------------------------------------------------------- |
|
109 // CHtiStifTfServicePlugin::NotifyMemoryChange |
|
110 // Just forwards the call to the HtiStifTwIf instance. |
|
111 // ----------------------------------------------------------------------------- |
|
112 // |
|
113 void CHtiStifTfServicePlugin::NotifyMemoryChange( TInt aAvailableMemory ) |
|
114 { |
|
115 iStifTfInterface->NotifyMemoryChange( aAvailableMemory ); |
|
116 } |
|
117 |
|
118 |
|
119 // ----------------------------------------------------------------------------- |
|
120 // CHtiStifTfServicePlugin::IsBusy |
|
121 // ----------------------------------------------------------------------------- |
|
122 // |
|
123 TBool CHtiStifTfServicePlugin::IsBusy() |
|
124 { |
|
125 return iStifTfInterface->iIsBusy; |
|
126 } |
|
127 |
|
128 |
|
129 // ========================== OTHER EXPORTED FUNCTIONS ========================= |
|
130 |
|
131 // End of File |
|