bluetooth/btstack/secman/secman.h
branchRCL_3
changeset 11 20fda83a6398
parent 0 29b1cd4cb562
child 16 9f17f914e828
equal deleted inserted replaced
10:8a27654f7b62 11:20fda83a6398
   264 	void IOCapabilityRequestFromRemote(const TBTDevAddr& aAddr);
   264 	void IOCapabilityRequestFromRemote(const TBTDevAddr& aAddr);
   265 	void IOCapabilityAskForResponse(const TBTDevAddr& aAddr, THCIIoCapability aIOCapability, THCIOobDataPresence aOOBDataPresent, THCIAuthenticationRequirement aAuthentication_Requirements);
   265 	void IOCapabilityAskForResponse(const TBTDevAddr& aAddr, THCIIoCapability aIOCapability, THCIOobDataPresence aOOBDataPresent, THCIAuthenticationRequirement aAuthentication_Requirements);
   266 	void RemoteOOBDataRequest(const TBTDevAddr& aAddr);
   266 	void RemoteOOBDataRequest(const TBTDevAddr& aAddr);
   267 	void RemoteOOBDataRequestComplete(const TBTDevAddr& aAddr);
   267 	void RemoteOOBDataRequestComplete(const TBTDevAddr& aAddr);
   268 	void UserConfirmationRequest(const TBTDevAddr& aAddr, TUint32 aNumericValue);
   268 	void UserConfirmationRequest(const TBTDevAddr& aAddr, TUint32 aNumericValue);
       
   269 	void NumericComparisonComplete(const TBTDevAddr& aAddr, TBool aResult, TInt aError);
   269 	void UserConfirmationComplete(const TBTDevAddr& aAddr, TBool aResult, TInt aError);
   270 	void UserConfirmationComplete(const TBTDevAddr& aAddr, TBool aResult, TInt aError);
   270 	void PasskeyNotification(const TBTDevAddr& aAddr, TUint32 aPasskey);
   271 	void PasskeyNotification(const TBTDevAddr& aAddr, TUint32 aPasskey);
   271 	void PasskeyNotificationComplete(const TBTDevAddr& aAddr, TInt aError);
   272 	void PasskeyNotificationComplete(const TBTDevAddr& aAddr, TInt aError);
   272 	void KeypressNotification(const TBTDevAddr& aAddr, TUint8 aNotificationType);
   273 	void KeypressNotification(const TBTDevAddr& aAddr, TUint8 aNotificationType);
   273 	void SimplePairingComplete(const TBTDevAddr& aAddr, THCIErrorCode aError);
   274 	void SimplePairingComplete(const TBTDevAddr& aAddr, THCIErrorCode aError);
   358 
   359 
   359 	TBool IsAuthenticationReqPending(const TBTDevAddr& aAddr, TUint& aPasskeyMinLength, TBluetoothMitmProtection& aMitmLevel);
   360 	TBool IsAuthenticationReqPending(const TBTDevAddr& aAddr, TUint& aPasskeyMinLength, TBluetoothMitmProtection& aMitmLevel);
   360 	TBool AuthenticationRequired() const;
   361 	TBool AuthenticationRequired() const;
   361 	TBool EncryptionRequired() const;
   362 	TBool EncryptionRequired() const;
   362 	TBool AuthenticationInProgress() const;
   363 	TBool AuthenticationInProgress() const;
   363 	TBool UnableToBond() const;
   364 	TBool RemoteIndicatedNoBondingToDedicatedBonding() const;
   364 	TBool BasebandConnected() const;
   365 	TBool BasebandConnected() const;
   365 	
   366 	
   366 	void CompleteRequest(TInt aReason);
   367 	void CompleteRequest(TInt aReason);
   367 	void SetCurrentState(TBTAccessRequesterState aState);
   368 	void SetCurrentState(TBTAccessRequesterState aState);
   368 	TBool RequirementsDenied();
   369 	TBool RequirementsDenied();
   443 	TPrefetchNotifierQLink			iPrefetchQueueLink;
   444 	TPrefetchNotifierQLink			iPrefetchQueueLink;
   444 	TBool 							iAuthenticationInProgress;      //< If authentication is in progress
   445 	TBool 							iAuthenticationInProgress;      //< If authentication is in progress
   445 	
   446 	
   446 	TAccessType						iAccessType;
   447 	TAccessType						iAccessType;
   447 	
   448 	
   448 	TBool							iDedicatedBondingNotAvailable;  //< Remote IOCapabilitiesResponse says no dedicated bonding
   449 	TBool							iRemoteIndicatedNoBonding;  //< Remote IOCapabilitiesResponse says no dedicated bonding
   449 	THCIIoCapability				iRemoteIOCapability;
   450 	THCIIoCapability				iRemoteIOCapability;
   450 	THCIOobDataPresence				iRemoteOOBDataPresence;
   451 	THCIOobDataPresence				iRemoteOOBDataPresence;
   451 	
   452 	
   452 	CAuthenticationTimer*			iTimer;
   453 	CAuthenticationTimer*			iTimer;
   453 	
   454 	
   664 	TUint32								iNumericValue;
   665 	TUint32								iNumericValue;
   665 	TBool 								iInternallyInitiated;
   666 	TBool 								iInternallyInitiated;
   666 	TBTPasskeyDisplayParamsPckg			iPasskeyDisplayParamsPckg;
   667 	TBTPasskeyDisplayParamsPckg			iPasskeyDisplayParamsPckg;
   667 	TBTDeviceNameUpdateParamsPckg		iDeviceNameUpdateParamsPckg;
   668 	TBTDeviceNameUpdateParamsPckg		iDeviceNameUpdateParamsPckg;
   668 	TBuf8<1>							iResultPckg;
   669 	TBuf8<1>							iResultPckg;
       
   670 	};
       
   671 
       
   672 /**
       
   673 Prompts the user to confirm whether or not they want to pair
       
   674 Uses the RNotifier framework to produce a dialog containing information
       
   675 about the remote device
       
   676 **/
       
   677 NONSHARABLE_CLASS(CBTUserConfirmer) 
       
   678 	: public CSecNotifierRequester
       
   679 	{
       
   680 public:
       
   681 	static CBTUserConfirmer* NewL(const TBTDevAddr aAddr,
       
   682 									  CBTSecMan& aSecMan, 
       
   683 									  TBool aInternallyInitiated);
       
   684 	static CBTUserConfirmer* NewLC(const TBTDevAddr aAddr,
       
   685 									   CBTSecMan& aSecMan, 
       
   686 									   TBool aInternallyInitiated);
       
   687 	~CBTUserConfirmer();
       
   688 
       
   689 private: // from CActive
       
   690 	void DoCancel();
       
   691 	void RunL();
       
   692 	TInt RunError(TInt aError);
       
   693 	
       
   694 private: //from CSecNotifierRequester
       
   695 	virtual void DoRequest();
       
   696 	virtual void DoUpdateNotifier();
       
   697 
       
   698 private:
       
   699 	CBTUserConfirmer(CBTSecMan& aSecMan, 
       
   700 						 TBool aInternallyInitiated);
       
   701 	
       
   702 private:
       
   703 	CSecNotifierUpdateAO<TBTDeviceNameUpdateParamsPckg>*	iNameUpdater;
       
   704 	CBTSecMan&												iSecMan;
       
   705 	TBool 													iInternallyInitiated;
       
   706 	TBTUserConfirmationParamsPckg							iUserConfirmationParamsPckg;
       
   707 	TPckgBuf<TBool>											iResultPckg;
   669 	};
   708 	};
   670 
   709 
   671 
   710 
   672 _LIT(KBTSecPanic, "BT Security");
   711 _LIT(KBTSecPanic, "BT Security");
   673 enum TBTSecPanic
   712 enum TBTSecPanic
   706 	EBTSecEncryptionRequiredOnUnauthenticatedLink,
   745 	EBTSecEncryptionRequiredOnUnauthenticatedLink,
   707 	EBTSecCouldNotFindStateTransition,
   746 	EBTSecCouldNotFindStateTransition,
   708 	EBTSecAccessRequesterShouldHaveNotBeenFound,
   747 	EBTSecAccessRequesterShouldHaveNotBeenFound,
   709 	EBTSecAccessRequesterShouldHaveBeenFound,
   748 	EBTSecAccessRequesterShouldHaveBeenFound,
   710 	EBTSecNotifierRequesterUsingTimerWithoutHandling,
   749 	EBTSecNotifierRequesterUsingTimerWithoutHandling,
       
   750 	EBTSecConnectionUserConfirmationTwice,
   711 	};
   751 	};
   712 
   752 
   713 
   753 
   714 #endif // SECMAN_H
   754 #endif // SECMAN_H
   715 
   755