locationmanager/server/inc/nwregistrationstatushandler.h
branchRCL_3
changeset 63 e538444823de
parent 57 2872ae438bf7
equal deleted inserted replaced
57:2872ae438bf7 63:e538444823de
     1 /*
       
     2 * Copyright (c) 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: Helper class to retrieve UE network registration status
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __NW_REGISTRATION_STATUS_HANDLER_H__
       
    19 #define __NW_REGISTRATION_STATUS_HANDLER_H__
       
    20 
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32std.h>
       
    24 #include <e32base.h>
       
    25 #include <etelmm.h>
       
    26 
       
    27 NONSHARABLE_CLASS(CNwRegistrationStatusHandler) : public CActive
       
    28 {
       
    29     
       
    30 public:
       
    31 
       
    32 	/**
       
    33 	  * 1st phase constructor
       
    34 	  * @param aMobilePhone an instance of the RMobilePhone to get the current network
       
    35 	  */
       
    36      static CNwRegistrationStatusHandler* NewL(RMobilePhone& aMobilePhone); 
       
    37 
       
    38 	/**
       
    39 	  * destructor
       
    40 	  */	
       
    41      ~CNwRegistrationStatusHandler();
       
    42 
       
    43 	/**
       
    44 	  * Register for getting the n/w registration change notification
       
    45 	  * starts notifying the current network changes
       
    46 	  */	
       
    47      void StartNotifier();
       
    48 
       
    49 	 /**
       
    50 	   * Retrieve network registration status
       
    51 	   * @return the mobilephone reg status
       
    52 	   */
       
    53 
       
    54      RMobilePhone::TMobilePhoneRegistrationStatus GetNetworkRegistrationStatus() const;
       
    55      
       
    56 protected:
       
    57 
       
    58 	/**
       
    59 	  * RunL
       
    60 	  * from CActive
       
    61 	  */	
       
    62       void RunL();
       
    63 
       
    64 	/**
       
    65 	  * DoCancel
       
    66 	  * from CActive
       
    67 	  */	
       
    68       void DoCancel();
       
    69  private:
       
    70 
       
    71 	/**
       
    72 	  * Second phase construction
       
    73 	  */	
       
    74       void ConstructL();
       
    75       CNwRegistrationStatusHandler(RMobilePhone& aMobilePhone);
       
    76       
       
    77 
       
    78 
       
    79 private:     
       
    80     typedef enum 
       
    81         {
       
    82         ERegStatusOptStateNone = 0x00,
       
    83         ERegStatusOptStateGet,
       
    84         ERegStatusOptStateNotify
       
    85         }TRegStatusOptState;
       
    86     
       
    87 	 /**
       
    88 	   * An instance of the RMobilePhone to get the current network
       
    89 	   */
       
    90       RMobilePhone& iMobilePhone;
       
    91 
       
    92 	  /**
       
    93 	     * Indicates the network registration status
       
    94 	     */
       
    95       RMobilePhone::TMobilePhoneRegistrationStatus iRegistrationStatus;
       
    96       TRegStatusOptState iState;
       
    97 };
       
    98 
       
    99 
       
   100 #endif /*__NW_REGISTRATION_STATUS_HANDLER_H__*/
       
   101 
       
   102 // End of file
       
   103