networkhandling/networkhandlingengine/NetworkHandlingInc/cnwnetworkselectionsettingmonitor.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:  This file contains the header file of 
       
    15 *                the CNWNetworkSelectionSettingMonitor class.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef CNWNETWORKSELECTIONSETTINGMONITOR_H
       
    21 #define CNWNETWORKSELECTIONSETTINGMONITOR_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include "CNWNetworkMonitorBase.h"
       
    25 #include "NetworkHandlingDomainPSKeys.h"
       
    26 #include <e32property.h>
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 class CNWMessageHandler;
       
    30 class RMobilePhone;
       
    31 
       
    32 // CLASS DECLARATION
       
    33 
       
    34 /**
       
    35 *  Monitors network selection setting change event from MMEtel and offers API 
       
    36 *  to query mode information.
       
    37 *  
       
    38 *
       
    39 *  @lib networkhandling.lib
       
    40 *  @since S60_5.0
       
    41 */
       
    42 class CNWNetworkSelectionSettingMonitor : public CNWNetworkMonitorBase
       
    43     {
       
    44     public:  // Constructors and destructor
       
    45        
       
    46        /**
       
    47         * Two-phased constructor.
       
    48         */
       
    49         static CNWNetworkSelectionSettingMonitor* 
       
    50                                 NewL( CNWMessageHandler& aOwner,
       
    51                                            RMobilePhone& aPhone, 
       
    52                                            TNWInfo& aNetworkInfo, // ref. to network info struct 
       
    53                                            RMmCustomAPI& aCustomAPI  );
       
    54         
       
    55         /**
       
    56         * Destructor.
       
    57         */
       
    58         virtual ~CNWNetworkSelectionSettingMonitor();
       
    59         
       
    60         
       
    61     protected:  // Functions from CActive
       
    62 
       
    63         /**
       
    64         * Cancels asyncronous request(s).
       
    65         */
       
    66         void DoCancel();
       
    67 
       
    68         /**
       
    69         * Informs object that asyncronous request is ready.
       
    70         */
       
    71         void RunL();
       
    72 
       
    73         /**
       
    74         * Function to handle error during running the operation
       
    75         * @return KErrNone, when error has been handled
       
    76         */
       
    77         virtual TInt RunError( TInt aError );
       
    78 
       
    79     private:
       
    80 
       
    81         /**
       
    82         * Executes the NotifyNetworkSelectionSettingChange function.
       
    83         */
       
    84         void IssueRequest();
       
    85 
       
    86          /**
       
    87         * Updates network selection setting in TNWInfo Struct.
       
    88         */
       
    89         void UpdateNetworkSelectionSetting();
       
    90 
       
    91     
       
    92     private:
       
    93     
       
    94         /**
       
    95         * C++ default constructor.
       
    96         */
       
    97         CNWNetworkSelectionSettingMonitor( CNWMessageHandler& aOwner,
       
    98                                RMobilePhone& aPhone,
       
    99                                TNWInfo& aNetworkInfo, // ref.to network info struct 
       
   100                                RMmCustomAPI& aCustomAPI   );
       
   101     
       
   102        
       
   103     private:    // Data
       
   104         // Network info.
       
   105         RMobilePhone::TMobilePhoneNetworkSelectionV1  iNetworkSelection;
       
   106         // Network info package.
       
   107         RMobilePhone::TMobilePhoneNetworkSelectionV1Pckg iNetworkSelectionPckg;
       
   108          
       
   109     };
       
   110 
       
   111 #endif      // CNWNetworkSelectionSettingMonitor_H  
       
   112             
       
   113 // End of File