inc/MPEngContactListObserver2.h
branchRCL_3
changeset 13 a941bc465d9f
parent 0 094583676ce7
equal deleted inserted replaced
12:6ca72c0fe49a 13:a941bc465d9f
       
     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:  Observer interface to receive presence contact list notifications.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __MPENGCONTACTLISTOBSERVER2_H
       
    19 #define __MPENGCONTACTLISTOBSERVER2_H
       
    20 
       
    21 //  INCLUDES
       
    22 #include <E32Std.h>
       
    23 
       
    24 
       
    25 //FORWARD DECLARATIONS
       
    26 class CPEngContactListNotifier2;
       
    27 
       
    28 
       
    29 
       
    30 // CLASS DECLARATION
       
    31 
       
    32 /**
       
    33  * Observer interface to receive contact list change notifications.
       
    34  * Observer is registered to CPEngContactListNotifier2.
       
    35  *
       
    36  * @lib
       
    37  * @since 3.0
       
    38  */
       
    39 class MPEngContactListObserver2
       
    40     {
       
    41     public: //Observer methods
       
    42 
       
    43         /**
       
    44          * Contact list change handler.
       
    45          *
       
    46          * Called by CPEngContactListNotifier2 to handle contact list
       
    47          * changed events. If this method leaves, error code is
       
    48          * reported back to HandleContactListError().
       
    49          *
       
    50          * @since 3.0
       
    51          * @param aNotifier The notifier source where notification
       
    52          *        is coming from. No ownership transferred.
       
    53          * @param aContactListName Contact list which has changed.
       
    54          */
       
    55         virtual void HandleContactListChangeL(
       
    56             CPEngContactListNotifier2& aNotifier,
       
    57             const TDesC& aContactListName ) = 0;
       
    58 
       
    59 
       
    60         /**
       
    61          * Notification failure handler.
       
    62          *
       
    63          * @since 3.0
       
    64          *
       
    65          * @param aError The error from Presence Engine internal
       
    66          *        presence change event handling (e.g. out of memory) or
       
    67          *        leave error from HandleContactListChangeL().
       
    68          * @param aNotifier The notifier of which event handling failed.
       
    69          *        No ownership transferred.
       
    70          */
       
    71         virtual void HandleContactListError(
       
    72             TInt aError,
       
    73             CPEngContactListNotifier2& aNotifier ) = 0;
       
    74 
       
    75 
       
    76 
       
    77     private: //Extensions
       
    78 
       
    79         /**
       
    80          * Reserved virtual table slots for future use.
       
    81          * Do not implement this.
       
    82          *
       
    83          * @since 3.0
       
    84          */
       
    85         virtual TInt ContactListObserverReserved() {
       
    86             return KErrNotSupported;
       
    87             }
       
    88 
       
    89 
       
    90 
       
    91     protected:  //Destructor
       
    92 
       
    93         /**
       
    94          * Protected destructor.
       
    95          * Observers can't be destroyed via this interface.
       
    96          */
       
    97         virtual ~MPEngContactListObserver2() { }
       
    98 
       
    99 
       
   100     };
       
   101 
       
   102 
       
   103 
       
   104 #endif  //__MPENGCONTACTLISTOBSERVER2_H
       
   105 
       
   106 
       
   107 //End of file
       
   108 
       
   109 
       
   110