MAvctpChannel Class Reference

class MAvctpChannel

Member Functions Documentation

MacAttachRequest(const TBTDevAddr &)

TInt MacAttachRequest(const TBTDevAddr &aBTDevice)[pure virtual]
Starts an explicit connection attempt using the default AVCTP security settings This function should be used if you wish to ensure a connection is available before calling SendMessage to ensure that the message is sent with minimal delay. Following this function, MaenConnectConfirm will be called on aNotify with results of the connection attempt provided this function returned KErrNone.
panic
if the RAvctp object isn't open or Close / CloseGracefully has been called on the RAvctp object

Parameters

const TBTDevAddr & aBTDevicethe remote device address to connect to

MacCancelAttach(const TBTDevAddr &)

voidMacCancelAttach(const TBTDevAddr &aBTDevice)[pure virtual]

Cancels an outstanding connect operation so that MaenConnectConfirm is NOT called on aNotify Can be called at any time.

panic
if the RAvctp object isn't open or Close / CloseGracefully has been called on the RAvctp object

Parameters

const TBTDevAddr & aBTDevicethe remote device of the Connect to cancel

MacCancelSend()

voidMacCancelSend()[pure virtual]

Cancels an outstanding send operation so that MaenMessageSendComplete is NOT called on aNotify Can be called at any time.

panic
if the RAvctp object isn't open or Close / CloseGracefully has been called on the RAvctp object

MacDetachRequest(const TBTDevAddr &)

TInt MacDetachRequest(const TBTDevAddr &aBTDevice)[pure virtual]

Begins the disconnection process if the RAvctp object is explicitly connected to aBTDevice. When the remote device has been disconnected MaenDisconnectConfirm will be called on aNotify, provided this function returned KErrNone.

Note that this function can not be used to prevent an ongoing connection attempt. If this is what you wish to do, use CancelConnect(...) instead.

panic
if the RAvctp object isn't open or Close / CloseGracefully has been called on the RAvctp object

Parameters

const TBTDevAddr & aBTDevicethe remote device to disconnect from

MacIsAttached(const TBTDevAddr &)

TBool MacIsAttached(const TBTDevAddr &aBTDevice)[pure virtual]
Can be used to determine with this client has explicitly connected to the given device.
panic
if the RAvctp object isn't open or Close / CloseGracefully has been called on the RAvctp object

Parameters

const TBTDevAddr & aBTDevicethe remote device in question

MacSendMessage(const TBTDevAddr &, SymbianAvctp::TTransactionLabel, SymbianAvctp::TMessageType, const TDesC8 &)

TInt MacSendMessage(const TBTDevAddr &aBTDevice,
SymbianAvctp::TTransactionLabelaTransactionLabel,
SymbianAvctp::TMessageTypeaType,
const TDesC8 &aMessageInformation
)[pure virtual]

Send an AVCTP message This is a helper function so that the user doesn't have to know how to format an AVCTP packet. When the message has been sent, MaenMessageSendComplete will be called on aNotify, provided this function returned KErrNone.

It is not necessary to call Connect(aBTDevice) before calling this function since a connection will be implicitly started to carry this message if one doesn't already exist. However, this has two potential drawbacks: i) If there isn't already a connection to the remote device then the packet may take some time to reach its destination ii) If there isn't already a connection to the remote device then and this connection attempt fails, you will not be informed of this fact. Effectively the packet will have been dropped. NB both the above problems will not occur if you explicitly connect the remote device and wait for the resulting ConnectCfm event.

panic
if the most significant four bits of aTransactionLabel are not zero
panic
if the RAvctp object isn't open or Close / CloseGracefully has been called on the RAvctp object

Parameters

const TBTDevAddr & aBTDevicethe remote device to connect to
SymbianAvctp::TTransactionLabel aTransactionLabelwill be the transaction ID for the message as specified in the AVCTP 1.0 spec. It is the responsibility of the RAvctp user to provide a transaction ID that "uniquely identifies the transaction with a limited scope in the command / response flow".
SymbianAvctp::TMessageType aTypethe packet type
const TDesC8 & aMessageInformationshould contain only the AVCTP Command / Response Message Information