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