equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * This class implements a handler, which sets the physical link to |
|
16 * sniff-mode when the SAP link is inactive for some time |
|
17 * |
|
18 * |
|
19 */ |
|
20 |
|
21 |
|
22 #ifndef BT_SAP_SNIFF_HANDLER_H |
|
23 #define BT_SAP_SNIFF_HANDLER_H |
|
24 |
|
25 // INCLUDES |
|
26 #include <e32base.h> |
|
27 #include <bt_sock.h> |
|
28 |
|
29 // CLASS DECLARATION |
|
30 |
|
31 NONSHARABLE_CLASS(CBTSapSniffHandler) : public CTimer |
|
32 { |
|
33 public: |
|
34 |
|
35 // Constructor |
|
36 static CBTSapSniffHandler* NewL(RSocket& aSocket, RSocketServ& aSocketServer); |
|
37 |
|
38 // Destructor |
|
39 ~CBTSapSniffHandler(); |
|
40 |
|
41 private: // From CActive |
|
42 |
|
43 /** |
|
44 * RunL is called by framework after request is being completed. |
|
45 * @param nones |
|
46 * @return none |
|
47 */ |
|
48 void RunL(); |
|
49 |
|
50 public: |
|
51 |
|
52 void Enable(); |
|
53 void Disable(); |
|
54 void Pause(); |
|
55 |
|
56 private: |
|
57 |
|
58 // Default constructor |
|
59 CBTSapSniffHandler(RSocket& aSocket, RSocketServ& aSocketServer); |
|
60 |
|
61 private: |
|
62 |
|
63 RSocket& iSocket; // Data socket |
|
64 RSocketServ& iSocketServer; // Socket server |
|
65 TBool iIsLinkAdapterOpen; // Keep physical link adapter's state |
|
66 RBTPhysicalLinkAdapter iBTLinkAdapter; // Sniff mode controller |
|
67 |
|
68 }; |
|
69 |
|
70 #endif // BT_SAP_SNIFF_HANDLER_H |
|
71 |
|
72 // End of File |