1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/ossrv/syslibsapitest/syslibssvs/ecom/inc/T_ImplementationInformationData.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,118 @@
1.4 +/*
1.5 +* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description:
1.18 +*
1.19 +*/
1.20 +
1.21 +
1.22 +
1.23 +#if (!defined __T_IMPLEMENTATION_INFORMATION_API_DATA_H__)
1.24 +#define __T_IMPLEMENTATION_INFORMATION_API_DATA_H__
1.25 +
1.26 +// User Includes
1.27 +#include "DataWrapperBase.h"
1.28 +
1.29 +// Classes to get to protected members
1.30 +
1.31 +// EPOC includes
1.32 +#include <w32std.h>
1.33 +#include <e32std.h>
1.34 +#include <ecom/implementationinformation.h>
1.35 +
1.36 +class CT_ImplementationInformationData: public CDataWrapperBase
1.37 + {
1.38 +public:
1.39 + /**
1.40 + * Two phase constructor
1.41 + */
1.42 + static CT_ImplementationInformationData* NewL();
1.43 +
1.44 + /**
1.45 + * Destructor
1.46 + */
1.47 + ~CT_ImplementationInformationData();
1.48 +
1.49 + /**
1.50 + * Process a command read from the ini file
1.51 + *
1.52 + * @param aCommand The command to process
1.53 + * @param aSection The section in the ini containing data for the command
1.54 + * @param aAsyncErrorIndex Command index for async calls to return errors to
1.55 + *
1.56 + * @return ETrue if the command is processed
1.57 + *
1.58 + * @leave System wide error
1.59 + */
1.60 + virtual TBool DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
1.61 +
1.62 + /**
1.63 + * @return Pointer to the object that the data wraps
1.64 + */
1.65 + inline virtual TAny* GetObject()
1.66 + {
1.67 + return iImplementationInformation;
1.68 + };
1.69 +
1.70 + /**
1.71 + * Set the object that the data wraps
1.72 + *
1.73 + * @param aObject object that the wrapper is testing
1.74 + *
1.75 + * @leave KErrNotSupported if the the function is not supported
1.76 + */
1.77 + virtual inline void SetObjectL(TAny* aObject)
1.78 + {
1.79 + iImplementationInformation=static_cast<CImplementationInformation*>(aObject);
1.80 + };
1.81 +
1.82 +protected:
1.83 + /**
1.84 + * Public constructor. First phase construction
1.85 + */
1.86 + CT_ImplementationInformationData();
1.87 +
1.88 + /**
1.89 + * Second phase construction
1.90 + */
1.91 + void ConstructL();
1.92 +
1.93 +private:
1.94 + inline void DoCmdDestroy();
1.95 + inline void DoCmdDisplayName(const TDesC& aSection);
1.96 + inline void DoCmdDataType(const TDesC& aSection);
1.97 + inline void DoCmdOpaqueData(const TDesC& aSection);
1.98 + inline void DoCmdImplementationUid(const TDesC& aSection);
1.99 + inline void DoCmdVersion(const TDesC& aSection);
1.100 + inline void DoCmdDisabled(const TDesC& aSection);
1.101 + inline void DoCmdSetDisabled(const TDesC& aSection);
1.102 + inline void DoCmdDrive(const TDesC& aSection);
1.103 + inline void DoCmdRomOnly(const TDesC& aSection);
1.104 + inline void DoCmdRomBased(const TDesC& aSection);
1.105 +
1.106 + TBool GetUid(const TDesC& aSection, TUid& aUid);
1.107 + TBool GetExpectedString(const TDesC& aSection, TPtrC& aDataType);
1.108 + TBool GetExpectedResult(const TDesC& aSection, TInt& aExpectedResult);
1.109 + TBool GetExpectedHexResult(const TDesC& aSection, TInt& aExpectedResult);
1.110 + TBool GetDisabled(const TDesC& aSection, TBool& aDisabled);
1.111 + TBool GetExpectedBool(const TDesC& aSection, TBool& aBool);
1.112 + TBool GetArrayElement(const TDesC& aSection, TInt& aArrayElement);
1.113 +
1.114 + // Helper methods
1.115 + void DestroyData();
1.116 +
1.117 +private:
1.118 + CImplementationInformation* iImplementationInformation;
1.119 + };
1.120 +
1.121 +#endif /* __T_IMPLEMENTATION_INFORMATION_API_DATA_H__ */