JUCE
|
Acting as a ResponderListener, instances of this class can formulate appropriate replies to profile transactions initiated by remote devices. More...
#include <juce_CIProfileHost.h>
Public Member Functions | |
ProfileHost (FunctionBlock fb, ProfileDelegate &d, BufferOutput &o) | |
void | addProfile (ProfileAtAddress, int maxNumChannels=1) |
Adds support for a profile on the specified group/channel with a maximum number of channels that may be activated. | |
void | removeProfile (ProfileAtAddress) |
Removes support for a profile on the specified group/channel. | |
void | enableProfile (ProfileAtAddress, int numChannels) |
Activates a profile on the specified group/channel with the provided number of channels. | |
void | disableProfile (ProfileAtAddress) |
Deactivates a profile on the specified group/channel. | |
const BlockProfileStates & | getProfileStates () const |
Returns the profile states (supported/active) for all groups and channels. | |
SupportedAndActive | getState (ProfileAtAddress profileAtAddress) const |
Returns the number of supported and active channels for the given profile on the specified group/channel. | |
bool | tryRespond (ResponderOutput &, const Message::Parsed &) override |
If the message is processed successfully, and a response sent, then this returns true. | |
![]() | |
ResponderDelegate ()=default | |
virtual | ~ResponderDelegate ()=default |
Acting as a ResponderListener, instances of this class can formulate appropriate replies to profile transactions initiated by remote devices.
ProfileHost instances also contains methods to inform remote devices about changes to local profile state.
Stores the current state of profiles on the local device.
juce::midi_ci::ProfileHost::ProfileHost | ( | FunctionBlock | fb, |
ProfileDelegate & | d, | ||
BufferOutput & | o | ||
) |
void juce::midi_ci::ProfileHost::addProfile | ( | ProfileAtAddress | , |
int | maxNumChannels = 1 |
||
) |
Adds support for a profile on the specified group/channel with a maximum number of channels that may be activated.
void juce::midi_ci::ProfileHost::removeProfile | ( | ProfileAtAddress | ) |
Removes support for a profile on the specified group/channel.
void juce::midi_ci::ProfileHost::enableProfile | ( | ProfileAtAddress | , |
int | numChannels | ||
) |
Activates a profile on the specified group/channel with the provided number of channels.
The profile should previously have been added with addProfile(), and numChannels should be in the closed range between 1 and the maximum number of channels allowed for that profile.
void juce::midi_ci::ProfileHost::disableProfile | ( | ProfileAtAddress | ) |
Deactivates a profile on the specified group/channel.
const BlockProfileStates & juce::midi_ci::ProfileHost::getProfileStates | ( | ) | const |
Returns the profile states (supported/active) for all groups and channels.
SupportedAndActive juce::midi_ci::ProfileHost::getState | ( | ProfileAtAddress | profileAtAddress | ) | const |
Returns the number of supported and active channels for the given profile on the specified group/channel.
If the supported channels is 0, then the profile is not supported on the group/channel.
If the active channels is 0, then the profile is inactive on the group/channel.
References juce::midi_ci::ProfileAtAddress::address, juce::midi_ci::BlockProfileStates::getStateForDestination(), and juce::midi_ci::ProfileAtAddress::profile.
|
overridevirtual |
If the message is processed successfully, and a response sent, then this returns true.
Otherwise, returns false, allowing other ResponderDelegates to attempt to handle the message if necessary.
Implements juce::midi_ci::ResponderDelegate.