sl@0
|
1 |
// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
2 |
// All rights reserved.
|
sl@0
|
3 |
// This component and the accompanying materials are made available
|
sl@0
|
4 |
// under the terms of the License "Eclipse Public License v1.0"
|
sl@0
|
5 |
// which accompanies this distribution, and is available
|
sl@0
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
7 |
//
|
sl@0
|
8 |
// Initial Contributors:
|
sl@0
|
9 |
// Nokia Corporation - initial contribution.
|
sl@0
|
10 |
//
|
sl@0
|
11 |
// Contributors:
|
sl@0
|
12 |
//
|
sl@0
|
13 |
// Description:
|
sl@0
|
14 |
// e32test\defrag\d_defrag.h
|
sl@0
|
15 |
//
|
sl@0
|
16 |
//
|
sl@0
|
17 |
|
sl@0
|
18 |
#if !defined(__D_DEFRAG_H__)
|
sl@0
|
19 |
#define __D_DEFRAG_H__
|
sl@0
|
20 |
#include <e32cmn.h>
|
sl@0
|
21 |
#ifndef __KERNEL_MODE__
|
sl@0
|
22 |
#include <e32std.h>
|
sl@0
|
23 |
#endif
|
sl@0
|
24 |
|
sl@0
|
25 |
|
sl@0
|
26 |
_LIT(KLddName,"DefragRef");
|
sl@0
|
27 |
|
sl@0
|
28 |
class TCapsDefragTestV01
|
sl@0
|
29 |
{
|
sl@0
|
30 |
public:
|
sl@0
|
31 |
TVersion iVersion;
|
sl@0
|
32 |
};
|
sl@0
|
33 |
|
sl@0
|
34 |
/** User-side interface to the defrag LDD
|
sl@0
|
35 |
*/
|
sl@0
|
36 |
class RDefragChannel : public RBusLogicalChannel
|
sl@0
|
37 |
{
|
sl@0
|
38 |
public:
|
sl@0
|
39 |
enum TControl
|
sl@0
|
40 |
{
|
sl@0
|
41 |
EControlGeneralDefragDfc,
|
sl@0
|
42 |
EControlGeneralDefragDfcComplete,
|
sl@0
|
43 |
EControlGeneralDefragSem,
|
sl@0
|
44 |
EControlGeneralDefrag,
|
sl@0
|
45 |
EControlAllocLowestZone,
|
sl@0
|
46 |
EControlClaimLowestZone,
|
sl@0
|
47 |
EControlCloseChunk,
|
sl@0
|
48 |
};
|
sl@0
|
49 |
|
sl@0
|
50 |
public:
|
sl@0
|
51 |
inline TInt Open();
|
sl@0
|
52 |
inline TInt GeneralDefragDfc(TRequestStatus* aReq);
|
sl@0
|
53 |
inline TInt GeneralDefragDfcComplete();
|
sl@0
|
54 |
inline TInt GeneralDefrag();
|
sl@0
|
55 |
inline TInt GeneralDefragSem();
|
sl@0
|
56 |
inline TInt AllocLowestZone();
|
sl@0
|
57 |
inline TInt ClaimLowestZone();
|
sl@0
|
58 |
inline TInt CloseChunk();
|
sl@0
|
59 |
};
|
sl@0
|
60 |
|
sl@0
|
61 |
|
sl@0
|
62 |
#ifndef __KERNEL_MODE__
|
sl@0
|
63 |
inline TInt RDefragChannel::Open()
|
sl@0
|
64 |
{
|
sl@0
|
65 |
return DoCreate(KLddName,TVersion(0,1,1),KNullUnit,NULL,NULL);
|
sl@0
|
66 |
}
|
sl@0
|
67 |
|
sl@0
|
68 |
inline TInt RDefragChannel::GeneralDefragDfc(TRequestStatus* aReq)
|
sl@0
|
69 |
{
|
sl@0
|
70 |
if (aReq != NULL)
|
sl@0
|
71 |
{
|
sl@0
|
72 |
*aReq = KRequestPending;
|
sl@0
|
73 |
}
|
sl@0
|
74 |
return DoControl(EControlGeneralDefragDfc, (TAny*)aReq);
|
sl@0
|
75 |
}
|
sl@0
|
76 |
|
sl@0
|
77 |
inline TInt RDefragChannel::GeneralDefragDfcComplete()
|
sl@0
|
78 |
{
|
sl@0
|
79 |
return DoControl(EControlGeneralDefragDfcComplete);
|
sl@0
|
80 |
}
|
sl@0
|
81 |
|
sl@0
|
82 |
inline TInt RDefragChannel::GeneralDefragSem()
|
sl@0
|
83 |
{ return DoControl(EControlGeneralDefragSem); }
|
sl@0
|
84 |
|
sl@0
|
85 |
inline TInt RDefragChannel::GeneralDefrag()
|
sl@0
|
86 |
{ return DoControl(EControlGeneralDefrag); }
|
sl@0
|
87 |
|
sl@0
|
88 |
inline TInt RDefragChannel::AllocLowestZone()
|
sl@0
|
89 |
{ return DoControl(EControlAllocLowestZone); }
|
sl@0
|
90 |
|
sl@0
|
91 |
inline TInt RDefragChannel::ClaimLowestZone()
|
sl@0
|
92 |
{ return DoControl(EControlClaimLowestZone);}
|
sl@0
|
93 |
|
sl@0
|
94 |
inline TInt RDefragChannel::CloseChunk()
|
sl@0
|
95 |
{ return DoControl(EControlCloseChunk); }
|
sl@0
|
96 |
#endif
|
sl@0
|
97 |
|
sl@0
|
98 |
#endif
|