|
1 /* |
|
2 * Copyright (c) 2005 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 |
|
19 |
|
20 |
|
21 #ifndef CMCEDTMFHANDLER_H |
|
22 #define CMCEDTMFHANDLER_H |
|
23 |
|
24 #include <e32base.h> |
|
25 #include <mmccevents.h> |
|
26 #include "mcemediadefs.h" |
|
27 #include "mcedefs.h" |
|
28 #include "mcesrv.h" |
|
29 #include "mceclientserver.h" |
|
30 |
|
31 class CMceComMediaSource; |
|
32 class CMceSrvStream; |
|
33 class TMceMccComEvent; |
|
34 class CMceSrvStream; |
|
35 class CMccInterface; |
|
36 class TMceComEvent; |
|
37 |
|
38 /** |
|
39 * |
|
40 * |
|
41 * @lib |
|
42 */ |
|
43 class CMceDtmfHandler: public CActive |
|
44 { |
|
45 |
|
46 |
|
47 public: // Constructors & Destructor |
|
48 |
|
49 |
|
50 static CMceDtmfHandler* CMceDtmfHandler::NewL( CMceSrvStream& aStream, |
|
51 CMccInterface& aMccInterface ); |
|
52 /** |
|
53 * Destructor. |
|
54 */ |
|
55 ~CMceDtmfHandler(); |
|
56 |
|
57 protected: // From CActive |
|
58 |
|
59 void RunL(); |
|
60 |
|
61 void DoCancel(); |
|
62 |
|
63 TInt RunError( TInt aError ); |
|
64 |
|
65 public: |
|
66 |
|
67 void DtmfL( CMceComMediaSource& aSource, |
|
68 TMceComEvent& aEvent, |
|
69 const TDesC8& aSequence = KNullDesC8 ); |
|
70 |
|
71 void DtmfReceivedL( const TMccEvent& aMccEvent, |
|
72 TMceMccComEvent& aEvent ); |
|
73 |
|
74 private: |
|
75 |
|
76 void SendDtmfStringL( TMccDtmfEventType aDtmfEventType, |
|
77 const TDesC8& aDtmfString = KNullDesC8, |
|
78 TUint32 aDurationInMicroSecs = 0 ); |
|
79 |
|
80 void StopDtmfL(); |
|
81 |
|
82 void SetDtmfActive( TBool aIsActive ); |
|
83 |
|
84 TBool IsDtmfActive() const; |
|
85 |
|
86 private: |
|
87 |
|
88 /** |
|
89 * C++ default constructor. |
|
90 */ |
|
91 CMceDtmfHandler( CMceSrvStream& aStream, |
|
92 CMccInterface& aMccInterface ); |
|
93 |
|
94 |
|
95 private: // owned data |
|
96 |
|
97 CMceSrvStream& iStream; |
|
98 CMccInterface& iMccInterface; |
|
99 |
|
100 RTimer iTimer; |
|
101 |
|
102 TUint32 iCurrentUserStreamId; |
|
103 TUint32 iCurrentUserSourceId; |
|
104 |
|
105 TBool iSendingDtmf; |
|
106 |
|
107 //definitions for unit testing |
|
108 MCEMM_UT_DEFINITIONS |
|
109 |
|
110 }; |
|
111 |
|
112 |
|
113 |
|
114 #endif //CMCEDTMFHANDLER_H |