19#ifndef DRUMSTICK_SUBSCRIPTION_H
20#define DRUMSTICK_SUBSCRIPTION_H
23 #include <alsa/asoundlib.h>
36#if defined(DRUMSTICK_STATIC)
37#define DRUMSTICK_ALSA_EXPORT
39#if defined(drumstick_alsa_EXPORTS)
40#define DRUMSTICK_ALSA_EXPORT Q_DECL_EXPORT
42#define DRUMSTICK_ALSA_EXPORT Q_DECL_IMPORT
59 friend class PortInfo;
63 explicit Subscriber(snd_seq_query_subscribe_t* other);
70 const snd_seq_addr_t*
getRoot();
71 snd_seq_query_subs_type_t
getType();
74 const snd_seq_addr_t*
getAddr();
81 void setRoot(snd_seq_addr_t* addr);
82 void setType(snd_seq_query_subs_type_t type);
87 snd_seq_query_subscribe_t* m_Info;
107 void setSender(
unsigned char client,
unsigned char port);
108 void setDest(
unsigned char client,
unsigned char port);
113 const snd_seq_addr_t*
getDest();
118 void setSender(
const snd_seq_addr_t* addr);
119 void setDest(
const snd_seq_addr_t* addr);
127 snd_seq_port_subscribe_t* m_Info;
Subscriber()
Default constructor.
Subscriber & operator=(const Subscriber &other)
Assignment operator.
int getSizeOfInfo() const
Gets the size of the ALSA query subscriber object.
const snd_seq_addr_t * getRoot()
Gets the subscriber's root address.
void setType(snd_seq_query_subs_type_t type)
Sets the subscription type.
bool getExclusive()
Gets the subscriber's exclusive flag.
void setRoot(snd_seq_addr_t *addr)
Sets the subscriber's root address.
void setIndex(int index)
Sets the index of the subscriber.
int getIndex()
Gets the index of the subscriber container.
int getClient()
Gets the subscriber's client number.
const snd_seq_addr_t * getAddr()
Gets the subscriber's address.
int getQueue()
Gets the subscriber's queue number.
int getPort()
Gets the subscriober's port number.
int getNumSubs()
Gets the number of subscribers returned by a query operation.
void setClient(int client)
Sets the subscriber's client number.
snd_seq_query_subs_type_t getType()
Gets the subscription type (read or write).
bool getTimeUpdate()
Gets the susbcriber's time-update flag.
Subscriber * clone()
Copy the current object.
void setPort(int port)
Sets the subscriber's port number.
bool getTimeReal()
Gets the subscriber's time real time-stamp flag.
Subscription()
Default constructor.
const snd_seq_addr_t * getSender()
Gets the sender address of the subscription (MIDI OUT port)
void setExclusive(bool val)
Sets the subscription's exclusive flag.
int getSizeOfInfo() const
Gets the size of the ALSA subscription object.
bool getExclusive()
Gets the subscription's exclusive flag.
void setSender(unsigned char client, unsigned char port)
Sets the Subscription's sender (MIDI OUT) port.
void unsubscribe(MidiClient *seq)
Breaks the subscription in the ALSA sequencer subsystem.
Subscription * clone()
Copy the current object.
void setDest(unsigned char client, unsigned char port)
Sets the Subscription's destination (MIDI IN) port.
int getQueue()
Gets the susbcription's queue number.
void setQueue(int queue)
Sets the Subscription's Queue number.
void setTimeUpdate(bool val)
Sets the susbcription's time-update flag.
Subscription & operator=(const Subscription &other)
Assignment operator.
bool getTimeUpdate()
Gets the susbcription's time-update flag.
void setTimeReal(bool val)
Sets the subscription's time real (time-stamping) flag.
const snd_seq_addr_t * getDest()
Gets the destination address of the subscription (MIDI IN port)
void subscribe(MidiClient *seq)
Performs the subscription in the ALSA sequencer subsystem.
bool getTimeReal()
Gets the susbcription's time-real (time-stamping) flag.
QList< Subscription > SubscriptionsList
List of subscriptions.
QList< Subscriber > SubscribersList
List of subscribers.
Drumstick ALSA library wrapper.