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: Monitor that observes the calling line identity restriction |
|
15 * setting |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef MUSCLIRMONITOR_H |
|
22 #define MUSCLIRMONITOR_H |
|
23 |
|
24 #include "musunittesting.h" |
|
25 |
|
26 #include <etelmm.h> |
|
27 #include <e32base.h> |
|
28 #include <etel3rdparty.h> |
|
29 |
|
30 |
|
31 /** |
|
32 * Monitor, which observes status of CLIR setting that controls whether the |
|
33 * caller's phone number/id is shown to the called party. |
|
34 * |
|
35 * @lib musaoplugin.dll |
|
36 */ |
|
37 class CMusClirMonitor : public CActive |
|
38 { |
|
39 |
|
40 public: // constructors and destructor |
|
41 |
|
42 /** |
|
43 * Two-phased constructor. Leaves on failure. |
|
44 */ |
|
45 static CMusClirMonitor* NewL(); |
|
46 |
|
47 /** |
|
48 * Destructor. |
|
49 */ |
|
50 ~CMusClirMonitor(); |
|
51 |
|
52 |
|
53 public: // API |
|
54 |
|
55 /** |
|
56 * Starts the asynchronous reading of CLIR setting. When reading |
|
57 * completes, the PS key is updated. |
|
58 */ |
|
59 void ReadClir(); |
|
60 |
|
61 private: |
|
62 |
|
63 /** |
|
64 * C++ constructor. |
|
65 */ |
|
66 CMusClirMonitor(); |
|
67 |
|
68 private: // functions from base class CActive |
|
69 |
|
70 void ConstructL(); |
|
71 |
|
72 void RunL(); |
|
73 |
|
74 void DoCancel(); |
|
75 |
|
76 TInt RunError( TInt aError ); |
|
77 |
|
78 void TranslateResult( CTelephony::TIdentityServiceStatus aResult ); |
|
79 |
|
80 private: // Data |
|
81 |
|
82 CTelephony* iTelephony; //owned |
|
83 CTelephony::TIdentityServiceV1 iTIdentityServiceV1; |
|
84 CTelephony::TIdentityServiceV1Pckg iTIdentityServiceV1Pckg; |
|
85 |
|
86 // Tells if phone's number/id is allowed to be sent to the remove party |
|
87 TBool iAllowed; |
|
88 |
|
89 // How many times RunL has been completed with an error in a row |
|
90 TInt iErrorCount; |
|
91 |
|
92 MUS_UNITTEST( UT_CMusClirMonitor ) |
|
93 |
|
94 }; |
|
95 |
|
96 #endif // MUSCLIRMONITOR_H |
|