|
1 /* |
|
2 * Copyright (c) 2008-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: Listens for changes in one CommsDat table through CenRep. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CELLULARDATAUSAGEKEYUPDATER_H |
|
19 #define CELLULARDATAUSAGEKEYUPDATER_H |
|
20 |
|
21 class CConnMonServer; |
|
22 class CRepository; |
|
23 class TCmGenConnSettings; |
|
24 |
|
25 // Stop requesting new notifications after this many consecutive errors |
|
26 const TInt KCenRepErrorRetryCount = 80; |
|
27 |
|
28 NONSHARABLE_CLASS( CCellularDataUsageKeyUpdater ) : public CActive |
|
29 { |
|
30 public: |
|
31 static CCellularDataUsageKeyUpdater* NewL( |
|
32 CConnMonServer* aServer ); |
|
33 |
|
34 static CCellularDataUsageKeyUpdater* NewLC( |
|
35 CConnMonServer* aServer ); |
|
36 |
|
37 virtual ~CCellularDataUsageKeyUpdater(); |
|
38 |
|
39 void UpdateKeyL( const TInt aRegistration ) const; |
|
40 |
|
41 private: |
|
42 CCellularDataUsageKeyUpdater( |
|
43 CConnMonServer* aServer ); |
|
44 |
|
45 void ConstructL(); |
|
46 TInt RequestNotifications(); |
|
47 |
|
48 TCmGenConnSettings ReadGenConnSettingsL() const; |
|
49 TInt GetNetworkRegistration( TInt& aRegistration ) const; |
|
50 void UpdateKeyL() const; |
|
51 |
|
52 private: // Methods from base class |
|
53 void DoCancel(); |
|
54 void RunL(); |
|
55 |
|
56 private: |
|
57 CConnMonServer* iServer; |
|
58 TUint32 iTableId; |
|
59 CRepository* iRepository; |
|
60 TInt iErrorCounter; |
|
61 // used for complete runl. Not owned. |
|
62 TRequestStatus* iInitStatus; |
|
63 }; |
|
64 |
|
65 #endif // CELLULARDATAUSAGEKEYUPDATER_H |
|
66 |
|
67 // End-of-file |