williamr@4
|
1 |
// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
|
williamr@4
|
2 |
// All rights reserved.
|
williamr@4
|
3 |
// This component and the accompanying materials are made available
|
williamr@4
|
4 |
// under the terms of the License "Eclipse Public License v1.0"
|
williamr@4
|
5 |
// which accompanies this distribution, and is available
|
williamr@4
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
williamr@4
|
7 |
//
|
williamr@4
|
8 |
// Initial Contributors:
|
williamr@4
|
9 |
// Nokia Corporation - initial contribution.
|
williamr@4
|
10 |
//
|
williamr@4
|
11 |
// Contributors:
|
williamr@4
|
12 |
//
|
williamr@4
|
13 |
// Description:
|
williamr@4
|
14 |
//
|
williamr@4
|
15 |
|
williamr@4
|
16 |
/**
|
williamr@4
|
17 |
@file
|
williamr@4
|
18 |
@internalComponent
|
williamr@4
|
19 |
*/
|
williamr@4
|
20 |
|
williamr@4
|
21 |
#ifndef USBDI_CHANNEL_H
|
williamr@4
|
22 |
#define USBDI_CHANNEL_H
|
williamr@4
|
23 |
|
williamr@4
|
24 |
class DUsbInterface;
|
williamr@4
|
25 |
class DUsbPageList;
|
williamr@4
|
26 |
|
williamr@4
|
27 |
/**
|
williamr@4
|
28 |
Logical Device (factory class) for USBDI
|
williamr@4
|
29 |
*/
|
williamr@4
|
30 |
NONSHARABLE_CLASS(DUsbdiFactory) : public DLogicalDevice
|
williamr@4
|
31 |
{
|
williamr@4
|
32 |
public:
|
williamr@4
|
33 |
DUsbdiFactory();
|
williamr@4
|
34 |
~DUsbdiFactory();
|
williamr@4
|
35 |
|
williamr@4
|
36 |
private:
|
williamr@4
|
37 |
// Inherited from DLogicalDevice
|
williamr@4
|
38 |
virtual TInt Install();
|
williamr@4
|
39 |
virtual void GetCaps(TDes8& aDes) const;
|
williamr@4
|
40 |
virtual TInt Create(DLogicalChannelBase*& aChannel);
|
williamr@4
|
41 |
};
|
williamr@4
|
42 |
|
williamr@4
|
43 |
|
williamr@4
|
44 |
NONSHARABLE_CLASS(DUsbdiChannel) : public DLogicalChannelBase
|
williamr@4
|
45 |
{
|
williamr@4
|
46 |
public:
|
williamr@4
|
47 |
DUsbdiChannel();
|
williamr@4
|
48 |
|
williamr@4
|
49 |
TInt DoCreate(TInt aUnit, const TDesC8* aInfo, const TVersion& aVer);
|
williamr@4
|
50 |
TInt Request(TInt aReqNo, TAny* a1, TAny* a2);
|
williamr@4
|
51 |
|
williamr@4
|
52 |
virtual void CloseChannel();
|
williamr@4
|
53 |
|
williamr@4
|
54 |
private:
|
williamr@4
|
55 |
~DUsbdiChannel();
|
williamr@4
|
56 |
TInt Close();
|
williamr@4
|
57 |
|
williamr@4
|
58 |
TInt AllocChunk(TInt aRequestSize, TInt* aChunkHandle, TInt* aOffset);
|
williamr@4
|
59 |
void CloseChunk();
|
williamr@4
|
60 |
|
williamr@4
|
61 |
TInt HandleControl(TInt aReqNo, TAny* a1, TAny* a2);
|
williamr@4
|
62 |
TInt HandleRequest(TInt aReqNo, TRequestStatus* aReq, TAny* a1, TAny* a2);
|
williamr@4
|
63 |
TInt HandleCancel(TUint aCancelMask);
|
williamr@4
|
64 |
|
williamr@4
|
65 |
private:
|
williamr@4
|
66 |
DUsbInterface* iInterface;
|
williamr@4
|
67 |
DUsbPageList* iPageList; // Owns the shared chunk
|
williamr@4
|
68 |
};
|
williamr@4
|
69 |
|
williamr@4
|
70 |
#endif
|