MAvctpEventNotify Class Reference

class MAvctpEventNotify

Mixin for receiving AVCTP events from RAvctp

Note RAvctp doesn't expect the MAvctpEventNotify class to synchronously call Close() on it within any of these callbacks with the exception of MaenErrorNotify. You may call CloseGracefully since its asynchronous by nature.

RAvctp

Member Functions Documentation

MaenAttachConfirm(const TBTDevAddr &, TInt, TInt)

voidMaenAttachConfirm(const TBTDevAddr &aBTDevice,
TIntaMaxMessageSize,
TIntaConnectResult
)[pure virtual]

AVCTP Connection Confirm This is a response to RAvctp::ConnectRequest() and passes on the result of the Connection attempt. NB we don't return the configuration status as in Appendix A - AVCTP Upper Interface of [R2]. If the aConnectResult is KErrNone then RAvctp is now connected.

Parameters

const TBTDevAddr & aBTDevicethe address of the device connected to
TInt aMaxMessageSize
TInt aConnectResultKErrNone if the connection attempt was successful or one of the system-wide error codes

MaenAttachIndicate(const TBTDevAddr &, TInt, TBool &)

voidMaenAttachIndicate(const TBTDevAddr &aBTDevice,
TIntaMaxMessageSize,
TBool &aAccept
)[pure virtual]

AVCTP Connection Indicate This is a is called when a remote device has connected to us. NB we don't return the configuration status as in Appendix A - AVCTP Upper Interface of [R2].

Parameters

const TBTDevAddr & aBTDevicethe address of the device connected to
TInt aMaxMessageSize
TBool & aAcceptthis parameter is provided so that the client of RAvctp can indicate whether they want to accept the connection. If aAccept is not changed the connection will be refused however this may not result in the actual disconnection of the device if another RAvctp client did accept the connection. The meaning of a refusal is that you don't care whether or not the connection is there or not.

MaenCloseComplete()

voidMaenCloseComplete()[pure virtual]

AVCTP Close Complete This is the response to the CloseGracefully() that has been called on a RAvctp object. It is the last event that will be called until the RAvctp object is Open()'d again.

MaenDetachConfirm(const TBTDevAddr &, TInt)

voidMaenDetachConfirm(const TBTDevAddr &aBTDevice,
TIntaDisconnectResult
)[pure virtual]

AVCTP Disconnection Confirm - disconnection from a device complete This is the response to RAvctp::DisconnectRequest.

Parameters

const TBTDevAddr & aBTDevicethe address of the disconnected device
TInt aDisconnectResultwill be one of the system-wide error codes. If KErrTimedOut is returned then the RAvctp will be disconnected.

MaenDetachIndicate(const TBTDevAddr &)

voidMaenDetachIndicate(const TBTDevAddr &aBTDevice)[pure virtual]

AVCTP Disconnection Indication that a remote device has disconnected from us. It is only called if the device had been explicitly Connected to.

Parameters

const TBTDevAddr & aBTDevicethe address of the disconnecting device

MaenErrorNotify(const TBTDevAddr &, TInt)

voidMaenErrorNotify(const TBTDevAddr &aBTDevice,
TIntaError
)[pure virtual]

AVCTP error notification Note an errored device does not indicate that the device has been disconnected. If it has then a MaenDisconnectIndicate event will be used to indicate this.

Parameters

const TBTDevAddr & aBTDevicethe remote device associated with the error or TBTDevAddr(0) for a general error
TInt aErrorsystem wide error

MaenExtensionInterfaceL(TUid, void *&)

voidMaenExtensionInterfaceL(TUidaInterface,
void *&aObject
)[pure virtual]

Returns a null aObject if the extension is not implemented, or a pointer to another interface if it is.

Parameters

TUid aInterfaceUID of the interface to return
void *& aObjectthe container for another interface as specified by aInterface

MaenMessageReceivedIndicate(const TBTDevAddr &, SymbianAvctp::TTransactionLabel, SymbianAvctp::TMessageType, TBool, const TDesC8 &)

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

AVCTP Message received indication This method is called when a message has been received from the given device on the RAvctp's PID.

Note that because AVCTP is a connectionless protocol, it is perfectly possible to get a MaenMessageReceivedIndicate event from a device that you have not either explicitly connected to. For instance even if you don't accept a MaenConnectIndicate you may still receive messages from that remote device.

Parameters

const TBTDevAddr & aBTDeviceaddress of the device sending us an AVCTP message
SymbianAvctp::TTransactionLabel aTransactionLabelmessage transaction label
SymbianAvctp::TMessageType aTypetype of message
TBool aIpidBitSetthis will be set to true only if a message has been received indicating that the profile corresponding to the originally sent message is not valid. If RAvctp was used to send the message then this response will have come from the remote device aBTDevice.
const TDesC8 & aMessageInformationcontains only the AVCTP Command / Response Message Information and not the whole packet. Ownership transferred to client.

MaenMessageSendComplete(const TBTDevAddr &, SymbianAvctp::TTransactionLabel, TInt)

voidMaenMessageSendComplete(const TBTDevAddr &aBTDevice,
SymbianAvctp::TTransactionLabelaTransactionLabel,
TIntaSendResult
)[pure virtual]

AVCTP Message send complete. This method is called when a RAvctp has attempted to send the message defined by aTransactionLabel and aBTDevice.

Parameters

const TBTDevAddr & aBTDevicethe device to which the send has completed
SymbianAvctp::TTransactionLabel aTransactionLabelThe transaction label of the message that has been sent
TInt aSendResultKErrNone if the send was successful or one of the system-wide error codes