1 /* |
|
2 * ============================================================================ |
|
3 * Name : SimLockTelephonyProxy.h |
|
4 * Part of : Sim Lock UI Telephony Proxy |
|
5 * Description : Wrap asynchronous calls to Core Telephony |
|
6 * Version : |
|
7 * |
|
8 * Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). |
|
9 * All rights reserved. |
|
10 * This component and the accompanying materials are made available |
|
11 * under the terms of "Eclipse Public License v1.0" |
|
12 * which accompanies this distribution, and is available |
|
13 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
14 * |
|
15 * Initial Contributors: |
|
16 * Nokia Corporation - initial contribution. |
|
17 * |
|
18 * Contributors: |
|
19 * |
|
20 * Description: Build info file for Ado domain appinstall |
|
21 * ============================================================================ |
|
22 */ |
|
23 |
|
24 #ifndef SIMLOCK_TELEPHONY_PROXY_H |
|
25 #define SIMLOCK_TELEPHONY_PROXY_H |
|
26 |
|
27 // System Includes |
|
28 #include <e32base.h> |
|
29 #include <Etel3rdParty.h> // CTelephony members |
|
30 |
|
31 // Forward Declarations |
|
32 class CPeriodic; |
|
33 |
|
34 /** |
|
35 * CSimLockTelephonyProxy |
|
36 * |
|
37 * Act as proxy for asynchronous calls to CTelephony |
|
38 * |
|
39 * @lib euser.lib |
|
40 * @lib etel3rdparty.lib |
|
41 */ |
|
42 class CSimLockTelephonyProxy : public CActive |
|
43 { |
|
44 public: // Public Constructor/Destructor |
|
45 |
|
46 /** |
|
47 * NewL |
|
48 * Construct a CSimLockTelephonyProxy |
|
49 * using two phase construction, and return a pointer to the created object |
|
50 * @return a pointer to the created instance of CSimLockTelephonyProxy |
|
51 */ |
|
52 static CSimLockTelephonyProxy* NewL(); |
|
53 |
|
54 /** |
|
55 * Destructor |
|
56 */ |
|
57 ~CSimLockTelephonyProxy(); |
|
58 |
|
59 public: // Public API |
|
60 |
|
61 /** |
|
62 * Find out if a call is in progress. |
|
63 * |
|
64 * @return Whether or not a call is in progress |
|
65 */ |
|
66 TBool IsCallInProgress(); |
|
67 |
|
68 private: // From CActive |
|
69 |
|
70 /** |
|
71 * Active object run method |
|
72 */ |
|
73 virtual void RunL(); |
|
74 |
|
75 /** |
|
76 * Active object cancel method |
|
77 */ |
|
78 virtual void DoCancel(); |
|
79 |
|
80 private: // Private Constructors |
|
81 |
|
82 /** |
|
83 * C++ constructor. |
|
84 * |
|
85 */ |
|
86 CSimLockTelephonyProxy(); |
|
87 |
|
88 /** |
|
89 * Symbian OS default constructor. |
|
90 */ |
|
91 void ConstructL(); |
|
92 |
|
93 private: // Private Member Functions |
|
94 |
|
95 /** |
|
96 * CPeriodic Callback function for elapsed timer |
|
97 * |
|
98 * @param aClientObject pointer to CSimLockTelephonyProxy client object |
|
99 * @return required but unused |
|
100 */ |
|
101 static TInt TimerElapsed(TAny* aClientObject); |
|
102 |
|
103 /** |
|
104 * Complete an asynchronous request synchronously with a hardcoded timeout |
|
105 */ |
|
106 void CompleteRequestWithTimeout(); |
|
107 |
|
108 private: // Member Data |
|
109 |
|
110 /** |
|
111 * Telephony indicators( used to detect ongoing voice call ) |
|
112 */ |
|
113 CTelephony::TIndicatorV1 iIndicators; |
|
114 |
|
115 /** |
|
116 * Telephony indicator package as received from CTelephony |
|
117 */ |
|
118 CTelephony::TIndicatorV1Pckg iIndicatorPackage; |
|
119 |
|
120 /** |
|
121 * ETel 3rd Party API( used to detect ongoing voice call ) |
|
122 * owns |
|
123 */ |
|
124 CTelephony* iTelephony; |
|
125 |
|
126 /** |
|
127 * Active scheduler wait API |
|
128 * owns |
|
129 */ |
|
130 CActiveSchedulerWait* iSchedulerWait; |
|
131 |
|
132 /** |
|
133 * Request timeout timer |
|
134 * owns |
|
135 */ |
|
136 CPeriodic* iTimer; |
|
137 |
|
138 }; |
|
139 |
|
140 #endif // SIMLOCK_TELEPHONY_PROXY_H |
|
141 |
|
142 // End of file. |
|