bluetoothapitest/bluetoothsvs/T_BTSockAddrAPI/inc/T_SockAddrData.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_SOCK_ADDR_DATA_H__)
       
    20 #define __T_SOCK_ADDR_DATA_H__
       
    21 
       
    22 //	User Includes
       
    23 #include "DataWrapperBase.h"
       
    24 // Classes to get to protected members
       
    25 #include "T_TRfcommSockAddrChild.h"
       
    26 #include "T_TBTSockAddrChild.h"
       
    27 
       
    28 //	EPOC includes
       
    29 #include <w32std.h>
       
    30 #include <e32std.h>
       
    31 #include <es_sock.h> // TSockAddr address 
       
    32 #include <bt_sock.h> // Bluetooth address classes
       
    33 
       
    34 
       
    35 class CT_SockAddrData: public CDataWrapperBase
       
    36 	{
       
    37 public:
       
    38 	/**
       
    39 	* Two phase constructor
       
    40 	*/
       
    41 	static CT_SockAddrData*	NewL();
       
    42 	
       
    43 	/**
       
    44 	* Process a command read from the ini file
       
    45 	*
       
    46 	* @param aCommand			The command to process
       
    47 	* @param aSection			The section in the ini containing data for the command
       
    48 	* @param aAsyncErrorIndex	Command index for async calls to return errors to
       
    49 	*
       
    50 	* @return					ETrue if the command is processed
       
    51 	*
       
    52 	* @leave					System wide error
       
    53 	*/
       
    54 	virtual TBool	DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
       
    55 	
       
    56 	/**
       
    57 	* Destructor
       
    58 	*/
       
    59 	~CT_SockAddrData();
       
    60 
       
    61 protected:
       
    62 	/**
       
    63 	* Protected constructor. First phase construction
       
    64 	*/
       
    65 	CT_SockAddrData();
       
    66 	
       
    67 	/**
       
    68 	* Delete iTSockAddr if owned and set to 0
       
    69 	*/
       
    70 	void Cleanup();	
       
    71 	/**
       
    72 	* Return a pointer to the object that the data wraps
       
    73 	*
       
    74 	* \return pointer to the object that the data wraps
       
    75 	*/
       
    76 	virtual TAny*	GetObject();	
       
    77 
       
    78 private:
       
    79 	// An object of TSockAddr class in order to retain state between calls    
       
    80     TSockAddr*               iTSockAddr;    
       
    81 	};
       
    82 	
       
    83 #endif /* __T_SOCK_ADDR_DATA_H__ */