wvuing/IMPSConnectionUI/OperationStepSrc/CCnUiConnModeRewaker.h
changeset 0 094583676ce7
equal deleted inserted replaced
-1:000000000000 0:094583676ce7
       
     1 /*
       
     2 * Copyright (c) 2004 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:  Connection mode re-waker.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __CCNUICONNMODEREWAKER_H
       
    19 #define __CCNUICONNMODEREWAKER_H
       
    20 
       
    21 //  INCLUDES
       
    22 #include <E32Base.h>
       
    23 #include <impspresenceconnectionuiconstsng.h>
       
    24 #include "MCnUiConnModeRewaker.h"
       
    25 
       
    26 
       
    27 
       
    28 //FORWARD DECLARATION
       
    29 class MCnUiClientPlugin;
       
    30 class CPEngNWSessionSlotID2;
       
    31 
       
    32 // CLASS DECLARATION
       
    33 /**
       
    34  * Connection mode re-waker.
       
    35  * Re-wakes given client plug-ins.
       
    36  *
       
    37  * @since 2.1
       
    38  */
       
    39 NONSHARABLE_CLASS( CCnUiConnModeRewaker ) : public CTimer,
       
    40         public MCnUiConnModeRewaker
       
    41     {
       
    42 public:  // Two-phased constructors and destructor
       
    43 
       
    44     /**
       
    45      * Two-phased constructor.
       
    46      */
       
    47     static CCnUiConnModeRewaker* NewL();
       
    48 
       
    49 
       
    50     /**
       
    51      * Destructor.
       
    52      */
       
    53     virtual ~CCnUiConnModeRewaker();
       
    54 
       
    55 
       
    56 private:
       
    57 
       
    58     /**
       
    59      * C++ constructor.
       
    60      */
       
    61     CCnUiConnModeRewaker();
       
    62 
       
    63 
       
    64     /**
       
    65      * Symbian OS constructor.
       
    66      */
       
    67     void ConstructL();
       
    68 
       
    69 
       
    70 
       
    71 public: // Functions from MCnUiConnModeRewaker
       
    72 
       
    73 
       
    74     /**
       
    75      * From MCnUiConnModeRewaker.
       
    76      * @see MCnUiConnModeRewaker.
       
    77      * @since 2.1
       
    78      */
       
    79     void AddToAAModeRewakeListL( MCnUiClientPlugin& aClientPlugin,
       
    80                                  CPEngNWSessionSlotID2& aNWSessionSlotID );
       
    81 
       
    82 
       
    83     /**
       
    84      * From MCnUiConnModeRewaker.
       
    85      * @see MCnUiConnModeRewaker.
       
    86      * @since 2.1
       
    87      */
       
    88     void GetAARewakeListL( RArray< TIMPSConnectionClient >& aAARewakedClients );
       
    89 
       
    90 
       
    91     /**
       
    92      * From MCnUiConnModeRewaker.
       
    93      * @see MCnUiConnModeRewaker.
       
    94      * @since 2.1
       
    95      */
       
    96     void ClearAARewakeList();
       
    97 
       
    98 
       
    99     /**
       
   100      * From MCnUiConnModeRewaker.
       
   101      * @see MCnUiConnModeRewaker.
       
   102      * @since 2.1
       
   103      */
       
   104     void RemoveFromAARewakeList( TIMPSConnectionClient aClient );
       
   105 
       
   106 
       
   107 public: // New functions
       
   108 
       
   109     /**
       
   110      * Suspends the existing rewake operation.
       
   111      *
       
   112      * Suspended rewake is resumed automaticly when the
       
   113      * suspend is PopAndDestroy():ed from the CleanupStack.
       
   114      * Note! PopAndDestroy() must be used!!
       
   115      *
       
   116      * While the rewaker is suspended, the rewake list contents
       
   117      * can be changed trough MCnUiConnModeRewaker methods.
       
   118      * The list changes are taken into account when rewaker
       
   119      * is resumed again.
       
   120      *
       
   121      * @since 2.1
       
   122      */
       
   123     void SuspendLC();
       
   124 
       
   125 
       
   126     /**
       
   127      * Resumes the suspended rewaker.
       
   128      *
       
   129      * This is issued automaticly through
       
   130      * the CleanupStack after using the SuspendLC();
       
   131      *
       
   132      * @since 2.1
       
   133      */
       
   134     void ResumeRewake();
       
   135 
       
   136 
       
   137 protected: // Functions from CTimer
       
   138 
       
   139 
       
   140     /**
       
   141      * RunL().
       
   142      */
       
   143     void RunL();
       
   144 
       
   145 
       
   146     /**
       
   147      * RunError().
       
   148      *
       
   149      * @since 2.1
       
   150      * @param aError The leave code from RunL leave.
       
   151      * Stores this as iStatus member.
       
   152      * @return Always KErrNone.
       
   153      */
       
   154     TInt RunError( TInt aError );
       
   155 
       
   156 
       
   157 
       
   158 private: // New functions
       
   159 
       
   160 
       
   161     /**
       
   162      * Rewakes all registered clients.
       
   163      *
       
   164      * @since 2.1
       
   165      */
       
   166     void RewakeRegisteredClientsL();
       
   167 
       
   168 
       
   169     /**
       
   170      * Checks is the client already
       
   171      * registered or not.
       
   172      *
       
   173      * @since 2.1
       
   174      * @param aClient The Client to check.
       
   175      * @return ETrue if the client is already registered for
       
   176      * rewake. Else EFalse.
       
   177      */
       
   178     TBool ClientAlreadyReqistered( TIMPSConnectionClient aClient );
       
   179 
       
   180 
       
   181 private: // data
       
   182 
       
   183     ///<Clients to re-wake. owned
       
   184     RPointerArray< MCnUiClientPlugin >       iAAClntsToRewake;
       
   185 
       
   186     };
       
   187 
       
   188 #endif      //  __CCNUICONNMODEREWAKER_H
       
   189 
       
   190 //  End of File
       
   191