|
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: Base state class of DTMF sending. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 #include "CVtEngDtmfState.h" |
|
22 #include "MVtEngDtmfHandler.h" |
|
23 #include <cvtlogger.h> |
|
24 |
|
25 // ============================ MEMBER FUNCTIONS =============================== |
|
26 |
|
27 // ----------------------------------------------------------------------------- |
|
28 // CVtEngDtmfState::CVtEngDtmfState |
|
29 // |
|
30 // ----------------------------------------------------------------------------- |
|
31 // |
|
32 CVtEngDtmfState::CVtEngDtmfState( |
|
33 MVtEngDtmfHandler& aDtmfHandler, |
|
34 MVtH324ConfigCommand& aH324Config ) : |
|
35 iDtmfHandler( aDtmfHandler ), |
|
36 iH324Config( aH324Config ) |
|
37 { |
|
38 } |
|
39 |
|
40 // ----------------------------------------------------------------------------- |
|
41 // CVtEngDtmfState::DtmfSendCompleteL |
|
42 // |
|
43 // ----------------------------------------------------------------------------- |
|
44 // |
|
45 void CVtEngDtmfState::DtmfSendCompleteL( TInt /*aError*/ ) |
|
46 { |
|
47 __VTPRINTENTER( "DtmfState.DtmfSendCompleteL" ) |
|
48 iDtmfHandler.ReleaseProtoDtmf(); |
|
49 __VTPRINTEXIT( "DtmfState.DtmfSendCompleteL" ) |
|
50 } |
|
51 |
|
52 // ----------------------------------------------------------------------------- |
|
53 // CVtEngDtmfState::DoSendAndActivateStateL |
|
54 // |
|
55 // Requests new Protocol dtmf tone instance from the DTMF handler, sends it and |
|
56 // changes state. |
|
57 // |
|
58 // ----------------------------------------------------------------------------- |
|
59 // |
|
60 void CVtEngDtmfState::DoSendAndActivateStateL( |
|
61 const TVtEngDtmfTone& aDtmf, |
|
62 MVtEngDtmfHandler::TVtEngDtmfState aNewState ) |
|
63 { |
|
64 __VTPRINTENTER( "DtmfState.DoSendAndActivateStateL" ) |
|
65 MVTUserInput& protoDtmf = iDtmfHandler.ReserveProtoDtmfL( aDtmf ); |
|
66 iDtmfHandler.StoreCommandId( iH324Config.SendUserInputMessageL( protoDtmf )); |
|
67 iDtmfHandler.ActivateState( aNewState ); |
|
68 __VTPRINTEXIT( "DtmfState.DoSendAndActivateStateL" ) |
|
69 } |
|
70 |
|
71 // End of File |