cellularsrvapitest/datatransferhaitest/common/inc/DataDealer.h
changeset 0 3553901f7fa8
child 24 6638e7f4bd8f
equal deleted inserted replaced
-1:000000000000 0:3553901f7fa8
       
     1 /*
       
     2 * Copyright (c) 2005-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 
       
    19 #ifndef DATA_DEALER_H
       
    20 #define DATA_DEALER_H
       
    21 
       
    22 #include <e32property.h>
       
    23 #include <e32base.h>
       
    24 
       
    25 
       
    26 class CDataDealer : public CBase
       
    27 	{
       
    28 public:
       
    29 	static CDataDealer* NewL( const TBool aProducer, const TUint aKey );
       
    30 	virtual ~CDataDealer();
       
    31 
       
    32 protected:
       
    33 	void ConstructL();
       
    34 	
       
    35 private:
       
    36 	CDataDealer( const TBool aProducer, const TUint aKey );
       
    37 	
       
    38 public:
       
    39 	void ProduceDataL( const TDesC8& aData );
       
    40 	void ConsumeDataL( HBufC8*& aData );
       
    41 	void ConsumeDataL( HBufC8*& aData, const TInt aMaxSize, TBool& aMore );
       
    42 
       
    43 private:
       
    44 	void WaitForConsumerL();
       
    45 	void WaitForPropertyToBeCreatedL();
       
    46 
       
    47 	/** The property to produce to or consume from */
       
    48 	RProperty iProperty;
       
    49 
       
    50 	TInt iPropertySize;
       
    51 	TBool iProducer;
       
    52 	TUint iKey;
       
    53 
       
    54 	TUid iDtorID;
       
    55 	};
       
    56 
       
    57 
       
    58 #endif // DATA_DEALER_H
       
    59