mmappcomponents/audiofetcher/src/audiofetcherlisthandler.cpp
changeset 0 a2952bb97e68
equal deleted inserted replaced
-1:000000000000 0:a2952bb97e68
       
     1 /*
       
     2 * Copyright (c) 2009 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:
       
    15 *
       
    16 */
       
    17 
       
    18 #include "audiofetcherlisthandler.h"
       
    19 #include "audiofetcherlog.h"
       
    20 
       
    21 // -----------------------------------------------------------------------------
       
    22 // CAudioFetcherListHandler::NewL
       
    23 // -----------------------------------------------------------------------------
       
    24 //
       
    25 CAudioFetcherListHandler* CAudioFetcherListHandler::NewL()
       
    26     {
       
    27     CAudioFetcherListHandler* self = new (ELeave) CAudioFetcherListHandler();
       
    28     CleanupStack::PushL(self);
       
    29     self->ConstructL();
       
    30     CleanupStack::Pop(self);
       
    31     return self;
       
    32     }
       
    33 
       
    34 
       
    35 // -----------------------------------------------------------------------------
       
    36 // CAudioFetcherListHandler::~CMFListHandler
       
    37 // -----------------------------------------------------------------------------
       
    38 //
       
    39 CAudioFetcherListHandler::~CAudioFetcherListHandler()
       
    40     {
       
    41     WLOG("CAudioFetcherListHandler::~CAudioFetcherListHandler");
       
    42     }
       
    43 
       
    44 // -----------------------------------------------------------------------------
       
    45 // CAudioFetcherListHandler::ConstructL
       
    46 // -----------------------------------------------------------------------------
       
    47 //
       
    48 void CAudioFetcherListHandler::ConstructL()
       
    49     {
       
    50     WLOG("CAudioFetcherListHandler::ConstructL");
       
    51     }
       
    52 
       
    53 // -----------------------------------------------------------------------------
       
    54 // CAudioFetcherListHandler::CAudioFetcherListHandler
       
    55 // -----------------------------------------------------------------------------
       
    56 //
       
    57 CAudioFetcherListHandler::CAudioFetcherListHandler()
       
    58     {
       
    59     }
       
    60 
       
    61 // -----------------------------------------------------------------------------
       
    62 // CAudioFetcherListHandler::SetObserver
       
    63 // -----------------------------------------------------------------------------
       
    64 //
       
    65 void CAudioFetcherListHandler::SetObserver( MAudioFetcherListHandlerObserver* aObserver )
       
    66     {
       
    67     iObserver = aObserver;
       
    68     }
       
    69     
       
    70 // -----------------------------------------------------------------------------
       
    71 // CAudioFetcherListHandler::MdcaCount (from MDesCArray)
       
    72 // -----------------------------------------------------------------------------
       
    73 //
       
    74 TInt CAudioFetcherListHandler::MdcaCount() const
       
    75     {
       
    76     WLOG("CAudioFetcherListHandler::MdcaCount");
       
    77     return iObserver->ListboxItemCount();
       
    78     }
       
    79 
       
    80 // -----------------------------------------------------------------------------
       
    81 // CAudioFetcherListHandler::MdcaPoint (from MDesCArray)
       
    82 // CEikListBox calls this function just before it draws list box item.
       
    83 // -----------------------------------------------------------------------------
       
    84 //
       
    85 TPtrC16 CAudioFetcherListHandler::MdcaPoint( TInt aIndex ) const
       
    86     {
       
    87     WLOG("CAudioFetcherListHandler::MdcaPoint");
       
    88     return iObserver->ConstructListboxItem( aIndex );
       
    89     }
       
    90 
       
    91 // -----------------------------------------------------------------------------
       
    92 // CAudioFetcherListHandler::Panic
       
    93 // -----------------------------------------------------------------------------
       
    94 //
       
    95 void CAudioFetcherListHandler::Panic( TInt aReason ) 
       
    96     {
       
    97     _LIT( KPanicCategory, "CAudioFetcherListHandler" );
       
    98     User::Panic( KPanicCategory, aReason ); 
       
    99     }
       
   100 
       
   101 //  End of File