bluetoothmgmt/bluetoothclientlib/avctpservices/avctpsender.h
changeset 0 29b1cd4cb562
equal deleted inserted replaced
-1:000000000000 0:29b1cd4cb562
       
     1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 /**
       
    17  @file
       
    18  @internalTechnology
       
    19 */
       
    20 
       
    21 #ifndef AVCTPSENDER_H
       
    22 #define AVCTPSENDER_H
       
    23 
       
    24 #include <e32base.h>
       
    25 #include <es_sock.h>
       
    26 #include <avctpservices.h>
       
    27 
       
    28 // forward declaration
       
    29 class CAvctpBody;
       
    30 
       
    31 /**
       
    32 AVCTP active sender
       
    33 @internalComponent
       
    34 */
       
    35 NONSHARABLE_CLASS(CAvctpSender) : public CActive
       
    36 	{
       
    37 public:
       
    38 	
       
    39 	static CAvctpSender* NewL(MAvctpEventNotify& aNotify, RSocket& aAvctpSocket, SymbianAvctp::TPid aPid);
       
    40 	~CAvctpSender();
       
    41 
       
    42 	TInt SendMessage(const TBTDevAddr& aBTDevice, 
       
    43 					 SymbianAvctp::TTransactionLabel aTransactionLabel,
       
    44 					 SymbianAvctp::TMessageType aType,
       
    45 					 const TDesC8& aMessageInformation);
       
    46 	
       
    47 private:
       
    48 	CAvctpSender(MAvctpEventNotify& aNotify, RSocket& aAvctpSocket, SymbianAvctp::TPid aPid);
       
    49 
       
    50 	inline void NotifyMessageSent(const TBTDevAddr& aBTDevice, 
       
    51 						   	SymbianAvctp::TTransactionLabel aTransactionLabel,   
       
    52 							TInt aSendResult); 
       
    53 
       
    54 	// From CActive
       
    55 	void DoCancel();
       
    56 	void RunL();
       
    57 	
       
    58 	// Other
       
    59 	void ResetSendInfo();
       
    60 	
       
    61 private:
       
    62 	MAvctpEventNotify& iNotify;	
       
    63 	RSocket& iAvctpSocket;
       
    64 	
       
    65 	TAvctpSockAddr iAddr;
       
    66 	SymbianAvctp::TTransactionLabel iCurrentTrans;
       
    67 	};
       
    68 	
       
    69 #endif // AVCTPSENDER_H