|
1 // Copyright (c) 1997-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 "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 // Implementation of packet driver interface for the ethernet packet driver |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 @internalComponent |
|
21 */ |
|
22 |
|
23 #if !defined(__CARDDRV_H__) |
|
24 #define __CARDDRV_H__ |
|
25 |
|
26 #include "eth_log.h" |
|
27 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS |
|
28 #include <comms-infras/nifprvar_internal.h> |
|
29 #endif |
|
30 |
|
31 |
|
32 const TInt KEtherBufSize = 1540; |
|
33 const TUint KPcCardDrvMajorVersionNumber=1; |
|
34 const TUint KPcCardDrvMinorVersionNumber=0; |
|
35 const TUint KPcCardDrvBuildVersionNumber=1; |
|
36 |
|
37 /** |
|
38 @internalComponent |
|
39 */ |
|
40 NONSHARABLE_CLASS(CPcCardPktDrvFactory) : public CPktDrvFactory |
|
41 { |
|
42 public: |
|
43 CPcCardPktDrvFactory(); |
|
44 virtual CPktDrvBase* NewDriverL(CLANLinkCommon* aParent); |
|
45 virtual TVersion Version() const; |
|
46 }; |
|
47 |
|
48 class CPcCardControlEngine; |
|
49 /** |
|
50 @internalComponent |
|
51 */ |
|
52 NONSHARABLE_CLASS(CPcCardPktDrv) : public CPktDrvBase |
|
53 { |
|
54 public: |
|
55 CPcCardPktDrv(CPktDrvFactory& aFactory); |
|
56 virtual ~CPcCardPktDrv(); |
|
57 virtual void ConstructL(CLANLinkCommon* aParent); |
|
58 virtual TInt StartInterface(); |
|
59 virtual TInt StopInterface(); |
|
60 virtual TInt ResetInterface(); |
|
61 virtual TInt SetRxMode(TRxMode AMode); |
|
62 virtual TInt GetRxMode() const; |
|
63 virtual TInt AccessType(); |
|
64 virtual TInt ReleaseType(); |
|
65 virtual TInt SetInterfaceAddress(const THWAddr&); |
|
66 virtual TUint8* GetInterfaceAddress()const; |
|
67 virtual TInt GetMulticastList(const THWAddr* aAddr, TInt& n) const; |
|
68 virtual TInt SetMulticastList(const THWAddr* aAddr, TInt n); |
|
69 virtual TInt InterfacePowerUp(); |
|
70 virtual TInt InterfacePowerDown(); |
|
71 virtual TInt InterfaceSleep(); |
|
72 virtual TInt InterfaceResume(); |
|
73 virtual TInt Notification(enum TAgentToNifEventType aEvent, void* aInfo); |
|
74 virtual TInt Control(TUint aLevel,TUint aName,TDes8& aOption, TAny* aSource=0); |
|
75 |
|
76 // Upcall from Control Object |
|
77 void ReadDataAvailable(TDesC8& aBuffer); |
|
78 void ResumeSending(); |
|
79 CLANLinkCommon* NifNotify(); |
|
80 |
|
81 virtual TInt Send(RMBufChain& aPkt); //< CPktDrvBase |
|
82 void LinkLayerUp(); |
|
83 |
|
84 private: |
|
85 CPcCardControlEngine* iControl; |
|
86 #ifdef __LOGDEB__ |
|
87 RFs iFs; |
|
88 #endif |
|
89 |
|
90 }; |
|
91 |
|
92 #endif |