1 /* |
|
2 * ============================================================================ |
|
3 * Name : bluetoothdevicedialogs.h |
|
4 * Part of : bluetoothengine / btnotif |
|
5 * Description : Data structures for passing dialog type and formatting between btnotif and the UI component showing the actual dialogs. Also defines identifiers for Bluetooth device dialogs. |
|
6 * |
|
7 * Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
8 * All rights reserved. |
|
9 * This component and the accompanying materials are made available |
|
10 * under the terms of "Eclipse Public License v1.0" |
|
11 * which accompanies this distribution, and is available |
|
12 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
13 * |
|
14 * Initial Contributors: |
|
15 * Nokia Corporation - initial contribution. |
|
16 * |
|
17 * Contributors: |
|
18 * Nokia Corporation |
|
19 * ============================================================================ |
|
20 * Template version: 4.2 |
|
21 */ |
|
22 |
|
23 #ifndef BLUETOOTHDEVICEDIALOGS_H |
|
24 #define BLUETOOTHDEVICEDIALOGS_H |
|
25 |
|
26 #include <btdevice.h> |
|
27 |
|
28 /** Enumeration for the type of notification to be launched. */ |
|
29 enum TBTDialogResourceId |
|
30 { |
|
31 ENoResource, |
|
32 EAuthorization, |
|
33 EIncomingPairing, |
|
34 EPinInput, |
|
35 ENumericComparison, |
|
36 EPasskeyDisplay, |
|
37 EObexPasskeyInput, |
|
38 ESetTrusted, |
|
39 EBlockUnpairedDevice, |
|
40 EBlockPairedDevice, |
|
41 EPairingSuccess, |
|
42 EPairingFailureRetry, |
|
43 EPairingFailureOk, |
|
44 EVisibilityTimeout, |
|
45 EUnpairedDevice, |
|
46 EUnusedResource // The last ID |
|
47 }; |
|
48 |
|
49 |
|
50 /** |
|
51 * TBluetoothDialogParams contains device dialog parameters except for device name and type |
|
52 * |
|
53 * @since Symbian^4 |
|
54 */ |
|
55 NONSHARABLE_CLASS( TBluetoothDialogParams ) |
|
56 { |
|
57 |
|
58 public: |
|
59 |
|
60 /** Enumeration for the type of notification to be launched. */ |
|
61 enum TBTDialogType |
|
62 { |
|
63 EInvalidDialog, |
|
64 ENote, |
|
65 EQuery, |
|
66 EInput, |
|
67 EMoreDevice, |
|
68 EDeviceSearch, |
|
69 ESend, |
|
70 EGlobalNotif, |
|
71 EUserAuthorization, |
|
72 EReceiveProgress, |
|
73 ETransferFailed, |
|
74 EReceiveDone |
|
75 }; |
|
76 |
|
77 /** Enumeration for the notification parameters data type to be configured. */ |
|
78 enum TDialogDataType |
|
79 { |
|
80 ENoParams, |
|
81 EDialogType, |
|
82 EResource, |
|
83 EAddress, |
|
84 EDialogTitle, |
|
85 EDialogExt // Id for first data type of derived class. |
|
86 }; |
|
87 |
|
88 /** Enumeration for the notification dialog heading type. */ |
|
89 enum TDialogTitleDataType |
|
90 { |
|
91 EReceive, |
|
92 EReceiveFromPairedDevice, |
|
93 EConnect, |
|
94 EPairingRequest, |
|
95 ERecvFailed, |
|
96 ESendFailed, |
|
97 EReceiveCompleted |
|
98 }; |
|
99 |
|
100 enum TDialogActionType |
|
101 { |
|
102 EHide, |
|
103 EShow, |
|
104 ECancelReceive, |
|
105 ECancelShow |
|
106 }; |
|
107 |
|
108 inline TBluetoothDialogParams(); |
|
109 |
|
110 public: // data |
|
111 |
|
112 /** |
|
113 * Identifier for the type of notification. |
|
114 */ |
|
115 TInt iDialogType; |
|
116 |
|
117 /** |
|
118 * Identifier for the resource to be shown in the dialog. |
|
119 */ |
|
120 TInt iResourceId; |
|
121 |
|
122 /** |
|
123 * Address of the remote device (not used, for future extension). |
|
124 */ |
|
125 TBTDevAddr iAddr; |
|
126 |
|
127 /** |
|
128 * Unused padding (not used, for future extension). |
|
129 */ |
|
130 TUint32 iPadding; |
|
131 |
|
132 }; |
|
133 |
|
134 |
|
135 /** |
|
136 * TBluetoothDeviceDialog contains more device dialog parameters |
|
137 * |
|
138 * @since Symbian^4 |
|
139 */ |
|
140 NONSHARABLE_CLASS( TBluetoothDeviceDialog ) : public TBluetoothDialogParams |
|
141 { |
|
142 |
|
143 public: |
|
144 |
|
145 /** Enumeration for the notification parameters data type to be configured. */ |
|
146 enum TDialogDataType |
|
147 { |
|
148 ENoParams = TBluetoothDialogParams::EDialogExt, |
|
149 EDeviceName, |
|
150 EDeviceClass, |
|
151 EAdditionalInt, |
|
152 EAdditionalDesc, |
|
153 EReceivingFileName, |
|
154 EReceivingFileSize, |
|
155 EReceivedFileCount |
|
156 }; |
|
157 |
|
158 inline TBluetoothDeviceDialog(); |
|
159 |
|
160 public: // data |
|
161 |
|
162 /** |
|
163 * The name of the remote device. |
|
164 */ |
|
165 TBTDeviceName iDeviceName; |
|
166 |
|
167 /** |
|
168 * The class of device of the remote device. |
|
169 */ |
|
170 TInt iDeviceClass; |
|
171 |
|
172 /** |
|
173 * Additional data depending on the resource. |
|
174 */ |
|
175 TInt iIntParam; |
|
176 |
|
177 /** |
|
178 * Additional data depending on the resource. |
|
179 */ |
|
180 TBuf<10> iDescParam; |
|
181 |
|
182 }; |
|
183 |
|
184 |
|
185 /** Typedef'ed pckgbuf to send dialog parameters to the notification framework. */ |
|
186 typedef TPckgBuf<TBluetoothDialogParams> TBluetoothDialogParamsPckg; |
|
187 |
|
188 /** Typedef'ed pckgbuf to send dialog parameters to the notification framework. */ |
|
189 typedef TPckgBuf<TBluetoothDeviceDialog> TBluetoothDeviceDialogPckg; |
|
190 |
|
191 |
|
192 inline TBluetoothDialogParams::TBluetoothDialogParams() |
|
193 : iDialogType( EInvalidDialog ), |
|
194 iResourceId( ENoResource ), |
|
195 iAddr( TBTDevAddr() ), |
|
196 iPadding( 0 ) |
|
197 { |
|
198 } |
|
199 |
|
200 inline TBluetoothDeviceDialog::TBluetoothDeviceDialog() |
|
201 : iDeviceName( 0 ), |
|
202 iDeviceClass( 0 ), |
|
203 iIntParam( 0 ) |
|
204 { |
|
205 } |
|
206 |
|
207 |
|
208 #endif // BLUETOOTHDEVICEDIALOGS_H |
|