|
1 // Copyright (c) 2003-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 // btbbsockethelpers.h |
|
15 // BT socket interface types |
|
16 // |
|
17 // |
|
18 |
|
19 #ifndef BTBBSOCKETHELPERS_H |
|
20 #define BTBBSOCKETHELPERS_H |
|
21 //============================================================================= |
|
22 //Active Objects |
|
23 // |
|
24 |
|
25 //CBluetoothPhysicalLinks Active Objects... |
|
26 NONSHARABLE_CLASS(CBTBasebandConnecter) : public CActive |
|
27 { |
|
28 public: |
|
29 static CBTBasebandConnecter* NewL(CBluetoothPhysicalLinks& aParent); |
|
30 void BasebandConnect(const TBTDevAddr& aBDAddr); |
|
31 |
|
32 ~CBTBasebandConnecter(); |
|
33 |
|
34 |
|
35 private: |
|
36 CBTBasebandConnecter(CBluetoothPhysicalLinks& aParent); |
|
37 void ConstructL(); |
|
38 void DoCancel(); |
|
39 void RunL(); |
|
40 TInt RunError(TInt aError); |
|
41 |
|
42 CBluetoothPhysicalLinks& iParent; |
|
43 }; |
|
44 |
|
45 |
|
46 NONSHARABLE_CLASS(CBTDisconnector) : public CActive |
|
47 { |
|
48 public: |
|
49 static CBTDisconnector* NewL(CBluetoothPhysicalLinks& aParent); |
|
50 void Disconnect(const TBTDevAddr& aBDAddr); |
|
51 void DisconnectAll(); |
|
52 ~CBTDisconnector(); |
|
53 |
|
54 |
|
55 private: |
|
56 enum TCurrentRequest |
|
57 { |
|
58 ENone, |
|
59 EDisconnect, |
|
60 EDisconnectAll, |
|
61 }; |
|
62 CBTDisconnector(CBluetoothPhysicalLinks& aParent); |
|
63 void ConstructL(); |
|
64 void DoCancel(); |
|
65 void RunL(); |
|
66 TInt RunError(TInt aError); |
|
67 |
|
68 CBluetoothPhysicalLinks& iParent; |
|
69 TCurrentRequest iCurrentRequest; |
|
70 }; |
|
71 |
|
72 #endif |