--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/connectionmonitoring/connmon/connectionmonitor/inc/cellulardatausagekeyupdater.h Mon Jan 18 20:33:49 2010 +0200
@@ -0,0 +1,67 @@
+/*
+* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Listens for changes in one CommsDat table through CenRep.
+*
+*/
+
+#ifndef CELLULARDATAUSAGEKEYUPDATER_H
+#define CELLULARDATAUSAGEKEYUPDATER_H
+
+class CConnMonServer;
+class CRepository;
+class TCmGenConnSettings;
+
+// Stop requesting new notifications after this many consecutive errors
+const TInt KCenRepErrorRetryCount = 80;
+
+NONSHARABLE_CLASS( CCellularDataUsageKeyUpdater ) : public CActive
+ {
+public:
+ static CCellularDataUsageKeyUpdater* NewL(
+ CConnMonServer* aServer );
+
+ static CCellularDataUsageKeyUpdater* NewLC(
+ CConnMonServer* aServer );
+
+ virtual ~CCellularDataUsageKeyUpdater();
+
+ void UpdateKeyL( const TInt aRegistration ) const;
+
+private:
+ CCellularDataUsageKeyUpdater(
+ CConnMonServer* aServer );
+
+ void ConstructL();
+ TInt RequestNotifications();
+
+ TCmGenConnSettings ReadGenConnSettingsL() const;
+ TInt GetNetworkRegistration( TInt& aRegistration ) const;
+ void UpdateKeyL() const;
+
+private: // Methods from base class
+ void DoCancel();
+ void RunL();
+
+private:
+ CConnMonServer* iServer;
+ TUint32 iTableId;
+ CRepository* iRepository;
+ TInt iErrorCounter;
+ // used for complete runl. Not owned.
+ TRequestStatus* iInitStatus;
+ };
+
+#endif // CELLULARDATAUSAGEKEYUPDATER_H
+
+// End-of-file