networkhandling/networkhandlingengine/NetworkHandlingGsmInc/CNWGsmNetworkCellReselectionHandler.h
changeset 0 ff3b6d0fd310
child 19 7d48bed6ce0c
equal deleted inserted replaced
-1:000000000000 0:ff3b6d0fd310
       
     1 /*
       
     2 * Copyright (c) 2002-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:  Header class for CNWGsmNetworkCellReselectionHandler.cpp
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CNWGSMNETWORKCELLRESELECTIONHANDLER_H
       
    21 #define CNWGSMNETWORKCELLRESELECTIONHANDLER_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include "NWHandlingEngine.h"
       
    25 #include <rmmcustomapi.h>
       
    26 #include <CMcn.h>
       
    27 #include <e32property.h>
       
    28 
       
    29 // CONSTANTS
       
    30 //For SharedData
       
    31 const TInt KNWCbsNotStarted = 0;
       
    32 const TInt KNWCbsStarted    = 1;
       
    33 
       
    34 
       
    35 // FORWARD DECLARATIONS
       
    36 class CNWNetworkViagBaseEngine;
       
    37 class CNWNetworkMcnEngine;
       
    38 class RMobilePhone;
       
    39 class RMmCustomAPI;
       
    40 class CNWGsmMessageHandler;
       
    41 class CMcn;
       
    42 
       
    43 
       
    44 // CLASS DECLARATION
       
    45 
       
    46 /**
       
    47 *  This file contains the header file of the class 
       
    48 *  CNWGsmNetworkCellReselectionHandler, 
       
    49 *  Handles cell reselection events
       
    50 *
       
    51 *  @lib Networkhandling.lib
       
    52 *  @since -
       
    53 */
       
    54 class CNWGsmNetworkCellReselectionHandler : public CActive
       
    55     {
       
    56     public:  // Constructors and destructor
       
    57        
       
    58         /**
       
    59         * Two-phased constructor.
       
    60         */
       
    61         static CNWGsmNetworkCellReselectionHandler* NewL( 
       
    62                     CNWGsmMessageHandler& aOwner,
       
    63                     RMobilePhone& aPhone, 
       
    64                     TNWInfo& aNetworkInfo, 
       
    65                     RMmCustomAPI& aCustomAPI,
       
    66                     TNWInterInfo& aInterNetworkInfo );
       
    67 
       
    68         /**
       
    69         * Destructor.
       
    70         */
       
    71         virtual ~CNWGsmNetworkCellReselectionHandler();
       
    72 
       
    73     public:        
       
    74         /**
       
    75         * Calls appropriate engines to handle cell reselection 
       
    76         */
       
    77         void HandleCellReselection( );
       
    78 
       
    79         /**
       
    80         * Returns pointer to CMcn object.
       
    81         * @return Ptr to CMcn object.
       
    82         */
       
    83         CMcn* GetMcnPtr();
       
    84 
       
    85         /**
       
    86         * Calls notify request from Publish and Subscribe
       
    87         */
       
    88         void NotifyCbsServerStateChanged();
       
    89         
       
    90         /**
       
    91         * Updates Operator Name reading status
       
    92         */
       
    93         void UpdateReadingStatus( const TNWRead& aElementFile, 
       
    94                 TBool aReadStatus );
       
    95         
       
    96     protected:  // Functions from CActive
       
    97 
       
    98         /**
       
    99         * Cancels asyncronous request(s).
       
   100         */
       
   101         void DoCancel();
       
   102 
       
   103         /**
       
   104         * Informs object that asyncronous request is ready.
       
   105         */
       
   106         void RunL();
       
   107 
       
   108         /**
       
   109         * Function to handle error during running the operation
       
   110         * @return KErrNone, when error has been handled
       
   111         */
       
   112         virtual TInt RunError( TInt aError );
       
   113         
       
   114     public: // Functions from MSharedDataNotifyHandler 
       
   115 
       
   116 
       
   117     private:
       
   118 
       
   119         /**
       
   120         * By default EPOC constructor is private.
       
   121         */
       
   122         void ConstructL();
       
   123 
       
   124         /**
       
   125         * C++ default constructor.
       
   126         */
       
   127         CNWGsmNetworkCellReselectionHandler( 
       
   128                         CNWGsmMessageHandler& aOwner,
       
   129                         RMobilePhone& aPhone,
       
   130                         TNWInfo& aNetworkInfo,
       
   131                         RMmCustomAPI& aCustomAPI,
       
   132                         TNWInterInfo& aInterNetworkInfo );
       
   133 
       
   134 
       
   135     private:    // Data
       
   136         // Ptr to CNWNetworkViagEngine object
       
   137       	CNWNetworkViagBaseEngine* iViagEngine;
       
   138         // Ptr to CNWNetworkMCNEngine object
       
   139         CNWNetworkMcnEngine* iMcnEngine;
       
   140         // CNWGsmSessionImplementation object that owns this object
       
   141         CNWGsmMessageHandler& iOwner;
       
   142         // Reference to the MMETel phone connection
       
   143         RMobilePhone& iPhone;
       
   144         // Reference to home network info struct
       
   145         TNWInfo& iNWNetworkInfo;
       
   146         // Reference to the Custom API connection
       
   147         RMmCustomAPI& iCustomAPI;
       
   148         // Reference to the internal network info structure.
       
   149         TNWInterInfo&     iInterNetworkInfo;
       
   150         //Mcn object for CBS messages
       
   151         CMcn* iMcn;
       
   152         //Indicating for CSB Server state
       
   153         TBool iMcnState;
       
   154         // The interface to Publish And Subscribe.
       
   155         RProperty               iProperty;
       
   156 
       
   157     };
       
   158 
       
   159 #endif      // CNWGSMNETWORKCELLRESELECTIONHANDLER_H  
       
   160             
       
   161 // End of File