sl@0
|
1 |
/*
|
sl@0
|
2 |
* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
3 |
* All rights reserved.
|
sl@0
|
4 |
* This component and the accompanying materials are made available
|
sl@0
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
sl@0
|
6 |
* which accompanies this distribution, and is available
|
sl@0
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
8 |
*
|
sl@0
|
9 |
* Initial Contributors:
|
sl@0
|
10 |
* Nokia Corporation - initial contribution.
|
sl@0
|
11 |
*
|
sl@0
|
12 |
* Contributors:
|
sl@0
|
13 |
*
|
sl@0
|
14 |
* Description:
|
sl@0
|
15 |
*
|
sl@0
|
16 |
*/
|
sl@0
|
17 |
|
sl@0
|
18 |
|
sl@0
|
19 |
|
sl@0
|
20 |
#if (!defined __FILESERVERUTIL_H__)
|
sl@0
|
21 |
#define __FILESERVERUTIL_H__
|
sl@0
|
22 |
|
sl@0
|
23 |
|
sl@0
|
24 |
// EPOC Includes
|
sl@0
|
25 |
#include <test/datawrapper.h>
|
sl@0
|
26 |
|
sl@0
|
27 |
/**
|
sl@0
|
28 |
@publishedAll
|
sl@0
|
29 |
@released
|
sl@0
|
30 |
|
sl@0
|
31 |
Template class CleanupResetAndDestroy to clean up the array
|
sl@0
|
32 |
of implementation information from the cleanup stack.
|
sl@0
|
33 |
*/
|
sl@0
|
34 |
|
sl@0
|
35 |
template <class T>
|
sl@0
|
36 |
class CleanupResetAndDestroy
|
sl@0
|
37 |
{
|
sl@0
|
38 |
public:
|
sl@0
|
39 |
/**
|
sl@0
|
40 |
Puts an item on the cleanup stack.
|
sl@0
|
41 |
|
sl@0
|
42 |
@param aRef
|
sl@0
|
43 |
The implementation information to be put on the cleanup stack.
|
sl@0
|
44 |
*/
|
sl@0
|
45 |
inline static void PushL(T& aRef);
|
sl@0
|
46 |
private:
|
sl@0
|
47 |
static void ResetAndDestroy(TAny *aPtr);
|
sl@0
|
48 |
};
|
sl@0
|
49 |
template <class T>
|
sl@0
|
50 |
inline void CleanupResetAndDestroyPushL(T& aRef);
|
sl@0
|
51 |
template <class T>
|
sl@0
|
52 |
inline void CleanupResetAndDestroy<T>::PushL(T& aRef)
|
sl@0
|
53 |
{CleanupStack::PushL(TCleanupItem(&ResetAndDestroy,&aRef));}
|
sl@0
|
54 |
template <class T>
|
sl@0
|
55 |
void CleanupResetAndDestroy<T>::ResetAndDestroy(TAny *aPtr)
|
sl@0
|
56 |
{(STATIC_CAST(T*,aPtr))->ResetAndDestroy();}
|
sl@0
|
57 |
template <class T>
|
sl@0
|
58 |
inline void CleanupResetAndDestroyPushL(T& aRef)
|
sl@0
|
59 |
{CleanupResetAndDestroy<T>::PushL(aRef);}
|
sl@0
|
60 |
|
sl@0
|
61 |
class FileserverUtil
|
sl@0
|
62 |
{
|
sl@0
|
63 |
public:
|
sl@0
|
64 |
|
sl@0
|
65 |
static TBool GetAttMask(CDataWrapper& aDataWrapper, const TDesC& aSection, const TDesC& aParameterName, TUint& aAttMask);
|
sl@0
|
66 |
static TBool VerifyTEntryDataFromIniL(CDataWrapper& aDataWrapper, const TDesC& aSection, TEntry& aEntry);
|
sl@0
|
67 |
static TBool VerifyTVolumeInfoDataFromIniL(CDataWrapper& aDataWrapper, const TDesC& aSection, TVolumeInfo& aVolumeInfo);
|
sl@0
|
68 |
|
sl@0
|
69 |
private:
|
sl@0
|
70 |
static TBool ConvertToAttMask(const TDesC& aAttMaskStr, TUint& aAttMask);
|
sl@0
|
71 |
};
|
sl@0
|
72 |
|
sl@0
|
73 |
#endif /* __FILESERVERUTIL_H__ */
|