|
1 /* |
|
2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
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". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #if (!defined __T_MMCSD_DRIVER_DATA_H__) |
|
20 #define __T_MMCSD_DRIVER_DATA_H__ |
|
21 |
|
22 |
|
23 // User Includes |
|
24 #include "T_RBusLogicalChannelData.h" |
|
25 #include "d_mmcsdif.h" |
|
26 #include "ActiveCallbackWrap.h" |
|
27 |
|
28 /** |
|
29 * Test Active Notification class |
|
30 * |
|
31 */ |
|
32 |
|
33 |
|
34 class CT_MmcSDDriverData : public CDataWrapperBase |
|
35 { |
|
36 public: |
|
37 /** |
|
38 * Public destructor |
|
39 */ |
|
40 ~CT_MmcSDDriverData(); |
|
41 |
|
42 virtual TAny* GetObject(); |
|
43 virtual TBool DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex); |
|
44 |
|
45 protected: |
|
46 /** |
|
47 * Protected constructor. First phase construction |
|
48 */ |
|
49 CT_MmcSDDriverData(); |
|
50 void ConstructL(); |
|
51 |
|
52 void DoCmdConstructorL(const TDesC& aSection); |
|
53 void DoCmdDestructor(); |
|
54 |
|
55 TInt GetExpectedAsyncError(const TDesC& aSection); |
|
56 void DoCmdReadSectorL(const TDesC& aSection, TInt aAsyncErrorIndex); |
|
57 void DoCmdWriteSectorL(const TDesC& aSection, TInt aAsyncErrorIndex); |
|
58 void DoCmdReadCSD(); |
|
59 void DoCmdReadExtCSD(); |
|
60 void DoCmdReadCSDL(const TDesC& aSection, TInt aAsyncErrorIndex); |
|
61 void DoCmdReadExtCSDL(const TDesC& aSection, TInt aAsyncErrorIndex); |
|
62 void DoCmdCardInfo(const TDesC& aSection); |
|
63 void DoCmdCardIsPresent(const TDesC& aSection); |
|
64 void DoCmdCardIsReady(const TDesC& aSection); |
|
65 void DoCmdCardIsLocked(const TDesC& aSection); |
|
66 void PrintCSD(const TCSDInfo& aCSDInfo); |
|
67 void PrintExtendedCSD(const TExtendedCSDInfo& aExtendedCSDInfo); |
|
68 |
|
69 |
|
70 protected: |
|
71 void RunL(CActive* aActive, TInt aIndex); |
|
72 void DoCancel(CActive* aActive); |
|
73 CActiveCallbackWrap* CreateActiveCallbackL(TInt aFunctionId, TInt aExpectedAsyncError); |
|
74 void DeleteActiveCallback(CActiveCallback* activeCallbackWrap); |
|
75 |
|
76 protected: |
|
77 RMMCSDTestControllerInterface* iMmcSDController; |
|
78 RPointerArray<CActiveCallbackWrap> iActiveCallbacks; |
|
79 |
|
80 private: |
|
81 TInt iStackNum; |
|
82 TInt iAsyncErrorIndex; |
|
83 RFs iFs; |
|
84 }; |
|
85 |
|
86 #endif /* __T_MMCSD_DRIVER_DATA_H__ */ |