mmfenh/enhancedaudioplayerutility/AudioStreaming/AudioStreamingSource/src/ReadRequest.h
changeset 0 71ca22bcf22a
equal deleted inserted replaced
-1:000000000000 0:71ca22bcf22a
       
     1 /*
       
     2 * Copyright (c) 2005 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:  Definition of the stream source reader active object class
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CREADREQUEST_H
       
    20 #define CREADREQUEST_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32base.h>
       
    24 #include "S60StreamingSource.h"
       
    25 
       
    26 class CMMFBuffer;
       
    27 class MDataSink;
       
    28 
       
    29 /**
       
    30 *  Reader class to provide an asynchronous jump to avoid re-entrant code.
       
    31 *
       
    32 *  @lib S60StreamingSource.lib
       
    33 *  @since 3.1
       
    34 */
       
    35 class CReadRequest : public CActive
       
    36     {
       
    37     public: // Constructors and destructor
       
    38 
       
    39         /**
       
    40         * Two-phased constructor.
       
    41         */
       
    42         static CReadRequest* NewL( CS60StreamingSource& aCallback, CMMFBuffer* aBuffer, MDataSink* aConsumer);
       
    43 
       
    44         /**
       
    45         * Destructor.
       
    46         */
       
    47         virtual ~CReadRequest();
       
    48 
       
    49         void HandleRequest();
       
    50 
       
    51     private:
       
    52 
       
    53         /**
       
    54         * C++ default constructor.
       
    55         */
       
    56         CReadRequest(CS60StreamingSource& aCallback, CMMFBuffer* aBuffer, MDataSink* aConsumer);
       
    57 
       
    58         /**
       
    59         * By default Symbian 2nd phase constructor is private.
       
    60         */
       
    61         void ConstructL();
       
    62 
       
    63         void RunL();
       
    64 
       
    65         void DoCancel();
       
    66 
       
    67     public:
       
    68     	// next item
       
    69         TSglQueLink* iLink;
       
    70 
       
    71     private:
       
    72 		// Object to handle request
       
    73 		CS60StreamingSource& iCallback;
       
    74 		// Buffer to be sent to server-side
       
    75 		CMMFBuffer* iBuffer;
       
    76 		// Object to callback when buffer is filled
       
    77 		MDataSink* iConsumer;
       
    78 	};
       
    79 
       
    80 #endif 		// CREADREQUEST_H
       
    81 
       
    82 //  End of File