29
|
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,
|
47
|
42 |
EPairingFailureRetry,
|
|
43 |
EPairingFailureOk,
|
29
|
44 |
EVisibilityTimeout,
|
42
|
45 |
EUnpairedDevice,
|
57
|
46 |
EGenericInfo,
|
|
47 |
EBluetoothTestMode,
|
|
48 |
ESendCompleted,
|
|
49 |
ESendCancelled,
|
|
50 |
EIssueOfflineQuery,
|
29
|
51 |
EUnusedResource // The last ID
|
|
52 |
};
|
|
53 |
|
|
54 |
|
|
55 |
/**
|
|
56 |
* TBluetoothDialogParams contains device dialog parameters except for device name and type
|
|
57 |
*
|
|
58 |
* @since Symbian^4
|
|
59 |
*/
|
|
60 |
NONSHARABLE_CLASS( TBluetoothDialogParams )
|
|
61 |
{
|
|
62 |
|
|
63 |
public:
|
|
64 |
|
|
65 |
/** Enumeration for the type of notification to be launched. */
|
|
66 |
enum TBTDialogType
|
|
67 |
{
|
|
68 |
EInvalidDialog,
|
|
69 |
ENote,
|
|
70 |
EQuery,
|
|
71 |
EInput,
|
31
|
72 |
EMoreDevice,
|
29
|
73 |
EDeviceSearch,
|
31
|
74 |
ESend,
|
42
|
75 |
EGlobalNotif,
|
|
76 |
EUserAuthorization,
|
47
|
77 |
EReceiveProgress,
|
57
|
78 |
EReceiveDone,
|
|
79 |
EInformationDialog
|
29
|
80 |
};
|
|
81 |
|
|
82 |
/** Enumeration for the notification parameters data type to be configured. */
|
|
83 |
enum TDialogDataType
|
|
84 |
{
|
|
85 |
ENoParams,
|
|
86 |
EDialogType,
|
|
87 |
EResource,
|
|
88 |
EAddress,
|
|
89 |
EDialogTitle,
|
|
90 |
EDialogExt // Id for first data type of derived class.
|
|
91 |
};
|
42
|
92 |
|
|
93 |
/** Enumeration for the notification dialog heading type. */
|
|
94 |
enum TDialogTitleDataType
|
|
95 |
{
|
|
96 |
EReceive,
|
|
97 |
EReceiveFromPairedDevice,
|
|
98 |
EConnect,
|
47
|
99 |
EPairingRequest,
|
|
100 |
ERecvFailed,
|
|
101 |
ESendFailed,
|
57
|
102 |
EReceiveCompleted,
|
|
103 |
EBTAddress,
|
|
104 |
EOfflineQuery,
|
|
105 |
EMemoryFull,
|
|
106 |
EFileMoved,
|
|
107 |
EDriveNotFound,
|
|
108 |
EUnsupportedImages
|
47
|
109 |
};
|
|
110 |
|
|
111 |
enum TDialogActionType
|
|
112 |
{
|
|
113 |
EHide,
|
|
114 |
EShow,
|
|
115 |
ECancelReceive,
|
|
116 |
ECancelShow
|
42
|
117 |
};
|
29
|
118 |
|
|
119 |
inline TBluetoothDialogParams();
|
|
120 |
|
|
121 |
public: // data
|
|
122 |
|
|
123 |
/**
|
|
124 |
* Identifier for the type of notification.
|
|
125 |
*/
|
|
126 |
TInt iDialogType;
|
|
127 |
|
|
128 |
/**
|
|
129 |
* Identifier for the resource to be shown in the dialog.
|
|
130 |
*/
|
|
131 |
TInt iResourceId;
|
|
132 |
|
|
133 |
/**
|
|
134 |
* Address of the remote device (not used, for future extension).
|
|
135 |
*/
|
|
136 |
TBTDevAddr iAddr;
|
|
137 |
|
|
138 |
/**
|
|
139 |
* Unused padding (not used, for future extension).
|
|
140 |
*/
|
|
141 |
TUint32 iPadding;
|
|
142 |
|
|
143 |
};
|
|
144 |
|
|
145 |
|
|
146 |
/**
|
|
147 |
* TBluetoothDeviceDialog contains more device dialog parameters
|
|
148 |
*
|
|
149 |
* @since Symbian^4
|
|
150 |
*/
|
|
151 |
NONSHARABLE_CLASS( TBluetoothDeviceDialog ) : public TBluetoothDialogParams
|
|
152 |
{
|
|
153 |
|
|
154 |
public:
|
|
155 |
|
|
156 |
/** Enumeration for the notification parameters data type to be configured. */
|
|
157 |
enum TDialogDataType
|
|
158 |
{
|
|
159 |
ENoParams = TBluetoothDialogParams::EDialogExt,
|
|
160 |
EDeviceName,
|
|
161 |
EDeviceClass,
|
|
162 |
EAdditionalInt,
|
42
|
163 |
EAdditionalDesc,
|
|
164 |
EReceivingFileName,
|
|
165 |
EReceivingFileSize,
|
57
|
166 |
EReceivedFileCount,
|
|
167 |
ELocalAddress,
|
|
168 |
EDriveLetter,
|
|
169 |
EDriveName
|
29
|
170 |
};
|
|
171 |
|
|
172 |
inline TBluetoothDeviceDialog();
|
|
173 |
|
|
174 |
public: // data
|
|
175 |
|
|
176 |
/**
|
|
177 |
* The name of the remote device.
|
|
178 |
*/
|
|
179 |
TBTDeviceName iDeviceName;
|
|
180 |
|
|
181 |
/**
|
|
182 |
* The class of device of the remote device.
|
|
183 |
*/
|
|
184 |
TInt iDeviceClass;
|
|
185 |
|
|
186 |
/**
|
|
187 |
* Additional data depending on the resource.
|
|
188 |
*/
|
|
189 |
TInt iIntParam;
|
|
190 |
|
|
191 |
/**
|
|
192 |
* Additional data depending on the resource.
|
|
193 |
*/
|
|
194 |
TBuf<10> iDescParam;
|
|
195 |
|
|
196 |
};
|
|
197 |
|
|
198 |
|
|
199 |
/** Typedef'ed pckgbuf to send dialog parameters to the notification framework. */
|
|
200 |
typedef TPckgBuf<TBluetoothDialogParams> TBluetoothDialogParamsPckg;
|
|
201 |
|
|
202 |
/** Typedef'ed pckgbuf to send dialog parameters to the notification framework. */
|
|
203 |
typedef TPckgBuf<TBluetoothDeviceDialog> TBluetoothDeviceDialogPckg;
|
|
204 |
|
|
205 |
|
|
206 |
inline TBluetoothDialogParams::TBluetoothDialogParams()
|
|
207 |
: iDialogType( EInvalidDialog ),
|
|
208 |
iResourceId( ENoResource ),
|
|
209 |
iAddr( TBTDevAddr() ),
|
|
210 |
iPadding( 0 )
|
|
211 |
{
|
|
212 |
}
|
|
213 |
|
|
214 |
inline TBluetoothDeviceDialog::TBluetoothDeviceDialog()
|
|
215 |
: iDeviceName( 0 ),
|
|
216 |
iDeviceClass( 0 ),
|
|
217 |
iIntParam( 0 )
|
|
218 |
{
|
|
219 |
}
|
|
220 |
|
|
221 |
|
|
222 |
#endif // BLUETOOTHDEVICEDIALOGS_H
|