mmfenh/enhancedmediaclient/Plugins/ProgDLSource/src/SinkQueueItem.cpp
changeset 16 43d09473c595
parent 14 80975da52420
child 22 128eb6a32b84
equal deleted inserted replaced
14:80975da52420 16:43d09473c595
     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:  Implementation of ProgDL Source Reader active object.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 // INCLUDE FILES
       
    21 #ifdef _DEBUG
       
    22 #include    <e32svr.h>
       
    23 #endif
       
    24 
       
    25 #include "SinkQueueItem.h"
       
    26 #include <mmfdatasource.h>
       
    27 #include <mmfdatasink.h>
       
    28 #include <MultimediaDataSource.h>
       
    29 
       
    30 // ============================ MEMBER FUNCTIONS ===============================
       
    31 
       
    32 // -----------------------------------------------------------------------------
       
    33 // CSinkQueueItem::CSinkQueueItem
       
    34 // C++ default constructor can NOT contain any code, that
       
    35 // might leave.
       
    36 // -----------------------------------------------------------------------------
       
    37 //
       
    38 CSinkQueueItem::CSinkQueueItem(
       
    39                                CMMFBuffer* aBuffer,
       
    40                                MMultimediaDataSourceObserver* aMMDSObserver,
       
    41                                MDataSink* aConsumer )
       
    42                                :iBuffer(aBuffer),
       
    43                                iMMDSObserver(aMMDSObserver),
       
    44                                iConsumer(aConsumer)
       
    45     {
       
    46     }
       
    47 
       
    48 // -----------------------------------------------------------------------------
       
    49 // CSinkQueueItem::ConstructL
       
    50 // Symbian 2nd phase constructor can leave.
       
    51 // -----------------------------------------------------------------------------
       
    52 //
       
    53 void CSinkQueueItem::ConstructL()
       
    54     {
       
    55     }
       
    56 
       
    57 // -----------------------------------------------------------------------------
       
    58 // CSinkQueueItem::NewL
       
    59 // Two-phased constructor.
       
    60 // -----------------------------------------------------------------------------
       
    61 //
       
    62 CSinkQueueItem* CSinkQueueItem::NewL(
       
    63                                      CMMFBuffer* aBuffer,
       
    64                                      MMultimediaDataSourceObserver* aMMDSObserver,
       
    65                                      MDataSink* aConsumer )
       
    66     {
       
    67     CSinkQueueItem* self = new(ELeave) CSinkQueueItem( aBuffer, aMMDSObserver, aConsumer );
       
    68     CleanupStack::PushL(self);
       
    69     self->ConstructL();
       
    70     CleanupStack::Pop(self);
       
    71     return self;
       
    72     }
       
    73 
       
    74 
       
    75 // -----------------------------------------------------------------------------
       
    76 // CSinkQueueItem::~CSinkQueueItem
       
    77 // Destructor
       
    78 // -----------------------------------------------------------------------------
       
    79 //
       
    80 CSinkQueueItem::~CSinkQueueItem()
       
    81     {
       
    82     }
       
    83 
       
    84 CMMFDataBuffer* CSinkQueueItem::Buffer()
       
    85     {    
       
    86     return static_cast<CMMFDataBuffer*>(iBuffer);
       
    87     }
       
    88 
       
    89 MMultimediaDataSourceObserver* CSinkQueueItem::Observer()
       
    90     {
       
    91     return iMMDSObserver;
       
    92     }
       
    93 
       
    94 MDataSink* CSinkQueueItem::Consumer()
       
    95     {
       
    96     return iConsumer;
       
    97     }
       
    98 
       
    99 // End of file