phoneengine/PhoneCntFinder/src/cphcntthumbnailloaderbase.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 concrete thumbnailloaders.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "cphcntthumbnailloaderbase.h"
       
    20 
       
    21 // ======== MEMBER FUNCTIONS ========
       
    22 
       
    23 // ---------------------------------------------------------------------------
       
    24 // Constructor
       
    25 // ---------------------------------------------------------------------------
       
    26 //
       
    27 CPhCntThumbnailLoaderBase::CPhCntThumbnailLoaderBase()
       
    28     {
       
    29     }
       
    30 
       
    31 // ---------------------------------------------------------------------------
       
    32 // Destructor.
       
    33 // ---------------------------------------------------------------------------
       
    34 //
       
    35 CPhCntThumbnailLoaderBase::~CPhCntThumbnailLoaderBase()
       
    36     {
       
    37     }
       
    38 
       
    39 
       
    40 // ---------------------------------------------------------------------------
       
    41 // Notifies the observer.
       
    42 // ---------------------------------------------------------------------------
       
    43 //
       
    44 void CPhCntThumbnailLoaderBase::NotifyObserver( 
       
    45     CFbsBitmap* aBitmap, 
       
    46     TInt aError )
       
    47     {
       
    48     if( iLoadingObserver ) 
       
    49         {
       
    50         iLoadingObserver->LoadingCompleted( aBitmap, aError );
       
    51         iLoadingObserver = NULL;
       
    52         }
       
    53     }
       
    54 
       
    55 
       
    56 // ---------------------------------------------------------------------------
       
    57 // From class MPhCntThumbnailLoader
       
    58 // Takes hold of observer and calls template method for actual loading of 
       
    59 // thumbnail.
       
    60 // ---------------------------------------------------------------------------
       
    61 //
       
    62 void CPhCntThumbnailLoaderBase::LoadL( 
       
    63     const CPhCntContactId& aContactId,
       
    64     MPhCntLoaderObserver& aLoadingObserver )
       
    65     {
       
    66     iLoadingObserver = &aLoadingObserver;
       
    67     DoLoadL( aContactId );
       
    68     }
       
    69