drumstick  1.1.0
PortInfo Class Reference

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.
 
PortInfoclone ()
 Copy the current object. More...
 
PortInfooperator= (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...
 

Detailed Description

Port information container.

Examples:
sysinfo.cpp.

Definition at line 40 of file alsaport.h.

Constructor & Destructor Documentation

PortInfo ( const PortInfo other)

Copy constructor.

Parameters
otherAnother PortInfo object reference

Definition at line 65 of file alsaport.cpp.

PortInfo ( snd_seq_port_info_t *  other)

Constructor.

Parameters
otherAn ALSA port info object pointer

Definition at line 78 of file alsaport.cpp.

PortInfo ( MidiClient seq,
const int  client,
const int  port 
)

Constructor.

Parameters
seqA MidiClient instance
clientAn existing client number
portAn existing port number

Definition at line 90 of file alsaport.cpp.

References CHECK_WARNING, and MidiClient::getHandle().

PortInfo ( MidiClient seq,
const int  port 
)

Constructor.

Parameters
seqA MidiClient instance
portAn existing port number

Definition at line 101 of file alsaport.cpp.

References CHECK_WARNING, and MidiClient::getHandle().

Member Function Documentation

PortInfo * clone ( )

Copy the current object.

Returns
A pointer to the new object

Definition at line 120 of file alsaport.cpp.

References PortInfo::PortInfo().

const snd_seq_addr_t * getAddr ( )

Gets the address record for this port.

Returns
A pointer to the address record
See Also
setAddr()

Definition at line 167 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.

Returns
The capabilities bitmap
See Also
setCapability()

Definition at line 189 of file alsaport.cpp.

Referenced by MidiClient::filterPorts(), MidiPort::getCapability(), MidiPort::getReadSubscribers(), and MidiPort::getWriteSubscribers().

int getClient ( )

Gets the client number.

Returns
The client number
See Also
setClient()

Definition at line 145 of file alsaport.cpp.

Referenced by MidiPort::getReadSubscribers(), MidiPort::getWriteSubscribers(), MidiClient::portDetach(), and PortInfo::readSubscribers().

QString getClientName ( ) const
inline

Gets the client name.

See Also
setClientName()

Definition at line 60 of file alsaport.h.

int getMidiChannels ( )

Gets the MIDI channels.

Returns
The MIDI channels
See Also
setMidiChannels()

Definition at line 211 of file alsaport.cpp.

Referenced by MidiPort::getMidiChannels().

int getMidiVoices ( )

Gets the MIDI voices.

Returns
The MIDI voices
See Also
setMidiVoices()

Definition at line 222 of file alsaport.cpp.

Referenced by MidiPort::getMidiVoices().

QString getName ( void  )

Gets the port name.

Returns
The port name
See Also
setName()
Examples:
sysinfo.cpp.

Definition at line 178 of file alsaport.cpp.

Referenced by MidiPort::getPortName().

int getPort ( )

Gets the port number.

Returns
The port number
See Also
setPort()
Examples:
sysinfo.cpp.

Definition at line 156 of file alsaport.cpp.

Referenced by MidiPort::applyPortInfo(), MidiPort::getPortId(), MidiClient::portDetach(), and PortInfo::readSubscribers().

int getPortSpecified ( )

Gets the port-specified mode.

Returns
The port-specified mode.
See Also
setPortSpecified()

Definition at line 264 of file alsaport.cpp.

SubscribersList getReadSubscribers ( ) const

Gets the list of read subscribers.

Returns
The list of read subscribers
Examples:
sysinfo.cpp.

Definition at line 411 of file alsaport.cpp.

Referenced by MidiPort::getReadSubscribers().

int getReadUse ( )

Get the number of read subscriptions.

Returns
The number of read subscriptions.

Definition at line 243 of file alsaport.cpp.

int getSizeOfInfo ( ) const

Gets the size of the ALSA info object.

Returns
The size of the object

Definition at line 473 of file alsaport.cpp.

int getSynthVoices ( )

Gets the synth voices.

Returns
The synth voices
See Also
setSynthVoices()

Definition at line 233 of file alsaport.cpp.

Referenced by MidiPort::getSynthVoices().

bool getTimestamping ( )

Gets the timestamping mode.

Returns
The timestamping mode
See Also
setTimestamping()

Definition at line 484 of file alsaport.cpp.

Referenced by MidiPort::getTimestamping().

int getTimestampQueue ( )

Gets the timestamping queue number.

Returns
The timestamping queue number
See Also
setTimestampQueue()

Definition at line 506 of file alsaport.cpp.

Referenced by MidiPort::getTimestampQueue().

bool getTimestampReal ( )

Gets the timestamping real mode.

Returns
The timestamping real mode
See Also
setTimestampReal()

Definition at line 495 of file alsaport.cpp.

Referenced by MidiPort::getTimestampReal().

unsigned int getType ( )

Gets the port type.

Returns
The port type
See Also
setType()
Examples:
sysinfo.cpp.

Definition at line 200 of file alsaport.cpp.

Referenced by MidiPort::getPortType().

SubscribersList getWriteSubscribers ( ) const

Gets the list of write subscribers.

Returns
The list of write subscribers
Examples:
sysinfo.cpp.

Definition at line 421 of file alsaport.cpp.

Referenced by MidiPort::getWriteSubscribers().

int getWriteUse ( )

Gets the number of write subscriptions.

Returns
The number of write subscriptions.

Definition at line 253 of file alsaport.cpp.

PortInfo & operator= ( const PortInfo other)

Assignment operator.

Parameters
otherAnother PortInfo object reference
Returns
This object

Definition at line 130 of file alsaport.cpp.

void readSubscribers ( MidiClient seq)
protected
void setAddr ( const snd_seq_addr_t *  addr)

Sets the address record.

Parameters
addrAn address record pointer
See Also
getAddr()

Definition at line 297 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:

  • SND_SEQ_PORT_CAP_READ Readable from this port
  • SND_SEQ_PORT_CAP_WRITE Writable to this port
  • SND_SEQ_PORT_CAP_DUPLEX Read/write duplex access is supported
  • SND_SEQ_PORT_CAP_SUBS_READ Read subscription is allowed
  • SND_SEQ_PORT_CAP_SUBS_WRITE Write subscription is allowed
  • SND_SEQ_PORT_CAP_NO_EXPORT Subscription management from 3rd clients is disallowed
Parameters
capabilityThe capability bitmap.
See Also
getCapability()

Definition at line 330 of file alsaport.cpp.

Referenced by MidiPort::setCapability().

void setClient ( int  client)

Sets the client number.

Parameters
clientThe client number
See Also
getClient()

Definition at line 275 of file alsaport.cpp.

Referenced by ClientInfo::readPorts().

void setClientName ( QString  name)
inlineprotected

Sets the client name.

See Also
getClientName()
Parameters
nameClient name

Definition at line 99 of file alsaport.h.

Referenced by MidiPort::getReadSubscribers(), MidiPort::getWriteSubscribers(), and ClientInfo::readPorts().

void setMidiChannels ( int  channels)

Set the MIDI channels.

Parameters
channelsThe MIDI channels
See Also
getMidiChannels()

Definition at line 368 of file alsaport.cpp.

Referenced by MidiPort::setMidiChannels().

void setMidiVoices ( int  voices)

Sets the MIDI voices.

Parameters
voicesThe MIDI voices
See Also
getMidiVoices()

Definition at line 379 of file alsaport.cpp.

Referenced by MidiPort::setMidiVoices().

void setName ( QString const &  name)

Sets the port name.

Parameters
nameThe port name
See Also
getName()

Definition at line 308 of file alsaport.cpp.

Referenced by MidiPort::setPortName().

void setPort ( int  port)

Set the port number.

Parameters
portThe port number
See Also
getPort()

Definition at line 286 of file alsaport.cpp.

Referenced by ClientInfo::readPorts().

void setPortSpecified ( int  val)

Sets the port-specified mode.

Parameters
valThe port-specified mode.
See Also
getPortSpecified()

Definition at line 401 of file alsaport.cpp.

void setSynthVoices ( int  voices)

Sets the synth voices.

Parameters
voicesThe synth voices
See Also
getSynthVoices()

Definition at line 390 of file alsaport.cpp.

Referenced by MidiPort::setSynthVoices().

void setTimestamping ( bool  value)

Sets the timestamping mode.

Parameters
valueThe timestamping mode
See Also
getTimestamping()

Definition at line 517 of file alsaport.cpp.

Referenced by MidiPort::setTimestamping().

void setTimestampQueue ( int  queueId)

Sets the timestamp queue number.

Parameters
queueIdThe timestamp queue number
See Also
getTimestampQueue()

Definition at line 539 of file alsaport.cpp.

Referenced by MidiPort::setTimestampQueue().

void setTimestampReal ( bool  value)

Sets the timestamping real mode.

Parameters
valueThe timestamping real mode
See Also
getTimestampReal()

Definition at line 528 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:

  • SND_SEQ_PORT_TYPE_SPECIFIC Hardware specific port
  • SND_SEQ_PORT_TYPE_MIDI_GENERIC Generic MIDI device
  • SND_SEQ_PORT_TYPE_MIDI_GM General MIDI compatible device
  • SND_SEQ_PORT_TYPE_MIDI_GM2 General MIDI 2 compatible device
  • SND_SEQ_PORT_TYPE_MIDI_GS GS compatible device
  • SND_SEQ_PORT_TYPE_MIDI_XG XG compatible device
  • SND_SEQ_PORT_TYPE_MIDI_MT32 MT-32 compatible device
  • SND_SEQ_PORT_TYPE_HARDWARE Implemented in hardware
  • SND_SEQ_PORT_TYPE_SOFTWARE Implemented in software
  • SND_SEQ_PORT_TYPE_SYNTHESIZER Generates sound
  • SND_SEQ_PORT_TYPE_PORT Connects to other device(s)
  • SND_SEQ_PORT_TYPE_APPLICATION Application (sequencer/editor)
Parameters
typeThe port type bitmap
See Also
getType()

Definition at line 357 of file alsaport.cpp.

Referenced by MidiPort::setPortType().


The documentation for this class was generated from the following files: