drumstick 2.9.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 66 of file alsaport.cpp.
|
explicit |
Constructor.
other | An ALSA port info object pointer |
Definition at line 79 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 91 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 102 of file alsaport.cpp.
References DRUMSTICK_ALSA_CHECK_WARNING, and MidiClient::getHandle().
PortInfo * clone | ( | ) |
Copy the current object.
Definition at line 121 of file alsaport.cpp.
References PortInfo::PortInfo().
const snd_seq_addr_t * getAddr | ( | ) |
Gets the address record for this port.
Definition at line 180 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 202 of file alsaport.cpp.
Referenced by MidiClient::filterPorts(), MidiPort::getCapability(), MidiPort::getReadSubscribers(), and MidiPort::getWriteSubscribers().
int getClient | ( | ) |
Gets the client number.
Definition at line 148 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 169 of file alsaport.cpp.
int getMidiChannels | ( | ) |
Gets the MIDI channels.
Definition at line 224 of file alsaport.cpp.
Referenced by MidiPort::getMidiChannels().
int getMidiVoices | ( | ) |
Gets the MIDI voices.
Definition at line 235 of file alsaport.cpp.
Referenced by MidiPort::getMidiVoices().
QString getName | ( | ) |
Gets the port name.
Definition at line 191 of file alsaport.cpp.
Referenced by MidiPort::getPortName().
int getPort | ( | ) |
Gets the port number.
Definition at line 159 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 277 of file alsaport.cpp.
SubscribersList getReadSubscribers | ( | ) | const |
Gets the list of read subscribers.
Definition at line 424 of file alsaport.cpp.
Referenced by MidiPort::getReadSubscribers().
int getReadUse | ( | ) |
Get the number of read subscriptions.
Definition at line 256 of file alsaport.cpp.
int getSizeOfInfo | ( | ) | const |
Gets the size of the ALSA info object.
Definition at line 496 of file alsaport.cpp.
int getSynthVoices | ( | ) |
Gets the synth voices.
Definition at line 246 of file alsaport.cpp.
Referenced by MidiPort::getSynthVoices().
bool getTimestamping | ( | ) |
Gets the timestamping mode.
Definition at line 507 of file alsaport.cpp.
Referenced by MidiPort::getTimestamping().
int getTimestampQueue | ( | ) |
Gets the timestamping queue number.
Definition at line 529 of file alsaport.cpp.
Referenced by MidiPort::getTimestampQueue().
bool getTimestampReal | ( | ) |
Gets the timestamping real mode.
Definition at line 518 of file alsaport.cpp.
Referenced by MidiPort::getTimestampReal().
unsigned int getType | ( | ) |
Gets the port type.
Definition at line 213 of file alsaport.cpp.
Referenced by MidiPort::getPortType().
SubscribersList getWriteSubscribers | ( | ) | const |
Gets the list of write subscribers.
Definition at line 434 of file alsaport.cpp.
Referenced by MidiPort::getWriteSubscribers().
int getWriteUse | ( | ) |
Gets the number of write subscriptions.
Definition at line 266 of file alsaport.cpp.
Assignment operator.
other | Another PortInfo object reference |
Definition at line 131 of file alsaport.cpp.
|
protected |
Obtains the port subscribers lists.
seq | An opened MidiClient instance |
Definition at line 444 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 310 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 343 of file alsaport.cpp.
Referenced by MidiPort::setCapability().
void setClient | ( | int | client | ) |
Sets the client number.
client | The client number |
Definition at line 288 of file alsaport.cpp.
Referenced by ClientInfo::readPorts().
|
protected |
Sets the client name.
name | Client name |
Definition at line 486 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 381 of file alsaport.cpp.
Referenced by MidiPort::setMidiChannels().
void setMidiVoices | ( | int | voices | ) |
Sets the MIDI voices.
voices | The MIDI voices |
Definition at line 392 of file alsaport.cpp.
Referenced by MidiPort::setMidiVoices().
void setName | ( | QString const & | name | ) |
Sets the port name.
name | The port name |
Definition at line 321 of file alsaport.cpp.
Referenced by MidiPort::setPortName().
void setPort | ( | int | port | ) |
Set the port number.
port | The port number |
Definition at line 299 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 414 of file alsaport.cpp.
void setSynthVoices | ( | int | voices | ) |
Sets the synth voices.
voices | The synth voices |
Definition at line 403 of file alsaport.cpp.
Referenced by MidiPort::setSynthVoices().
void setTimestamping | ( | bool | value | ) |
Sets the timestamping mode.
value | The timestamping mode |
Definition at line 540 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 562 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 551 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 370 of file alsaport.cpp.
Referenced by MidiPort::setPortType().