bluetoothapitest/bluetoothsvs/T_BTSdpAPI/inc/T_DataRSdpDatabase.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_DATA_RSDP_DATABASE_H__ )
       
    20 #define	__T_DATA_RSDP_DATABASE_H__
       
    21 
       
    22 //	User Includes
       
    23 #include "CRSdpHandleArray.h"
       
    24 #include "DataWrapperBase.h"
       
    25 
       
    26 
       
    27 // EPOC includes
       
    28 #include <btsdp.h>
       
    29 #include <e32base.h>
       
    30 
       
    31 /**
       
    32  * Test	Active Notification	class
       
    33  *
       
    34  */
       
    35 class CT_DataRSdpdatabase :	public CDataWrapperBase
       
    36 	{
       
    37 public:
       
    38 	/**
       
    39 	* Two phase	constructor
       
    40 	*/
       
    41 	static CT_DataRSdpdatabase*	NewL();
       
    42 
       
    43 	/**
       
    44 	* Public destructor
       
    45 	*/
       
    46 	~CT_DataRSdpdatabase();
       
    47 
       
    48 	/**
       
    49 	* Process a	command	read from the ini file
       
    50 	*
       
    51 	* @param aDataWrapper	test step requiring	command	to be processed
       
    52 	* @param aCommand	the	command	to process
       
    53 	* @param aSection		the	entry in the ini file requiring	the	command	to be processed
       
    54 	*
       
    55 	* @return ETrue	if the command is processed
       
    56 	*/
       
    57 	virtual	TBool	DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
       
    58 
       
    59 	/**
       
    60 	* Return a pointer to the object that the data wraps
       
    61 	*
       
    62 	* @return	pointer	to the object that the data	wraps
       
    63 	*/
       
    64 	virtual	TAny*	GetObject()	{ return iHandleArray; }
       
    65 
       
    66 	/**
       
    67 	* Set the object that the data wraps
       
    68 	*
       
    69 	* @param	aObject	object that	the	wrapper	is testing
       
    70 	*
       
    71 	*/
       
    72 	virtual	void	SetObjectL(TAny* aAny);
       
    73 
       
    74 	/**
       
    75 	* The object will no longer be owned by this
       
    76 	*
       
    77 	* @leave	KErrNotSupported if the the function is not supported
       
    78 	*/
       
    79 	virtual void	DisownObjectL();
       
    80 
       
    81 	inline virtual TCleanupOperation CleanupOperation();
       
    82 
       
    83 protected:
       
    84 	/**
       
    85 	* Protected	constructor. First phase construction
       
    86 	*/
       
    87 	CT_DataRSdpdatabase();
       
    88 
       
    89 	/**
       
    90 	* Second phase construction
       
    91 	*/
       
    92 	void	ConstructL();
       
    93 
       
    94 private:
       
    95 
       
    96 	static void CleanupOperation(TAny* aAny);
       
    97 	
       
    98 	/**
       
    99 	* Helper methods
       
   100 	*/
       
   101 	void		DestroyData();
       
   102 	inline	void DoCmdConstructor();	
       
   103 	inline	void DoCmdOpen(const TDesC&	aSection);
       
   104 	inline	void DoCmdClose();
       
   105 	inline	void DoCmdCreateServiceRecordL(const TDesC&	aSection);
       
   106 	inline	void DoCmdDeleteRecordL(const TDesC&	aSection);
       
   107 	inline	void DoCmdDeleteRecord(const TDesC&	aSection);
       
   108 	inline	void DoCmdDeleteAttributeL(const TDesC&	aSection);
       
   109 	inline	void DoCmdDeleteAttribute(const TDesC&	aSection);
       
   110 	inline	void DoCmdUpdateAttributeL(const TDesC& aSection);
       
   111 
       
   112 private:
       
   113 	CRSdpHandleArray*			iHandleArray;
       
   114 	TSdpServRecordHandle		iRecHandle;	
       
   115 	};
       
   116 
       
   117 #endif /* __T_DATA_RSDP_DATABASE_H__*/