|
1 /* |
|
2 * Copyright (c) 2002-2004 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: Asynchronous subthread event handler |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 // INCLUDE FILES |
|
22 #include "MmccEvents.h" |
|
23 #include "Mcctesteventhandler.h" |
|
24 #include "mccinternaldef.h" |
|
25 #include "mccinternalevents.h" |
|
26 |
|
27 |
|
28 // EXTERNAL DATA STRUCTURES |
|
29 |
|
30 // EXTERNAL FUNCTION PROTOTYPES |
|
31 |
|
32 // CONSTANTS |
|
33 const TUid KAmrPayloadUid = { KDllUidAmrPayloadFormat }; |
|
34 const TUint KMaxSignalsInQueue( 20 ); |
|
35 |
|
36 // MACROS |
|
37 |
|
38 // LOCAL CONSTANTS AND MACROS |
|
39 // Panic text in debug builds |
|
40 #ifdef _DEBUG |
|
41 _LIT( KTxtMccEventHandler, "MccEventHandler" ); |
|
42 #endif |
|
43 |
|
44 // MODULE DATA STRUCTURES |
|
45 |
|
46 // LOCAL FUNCTION PROTOTYPES |
|
47 |
|
48 // FORWARD DECLARATIONS |
|
49 |
|
50 // ============================= LOCAL FUNCTIONS =============================== |
|
51 |
|
52 // ============================ MEMBER FUNCTIONS =============================== |
|
53 |
|
54 // ----------------------------------------------------------------------------- |
|
55 // CMccTestEventHandler::CMccTestEventHandler |
|
56 // C++ default constructor can NOT contain any code, that |
|
57 // might leave. |
|
58 // ----------------------------------------------------------------------------- |
|
59 CMccTestEventHandler::CMccTestEventHandler() |
|
60 { |
|
61 }; |
|
62 |
|
63 // ----------------------------------------------------------------------------- |
|
64 // CMccTestEventHandler::ConstructL |
|
65 // Symbian 2nd phase constructor can leave. |
|
66 // ----------------------------------------------------------------------------- |
|
67 void CMccTestEventHandler::ConstructL() |
|
68 { |
|
69 }; |
|
70 |
|
71 // ----------------------------------------------------------------------------- |
|
72 // CMccTestEventHandler::NewL |
|
73 // Static constructor. |
|
74 // ----------------------------------------------------------------------------- |
|
75 CMccTestEventHandler* CMccTestEventHandler::NewL() |
|
76 { |
|
77 CMccTestEventHandler* self = new ( ELeave ) CMccTestEventHandler(); |
|
78 CleanupStack::PushL( self ); |
|
79 self->ConstructL(); |
|
80 CleanupStack::Pop( self ); |
|
81 |
|
82 return self; |
|
83 }; |
|
84 |
|
85 // ----------------------------------------------------------------------------- |
|
86 // CMccTestEventHandler::~CMccTestEventHandler |
|
87 // Destructor |
|
88 // ----------------------------------------------------------------------------- |
|
89 CMccTestEventHandler::~CMccTestEventHandler() |
|
90 { |
|
91 }; |
|
92 |
|
93 // ----------------------------------------------------------------------------- |
|
94 // CMccTestEventHandler::ChangeState |
|
95 // Changes the state of the eventhandler by using async request for itself |
|
96 // ----------------------------------------------------------------------------- |
|
97 void CMccTestEventHandler::ChangeState( const TMccEventHandlerState& /*aState*/ ) |
|
98 { |
|
99 }; |
|
100 |
|
101 // ----------------------------------------------------------------------------- |
|
102 // CMccTestEventHandler::CompleteClientRequest |
|
103 // Completes a client request |
|
104 // ----------------------------------------------------------------------------- |
|
105 void CMccTestEventHandler::CompleteClientRequest() |
|
106 { |
|
107 }; |
|
108 |
|
109 |
|
110 // ----------------------------------------------------------------------------- |
|
111 // CMccTestEventHandler::SendEventToClient |
|
112 // ----------------------------------------------------------------------------- |
|
113 TInt CMccTestEventHandler::SendEventToClient( const TMMFEvent& aEvent ) |
|
114 { |
|
115 TMccEvent* mccEventPtr = 0; |
|
116 if ( IS_MCC_EVENT( aEvent ) ) |
|
117 { |
|
118 mccEventPtr = |
|
119 reinterpret_cast<const TMccInternalEvent&>( aEvent ).iMccEvent; |
|
120 } |
|
121 |
|
122 if ( mccEventPtr ) |
|
123 { |
|
124 iLastEvent = *mccEventPtr; |
|
125 } |
|
126 else |
|
127 { |
|
128 iLastEvent = TMccEvent(); |
|
129 } |
|
130 |
|
131 return KErrNone; |
|
132 } |
|
133 |
|
134 // ----------------------------------------------------------------------------- |
|
135 // CMccTestEventHandler::SendMccEventToClient |
|
136 // Handles a Mcc specific event |
|
137 // ----------------------------------------------------------------------------- |
|
138 TInt CMccTestEventHandler::SendMccEventToClient( TMccEvent& /*aEvent*/ ) |
|
139 { |
|
140 return KErrNone; |
|
141 }; |
|
142 |
|
143 |
|
144 // ----------------------------------------------------------------------------- |
|
145 // CMccTestEventHandler::StateChange |
|
146 // ----------------------------------------------------------------------------- |
|
147 void CMccTestEventHandler::StateChange( TInt /*aState*/, TUint32 /*aLink*/ ) |
|
148 { |
|
149 } |
|
150 |
|
151 // ----------------------------------------------------------------------------- |
|
152 // CMccTestEventHandler::ErrorOccured |
|
153 // ----------------------------------------------------------------------------- |
|
154 void CMccTestEventHandler::ErrorOccured( TInt /*aError*/, TUint32 /*aSessionId*/, |
|
155 TUint32 /*aLink*/, TUint32 /*aStreamId*/, TUint32 /*aEndpointId*/ ) |
|
156 { |
|
157 } |
|
158 |
|
159 // ----------------------------------------------------------------------------- |
|
160 // CMccTestEventHandler::ErrorNotify |
|
161 // ----------------------------------------------------------------------------- |
|
162 void CMccTestEventHandler::ErrorNotify( TInt /*aErrCode*/ ) |
|
163 { |
|
164 } |
|
165 |
|
166 // ----------------------------------------------------------------------------- |
|
167 // CMccTestEventHandler::HandleAmrEvent |
|
168 // Handles received AMR CMR event |
|
169 // ----------------------------------------------------------------------------- |
|
170 // |
|
171 void CMccTestEventHandler::HandleAmrEvent() |
|
172 { |
|
173 } |
|
174 |
|
175 |
|
176 // ========================== OTHER EXPORTED FUNCTIONS ========================= |
|
177 |
|
178 // End of File |