27
|
1 |
// Copyright (c) 2007-2010 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 "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 |
//
|
|
15 |
|
|
16 |
/**
|
|
17 |
@file
|
|
18 |
@internalComponent
|
|
19 |
*/
|
|
20 |
|
|
21 |
#ifndef HCTLUSBORIGINALEVENT_H
|
|
22 |
#define HCTLUSBORIGINALEVENT_H
|
|
23 |
|
|
24 |
#include <e32base.h>
|
|
25 |
#include <bluetooth/hci/hcievents.h>
|
|
26 |
#include <d32usbdi.h>
|
|
27 |
#include <d32usbtransfers.h>
|
|
28 |
|
|
29 |
class CHCTLUsbOriginal;
|
|
30 |
|
|
31 |
NONSHARABLE_CLASS(CHCTLUsbOriginalEvent)
|
|
32 |
: public CActive
|
|
33 |
{
|
|
34 |
private:
|
|
35 |
static const TInt KEndpointNumber = 0x81;
|
|
36 |
|
|
37 |
public:
|
|
38 |
static CHCTLUsbOriginalEvent* NewL(CHCTLUsbOriginal& aHCTLUsbOriginal, RUsbInterface& aInterface);
|
|
39 |
~CHCTLUsbOriginalEvent();
|
|
40 |
|
|
41 |
// Called to initiate the initial read on the port.
|
|
42 |
void Start();
|
|
43 |
|
|
44 |
private:
|
|
45 |
CHCTLUsbOriginalEvent(CHCTLUsbOriginal& aHCTLUsbOriginal, RUsbInterface& aInterface);
|
|
46 |
void ConstructL();
|
|
47 |
|
|
48 |
void QueueRead();
|
|
49 |
|
|
50 |
private: // from CActive
|
|
51 |
virtual void RunL();
|
|
52 |
virtual void DoCancel();
|
|
53 |
virtual TInt RunError(TInt aError);
|
|
54 |
|
|
55 |
private:
|
|
56 |
CHCTLUsbOriginal& iHCTLUsbOriginal;
|
|
57 |
RUsbInterface& iInterface;
|
|
58 |
RUsbPipe iPipe;
|
|
59 |
RUsbIntrTransferDescriptor iTransfer;
|
|
60 |
};
|
|
61 |
|
|
62 |
#endif // HCTLUSBORIGINALEVENT_H
|
|
63 |
|