|
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 power mode setting notifier class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef BTNPAIREDDEVSETTNOTIFIER_H |
|
20 #define BTNPAIREDDEVSETTNOTIFIER_H |
|
21 |
|
22 // INCLUDES |
|
23 #include "btnotifier.h" // Base class |
|
24 |
|
25 // FORWARD DECLARATIONS |
|
26 |
|
27 // CLASS DECLARATION |
|
28 NONSHARABLE_CLASS(CBTPairedDevSettNotifier) : public CBTNotifierBase |
|
29 { |
|
30 public: // Constructors and destructor |
|
31 |
|
32 /** |
|
33 * Two-phased constructor. |
|
34 */ |
|
35 static CBTPairedDevSettNotifier* NewL(); |
|
36 |
|
37 /** |
|
38 * Destructor. |
|
39 */ |
|
40 virtual ~CBTPairedDevSettNotifier(); |
|
41 |
|
42 private: // Functions from base classes |
|
43 |
|
44 /** |
|
45 * From CBTNotifierBase Called when a notifier is first loaded |
|
46 * to allow any initial construction that is required. |
|
47 * @param None. |
|
48 * @return A structure containing priority and channel info. |
|
49 */ |
|
50 TNotifierInfo RegisterL(); |
|
51 |
|
52 /** |
|
53 * From CBTNotifierBase The notifier has been deactivated |
|
54 * so resources can be freed and outstanding messages completed. |
|
55 * @param None. |
|
56 * @return None. |
|
57 */ |
|
58 void Cancel(); |
|
59 |
|
60 /** |
|
61 * From CBTNotifierBase Used in asynchronous notifier launch to |
|
62 * store received parameters into members variables and |
|
63 * make needed initializations. |
|
64 * @param aBuffer A buffer containing received parameters |
|
65 * @param aReturnVal The return value to be passed back. |
|
66 * @param aMessage Should be completed when the notifier is deactivated. |
|
67 * @return None. |
|
68 */ |
|
69 void GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage); |
|
70 |
|
71 /** |
|
72 * From CBTNotifierBase Updates a currently active notifier. |
|
73 * @param aBuffer The updated data. |
|
74 * @return A pointer to return value. |
|
75 */ |
|
76 TPtrC8 UpdateL(const TDesC8& aBuffer); |
|
77 |
|
78 /** |
|
79 * From CBTNotifierBase |
|
80 */ |
|
81 void HandleGetDeviceCompletedL(const CBTDevice* aDev); |
|
82 |
|
83 private: |
|
84 |
|
85 /** |
|
86 * Leave function called by non-leave btengdevman callback function HandleGetDevicesComplete(). |
|
87 *@param aErr. Passed by caller. |
|
88 */ |
|
89 |
|
90 /** |
|
91 * Parse the data out of the message that is sent by the client of the notifier. |
|
92 * @param aBuffer A package buffer containing received parameters. |
|
93 * @return None. |
|
94 */ |
|
95 void ProcessParamBufferL(const TDesC8& aBuffer); |
|
96 |
|
97 /** |
|
98 * Query to assign the friendly name when adding it into paired device list |
|
99 * if the current device name is not unique in the paired devices view. |
|
100 */ |
|
101 void QueryRenameDeviceL(const CBTDevice& aDevice); |
|
102 |
|
103 /** |
|
104 * C++ default constructor. |
|
105 */ |
|
106 CBTPairedDevSettNotifier(); |
|
107 |
|
108 /** |
|
109 * Process pairing error code to show corresponding notes. |
|
110 * @param aErr The pairing error code from HCI error. |
|
111 * @return The resouce ID of notes |
|
112 */ |
|
113 TInt ProcessPairingErrorCode( const TInt aErr ); |
|
114 |
|
115 private: |
|
116 |
|
117 TSecondaryDisplayBTnotifDialogs iSecondaryDisplayCommand; |
|
118 TBool iIsMessageQuery; |
|
119 TInt iPairingStatus; |
|
120 |
|
121 }; |
|
122 |
|
123 #endif //BTNPAIREDDEVSETTNOTIFIER_H |
|
124 |
|
125 // End of File |