inc/mimpsconnuiconnectionmodeobserverng.h
changeset 0 094583676ce7
equal deleted inserted replaced
-1:000000000000 0:094583676ce7
       
     1 /*
       
     2 * Copyright (c) 2003 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 observer.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __MIMPSCONNUICONNECTIONMODEOBSERVERNG_H
       
    19 #define __MIMPSCONNUICONNECTIONMODEOBSERVERNG_H
       
    20 
       
    21 #include <E32Std.h>
       
    22 #include <impspresenceconnectionuiconstsng.h>
       
    23 
       
    24 
       
    25 //FORWARD DECLARATION
       
    26 class CIMPSConnUiConnectionModeNotifier;
       
    27 
       
    28 
       
    29 /**
       
    30  * Observer interface to get notifcations from
       
    31  * connection mode events.
       
    32  *
       
    33  * @since 2.1
       
    34  */
       
    35 NONSHARABLE_CLASS( MIMPSConnUiConnectionModeObserver )
       
    36     {
       
    37 public: //notify methods
       
    38 
       
    39     /**
       
    40      * Notifies from connection mode event.
       
    41      *
       
    42      * If event handling causes a leave, leave is
       
    43      * reported back to HandleConnectionModeEventNotifyError()
       
    44      * callback.
       
    45      *
       
    46      * @since 2.1
       
    47      * @param aNotifier The connection mode notifier where this
       
    48      * event is coming from.
       
    49      * @param aEvent The connection mode event.
       
    50      */
       
    51     virtual void HandleConnectionModeEventL( CIMPSConnUiConnectionModeNotifier* aNotifier,
       
    52                                              TIMPSConnectionModeEvent aEvent ) = 0;
       
    53 
       
    54 
       
    55     /**
       
    56      * Called when connection mode event listening or event
       
    57      * handling fails.
       
    58      *
       
    59      * Here is reported both errors from handling the
       
    60      * actual connection mode event and also asynchronously
       
    61      * the errors coming from starting (requesting) the
       
    62      * connection mode notify.
       
    63      *
       
    64      * When reporting the error, the notifier is
       
    65      * automaticly stopped. However, the observer may
       
    66      * restart the notifier during the notify callback
       
    67      * if desired so.
       
    68      *
       
    69      * @since 2.1
       
    70      * @param aNotifier The presence notifier where this
       
    71      * error is coming from.
       
    72      * @param aError is the error code.
       
    73      */
       
    74     virtual void HandleConnectionModeEventNotifyError(
       
    75         CIMPSConnUiConnectionModeNotifier* aNotifier,
       
    76         TInt aError ) = 0;
       
    77     };
       
    78 
       
    79 
       
    80 #endif //__MIMPSCONNUICONNECTIONMODEOBSERVERNG_H