Update contrib.
2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
19 #include "T_VolumeInfoData.h"
23 _LIT( KCmdNew, "new" );
24 _LIT( KCmdDestructor, "~" );
26 CT_VolumeInfoData* CT_VolumeInfoData::NewL()
28 * Two phase constructor
31 CT_VolumeInfoData* ret = new (ELeave) CT_VolumeInfoData();
32 CleanupStack::PushL( ret );
34 CleanupStack::Pop( ret );
38 CT_VolumeInfoData::CT_VolumeInfoData()
41 * Protected constructor. First phase construction
46 void CT_VolumeInfoData::ConstructL()
48 * Protected constructor. Second phase construction
53 CT_VolumeInfoData::~CT_VolumeInfoData()
62 TAny* CT_VolumeInfoData::GetObject()
64 * Return a pointer to the object that the data wraps
66 * @return pointer to the object that the data wraps
72 void CT_VolumeInfoData::SetObjectL(TAny* aAny)
75 iVolumeInfo = static_cast<TVolumeInfo*> (aAny);
78 void CT_VolumeInfoData::DisownObjectL()
83 inline TCleanupOperation CT_VolumeInfoData::CleanupOperation()
85 return CleanupOperation;
88 void CT_VolumeInfoData::CleanupOperation(TAny* aAny)
90 TVolumeInfo* volumeInfo = static_cast<TVolumeInfo*>(aAny);
94 TBool CT_VolumeInfoData::DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& /*aSection*/, const TInt /*aAsyncErrorIndex*/ )
96 * Process a command read from the ini file
98 * @param aCommand the command to process
99 * @param aSection the entry in the ini file requiring the command to be processed
101 * @return ETrue if the command is processed
104 TBool retVal = ETrue;
106 if ( aCommand == KCmdNew )
110 else if ( aCommand == KCmdDestructor )
122 void CT_VolumeInfoData::DoCmdNew()
123 /** Creates new TVolumeInfo class instance */
125 INFO_PRINTF1( _L( "Create new TVolumeInfo class instance" ) );
127 TRAPD( err, iVolumeInfo = new (ELeave) TVolumeInfo() );
130 ERR_PRINTF2( _L( "new error %d" ), err );
135 void CT_VolumeInfoData::DoCleanup()
137 INFO_PRINTF1( _L( "Delete TVolumeInfo class instance." ) );