20#ifndef DRUMSTICK_ALSAPORT_H
21#define DRUMSTICK_ALSAPORT_H
42 friend class MidiPort;
43 friend class ClientInfo;
44 friend class MidiClient;
49 PortInfo(snd_seq_port_info_t* other);
50 PortInfo(MidiClient* seq,
const int client,
const int port);
51 PortInfo(MidiClient* seq,
const int port);
61 const snd_seq_addr_t* getAddr();
63 unsigned int getCapability();
64 unsigned int getType();
65 int getMidiChannels();
70 int getPortSpecified();
71 void setClient(
int client);
72 void setPort(
int port);
73 void setAddr(
const snd_seq_addr_t* addr);
74 void setName( QString
const& name );
75 void setCapability(
unsigned int capability);
76 void setType(
unsigned int type);
77 void setMidiChannels(
int channels);
78 void setMidiVoices(
int voices);
79 void setSynthVoices(
int voices);
80 void setPortSpecified(
int val);
84 bool getTimestamping();
85 bool getTimestampReal();
86 int getTimestampQueue();
87 void setTimestamping(
bool value);
88 void setTimestampReal(
bool value);
89 void setTimestampQueue(
int queueId);
93 void freeSubscribers();
102 snd_seq_port_info_t* m_Info;
103 QString m_ClientName;
122 friend class MidiClient;
128 void attach( MidiClient* seq );
206 MidiClient* m_MidiClient;
QList< MidiPort * > MidiPortList
List of Ports instances.
QList< PortInfo > PortInfoList
List of port information objects.
The QObject class is the base class of all Qt objects.
QString getPortName()
Gets the port name.
void freeSubscriptions()
Releases the lists of subscriptions.
void detached(MidiPort *port)
Signal emitted when the port is detached from a MidiClient.
void subscribeTo(PortInfo *port)
Subscribe to another port destination.
void updateConnectionsTo(const PortInfoList &desired)
Update the write subscriptions.
void unsubscribeAll()
Unsubscribe all subscriptions.
void attached(MidiPort *port)
Signal emitted when the port is attached to a MidiClient.
void unsubscribeTo(QString const &name)
Unsubscribe a destination port.
void subscribe(Subscription *subs)
Subscribe a Subscription object.
void subscribeFrom(PortInfo *port)
Subscribe a source port.
PortInfoList getWriteSubscribers()
Gets the list of write subscribers.
bool getTimestamping()
Gets the timestamping mode.
void updateConnectionsFrom(const PortInfoList &desired)
Update the read susbcriptions.
void setPortName(QString const &newName)
Sets the port name.
unsigned int getPortType()
Gets the port type.
int getMidiVoices()
Gets the MIDI voices.
void unsubscribe(Subscription *subs)
Unsubscribe a Subscription object.
int getTimestampQueue()
Gets the timestamp queue number.
void attach(MidiClient *seq)
Attach the port to a MidiClient instance.
void setPortType(unsigned int newValue)
Sets the port type bitmap.
PortInfoList getReadSubscribers()
Gets the list of read subscribers.
int getMidiChannels()
Gets the MIDI channels.
void setCapability(unsigned int newValue)
Sets the port capabilities.
void midiClientChanged(MidiPort *port, MidiClient *seq)
Signal emitted when the MidiClient has changed.
bool getTimestampReal()
Gets the timestamp real mode.
static bool containsAddress(const snd_seq_addr_t *addr, const PortInfoList &lst)
Checks if the provided address is included in the port list.
void subscribeFromAnnounce()
Subscribe from the System:announce port.
void setTimestamping(bool value)
Sets the timestamping mode.
void setMidiClient(MidiClient *seq)
Sets the MidiClient.
int getSynthVoices()
Gets the synth voices.
int getPortId()
Gets the port number.
void setMidiVoices(int newValue)
Sets the MIDI voices.
void setMidiChannels(int newValue)
Sets the MIDI channels.
void updateSubscribers()
Update the subscribers list in the PortInfo member.
void detach()
Detach the port from any MidiClient instance previously attached.
void setSynthVoices(int newValue)
Sets the synth voices.
void unsubscribeFrom(QString const &name)
Unsubscribe a source port.
PortInfo * getPortInfo()
Gets the PortInfo object pointer.
void setTimestampReal(bool value)
Sets the timestamp real mode.
unsigned int getCapability()
Gets the port capabilities.
void setTimestampQueue(int queueId)
Sets the timestamp queue number.
SubscriptionsList getSubscriptions() const
Gets the list of susbcriptions.
void applyPortInfo()
Applies all the the delayed PortInfo changes to the MIDI port object.
MidiPort(QObject *parent=0)
Constructor.
void subscribed(MidiPort *port, Subscription *subs)
Signal emitted when an internal subscription is done.
Port information container.
int getSizeOfInfo() const
Gets the size of the ALSA info object.
QString getClientName() const
Gets the client name.
int getClient()
Gets the client number.
int getPort()
Gets the port number.
PortInfo & operator=(const PortInfo &other)
Assignment operator.
PortInfo()
Default constructor.
PortInfo * clone()
Copy the current object.
void setClientName(QString name)
Sets the client name.
Classes managing ALSA sequencer subscriptions.
QList< Subscription > SubscriptionsList
List of subscriptions.
QList< Subscriber > SubscribersList
List of subscribers.