bluetoothapitest/bluetoothsvs/T_BTSdpAPI/inc/T_DataSdpAttrValue.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_SDP_ATTR_VALUE_H__)
       
    20 #define __T_DATA_SDP_ATTR_VALUE_H__
       
    21 
       
    22 //	User Includes
       
    23 #include "DataWrapperBase.h"
       
    24 
       
    25 //	EPOC includes
       
    26 #include <btsdp.h>
       
    27 
       
    28 /**
       
    29  * Test Active Notification class
       
    30  *
       
    31  */
       
    32 class CT_DataSdpAttrValue : public CDataWrapperBase, public MSdpAttributeValueVisitor
       
    33 	{
       
    34 public:
       
    35 	/**
       
    36 	* Process a command read from the ini file
       
    37 	*
       
    38 	* @param aCommand			The command to process
       
    39 	* @param aSection			The section in the ini containing data for the command
       
    40 	* @param aAsyncErrorIndex	Command index for async calls to return errors to
       
    41 	*
       
    42 	* @return					ETrue if the command is processed
       
    43 	*
       
    44 	* @leave					System wide error
       
    45 	*/
       
    46 	virtual TBool	DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
       
    47 			TPtr	GetVisitorResult();
       
    48 			void	ResetVisitorResult();
       
    49 
       
    50 protected:
       
    51 	/**
       
    52 	* Protected constructor. First phase construction
       
    53 	*/
       
    54 	CT_DataSdpAttrValue();
       
    55 
       
    56 	virtual CSdpAttrValue*	GetSdpAttrValue() const = 0;
       
    57 
       
    58 	//	MSdpAttributeValueVisitor default implementation
       
    59     virtual void	VisitAttributeValueL(CSdpAttrValue &aValue, TSdpElementType aType);
       
    60     virtual void	StartListL(CSdpAttrValueList &aList);
       
    61     virtual void	EndListL();
       
    62 
       
    63 private:
       
    64 	/**
       
    65 	* Helper methods
       
    66 	*/
       
    67 	inline void	DoCmdAcceptVisitor(const TDesC& aSection);
       
    68 	inline void	DoCmdBool(const TDesC& aSection);
       
    69 	inline void	DoCmdDataSize(const TDesC& aSection);
       
    70 	inline void	DoCmdDes(const TDesC& aSection);
       
    71 	inline void	DoCmdDoesIntFit(const TDesC& aSection);
       
    72 	inline void	DoCmdInt(const TDesC& aSection);
       
    73 	inline void	DoCmdType(const TDesC& aSection);
       
    74 	inline void	DoCmdUint(const TDesC& aSection);
       
    75 	inline void	DoCmdUUID(const TDesC& aSection);
       
    76 	inline void DoCmdMSAVV_ExtensionInterfaceL();
       
    77 
       
    78 private:
       
    79 	TPtr		iVisitorResult;
       
    80 	};
       
    81 
       
    82 #endif /* __T_DATA_SDP_ATTR_VALUE_H__ */