serviceproviders/sapi_contacts_vpbk/inc/contactinterfacecallback.h
changeset 5 989d2f495d90
child 10 fc9cf246af83
equal deleted inserted replaced
1:a36b1e19a461 5:989d2f495d90
       
     1 /*
       
     2 * Copyright (c) 2006-2007 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 the License "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:  Implements the contact callback interface.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef C_CCONTACTINTERFACECALLBACK_H
       
    19 #define C_CCOTNACTINTERFACECALLBACK_H
       
    20 
       
    21 // System includes
       
    22 #include <e32base.h>
       
    23 
       
    24 // User Includes
       
    25 #include "contactcallback.h"
       
    26 #include "contactinterface.hrh"
       
    27 #include "contactiterator.h"
       
    28 
       
    29 // Forward declarations
       
    30 class MLiwNotifyCallback;
       
    31 class CLiwGenericParamList;
       
    32 
       
    33 /**
       
    34  * CContactInterfaceCallback - Implements the contact callback interface.
       
    35  * Passes the frames and notifies the the events
       
    36  * through callback.
       
    37  */
       
    38 class CContactInterfaceCallback : public CBase, public MContactCallback
       
    39     {
       
    40     public:
       
    41         /**
       
    42          * Two-phased constructor.
       
    43          * @return CContactInterfaceCallback*
       
    44          */
       
    45         static CContactInterfaceCallback* NewL();
       
    46 
       
    47 		/**
       
    48          * Two-phased constructor.
       
    49          * @return CContactInterfaceCallback*
       
    50          */
       
    51         static CContactInterfaceCallback* NewL(CSingleContact* aContact);
       
    52         
       
    53         /**
       
    54          * Destructor
       
    55          */
       
    56         virtual ~CContactInterfaceCallback();
       
    57 
       
    58     private:
       
    59         /**
       
    60          * Default constructor.
       
    61          */
       
    62         CContactInterfaceCallback();
       
    63 
       
    64     public:
       
    65         /**
       
    66          * Method  to set the parameters for the callback.
       
    67          * @param aCallback the callback to be called
       
    68          * @param aTransId the transaction Id
       
    69          * @param aInParamList to send back to LIW.
       
    70          * @return void
       
    71          */
       
    72         void SetParams( MLiwNotifyCallback* aCallback,
       
    73                         const TInt aTransId,
       
    74                         const CLiwGenericParamList* aInParamList );
       
    75 
       
    76 
       
    77         /**
       
    78          * Called when the any async operation returns with error or success
       
    79          * @return void
       
    80          */
       
    81         virtual void HandleReturnValue(TOperationEvent aEventId, const TInt& aError, TInt aTransId );
       
    82 
       
    83         /**
       
    84          * Called when the GetList returns the an iterator (which iterates over the output)
       
    85          * @return void
       
    86          */		
       
    87 		virtual void HandleReturnIter(const TInt& aError,CContactIter* aIter, TInt aTransId );
       
    88         
       
    89 
       
    90     private:
       
    91         //Pointer to the MLiwNotifyCallback callback passed by consumer.
       
    92         MLiwNotifyCallback* iCallback;
       
    93 
       
    94         //Trasaction ID.
       
    95         TInt iTransactionId;
       
    96 
       
    97         //Referance to top the Input Parameter list passed by consumer.
       
    98         const CLiwGenericParamList* iInParamList;
       
    99 
       
   100         //Event Generic Parameter List
       
   101         CLiwGenericParamList* iEventParamList;
       
   102         
       
   103         //pointer to the single contact object needed for cleanup
       
   104         CSingleContact* iContact;        
       
   105     };
       
   106 
       
   107 #endif // C_CCOTNACTINTERFACECALLBACK_H