JUCE

- Main Page
- Related Pages
- Topics
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Loading...
Searching...
No Matches
Public Member Functions | List of all members
juce::midi_ci::DeviceListener Struct Reference
juce_midi_ci » ci

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

`#include <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.

## Detailed Description

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

## Constructor & Destructor Documentation

## ◆ DeviceListener() [1/3]

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

## ◆ ~DeviceListener()

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

## ◆ DeviceListener() [2/3]

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

## ◆ DeviceListener() [3/3]

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

## Member Function Documentation

## ◆ operator=() [1/2]

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

## ◆ operator=() [2/2]

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

## ◆ deviceAdded()

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

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

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

## ◆ deviceRemoved()

virtual void juce::midi_ci::DeviceListener::deviceRemoved | ( | MUID | x | ) |
| 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.

## ◆ endpointReceived()

virtual void juce::midi_ci::DeviceListener::endpointReceived | ( | MUID | x,
|  | Message::EndpointInquiryResponse | response )
| 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.

## ◆ messageNotAcknowledged()

virtual void juce::midi_ci::DeviceListener::messageNotAcknowledged | ( | MUID | x,
|  | Message::NAK | )
| 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().

## ◆ profileStateReceived()

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

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

See also
  Device::getProfileStateForMuid()

## ◆ profilePresenceChanged()

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

Called to indicate that a profile was added or removed.

## ◆ profileEnablementChanged()

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

Called to indicate that a profile was enabled or disabled.

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

## ◆ profileDetailsReceived()

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

Called to indicate that details about a profile were received.

## ◆ profileSpecificDataReceived()

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

## ◆ propertyExchangeCapabilitiesReceived()

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

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

See also
  Device::getPropertyExchangeCapabilitiesResponseForMuid()

## ◆ propertySubscriptionDataReceived()

virtual void juce::midi_ci::DeviceListener::propertySubscriptionDataReceived | ( | MUID | x,
|  | const PropertySubscriptionData & | data )
| 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().

## ◆ propertySubscriptionChanged()

virtual void juce::midi_ci::DeviceListener::propertySubscriptionChanged | ( | SubscriptionKey | subscription,
|  | const std::optional< String > & | subscribeId )
| 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.

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

- juce_CIDeviceListener.h