![]() |
drumstick 2.10.0
C++ MIDI libraries using Qt objects, idioms, and style.
|
Port information container. More...
#include <alsaport.h>
Public Member Functions | |
| PortInfo () | |
| Default constructor. | |
| PortInfo (const PortInfo &other) | |
| Copy constructor. More... | |
| PortInfo (snd_seq_port_info_t *other) | |
| Constructor. More... | |
| PortInfo (MidiClient *seq, const int client, const int port) | |
| Constructor. More... | |
| PortInfo (MidiClient *seq, const int port) | |
| Constructor. More... | |
| virtual | ~PortInfo () |
| Destructor. | |
| PortInfo * | clone () |
| Copy the current object. More... | |
| PortInfo & | operator= (const PortInfo &other) |
| Assignment operator. More... | |
| int | getSizeOfInfo () const |
| Gets the size of the ALSA info object. More... | |
| int | getClient () |
| Gets the client number. More... | |
| int | getPort () |
| Gets the port number. More... | |
| QString | getClientName () const |
| Gets the client name. More... | |
| const snd_seq_addr_t * | getAddr () |
| Gets the address record for this port. More... | |
| QString | getName () |
| Gets the port name. More... | |
| unsigned int | getCapability () |
| Gets the capabilities bitmap. More... | |
| unsigned int | getType () |
| Gets the port type. More... | |
| int | getMidiChannels () |
| Gets the MIDI channels. More... | |
| int | getMidiVoices () |
| Gets the MIDI voices. More... | |
| int | getSynthVoices () |
| Gets the synth voices. More... | |
| int | getReadUse () |
| Get the number of read subscriptions. More... | |
| int | getWriteUse () |
| Gets the number of write subscriptions. More... | |
| int | getPortSpecified () |
| Gets the port-specified mode. More... | |
| void | setClient (int client) |
| Sets the client number. More... | |
| void | setPort (int port) |
| Set the port number. More... | |
| void | setAddr (const snd_seq_addr_t *addr) |
| Sets the address record. More... | |
| void | setName (QString const &name) |
| Sets the port name. More... | |
| void | setCapability (unsigned int capability) |
| Sets the capability bitmap. More... | |
| void | setType (unsigned int type) |
| Sets the port type. More... | |
| void | setMidiChannels (int channels) |
| Set the MIDI channels. More... | |
| void | setMidiVoices (int voices) |
| Sets the MIDI voices. More... | |
| void | setSynthVoices (int voices) |
| Sets the synth voices. More... | |
| void | setPortSpecified (int val) |
| Sets the port-specified mode. More... | |
| SubscribersList | getReadSubscribers () const |
| Gets the list of read subscribers. More... | |
| SubscribersList | getWriteSubscribers () const |
| Gets the list of write subscribers. More... | |
| bool | getTimestamping () |
| Gets the timestamping mode. More... | |
| bool | getTimestampReal () |
| Gets the timestamping real mode. More... | |
| int | getTimestampQueue () |
| Gets the timestamping queue number. More... | |
| void | setTimestamping (bool value) |
| Sets the timestamping mode. More... | |
| void | setTimestampReal (bool value) |
| Sets the timestamping real mode. More... | |
| void | setTimestampQueue (int queueId) |
| Sets the timestamp queue number. More... | |
Protected Member Functions | |
| void | readSubscribers (MidiClient *seq) |
| Obtains the port subscribers lists. More... | |
| void | freeSubscribers () |
| Releases the subscribers lists. | |
| void | setClientName (QString name) |
| Sets the client name. More... | |
Port information container.
Definition at line 51 of file alsaport.h.
Copy constructor.
| other | Another PortInfo object reference |
Definition at line 68 of file alsaport.cpp.
|
explicit |
Constructor.
| other | An ALSA port info object pointer |
Definition at line 81 of file alsaport.cpp.
| PortInfo | ( | MidiClient * | seq, |
| const int | client, | ||
| const int | port | ||
| ) |
Constructor.
| seq | A MidiClient instance |
| client | An existing client number |
| port | An existing port number |
Definition at line 93 of file alsaport.cpp.
References DRUMSTICK_ALSA_CHECK_WARNING, and MidiClient::getHandle().
| PortInfo | ( | MidiClient * | seq, |
| const int | port | ||
| ) |
Constructor.
| seq | A MidiClient instance |
| port | An existing port number |
Definition at line 104 of file alsaport.cpp.
References DRUMSTICK_ALSA_CHECK_WARNING, and MidiClient::getHandle().
| PortInfo * clone | ( | ) |
Copy the current object.
Definition at line 123 of file alsaport.cpp.
References PortInfo::PortInfo().
| const snd_seq_addr_t * getAddr | ( | ) |
Gets the address record for this port.
Definition at line 182 of file alsaport.cpp.
Referenced by MidiPort::containsAddress(), MidiPort::subscribeFrom(), MidiPort::subscribeTo(), MidiPort::unsubscribeFrom(), MidiPort::unsubscribeTo(), MidiPort::updateConnectionsFrom(), and MidiPort::updateConnectionsTo().
| unsigned int getCapability | ( | ) |
Gets the capabilities bitmap.
Definition at line 204 of file alsaport.cpp.
Referenced by MidiClient::filterPorts(), MidiPort::getCapability(), MidiPort::getReadSubscribers(), and MidiPort::getWriteSubscribers().
| int getClient | ( | ) |
Gets the client number.
Definition at line 150 of file alsaport.cpp.
Referenced by MidiPort::getReadSubscribers(), MidiPort::getWriteSubscribers(), MidiClient::portDetach(), and PortInfo::readSubscribers().
| QString getClientName | ( | ) | const |
Gets the client name.
Definition at line 171 of file alsaport.cpp.
| int getMidiChannels | ( | ) |
Gets the MIDI channels.
Definition at line 226 of file alsaport.cpp.
Referenced by MidiPort::getMidiChannels().
| int getMidiVoices | ( | ) |
Gets the MIDI voices.
Definition at line 237 of file alsaport.cpp.
Referenced by MidiPort::getMidiVoices().
| QString getName | ( | ) |
Gets the port name.
Definition at line 193 of file alsaport.cpp.
Referenced by MidiPort::getPortName().
| int getPort | ( | ) |
Gets the port number.
Definition at line 161 of file alsaport.cpp.
Referenced by MidiPort::applyPortInfo(), MidiClient::detachAllPorts(), MidiPort::getPortId(), MidiClient::portDetach(), and PortInfo::readSubscribers().
| int getPortSpecified | ( | ) |
Gets the port-specified mode.
Definition at line 279 of file alsaport.cpp.
| SubscribersList getReadSubscribers | ( | ) | const |
Gets the list of read subscribers.
Definition at line 426 of file alsaport.cpp.
Referenced by MidiPort::getReadSubscribers().
| int getReadUse | ( | ) |
Get the number of read subscriptions.
Definition at line 258 of file alsaport.cpp.
| int getSizeOfInfo | ( | ) | const |
Gets the size of the ALSA info object.
Definition at line 498 of file alsaport.cpp.
| int getSynthVoices | ( | ) |
Gets the synth voices.
Definition at line 248 of file alsaport.cpp.
Referenced by MidiPort::getSynthVoices().
| bool getTimestamping | ( | ) |
Gets the timestamping mode.
Definition at line 509 of file alsaport.cpp.
Referenced by MidiPort::getTimestamping().
| int getTimestampQueue | ( | ) |
Gets the timestamping queue number.
Definition at line 531 of file alsaport.cpp.
Referenced by MidiPort::getTimestampQueue().
| bool getTimestampReal | ( | ) |
Gets the timestamping real mode.
Definition at line 520 of file alsaport.cpp.
Referenced by MidiPort::getTimestampReal().
| unsigned int getType | ( | ) |
Gets the port type.
Definition at line 215 of file alsaport.cpp.
Referenced by MidiPort::getPortType().
| SubscribersList getWriteSubscribers | ( | ) | const |
Gets the list of write subscribers.
Definition at line 436 of file alsaport.cpp.
Referenced by MidiPort::getWriteSubscribers().
| int getWriteUse | ( | ) |
Gets the number of write subscriptions.
Definition at line 268 of file alsaport.cpp.
Assignment operator.
| other | Another PortInfo object reference |
Definition at line 133 of file alsaport.cpp.
|
protected |
Obtains the port subscribers lists.
| seq | An opened MidiClient instance |
Definition at line 446 of file alsaport.cpp.
References PortInfo::freeSubscribers(), PortInfo::getClient(), MidiClient::getHandle(), Subscriber::getIndex(), PortInfo::getPort(), Subscriber::setIndex(), Subscriber::setRoot(), and Subscriber::setType().
Referenced by ClientInfo::readPorts(), and MidiPort::updateSubscribers().
| void setAddr | ( | const snd_seq_addr_t * | addr | ) |
Sets the address record.
| addr | An address record pointer |
Definition at line 312 of file alsaport.cpp.
| void setCapability | ( | unsigned int | capability | ) |
Sets the capability bitmap.
Each port has the capability bitmaps to specify the access of the port from other clients. The capability bit flags are:
| capability | The capability bitmap. |
Definition at line 345 of file alsaport.cpp.
Referenced by MidiPort::setCapability().
| void setClient | ( | int | client | ) |
Sets the client number.
| client | The client number |
Definition at line 290 of file alsaport.cpp.
Referenced by ClientInfo::readPorts().
|
protected |
Sets the client name.
| name | Client name |
Definition at line 488 of file alsaport.cpp.
Referenced by MidiPort::getReadSubscribers(), MidiPort::getWriteSubscribers(), and ClientInfo::readPorts().
| void setMidiChannels | ( | int | channels | ) |
Set the MIDI channels.
| channels | The MIDI channels |
Definition at line 383 of file alsaport.cpp.
Referenced by MidiPort::setMidiChannels().
| void setMidiVoices | ( | int | voices | ) |
Sets the MIDI voices.
| voices | The MIDI voices |
Definition at line 394 of file alsaport.cpp.
Referenced by MidiPort::setMidiVoices().
| void setName | ( | QString const & | name | ) |
Sets the port name.
| name | The port name |
Definition at line 323 of file alsaport.cpp.
Referenced by MidiPort::setPortName().
| void setPort | ( | int | port | ) |
Set the port number.
| port | The port number |
Definition at line 301 of file alsaport.cpp.
Referenced by ClientInfo::readPorts().
| void setPortSpecified | ( | int | val | ) |
Sets the port-specified mode.
| val | The port-specified mode. |
Definition at line 416 of file alsaport.cpp.
| void setSynthVoices | ( | int | voices | ) |
Sets the synth voices.
| voices | The synth voices |
Definition at line 405 of file alsaport.cpp.
Referenced by MidiPort::setSynthVoices().
| void setTimestamping | ( | bool | value | ) |
Sets the timestamping mode.
| value | The timestamping mode |
Definition at line 542 of file alsaport.cpp.
Referenced by MidiPort::setTimestamping().
| void setTimestampQueue | ( | int | queueId | ) |
Sets the timestamp queue number.
| queueId | The timestamp queue number |
Definition at line 564 of file alsaport.cpp.
Referenced by MidiPort::setTimestampQueue().
| void setTimestampReal | ( | bool | value | ) |
Sets the timestamping real mode.
| value | The timestamping real mode |
Definition at line 553 of file alsaport.cpp.
Referenced by MidiPort::setTimestampReal().
| void setType | ( | unsigned int | type | ) |
Sets the port type.
The port type is defined combining some of the type bit flags:
| type | The port type bitmap |
Definition at line 372 of file alsaport.cpp.
Referenced by MidiPort::setPortType().