wvuing/IMPSConnectionUI/NotifySrc/CIMPSConnUiPresEventNotifierImp.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:  Event notifier implementation.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __CIMPSCONNUIPRESEVENTNOTIFIERIMP_H
       
    19 #define __CIMPSCONNUIPRESEVENTNOTIFIERIMP_H
       
    20 
       
    21 
       
    22 //  INCLUDES
       
    23 #include <E32Base.h>
       
    24 #include "CIMPSConnUiPresEventNotifierImpBase.h"
       
    25 #include <MPEngNWSessionSlotObserver2.h>
       
    26 
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 class MIMPSEventNotifierObserver;
       
    30 class CPEngNWSessionSlotID2;
       
    31 
       
    32 // CLASS DECLARATION
       
    33 /**
       
    34  * CIMPSConnUiPresEventNotifierImp.
       
    35  * Implements the CIMPSConnUiPresEventNotifier
       
    36  * features. Uses CIMPSConnUiPresEventNotifierImpBase
       
    37  * services in implementation.
       
    38  *
       
    39  * @since 2.1
       
    40  */
       
    41 NONSHARABLE_CLASS( CIMPSConnUiPresEventNotifierImp ) : public CIMPSConnUiPresEventNotifierImpBase,
       
    42         public MPEngNWSessionSlotObserver2
       
    43     {
       
    44 public:  // Two-phased constructor and destructor
       
    45 
       
    46 
       
    47     /**
       
    48      * Two-phased constructor.
       
    49      * Takes a pointer reference to implemented interface.
       
    50      * This interface is given to notified observers.
       
    51      *
       
    52      * @param aInterface The implemented interface.
       
    53      * No ownership taken.
       
    54      */
       
    55     static CIMPSConnUiPresEventNotifierImp* NewL( CIMPSConnUiPresEventNotifier& aInterface );
       
    56 
       
    57 
       
    58     /**
       
    59      * Destructor.
       
    60      */
       
    61     ~CIMPSConnUiPresEventNotifierImp();
       
    62 
       
    63 private:
       
    64 
       
    65     /**
       
    66      * C++ constructor.
       
    67      */
       
    68     CIMPSConnUiPresEventNotifierImp( CIMPSConnUiPresEventNotifier& aInterface );
       
    69 
       
    70     /**
       
    71      * Symbian OS constructor.
       
    72      */
       
    73     void ConstructL();
       
    74 
       
    75 
       
    76 public:  // Methods from CIMPSConnUiPresEventNotifierImpBase
       
    77 
       
    78 
       
    79     /**
       
    80      * Implements start notifying as described
       
    81      * in CIMPSConnUiPresEventNotifier.
       
    82      * @see CIMPSConnUiPresEventNotifier
       
    83      * @since 2.1
       
    84      * @param aEvents Events to request.
       
    85      */
       
    86     void DoStartL( const TArray<TPEngNWSessionSlotEvent>& aEvents );
       
    87 
       
    88 
       
    89     /**
       
    90      * Implements stop notifying as described
       
    91      * in CIMPSConnUiPresEventNotifier.
       
    92      * @see CIMPSConnUiPresEventNotifier
       
    93      * @since 2.1
       
    94      */
       
    95     void DoStop();
       
    96 
       
    97 
       
    98     /**
       
    99      * Implements service status get as described
       
   100      * in CIMPSConnUiPresEventNotifier.
       
   101      * @see CIMPSConnUiPresEventNotifier
       
   102      * @since 2.1
       
   103      */
       
   104     const CPEngNWSessionSlotID2* AppServiceStatusL( TIMPSConnectionClient aClient );
       
   105 
       
   106 
       
   107 
       
   108 public:  // Methods from MPEngEventNotifierObserver
       
   109 
       
   110     /**
       
   111      * From MPEngEventNotifierObserver.
       
   112      * Converts event to application enumeration and
       
   113      * forwards it to observers.
       
   114      *
       
   115      * @since 3.0
       
   116      */
       
   117     void HandleNWSessionSlotChangeL(
       
   118         CPEngNWSessionSlotNotifier2& aNotifier,
       
   119         CPEngNWSessionSlotEvent2& aEvent );
       
   120 
       
   121     /**
       
   122      * From MPEngEventNotifierObserver.
       
   123      *
       
   124      * Forwards error to observers.
       
   125      *
       
   126      * @since 3.0
       
   127      */
       
   128     void HandleNWSessionSlotError(
       
   129         TInt aError,
       
   130         CPEngNWSessionSlotNotifier2& aNotifier );
       
   131 
       
   132 private: //  New helper methods
       
   133 
       
   134     /**
       
   135     * Calls ResetAndDestroy to given array
       
   136     * @since 3.0
       
   137     * @param aObject Array (RPointerArray<CPEngNWSessionSlotID2>)
       
   138     */
       
   139     static void DestroyCloseModelArray( TAny* aObject );
       
   140 
       
   141 private: //Data
       
   142 
       
   143     ///< PEC Engine event notifier, owned
       
   144     CPEngNWSessionSlotNotifier2*    iEventNotifier;
       
   145     CPEngNWSessionSlotID2*          iSessionSlotID;
       
   146 
       
   147     };
       
   148 
       
   149 #endif      //__CIMPSCONNUIPRESEVENTNOTIFIERIMP_H
       
   150 //  End of File
       
   151 
       
   152