|
1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 |
|
17 |
|
18 // INCLUDE FILES |
|
19 #include "CMmCustomGsmExt.h" |
|
20 #include "cmmcalltsy.h" |
|
21 #include "cmmcalllist.h" |
|
22 #include <ctsy/pluginapi/cmmdatapackage.h> |
|
23 |
|
24 // ======== MEMBER FUNCTIONS ======== |
|
25 |
|
26 CMmCustomGsmExt::CMmCustomGsmExt( |
|
27 CMmPhoneTsy* aMmPhoneTsy ) |
|
28 { |
|
29 iMmPhoneTsy = aMmPhoneTsy; |
|
30 } |
|
31 |
|
32 void CMmCustomGsmExt::ConstructL( |
|
33 CMmCustomTsy* aMmCustomTsy ) |
|
34 { |
|
35 iMmCustomTsy = aMmCustomTsy; |
|
36 iRemoteAlertingToneStatus = RMmCustomAPI::EUiNoTone; |
|
37 } |
|
38 |
|
39 CMmCustomGsmExt* CMmCustomGsmExt::NewL( |
|
40 CMmPhoneTsy* aMmPhoneTsy, |
|
41 CMmCustomTsy* aMmCustomTsy ) |
|
42 { |
|
43 CMmCustomGsmExt* customGsmExt = |
|
44 new ( ELeave ) CMmCustomGsmExt( aMmPhoneTsy ); |
|
45 |
|
46 CleanupStack::PushL( customGsmExt ); |
|
47 customGsmExt->ConstructL( aMmCustomTsy ); |
|
48 CleanupStack::Pop(); |
|
49 |
|
50 return customGsmExt; |
|
51 } |
|
52 |
|
53 CMmCustomGsmExt::~CMmCustomGsmExt() |
|
54 { |
|
55 } |
|
56 |
|
57 // --------------------------------------------------------------------------- |
|
58 // CMmCustomGsmExt::SetLocalRemoteAlertToneRequired |
|
59 // Sets if the remote alerting tone should be played locally or not. EFalse |
|
60 // means that NW is playing the remote alert tone, ETrue means that remote |
|
61 // alert tone should be generated locally. |
|
62 // (other items were commented in a header). |
|
63 // --------------------------------------------------------------------------- |
|
64 // |
|
65 void CMmCustomGsmExt::SetLocalRemoteAlertToneRequired( |
|
66 TBool aAlertingToneStatus ) |
|
67 { |
|
68 RMmCustomAPI::TRemoteAlertingToneStatus remoteAlertingToneStatusTemp; |
|
69 remoteAlertingToneStatusTemp = iRemoteAlertingToneStatus; |
|
70 |
|
71 if ( !aAlertingToneStatus ) |
|
72 { |
|
73 iRemoteAlertingToneStatus = RMmCustomAPI::EUiStopTone; |
|
74 } |
|
75 else |
|
76 { |
|
77 iRemoteAlertingToneStatus = RMmCustomAPI::EUiRbtTone; |
|
78 } |
|
79 |
|
80 if ( remoteAlertingToneStatusTemp != iRemoteAlertingToneStatus ) |
|
81 { |
|
82 iMmCustomTsy->CompleteNotifyRemoteAlertingToneStatusChange( |
|
83 iRemoteAlertingToneStatus, KErrNone ); |
|
84 } |
|
85 |
|
86 } |
|
87 |
|
88 // --------------------------------------------------------------------------- |
|
89 // CMmCustomGsmExt::GetRemoteAlertingToneStatus |
|
90 // Returns the status of the remote alerting tone. |
|
91 // (other items were commented in a header). |
|
92 // --------------------------------------------------------------------------- |
|
93 // |
|
94 TInt CMmCustomGsmExt::GetRemoteAlertingToneStatus( |
|
95 RMmCustomAPI::TRemoteAlertingToneStatus* aStatus ) |
|
96 { |
|
97 *aStatus = iRemoteAlertingToneStatus; |
|
98 |
|
99 return KErrNone; |
|
100 } |
|
101 |
|
102 // End of File |