alwayson_net_plugin/pdpcontextmanager2/inc/caoraumanagerimpl.h
changeset 0 5a93021fdf25
equal deleted inserted replaced
-1:000000000000 0:5a93021fdf25
       
     1 /*
       
     2 * Copyright (c) 2004,2006 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:  RAU manager implementation
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_CAORAUMANAGERIMPL_H
       
    20 #define C_CAORAUMANAGERIMPL_H
       
    21 
       
    22 // INCLUDE FILES
       
    23 #include <e32base.h>
       
    24 
       
    25 #include "alwaysonconfig.hrh"
       
    26 
       
    27 #ifdef __ALWAYS_ON_CUSTOM_API
       
    28 #include <RMmCustomAPI.h>
       
    29 #endif // __ALWAYS_ON_CUSTOM_API
       
    30 
       
    31 // FORWARD DECLARATIONS
       
    32 class MAORAUManagerObserver;
       
    33 
       
    34 /**
       
    35 *  RAU manager implementation.
       
    36 *  @see CAORAUManager
       
    37 *
       
    38 *  @lib PDPContextManager2.lib
       
    39 *  @since S60 v3.1
       
    40 */
       
    41 NONSHARABLE_CLASS( CAORAUManagerImpl ): public CActive
       
    42     {
       
    43 public: // Constructors & destructors
       
    44 
       
    45 #ifdef __ALWAYS_ON_CUSTOM_API
       
    46 
       
    47     /**
       
    48      * Two-phased constructor.
       
    49      *
       
    50      * @since S60 v3.1
       
    51      * @param aObserver  Interface via receive notifications from RAU.
       
    52      * @param aCustomAPI Object via send notifications to TSY.
       
    53      * @return a pointer to the created instance of CAORAUManagerImpl.
       
    54      */
       
    55     static CAORAUManagerImpl* NewL( MAORAUManagerObserver& aObserver,
       
    56                                     RMmCustomAPI& aCustomAPI );
       
    57 #else
       
    58  
       
    59     /**
       
    60      * Two-phased constructor.
       
    61      *
       
    62      * @since S60 v3.1
       
    63      * @param aObserver  Interface via receive notifications from RAU.
       
    64      * @return a pointer to the created instance of CAORAUManagerImpl.
       
    65      */
       
    66    static CAORAUManagerImpl* NewL( MAORAUManagerObserver& aObserver );
       
    67 
       
    68 #endif // __ALWAYS_ON_CUSTOM_API
       
    69 
       
    70     /**
       
    71      * Destructor
       
    72      *
       
    73      * @since S60 v3.1
       
    74      */
       
    75     virtual ~CAORAUManagerImpl();
       
    76     
       
    77 private: // New methods
       
    78 
       
    79 #ifdef __ALWAYS_ON_CUSTOM_API
       
    80 
       
    81     /**
       
    82      * Constructor.
       
    83      *
       
    84      * @since S60 v3.1
       
    85      * @param aObserver  Interface via receive notifications from RAU.
       
    86      * @param aCustomAPI Object via send notifications to TSY.
       
    87      */
       
    88     CAORAUManagerImpl( MAORAUManagerObserver& aObserver,
       
    89                        RMmCustomAPI& aCustomAPI );
       
    90 #else
       
    91 
       
    92     /**
       
    93      * Constructor.
       
    94      *
       
    95      * @since S60 v3.1
       
    96      * @param aObserver  Interface via receive notifications from RAU.
       
    97      */
       
    98     CAORAUManagerImpl( MAORAUManagerObserver& aObserver );
       
    99 
       
   100 #endif // __ALWAYS_ON_CUSTOM_API
       
   101 
       
   102     /**
       
   103      * Symbian 2nd-phase constructor.
       
   104      *
       
   105      * @since S60 v3.1
       
   106      */
       
   107     void ConstructL();
       
   108     
       
   109 private: // New methods
       
   110 
       
   111     //
       
   112     void IssueRAUNotifications();
       
   113 
       
   114 private: // From base class CActive
       
   115 
       
   116     /**
       
   117      * From CActive
       
   118      * Process the completed request.
       
   119      *
       
   120      * @since S60 v3.1
       
   121      */
       
   122     void RunL();
       
   123     
       
   124     /**
       
   125      * From CActive
       
   126      * Cancel outstanding request
       
   127      *
       
   128      * @since S60 v3.1
       
   129      */
       
   130     void DoCancel();
       
   131     
       
   132     /**
       
   133      * From CActive
       
   134      * Handle a leave occurred in the RunL().
       
   135      * Note: If RunError function pointer is not given in construction,
       
   136      * the leave error is to be propagated back to the active scheduler!
       
   137      *
       
   138      * @since S60 v3.1
       
   139      * @param aError the error code of leave
       
   140      */
       
   141     TInt RunError( TInt aError );
       
   142     
       
   143 private: // Data
       
   144 
       
   145     /**
       
   146      * Ref: RAU manager observer
       
   147      */
       
   148     MAORAUManagerObserver& iObserver;
       
   149     
       
   150 #ifdef __ALWAYS_ON_CUSTOM_API
       
   151     
       
   152     /** 
       
   153      * Ref: Custom API
       
   154      */
       
   155     RMmCustomAPI& iCustomAPI;
       
   156     
       
   157     /**
       
   158      * RAU status
       
   159      */
       
   160     RMmCustomAPI::TRauEventStatus iRAUStatus;
       
   161     
       
   162 #endif // __ALWAYS_ON_CUSTOM_API
       
   163     };
       
   164 
       
   165 #endif // C_CAORAUMANAGERIMPL_H