networkhandling/networkhandlingengine/NetworkHandlingInc/CNWNetworkRegistrationStatusReceiver.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 the CNWNetworkRegistrationStatusReceiver class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CNWNETWORKREGISTRATIONSTATUSRECEIVER_H
       
    20 #define CNWNETWORKREGISTRATIONSTATUSRECEIVER_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include "NWHandlingEngine.h"
       
    24 
       
    25 // FORWARD DECLARATIONS
       
    26 class CNWNetworkRegistrationStatusMonitor;
       
    27 class RMobilePhone;
       
    28 
       
    29 // CLASS DECLARATION
       
    30 
       
    31 /**
       
    32 *  Monitors network registration status change event
       
    33 *  from MMEtel and offers API to query that information. 
       
    34 *
       
    35 *  @lib networkhandling.lib
       
    36 *  @since Series 60_2.8
       
    37 */
       
    38 class CNWNetworkRegistrationStatusReceiver : public CActive
       
    39     {
       
    40     public:  // Constructors and destructor
       
    41         
       
    42         /**
       
    43         * Two-phased constructor.
       
    44         */
       
    45         static CNWNetworkRegistrationStatusReceiver* NewL(
       
    46             CNWNetworkRegistrationStatusMonitor& aOwner, 
       
    47             RMobilePhone& aPhone, 
       
    48             RMobilePhone::TMobilePhoneRegistrationStatus& aRegistrationStatus );
       
    49 
       
    50         /**
       
    51         * Destructor.
       
    52         */
       
    53         virtual ~CNWNetworkRegistrationStatusReceiver();
       
    54     public:
       
    55         
       
    56         /**
       
    57         * Executes the NotifyNetworkRegistrationStatusChange function.
       
    58         * 
       
    59         */
       
    60         void IssueRequest();
       
    61 
       
    62     protected:  // Functions from CActive
       
    63         /**
       
    64         * Cancels asyncronous request(s).
       
    65         * 
       
    66         */
       
    67         void DoCancel();
       
    68 
       
    69         /**
       
    70         * Informs object that asyncronous request is ready.
       
    71         * 
       
    72         */
       
    73         void RunL();
       
    74 
       
    75     private:
       
    76     
       
    77         /**
       
    78         * C++ default constructor.
       
    79         */
       
    80         CNWNetworkRegistrationStatusReceiver( 
       
    81             CNWNetworkRegistrationStatusMonitor& aOwner, 
       
    82             RMobilePhone& aPhone, 
       
    83             RMobilePhone::TMobilePhoneRegistrationStatus& iRegistrationStatus
       
    84             );
       
    85             
       
    86         /**
       
    87         * Second-phase constructor.
       
    88         */
       
    89         void ConstructL();                    
       
    90 
       
    91     private:    // Data
       
    92         // Reference to registration status info.
       
    93         CNWNetworkRegistrationStatusMonitor& iOwner;
       
    94         // Reference to RMobilePhone
       
    95         RMobilePhone& iPhone;
       
    96         // Reference to current registration status info.
       
    97         RMobilePhone::TMobilePhoneRegistrationStatus& iRegistrationStatus;
       
    98  
       
    99     };
       
   100 
       
   101 #endif      // CNWNETWORKREGISTRATIONSTATUSRECEIVER_H
       
   102 // End of File