1 /* |
|
2 * Copyright (c) 2004-2007 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: Contains the CBtOnQuery class definition. This Implementation is used to avoid |
|
15 * User::WaitForRequest() function and ViewServer 11 panic when BT naming query is activated. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef BTONQUERY_H |
|
21 #define BTONQUERY_H |
|
22 |
|
23 #include <e32base.h> |
|
24 |
|
25 class MBTOnNotify; |
|
26 |
|
27 class CBtOnQuery : public CActive |
|
28 { |
|
29 public: // construction / destruction |
|
30 |
|
31 /** |
|
32 * NewL() |
|
33 * Create a CBtOnQuery object |
|
34 * @param aNotify notifier to the calling object |
|
35 * @return a pointer to the created instance of CBtOnQuery |
|
36 */ |
|
37 static CBtOnQuery* NewL( MBTOnNotify& aNotify ); |
|
38 |
|
39 /** |
|
40 * NewLC() |
|
41 * Create a CBtOnQuery object |
|
42 * @param aNotify notifier to the calling object |
|
43 * @return a pointer to the created instance of CBtOnQuery |
|
44 */ |
|
45 static CBtOnQuery* NewLC( MBTOnNotify& aNotify ); |
|
46 |
|
47 /** |
|
48 * ~CBtOnQuery() |
|
49 * Destroy the object and release all memory objects |
|
50 */ |
|
51 ~CBtOnQuery(); |
|
52 |
|
53 public: // new functions |
|
54 |
|
55 /** |
|
56 * IsBluetoothOn() |
|
57 * Starts this Active object |
|
58 */ |
|
59 void IsBluetoothOn(); |
|
60 |
|
61 protected: // from CActive |
|
62 |
|
63 /** |
|
64 * RunL() |
|
65 * Respond to an event |
|
66 */ |
|
67 void RunL(); |
|
68 |
|
69 /** |
|
70 * RunError() |
|
71 * Handles errors which is throwed by RunL() function |
|
72 */ |
|
73 void RunError(); |
|
74 |
|
75 /** |
|
76 * DoCancel |
|
77 * Cancel any outstanding requests |
|
78 */ |
|
79 void DoCancel(); |
|
80 |
|
81 protected: // construction |
|
82 |
|
83 /** |
|
84 * CBtOnQuery() |
|
85 * @param aNotify notifier to the calling object |
|
86 */ |
|
87 CBtOnQuery( MBTOnNotify& aNotify ); |
|
88 |
|
89 /** |
|
90 * ConstructL() |
|
91 * Standard second phase construction |
|
92 */ |
|
93 void ConstructL(); |
|
94 |
|
95 private: // data |
|
96 MBTOnNotify &iNotify; |
|
97 RNotifier iNotif; |
|
98 TPckgBuf<TBool> iResultPckg; |
|
99 }; |
|
100 |
|
101 #endif // BTONQUERY_H |
|
102 |
|
103 // End of File |
|