RGavdp Class Reference

class RGavdp

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

RGavdp()

IMPORT_C RGavdp ( )

Default Constructor

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 &)

IMPORT_C TInt AddSEPCapability ( const TAvdtpServiceCapability & aCapability )

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

Parameters

const TAvdtpServiceCapability & aCapability a capability

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()

IMPORT_C void 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()

IMPORT_C void 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)

IMPORT_C TInt CreateBearerSockets ( TSEID aSEID,
TBool aIgnored1,
TBool aIgnored2
)
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.
  • i.e. neither RTP nor GAVDP will close the sockets. The reporting/recovery config is already known by the stream. All the required bearers will be created.

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)

IMPORT_C TInt CreateBearerSockets ( TSEID aSEID )
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.
  • i.e. neither RTP nor GAVDP will close the sockets. The reporting/recovery config is already known by the stream. All the required bearers will be created.

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 &)

IMPORT_C void GetRemoteSEPCapabilities ( TSEID aSEID,
const TAvdtpServiceCategories & aInterestingCategories
)

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()

IMPORT_C TInt 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 &)

IMPORT_C TInt Open ( MGavdpUser & aServiceUser,
RSocketServ & aSocketServer
)
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 &)

IMPORT_C TInt RegisterSEP ( TAvdtpSEPInfo & aInfo )

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
)

Send security control data to remote SEP. The meaning of this is dependent on the configured Content Protection method. TAvdtpContentProtectionCapabilities

Parameters

TSEID aSEID the seid of the remote SEP
const TDesC8 & aSecurityData the security data

Shutdown()

IMPORT_C TInt 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 )

Start stream

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.

UnbindBody()

void UnbindBody ( )

Member Data Documentation

CGavdp * iGavdpImp

CGavdp * iGavdpImp [private]