equal
deleted
inserted
replaced
|
1 // Copyright (c) 2006-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 // |
|
15 |
|
16 #include <e32base.h> |
|
17 #include <e32def.h> |
|
18 #include <bttypes.h> |
|
19 |
|
20 |
|
21 #include <bluetooth/pan/BnepPacketNotifier.h> |
|
22 |
|
23 const TInt KMaxBytesToSniff = 1000; |
|
24 const TInt KTicksToSniff = 4; |
|
25 const TInt KMinBytesToUnSniff = 100; |
|
26 |
|
27 class TByteCount |
|
28 { |
|
29 public: |
|
30 TInt iByteCount; |
|
31 TInt iTickCount; |
|
32 TBTDevAddr iAddr; |
|
33 }; |
|
34 |
|
35 NONSHARABLE_CLASS(CRefBnepPacketNotifier): public CBase, public MBnepPacketNotifier |
|
36 { |
|
37 public: |
|
38 ~CRefBnepPacketNotifier(); |
|
39 static MBnepPacketNotifierBase* NewL(); |
|
40 |
|
41 |
|
42 void MbpnBnepDataTransferred(const TArray<TBnepBytesTransferred> & ); |
|
43 void MbpnSetLinkControl(MPanLinkControlBase& aPanLinkControl); |
|
44 void MbpnDeviceAdded(const TBTDevAddr& aAddr); |
|
45 void MbpnDeviceRemoved(const TBTDevAddr& aAddr); |
|
46 |
|
47 MBnepPacketNotifier* Interface(); |
|
48 TAny* MbpnbGetInterface(const TUid & aInterface); |
|
49 void MbpnbRelease(); |
|
50 |
|
51 private: |
|
52 CRefBnepPacketNotifier(); |
|
53 |
|
54 private: |
|
55 MPanLinkControl* iPanLinkControl; |
|
56 RArray<TByteCount> iCounter; |
|
57 }; |