|
1 /* |
|
2 * Copyright (c) 2002 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: Declares authentication (PIN query) notifier class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef BTNPINNOTIFIER_H |
|
20 #define BTNPINNOTIFIER_H |
|
21 |
|
22 // INCLUDES |
|
23 |
|
24 #include "btnpairnotifier.h" // Base class |
|
25 |
|
26 class MBTEngDevManObserver; |
|
27 |
|
28 // CLASS DECLARATION |
|
29 /** |
|
30 * This class is used to ask PIN code from user. |
|
31 */ |
|
32 NONSHARABLE_CLASS(CBTPinNotifier): public CBTNPairNotifierBase |
|
33 { |
|
34 public: // Constructors and destructor |
|
35 |
|
36 /** |
|
37 * Two-phased constructor. |
|
38 */ |
|
39 static CBTPinNotifier* NewL(); // Constructor (public) |
|
40 |
|
41 /** |
|
42 * Destructor. |
|
43 */ |
|
44 virtual ~CBTPinNotifier(); // Destructor |
|
45 |
|
46 private: |
|
47 /** |
|
48 * From CBTNotifierBase Called when a notifier is first loaded |
|
49 * to allow any initial construction that is required. |
|
50 * @param None. |
|
51 * @return A structure containing priority and channel info. |
|
52 */ |
|
53 TNotifierInfo RegisterL(); |
|
54 |
|
55 /** |
|
56 * From CBTNotifierBase Used in asynchronous notifier launch to |
|
57 * store received parameters into members variables and |
|
58 * make needed initializations. |
|
59 * @param aBuffer A buffer containing received parameters |
|
60 * @param aReturnVal The return value to be passed back. |
|
61 * @param aMessage Should be completed when the notifier is deactivated. |
|
62 * @return None. |
|
63 */ |
|
64 void GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage); // Get input parameters |
|
65 |
|
66 /** |
|
67 * From CBTNotifierBase |
|
68 * Show queries to ask user response and return it to caller by completing message. |
|
69 */ |
|
70 void HandleGetDeviceCompletedL(const CBTDevice* aDev); |
|
71 |
|
72 /** |
|
73 * From CBTNPairNotifierBase |
|
74 * Generate prompt in Pin query dialog. |
|
75 */ |
|
76 HBufC* GenerateQueryPromoptLC(); |
|
77 |
|
78 private: |
|
79 |
|
80 /** |
|
81 * C++ default constructor. |
|
82 */ |
|
83 CBTPinNotifier(); // Default constructor |
|
84 |
|
85 /** |
|
86 * Checks and sets iPinCode to '0000', used with automated pairing for headsets. |
|
87 */ |
|
88 TBool CheckAndSetAutomatedPairing(); |
|
89 |
|
90 private: // Data |
|
91 TUint iPasskeyLength; |
|
92 TBTPinCode iPinCode; |
|
93 TBTRegistryQueryState iBTRegistryQueryState; |
|
94 TBool iLocallyInitiated; |
|
95 TBool iStrongPinRequired; |
|
96 |
|
97 }; |
|
98 |
|
99 #endif |
|
100 |
|
101 // End of File |