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. | |
| 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. | |
| void | removeProfile (ProfileAtAddress) |
| Removes support for a profile on the specified group/channel. | |
| void | setProfileEnablement (ProfileAtAddress, int numChannels) |
| Activates or deactivates a profile on the specified group/channel. | |
| bool | tryRespond (ResponderOutput &, const Message::Parsed &) override |
Private Member Functions | |
| void | disableProfileImpl (ProfileAtAddress) |
| void | enableProfileImpl (ProfileAtAddress, int) |
| template<typename Body > | |
| bool | profileEnablementReceived (ResponderOutput &, const Body &) |
Private Attributes | |
| std::optional< ProfileAtAddress > | currentEnablementMessage |
| ProfileDelegate & | delegate |
| FunctionBlock | functionBlock |
| bool | isResponder = false |
| BufferOutput & | output |
| BlockProfileStates | states |
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.
@tags{Audio}
|
inline |
Rather than constructing one of these objects yourself, you should configure a Device with profile support, and then use Device::getProfileHost() to retrieve a profile host that has been set up to work with that device.
| 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.
|
private |
|
private |
|
inline |
Returns the profile states (supported/active) for all groups and channels.
References states.
|
inline |
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(), juce::midi_ci::ProfileAtAddress::profile, and states.
|
private |
| void juce::midi_ci::ProfileHost::removeProfile | ( | ProfileAtAddress | ) |
Removes support for a profile on the specified group/channel.
| void juce::midi_ci::ProfileHost::setProfileEnablement | ( | ProfileAtAddress | , |
| int | numChannels | ||
| ) |
Activates or deactivates a profile on the specified group/channel.
The profile should previously have been added with addProfile(). A positive value of numChannels will enable the profile, and a non-positive value will disable it. This includes group and function-block profiles; passing any positive value will enable the profile on the entire group or block.
|
overridevirtual |
Implements juce::midi_ci::ResponderDelegate.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Referenced by getProfileStates(), and getState().