bluetoothapitest/bluetoothsvs/T_BTUserAPI/inc/T_AvdtpContentProtectionCapabilitiesData.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_CONTENTPROTECT_CAPABILITIES_DATA_H__)
       
    20 #define __T_AVDTP_CONTENTPROTECT_CAPABILITIES_DATA_H__
       
    21 
       
    22 class CT_AvdtpServiceCapabilityData;
       
    23 class TAvdtpContentProtectionCapabilities;
       
    24 
       
    25 /**
       
    26  * Test Representing the Content Protection Capability of AVDTP
       
    27  *
       
    28  */
       
    29 class CT_AvdtpContentProtectionCapabilitiesData :
       
    30 	public CT_AvdtpServiceCapabilityData
       
    31 	{
       
    32 public:
       
    33 	/**
       
    34 	 * Two phase constructor
       
    35 	 */
       
    36 	static CT_AvdtpContentProtectionCapabilitiesData* NewL();
       
    37 
       
    38 	/**
       
    39 	 * Public destructor
       
    40 	 */
       
    41 	~CT_AvdtpContentProtectionCapabilitiesData();
       
    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,
       
    55 			const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
       
    56 
       
    57 	/**
       
    58 	 * Return a pointer to the object that the data wraps
       
    59 	 *
       
    60 	 * @return	pointer to the object that the data wraps
       
    61 	 */
       
    62 	virtual TAny* GetObject()
       
    63 		{
       
    64 		return iAvdtpContentProtectionCapabilities;
       
    65 		}
       
    66 
       
    67 	/**
       
    68 	 * Set the object that the data wraps
       
    69 	 *
       
    70 	 * @param	aObject object that the wrapper is testing
       
    71 	 *
       
    72 	 */
       
    73 	virtual void SetObjectL(TAny* aAny);
       
    74 
       
    75 	/**
       
    76 	 * The object will no longer be owned by this
       
    77 	 *
       
    78 	 * @leave	KErrNotSupported if the the function is not supported
       
    79 	 */
       
    80 	virtual void DisownObjectL();
       
    81 
       
    82 protected:
       
    83 	/**
       
    84 	 * Protected constructor. First phase construction
       
    85 	 */
       
    86 	CT_AvdtpContentProtectionCapabilitiesData();
       
    87 
       
    88 	virtual TAvdtpServiceCapability* GetAvdtpServiceCapability() const;
       
    89 
       
    90 	/**
       
    91 	 * Second phase construction
       
    92 	 */
       
    93 	void ConstructL();
       
    94 
       
    95 private:
       
    96 	/**
       
    97 	 * Helper methods
       
    98 	 */
       
    99 	void DestroyData();
       
   100 
       
   101 	inline void DoCmdnewL();
       
   102 	inline void DoCmdContentProtectionType(const TDesC& aSection);
       
   103 	inline void DoCmdSetContentProtectionType(const TDesC& aSection);
       
   104 	inline void DoCmdContentProtectionData(const TDesC& aSection);
       
   105 	inline void DoCmdSetContentProtectionData(const TDesC& aSection);
       
   106 
       
   107 private:
       
   108 	TAvdtpContentProtectionCapabilities * iAvdtpContentProtectionCapabilities;
       
   109 	};
       
   110 
       
   111 #endif /* __T_AVDTP_CONTENTPROTECT_CAPABILITIES_DATA_H__ */