inc/MPEngSearchTransactionObserver2.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:  Presence search transactions observer.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __MPENGSEARCHTRANSACTIONOBSERVER2_H
       
    19 #define __MPENGSEARCHTRANSACTIONOBSERVER2_H
       
    20 
       
    21 //  INCLUDES
       
    22 #include <E32Base.h>
       
    23 
       
    24 
       
    25 // FORWARD DECLARATIONS
       
    26 class CPEngSearchTransaction2;
       
    27 class CPEngSearchResult2;
       
    28 class MPEngTransactionStatus2;
       
    29 
       
    30 
       
    31 // CLASS DECLARATION
       
    32 
       
    33 /**
       
    34  * Observer interface to receive search
       
    35  * transaction events.
       
    36  *
       
    37  * @since 3.0
       
    38  */
       
    39 class MPEngSearchTransactionObserver2
       
    40     {
       
    41     public: //Observer methods
       
    42 
       
    43         /**
       
    44          * Search transaction event handler.
       
    45          *
       
    46          * Called by CPEngSearchTransaction2 to handle search
       
    47          * transaction events. If this method leaves, error code is
       
    48          * reported back to HandleSearchTransactionNotifyError().
       
    49          *
       
    50          * @since 3.0
       
    51          * @param aStatus Transaction status container holding result from
       
    52          *        transaction. Container ownership remains on the notfier.
       
    53          * @param aTransaction The transaction object where notification
       
    54          *        is coming from. No ownership transferred.
       
    55          * @param aSearchResult The search result object holding the
       
    56          *        result details. No ownership transferred.
       
    57          * @param aTransactionOperation ID of the completed transaction
       
    58          *        Transaction operation IDs are listed in
       
    59          *        PEngPresenceEngineConsts2.h TPEngTransactionOperation
       
    60          *        enumeration. Client can use transaction ID to figure
       
    61          *        out what operation completed.
       
    62          */
       
    63         virtual void HandleSearchTransactionCompleteL(
       
    64             MPEngTransactionStatus2& aStatus,
       
    65             CPEngSearchTransaction2& aTransaction,
       
    66             CPEngSearchResult2& aSearchResult,
       
    67             TInt aTransactionOperation ) = 0;
       
    68 
       
    69 
       
    70         /**
       
    71          * Failure handler.
       
    72          *
       
    73          * Called to handle leave errors from
       
    74          * HandleSearchTransactionCompleteL().
       
    75          *
       
    76          * @since 3.0
       
    77          * @param aError The leave error from transaction complete handling.
       
    78          * @param aTransaction The transaction object which event
       
    79          *        handling failed.
       
    80          * @param aTransactionOperation ID of the transaction operation
       
    81          *        which event handling failed. Transaction operation
       
    82          *        IDs are listed in PEngPresenceEngineConsts2.h
       
    83          *        TPEngTransactionOperation enumeration.
       
    84          */
       
    85         virtual void HandleSearchTransactionError(
       
    86             TInt aError,
       
    87             CPEngSearchTransaction2& aTransaction,
       
    88             TInt aTransactionOperation ) = 0;
       
    89 
       
    90 
       
    91     private: //Extensions
       
    92 
       
    93         /**
       
    94          * Reserved virtual table slots for future use.
       
    95          * Do not implement this.
       
    96          *
       
    97          * @since 3.0
       
    98          */
       
    99         virtual TInt SearchTransactionReserved() {
       
   100             return KErrNotSupported;
       
   101             }
       
   102 
       
   103 
       
   104 
       
   105     protected:  //Destructor
       
   106 
       
   107         /**
       
   108          * Protected destructor.
       
   109          * Observers can't be destroyed via this interface.
       
   110          */
       
   111         virtual ~MPEngSearchTransactionObserver2() { }
       
   112 
       
   113     };
       
   114 
       
   115 
       
   116 
       
   117 #endif  //__MPENGSEARCHTRANSACTIONOBSERVER2_H
       
   118 
       
   119 
       
   120 
       
   121 //End of file
       
   122 
       
   123 
       
   124 
       
   125