bluetoothappprofiles/avrcp/playerinformation/src/playerapplicationsetting.h
changeset 70 f5508c13dfe0
parent 67 16e4b9007960
child 71 083fd884d7dd
equal deleted inserted replaced
67:16e4b9007960 70:f5508c13dfe0
     1 // Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 /**
       
    17  @file
       
    18  @internalComponent
       
    19  @released
       
    20 */
       
    21 
       
    22 #ifndef PLAYERAPPLICATIONSETTING_H
       
    23 #define PLAYERAPPLICATIONSETTING_H
       
    24 
       
    25 
       
    26 /**
       
    27 Class containing all the information for one attribute.
       
    28 All the attributes for a player are contained in a RHashMap 
       
    29 of CPlayerApplicationSettings in CPlayerInfoTarget
       
    30 */
       
    31 NONSHARABLE_CLASS(CPlayerApplicationSettings) : 	public CBase
       
    32 	{
       
    33 public:
       
    34 	/**
       
    35 	Factory function.
       
    36 	@param  aAttributeID The ID value
       
    37 	@param  aAttributeText A text description of the attribute
       
    38 	@param  aValues A list of valid values
       
    39 	@param  aValueTexts A list of descriptions of the possible values
       
    40 	@param  aInitialValue The starting value
       
    41 	@return A new CPlayerApplicationSettings
       
    42 	*/
       
    43 	static CPlayerApplicationSettings* NewL( TUint aAttributeID,
       
    44 		TDesC8& 						aAttributeText,
       
    45 		const RArray<TUint>& 			aValues,
       
    46 		RArray<TPtrC8>&					aValueTexts,
       
    47 		TUint 							aInitialValue );
       
    48 	
       
    49 	/** Destructor */
       
    50 	~CPlayerApplicationSettings();
       
    51 
       
    52 	TUint GetAttributeID();
       
    53 	TUint GetCurrentValue();
       
    54 	TPtrC8 GetAttributeText();
       
    55 	RArray<TUint>* GetValues();
       
    56 	RPointerArray<HBufC8>* GetValuesTexts();
       
    57 	TInt SetCurrentValue(TUint aValue);
       
    58 
       
    59 private:
       
    60 	/** 
       
    61 	Constructor.
       
    62 	@param aInterfaceSelector The interface selector.
       
    63 	*/
       
    64 	CPlayerApplicationSettings( );
       
    65 
       
    66 	void ConstructL(TUint aAttributeID,
       
    67 		TDesC8& 						aAttributeText,
       
    68 		const RArray<TUint>& 			aValues,
       
    69 		RArray<TPtrC8>&					aValueText,
       
    70 		TUint 							aInitialValue );
       
    71 
       
    72 private:
       
    73 	/* attribute ID */
       
    74 	TUint 							iAttributeID;
       
    75 	
       
    76 	/* text description of the attribute */
       
    77 	HBufC8*	 						iAttributeText;
       
    78 	
       
    79 	/* array of allowed values */
       
    80 	RArray<TUint> 					iValues;
       
    81 	
       
    82 	/* array of text descriptions of allowed values */
       
    83 	RPointerArray<HBufC8>			iValueText;
       
    84 	
       
    85 	/* the current value */
       
    86 	TUint 							iCurrentValue;
       
    87 	};
       
    88 	
       
    89 #endif // PLAYERAPPLICATIONSETTING_H