First public contribution.
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.
20 #if (!defined __FILESERVERUTIL_H__)
21 #define __FILESERVERUTIL_H__
25 #include <test/datawrapper.h>
31 Template class CleanupResetAndDestroy to clean up the array
32 of implementation information from the cleanup stack.
36 class CleanupResetAndDestroy
40 Puts an item on the cleanup stack.
43 The implementation information to be put on the cleanup stack.
45 inline static void PushL(T& aRef);
47 static void ResetAndDestroy(TAny *aPtr);
50 inline void CleanupResetAndDestroyPushL(T& aRef);
52 inline void CleanupResetAndDestroy<T>::PushL(T& aRef)
53 {CleanupStack::PushL(TCleanupItem(&ResetAndDestroy,&aRef));}
55 void CleanupResetAndDestroy<T>::ResetAndDestroy(TAny *aPtr)
56 {(STATIC_CAST(T*,aPtr))->ResetAndDestroy();}
58 inline void CleanupResetAndDestroyPushL(T& aRef)
59 {CleanupResetAndDestroy<T>::PushL(aRef);}
65 static TBool GetAttMask(CDataWrapper& aDataWrapper, const TDesC& aSection, const TDesC& aParameterName, TUint& aAttMask);
66 static TBool VerifyTEntryDataFromIniL(CDataWrapper& aDataWrapper, const TDesC& aSection, TEntry& aEntry);
67 static TBool VerifyTVolumeInfoDataFromIniL(CDataWrapper& aDataWrapper, const TDesC& aSection, TVolumeInfo& aVolumeInfo);
70 static TBool ConvertToAttMask(const TDesC& aAttMaskStr, TUint& aAttMask);
73 #endif /* __FILESERVERUTIL_H__ */