1 // Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #ifndef BTEXTNOTIFIERS_H
17 #define BTEXTNOTIFIERS_H
19 #ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
20 #include <btextnotifierspartner.h>
23 #include <btextnotifiersconsts.h>
29 #define NOTIFIERS_SUPPORT_PASSKEY_MIN_LENGTH
37 NONSHARABLE_CLASS(TBTDeviceSelectionParams)
42 Class to allow parameters to be sent to the device selection dialog via the RNotifier API.
46 IMPORT_C TBTDeviceSelectionParams();
47 IMPORT_C void SetUUID(const TUUID& aUUID);
48 IMPORT_C void SetDeviceClass(TBTDeviceClass aClass);
49 IMPORT_C const TUUID& UUID();
50 IMPORT_C TBTDeviceClass DeviceClass();
51 IMPORT_C TBool IsValidDeviceClass();
52 IMPORT_C TBool IsValidUUID();
54 TBTDeviceClass iDeviceClass; /*!< The device class */
55 TUUID iSdpUuid; /*!< The sdp uuid */
56 TBool iValidDeviceClass; /*!< ETrue if iDeviceClass has been set, EFalse if not */
57 TBool iValidUuid; /*!< ETrue if iSdpUuid has be set, EFalse if not */
59 // This data padding has been added to help prevent future binary compatibility breaks
60 // Neither iPadding1 nor iPadding2 have been zero'd because they are currently not used
65 NONSHARABLE_CLASS(TBTDeviceResponseParams)
70 Class to allow parameters to be received from the device selection dialog via the RNotifier API.
74 IMPORT_C TBTDeviceResponseParams();
75 IMPORT_C void SetDeviceAddress(const TBTDevAddr& aBDAddr); //< Set the address of the device
76 IMPORT_C void SetDeviceName(const TDesC& aName); //< Set the name of the device
77 IMPORT_C void SetDeviceClass(TBTDeviceClass aClass);
78 IMPORT_C const TBTDevAddr& BDAddr() const; //< Returns the address of the device
79 IMPORT_C const TDesC& DeviceName() const; //< Returns the name of the device
80 IMPORT_C TBTDeviceClass DeviceClass();
81 IMPORT_C TBool IsValidBDAddr() const; //< Has the address of the device been set?
82 IMPORT_C TBool IsValidDeviceName() const; //< Has the name of the device been set?
83 IMPORT_C TBool IsValidDeviceClass();
85 TBTDevAddr iBDAddr; /*!< The BT address of the remote device */
86 TBuf<KMaxBluetoothNameLen> iDeviceName; /*!< The name given by the remote device */
87 TBTDeviceClass iDeviceClass; /*!< The device class */
88 TBool iValidBDAddr; /*!< ETrue if iBDAddr has been set, EFalse if not */
89 TBool iValidDeviceName; /*!< ETrue if iDeviceName has been set, EFalse if not */
90 TBool iValidDeviceClass; /*!< ETrue if iDeviceClass has been set, EFalse if not */
92 // This data padding has been added to help prevent future binary compatibility breaks
93 // Neither iPadding1 nor iPadding2 have been zero'd because they are currently not used
102 Typedef'ed pckgbuf to send paramaters to the device selection dialog via the notifier framework.
104 typedef TPckgBuf<TBTDeviceSelectionParams> TBTDeviceSelectionParamsPckg;
110 Typedef'ed pckgbuf to retrieve the response from the device selection dialog via the notifier framework.
112 typedef TPckgBuf<TBTDeviceResponseParams> TBTDeviceResponseParamsPckg;
115 A remote device address, and a boolean indicating if the remote device has access
117 WARNING: For internal use ONLY. Compatibility is not guaranteed in future releases.
121 NONSHARABLE_CLASS(TPanConnection)
124 IMPORT_C TPanConnection(TBTDevAddr& aRemoteDeviceAddress,
125 TBool aUplinkAccessAllowed);
127 IMPORT_C const TBTDevAddr& RemoteDeviceAddress() const;
128 IMPORT_C TBool UplinkAccessAllowed() const;
129 IMPORT_C TBool IsValid() const;
131 // Non-exported constructor. Allows creation of default NULL instance
135 TBTDevAddr iRemoteDeviceAddress;
136 TBool iUplinkAccessAllowed;
138 // This data padding has been added to help prevent future binary compatibility breaks
139 // Neither iPadding1 nor iPadding2 have been zero'd because they are currently not used
145 A list of TPanConnection instances
146 This is not intended for external use by application developers.
152 NONSHARABLE_CLASS(TPanConnectionList)
155 IMPORT_C TPanConnectionList();
157 IMPORT_C void AddRemoteConnectionL(const TPanConnection& aRemoteConnection);
158 IMPORT_C const TPanConnection* GetFirstRemoteConnection();
159 IMPORT_C const TPanConnection* GetNextRemoteConnection();
161 IMPORT_C void SetRequestedConnectionAddr(const TBTDevAddr& aRequestedConnectionAddr);
162 IMPORT_C const TBTDevAddr* RequestedConnectionAddr();
164 IMPORT_C const TUUID& CurrentLocalRole() const;
165 IMPORT_C void SetCurrentLocalRole(const TUUID& aLocalRole);
167 IMPORT_C TUint8 MaxNumberOfRemoteConnections();
170 const static TUint8 KMaxRemoteConnections = 7;
173 TUint8 iPosition; // the position within the list for stateful reading
174 TFixedArray<TPanConnection, KMaxRemoteConnections> iRemoteConnections;
176 TBTDevAddr iRequestedConnectionAddr;
178 TUUID iCurrentLocalRole;
180 // This data padding has been added to help prevent future binary compatibility breaks
181 // Neither iPadding1 nor iPadding2 have been zero'd because they are currently not used
190 Typedef'ed pckgbuf for TPanConnectionList.
191 This is not intended for external use by application developers.
193 typedef TPckgBuf<TPanConnectionList> TPanConnectionListPckg;
200 The response from the incoming PAN NAP connection selection dialog.
201 This is intended for internal sub-system use only.
203 enum TNapConnectionResult
205 EDisallowNewNapConnection,
206 EAcceptNapConnectionAllowUplinkAccess,
207 EAcceptNapConnectionDisallowUplinkAccess,
214 Typedef'ed pckgbuf to retrieve the response from the incoming PAN NAP connection
215 selection dialog via the notifier framework.
216 This is intended for internal sub-system use only.
218 typedef TPckgBuf<TNapConnectionResult> TNapConnectionResultPckg;
220 #endif // BTEXTNOTIFIERS_H