|
1 /* |
|
2 * Copyright (c) 2010 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 User confirmation notifier for Secure Simle Pairing |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef BTUSERCONFNOTIFIER_H |
|
20 #define BTUSERCONFNOTIFIER_H |
|
21 |
|
22 // INCLUDES |
|
23 |
|
24 #include "btnpairnotifier.h" // Base class |
|
25 |
|
26 // These declarations are here temporarily so the submission of the notifiers and the stack do not have to be synchronised. |
|
27 // Should be removed once all submissions are in. |
|
28 |
|
29 const TUid KBTUserConfirmationNotifierUidCopy={0x2002E224}; |
|
30 |
|
31 NONSHARABLE_CLASS(TBTNotifierParams2Copy) |
|
32 { |
|
33 public: |
|
34 inline TBTDevAddr DeviceAddress() const { return iBDAddr; }; |
|
35 inline TPtrC DeviceName() const { return iName; }; |
|
36 private: |
|
37 TBTDevAddr iBDAddr; |
|
38 TBTDeviceName iName; |
|
39 |
|
40 // This data padding has been added to help prevent future binary compatibility breaks |
|
41 // Neither iPadding1 nor iPadding2 have been zero'd because they are currently not used |
|
42 TUint32 iPadding1; |
|
43 TUint32 iPadding2; |
|
44 }; |
|
45 |
|
46 NONSHARABLE_CLASS(TBTUserConfirmationParamsCopy) |
|
47 : public TBTNotifierParams2Copy |
|
48 { |
|
49 public: |
|
50 inline TBool LocallyInitiated() const { return iLocallyInitiated; }; |
|
51 private: |
|
52 TBool iLocallyInitiated; |
|
53 |
|
54 // This data padding has been added to help prevent future binary compatibility breaks |
|
55 // Neither iPadding1 nor iPadding2 have been zero'd because they are currently not used |
|
56 TUint32 iPadding1; |
|
57 TUint32 iPadding2; |
|
58 }; |
|
59 |
|
60 typedef TPckgBuf<TBTUserConfirmationParamsCopy> TBTUserConfirmationParamsPckgCopy; |
|
61 |
|
62 // CLASS DECLARATION |
|
63 /** |
|
64 * This class is used to ask user to compare passcode in two devices. |
|
65 */ |
|
66 |
|
67 |
|
68 NONSHARABLE_CLASS(CBTUserConfNotifier): public CBTNPairNotifierBase |
|
69 { |
|
70 public: // Constructors and destructor |
|
71 |
|
72 /** |
|
73 * Two-phased constructor. |
|
74 */ |
|
75 static CBTUserConfNotifier* NewL(); // Constructor (public) |
|
76 |
|
77 /** |
|
78 * Destructor. |
|
79 */ |
|
80 virtual ~CBTUserConfNotifier(); // Destructor |
|
81 |
|
82 private: |
|
83 /** |
|
84 * From CBTNotifierBase Called when a notifier is first loaded |
|
85 * to allow any initial construction that is required. |
|
86 * @param None. |
|
87 * @return A structure containing priority and channel info. |
|
88 */ |
|
89 TNotifierInfo RegisterL(); |
|
90 |
|
91 |
|
92 /** |
|
93 * From CBTNotifierBase Used in asynchronous notifier launch to |
|
94 * store received parameters into members variables and |
|
95 * make needed initializations. |
|
96 * @param aBuffer A buffer containing received parameters |
|
97 * @param aReturnVal The return value to be passed back. |
|
98 * @param aMessage Should be completed when the notifier is deactivated. |
|
99 * @return None. |
|
100 */ |
|
101 void GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage); // Get input parameters |
|
102 |
|
103 /** |
|
104 * From CBTNotifierBase |
|
105 * Show notes to ask user response and return to Notifier caller by completing message. |
|
106 */ |
|
107 void HandleGetDeviceCompletedL(const CBTDevice* aDev); |
|
108 |
|
109 private: |
|
110 |
|
111 /** |
|
112 * C++ default constructor. |
|
113 */ |
|
114 CBTUserConfNotifier(); // Default constructor |
|
115 }; |
|
116 |
|
117 #endif |
|
118 |
|
119 // End of File |