diff -r 578be2adaf3e -r 307f4279f433 Adaptation/GUID-3102F778-DD2F-4C87-A0DF-7FA44C9709D8.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Adaptation/GUID-3102F778-DD2F-4C87-A0DF-7FA44C9709D8.dita Fri Oct 15 14:32:18 2010 +0100 @@ -0,0 +1,38 @@ + + + + + +Multiple +Client SupportThis document describes how multiple clients can access a driver +over a single logical channel. +

A single channel has a single handle which is shared by driver users. A +driver can allow or prevent the sharing of a handle to a logical channel between +multiple users. This policy is implemented by the DLogicalChannel::RequestUserHandle() function. +The default implementation does not restrict sharing of the channel, but a +driver can override the function to change this.

+

In the following example, the driver ensures that only the intended clients +can get the handle and access the driver. Any other client that tries to share +the handle gets a KErrAccessDenied error.

+TInt DExDriverLogicalChannel::RequestUserHandle(DThread* aThread, + TOwnerType aType) + { + // Handle should be provided only to the intended client. Any + // other clients that try to get a handle to the driver should get an access + // denied error. + if ( aType!=EOwnerThread || aThread!=iClient) + return KErrAccessDenied; + return KErrNone; + } +

DLogicalChannel::RequestUserHandle() only restricts +the user from sharing or duplicating an existing channel. It does not restrict +another process from opening its own separate channel on the same device.

+

More than one user can access the driver at the same time. It is +up to the driver to manage and provide correct and secure access to the driver.

+
\ No newline at end of file