MHCICommandQueue Class Reference

class MHCICommandQueue

Member Functions Documentation

MhcqAddCommandL(CHCICommandQItem *)

TUint MhcqAddCommandL(CHCICommandQItem *aQueItem)[pure virtual]

Adds a pre-allocated command item to the end of the command queue. Ownership of the command item is transferred from the caller (even in the event of an ..Add.. method leaving).

Use this function if you pre-allocated a CHCICommandQItem. Use this for ensuring that a command can get accepted by the command queue in low memory conditions.

leave
KErrHardwareNotAvailable if unable to add the command to the Command Queue due to the controller being in a power off state.

Parameters

CHCICommandQItem * aQueItemThe command queue item to be added to the queue. Ownership is passed.

MhcqAddCommandL(CHCICommandBase *, MHCICommandQueueClient &)

TUint MhcqAddCommandL(CHCICommandBase *aCommandData,
MHCICommandQueueClient &aCmdProgressRecipient
)[pure virtual]

Adds a command to the end of the command queue. Ownership of the command data is transfered from the caller (even in the event of an ..Add.. method leaving).

leave
KErrNoMemory This function may leave as it allocates a CHCICommandQItem to wrap around CHCICommandBase.
leave
KErrNotSupported if aCommandData is not recognised. E.g. if the caller of the function is asking for a command from a version of the Bluetooth specification that the licensee HCI implementation doesn't support.
leave
KErrHardwareNotAvailable if unable to add the command to the Command Queue due to the controller being in a power off state.

Parameters

CHCICommandBase * aCommandDataThe data to be added to a command queue item which will be be placed on the queue. Ownership is passed.
MHCICommandQueueClient & aCmdProgressRecipientThe interface which will get notified about the command's progress.

MhcqAddInitCommandL(CHCICommandQItem *)

TUint MhcqAddInitCommandL(CHCICommandQItem *aQueItem)[pure virtual]

Adds a pre-allocated initialisation command item to the end of the command queue. Ownership of the command item is transferred from the caller (even in the event of an ..Add.. method leaving).

Initialisation commands are only accepted and sent after the Command Queue has been reset but before it has been started.

Use this function if you pre-allocated a CHCICommandQItem. Use this for ensuring that a command can get accepted by the command queue in low memory conditions.

CHCICmdQController::Reset CHCICmdQController::Start
leave
KErrHardwareNotAvailable if unable to add the command to the Command Queue due to the controller being in a power off state.
panic
EInitCmdAfterStart Attempting to add an initialisation command after the queue has been started.

Parameters

CHCICommandQItem * aQueItemThe command queue item to be added to the queue. Ownership is passed.

MhcqAddInitCommandL(CHCICommandBase *, MHCICommandQueueClient &)

TUint MhcqAddInitCommandL(CHCICommandBase *aCommandData,
MHCICommandQueueClient &aCmdProgressRecipient
)[pure virtual]

Adds an initialisation command to the end of the command queue. Ownership of the command data is transfered from the caller (even in the event of an ..Add.. method leaving).

Initialisation commands are only accepted and sent after the Command Queue has been reset but before it has been started.

CHCICmdQController::Reset CHCICmdQController::Start
leave
KErrNoMemory This function may leave as it allocates a CHCICommandQItem to wrap around CHCICommandBase.
leave
KErrNotSupported if aCommandData is not recognised. E.g. if the caller of the function is asking for a command from a version of the Bluetooth specification that the licensee HCI implementation doesn't support.
leave
KErrHardwareNotAvailable if unable to add the command to the Command Queue due to the controller being in a power off state.
panic
EInitCmdAfterStart Attempting to add an initialisation command after the queue has been started.

Parameters

CHCICommandBase * aCommandDataThe data to be added to a command queue item which will be be placed on the queue. Ownership is passed.
MHCICommandQueueClient & aCmdProgressRecipientThe interface which will get notified about the command's progress.

MhcqAddPriorityCommandL(CHCICommandQItem *)

TUint MhcqAddPriorityCommandL(CHCICommandQItem *aQueItem)[pure virtual]

Adds a pre-allocated priority command item to the head of the command queue. Ownership of the command item is transferred from the caller (even in the event of an ..Add.. method leaving).

Use this function if you pre-allocated a CHCICommandQItem. Use this for ensuring that a command can get accepted by the command queue in low memory conditions.

leave
KErrHardwareNotAvailable if unable to add the command to the Command Queue due to the controller being in a power off state.

Parameters

CHCICommandQItem * aQueItemThe command queue item to be added to the queue. Ownership is passed.

MhcqAddPriorityCommandL(CHCICommandBase *, MHCICommandQueueClient &)

TUint MhcqAddPriorityCommandL(CHCICommandBase *aCommandData,
MHCICommandQueueClient &aCmdProgressRecipient
)[pure virtual]

Adds a priority command to the head of the command queue. Ownership of the command data is transfered from the caller (even in the event of an ..Add.. method leaving).

leave
KErrNoMemory This function may leave as it allocates a CHCICommandQItem to wrap around CHCICommandBase.
leave
KErrNotSupported if aCommandData is not recognised. E.g. if the caller of the function is asking for a command from a version of the Bluetooth specification that the licensee HCI implementation doesn't support.
leave
KErrHardwareNotAvailable if unable to add the command to the Command Queue due to the controller being in a power off state.

Parameters

CHCICommandBase * aCommandDataThe data to be added to a command queue item which will be be placed on the queue. Ownership is passed.
MHCICommandQueueClient & aCmdProgressRecipientThe interface which will get notified about the command's progress.

MhcqMaxHciCommandTimeout()

TUint MhcqMaxHciCommandTimeout()const [pure virtual]

MhcqQdpPluginInterface(TUid)

TAny *MhcqQdpPluginInterface(TUidaUid)const [pure virtual]

This accesses CHCICmdQueueDecisionPlugin::Interface allowing clients of the Command Queue to request additional interfaces from the QDP

This function will panic if a client attempts to get hold of MHCICmdQueueDeicisionInterface, which is exclusive to the Command Queue.

CHCICmdQueueDecisionPlugin::Interface
panic
EIllegalRequestForQDPInterface if the client requests MHCICmdQueueDecisionInterface

Parameters

TUid aUidUID of interface to request from the QDP

MhcqRemoveAllCommands(const MHCICommandQueueClient &)

voidMhcqRemoveAllCommands(const MHCICommandQueueClient &aCmdOriginator)[pure virtual]

Removes from the Command Queue of all commands a given client has added to the queue.

This should always be called by a MHCICommandQueueClient that has added commands to the Command Queue before it is deleted.

It should be noted that once this is called:
  • Commands that are pending and have not yet been sent may never get sent.

  • Pointers to the CHCICommandQItem may (or may not) be valid.

Parameters

const MHCICommandQueueClient & aCmdOriginatorThe client of commands that are to be purged from the Command Queue.

MhcqRemoveCommand(TUint, const MHCICommandQueueClient &)

TInt MhcqRemoveCommand(TUintaCommandId,
const MHCICommandQueueClient &aCmdOriginator
)[pure virtual]

Removes the command, which has ID aCommandId, from the queue of commands that haven't been sent to the Bluetooth controller yet.

Parameters

TUint aCommandIdthe ID of the command to remove.
const MHCICommandQueueClient & aCmdOriginatorThe client that added the command in the first place. This means one client can't remove the commands of another client.