syslibsapitest/syslibssvs/ecom/inc/T_ImplementationInformationData.h
changeset 0 e4d67989cc36
equal deleted inserted replaced
-1:000000000000 0:e4d67989cc36
       
     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 
       
    20 #if (!defined __T_IMPLEMENTATION_INFORMATION_API_DATA_H__)
       
    21 #define __T_IMPLEMENTATION_INFORMATION_API_DATA_H__
       
    22 
       
    23 //	User Includes
       
    24 #include "DataWrapperBase.h"
       
    25 
       
    26 // Classes to get to protected members
       
    27 
       
    28 //	EPOC includes
       
    29 #include <w32std.h>
       
    30 #include <e32std.h>
       
    31 #include <ecom/implementationinformation.h>
       
    32 
       
    33 class CT_ImplementationInformationData: public CDataWrapperBase
       
    34 	{
       
    35 public:
       
    36 	/**
       
    37 	* Two phase constructor
       
    38 	*/
       
    39 	static CT_ImplementationInformationData*	NewL();
       
    40 
       
    41 	/**
       
    42 	* Destructor
       
    43 	*/
       
    44 	~CT_ImplementationInformationData();
       
    45 
       
    46 	/**
       
    47 	 * Process a command read from the ini file
       
    48 	 *
       
    49 	 * @param aCommand			The command to process
       
    50 	 * @param aSection			The section in the ini containing data for the command
       
    51 	 * @param aAsyncErrorIndex	Command index for async calls to return errors to
       
    52 	 *
       
    53 	 * @return ETrue if the command is processed
       
    54 	 *
       
    55 	 * @leave					System wide error
       
    56 	 */
       
    57 	virtual TBool	DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
       
    58 
       
    59 	/**
       
    60 	 * @return	Pointer to the object that the data wraps
       
    61 	 */
       
    62 	inline virtual TAny*	GetObject() 
       
    63 		{
       
    64 		return iImplementationInformation;
       
    65 		};
       
    66 
       
    67 	/**
       
    68 	 * Set the object that the data wraps
       
    69 	 *
       
    70 	 * @param	aObject object that the wrapper is testing
       
    71 	 *
       
    72 	 * @leave	KErrNotSupported if the the function is not supported
       
    73 	 */
       
    74 	virtual inline void	SetObjectL(TAny* aObject)
       
    75 		{
       
    76 		iImplementationInformation=static_cast<CImplementationInformation*>(aObject);
       
    77 		};
       
    78 
       
    79 protected:
       
    80 	/**
       
    81 	 * Public constructor. First phase construction
       
    82 	 */
       
    83 	CT_ImplementationInformationData();
       
    84 
       
    85 	/**
       
    86 	* Second phase construction
       
    87 	*/
       
    88 	void	ConstructL();
       
    89 
       
    90 private:
       
    91 	inline void	DoCmdDestroy();
       
    92 	inline void	DoCmdDisplayName(const TDesC& aSection);
       
    93 	inline void	DoCmdDataType(const TDesC& aSection);
       
    94 	inline void	DoCmdOpaqueData(const TDesC& aSection);
       
    95 	inline void	DoCmdImplementationUid(const TDesC& aSection);
       
    96 	inline void	DoCmdVersion(const TDesC& aSection);
       
    97 	inline void	DoCmdDisabled(const TDesC& aSection);
       
    98 	inline void	DoCmdSetDisabled(const TDesC& aSection);
       
    99 	inline void	DoCmdDrive(const TDesC& aSection);
       
   100 	inline void	DoCmdRomOnly(const TDesC& aSection);
       
   101 	inline void	DoCmdRomBased(const TDesC& aSection);
       
   102 
       
   103 	TBool	GetUid(const TDesC& aSection, TUid& aUid);
       
   104 	TBool	GetExpectedString(const TDesC& aSection, TPtrC& aDataType);
       
   105 	TBool	GetExpectedResult(const TDesC& aSection, TInt& aExpectedResult);
       
   106 	TBool	GetExpectedHexResult(const TDesC& aSection, TInt& aExpectedResult);
       
   107 	TBool	GetDisabled(const TDesC& aSection, TBool& aDisabled);
       
   108 	TBool	GetExpectedBool(const TDesC& aSection, TBool& aBool);
       
   109 	TBool	GetArrayElement(const TDesC& aSection, TInt& aArrayElement);
       
   110 
       
   111 	//	Helper methods
       
   112 	void	DestroyData();
       
   113 
       
   114 private:
       
   115     CImplementationInformation*		iImplementationInformation;
       
   116 	};
       
   117 
       
   118 #endif /* __T_IMPLEMENTATION_INFORMATION_API_DATA_H__ */