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

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
 
DeviceListeneroperator= (const DeviceListener &)=default
 
DeviceListeneroperator= (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]

midi_ci::DeviceListener::DeviceListener ( )
default

◆ ~DeviceListener()

virtual midi_ci::DeviceListener::~DeviceListener ( )
virtualdefault

◆ DeviceListener() [2/3]

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

◆ DeviceListener() [3/3]

midi_ci::DeviceListener::DeviceListener ( DeviceListener && )
default

Member Function Documentation

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ deviceAdded()

virtual void 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 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 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 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 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 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 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 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 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 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 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 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:
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram