RGavdp Class Reference
Represents a single GAVDP session to a remote device. If an app wishes to (eg) listen after connecting a GAVDP link it should instantiate another RGavdp.
Note this class uses internal active objects to provide the underlying services. Clients should be careful to allow these objects to run.
One RGavdp represents one remote device. If an inbound connection is made then a new RGavdp must be instantiated to form a stream to another device. Once RGavdp instance may be used to manage more than 1 local SEP. This is useful if the client only ever intends to support one active stream, but wishes to select from >1 codec. Alternatively >1 instance of RGavdp may be created, with a desire to manage each local SEP with each RGavdp instance. This would allow >1 active stream.
Constructor & Destructor Documentation
Member Functions Documentation
AbortStream(TSEID)
IMPORT_C void | AbortStream | ( | TSEID | aSEID | ) | |
Abort stream
Note: that once complete the state of the SEP will be Idle. Thus to restream, the SEP has to be reconfigured, opened and started.
Parameters
TSEID aSEID | the SEID of the local or remote SEP that requires aborting. |
AddSEPCapability(const TAvdtpServiceCapability &)
Add a particular capability into a SEP. When called on a local SEP this equates to adding capabilities into the SEP. When called on a remote SEP this equates to configuring the SEP. TAvdtpServiceCapability
BeginConfiguringLocalSEP(TSEID)
IMPORT_C TInt | BeginConfiguringLocalSEP | ( | TSEID | aSEID | ) | |
Begin configuring (or reconfiguring) a local SEP. Subsequent calls are used to add each configuration required. RGavdp::AddSEPCapability
Parameters
TSEID aSEID | the ID of the local SEP. |
BeginConfiguringRemoteSEP(TSEID, TSEID)
IMPORT_C TInt | BeginConfiguringRemoteSEP | ( | TSEID | aRemoteSEID, |
| TSEID | aLocalSEID |
| ) | |
Begin configuring (or reconfiguring) a remote SEP. Subsequent calls are used to add each configuration required. RGavdp::AddSEPCapability
Parameters
TSEID aRemoteSEID | the ID of the remote SEP. |
TSEID aLocalSEID | the ID of the local SEP. |
Cancel()
Cancel the outstanding client request. As per usual Symbian OS Cancel semantics, this method does not guarantee that the outstanding request was "undone". Therefore to reset each sides' state the client should consider sending an Abort too. RGavdp::AbortStream
Close()
Closes the GAVDP session and frees all resources associated with it. This function should not be called from within a client's implementation of any
MGavdpUser (upcall) method.
Note: not to be confused with the "Close" primitive in the GAVDP spec. This is merely closing the handle in the Symbian OS sense.
However, if this is Closed when streams are active, the Bluetooth subsystem shall Release all Streams managed by this RGavdp instance.
that the closure of any bearer sockets created remains the responsibility of the client.
CommitSEPConfiguration()
IMPORT_C void | CommitSEPConfiguration | ( | ) | |
Finalises the (re)configuration of the SEP
Connect(const TBTDevAddr &)
IMPORT_C void | Connect | ( | const TBTDevAddr & | aRemoteAddr | ) | |
Connects a GAVDP session - i.e. creates an AVDTP signalling channel to a remote device. The signalling channel may already exist, in which case this session is added as a user of that channel. The necessary multiplexing is implemented in AVDTP, so the client need not be concerned with this.
Parameters
const TBTDevAddr & aRemoteAddr | the Bluetooth device address of the remote GAVDP entity. |
CreateBearerSockets(TSEID, TBool, TBool)
Creates bearers (in the form of sockets) for sessions on the stream. The sessions are media + optional reporting + optional recovery. The sockets will be created on the client's Socket Server session. The sockets may then be passed into RTP for its use. If the sockets are passed to RTP the client still has the responsibility of closing them.
RGavdp::CreateBearerSockets(TSEID aSEID)
Parameters
TSEID aSEID | The SEID of the remote SEP for which the sockets are required. |
TBool aIgnored1 | Source compatibility place holder |
TBool aIgnored2 | Source compatibility place holder |
CreateBearerSockets(TSEID)
Creates bearers (in the form of sockets) for sessions on the stream. The sessions are media + optional reporting + optional recovery. The sockets will be created on the client's Socket Server session. The sockets may then be passed into RTP for its use. If the sockets are passed to RTP the client still has the responsibility of closing them.
Parameters
TSEID aSEID | The SEID of the remote SEP for which the sockets are required. |
DiscoverRemoteSEPs()
IMPORT_C void | DiscoverRemoteSEPs | ( | ) | |
Discover the Stream endpoints (SEPs) on the remote device. Callbacks on
MGavdpUser will be called as a result of this call.
- Pre-condition
- a Signalling channel must have been successfully created
MGavdpUser::GAVDP_SEPDiscovered
GetRemoteSEPCapabilities(TSEID, const TAvdtpServiceCategories &)
Get the capabilities of a remote Stream Endpoint (SEP). Callbacks on MGavdpUser will be called for the intersection of capabilities that the remote supports and that the local GAVDP user is interested in using.
Parameters
TSEID aSEID | the ID of the remote SEP for which capabilities are to be retrieved. |
const TAvdtpServiceCategories & aInterestingCategories | the categories the local GAVDP client is interested in. |
Listen()
Listen for inbound signalling channel connections. This is useful when the signalling channel is lost. Note: This function will not connect the session to any existing connected signalling channels. The session will only be connected upon the next channel being connected. Users should use Connect instead if they intend to connect to existing signalling channels.
- Pre-condition
- At least SEP shall have been registered
RGavdp::RegisterSEP(TAvdtpSEPInfo& aInfo) - panic
- The client thread will be panicked if Listen is called prior to any SEPs being registered.
MaxSecurityControlLength()
IMPORT_C TInt | MaxSecurityControlLength | ( | ) | |
This function returns the deprecated value KMaxAvdtpSecurityControlInfo so as to ensure that the return value is what partners will expect during the transition period from the use of the old constant to this new API. When the constant is removed from BluetoothAV.h it should be moved to an internal header.
Open(MGavdpUser &, RSocketServ &)
Open a GAVDP session.
Note: not to be confused with the "Open" primitive in the GAVDP spec. This is merely opening the handle in the Symbian OS sense.
RegisterSEP
Parameters
MGavdpUser & aServiceUser | a reference to a MGavdpUser mixin for GAVDP callback events. |
RSocketServ & aSocketServer | reference to the client's Socket Server session. |
RegisterSEP(TAvdtpSEPInfo &)
Register an extra local SEP.
Parameters
TAvdtpSEPInfo & aInfo | reference containing SEP information. Note the SEID assigned by AVDTP will be written back into aInfo. |
SendSecurityControl(TSEID, const TDesC8 &)
IMPORT_C void | SendSecurityControl | ( | TSEID | aSEID, |
| const TDesC8 & | aSecurityData |
| ) | |
Parameters
TSEID aSEID | the seid of the remote SEP |
const TDesC8 & aSecurityData | the security data |
Shutdown()
Disconnects the RGavdp session from the signalling channel, but does not destroy the local SEPs owned by the signalling channel. Must only be called if the remote SEP has not yet been configured - if the remote SEP has been configured then AbortStream() should be called.
-
panic
- If remote SEP configured
StartStream(TSEID)
IMPORT_C void | StartStream | ( | TSEID | aSEID | ) | |
Parameters
TSEID aSEID | the SEID of the local or remote SEP that requires starting |
SuspendStream(TSEID)
IMPORT_C void | SuspendStream | ( | TSEID | aSEID | ) | |
Suspend stream
Note: that the remote may not support Suspend, and an AVDTP NOT_SUPPORTED_COMMAND error may result. In this case the client should consider Closing the stream.
Parameters
TSEID aSEID | the SEID of the local or remote SEP that requires suspending. |
Member Data Documentation
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.