Loading...
Searching...
No Matches
juce::midi_ci::DeviceListener Struct Reference

## Detailed Description

An interface that receives callbacks when certain messages are received by a Device.

The documentation for this struct was generated from the following file:

- juce_midi_ci/ci/juce_CIDeviceListener.h

## Public Member Functions

| DeviceListener ()=default
virtual | ~DeviceListener ()=default
| DeviceListener (const DeviceListener &)=default
| DeviceListener (DeviceListener &&)=default
DeviceListener & | operator= (const DeviceListener &)=default
DeviceListener & | operator= (DeviceListener &&)=default
virtual void | deviceAdded (MUID x)
| Called to indicate that a device with the provided MUID was discovered.
virtual void | deviceRemoved (MUID x)
| Called to indicate that a device's MUID was invalidated.
virtual void | endpointReceived (MUID x, Message::EndpointInquiryResponse response)
| Called to indicate that endpoint information was received for the given device.
virtual void | messageNotAcknowledged (MUID x, Message::NAK)
| Called to indicate that a NAK message was received.
virtual void | profileStateReceived (MUID x, ChannelInGroup destination)
| Called to indicate that another device reported its enabled and disabled profiles on a particular channel.
virtual void | profilePresenceChanged (MUID x, ChannelInGroup destination, Profile profile, bool exists)
| Called to indicate that a profile was added or removed.
virtual void | profileEnablementChanged (MUID x, ChannelInGroup destination, Profile profile, int numChannels)
| Called to indicate that a profile was enabled or disabled.
virtual void | profileDetailsReceived (MUID x, ChannelInGroup destination, Profile profile, std::byte target, Span< const std::byte > data)
| Called to indicate that details about a profile were received.
virtual void | profileSpecificDataReceived (MUID x, ChannelInGroup destination, Profile profile, Span< const std::byte > data)
| Called to indicate that data for a profile were received.
virtual void | propertyExchangeCapabilitiesReceived (MUID x)
| Called to indicate that another device reported its property exchange capabilities.
virtual void | propertySubscriptionDataReceived (MUID x, const PropertySubscriptionData &data)
| Called to indicate that a subscription update was received.
virtual void | propertySubscriptionChanged (SubscriptionKey subscription, const std::optional< String > &subscribeId)
| Called when a remote device updates a subscription by accepting or terminating it.

## Constructors and Destructors

## DeviceListener() [1/3]

juce::midi_ci::DeviceListener::DeviceListener | ( |  | ) |

default

Referenced by DeviceListener(), DeviceListener(), operator=(), and operator=().

## ~DeviceListener()

virtual juce::midi_ci::DeviceListener::~DeviceListener | ( |  | ) |

virtual default

## DeviceListener() [2/3]

juce::midi_ci::DeviceListener::DeviceListener | ( | const DeviceListener & |  | ) |

default

References DeviceListener().

## DeviceListener() [3/3]

juce::midi_ci::DeviceListener::DeviceListener | ( | DeviceListener && |  | ) |

default

References DeviceListener().

## Member Functions

## operator=() [1/2]

DeviceListener & juce::midi_ci::DeviceListener::operator= | ( | const DeviceListener & |  | ) |

default

References DeviceListener().

## operator=() [2/2]

DeviceListener & juce::midi_ci::DeviceListener::operator= | ( | DeviceListener && |  | ) |

default

References DeviceListener().

## deviceAdded()

virtual void juce::midi_ci::DeviceListener::deviceAdded | ( | MUID | x | ) |

inline virtual

Called to indicate that a device with the provided MUID was discovered.

To find out more about the device, use Device::getDiscoveryInfoForMuid().

References x.

## deviceRemoved()

virtual void juce::midi_ci::DeviceListener::deviceRemoved | ( | MUID | x | ) |

inline virtual

Called to indicate that a device's MUID was invalidated.

If you were previously storing your own information about this device, you should forget that information here.

References x.

## endpointReceived()

