mmfenh/progressivedownload/ProgressiveDownloadUtility/src/BufferEmptiedEventAO.h
changeset 0 71ca22bcf22a
equal deleted inserted replaced
-1:000000000000 0:71ca22bcf22a
       
     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:  Progressive Download Utility  Definition of the BufTypeSupEventAO class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef BUFFEREMPTIEDEVENTAO_H
       
    20 #define BUFFEREMPTIEDEVENTAO_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <e32base.h>
       
    24 
       
    25 namespace multimedia
       
    26     {
       
    27 
       
    28     class MDataBuffer;
       
    29     // Observer
       
    30     class MBufferEmptiedObserver
       
    31         {
       
    32         public:
       
    33             virtual void BufferEmptiedBySource() = 0;
       
    34         };
       
    35 
       
    36         /**
       
    37         *  Class to encapsulate a queue item.
       
    38     */
       
    39     class CBufferEmptiedEventAO : public CActive
       
    40         {
       
    41         public:  // Constructors and destructor
       
    42             static CBufferEmptiedEventAO* NewL(MBufferEmptiedObserver&);
       
    43             virtual ~CBufferEmptiedEventAO();
       
    44 
       
    45             void SetActive();
       
    46             TInt Error();
       
    47 
       
    48             void SetBuffer(MDataBuffer* aBuffer);
       
    49             MDataBuffer* GetBuffer();
       
    50 
       
    51         protected:
       
    52             // From CActive
       
    53             void RunL();
       
    54             void DoCancel();
       
    55             TInt RunError( TInt aError );
       
    56 
       
    57         private:
       
    58             CBufferEmptiedEventAO( MBufferEmptiedObserver& aObserver );
       
    59             void ConstructL();
       
    60 
       
    61         private:
       
    62             MBufferEmptiedObserver& iObserver;
       
    63             MDataBuffer* iBuffer;
       
    64             TInt iError;
       
    65         };
       
    66     }
       
    67 #endif // BUFTYPESUPEVENTAO_H
       
    68 
       
    69 // End of File