wvuing/IMPSConnectionUI/ConnectionSrc/CIMPSPresenceAAConnectionImp.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:  AA connection implementation.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __CIMPSPRESENCEAACONNECTIONIMP_H
       
    19 #define __CIMPSPRESENCEAACONNECTIONIMP_H
       
    20 
       
    21 //  INCLUDES
       
    22 #include <E32Base.h>
       
    23 #include <PEngPresenceEngineConsts2.h>
       
    24 #include <impspresenceconnectionuiconstsng.h>
       
    25 
       
    26 #include "CCnUiSapStoreProxy.h"
       
    27 
       
    28 
       
    29 
       
    30 // FORWARD DECLARATIONS
       
    31 class CIMPSSAPSettingsStore;
       
    32 class CIMPSSAPSettings;
       
    33 class MCnUiConnectionHandler;
       
    34 class CPEngNWSessionSlotID2;
       
    35 
       
    36 // CLASS DECLARATION
       
    37 /**
       
    38  * CIMPSPresenceAAConnectionImp.
       
    39  * Implements the CIMPSPresenceAAConnection
       
    40  * features.
       
    41  *
       
    42  * @since 2.1
       
    43  */
       
    44 NONSHARABLE_CLASS( CIMPSPresenceAAConnectionImp ) : public CBase
       
    45     {
       
    46 public:  // Two-phased constructors and destructor
       
    47 
       
    48     /**
       
    49      * Two-phased constructor.
       
    50      *
       
    51      * @param aSapStore The SAP settings store to use.
       
    52      * May be NULL.
       
    53      */
       
    54     static CIMPSPresenceAAConnectionImp* NewL( CIMPSSAPSettingsStore* aSapStore );
       
    55 
       
    56 
       
    57     /**
       
    58      * Destructor.
       
    59      */
       
    60     ~CIMPSPresenceAAConnectionImp();
       
    61 
       
    62 private:
       
    63 
       
    64     /**
       
    65      * C++ constructor.
       
    66      */
       
    67     CIMPSPresenceAAConnectionImp( CIMPSSAPSettingsStore* aSapStore );
       
    68 
       
    69 
       
    70     /**
       
    71      * Symbian OS constructor.
       
    72      */
       
    73     void ConstructL();
       
    74 
       
    75 
       
    76 public:  // Connection methods for CIMPSPresenceAAConnection
       
    77 
       
    78     /**
       
    79      * Implements login as described in CIMPSPresenceAAConnection.
       
    80      * @see CIMPSPresenceAAConnection
       
    81      * @since 2.1
       
    82      */
       
    83     TInt LoginL( TIMPSConnectionClient aClient,
       
    84                  TBool aShowDetailedError = EFalse );
       
    85 
       
    86 
       
    87     /**
       
    88      * Implements logout as described in CIMPSPresenceAAConnection.
       
    89      * @see CIMPSPresenceAAConnection
       
    90      * @since 2.1
       
    91      */
       
    92     TInt LogoutL( TIMPSConnectionClient aClient,
       
    93                   TBool aIsScheduled = EFalse );
       
    94 
       
    95 
       
    96     /**
       
    97       * Implements loging state checking as described in
       
    98       * CIMPSPresenceAAConnection.
       
    99       * @see CIMPSPresenceAAConnection
       
   100       * @since 2.1
       
   101       */
       
   102     TBool LoggedInL( TIMPSConnectionClient aClient );
       
   103 
       
   104 
       
   105     /**
       
   106      * Implements pure connection status get from Presence
       
   107      * Engine as described in CIMPSPresenceAAConnection.
       
   108      *
       
   109      * @see CIMPSPresenceAAConnection
       
   110      * @since 2.1
       
   111      */
       
   112     TPEngNWSessionSlotState PureServiceStatusL(
       
   113         const CPEngNWSessionSlotID2& aNWSessionSlotID );
       
   114 
       
   115 
       
   116     /**
       
   117      * Implements the default server name get from SAP
       
   118      * settings store as described in CIMPSPresenceAAConnection.
       
   119      * !!!Note!!! Ownership is transferred to the caller!
       
   120      *
       
   121      * @see CIMPSPresenceAAConnection
       
   122      * @since 2.6
       
   123      */
       
   124     HBufC* DefaultServerNameL( TIMPSConnectionClient aClient );
       
   125 
       
   126     /**
       
   127      * Implements the fetching of active NWSessionSlotID as described in
       
   128      * CIMPSPresenceConnectionUi.
       
   129      * @see CIMPSPresenceConnectionUi
       
   130      * @since 3.0
       
   131      */
       
   132     CPEngNWSessionSlotID2* GetActiveNWSessionSlotIDL( TIMPSConnectionClient aClient );
       
   133 
       
   134 private: // New helper methods
       
   135 
       
   136     /**
       
   137     * Calls ResetAndDestroy to given array
       
   138     * @since 3.0
       
   139     * @param aObject Array (RPointerArray<CPEngNWSessionSlotID2>)
       
   140     */
       
   141     static void DestroyCloseModelArray( TAny* aObject );
       
   142 
       
   143 private: //Data
       
   144 
       
   145     ///<SapStore proxy, owned
       
   146     CCnUiSapStoreProxy              iSapStoreProxy;
       
   147 
       
   148     ///<Connection handler, owned
       
   149     MCnUiConnectionHandler*         iConnHandler;
       
   150 
       
   151     };
       
   152 
       
   153 #endif      //__CIMPSPRESENCEAACONNECTIONIMP_H
       
   154 //  End of File
       
   155 
       
   156