phoneengine/PhoneCntFinder/ContactService/src/cphcntcontactlinkarrayfetch.cpp
changeset 0 5f000ab63145
equal deleted inserted replaced
-1:000000000000 0:5f000ab63145
       
     1 /*
       
     2 * Copyright (c) 2006 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:  Base class for contactlink array fetchers.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include <MVPbkContactLinkArray.h>
       
    20 
       
    21 #include "cphcntcontactlinkarrayfetch.h"
       
    22 #include <talogger.h>
       
    23 // ======== MEMBER FUNCTIONS ========
       
    24 
       
    25 
       
    26 // ---------------------------------------------------------------------------
       
    27 // Constructor
       
    28 // ---------------------------------------------------------------------------
       
    29 //
       
    30 CPhCntContactLinkArrayFetch::CPhCntContactLinkArrayFetch()
       
    31     {
       
    32 
       
    33     }
       
    34 
       
    35 // ---------------------------------------------------------------------------
       
    36 // Destructor
       
    37 // ---------------------------------------------------------------------------
       
    38 //
       
    39 CPhCntContactLinkArrayFetch::~CPhCntContactLinkArrayFetch()
       
    40     {
       
    41     delete iFetchedContactLinks;
       
    42     }
       
    43     
       
    44 // ---------------------------------------------------------------------------
       
    45 // Secondphase constructor.
       
    46 // ---------------------------------------------------------------------------
       
    47 //
       
    48 void CPhCntContactLinkArrayFetch::BaseConstructL() 
       
    49     {
       
    50     CPhCntAsyncToSync::BaseConstructL();
       
    51     }
       
    52 
       
    53 // ---------------------------------------------------------------------------
       
    54 // From class MVPbkContactFindObserver
       
    55 // Notifies the base class that response from asynchronous request
       
    56 // has been received succesfully.
       
    57 // ---------------------------------------------------------------------------
       
    58 //
       
    59 void CPhCntContactLinkArrayFetch::FindCompleteL( MVPbkContactLinkArray* aResults )
       
    60     {
       
    61     TEFLOGSTRING( KTAOBJECT, "CNT CPhCntContactLinkArrayFetch::FindCompleteL" );
       
    62     delete iFetchedContactLinks;
       
    63     iFetchedContactLinks = aResults;
       
    64     // Indicate base class that response from fetch has been received.
       
    65     ResponseReceived( KErrNone );
       
    66     }
       
    67     
       
    68 // ---------------------------------------------------------------------------
       
    69 // From class MVPbkContactFindObserver
       
    70 // Notifies the base class that response from asynchronous request
       
    71 // has been received succesfully.
       
    72 // ---------------------------------------------------------------------------
       
    73 //
       
    74 void CPhCntContactLinkArrayFetch::FindFailed( TInt aError )
       
    75     {
       
    76     TEFLOGSTRING( KTAOBJECT, "CNT CPhCntContactLinkArrayFetch::FindFailed" );
       
    77     delete iFetchedContactLinks;
       
    78     iFetchedContactLinks = NULL;
       
    79     // Indicate base class that response from fetch has been received.
       
    80     ResponseReceived( aError );
       
    81     }