virtual void juce::midi_ci::DeviceListener::endpointReceived | ( | MUID | x,
|  | Message::EndpointInquiryResponse | response )

inline virtual

Called to indicate that endpoint information was received for the given device.

See the MIDI-CI spec for an explanation of the different status codes.

References x.

## messageNotAcknowledged()

virtual void juce::midi_ci::DeviceListener::messageNotAcknowledged | ( | MUID | x,
|  | Message::NAK | )

inline virtual

Called to indicate that a NAK message was received.

This is useful e.g. to display a diagnostic to the user, or to cache the failed request details and retry the request at a later date.

The message field of the NAK is 7-bit text. You can convert it to a string using Encodings::stringFrom7BitText().

References x.

## profileStateReceived()

virtual void juce::midi_ci::DeviceListener::profileStateReceived | ( | MUID | x,
|  | ChannelInGroup | destination )

inline virtual

Called to indicate that another device reported its enabled and disabled profiles on a particular channel.

See also
  Device::getProfileStateForMuid()

References x.

## profilePresenceChanged()

virtual void juce::midi_ci::DeviceListener::profilePresenceChanged | ( | MUID | x,
|  | ChannelInGroup | destination,
|  | Profile | profile,
|  | bool | exists )

inline virtual

Called to indicate that a profile was added or removed.

References x.

## profileEnablementChanged()

virtual void juce::midi_ci::DeviceListener::profileEnablementChanged | ( | MUID | x,
|  | ChannelInGroup | destination,
|  | Profile | profile,
|  | int | numChannels )

inline virtual

Called to indicate that a profile was enabled or disabled.

A channel count of 0 indicates that the profile was disabled.

References x.

## profileDetailsReceived()

virtual void juce::midi_ci::DeviceListener::profileDetailsReceived | ( | MUID | x,
|  | ChannelInGroup | destination,
|  | Profile | profile,
|  | std::byte | target,
|  | Span< const std::byte > | data )

inline virtual

Called to indicate that details about a profile were received.

References x.

## profileSpecificDataReceived()

virtual void juce::midi_ci::DeviceListener::profileSpecificDataReceived | ( | MUID | x,
|  | ChannelInGroup | destination,
|  | Profile | profile,
|  | Span< const std::byte > | data )

inline virtual

Called to indicate that data for a profile were received.

Note that this function may be called either when a remote device attempts to send data to one of the local Device's profiles, or when a profile on a remote device produces some data.

Each profile will specify its own mechanism for distinguishing between the two cases if necessary.

References x.

## propertyExchangeCapabilitiesReceived()

virtual void juce::midi_ci::DeviceListener::propertyExchangeCapabilitiesReceived | ( | MUID | x | ) |

inline virtual

Called to indicate that another device reported its property exchange capabilities.

See also
  Device::getPropertyExchangeCapabilitiesResponseForMuid()

References x.

## propertySubscriptionDataReceived()

virtual void juce::midi_ci::DeviceListener::propertySubscriptionDataReceived | ( | MUID | x,
|  | const PropertySubscriptionData & | data )

inline virtual

Called to indicate that a subscription update was received.

This only receives messages with responder commands (partial, full, notify, end).

To start a subscription, use Device::sendPropertySubscriptionStart().

References x.

## propertySubscriptionChanged()

virtual void juce::midi_ci::DeviceListener::propertySubscriptionChanged | ( | SubscriptionKey | subscription,
|  | const std::optional< String > & | subscribeId )

inline virtual

Called when a remote device updates a subscription by accepting or terminating it.

If the subscription was accepted, the subscribeId will be non-null. Otherwise, a null subscribeId indicates that the subscription was terminated.

### Purchase

Get JUCE

### Discover

What's New in JUCE Features

### Learn

Documentaion Tutorials Made with JUCE Resources

### Support

JUCE Forum Newsletter Archive

### About

Contact Us JUCE Legal JUCE Licensing FAQ

### Events

Audio Developer Conference
© Raw Material Software Limited