PortInfo Class Reference

Port information container. More...

#include <alsaport.h>

List of all members.

Public Member Functions

 PortInfo ()
 Default constructor.
 PortInfo (const PortInfo &other)
 Copy constructor.
 PortInfo (snd_seq_port_info_t *other)
 Constructor.
 PortInfo (MidiClient *seq, const int client, const int port)
 Constructor.
 PortInfo (MidiClient *seq, const int port)
 Constructor.
virtual ~PortInfo ()
 Destructor.
PortInfoclone ()
 Copy the current object.
PortInfooperator= (const PortInfo &other)
 Assignment operator.
int getSizeOfInfo () const
 Gets the size of the ALSA info object.
int getClient ()
 Gets the client number.
int getPort ()
 Gets the port number.
QString getClientName () const
 Gets the client name.
const snd_seq_addr_t * getAddr ()
 Gets the address record for this port.
QString getName ()
 Gets the port name.
unsigned int getCapability ()
 Gets the capabilities bitmap.
unsigned int getType ()
 Gets the port type.
int getMidiChannels ()
 Gets the MIDI channels.
int getMidiVoices ()
 Gets the MIDI voices.
int getSynthVoices ()
 Gets the synth voices.
int getReadUse ()
 Get the number of read subscriptions.
int getWriteUse ()
 Gets the number of write subscriptions.
int getPortSpecified ()
 Gets the port-specified mode.
void setClient (int client)
 Sets the client number.
void setPort (int port)
 Set the port number.
void setAddr (const snd_seq_addr_t *addr)
 Sets the address record.
void setName (QString const &name)
 Sets the port name.
void setCapability (unsigned int capability)
 Sets the capability bitmap.
void setType (unsigned int type)
 Sets the port type.
void setMidiChannels (int channels)
 Set the MIDI channels.
void setMidiVoices (int voices)
 Sets the MIDI voices.
void setSynthVoices (int voices)
 Sets the synth voices.
void setPortSpecified (int val)
 Sets the port-specified mode.
SubscribersList getReadSubscribers () const
 Gets the list of read subscribers.
SubscribersList getWriteSubscribers () const
 Gets the list of write subscribers.
bool getTimestamping ()
 Gets the timestamping mode.
bool getTimestampReal ()
 Gets the timestamping real mode.
int getTimestampQueue ()
 Gets the timestamping queue number.
void setTimestamping (bool value)
 Sets the timestamping mode.
void setTimestampReal (bool value)
 Sets the timestamping real mode.
void setTimestampQueue (int queueId)
 Sets the timestamp queue number.

Protected Member Functions

void readSubscribers (MidiClient *seq)
 Obtains the port subscribers lists.
void freeSubscribers ()
 Releases the subscribers lists.
void setClientName (QString name)
 Sets the client name.

Friends

class MidiPort
class ClientInfo
class MidiClient


Detailed Description

Port information container.
Examples:

sysinfo.cpp.

Definition at line 40 of file alsaport.h.


Constructor & Destructor Documentation

PortInfo (  ) 

Default constructor.

Definition at line 56 of file alsaport.cpp.

Referenced by PortInfo::clone().

PortInfo ( const PortInfo other  ) 

Copy constructor.

Parameters:
other Another PortInfo object reference

Definition at line 65 of file alsaport.cpp.

PortInfo ( snd_seq_port_info_t *  other  ) 

Constructor.

Parameters:
other An ALSA port info object pointer

Definition at line 78 of file alsaport.cpp.

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

Constructor.

Parameters:
seq A MidiClient instance
client An existing client number
port An 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:
seq A MidiClient instance
port An existing port number

Definition at line 101 of file alsaport.cpp.

References CHECK_WARNING, and MidiClient::getHandle().

~PortInfo (  )  [virtual]

Destructor.

Definition at line 110 of file alsaport.cpp.

References PortInfo::freeSubscribers().


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().

void freeSubscribers (  )  [protected]

Releases the subscribers lists.

Definition at line 462 of file alsaport.cpp.

Referenced by PortInfo::readSubscribers(), and 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 (  ) 

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:
other Another 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:
addr An 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:
capability The 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:
client The client number
See also:
getClient()

Definition at line 275 of file alsaport.cpp.

Referenced by ClientInfo::readPorts().

void setClientName ( QString  name  )  [inline, protected]

Sets the client name.

See also:
getClientName()

Definition at line 95 of file alsaport.h.

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

void setMidiChannels ( int  channels  ) 

Set the MIDI channels.

Parameters:
channels The 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:
voices The 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:
name The 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:
port The 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:
val The port-specified mode.
See also:
getPortSpecified()

Definition at line 401 of file alsaport.cpp.

void setSynthVoices ( int  voices  ) 

Sets the synth voices.

Parameters:
voices The 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:
value The 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:
queueId The 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:
value The 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:
type The port type bitmap
See also:
getType()

Definition at line 357 of file alsaport.cpp.

Referenced by MidiPort::setPortType().


Friends And Related Function Documentation

friend class ClientInfo [friend]

Definition at line 43 of file alsaport.h.

friend class MidiClient [friend]

Definition at line 44 of file alsaport.h.

friend class MidiPort [friend]

Definition at line 42 of file alsaport.h.


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

Generated on Wed Sep 8 10:12:50 2010 for drumstick by  doxygen 1.5.9