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 |
#ifndef MMCLDD_H_
|
sl@0
|
20 |
#define MMCLDD_H_
|
sl@0
|
21 |
|
sl@0
|
22 |
#include <mmc.h>
|
sl@0
|
23 |
#include "LddAsyncRequest.h"
|
sl@0
|
24 |
|
sl@0
|
25 |
/**
|
sl@0
|
26 |
* LDD factory object for MMCSD
|
sl@0
|
27 |
*
|
sl@0
|
28 |
*/
|
sl@0
|
29 |
class DLddFactoryMmcCntrlInterface : public DLogicalDevice
|
sl@0
|
30 |
{
|
sl@0
|
31 |
public:
|
sl@0
|
32 |
DLddFactoryMmcCntrlInterface();
|
sl@0
|
33 |
virtual ~DLddFactoryMmcCntrlInterface();
|
sl@0
|
34 |
virtual TInt Install();
|
sl@0
|
35 |
virtual void GetCaps(TDes8 &aDes) const;
|
sl@0
|
36 |
virtual TInt Create(DLogicalChannelBase*& aChannel); //overriding pure virtual
|
sl@0
|
37 |
};
|
sl@0
|
38 |
|
sl@0
|
39 |
|
sl@0
|
40 |
/**
|
sl@0
|
41 |
* MMCSD LDD logical channel
|
sl@0
|
42 |
*
|
sl@0
|
43 |
*/
|
sl@0
|
44 |
class DLddMmcCntrlInterface : public DLogicalChannel , MAsyncRequestObserver
|
sl@0
|
45 |
{
|
sl@0
|
46 |
public:
|
sl@0
|
47 |
DLddMmcCntrlInterface();
|
sl@0
|
48 |
~DLddMmcCntrlInterface();
|
sl@0
|
49 |
protected:
|
sl@0
|
50 |
virtual TInt DoCreate(TInt aUnit, const TDesC8* anInfo, const TVersion& aVer);
|
sl@0
|
51 |
virtual void HandleMsg(class TMessageBase *);
|
sl@0
|
52 |
private:
|
sl@0
|
53 |
void DoCancel(TInt aReqNo);
|
sl@0
|
54 |
TInt DoControl(TInt aFunction, TAny* a1, TAny* a2);
|
sl@0
|
55 |
TInt MediaChangeDoControl(TInt aFunction, TAny* a1, TAny* a2);
|
sl@0
|
56 |
TInt PsuDoControl(TInt aFunction, TAny* a1, TAny* a2);
|
sl@0
|
57 |
TInt SocketDoControl(TInt aFunction, TAny* a1, TAny* a2);
|
sl@0
|
58 |
TInt StackDoControl(TInt aFunction, TAny* a1, TAny* a2);
|
sl@0
|
59 |
|
sl@0
|
60 |
// async request methods
|
sl@0
|
61 |
TInt DoRequest(TInt aFunction, TRequestStatus* aStatus, TAny* a1, TAny* a2);
|
sl@0
|
62 |
TInt SocketDoRequest(TRequestStatus* aStatus, TAny* a1, TAny *a2, TInt aCommand);
|
sl@0
|
63 |
TInt StackConfigureEffectiveModes(TInt aEffectiveModesFunctionId, TAny* aParam);
|
sl@0
|
64 |
|
sl@0
|
65 |
// FROM MAsyncRequestObserver
|
sl@0
|
66 |
virtual void Notify(DLddAsyncRequest& aRequest);
|
sl@0
|
67 |
|
sl@0
|
68 |
private:
|
sl@0
|
69 |
enum TMmcAsyncCmd {EMmcSesNone,EMmcSesReadBlk,EMmcSesWriteBlk, EMmcSesReadCSD, EMmcSesReadExtCSD, EMMcSocketPowerUp, EMMcStackPowerUp};
|
sl@0
|
70 |
DMmcSessionAsyncRequest* CreateAsyncSessionRequest(TMmcAsyncCmd aCommand, TRequestStatus* aStatus);
|
sl@0
|
71 |
DBusEventRequest* CreateAsyncBusEventRequest(TMmcAsyncCmd aCommand, TRequestStatus* aStatus, TInt aUnit);
|
sl@0
|
72 |
|
sl@0
|
73 |
|
sl@0
|
74 |
TBool RequestStatusExists(TRequestStatus* aStatus);
|
sl@0
|
75 |
void ClearRequest(DLddAsyncRequest* aRequest);
|
sl@0
|
76 |
|
sl@0
|
77 |
private:
|
sl@0
|
78 |
enum TPanic {EReadDes,EWriteDes,EWriteTInt,EUnknownMmcSes};
|
sl@0
|
79 |
TInt iStackNum;
|
sl@0
|
80 |
DMMCPsu* iPsu;
|
sl@0
|
81 |
DMMCMediaChange* iMediaChange;
|
sl@0
|
82 |
DMMCSocket* iSocket;
|
sl@0
|
83 |
DMMCStack* iStack;
|
sl@0
|
84 |
TMMCard* iCard;
|
sl@0
|
85 |
|
sl@0
|
86 |
DThread* iClient;
|
sl@0
|
87 |
TCSD iCSD;
|
sl@0
|
88 |
TExtendedCSD iExtendedCSD;
|
sl@0
|
89 |
TBool iIsSD;
|
sl@0
|
90 |
RPointerArray<DLddAsyncRequest> iAsyncList;
|
sl@0
|
91 |
TMMCStackConfig iStackConfig;
|
sl@0
|
92 |
TInt iUnit;
|
sl@0
|
93 |
};
|
sl@0
|
94 |
|
sl@0
|
95 |
#endif /*MMCLDD_H_*/
|