williamr@2: // Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@2: // All rights reserved. williamr@2: // This component and the accompanying materials are made available williamr@4: // under the terms of "Eclipse Public License v1.0" williamr@2: // which accompanies this distribution, and is available williamr@4: // at the URL "http://www.eclipse.org/legal/epl-v10.html". williamr@2: // williamr@2: // Initial Contributors: williamr@2: // Nokia Corporation - initial contribution. williamr@2: // williamr@2: // Contributors: williamr@2: // williamr@2: // Description: williamr@2: // williamr@2: williamr@2: #ifndef BTEXTNOTIFIERS_H williamr@2: #define BTEXTNOTIFIERS_H williamr@2: williamr@4: #ifndef SYMBIAN_ENABLE_SPLIT_HEADERS williamr@4: #include williamr@4: #endif williamr@4: williamr@4: #include williamr@4: williamr@2: #include williamr@2: #include williamr@2: #include williamr@2: williamr@2: #define NOTIFIERS_SUPPORT_PASSKEY_MIN_LENGTH williamr@2: williamr@2: /** williamr@2: @file williamr@2: @publishedAll williamr@2: @released williamr@2: **/ williamr@2: williamr@2: NONSHARABLE_CLASS(TBTDeviceSelectionParams) williamr@2: /** williamr@2: @publishedAll williamr@2: @released williamr@2: williamr@2: Class to allow parameters to be sent to the device selection dialog via the RNotifier API. williamr@2: **/ williamr@2: { williamr@2: public: williamr@2: IMPORT_C TBTDeviceSelectionParams(); williamr@2: IMPORT_C void SetUUID(const TUUID& aUUID); williamr@2: IMPORT_C void SetDeviceClass(TBTDeviceClass aClass); williamr@2: IMPORT_C const TUUID& UUID(); williamr@2: IMPORT_C TBTDeviceClass DeviceClass(); williamr@2: IMPORT_C TBool IsValidDeviceClass(); williamr@2: IMPORT_C TBool IsValidUUID(); williamr@2: private: williamr@2: TBTDeviceClass iDeviceClass; /*!< The device class */ williamr@2: TUUID iSdpUuid; /*!< The sdp uuid */ williamr@2: TBool iValidDeviceClass; /*!< ETrue if iDeviceClass has been set, EFalse if not */ williamr@2: TBool iValidUuid; /*!< ETrue if iSdpUuid has be set, EFalse if not */ williamr@2: williamr@2: // This data padding has been added to help prevent future binary compatibility breaks williamr@2: // Neither iPadding1 nor iPadding2 have been zero'd because they are currently not used williamr@2: TUint32 iPadding1; williamr@2: TUint32 iPadding2; williamr@2: }; williamr@2: williamr@2: NONSHARABLE_CLASS(TBTDeviceResponseParams) williamr@2: /** williamr@2: @publishedAll williamr@2: @released williamr@2: williamr@2: Class to allow parameters to be received from the device selection dialog via the RNotifier API. williamr@2: **/ williamr@2: { williamr@2: public: williamr@2: IMPORT_C TBTDeviceResponseParams(); williamr@4: IMPORT_C void SetDeviceAddress(const TBTDevAddr& aBDAddr); //< Set the address of the device williamr@4: IMPORT_C void SetDeviceName(const TDesC& aName); //< Set the name of the device williamr@2: IMPORT_C void SetDeviceClass(TBTDeviceClass aClass); williamr@4: IMPORT_C const TBTDevAddr& BDAddr() const; //< Returns the address of the device williamr@4: IMPORT_C const TDesC& DeviceName() const; //< Returns the name of the device williamr@2: IMPORT_C TBTDeviceClass DeviceClass(); williamr@4: IMPORT_C TBool IsValidBDAddr() const; //< Has the address of the device been set? williamr@4: IMPORT_C TBool IsValidDeviceName() const; //< Has the name of the device been set? williamr@2: IMPORT_C TBool IsValidDeviceClass(); williamr@2: private: williamr@2: TBTDevAddr iBDAddr; /*!< The BT address of the remote device */ williamr@2: TBuf iDeviceName; /*!< The name given by the remote device */ williamr@2: TBTDeviceClass iDeviceClass; /*!< The device class */ williamr@2: TBool iValidBDAddr; /*!< ETrue if iBDAddr has been set, EFalse if not */ williamr@2: TBool iValidDeviceName; /*!< ETrue if iDeviceName has been set, EFalse if not */ williamr@2: TBool iValidDeviceClass; /*!< ETrue if iDeviceClass has been set, EFalse if not */ williamr@2: williamr@2: // This data padding has been added to help prevent future binary compatibility breaks williamr@2: // Neither iPadding1 nor iPadding2 have been zero'd because they are currently not used williamr@2: TUint32 iPadding1; williamr@2: TUint32 iPadding2; williamr@2: }; williamr@2: williamr@2: /** williamr@2: @publishedAll williamr@2: @released williamr@2: williamr@2: Typedef'ed pckgbuf to send paramaters to the device selection dialog via the notifier framework. williamr@2: **/ williamr@2: typedef TPckgBuf TBTDeviceSelectionParamsPckg; williamr@2: williamr@2: /** williamr@2: @publishedAll williamr@2: @released williamr@2: williamr@2: Typedef'ed pckgbuf to retrieve the response from the device selection dialog via the notifier framework. williamr@2: **/ williamr@2: typedef TPckgBuf TBTDeviceResponseParamsPckg; williamr@2: williamr@2: /** williamr@2: A remote device address, and a boolean indicating if the remote device has access williamr@2: to the uplink williamr@4: WARNING: For internal use ONLY. Compatibility is not guaranteed in future releases. williamr@2: @publishedPartner williamr@2: @released williamr@2: */ williamr@2: NONSHARABLE_CLASS(TPanConnection) williamr@2: { williamr@2: public: williamr@2: IMPORT_C TPanConnection(TBTDevAddr& aRemoteDeviceAddress, williamr@2: TBool aUplinkAccessAllowed); williamr@2: williamr@2: IMPORT_C const TBTDevAddr& RemoteDeviceAddress() const; williamr@2: IMPORT_C TBool UplinkAccessAllowed() const; williamr@2: IMPORT_C TBool IsValid() const; williamr@2: williamr@2: // Non-exported constructor. Allows creation of default NULL instance williamr@2: TPanConnection(); williamr@2: williamr@2: private: williamr@2: TBTDevAddr iRemoteDeviceAddress; williamr@2: TBool iUplinkAccessAllowed; williamr@2: williamr@2: // This data padding has been added to help prevent future binary compatibility breaks williamr@2: // Neither iPadding1 nor iPadding2 have been zero'd because they are currently not used williamr@2: TUint32 iPadding1; williamr@2: TUint32 iPadding2; williamr@2: }; williamr@2: williamr@2: /** williamr@2: A list of TPanConnection instances williamr@4: This is not intended for external use by application developers. williamr@4: williamr@2: @see TPanConnection williamr@4: @publishedAll williamr@2: @released williamr@2: */ williamr@2: NONSHARABLE_CLASS(TPanConnectionList) williamr@2: { williamr@2: public: williamr@2: IMPORT_C TPanConnectionList(); williamr@2: williamr@2: IMPORT_C void AddRemoteConnectionL(const TPanConnection& aRemoteConnection); williamr@2: IMPORT_C const TPanConnection* GetFirstRemoteConnection(); williamr@2: IMPORT_C const TPanConnection* GetNextRemoteConnection(); williamr@2: williamr@2: IMPORT_C void SetRequestedConnectionAddr(const TBTDevAddr& aRequestedConnectionAddr); williamr@2: IMPORT_C const TBTDevAddr* RequestedConnectionAddr(); williamr@2: williamr@2: IMPORT_C const TUUID& CurrentLocalRole() const; williamr@2: IMPORT_C void SetCurrentLocalRole(const TUUID& aLocalRole); williamr@2: williamr@2: IMPORT_C TUint8 MaxNumberOfRemoteConnections(); williamr@2: williamr@2: private: williamr@2: const static TUint8 KMaxRemoteConnections = 7; williamr@2: williamr@2: private: williamr@2: TUint8 iPosition; // the position within the list for stateful reading williamr@2: TFixedArray iRemoteConnections; williamr@2: williamr@2: TBTDevAddr iRequestedConnectionAddr; williamr@2: williamr@2: TUUID iCurrentLocalRole; williamr@2: williamr@2: // This data padding has been added to help prevent future binary compatibility breaks williamr@2: // Neither iPadding1 nor iPadding2 have been zero'd because they are currently not used williamr@2: TUint32 iPadding1; williamr@2: TUint32 iPadding2; williamr@2: }; williamr@2: williamr@2: /** williamr@2: @publishedAll williamr@2: @released williamr@2: williamr@2: Typedef'ed pckgbuf for TPanConnectionList. williamr@4: This is not intended for external use by application developers. williamr@2: **/ williamr@2: typedef TPckgBuf TPanConnectionListPckg; williamr@2: williamr@2: williamr@2: /** williamr@2: @publishedAll williamr@2: @released williamr@2: williamr@2: The response from the incoming PAN NAP connection selection dialog. williamr@4: This is intended for internal sub-system use only. williamr@2: **/ williamr@2: enum TNapConnectionResult williamr@2: { williamr@2: EDisallowNewNapConnection, williamr@2: EAcceptNapConnectionAllowUplinkAccess, williamr@2: EAcceptNapConnectionDisallowUplinkAccess, williamr@2: }; williamr@2: williamr@2: /** williamr@2: @publishedAll williamr@2: @released williamr@2: williamr@2: Typedef'ed pckgbuf to retrieve the response from the incoming PAN NAP connection williamr@2: selection dialog via the notifier framework. williamr@4: This is intended for internal sub-system use only. williamr@2: **/ williamr@2: typedef TPckgBuf TNapConnectionResultPckg; williamr@2: williamr@2: #endif // BTEXTNOTIFIERS_H