0
|
1 |
// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
2 |
// All rights reserved.
|
|
3 |
// This component and the accompanying materials are made available
|
|
4 |
// under the terms of the License "Eclipse Public License v1.0"
|
|
5 |
// which accompanies this distribution, and is available
|
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
7 |
//
|
|
8 |
// Initial Contributors:
|
|
9 |
// Nokia Corporation - initial contribution.
|
|
10 |
//
|
|
11 |
// Contributors:
|
|
12 |
//
|
|
13 |
// Description:
|
|
14 |
// f32test\plugins\format\t_formathook.h
|
|
15 |
//
|
|
16 |
//
|
|
17 |
|
|
18 |
#if !defined(__T_FORMATHOOK_H__)
|
|
19 |
#define __T_FORMATHOOK_H__
|
|
20 |
|
|
21 |
#include <f32plugin.h>
|
|
22 |
|
|
23 |
|
|
24 |
/**
|
|
25 |
A test hook plugin for testing intercepting of RFormat IPCs
|
|
26 |
|
|
27 |
@internalComponent
|
|
28 |
*/
|
|
29 |
class CFormatHook: public CFsPlugin
|
|
30 |
{
|
|
31 |
public:
|
|
32 |
|
|
33 |
static CFormatHook* NewL();
|
|
34 |
~CFormatHook();
|
|
35 |
|
|
36 |
virtual void InitialiseL();
|
|
37 |
virtual TInt DoRequestL(TFsPluginRequest& aRequest);
|
|
38 |
|
|
39 |
private:
|
|
40 |
|
|
41 |
CFormatHook();
|
|
42 |
|
|
43 |
TInt FormatPluginName(TDes& aName);
|
|
44 |
|
|
45 |
TInt VsDriveFormatOpen(TFsPluginRequest& aRequest);
|
|
46 |
TInt VsDriveFormatNext(TFsPluginRequest& aRequest);
|
|
47 |
TInt VsDriveFormatClose(TFsPluginRequest& aRequest);
|
|
48 |
|
|
49 |
private:
|
|
50 |
|
|
51 |
/*
|
|
52 |
The sequence of events that this test plugin should
|
|
53 |
receive in order.
|
|
54 |
*/
|
|
55 |
enum TFormatInterceptTestStage
|
|
56 |
{
|
|
57 |
ETestNotStarted = 0,
|
|
58 |
EPreFormatOpen,
|
|
59 |
EPostFormatOpen,
|
|
60 |
EPreFormatNext,
|
|
61 |
EPostFormatNext,
|
|
62 |
EPreFormatSubClose,
|
|
63 |
EPostFormatSubClose
|
|
64 |
};
|
|
65 |
|
|
66 |
TFormatInterceptTestStage iFormatInterceptTestStage;
|
|
67 |
|
|
68 |
}; // class CFormatHook
|
|
69 |
|
|
70 |
#endif // __T_FORMATHOOK_H__
|