mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mcesessionobserver.h
branchRCL_3
changeset 33 bc78a40cd63c
parent 32 73a1feb507fb
child 35 6c57ef9392d2
equal deleted inserted replaced
32:73a1feb507fb 33:bc78a40cd63c
     1 /*
       
     2 * Copyright (c) 2005 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:  
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MMCESESSIONOBSERVER_H
       
    20 #define MMCESESSIONOBSERVER_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32std.h>  
       
    24 
       
    25 // FORWARD DECLARATIONS
       
    26 class CMceSession;
       
    27 class TMceTransactionDataContainer;
       
    28 
       
    29 // CLASS DECLARATION
       
    30 
       
    31 /**
       
    32 *  An interface to be implemented by users of MCE if they wish to use
       
    33 *  sessions.
       
    34 *
       
    35 *  This observer is set using CMceManager::SetSessionObserver function.
       
    36 *
       
    37 *  @lib mceclient.lib
       
    38 */
       
    39 class MMceSessionObserver
       
    40 	{
       
    41 	public: // Session control callbacks
       
    42 
       
    43 	    /**
       
    44 	    * The state of the session has changed.
       
    45 	    * @param aSession, the session that has changed.
       
    46 	    * @param aContainer, if present, holds details of
       
    47 	    *        transaction causing state change.
       
    48 	    */
       
    49 	    virtual void SessionStateChanged(
       
    50 	    			CMceSession& aSession,
       
    51 	    			TMceTransactionDataContainer* aContainer ) = 0;
       
    52 
       
    53 	    /**
       
    54 	    * The state of the connection used by the session has changed.
       
    55 	    * @param aSession, the session that has changed.
       
    56 	    * @param aActive, ETrue if connection active, EFalse if connection inactive.
       
    57 	    */
       
    58 	    virtual void SessionConnectionStateChanged(
       
    59 	                CMceSession& aSession,
       
    60 	                TBool aActive ) = 0;
       
    61 	    
       
    62 	    /**
       
    63 	    * An error has occurred concerning a specific session.
       
    64 	    * Note, that each error causes the session state to be ETerminated.
       
    65 	    * @param aSession, The session raising the error.
       
    66 	    * @param aError, Error code
       
    67 	    */
       
    68 		virtual void Failed( CMceSession& aSession, TInt aError ) = 0;
       
    69 
       
    70 		/**
       
    71 	    * An session update has been failed concerning a specific session.
       
    72 	    * Note, that each error causes the session state to be ETerminated.
       
    73 	    * @param aSession, The session raising the error.
       
    74 	    * @param aContainer, if present, holds details of
       
    75 	    *        transaction causing update.
       
    76 	    */
       
    77 		virtual void UpdateFailed(
       
    78 	    			CMceSession& aSession,
       
    79 	    			TMceTransactionDataContainer* aContainer ) = 0;
       
    80 	};
       
    81 
       
    82 #endif