cellular/SSSettings/inc/CSSSettingsRefreshHandler.h
changeset 0 ff3b6d0fd310
child 18 594d59766373
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/SSSettings/inc/CSSSettingsRefreshHandler.h	Tue Feb 02 01:11:09 2010 +0200
@@ -0,0 +1,174 @@
+/*
+* Copyright (c) 2004 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:  The Refresh handler to inform SAT refresses.
+*
+*/
+
+
+
+#ifndef CSSSETTINGSREFRESHHANDLER_H
+#define CSSSETTINGSREFRESHHANDLER_H
+
+
+//  INCLUDES
+#include <MSSSettingsRefreshHandler.h>
+#include <msatrefreshobserver.h>
+#include <MSSSettingsRefreshObserver.h>
+#include <RSSSettings.h>
+#include <RCustomerServiceProfileCache.h>
+#include <RSatRefresh.h>
+#include <RSatSession.h>
+#include <cenrepnotifyhandler.h>
+#include "CSSSettingsActiveObject.h"
+
+// DATA TYPES
+
+// The needed functionality.
+enum TSSSettingsRefreshFunction
+    {
+    ESSSettingsAllowRefresh = 0, // AllowRefresh functionality.
+    ESSSettingsRefresh      = 1, // Refresh functionality.
+    };
+
+
+// FORWARD DECLARATIONS
+class CSSSettingsNotifyInfo;
+
+
+// CLASS DECLARATION
+
+/**
+*  The Refresh handler to inform SAT refreshes.
+*  This class is extended for BT SAP functionality from 3.0.
+*
+*  @lib SsSettings.lib
+*  @since 2.8
+*/
+class CSSSettingsRefreshHandler :
+    public CBase,
+    public MSSSettingsRefreshHandler,
+    public MSatRefreshObserver,
+    public MSSSettingsPubSubNotify
+    {
+    public:  // Constructors and destructor
+        
+        /**
+        * Two-phased constructor.
+        */
+        static CSSSettingsRefreshHandler* NewL();
+        
+        /**
+        * Destructor.
+        */
+        virtual ~CSSSettingsRefreshHandler();
+
+
+    public: // Functions from base classes
+
+        /**
+        * @see MSSSettingsRefreshHandler::NotifyFileChangeL.
+		*/
+		void NotifyFileChangeL(
+            MSSSettingsRefreshObserver& aObserver,
+            TSatElementaryFiles aObservedFiles,
+            TSatRefreshType aObservedRefreshType );
+
+		/**
+        * @see MSSSettingsRefreshHandler::CancelNotify.
+		*/
+		void CancelNotify();
+
+        /**
+        * @see MSSSettingsRefreshHandler::ChangedCspTable.
+        */
+        TInt ChangedCspTable( 
+            TDes8& aChangedCsps,
+            TDes8& aNewValues );
+
+
+    public: // Functions from base classes
+
+		/**
+        * @see MSatRefreshObserver::AllowRefresh
+        */
+        TBool AllowRefresh(
+            TSatRefreshType aType,
+            const TSatRefreshFiles& aFiles );
+
+		/**
+        * @see MSatRefreshObserver::Refresh
+        */
+		void Refresh(
+            TSatRefreshType aType,
+            const TSatRefreshFiles& aFiles );
+            
+    public: // From base class MSSSettingsPubSubNotify
+        /**
+        * @see MSSSettingsPubSubNotify
+        */
+        void HandlePubSubNotify(
+            const TUid aUid,
+            const TUint32 aKeyId );
+
+
+    private:
+
+        /**
+        * C++ default constructor.
+        */
+        CSSSettingsRefreshHandler();
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void ConstructL();
+
+        /**
+        * Common function for AllowRefresh and Refresh.
+        * 
+        * @param atype Refresh Type.
+        * @param aFiles Refresh Files.
+        * @param aFunctionality The functionality wanted.
+        * @return Result of functionality.
+        */
+        TBool DoHandleRefresh(
+            TSatRefreshType aType,
+            const TSatRefreshFiles& aFiles,
+            const TSSSettingsRefreshFunction aFunctionality );
+
+    private:    // Data
+         
+        // Container for notify observer.
+        CSSSettingsNotifyInfo*        iNotifyInfo;
+
+        // The RSSSettings handle.
+        RSSSettings                   iRSSSettings;
+
+        // The RCustomerServiceProfileCache handle.
+        RCustomerServiceProfileCache  iRCspCache;
+
+        // The RSatRefresh handle.
+        RSatRefresh*                  iRSatRefresh;
+
+        // The RSatSession handle.
+        RSatSession                   iRSatSession;
+        
+        // Notifier for BT SAP support.
+        CSSSettingsActiveObject*      iBtSapNotifier;
+
+    };
+
+#endif      // CSSSETTINGSREFRESHHANDLER_H  
+            
+// End of File