bluetoothapitest/bluetoothsvs/T_BTUserAPI/inc/T_AvdtpSockAddrData.h
changeset 0 29b1cd4cb562
equal deleted inserted replaced
-1:000000000000 0:29b1cd4cb562
       
     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 #if (!defined __T_AVDTP_SOCKADDR_DATA_H__)
       
    20 #define __T_AVDTP_SOCKADDR_DATA_H__
       
    21 	
       
    22 // User Includes
       
    23 #include "DataWrapperBase.h"
       
    24 
       
    25 class CT_AvdtpSockAddrData : public CDataWrapperBase
       
    26 	{
       
    27 public:
       
    28 	/**
       
    29 	* Public destructor
       
    30 	*/
       
    31 	~CT_AvdtpSockAddrData();
       
    32 	
       
    33 	/**
       
    34 	* Two phase constructor
       
    35 	*/
       
    36 	static CT_AvdtpSockAddrData*	NewL();
       
    37 
       
    38 	/**
       
    39 	* Process a command read from the ini file
       
    40 	*
       
    41 	* @param aCommand			The command to process
       
    42 	* @param aSection			The section in the ini containing data for the command
       
    43 	* @param aAsyncErrorIndex	Command index for async calls to return errors to
       
    44 	*
       
    45 	* @return					ETrue if the command is processed
       
    46 	*
       
    47 	* @leave					System wide error
       
    48 	*/
       
    49 	virtual TBool	DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
       
    50 
       
    51 	/**
       
    52 	* Return a pointer to the object that the data wraps
       
    53 	*
       
    54 	* @return	pointer to the object that the data wraps
       
    55 	*/
       
    56 
       
    57 	virtual TAny*	GetObject();
       
    58 
       
    59 
       
    60 	/**
       
    61 	* Set object from outside so that it can be verified
       
    62 	*/	
       
    63 	void SetObject(TAvdtpSockAddr* aAvdtpSockAddr, TBool aTransferOwnership);
       
    64 
       
    65 	/**
       
    66 	* The object will no longer be owned by this
       
    67 	*
       
    68 	* @leave	KErrNotSupported if the the function is not supported
       
    69 	*/
       
    70 	virtual void	DisownObjectL();
       
    71 
       
    72 	inline virtual TCleanupOperation CleanupOperation();
       
    73 		
       
    74 protected:
       
    75 	CT_AvdtpSockAddrData();
       
    76 	void ConstructL();
       
    77 
       
    78 private:
       
    79 	void DestroyData();
       
    80 	
       
    81 	inline void DoCmdnewL(const TDesC& aSection);
       
    82 	inline void DoCmdCast(const TDesC& aSection);
       
    83 	inline void DoCmdSetSession(const TDesC& aSection);
       
    84 	inline void DoCmdSession(const TDesC& aSection);
       
    85 	inline void DoCmdSetSEID(const TDesC& aSection);
       
    86 	inline void DoCmdSEID(const TDesC& aSection);
       
    87 	inline void DoCmdFamily(const TDesC& aSection);
       
    88 	inline void DoCmdGetUserLen(const TDesC& aSection);
       
    89 	inline void DoCmdPort(const TDesC& aSection);
       
    90 	inline void DoCmdBTAddr(const TDesC& aSection);
       
    91 	inline void DoCmdBTSecurity(const TDesC& aSection);
       
    92 	
       
    93 	static void CleanupOperation(TAny* aAny);
       
    94 
       
    95 private:
       
    96 	TAvdtpSockAddr* iData;
       
    97 	
       
    98     // Identifies if the data is owned, needed due to cast
       
    99     TBool iDataOwned;
       
   100 	};
       
   101 
       
   102 #endif /* __T_AVDTP_SOCKADDR_DATA_H__*/