![]() |
drumstick 2.10.0
C++ MIDI libraries using Qt objects, idioms, and style.
|
Subscription management. More...
#include <subscription.h>
Public Member Functions | |
| Subscription () | |
| Default constructor. | |
| Subscription (const Subscription &other) | |
| Copy constructor. More... | |
| Subscription (snd_seq_port_subscribe_t *other) | |
| Constructor. More... | |
| Subscription (MidiClient *seq) | |
| Constructor. More... | |
| virtual | ~Subscription () |
| Destructor. | |
| Subscription * | clone () |
| Copy the current object. More... | |
| int | getSizeOfInfo () const |
| Gets the size of the ALSA subscription object. More... | |
| void | setSender (unsigned char client, unsigned char port) |
| Sets the Subscription's sender (MIDI OUT) port. More... | |
| void | setDest (unsigned char client, unsigned char port) |
| Sets the Subscription's destination (MIDI IN) port. More... | |
| void | subscribe (MidiClient *seq) |
| Performs the subscription in the ALSA sequencer subsystem. More... | |
| void | unsubscribe (MidiClient *seq) |
| Breaks the subscription in the ALSA sequencer subsystem. More... | |
| const snd_seq_addr_t * | getSender () |
| Gets the sender address of the subscription (MIDI OUT port) More... | |
| const snd_seq_addr_t * | getDest () |
| Gets the destination address of the subscription (MIDI IN port) More... | |
| int | getQueue () |
| Gets the susbcription's queue number. More... | |
| bool | getExclusive () |
| Gets the subscription's exclusive flag. More... | |
| bool | getTimeUpdate () |
| Gets the susbcription's time-update flag. More... | |
| bool | getTimeReal () |
| Gets the susbcription's time-real (time-stamping) flag. More... | |
| void | setSender (const snd_seq_addr_t *addr) |
| Sets the Subscription's sender (MIDI OUT) port. More... | |
| void | setDest (const snd_seq_addr_t *addr) |
| Sets the Subscription's destination (MIDI IN) port. More... | |
| void | setQueue (int queue) |
| Sets the Subscription's Queue number. More... | |
| void | setExclusive (bool val) |
| Sets the subscription's exclusive flag. More... | |
| void | setTimeUpdate (bool val) |
| Sets the susbcription's time-update flag. More... | |
| void | setTimeReal (bool val) |
| Sets the subscription's time real (time-stamping) flag. More... | |
| Subscription & | operator= (const Subscription &other) |
| Assignment operator. More... | |
Subscription management.
This class represents a connection between two ports.
Definition at line 96 of file subscription.h.
| Subscription | ( | const Subscription & | other | ) |
Copy constructor.
| other | Existing Subscription object reference |
Definition at line 299 of file subscription.cpp.
|
explicit |
Constructor.
| other | Pointer to an ALSA subscription object |
Definition at line 309 of file subscription.cpp.
|
explicit |
Constructor.
| seq | Pointer to a MIDI Client object |
Definition at line 319 of file subscription.cpp.
References DRUMSTICK_ALSA_CHECK_WARNING, and MidiClient::getHandle().
| Subscription * clone | ( | ) |
Copy the current object.
Definition at line 338 of file subscription.cpp.
References Subscription::Subscription().
Referenced by MidiPort::subscribe().
| const snd_seq_addr_t * getDest | ( | ) |
Gets the destination address of the subscription (MIDI IN port)
Definition at line 372 of file subscription.cpp.
Referenced by MidiPort::unsubscribe().
| bool getExclusive | ( | ) |
Gets the subscription's exclusive flag.
Definition at line 392 of file subscription.cpp.
| int getQueue | ( | ) |
Gets the susbcription's queue number.
Definition at line 382 of file subscription.cpp.
| const snd_seq_addr_t * getSender | ( | ) |
Gets the sender address of the subscription (MIDI OUT port)
Definition at line 362 of file subscription.cpp.
Referenced by MidiPort::unsubscribe().
| int getSizeOfInfo | ( | ) | const |
Gets the size of the ALSA subscription object.
Definition at line 542 of file subscription.cpp.
| bool getTimeReal | ( | ) |
Gets the susbcription's time-real (time-stamping) flag.
Definition at line 412 of file subscription.cpp.
| bool getTimeUpdate | ( | ) |
Gets the susbcription's time-update flag.
Definition at line 402 of file subscription.cpp.
| Subscription & operator= | ( | const Subscription & | other | ) |
Assignment operator.
| other | Existing subscription object reference |
Definition at line 349 of file subscription.cpp.
| void setDest | ( | const snd_seq_addr_t * | addr | ) |
Sets the Subscription's destination (MIDI IN) port.
| addr | Pointer to the destination ALSA address record |
Definition at line 432 of file subscription.cpp.
| void setDest | ( | unsigned char | client, |
| unsigned char | port | ||
| ) |
Sets the Subscription's destination (MIDI IN) port.
| client | Client number |
| port | Port number |
Definition at line 497 of file subscription.cpp.
References Subscription::setDest().
Referenced by Subscription::setDest(), MidiPort::subscribeFrom(), MidiPort::subscribeTo(), MidiPort::unsubscribeFrom(), and MidiPort::unsubscribeTo().
| void setExclusive | ( | bool | val | ) |
Sets the subscription's exclusive flag.
| val | Exclusive flag |
Definition at line 452 of file subscription.cpp.
| void setQueue | ( | int | q | ) |
Sets the Subscription's Queue number.
| q | Queue number |
Definition at line 442 of file subscription.cpp.
| void setSender | ( | const snd_seq_addr_t * | addr | ) |
Sets the Subscription's sender (MIDI OUT) port.
| addr | Pointer to the sender ALSA address record |
Definition at line 422 of file subscription.cpp.
| void setSender | ( | unsigned char | client, |
| unsigned char | port | ||
| ) |
Sets the Subscription's sender (MIDI OUT) port.
| client | Client number |
| port | Port number |
Definition at line 483 of file subscription.cpp.
References Subscription::setSender().
Referenced by Subscription::setSender(), MidiPort::subscribeFrom(), MidiPort::subscribeTo(), MidiPort::unsubscribeFrom(), and MidiPort::unsubscribeTo().
| void setTimeReal | ( | bool | val | ) |
Sets the subscription's time real (time-stamping) flag.
| val | Time real flag |
Definition at line 472 of file subscription.cpp.
| void setTimeUpdate | ( | bool | val | ) |
Sets the susbcription's time-update flag.
| val | Time update flag |
Definition at line 462 of file subscription.cpp.
| void subscribe | ( | MidiClient * | seq | ) |
Performs the subscription in the ALSA sequencer subsystem.
Neither the sender nor the destination ports need to belong to the same MidiClient instance performing the subscription.
| seq | MidiClient instance pointer |
Definition at line 512 of file subscription.cpp.
References DRUMSTICK_ALSA_CHECK_WARNING, MidiClient::getHandle(), and MidiClient::isOpened().
Referenced by MidiPort::subscribe().
| void unsubscribe | ( | MidiClient * | seq | ) |
Breaks the subscription in the ALSA sequencer subsystem.
Neither the sender nor the destination ports need to belong to the same MidiClient instance breaking the subscription.
| seq | MidiClient instance pointer |
Definition at line 528 of file subscription.cpp.
References DRUMSTICK_ALSA_CHECK_WARNING, MidiClient::getHandle(), and MidiClient::isOpened().
Referenced by MidiPort::unsubscribe(), and MidiPort::unsubscribeAll().